/* ============================================================
   copy.golf — blackwall cyberpunk
   ============================================================ */

:root {
  /* the wall */
  --bg:        #050507;
  --bg-1:      #08080c;
  --bg-2:      #0c0c12;
  --bg-3:      #12121a;

  --line:      #1a1a24;
  --line-2:    #26263a;
  --line-3:    #3a3a55;

  --fg:        #d8e6e8;
  --fg-2:      #8a96a0;
  --fg-mute:   #4a525c;
  --fg-dim:    #2a2f38;

  /* accents — fixed cyan/magenta, plus per-category */
  --cyan:      #00ffd0;
  --cyan-d:    #00b89a;
  --magenta:   #ff2cd6;
  --magenta-d: #b8128f;
  --red:       #ff4444;

  --accent-hue: 180;
  --accent:    var(--cyan);
  --accent-d:  var(--cyan-d);

  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 0px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  font-feature-settings: "ss01", "calt";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* the blackwall — subtle red bleed + scanlines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 80% -10%, rgba(255, 44, 214, 0.06), transparent 50%),
    radial-gradient(ellipse at -10% 110%, rgba(0, 255, 208, 0.04), transparent 60%),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 2px,
      rgba(255, 255, 255, 0.012) 2px,
      rgba(255, 255, 255, 0.012) 3px
    );
  mix-blend-mode: screen;
}
body.no-scanlines::before {
  background:
    radial-gradient(ellipse at 80% -10%, rgba(255, 44, 214, 0.06), transparent 50%),
    radial-gradient(ellipse at -10% 110%, rgba(0, 255, 208, 0.04), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(0,0,0,0.5) 100%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.muted { color: var(--fg-mute); }
.small { font-size: 11px; }
.mono-strong { color: var(--fg); font-weight: 500; }

/* ============================================================
   Layout
   ============================================================ */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding: 8px 0 56px;
}

/* ============================================================
   Header — status bar style
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--line);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.brand-mark {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-d);
}
.brand-name {
  color: var(--fg);
  padding: 0 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
}
.nav-link {
  color: var(--fg-2);
  transition: color 0.12s, text-shadow 0.12s;
  position: relative;
  padding: 4px 0;
  letter-spacing: 0.04em;
}
.nav-link::before {
  content: "[";
  color: var(--fg-dim);
  margin-right: 2px;
  opacity: 0;
  transition: opacity 0.12s;
}
.nav-link::after {
  content: "]";
  color: var(--fg-dim);
  margin-left: 2px;
  opacity: 0;
  transition: opacity 0.12s;
}
.nav-link:hover {
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-d);
}
.nav-link:hover::before, .nav-link:hover::after { opacity: 1; }
.nav-link.is-active {
  color: var(--cyan);
}
.nav-link.is-active::before, .nav-link.is-active::after { opacity: 1; color: var(--cyan-d); }

.nav-mute { color: var(--fg-mute); }
.nav-sep { color: var(--fg-dim); }

/* status bar under header */
.status-bar {
  display: flex;
  gap: 24px;
  padding: 6px 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.status-bar .status-item {
  display: flex;
  gap: 6px;
  align-items: center;
}
.status-bar .status-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan-d);
  animation: pulse 2s ease-in-out infinite;
}
.status-bar .status-key { color: var(--fg-dim); }
.status-bar .status-val { color: var(--fg-2); }
.status-bar .status-val.warn { color: var(--magenta); text-shadow: 0 0 4px var(--magenta-d); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
  padding: 28px 0 16px;
  position: relative;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding-top: 24px;
}

.hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--magenta);
  text-shadow: 0 0 6px var(--magenta-d);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--magenta);
}

.hero-title {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 42px;
  font-weight: 500;
  line-height: 1;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  color: var(--fg);
  position: relative;
}

.hero-title-top {
  color: var(--fg);
}

