@layer reset, base, components, pages, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { min-width: 320px; }
  body, h1, h2, h3, p, dl, dd, pre { margin: 0; }
  button, input { font: inherit; }
  button, a { -webkit-tap-highlight-color: transparent; }
  img { display: block; max-width: 100%; }
}

@layer base {
  :root {
    --ink: #090c0d;
    --ink-soft: #101516;
    --panel: #151b1c;
    --panel-raised: #1b2223;
    --line: #303839;
    --line-bright: #4c5758;
    --paper: #e8ede6;
    --muted: #91a09d;
    --acid: #d8ff45;
    --acid-dim: #9dbb30;
    --cyan: #74e7d4;
    --danger: #ff725c;
    --warning: #f1bf58;
    --display: "Bahnschrift SemiCondensed", "Microsoft YaHei UI", sans-serif;
    --body: "Aptos", "Microsoft YaHei UI", sans-serif;
    --mono: "Cascadia Mono", "Microsoft YaHei UI", monospace;
  }

  body {
    min-height: 100vh;
    color: var(--paper);
    background:
      radial-gradient(circle at 75% -20%, rgba(116, 231, 212, 0.08), transparent 35rem),
      linear-gradient(120deg, #080b0c 0%, #0b0f10 60%, #0d1111 100%);
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.55;
  }

  body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
    background-size: 46px 46px;
    content: "";
    mask-image: linear-gradient(to bottom, black, transparent 85%);
  }

  .grain {
    position: fixed;
    z-index: 20;
    inset: 0;
    opacity: 0.025;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  }

  a { color: inherit; text-decoration: none; }
  button { color: inherit; }
  ::selection { color: var(--ink); background: var(--acid); }

  h1, h2, h3, .brand, .button, .report-index, .stat-card strong {
    font-family: var(--display);
  }

  h1 {
    max-width: 900px;
    font-size: clamp(2.6rem, 5vw, 5.4rem);
    font-stretch: condensed;
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 0.94;
  }

  h2 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.015em;
  }

  code, pre { font-family: var(--mono); }

  input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    color: var(--paper);
    border: 1px solid var(--line-bright);
    border-radius: 0;
    outline: none;
    background: #0d1112;
    transition: border-color 160ms ease, box-shadow 160ms ease;
  }

  input:focus {
    border-color: var(--acid);
    box-shadow: 0 0 0 3px rgba(216, 255, 69, 0.13);
  }

  input::placeholder { color: #65716f; }

  label {
    display: grid;
    gap: 8px;
    color: var(--paper);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  label > span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 400;
  }
}

