/* Outfit — the Lynx Media Group typeface, self-hosted (CSP allows no external
   hosts). Variable font: one file carries weights 400-700. */
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Share Tech Mono — the "digital readout" face for numbers, verdicts, and
   chart ticks. Single weight, monospace, full ASCII. */
@font-face {
  font-family: "Share Tech Mono";
  src: url("fonts/sharetechmono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
    --bg:        #0a0a0b;
    --surface:   #121214;
    --surface-2: #17171a;
    --hover:     #1d1d21;
    --line:      #26262b;
    --line-2:    #34343c;
    --text:      #ededf0;
    --text-2:    #a3a3ad;
    --text-3:    #6b6b76;
    --radius:    8px;
    --mono: "Share Tech Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    --ease: cubic-bezier(.22, .61, .2, 1);
  }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; /* anchors land below the sticky header */ }

  /* ---------- Motion system ----------
     Small, purposeful, directional: things enter from where they belong,
     attention lands where the next action is. Fully disabled for
     prefers-reduced-motion. */
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid var(--bg); }
  ::-webkit-scrollbar-track { background: transparent; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 "Share Tech Mono", "Outfit", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
  }
  /* Form controls don't inherit the page font by default — force Outfit
     everywhere; the password field's explicit mono still wins over this. */
  input, select, textarea { font-family: inherit; }
  ::selection { background: #ffffff26; }
  a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); }
  a:hover { border-bottom-color: var(--text-2); }
  button { font: inherit; cursor: pointer; transition: background .12s, color .12s, border-color .12s, opacity .12s; }
  :focus-visible { outline: 2px solid var(--text-2); outline-offset: 2px; border-radius: 4px; }

  .wordmark {
    font-size: 20px; font-weight: 600; letter-spacing: -0.03em; margin: 0;
    display: inline-flex; align-items: center; gap: 9px;
  }
  .wordmark i { font-style: normal; color: var(--text-3); }
  .mark { width: 22px; height: 22px; flex: none; }
  .gate-card .wordmark { justify-content: center; gap: 12px; }
  .gate-card .mark { width: 34px; height: 34px; }

  /* ---------- Gate ---------- */
  #gate { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
  .gate-card { width: 100%; max-width: 340px; text-align: center; }
  #gate { transition: opacity .16s ease; }
  #gate.leaving { opacity: 0; }
  .gate-card .wordmark { font-size: 32px; margin-bottom: 34px; }
  .tagline { color: var(--text-3); margin: 0 0 36px; font-size: 14px; }
  .field { display: flex; gap: 8px; }
  .pw-wrap { position: relative; flex: 1; min-width: 0; }
  .pw-wrap input {
    width: 100%; padding: 11px 42px 11px 13px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 8px; color: var(--text); font-size: 15px;
    font-family: var(--mono); letter-spacing: 0.02em;
  }
  .pw-wrap input::placeholder { font-family: inherit; letter-spacing: 0; color: var(--text-3); }
  .pw-wrap input:focus { outline: none; border-color: var(--line-2); background: var(--surface-2); }
  .toggle {
    position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
    display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
    background: none; border: 0; border-radius: 6px; color: var(--text-3);
  }
  .toggle:hover { color: var(--text); background: var(--hover); }
  .toggle svg { width: 17px; height: 17px; display: block; }
  .toggle .icon-off { display: none; }
  .toggle[aria-pressed="true"] .icon-on { display: none; }
  .toggle[aria-pressed="true"] .icon-off { display: block; }
  .btn {
    padding: 11px 18px; background: var(--text); color: var(--bg);
    border: 1px solid var(--text); border-radius: 8px; font-weight: 600; font-size: 15px;
    transition: opacity .12s;
  }
  .btn:hover:not(:disabled) { opacity: .85; }
  .btn:disabled { opacity: .45; cursor: default; }
  .err { color: var(--text-2); font-size: 13px; margin-top: 14px; min-height: 18px; }

  /* ---------- Shell ---------- */
  #app { display: none; }

  header {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 22px;
    padding: 0 24px; height: 56px;
    background: #0a0a0bd9; backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  nav { display: flex; gap: 2px; margin-left: 8px; flex: none; }
  header .wordmark { flex: none; }
  #signout { flex: none; white-space: nowrap; }
  /* Squeeze order as the header narrows: the email truncates first, then
     disappears entirely; the tabs and Sign out never wrap or shrink. */
  @media (max-width: 980px) { .sync-mail { display: none; } }
  .tab {
    background: none; border: 0; color: var(--text-3);
    padding: 6px 12px; border-radius: 7px; font-size: 14px; font-weight: 500;
    white-space: nowrap;
  }
  .tab:hover { color: var(--text-2); background: var(--surface); }
  .tab[aria-selected="true"] { color: var(--text); background: var(--surface-2); }
  .spacer { flex: 1; }
  .ghost {
    background: none; border: 1px solid var(--line); color: var(--text-2);
    padding: 7px 13px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  }
  .ghost:hover:not(:disabled) { color: var(--text); border-color: var(--line-2); background: var(--surface); }
  .ghost:disabled { opacity: .35; cursor: default; }
  main { padding: 32px 24px 72px; max-width: 1180px; margin: 0 auto; }
  .panel[hidden] { display: none; }


  h2 {
    font-size: 12px; font-weight: 600; margin: 0 0 14px;
    color: var(--text-3); text-transform: uppercase; letter-spacing: 0.09em;
    display: flex; align-items: center; gap: 10px;
  }
  /* The agency site's eyebrow rule — "— SECTION" — inverted to monochrome. */
  h2::before { content: ""; width: 22px; height: 2px; background: var(--line-2); border-radius: 1px; flex: none; }
  .section { margin-bottom: 40px; }
  .lede { color: var(--text-2); font-size: 14px; margin: -6px 0 20px; max-width: 62ch; }

  /* ---------- Stats ---------- */
  /* Explicit columns so rows always fill — auto-fit left blank cells when
     four cards wrapped 3+1 and the seam background showed through. */
  .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
           background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  @media (max-width: 880px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .stat { background: var(--surface); padding: 18px 20px; }
  .stat .label { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px; }
  .stat .value { font-size: 27px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
  .stat .sub { color: var(--text-3); font-size: 12px; margin-top: 3px; }

  /* ---------- Bars ---------- */
  .grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
  /* Overview chart panels: pack as many across as fit so the table — the
     actual database — isn't pushed four screens down. */
  .bars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px 32px; }
  .bars { display: flex; flex-direction: column; gap: 5px; }
  .bar-row { display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 12px; font-size: 13px; }
  .bar-track { position: relative; background: var(--surface); border-radius: 6px; height: 26px; overflow: hidden; }
  .bar-fill { position: absolute; inset: 0 auto 0 0; background: #ffffff2b; border-radius: 6px 0 0 6px; width: 0; transition: width .7s var(--ease), background .35s ease; }
  /* Hover: the fill brightens a couple of steps — enough to read as selected,
     not enough to flashbang the row. Label stays put and stays readable. */
  .bar-row.drill:hover .bar-fill { background: #ffffff59; }
  .bar-label { position: relative; padding: 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bar-count { color: var(--text-2); font-size: 12.5px; text-align: right; font-family: var(--mono); white-space: nowrap; }
  .bar-pct { color: var(--text-3); font-size: 11px; }

  /* ---------- Controls ---------- */
  .controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  input[type="search"], input[type="url"], select, textarea {
    padding: 9px 12px; background: var(--surface); border: 1px solid var(--line);
    border-radius: 8px; color: var(--text); font-size: 14px;
  }
  textarea { resize: vertical; min-height: 58px; line-height: 1.5; }
  .ce-avatar-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px; margin-top: 6px;
  }
  @media (max-width: 700px) { .ce-avatar-grid { grid-template-columns: 1fr; } }
  textarea:focus { outline: none; border-color: var(--line-2); background: var(--surface-2); }
  input[type="search"] { flex: 1 1 260px; min-width: 0; }
  select { max-width: 200px; }
  input:focus, select:focus { outline: none; border-color: var(--line-2); background: var(--surface-2); }
  /* A filter that's actually narrowing the table reads differently from an
     idle one — otherwise "Bold Claim" and "All formats" look identical. */
  .controls select.active { border-color: #4d4d58; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px #4d4d58; }
  input::placeholder { color: var(--text-3); }
  .pill {
    display: inline-block; margin-left: 8px; padding: 2px 9px;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
    border-radius: 4px; font-size: 11.5px; letter-spacing: 0; text-transform: none; vertical-align: middle;
  }

  /* ---------- Table ---------- */
  /* The table scrolls inside its own container so the sticky header pins to the
     wrapper, not the page — rows can never bleed through above it. */
  .table-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--radius); }
  table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
  th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  th {
    background: #131316; color: var(--text-3); font-weight: 600; font-size: 11px;
    text-transform: uppercase; letter-spacing: .07em; position: sticky; top: 0; z-index: 5;
    box-shadow: 0 1px 0 var(--line-2);
  }
  th.sortable { cursor: pointer; user-select: none; }
  th.sortable:hover { color: var(--text); }
  th .arrow { color: var(--text); }
  tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }
  tbody tr:hover td { background: var(--surface); }
  tbody tr:last-child td { border-bottom: 0; }
  td.title { max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
  td.title a { border: 0; color: var(--text); }
  td.title a:hover { color: var(--text); border-bottom: 1px solid var(--text-3); }
  td.num { text-align: right; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
  td.dim { color: var(--text-2); font-size: 12.5px; }
  .pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; color: var(--text-3); font-size: 13.5px; }
  .no-results, .empty { padding: 34px; text-align: center; color: var(--text-3); }
  .empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
  code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }

  /* ---------- Client brief ---------- */

  .brief-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
  .brief-form input[type="url"] { flex: 1 1 320px; min-width: 0; }
  .note { color: var(--text-3); font-size: 12.5px; margin: 10px 0 0; max-width: 70ch; }
  .lbl { color: var(--text-3); font-size: 12.5px; }
  .warn {
    border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--radius);
    padding: 13px 16px; color: var(--text-2); font-size: 13.5px; margin: 16px 0 0;
  }
  .plays { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
  .play { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
  .play-head { display: flex; align-items: flex-start; gap: 15px; padding: 16px 18px; }
  .rank { font-family: var(--mono); font-size: 12px; color: var(--text-3); padding-top: 4px; min-width: 22px; }
  .play-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 3px; }
  .play-why { color: var(--text-2); font-size: 13.5px; margin: 0; }
  .metrics { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; text-align: right; padding-top: 2px; }
  .metric .m-val { font-family: var(--mono); font-size: 15px; font-weight: 600; }
  .metric .m-lbl { color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; }
  .badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10.5px;
           text-transform: uppercase; letter-spacing: .07em; border: 1px solid var(--line-2); color: var(--text-3); }
  .badge.strong { color: var(--text); border-color: var(--text-3); }
  .examples { border-top: 1px solid var(--line); background: var(--surface-2); padding: 4px 18px 10px; }
  .ex { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .ex:last-child { border-bottom: 0; }
  .ex-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
  .ex-meta { font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: nowrap; }
  .ex a { border: 0; color: var(--text-3); }
  .ex a:hover { color: var(--text); }

  /* Utility classes replacing CSP-blocked inline style attributes */
  .minw0 { min-width: 0; }
  .x-sep { color: var(--text-3); }
  .mt8 { margin-top: 8px; }
  .mt14 { margin-top: 14px; }

  /* Brand loader */
  /* Each arm scales out of the centre in turn, the four hold as the complete
     mark, then the cycle resets. */
  @keyframes arm-in {
    0%   { opacity: 0; transform: scale(.15); }
    14%  { opacity: 1; transform: scale(1); }
    68%  { opacity: 1; transform: scale(1); }
    82%  { opacity: 0; transform: scale(.15); }
    100% { opacity: 0; transform: scale(.15); }
  }
  @keyframes loader-glow { 50% { opacity: .55; } }
  .loader { display: flex; align-items: center; gap: 16px; padding: 28px 0; }
  .loader-mark { width: 46px; height: 46px; flex: none; color: var(--text); overflow: visible; }
  .loader-mark .arm { transform-origin: 12px 12px; animation: arm-in 1.9s var(--ease) infinite; opacity: 0; }
  .loader-mark .a1 { animation-delay: 0s; }
  .loader-mark .a2 { animation-delay: .13s; }
  .loader-mark .a3 { animation-delay: .26s; }
  .loader-mark .a4 { animation-delay: .39s; }
  .loader-text { min-width: 0; }
  .loader-stage { font-size: 15px; }
  .loader-sub { margin-top: 2px; }

  /* Client brief: site analysis */
  .progress { color: var(--text-3); font-size: 14px; padding: 18px 0; }
  @keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
  .site-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    padding: 16px 18px; margin: 18px 0 6px;
  }
  .site-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .site-desc { color: var(--text-2); font-size: 14px; margin: 8px 0 0; max-width: 70ch; }

  /* Client details editor */
  .client-editor {
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    padding: 16px 18px; margin: 14px 0 4px;
  }
  .ce-title { font-size: 14px; margin: 0 0 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
  .ce-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
  .ce-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .ce-wide { grid-column: 1 / -1; }
  .ce-field input, .ce-field select {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
    color: var(--text); font: inherit; font-size: 14px; padding: 9px 11px; min-width: 0;
  }
  .ce-field input:focus, .ce-field select:focus { outline: none; border-color: var(--line-2); }

  /* Brief tray (the cart) */
  .tray {
    position: sticky; top: 57px; z-index: 5;
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
    margin: 14px 0; padding: 10px 14px;
  }
  .tray-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .tray-count { font-size: 14px; }
  .tray-count strong { font-family: var(--mono); font-size: 16px; }
  .tray-hint { color: var(--text-3); font-size: 13px; }
  .tray.shake { animation: shake .4s; }
  @keyframes shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }

  /* Video shelf */
  .shelf {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px; margin: 6px 0 20px;
  }
  .vcard {
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    overflow: hidden; display: flex; flex-direction: column;
  }
  .vcard { transition: border-color .12s; }
  .vcard:hover { border-color: var(--line-2); }
  .vcard.picked { border-color: var(--text-3); }
  /* Embeds are preloaded (lazy) so each card shows its real thumbnail with the
     platform's own play button. Per-platform aspect ratios absorb the header/
     caption chrome TikTok and Instagram add below the video — sized right, the
     iframe never scrolls internally (scrolling="no" backstops the remainder). */
  .vframe {
    background: var(--surface-2); display: grid; place-items: center;
    border-bottom: 1px solid var(--line); aspect-ratio: 9 / 16;
  }
  .vframe.vf-tiktok { aspect-ratio: 9 / 19.8; }
  .vframe.vf-insta { aspect-ratio: 9 / 19; }
  .vframe.vf-short { aspect-ratio: 9 / 16; }
  .vframe.vf-wide { aspect-ratio: 16 / 9; }
  .vframe iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
  .vmeta { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
  .vtitle { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vstats { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
  .vtags { font-size: 12px; color: var(--text-2); }
  .vtags a { border: 0; color: var(--text-3); }
  .vtags a:hover { color: var(--text); }
  /* "Add" is a pill chip, not a raw checkbox: + Add → ✓ Added (filled). The
     native input stays in the DOM, visually hidden, so keyboard and forms
     still see a real checkbox. */
  .vpick {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
    padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 12.5px; font-weight: 500; color: var(--text-2);
    cursor: pointer; user-select: none;
    transition: background .15s, color .15s, border-color .15s;
  }
  .vpick::before { content: "+"; font-weight: 600; line-height: 1; }
  .vpick:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
  .vpick input {
    position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
  }
  .vpick:has(input:checked) { background: var(--text); border-color: var(--text); color: var(--bg); }
  .vpick:has(input:checked)::before { content: "✓"; }
  .vpick:has(input:focus-visible) { outline: 2px solid var(--text-2); outline-offset: 2px; }

  /* Tailored script on a picked card */
  .vscript { border-top: 1px dashed var(--line-2); padding: 12px 14px; }
  .vs-hook { font-size: 13px; font-style: italic; margin: 6px 0 8px; }
  .vs-beat { font-size: 12.5px; color: var(--text-2); margin: 0 0 6px; white-space: pre-line; }
  .vs-cta { color: var(--text); }

  /* Collapsed scoreboard */
  .playbook { margin: 8px 0 20px; }
  .playbook summary { color: var(--text-3); font-size: 13px; cursor: pointer; padding: 8px 0; }
  .playbook summary:hover { color: var(--text-2); }

  /* Static video frames: thumbnail + play button; iframe only after a click */
  .vframe { position: relative; }
  .vthumb { width: 100%; height: 100%; object-fit: cover; display: block; }
  .vthumb-pending, .vthumb-none {
    width: 100%; height: 100%; display: grid; place-items: center;
    color: var(--text-3); font-size: 12px; text-transform: capitalize;
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
  }
  .vplay {
    position: absolute; inset: 0; margin: auto; width: 52px; height: 52px;
    display: grid; place-items: center; padding: 0;
    background: #0a0a0bc9; border: 1px solid #ffffff3d; border-radius: 50%;
    color: var(--text); cursor: pointer; transition: transform .12s, background .12s;
  }
  .vplay svg { width: 22px; height: 22px; margin-left: 3px; }
  .vplay { transition: background .14s, border-color .14s; }
  .vcard:hover .vplay, .viewer-player:hover .vplay { border-color: #ffffff5c; }
  .vplay:hover { background: #0a0a0bee; border-color: #ffffff85; }
  .vframe.playing .vplay { display: none; }

  /* Clickable Overview bars */
  .bar-row.drill { cursor: pointer; border-radius: 6px; }
  .bar-row.drill .bar-count::after { content: "→"; display: inline-block; margin-left: 6px; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
  .bar-row.drill:hover .bar-count::after { opacity: 1; transform: none; }
  .bar-row.drill:hover .bar-track { background: var(--surface-2); }
  .bar-row.drill:hover .bar-label { color: var(--text); }

  /* Collapsible client editor */
  .ce-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .ce-head .ce-title { margin: 0; }
  .ce-toggle { margin-left: auto; padding: 5px 11px; font-size: 12.5px; }
  .ce-body { margin-top: 14px; }
  .client-editor.collapsed .ce-body { display: none; }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chip {
    font-size: 12px; color: var(--text-2); background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 4px; padding: 3px 9px; white-space: nowrap;
  }

  /* Compact shelf card row */
  .vrow { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
  .vstat { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
  .vdetails {
    background: none; border: 1px solid var(--line); border-radius: 6px;
    color: var(--text-2); font: inherit; font-size: 12px; padding: 3px 10px; cursor: pointer;
  }
  .vdetails:hover { color: var(--text); border-color: var(--line-2); }
  .vpick { margin-left: auto; margin-top: 0; }

  /* Detail modal */
  .no-scroll { overflow: hidden; }
  #modal { position: fixed; inset: 0; z-index: 100; }
  #modal[hidden] { display: none; }
  .modal-back { position: absolute; inset: 0; background: #000000c4; }
  .modal-card {
    position: relative; margin: 4vh auto; width: min(880px, calc(100vw - 32px));
    max-height: 92vh; overflow: auto; background: var(--surface);
    border: 1px solid var(--line-2); border-radius: 14px; padding: 22px;
  }
  .modal-x { position: absolute; top: 12px; right: 12px; padding: 5px 10px; z-index: 2; }
  .modal-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
  .modal-player { border-radius: 10px; overflow: hidden; background: #000; align-self: start; }
  .modal-player iframe { width: 100%; height: 100%; border: 0; display: block; }
  .modal-player.vf-tiktok { aspect-ratio: 9 / 19.8; }
  .modal-player.vf-insta { aspect-ratio: 9 / 19; }
  .modal-player.vf-short { aspect-ratio: 9 / 16; }
  .modal-player.vf-wide { aspect-ratio: 16 / 9; grid-column: 1 / -1; }
  .modal-info { min-width: 0; }
  .modal-title { font-size: 15px; margin: 0 0 6px; padding-right: 40px; }
  .modal-metrics { display: flex; gap: 18px; margin: 14px 0; flex-wrap: wrap; }
  .modal-info .chips { margin: 4px 0 12px; }
  .modal-actions { display: flex; gap: 10px; margin-top: 16px; }
  @media (max-width: 700px) {
    .modal-grid { grid-template-columns: 1fr; }
    .modal-player { max-width: 320px; margin: 0 auto; }
  }

  /* Saved briefs: the stack */
  .brief-stack { display: flex; flex-direction: column; gap: 10px; }
  .bcard {
    transition: border-color .12s;
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 16px 18px;
  }
  .bcard:hover { border-color: var(--line-2); }
  .bcard-main { min-width: 0; flex: 1; }
  .bcard-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .b-open { padding: 8px 16px; }
  .b-del.armed { color: #f0b3b3; border-color: #6b3a3a; background: #2a1414; }

  /* Brief viewer: video up top, script + details, flip-through */
  .viewer-top {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-bottom: 18px;
  }

  /* Breadcrumb trail — the one consistent "where am I" line on every
     client-tab level: Clients › Company › Brief N */
  .crumbs {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 6px; min-height: 34px;
  }
  .crumb-link {
    background: none; border: none; padding: 2px 4px; cursor: pointer;
    color: var(--dim); font: inherit; font-size: 13px; border-radius: 6px;
  }
  .crumb-link:hover { color: var(--text); background: var(--surface); }
  .crumb-sep { color: var(--dim); opacity: .5; font-size: 13px; }
  .crumb-here { color: var(--text); font-size: 13px; font-weight: 600; padding: 2px 4px; }
  .crumbs .spacer { flex: 1; }
  .page-head { margin-bottom: 18px; }
  .page-head .bcard-title { font-size: 19px; }
  .viewer { display: grid; grid-template-columns: 320px 1fr; gap: 26px; align-items: start; }

  .viewer-player { border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
  .viewer-player.vf-tiktok { aspect-ratio: 9 / 19.8; }
  .viewer-player.vf-insta { aspect-ratio: 9 / 19; }
  .viewer-player.vf-short { aspect-ratio: 9 / 16; }
  .viewer-player.vf-wide { aspect-ratio: 16 / 9; }
  .viewer-info { min-width: 0; }
  .viewer-info .vscript { border-top: 1px solid var(--line); margin-top: 14px; padding: 14px 0 0; }
  @media (max-width: 760px) {
    .viewer { grid-template-columns: 1fr; }
    .viewer-player-col { max-width: 300px; margin: 0 auto; }
  }

  /* Performance tracking: green = beating benchmark, red = under it */
  :root { --good: #57c98a; --bad: #e06c6c; --even: #d8a657; }
  .verdict { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
  .verdict.good { color: var(--good); }
  .verdict.bad { color: var(--bad); }
  .verdict.even { color: var(--even); }
  .growth-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 18px 20px; margin: 4px 0 30px;
  }
  .growth-card.good { border-color: #2c4a39; }
  .growth-card.bad { border-color: #4a2c2c; }
  .growth-card.even { border-color: #4a412c; }
  .growth-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
  .growth-head h2 { margin: 0; }
  .spark { width: 100%; height: auto; display: block; }
  .spark-line { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
  .spark-dot { fill: var(--text-2); }
  .good .spark-line { stroke: var(--good); } .good .spark-dot { fill: var(--good); }
  .bad .spark-line { stroke: var(--bad); } .bad .spark-dot { fill: var(--bad); }
  .spark-pred { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 5 5; }
  .chart { width: 100%; height: auto; display: block; margin-top: 4px; }
  .chart-grid { stroke: var(--line); stroke-width: 1; }
  .chart-axis { stroke: var(--line-2); stroke-width: 1.5; }
  .chart-tick { fill: var(--text-3); font-family: var(--mono); font-size: 9.5px; }
  .chart-key { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 12px; color: var(--text-2); }
  .chart-key i { display: inline-block; width: 16px; height: 0; vertical-align: middle; margin-right: 6px; }
  .chart-key .k-est { border-top: 2px dashed var(--text-3); }
  .chart-key .k-act { border-top: 2px solid var(--text-2); }
  .axis-title { fill: var(--text-3); font-size: 11px; letter-spacing: .04em; }
  .line-pred { fill: none; stroke: var(--text-3); stroke-width: 2; stroke-dasharray: 5 5; stroke-linecap: round; }
  .line-actual { fill: none; stroke: var(--text-2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
  .dot-actual { fill: var(--text-2); }
  .chart.good .line-actual { stroke: var(--good); }  .chart.good .dot-actual { fill: var(--good); }
  .chart.bad .line-actual { stroke: var(--bad); }    .chart.bad .dot-actual { fill: var(--bad); }
  .chart.even .line-actual { stroke: var(--even); }  .chart.even .dot-actual { fill: var(--even); }
  .good .chart-key .k-act { border-top-color: var(--good); }
  .bad .chart-key .k-act { border-top-color: var(--bad); }
  .even .chart-key .k-act { border-top-color: var(--even); }
  .good .chart-key .k-act { border-top-color: var(--good); }
  .bad .chart-key .k-act { border-top-color: var(--bad); }
  .spark-est { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 1.5 5; stroke-linecap: round; }
  .spark-est-dot { fill: none; stroke: var(--text-3); stroke-width: 1.5; }

  .fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 30px; }
  .fmt-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
  .fmt-card.good { border-color: #2c4a39; }
  .fmt-card.bad { border-color: #4a2c2c; }
  .fmt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
  .fmt-card.expandable .fmt-head { cursor: pointer; border-radius: 6px; }
  .fmt-card.expandable .fmt-head:hover strong { color: var(--text); }
  .fmt-card.expandable .fmt-head:hover .caret { color: var(--text); }
  .fmt-head-right { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
  .caret { color: var(--text-3); font-size: 12px; transition: color .12s; }
  .fmt-card.expanded { grid-column: 1 / -1; }
  .card-detail {
    display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start;
    border-top: 1px solid var(--line); margin-top: 14px; padding-top: 18px;
  }
  .cd-info { min-width: 0; }
  .cd-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
  @media (max-width: 700px) { .card-detail { grid-template-columns: 1fr; } .cd-player-col { max-width: 280px; margin: 0 auto; } }

  .post-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
  .post-form input[type="url"] { flex: 1 1 260px; }
  .post-form input[type="text"] { flex: 0 1 150px; }
  .post-form input, .post-form select {
    padding: 9px 12px; background: var(--surface); border: 1px solid var(--line);
    border-radius: 8px; color: var(--text); font: inherit; font-size: 14px; min-width: 0;
  }
  .post-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 34px; }
  .post-row {
    display: grid; grid-template-columns: 1fr 240px; gap: 8px 20px; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
  }
  .post-row.good { border-left: 3px solid var(--good); }
  .post-row.bad { border-left: 3px solid var(--bad); }
  .post-main { min-width: 0; }
  .post-nums { display: flex; gap: 8px; align-items: baseline; margin-top: 4px; flex-wrap: wrap; }
  .post-nums .mono { font-family: var(--mono); font-size: 13px; }
  .post-spark { align-self: center; }
  .checkin-form { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
  .checkin-form .ci-views {
    flex: 0 1 190px; padding: 7px 11px; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit; font-size: 13px;
  }
  .checkin-form .ghost { padding: 6px 12px; font-size: 12.5px; }
  .p-del.armed, .br-del.armed { color: #f0b3b3; border-color: #6b3a3a; background: #2a1414; }
  .spark-axis { stroke: var(--line-2); stroke-width: 1; }
  .spark.empty { opacity: .6; }
  .recs { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 22px; }
  .recs h2 { margin-bottom: 8px; }
  .recs ul { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 14px; }
  .recs li { margin: 6px 0; }
  .flag-block { border-radius: 12px; border: 1px solid var(--line); padding: 14px 20px; margin-bottom: 18px; }
  .flag-block.good-block { border-left: 3px solid var(--good); }
  .flag-block.bad-block { border-left: 3px solid var(--bad); }
  .flag-list { list-style: none; margin: 0; padding: 0; }
  .flag-list li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 6px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
  .flag-list li:last-child { border-bottom: 0; }
  @media (max-width: 700px) { .post-row { grid-template-columns: 1fr; } .post-spark { max-width: 260px; } }

  @media (max-width: 640px) {
    header { gap: 8px; padding: 0 12px; }
    header .wordmark span { display: none; }   /* keep the ✕ mark, drop the text */
    header nav { margin-left: 0; overflow-x: auto; scrollbar-width: none; }
    header nav::-webkit-scrollbar { display: none; }
    .tab { padding: 6px 10px; font-size: 13.5px; }
    header .sync-state { display: none; }      /* no room for the sync signal here */
    main { padding: 24px 14px 60px; }
    .metrics { margin-left: 0; text-align: left; width: 100%; }
    .play-head { flex-wrap: wrap; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
  }

  .proven {
    display: inline-block; font-size: 10.5px; font-family: var(--mono);
    color: var(--good); border: 1px solid #2c4a39; border-radius: 3px;
    padding: 1px 6px; margin-right: 4px;
  }

  /* Chart day markers + hover readout */
  .dot-pred { fill: var(--bg); stroke: var(--text-3); stroke-width: 1.5; }
  .hit { fill: transparent; cursor: crosshair; }
  .hit:focus-visible { outline: none; }
  .hover-rule { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
  .growth-card.has-tip { position: relative; }
  .chart-tip {
    position: absolute; top: 18px; transform: translateX(-50%);
    background: #17171acc; backdrop-filter: blur(6px);
    border: 1px solid var(--line-2); border-radius: 9px;
    padding: 9px 12px; min-width: 132px; pointer-events: none; z-index: 4;
    font-size: 12.5px;
  }
  .chart-tip.flip { transform: translateX(-100%); }
  .chart-tip[hidden] { display: none; }
  .tip-day { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
  .tip-row { display: flex; align-items: center; gap: 7px; color: var(--text-2); margin: 3px 0; }
  .tip-row i { display: inline-block; width: 14px; height: 0; flex: none; }
  .tip-row i.k-est { border-top: 2px dashed var(--text-3); }
  .tip-row i.k-act { border-top: 2px solid var(--text-2); }
  .tip-row i.k-act.good { border-top-color: var(--good); }
  .tip-row i.k-act.bad { border-top-color: var(--bad); }
  .tip-row i.k-act.even { border-top-color: var(--even); }
  .tip-row b { margin-left: auto; font-family: var(--mono); font-weight: 600; color: var(--text); }
  .tip-row b.good { color: var(--good); } .tip-row b.bad { color: var(--bad); } .tip-row b.even { color: var(--even); }
  .tip-delta { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; }
  .tip-delta.good { color: var(--good); } .tip-delta.bad { color: var(--bad); } .tip-delta.even { color: var(--even); }

  /* Week navigation */
  .week-nav {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 14px 18px; margin-bottom: 20px;
  }
  .week-head { flex: 1; min-width: 0; text-align: center; }
  .week-arrow {
    width: 34px; height: 34px; padding: 0; flex: none;
    display: grid; place-items: center; font-size: 15px;
  }
  .week-arrow:disabled { opacity: .22; cursor: default; }

  /* Next week's brief, at the foot of the week */
  .nextweek {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 18px 20px; margin-top: 30px;
  }
  .nextweek h2 { margin-bottom: 4px; }
  .nextweek .lbl { max-width: 68ch; }

  /* Health at a glance */
  .health-row {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
    background: var(--line); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 22px;
  }
  @media (max-width: 880px) { .health-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .health-card { background: var(--surface); padding: 16px 18px; }
  .health-card.good { box-shadow: inset 2px 0 0 var(--good); }
  .health-card.even { box-shadow: inset 2px 0 0 var(--even); }
  .health-card.bad  { box-shadow: inset 2px 0 0 var(--bad); }
  .health-card.idle { box-shadow: inset 2px 0 0 var(--line-2); }
  .h-label { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
  .h-value { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 7px; }
  .h-of { color: var(--text-3); font-size: 15px; font-weight: 500; margin-left: -4px; }
  .h-sub { color: var(--text-3); font-size: 12px; margin-top: 3px; }
  .h-dot { font-size: 8px; line-height: 1; }
  .health-card.good .h-dot { color: var(--good); }
  .health-card.even .h-dot { color: var(--even); }
  .health-card.bad .h-dot  { color: var(--bad); }
  .health-card.idle .h-dot { color: var(--text-3); }

  .health-chip {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    font-size: 12px; font-family: var(--mono);
    border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
    color: var(--text-2);
  }
  .health-chip.good { color: var(--good); border-color: #2c4a39; }
  .health-chip.even { color: var(--even); border-color: #4a412c; }
  .health-chip.bad  { color: var(--bad);  border-color: #4a2c2c; }
  .health-chip.idle { color: var(--text-3); }
  .bcard.good { border-left: 3px solid var(--good); }
  .bcard.even { border-left: 3px solid var(--even); }
  .bcard.bad  { border-left: 3px solid var(--bad); }

  /* Login (email + password stacked) */
  .field.login { flex-direction: column; gap: 8px; }
  .field.login input[type="email"] {
    width: 100%; padding: 11px 13px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 15px;
    font-family: var(--mono); letter-spacing: 0.02em;
  }
  .field.login input[type="email"]::placeholder { font-family: inherit; letter-spacing: 0; color: var(--text-3); }
  .field.login input[type="email"]:focus { outline: none; border-color: var(--line-2); background: var(--surface-2); }
  .field.login .pw-wrap { width: 100%; }
  .field.login .btn { width: 100%; }
  .sync-state {
    font-size: 12px; color: var(--text-3); font-family: var(--mono);
    display: inline-flex; align-items: center; gap: 6px;
    min-width: 0;
  }
  .sync-word { white-space: nowrap; }
  .sync-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .sync-state.ok { color: var(--good); }
  .sync-state.bad { color: var(--bad); }

  /* ---------- Micro-interactions ----------
     Slight, functional motion only. Every effect here is an animation whose
     start state lives inside the keyframes' `from` — so when the
     prefers-reduced-motion block sets animation:none, content is simply
     visible with no motion, never stuck hidden. */

  @keyframes rise-in { from { opacity: 0; transform: translateY(5px); } }
  @keyframes soft-in { from { opacity: .35; } }
  @keyframes chart-draw {
    from { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
    to   { stroke-dasharray: 1 0; stroke-dashoffset: 0; }
  }
  @keyframes dot-in { from { opacity: 0; } }

  /* Switching tabs: the incoming panel settles in. */
  .panel { animation: rise-in .22s var(--ease); }
  #gate .gate-card { animation: rise-in .3s var(--ease); }

  /* Stat cards cascade on first paint. */
  .stat { animation: rise-in .3s var(--ease) backwards; }
  .stat:nth-child(2) { animation-delay: 50ms; }
  .stat:nth-child(3) { animation-delay: 100ms; }
  .stat:nth-child(4) { animation-delay: 150ms; }

  /* Filtering / sorting / paging: the table refreshes with a soft blink. */
  #table-host .table-wrap { animation: soft-in .18s var(--ease); }

  /* The actual line draws itself; its day markers land right behind it. */
  .line-actual { animation: chart-draw .7s var(--ease); }
  .dot-actual { animation: dot-in .25s ease .5s backwards; }

  /* Pressable things acknowledge the press. */
  .btn, .ghost, .tab {
    transition: background .15s, border-color .15s, color .15s, transform .09s;
  }
  .btn:active, .ghost:active, .tab:active { transform: scale(.98); }

  /* Client & brief cards lift a hair when they're the target. */
  .bcard { transition: border-color .18s, transform .18s; }
  .bcard:hover { border-color: var(--line-2); transform: translateY(-1px); }

  /* Modal settles in instead of popping. */
  .modal-card { animation: rise-in .18s var(--ease); }
  .modal-back { animation: dot-in .18s ease; }

  /* Client-page cards settle in as you land on the page. */
  .health-row, .growth-card, .recs, .flag-block { animation: rise-in .25s var(--ease) backwards; }
  .growth-card { animation-delay: 60ms; }
  .recs { animation-delay: 100ms; }
  .flag-block { animation-delay: 130ms; }

  /* ---------- Footer ----------
     Structure borrowed from lynxmediagroup.org, inverted to monochrome.
     The giant wordmark starts as an outline and fills left-to-right as the
     footer scrolls into view (fill width driven from JS via CSSOM — the
     strict CSP allows element.style, just not style="" attributes). */
  #site-footer {
    border-top: 1px solid var(--line);
    margin-top: 72px;
    padding: 48px 24px 28px;
    max-width: 1180px; margin-left: auto; margin-right: auto;
  }
  /* Slot-machine wordmark: JS splits "lynxr." into one span per character;
     unlocked positions spin through random glyphs and lock left-to-right as
     the footer scrolls in — all settled by the bottom of the page. Monospace
     means every glyph has the same advance, so nothing jitters. */
  .foot-wordmark {
    font-family: var(--mono); font-size: clamp(44px, 7.5vw, 76px);
    line-height: 1.1; text-align: center; margin: 0 auto 44px;
    user-select: none; pointer-events: none; color: var(--text);
  }
  .fw-ch { display: inline-block; min-width: .62em; transition: color .3s ease; }
  .fw-ch.spin { color: var(--text-3); }
  @keyframes fw-settle { from { transform: translateY(-12%); opacity: .35; } }
  .fw-ch.settled { animation: fw-settle .22s var(--ease); }
  .foot-grid {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--line);
  }
  .foot-brand .mark { width: 40px; height: 40px; margin-bottom: 14px; }
  .foot-brand p { margin: 0; color: var(--text-2); font-size: 14px; max-width: 44ch; }
  .foot-label {
    color: var(--text-3); font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .09em; margin-bottom: 12px;
  }
  .foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .foot-link {
    background: none; border: 0; padding: 0; color: var(--text-2);
    font-size: 14px; cursor: pointer; border-bottom: 1px solid transparent;
  }
  .foot-link:hover { color: var(--text); border-bottom-color: var(--line-2); }
  a.foot-link { text-decoration: none; }
  .foot-legal { padding-top: 22px; color: var(--text-3); font-size: 12.5px; }
  @media (max-width: 700px) {
    .foot-grid { grid-template-columns: 1fr; gap: 28px; }
    .foot-wordmark { margin-bottom: 36px; }
  }

  /* ---------- Client editor readability ----------
     The digital mono is for numbers and readouts; a form you READ and type
     sentences into gets the text face. Labels lose the all-caps tracking,
     fields get room to breathe. */
  .ce-body { font-family: "Outfit", ui-sans-serif, sans-serif; }
  .ce-body .lbl {
    font-family: "Outfit", ui-sans-serif, sans-serif;
    text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-2);
  }
  .ce-body input, .ce-body select, .ce-body textarea {
    font-family: "Outfit", ui-sans-serif, sans-serif; font-size: 14px; line-height: 1.5;
  }
  .ce-body ::placeholder { color: var(--text-3); opacity: .8; }
  .ce-grid { gap: 16px 18px; }
  .ce-avatar-grid { gap: 14px 18px; }

  /* ---------- Avatar card on the client page ----------
     Collapsed by default so it's there when you need it, invisible when not. */
  .avatar-box {
    border: 1px solid var(--line); border-radius: 10px;
    margin: -6px 0 22px; font-family: "Outfit", ui-sans-serif, sans-serif;
  }
  .avatar-box summary {
    cursor: pointer; list-style: none; padding: 10px 14px;
    font-size: 12px; font-weight: 600; color: var(--text-3);
    text-transform: uppercase; letter-spacing: .08em; user-select: none;
  }
  .avatar-box summary::before { content: "▸ "; }
  .avatar-box[open] summary::before { content: "▾ "; }
  .avatar-box summary::-webkit-details-marker { display: none; }
  .avatar-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px 22px; padding: 2px 14px 14px;
  }
  .avatar-grid .av-label {
    font-size: 11px; color: var(--text-3); text-transform: uppercase;
    letter-spacing: .07em; margin-bottom: 3px;
  }
  .avatar-grid .av-text { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }

  /* Reach-confidence tier chip on shelf cards (SCRAPING_SPEC) */
  .tier-chip {
    font-family: var(--mono); font-size: 10.5px; padding: 1px 7px;
    border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-2);
    white-space: nowrap;
  }
  .tier-chip.t1 { color: var(--good); border-color: #2c4a39; }