.hero-title-bottom {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.hero-bracket {
  color: var(--magenta);
  text-shadow: 0 0 8px var(--magenta-d);
  letter-spacing: -0.12em;
}

.hero-period {
  color: var(--fg);
}

.hero-h1 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 42px;
  font-weight: 500;
  line-height: 1.0;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  color: var(--fg);
  position: relative;
}
.hero-accent {
  color: var(--cyan);
  font-style: normal;
  position: relative;
  text-shadow:
    0 0 12px rgba(0, 255, 208, 0.4);
}
.hero-title .hero-accent {
  font-size: 1.02em;
}

/* glitch flicker on h1 */
.hero-title::after {
  content: "golf your exploit.";
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--magenta);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  animation: glitch-flicker 7s infinite;
}
@keyframes glitch-flicker {
  0%, 96%, 100% { opacity: 0; transform: translate(0, 0); }
  96.5% { opacity: 0.6; transform: translate(-1px, 0); }
  97% { opacity: 0; }
  97.5% { opacity: 0.4; transform: translate(2px, -1px); }
  98% { opacity: 0; }
}

.hero-sub {
  font-size: 12px;
  color: var(--fg-2);
  margin: 0;
  line-height: 1.9;
}
.hero-sub .muted { color: var(--fg-mute); }

/* ============================================================
   Form — terminal panel
   ============================================================ */
.form {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  padding: 0;
  position: relative;
}
.form::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
}
.form::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-bottom: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
}

.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-2);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.form-head-left { color: var(--cyan); }
.form-head-left::before { content: "▸ "; color: var(--cyan); }
.form-head-right { display: flex; gap: 6px; }
.form-head-right span { width: 8px; height: 8px; border: 1px solid var(--line-3); }
.form-head-right span:first-child { border-color: var(--magenta); background: var(--magenta); opacity: 0.6; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.field-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-mute);
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-label::before {
  content: "$";
  color: var(--cyan);
  font-weight: 500;
}

.field-input {
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--fg);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  border-radius: var(--radius);
  transition: border-color 0.1s, box-shadow 0.1s;
  caret-color: var(--cyan);
}
.field-input:hover { border-color: var(--line-3); }
.field-input:focus {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 1px var(--cyan),
    0 0 12px rgba(0, 255, 208, 0.2);
}
.field-input::placeholder { color: var(--fg-dim); }

.field-select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cyan) 50%),
    linear-gradient(-45deg, transparent 50%, var(--cyan) 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.field-drop {
  grid-column: 1 / -1;
}
.field-file-hidden { display: none; }

.field-drop-body {
  background: var(--bg);
  border: 1px dashed var(--line-3);
  padding: 22px 14px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.1s;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.field-drop-body::before {
  content: "// drop_zone";
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 9px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
}
.field-drop:hover .field-drop-body { border-color: var(--cyan-d); }
.field-drop.is-drag .field-drop-body {
  border-color: var(--cyan);
  border-style: solid;
  background: rgba(0, 255, 208, 0.04);
  box-shadow: inset 0 0 24px rgba(0, 255, 208, 0.1);
}
.field-drop.is-file .field-drop-body {
  border-style: solid;
  border-color: var(--cyan);
}
.field-drop.is-file .field-drop-body::before { color: var(--cyan); }

.field-drop-text { font-size: 13px; }

.submit-btn {
  grid-column: 1 / -1;
  background: transparent;
  border: 1px solid var(--line-3);
  color: var(--fg-mute);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: left;
  border-radius: var(--radius);
  transition: all 0.14s;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.submit-btn::before {
  content: "▸";
  color: var(--fg-dim);
}
.submit-btn span.kbd {
  font-size: 10px;
  color: var(--fg-dim);
  border: 1px solid var(--line-2);
  padding: 1px 4px;
}
.submit-btn.is-ready {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--bg);
  font-weight: 600;
  box-shadow:
    0 0 0 1px var(--cyan),
    0 0 20px rgba(0, 255, 208, 0.3);
}
.submit-btn.is-ready::before { color: var(--bg); }
.submit-btn.is-ready span.kbd { color: var(--bg); border-color: rgba(0,0,0,0.3); }
.submit-btn.is-ready:hover {
  background: var(--magenta);
  border-color: var(--magenta);
  box-shadow:
    0 0 0 1px var(--magenta),
    0 0 24px rgba(255, 44, 214, 0.4);
}
.submit-btn:disabled { cursor: not-allowed; }

/* ============================================================
   Section headers
   ============================================================ */
.grid-section, .lb-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
  position: relative;
}
.grid-header::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 64px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-d);
}