@layer components {
  .eyebrow {
    color: var(--acid);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .topbar {
    position: sticky;
    z-index: 10;
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    min-height: 74px;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 12, 13, 0.92);
    backdrop-filter: blur(18px);
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    padding: 0 28px;
  }

  .brand > span:last-child { display: grid; line-height: 1; }
  .brand strong { font-size: 1.02rem; letter-spacing: 0.03em; }
  .brand small {
    margin-top: 5px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
  }

  .brand-mark {
    display: grid;
    grid-template-columns: repeat(3, 4px);
    align-items: end;
    gap: 3px;
    height: 25px;
  }

  .brand-mark i { display: block; width: 4px; background: var(--acid); }
  .brand-mark i:nth-child(1) { height: 10px; }
  .brand-mark i:nth-child(2) { height: 24px; }
  .brand-mark i:nth-child(3) { height: 16px; }

  nav { display: flex; }

  .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    padding: 0 23px;
    color: var(--muted);
    border-inline: 1px solid transparent;
    transition: color 160ms ease, background 160ms ease;
  }

  .nav-item:hover { color: var(--paper); background: rgba(255,255,255,0.025); }
  .nav-item.is-active {
    color: var(--paper);
    border-inline-color: var(--line);
    background: var(--panel);
  }

  .nav-item.is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    background: var(--acid);
    content: "";
  }

  .nav-number { color: var(--acid); font-family: var(--mono); font-size: 0.62rem; }

  .logout-form { justify-self: end; align-self: center; padding-right: 28px; }
  .quiet-button, .danger-link {
    padding: 7px 0;
    color: var(--muted);
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    cursor: pointer;
  }
  .quiet-button:hover { color: var(--paper); border-color: var(--paper); }
  .danger-link { color: var(--danger); font-size: 0.82rem; }
  .danger-link:hover { border-color: var(--danger); }

  .main-content {
    width: min(1480px, calc(100% - 64px));
    margin: 0 auto;
    padding: 76px 0 110px;
    animation: content-in 500ms cubic-bezier(.2,.8,.2,1) both;
  }

  @keyframes content-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .page-heading { margin-bottom: 52px; }
  .page-heading .eyebrow { margin-bottom: 15px; }
  .page-heading > p:last-child,
  .split-heading > div > p:last-child {
    max-width: 660px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 1rem;
  }

  .split-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
  }

  .live-indicator {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 9px;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .live-indicator i,
  .status i,
  .report-client i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
  }

  .live-indicator i {
    box-shadow: 0 0 0 5px rgba(116,231,212,0.1), 0 0 18px var(--cyan);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    50% { opacity: 0.45; box-shadow: 0 0 0 8px rgba(116,231,212,0); }
  }

  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 47px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 140ms ease, background 140ms ease, color 140ms ease, border-color 140ms ease;
  }

  .button:hover { transform: translateY(-2px); }
  .button-primary { color: var(--ink); background: var(--acid); }
  .button-primary:hover { background: #e4ff7b; box-shadow: 0 8px 28px rgba(216,255,69,0.13); }
  .button-secondary { color: var(--paper); border-color: var(--line-bright); background: var(--panel); }
  .button-secondary:hover { border-color: var(--paper); }
  .button-copy { color: var(--acid); border-color: rgba(216,255,69,0.45); background: transparent; }
  .button-copy.is-copied { color: var(--ink); background: var(--acid); }

  .section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 21px;
  }
  .section-title span { color: var(--muted); font-family: var(--mono); font-size: 0.65rem; }

  .content-section {
    padding: 27px;
    border: 1px solid var(--line);
    background: rgba(21,27,28,0.72);
  }

  .alert {
    margin-bottom: 24px;
    padding: 13px 16px;
    border-left: 3px solid;
    font-size: 0.87rem;
  }
  .alert-error { color: #ffb0a4; border-color: var(--danger); background: rgba(255,114,92,0.1); }
  .alert-success { color: var(--acid); border-color: var(--acid); background: rgba(216,255,69,0.08); }

  .muted { color: var(--muted); }
  .back-link {
    display: inline-block;
    margin-bottom: 31px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
  }
  .back-link:hover { color: var(--acid); }

  table { width: 100%; border-collapse: collapse; }
  th {
    padding: 11px 14px;
    color: var(--muted);
    border-bottom: 1px solid var(--line-bright);
    font-family: var(--mono);
    font-size: 0.64rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
  }
  td { padding: 15px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  tbody tr:last-child td { border-bottom: 0; }
  td strong, td small { display: block; }
  td small { margin-top: 3px; color: var(--muted); font-family: var(--mono); font-size: 0.68rem; }
  td time, td { font-size: 0.78rem; }
  .empty-cell { padding: 38px; color: var(--muted); text-align: center; }
  .table-scroll { overflow-x: auto; }

  .status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
  }
  .status-live { color: var(--acid); }
  .status-waiting { color: var(--warning); }
  .status-dead { color: var(--muted); }
  .status i { width: 5px; height: 5px; }
}

