:root {
      --bg-0: #06101a;
      --bg-1: #0a1827;
      --bg-2: #11283c;
      --surface: rgba(9, 18, 30, 0.88);
      --surface-2: rgba(11, 23, 38, 0.72);
      --stroke: rgba(116, 174, 238, 0.18);
      --ink: #f2f6ff;
      --ink-dim: rgba(242, 246, 255, 0.74);
      --ink-muted: rgba(242, 246, 255, 0.52);
      --accent: #57c7ff;
      --accent-2: #2d8fff;
      --ok: #49d19a;
      --warn: #f2c36f;
      --bad: #ff7d8b;
      --mono: "JetBrains Mono", ui-monospace, monospace;
      --shadow: rgba(2, 8, 16, 0.54);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: "Space Grotesk", "Segoe UI", sans-serif;
      color: var(--ink);
      background:
        radial-gradient(720px 460px at 8% 8%, rgba(87, 199, 255, 0.18), transparent 62%),
        radial-gradient(660px 380px at 92% 0%, rgba(45, 143, 255, 0.18), transparent 60%),
        linear-gradient(145deg, var(--bg-0) 0%, var(--bg-1) 42%, var(--bg-2) 100%);
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.03) 0, transparent 38%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 8px);
      opacity: 0.55;
    }

    .shell {
      position: relative;
      z-index: 1;
      width: min(1220px, calc(100% - 32px));
      margin: 0 auto;
      padding: 24px 0 48px;
    }

    .topbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 18px 20px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 24px;
      background: rgba(6, 14, 24, 0.86);
      backdrop-filter: blur(14px);
      box-shadow: 0 24px 48px var(--shadow);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .logo {
      width: 48px;
      height: 48px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      font-weight: 800;
      letter-spacing: 0.8px;
      color: #041321;
      background: linear-gradient(135deg, #84ddff, #2c7cff);
      box-shadow: 0 18px 36px rgba(32, 98, 183, 0.4);
    }

    .brand h1 {
      margin: 0;
      font-size: 18px;
      font-weight: 800;
    }

    .brand p {
      margin: 4px 0 0;
      font-size: 12px;
      color: var(--ink-dim);
    }

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

    .select {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: var(--ink-dim);
    }

    select, .btn {
      border-radius: 14px;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.2px;
    }

    select {
      appearance: none;
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: rgba(6, 14, 24, 0.94);
      color: var(--ink);
      padding: 10px 14px;
      min-width: 180px;
    }

    .btn {
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: none;
      cursor: pointer;
      padding: 11px 16px;
      color: #02111f;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      box-shadow: 0 18px 34px rgba(22, 88, 160, 0.36);
    }

    .btn.ghost {
      color: var(--ink);
      background: rgba(8, 18, 30, 0.72);
      border: 1px solid rgba(255, 255, 255, 0.16);
      box-shadow: none;
    }

    .hero {
      display: grid;
      grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
      gap: 18px;
      margin-top: 20px;
    }

    .panel, .card {
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 26px;
      background: var(--surface);
      box-shadow: 0 26px 56px var(--shadow);
    }

    .hero-main {
      padding: 28px;
      overflow: hidden;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(87, 199, 255, 0.12);
      color: #aee6ff;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .hero-main h2 {
      margin: 18px 0 10px;
      font-size: clamp(28px, 5vw, 44px);
      line-height: 1.02;
    }

    .hero-main p {
      margin: 0;
      max-width: 720px;
      color: var(--ink-dim);
      font-size: 15px;
      line-height: 1.65;
    }

    .hero-side {
      padding: 24px;
      display: grid;
      gap: 14px;
      align-content: start;
    }

    .note {
      padding: 16px 18px;
      border-radius: 20px;
      background: rgba(8, 18, 30, 0.78);
      border: 1px solid rgba(255, 255, 255, 0.07);
    }

    .note strong {
      display: block;
      margin-bottom: 6px;
      font-size: 13px;
      color: #b7ebff;
    }

    .note p {
      margin: 0;
      font-size: 13px;
      line-height: 1.6;
      color: var(--ink-dim);
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      margin-top: 18px;
    }

    .card {
      padding: 18px 18px 20px;
    }

    .label {
      font-size: 11px;
      color: var(--ink-muted);
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .value {
      margin-top: 10px;
      font-size: clamp(24px, 3vw, 34px);
      font-weight: 800;
      line-height: 1;
    }

    .sub {
      margin-top: 10px;
      font-size: 12px;
      color: var(--ink-dim);
    }

    .content {
      margin-top: 18px;
      padding: 22px;
    }

    .content-head {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
    }

    .content-head h3 {
      margin: 0;
      font-size: 20px;
    }

    .content-head p {
      margin: 6px 0 0;
      color: var(--ink-dim);
      font-size: 13px;
    }

    .status {
      font-size: 13px;
      color: var(--ink-dim);
    }

    .table-wrap {
      overflow: auto;
      border-radius: 22px;
      background: var(--surface-2);
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 920px;
    }

    th, td {
      padding: 14px 16px;
      text-align: left;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      vertical-align: middle;
    }

    th {
      font-size: 11px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--ink-muted);
      background: rgba(255, 255, 255, 0.02);
    }

    td {
      font-size: 13px;
      color: var(--ink);
    }

    tbody tr:hover {
      background: rgba(255, 255, 255, 0.02);
    }

    .mono {
      font-family: var(--mono);
    }

    .result-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .result-pill.solved {
      color: #061810;
      background: rgba(73, 209, 154, 0.92);
    }

    .result-pill.open {
      color: #1c1202;
      background: rgba(242, 195, 111, 0.94);
    }

    .result-pill.missed {
      color: #fff1f2;
      background: rgba(255, 125, 139, 0.28);
      border: 1px solid rgba(255, 125, 139, 0.26);
    }

    .closest {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-width: 110px;
    }

    .closest-bar {
      position: relative;
      width: 68px;
      height: 7px;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.08);
    }

    .closest-fill {
      position: absolute;
      inset: 0 auto 0 0;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--accent), var(--accent-2));
    }

    .closest-fill.solved {
      background: linear-gradient(90deg, #6de6b1, #35c783);
    }

    .wallet-link {
      color: #aee6ff;
      text-decoration: none;
    }

    .wallet-link:hover {
      text-decoration: underline;
    }

    .metric-cell {
      min-width: 132px;
    }

    .metric-primary {
      font-size: 13px;
      color: var(--ink);
    }

    .metric-secondary {
      margin-top: 4px;
      font-size: 11px;
      color: var(--ink-muted);
    }

    .empty {
      padding: 24px;
      text-align: center;
      color: var(--ink-dim);
      font-size: 14px;
    }

    .mobile-list {
      display: none;
      gap: 12px;
    }

    .height-card {
      display: grid;
      gap: 12px;
      padding: 16px;
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(8, 18, 30, 0.78);
    }

    .height-card-head {
      display: grid;
      gap: 8px;
    }

    .height-card-topline {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .height-card-height {
      font-size: 14px;
      font-weight: 700;
      color: var(--ink);
    }

    .height-card-time {
      font-size: 12px;
      color: var(--ink-dim);
    }

    .height-card-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .height-card-metric {
      display: grid;
      gap: 4px;
      padding: 10px 12px;
      border-radius: 14px;
      background: rgba(6, 14, 24, 0.72);
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .height-card-metric span {
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ink-muted);
    }

    .height-card-metric strong {
      font-size: 13px;
      color: var(--ink);
      overflow-wrap: anywhere;
    }

    .height-card-footer {
      display: grid;
      gap: 4px;
      padding-top: 4px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .height-card-footer span {
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--ink-muted);
    }

    .height-card-footer a,
    .height-card-footer strong {
      font-size: 13px;
      color: var(--ink);
      overflow-wrap: anywhere;
    }

    @media (max-width: 980px) {
      .hero,
      .grid {
        grid-template-columns: 1fr;
      }

      .shell {
        width: min(100%, calc(100% - 18px));
      }

      .topbar,
      .hero-main,
      .hero-side,
      .card,
      .content {
        border-radius: 20px;
      }

      .controls {
        width: 100%;
      }

      .select {
        width: 100%;
        justify-content: space-between;
      }

      select {
        flex: 1 1 auto;
        min-width: 0;
      }
    }

    @media (max-width: 760px) {
      body::before {
        opacity: 0.35;
      }

      .shell {
        width: min(100%, calc(100% - 16px));
        padding: 16px 0 32px;
      }

      .topbar {
        padding: 16px;
        gap: 12px;
      }

      .controls {
        display: grid;
        grid-template-columns: 1fr;
      }

      .btn,
      select {
        width: 100%;
        min-height: 44px;
      }

      .hero-main,
      .hero-side,
      .card,
      .content {
        padding: 18px;
      }

      .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .table-wrap {
        display: none;
      }

      .mobile-list {
        display: grid;
      }
    }

    @media (max-width: 520px) {
      .grid,
      .height-card-grid {
        grid-template-columns: 1fr;
      }

      .content-head {
        align-items: flex-start;
      }
    }