.grid-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.grid-h {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg);
}
.grid-h::before {
  content: "// ";
  color: var(--magenta);
}

.grid-controls {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  gap: 4px;
  align-items: center;
}

.chip {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--fg-mute);
  padding: 4px 10px;
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
  transition: all 0.1s;
}
.chip:hover {
  color: var(--cyan);
  border-color: var(--cyan-d);
}
.chip.is-active {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 255, 208, 0.25);
}
.chip-ghost { border-color: transparent; padding: 4px 6px; }
.chip-ghost.is-active {
  background: transparent;
  border-color: transparent;
  color: var(--cyan);
  box-shadow: none;
  text-shadow: 0 0 6px var(--cyan-d);
}

.link-mini {
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
  transition: color 0.12s;
}
.link-mini:hover { color: var(--cyan); text-shadow: 0 0 6px var(--cyan-d); }

/* ============================================================
   Tile grid — blackwall cells
   ============================================================ */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px;
}
.tile-grid-tight { gap: 3px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 12px 16px;
  min-height: 92px;
  border-radius: var(--radius);
  transition: all 0.12s;
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 2px solid var(--tile-color, var(--cyan));
}
.tile-tight { min-height: 72px; padding: 10px 12px 10px 14px; }

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tile-color, var(--cyan));
  opacity: 0;
  transition: opacity 0.12s;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.tile::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 8px; height: 8px;
  border-top: 1px solid var(--tile-color, var(--cyan));
  border-right: 1px solid var(--tile-color, var(--cyan));
  opacity: 0;
  transition: opacity 0.12s;
}

.tile:hover {
  background: var(--bg-2);
  border-color: var(--tile-color, var(--cyan));
  box-shadow:
    inset 0 0 0 1px transparent,
    0 0 0 1px var(--tile-color, var(--cyan)),
    0 0 16px color-mix(in oklab, var(--tile-color, var(--cyan)) 25%, transparent);
}
.tile:hover::before { opacity: 0.08; }
.tile:hover::after { opacity: 1; }
.tile:hover .tile-name { text-shadow: 0 0 8px color-mix(in oklab, var(--tile-color, var(--cyan)) 50%, transparent); }

.app.tile-outline .tile {
  background: transparent;
}

.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.tile-cat {
  color: var(--tile-color, var(--cyan));
  font-weight: 500;
}
.tile-cat::before { content: "["; color: var(--fg-dim); margin-right: 1px; }
.tile-cat::after  { content: "]"; color: var(--fg-dim); margin-left: 1px; }

.tile-solves { font-variant-numeric: tabular-nums; color: var(--fg-2); }
.tile-solves::before { content: "✕"; opacity: 0.4; margin-right: 4px; }

.tile-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
  word-break: break-word;
  transition: text-shadow 0.12s;
}

.tile-bottom {
  margin-top: auto;
  font-size: 10px;
  color: var(--fg-2);
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tile-bytes { font-variant-numeric: tabular-nums; }
.tile-bytes .muted { color: var(--fg-dim); }
.tile-status-dot {
  width: 4px; height: 4px;
  background: var(--tile-color, var(--cyan));
  box-shadow: 0 0 4px var(--tile-color, var(--cyan));
}
.tile-status-dot.unsolved { background: var(--fg-dim); box-shadow: none; }

/* ============================================================
   Leaderboard
   ============================================================ */
.lb-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  position: relative;
}
.lb-table::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 1px solid var(--magenta);
  border-left: 1px solid var(--magenta);
  opacity: 0.6;
}

.lb-row {
  display: grid;
  grid-template-columns: 44px 1fr 80px 90px 90px;
  align-items: center;
  padding: 9px 16px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}