@layer pages {
  .auth-shell {
    display: grid;
    place-items: center;
    padding: 34px;
    overflow-x: hidden;
  }

  .auth-main { width: min(1020px, 100%); }

  .auth-panel {
    position: relative;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    min-height: 610px;
    border: 1px solid var(--line-bright);
    background: var(--ink-soft);
    box-shadow: 0 35px 100px rgba(0,0,0,0.44);
    animation: auth-in 650ms cubic-bezier(.16,.85,.25,1) both;
  }

  @keyframes auth-in {
    from { opacity: 0; transform: scale(0.98) translateY(18px); }
    to { opacity: 1; transform: none; }
  }

  .auth-panel::before,
  .auth-panel::after {
    position: absolute;
    width: 22px;
    height: 22px;
    content: "";
  }
  .auth-panel::before { top: -7px; left: -7px; border-top: 1px solid var(--acid); border-left: 1px solid var(--acid); }
  .auth-panel::after { right: -7px; bottom: -7px; border-right: 1px solid var(--acid); border-bottom: 1px solid var(--acid); }

  .auth-identity {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 52px;
    overflow: hidden;
    border-right: 1px solid var(--line);
    background:
      linear-gradient(150deg, transparent 25%, rgba(216,255,69,0.05) 25.2%, transparent 25.5%),
      radial-gradient(circle at 50% 35%, rgba(116,231,212,0.11), transparent 15rem),
      #0d1112;
  }

  .auth-identity .eyebrow { margin-bottom: 14px; }
  .auth-identity h1 { max-width: 460px; font-size: clamp(3.4rem, 6vw, 5.8rem); }
  .auth-identity > p:last-of-type { max-width: 450px; margin-top: 21px; color: var(--muted); }

  .signal-orbit {
    position: absolute;
    top: 50px;
    left: 50px;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(116,231,212,0.25);
    border-radius: 50%;
  }
  .signal-orbit::before,
  .signal-orbit::after {
    position: absolute;
    border: 1px solid rgba(116,231,212,0.12);
    border-radius: 50%;
    content: "";
  }
  .signal-orbit::before { inset: 23px; }
  .signal-orbit::after { inset: 50px; background: var(--cyan); box-shadow: 0 0 40px rgba(116,231,212,0.7); }
  .signal-orbit i {
    position: absolute;
    top: 77px;
    left: 77px;
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, var(--cyan), transparent);
    transform-origin: left;
    animation: scan 3s linear infinite;
  }
  @keyframes scan { to { transform: rotate(360deg); } }

  .auth-stripes {
    position: absolute;
    right: 25px;
    bottom: 0;
    width: 130px;
    height: 9px;
    background: repeating-linear-gradient(135deg, var(--acid) 0 7px, transparent 7px 14px);
  }

  .auth-form-wrap { display: grid; align-content: center; padding: 60px; }
  .stack-form { display: grid; gap: 23px; }
  .stack-form .button { margin-top: 5px; }

  .stats-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, 1fr);
    margin-bottom: 28px;
    border-block: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .stat-card {
    display: grid;
    min-height: 126px;
    padding: 23px;
    border-right: 1px solid var(--line);
    background: rgba(16,21,22,0.62);
  }
  .stat-card strong {
    align-self: end;
    font-size: 2.6rem;
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
  }
  .stat-card span { align-self: end; margin-top: 12px; color: var(--muted); font-size: 0.72rem; }
  .stat-accent { color: var(--ink); background: var(--acid); }
  .stat-accent span { color: rgba(9,12,13,0.7); }

  .report-list { border-top: 1px solid var(--line-bright); }
  .report-row {
    display: grid;
    grid-template-columns: 54px minmax(240px, 2.4fr) minmax(130px, 1fr) 90px 170px 25px;
    align-items: center;
    min-height: 91px;
    border-bottom: 1px solid var(--line);
    transition: background 160ms ease, border-color 160ms ease;
  }
  .report-row:hover { border-color: var(--acid-dim); background: rgba(216,255,69,0.035); }
  .report-index { color: var(--acid); font-family: var(--mono); font-size: 0.68rem; }
  .report-main { display: grid; gap: 4px; min-width: 0; padding-right: 25px; }
  .report-main strong { overflow: hidden; font-size: 0.97rem; text-overflow: ellipsis; white-space: nowrap; }
  .report-main small { overflow: hidden; color: var(--muted); font-size: 0.76rem; text-overflow: ellipsis; white-space: nowrap; }
  .report-client { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 0.75rem; }
  .report-client i { width: 5px; height: 5px; }
  .report-files, .report-row time { color: var(--muted); font-family: var(--mono); font-size: 0.66rem; }
  .row-arrow { color: var(--line-bright); font-size: 1.1rem; transition: color 160ms ease, transform 160ms ease; }
  .report-row:hover .row-arrow { color: var(--acid); transform: translate(2px, -2px); }

  .empty-state { display: grid; justify-items: center; padding: 75px 20px; text-align: center; }
  .empty-state h3 { margin-top: 21px; font-size: 1.45rem; }
  .empty-state p { margin: 8px 0 23px; color: var(--muted); }
  .empty-radar {
    position: relative;
    width: 68px;
    height: 68px;
    border: 1px solid var(--line-bright);
    border-radius: 50%;
  }
  .empty-radar::before, .empty-radar::after {
    position: absolute;
    inset: 13px;
    border: 1px solid var(--line);
    border-radius: 50%;
    content: "";
  }
  .empty-radar::after { inset: 31px; border-color: var(--acid); background: var(--acid); }

  .token-workbench {
    display: grid;
    grid-template-columns: minmax(420px, 0.9fr) minmax(440px, 1.1fr);
    margin-bottom: 28px;
    border: 1px solid var(--line);
  }
  .token-form { display: grid; gap: 22px; padding: 31px; background: var(--panel); }
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .api-card {
    min-width: 0;
    padding: 31px;
    border-left: 1px solid var(--line);
    background: #0d1112;
  }
  .api-card .eyebrow { margin-bottom: 10px; }
  .api-card pre {
    margin: 20px 0 14px;
    padding: 17px;
    overflow-x: auto;
    color: #c2d4d0;
    border-left: 2px solid var(--cyan);
    background: #080b0c;
    font-size: 0.72rem;
    line-height: 1.7;
  }
  .api-card > p:last-child { color: var(--muted); font-size: 0.78rem; }
  .api-card > p code { color: var(--cyan); }

  .issued-token {
    margin-bottom: 28px;
    padding: 26px 29px;
    color: var(--ink);
    border: 1px solid var(--acid);
    background: var(--acid);
    box-shadow: 0 18px 55px rgba(216,255,69,0.09);
  }
  .issued-token .eyebrow { color: rgba(9,12,13,0.65); }
  .issued-token h2 { margin-top: 5px; font-size: 1.45rem; }
  .issued-token > p { margin-top: 11px; color: rgba(9,12,13,0.7); font-size: 0.78rem; }
  .secret-line { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-top: 19px; }
  .secret-line code {
    padding: 14px;
    overflow-x: auto;
    color: var(--paper);
    background: var(--ink);
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .issued-token .button-copy { color: var(--ink); border-color: var(--ink); }
  .issued-token .button-copy:hover, .issued-token .button-copy.is-copied { color: var(--paper); background: var(--ink); }

  .token-history td:nth-child(1) { min-width: 150px; }
  .token-history td:nth-child(3), .token-history td:nth-child(4) { min-width: 170px; }

  .report-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.7fr);
    gap: 60px;
    align-items: end;
    margin-bottom: 31px;
    padding: 48px;
    border: 1px solid var(--line-bright);
    background:
      linear-gradient(110deg, rgba(216,255,69,0.065), transparent 45%),
      var(--ink-soft);
  }
  .report-hero .eyebrow { margin-bottom: 16px; }
  .report-time { margin-top: 18px; color: var(--muted); }
  .report-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .report-facts div { min-width: 0; padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .report-facts dt { color: var(--muted); font-family: var(--mono); font-size: 0.62rem; }
  .report-facts dd { margin-top: 4px; overflow: hidden; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }

  .report-access {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: 32px;
    margin-bottom: 28px;
    padding: 24px 27px;
    border: 1px solid var(--line-bright);
    background: rgba(21,27,28,0.72);
  }
  .report-access.is-public {
    border-color: rgba(216,255,69,0.48);
    background: linear-gradient(110deg, rgba(216,255,69,0.09), rgba(21,27,28,0.82) 48%);
  }
  .report-access-copy .eyebrow { margin-bottom: 8px; }
  .report-access-copy h2 { font-size: 1.25rem; }
  .report-access-copy > p:last-child { margin-top: 8px; color: var(--muted); font-size: 0.78rem; }
  .report-access-actions { display: grid; justify-items: end; gap: 13px; min-width: 0; }
  .public-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .public-link code {
    padding: 14px;
    overflow-x: auto;
    color: var(--cyan);
    border-left: 2px solid var(--acid);
    background: #080b0c;
    font-size: 0.72rem;
    white-space: nowrap;
  }
  .public-view-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 28px;
    padding: 15px 18px;
    color: var(--muted);
    border: 1px solid rgba(216,255,69,0.35);
    background: rgba(216,255,69,0.055);
    font-size: 0.78rem;
  }
  .public-view-note span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    color: var(--acid);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }
  .public-view-note i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--acid);
    box-shadow: 0 0 12px rgba(216,255,69,0.75);
  }

  .detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.7fr); gap: 28px; margin-bottom: 28px; }
  .report-text, .metadata {
    max-height: 600px;
    overflow: auto;
    color: #cfdbd8;
    font-size: 0.77rem;
    line-height: 1.72;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .metadata { padding: 14px; color: var(--cyan); background: #0b0f10; }
  .user-agent { display: grid; gap: 5px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); }
  .user-agent strong { font-family: var(--mono); font-size: 0.64rem; }
  .user-agent span { color: var(--muted); font-size: 0.7rem; overflow-wrap: anywhere; }

  .image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
  .image-card { position: relative; min-height: 180px; overflow: hidden; border: 1px solid var(--line); background: #070909; }
  .image-card img { width: 100%; height: 260px; object-fit: contain; transition: transform 300ms ease; }
  .image-card:hover img { transform: scale(1.025); }
  .image-card span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 9px 11px;
    overflow: hidden;
    color: var(--paper);
    background: rgba(9,12,13,0.88);
    font-family: var(--mono);
    font-size: 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .file-list { border-top: 1px solid var(--line-bright); }
  .file-row {
    display: grid;
    grid-template-columns: 50px 1fr auto 30px;
    align-items: center;
    gap: 15px;
    min-height: 71px;
    border-bottom: 1px solid var(--line);
  }
  .file-row:hover { color: var(--acid); }
  .file-row > span:nth-child(2) { display: grid; min-width: 0; }
  .file-row strong { overflow: hidden; color: var(--paper); font-size: 0.85rem; text-overflow: ellipsis; white-space: nowrap; }
  .file-row small { color: var(--muted); font-family: var(--mono); font-size: 0.62rem; }
  .file-row > span:nth-child(3) { color: var(--muted); font-family: var(--mono); font-size: 0.65rem; }
  .file-icon { color: var(--cyan); font-family: var(--mono); font-size: 0.6rem; }

  .error-page { display: grid; justify-items: start; max-width: 680px; margin: 10vh auto; }
  .error-page > strong { color: var(--line-bright); font-family: var(--display); font-size: clamp(7rem, 18vw, 15rem); font-weight: 500; letter-spacing: -0.08em; line-height: 0.7; }
  .error-page .eyebrow { margin-top: 35px; }
  .error-page h1 { margin-top: 12px; font-size: clamp(2.5rem, 6vw, 5rem); }
  .error-page > p:not(.eyebrow) { margin: 19px 0 25px; color: var(--muted); }
}

@layer responsive {
  @media (max-width: 1050px) {
    .topbar { grid-template-columns: auto 1fr auto; }
    .nav-item { min-width: auto; }
    .report-row { grid-template-columns: 45px 1fr 130px 25px; }
    .report-files, .report-row time { display: none; }
    .token-workbench { grid-template-columns: 1fr; }
    .api-card { border-top: 1px solid var(--line); border-left: 0; }
    .report-hero { grid-template-columns: 1fr; gap: 35px; }
    .detail-grid { grid-template-columns: 1fr; }
  }

  @media (max-width: 820px) {
    .auth-panel { grid-template-columns: 1fr; }
    .auth-identity { min-height: 400px; border-right: 0; border-bottom: 1px solid var(--line); }
    .topbar { grid-template-columns: 1fr auto; }
    .brand { padding-inline: 18px; }
    nav { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--line); }
    .nav-item { flex: 1; justify-content: center; min-height: 52px; padding-inline: 14px; }
    .logout-form { grid-column: 2; grid-row: 1; padding-right: 18px; }
    .main-content { width: min(100% - 34px, 1480px); padding-top: 52px; }
    .report-access { grid-template-columns: 1fr; }
    .report-access-actions { justify-items: start; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card:nth-child(2) { border-bottom: 1px solid var(--line); }
    .image-grid { grid-template-columns: 1fr 1fr; }
  }

  @media (max-width: 620px) {
    .auth-shell { padding: 14px; }
    .auth-identity { min-height: 370px; padding: 31px; }
    .signal-orbit { top: 35px; left: 31px; transform: scale(.8); transform-origin: top left; }
    .auth-form-wrap { padding: 32px 25px 38px; }
    .brand { padding-left: 14px; }
    .brand-mark { display: none; }
    .brand strong { font-size: 0.9rem; }
    .main-content { width: min(100% - 24px, 1480px); padding: 37px 0 70px; }
    .page-heading { margin-bottom: 37px; }
    .split-heading { display: block; }
    .live-indicator { margin-top: 19px; }
    .content-section, .token-form, .api-card { padding: 20px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { min-height: 105px; padding: 17px; }
    .stat-card strong { font-size: 2rem; }
    .report-row { grid-template-columns: 30px 1fr 22px; min-height: 82px; }
    .report-client { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .token-workbench { display: block; }
    .secret-line { grid-template-columns: 1fr; }
    .secret-line code { width: 100%; }
    .report-hero { padding: 25px; }
    .report-access { padding: 20px; }
    .public-link { grid-template-columns: 1fr; }
    .public-link .button { width: 100%; }
    .public-view-note { display: grid; gap: 8px; }
    .report-facts { grid-template-columns: 1fr; }
    .image-grid { grid-template-columns: 1fr; }
    .image-card img { height: 220px; }
    .file-row { grid-template-columns: 38px minmax(0,1fr) 22px; }
    .file-row > span:nth-child(3) { display: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      scroll-behavior: auto !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}