.lb-lang {
  color: var(--fg-mute);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:not(.lb-head):hover {
  background: var(--bg-2);
}
.recent-row-btn {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 9px 16px;
}
.recent-row-btn:hover {
  background: var(--bg-2);
}
.status-passed { color: var(--cyan); text-shadow: 0 0 6px var(--cyan-d); }
.status-failed { color: var(--red); text-shadow: 0 0 6px rgba(255, 68, 68, 0.35); }
.status-running, .status-queued { color: var(--magenta); text-shadow: 0 0 6px var(--magenta-d); }

.lb-head {
  background: var(--bg);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-mute);
  padding: 8px 16px;
}

.lb-rank {
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
}
.lb-row.is-top .lb-rank { color: var(--cyan); text-shadow: 0 0 6px var(--cyan-d); }
.lb-row.is-top .lb-user { color: var(--fg); font-weight: 500; }
.lb-row.is-top .lb-user::before { content: "▸ "; color: var(--cyan); }
.lb-user { color: var(--fg-2); }
.lb-pts { color: var(--fg); font-variant-numeric: tabular-nums; }
.lb-golfs { color: var(--fg-mute); font-variant-numeric: tabular-nums; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line-2);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 3px; left: 0;
  right: 0; height: 1px;
  background: var(--line);
}
.footer-blink {
  color: var(--cyan);
  animation: blink 1.4s step-end infinite;
}
.error-box {
  margin-top: 12px;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 10px 12px;
  background: rgba(255, 68, 68, 0.05);
  font-size: 11px;
  letter-spacing: 0.04em;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 24px;
  }
  .hero-title, .hero-h1 { font-size: 32px; }
  .app { padding: 0 18px; }
  .site-nav { gap: 12px; font-size: 11px; }
  .lb-row { grid-template-columns: 36px 1fr 60px 60px 70px; padding: 9px 12px; font-size: 11px; }
  .status-bar { gap: 14px; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .grid-controls { gap: 10px; }
}

/* ============================================================
   Challenge brief
   ============================================================ */
.brief {
  margin-top: 28px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 44ch;
}

.brief-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brief-tag {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--magenta);
  text-shadow: 0 0 6px var(--magenta-d);
  border: 1px solid var(--magenta-d);
  padding: 2px 6px;
}
.brief-slug {
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
}
.brief-slug::before { content: ".//"; color: var(--fg-dim); margin-right: 2px; }

.brief-desc {
  font-size: 18px;
  color: var(--fg);
  line-height: 1.4;
  margin: 0;
  font-family: var(--mono);
  letter-spacing: -0.01em;
}

/* "get 2 root" — only the 2 is styled, cyberpunk numeral */
.glitch-goal {
  font-family: var(--mono);
  font-weight: 700;
  font-style: italic;
  color: var(--cyan);
  font-size: 1.05em;
  letter-spacing: 0;
  padding: 0 2px;
  text-shadow:
    0 0 4px var(--cyan-d),
    0 0 10px rgba(0, 255, 208, 0.5),
    1px 0 0 rgba(255, 44, 214, 0.6),
    -1px 0 0 rgba(0, 255, 208, 0.6);
}
.brief-sep {
  color: var(--fg-mute);
  font-family: var(--mono);
  letter-spacing: 0.05em;
  margin: 0 4px;
}

.brief-meta {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  border-left: 1px solid var(--line-2);
  padding-left: 12px;
}
.brief-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
}
.brief-row dt {
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  align-self: center;
}
.brief-row dd {
  margin: 0;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}

.brief-download {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
  width: fit-content;
  transition: all 0.12s;
}
.brief-download:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0, 255, 208, 0.04);
  box-shadow: 0 0 12px rgba(0, 255, 208, 0.15);
}

.field-full { grid-column: 1 / -1; }

.field-ext {
  color: var(--magenta);
  font-size: 9px;
  letter-spacing: 0.1em;
  margin-left: 4px;
  text-shadow: 0 0 4px var(--magenta-d);
}

/* ============================================================
   Category tabs — full-width section
   ============================================================ */
.cat-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cat-tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.cat-tab-wide {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  color: var(--fg-2);
  padding: 18px 20px;
  font-family: var(--mono);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: all 0.14s;
  overflow: hidden;
}
.cat-tab-wide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cyan);
  opacity: 0;
  mix-blend-mode: overlay;
  pointer-events: none;
  transition: opacity 0.14s;
}
.cat-tab-wide:hover {
  border-color: var(--line-3);
  color: var(--fg);
  background: var(--bg-2);
}
.cat-tab-wide.is-active {
  border-color: var(--cyan);
  color: var(--fg);
  background: var(--bg-1);
  box-shadow:
    0 0 0 1px var(--cyan),
    0 0 24px rgba(0, 255, 208, 0.18),
    inset 0 0 40px rgba(0, 255, 208, 0.04);
}
.cat-tab-wide.is-active::before { opacity: 0.04; }
.cat-tab-wide.is-active::after {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
}

.cat-tab-wide-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.cat-tab-sigil {
  color: var(--magenta);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-shadow: 0 0 4px var(--magenta-d);
  border: 1px solid var(--magenta-d);
  padding: 1px 6px;
}
.cat-tab-wide.is-active .cat-tab-sigil {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-d);
}
.cat-tab-label {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.cat-tab-wide.is-active .cat-tab-label {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-d);
}
.cat-tab-count {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.cat-tab-wide-desc {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.6;
}
.cat-tab-wide-foot {
  display: flex;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.cat-tab-meta { color: var(--fg-mute); }

@media (max-width: 760px) {
  .cat-tab-row { grid-template-columns: 1fr; }
}

/* ============================================================
   Mock outcome row (for demo)
   ============================================================ */
.mock-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -4px;
}
.mock-label {
  color: var(--fg-dim);
  letter-spacing: 0.05em;
  text-transform: none;
  font-size: 10px;
}
.form-error {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ff4466;
  background: rgba(255, 68, 102, 0.08);
  color: #ff7088;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  text-shadow: 0 0 6px rgba(255, 68, 102, 0.4);
  word-break: break-word;
}
.mock-btn {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--fg-mute);
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.1s;
}
.mock-btn:hover { color: var(--fg); border-color: var(--line-3); }
.mock-ok:hover { color: var(--cyan); border-color: var(--cyan-d); text-shadow: 0 0 6px var(--cyan-d); }
.mock-fail:hover { color: var(--red); border-color: var(--red); text-shadow: 0 0 6px var(--red); }

/* ============================================================
   Verifier overlay
   ============================================================ */
.ver-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 2, 4, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: ver-fade 0.2s ease-out;
}
@keyframes ver-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ver-modal {
  width: min(720px, 100%);
  max-height: 80vh;
  background: var(--bg);
  border: 1px solid var(--cyan);
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px var(--cyan),
    0 0 60px rgba(0, 255, 208, 0.18),
    0 24px 80px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: ver-slide 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.ver-modal.ver-fail {
  border-color: var(--red);
  box-shadow:
    0 0 0 1px var(--red),
    0 0 60px rgba(255, 68, 68, 0.22),
    0 24px 80px rgba(0, 0, 0, 0.6);
}
@keyframes ver-slide {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.ver-modal::before, .ver-modal::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
}
.ver-modal::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--magenta);
  border-left: 2px solid var(--magenta);
}
.ver-modal::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--magenta);
  border-right: 2px solid var(--magenta);
}

.ver-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-2);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ver-head-left {
  display: flex; align-items: center; gap: 8px;
  color: var(--cyan);
}
.ver-modal.ver-fail .ver-head-left { color: var(--red); }
.ver-dot {
  width: 8px; height: 8px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: pulse 1.2s ease-in-out infinite;
}
.ver-modal.ver-fail .ver-dot { background: var(--red); box-shadow: 0 0 6px var(--red); }
.ver-modal.is-done .ver-dot { animation: none; }

.ver-head-mid {
  color: var(--fg-2);
  text-align: center;
}
.ver-modal.is-done.ver-success .ver-head-mid { color: var(--cyan); }
.ver-modal.is-done.ver-fail .ver-head-mid { color: var(--red); }

.ver-close {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--fg-mute);
  width: 22px; height: 22px;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  justify-self: end;
  transition: all 0.1s;
}
.ver-close:hover { color: var(--fg); border-color: var(--line-3); }

.ver-body {
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  overflow-y: auto;
  flex: 1;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 2px,
      rgba(0, 255, 208, 0.018) 2px,
      rgba(0, 255, 208, 0.018) 3px
    ),
    var(--bg);
  min-height: 280px;
  max-height: 60vh;
}

.ver-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  animation: ver-line-in 0.18s ease-out;
  white-space: pre-wrap;
  word-break: break-all;
}
@keyframes ver-line-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ver-prompt {
  color: var(--magenta);
  font-weight: 500;
  flex-shrink: 0;
}
.ver-text { flex: 1; }

.ver-line-head .ver-text {
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-d);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.ver-line-cmd .ver-text { color: var(--fg); }
.ver-line-out .ver-text { color: var(--fg-2); }
.ver-line-muted .ver-text { color: var(--fg-mute); font-size: 11px; letter-spacing: 0.05em; }
.ver-line-ok .ver-text {
  color: var(--cyan);
  text-shadow: 0 0 4px var(--cyan-d);
}
.ver-line-err .ver-text {
  color: var(--red);
  text-shadow: 0 0 4px var(--red);
}
.ver-line-score .ver-text {
  color: var(--magenta);
  text-shadow: 0 0 6px var(--magenta-d);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.ver-line.is-bold .ver-text {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ver-line-cursor { padding-top: 2px; }
.ver-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: blink 0.9s step-end infinite;
}

.ver-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--line-2);
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  animation: ver-line-in 0.3s ease-out;
}

.ver-stamp {
  font-size: 14px;
  letter-spacing: 0.2em;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid;
}
.ver-stamp-success {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-d);
  box-shadow: 0 0 16px rgba(0, 255, 208, 0.2), inset 0 0 16px rgba(0, 255, 208, 0.05);
}
.ver-stamp-fail {
  color: var(--red);
  border-color: var(--red);
  text-shadow: 0 0 8px var(--red);
  box-shadow: 0 0 16px rgba(255, 68, 68, 0.2), inset 0 0 16px rgba(255, 68, 68, 0.05);
}

.ver-action {
  background: transparent;
  border: 1px solid var(--line-3);
  color: var(--fg);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: all 0.12s;
}
.ver-success .ver-action:hover {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 255, 208, 0.3);
}
.ver-fail .ver-action:hover {
  color: var(--bg);
  background: var(--red);
  border-color: var(--red);
}
.ver-action .kbd {
  font-size: 10px;
  border: 1px solid currentColor;
  padding: 1px 4px;
  opacity: 0.7;
}

/* selection */
::selection {
  background: var(--cyan);
  color: var(--bg);
  text-shadow: none;
}

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-3); }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-d); }

/* ============================================================
   About page
   ============================================================ */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 80px 0 200px;
  min-height: 60vh;
  text-align: center;
}
.about-glyph {
  font-family: var(--mono);
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1;
}
.about-glyph-2 {
  font-size: 1em;
}
.about-glyph-asterisk {
  color: var(--magenta);
  text-shadow: 0 0 8px var(--magenta-d);
  font-size: 0.8em;
  margin-left: 2px;
  vertical-align: super;
}
.about-glyph-note {
  margin-top: 8px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
}
.about-body {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.9;
  color: var(--fg);
  max-width: 60ch;
  padding: 24px 0;
  text-align: left;
}
.about-prompt {
  color: var(--cyan);
  margin-right: 10px;
  text-shadow: 0 0 6px var(--cyan-d);
}
.about-line {
  color: var(--fg-mute);
  font-size: 12px;
  letter-spacing: 0.05em;
  margin: 0 0 18px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 14px;
}
.about-text {
  margin: 0 0 14px;
}
.about-text-mute {
  margin: 4px 0 18px;
  color: var(--fg-mute);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.about-foot {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-2);
  color: var(--fg-mute);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.about-code {
  margin: 6px 0 18px;
  padding: 14px 16px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg);
  overflow-x: auto;
  white-space: pre;
  text-shadow: 0 0 6px rgba(0, 255, 208, 0.05);
}
.about-link {
  color: var(--magenta);
  text-decoration: none;
  border-bottom: 1px solid var(--magenta-d);
  text-shadow: 0 0 8px var(--magenta-d);
  transition: all 0.14s;
  padding: 0 2px;
}
.about-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-d);
  background: rgba(0, 255, 208, 0.06);
}
.about-cursor {
  display: inline-block;
  color: var(--cyan);
  animation: blink 1.1s steps(1) infinite;
  margin-left: 4px;
  text-shadow: 0 0 6px var(--cyan-d);
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   Ranks page
   ============================================================ */
.ranks-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 80px;
}
.ranks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.ranks-grid .lb-section { margin-top: 0; }
.ranks-grid > :nth-child(3) { grid-column: 1 / -1; }
@media (max-width: 920px) {
  .ranks-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Hero subtitle inline link (copy.fail)
   ============================================================ */
.hero-sub-link {
  color: var(--magenta);
  text-decoration: none;
  border-bottom: 1px solid var(--magenta-d);
  text-shadow: 0 0 6px var(--magenta-d);
  padding: 0 2px;
  transition: all 0.14s;
}
.hero-sub-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-d);
}

/* ============================================================
   Share / GitHub link
   ============================================================ */
.ver-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.share-form {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  background: rgba(0, 255, 208, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.share-mark {
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-d);
}
.share-label {
  color: var(--fg);
}
.share-input-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.share-input-row:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan-d), 0 0 12px rgba(0, 255, 208, 0.18);
}
.share-prefix {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--fg-mute);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid var(--line-2);
  user-select: none;
}
.share-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 9px 10px;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.share-input::placeholder {
  color: var(--fg-mute);
}
.share-btn {
  background: var(--cyan);
  color: #001512;
  border: none;
  padding: 0 16px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: filter 0.12s;
}
.share-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}
.share-btn:disabled {
  background: var(--line-2);
  color: var(--fg-mute);
  cursor: not-allowed;
}
.share-error {
  color: #ff7088;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-shadow: 0 0 6px rgba(255, 68, 102, 0.3);
}
.share-row-locked {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  background: rgba(255, 255, 255, 0.02);
}
.share-mute {
  color: var(--fg-mute);
  font-size: 11px;
  letter-spacing: 0.04em;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.share-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--cyan-d);
  background: rgba(0, 255, 208, 0.06);
  color: var(--cyan);
  text-decoration: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  text-shadow: 0 0 6px var(--cyan-d);
  transition: all 0.12s;
}
.share-link:hover {
  background: rgba(0, 255, 208, 0.12);
  border-color: var(--cyan);
}
.share-link-mark { color: var(--magenta); }
.share-link-text { letter-spacing: 0.02em; }

.ver-failhint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px dashed var(--line-2);
  background: rgba(255, 68, 102, 0.04);
  color: var(--fg-mute);
  text-decoration: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: all 0.12s;
}
.ver-failhint:hover {
  border-color: var(--cyan);
  color: var(--fg);
}
.ver-failhint-mark {
  color: #ff7088;
  text-shadow: 0 0 4px rgba(255, 68, 102, 0.3);
}
.ver-failhint-link {
  color: var(--cyan);
  border-bottom: 1px solid var(--cyan-d);
  text-shadow: 0 0 4px var(--cyan-d);
}

.lb-user-link {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid var(--cyan-d);
  text-shadow: 0 0 6px var(--cyan-d);
  padding: 0 2px;
  transition: all 0.14s;
}
.lb-user-link:hover {
  color: var(--magenta);
  border-color: var(--magenta);
  text-shadow: 0 0 6px var(--magenta-d);
}
