/* Shared header/navigation component.
 *
 * These rules lived in assets/js/consent.css, which CLAUDE.md §2 reserves for the consent
 * dialog: "Do not add component styles to consent.css". Nav styling had accumulated there
 * because that file was already linked on every page, and the cost showed up the moment a
 * nav bug had to be found — it was the last place anyone looked.
 *
 * Moved verbatim, so specificity and source order are unchanged: this sheet is linked
 * immediately BEFORE consent.css on every page, exactly where the combined file used to
 * sit. tools/shared_runtime.py owns that link, so one writer keeps one version.
 *
 * The remaining !important flags are inherited, not endorsed. They fight the nav markup
 * still duplicated inline across ~280 pages; the fix for those is to own the markup, not
 * to escalate further here (§8).
 */
/* ── header nav: logo + links share row; compress before wrapping; clean mobile stack ── */
.nav{flex-wrap:nowrap !important;align-items:center;gap:8px 10px !important}
.nav > a:first-child{flex:0 0 auto}                       /* logo fixed */
.ttn{flex:1 1 auto;min-width:0;margin-left:auto;justify-content:flex-end;flex-wrap:wrap !important;row-gap:6px}
.ttn a.l{white-space:nowrap;padding:8px 8px !important}
.ttn a.l.nt,.ttn a.l.xf{padding:8px 12px !important}
@media(max-width:1040px){ .ttn{font-size:12px !important;gap:2px 1px !important} .ttn a.l{padding:7px 6px !important} }
@media(max-width:820px){
  .nav{flex-wrap:wrap !important;row-gap:10px !important}
  .ttn{width:100%;flex-basis:100%;margin-left:0 !important;justify-content:flex-start;font-size:13px !important}
}
@media(max-width:600px){
  /* Mobile header is a deliberate, even grid: brand first, then three equal
     navigation columns.  This avoids the previous ragged flex-wrap rows when
     an EN/RU label happened to be longer than its neighbours. */
  .nav{padding:18px 18px 16px !important;display:flex !important;align-items:stretch !important;gap:0 !important}
  .nav>a:first-child{width:100%;justify-content:center;margin:0 0 14px !important}
  .ttn{display:grid !important;grid-template-columns:repeat(6,minmax(0,1fr));width:100%;flex-basis:100%;
    margin:0 !important;gap:8px 4px !important;align-items:stretch;font-size:12px !important}
  .ttn .sep,.ttn .mk{display:none !important}
  .ttn>.l,.ttn>.l-dd{grid-column:span 2;min-width:0}
  .ttn>.l,.ttn>.l-dd>a{width:100%;min-height:38px;box-sizing:border-box;justify-content:center;text-align:center;padding:8px 4px !important}
  .ttn>.tt-sbtn{grid-column:span 1;justify-content:center;padding:8px 2px !important}
  .ttn>.i-watchlist{grid-column:span 2}
  .ttn>.xf{grid-column:span 2}
  .ttn>.ttlang{grid-column:span 1;display:flex;margin:0 !important;min-width:0}
  .ttn>.ttlang a{flex:1;display:flex;align-items:center;justify-content:center;padding:7px 3px;text-align:center}
}

@media(max-width:380px){
  .nav{padding-left:12px !important;padding-right:12px !important}
  .ttn{font-size:11px !important;gap:6px 2px !important}
  .ttn>.l,.ttn>.l-dd>a{padding-left:2px !important;padding-right:2px !important}
}



/* Own nav icons — inline SVG, tinted by currentColor (grey, green on hover). */
.ttn .l{gap:6px}
.ttn .l svg.ni{width:14px;height:14px;flex:0 0 auto;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;overflow:visible}

/* education nav dropdown — rubrics on hover/focus */
.ttn .l-dd{position:relative;display:inline-flex}
.ttn .l-dd > .l-menu{position:absolute;top:100%;left:0;z-index:60;min-width:214px;display:flex;flex-direction:column;gap:1px;padding:7px;margin-top:7px;background:#0a0c0a;border:1px solid rgba(51,255,102,.28);border-radius:11px;box-shadow:0 14px 44px rgba(0,0,0,.6);opacity:0;visibility:hidden;transform:translateY(-5px);pointer-events:none;transition:opacity .15s ease,transform .15s ease,visibility .15s;transition-delay:.3s}
/* transparent bridge over the gap so moving the cursor into the menu keeps :hover */
.ttn .l-dd > .l-menu::before{content:"";position:absolute;top:-11px;left:0;right:0;height:13px}
.ttn .l-dd:hover > .l-menu,.ttn .l-dd:focus-within > .l-menu{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition-delay:0s}
.ttn .l-menu a.l{color:#c3cabf;padding:8px 11px !important;border-radius:7px;white-space:nowrap;display:block}
.ttn .l-menu a.l:hover{color:#33ff66;background:rgba(51,255,102,.08)}
.ttn .l-menu .mh{font-family:'JetBrains Mono',monospace;font-size:10px;letter-spacing:.16em;color:#5a635c;text-transform:uppercase;padding:6px 11px 3px}
.ttn .l-menu .msep{height:1px;background:rgba(232,236,233,.12);margin:5px 7px}
/* Touch has no hover, so the hover-reveal above can never fire. This used to be a flat
   `display:none !important`, which also blocked the tap-to-open path header.js drives via
   `.open` — !important outranks it — so on a real phone the nav dropdowns opened for
   nobody. Keep hover-reveal off here; let an explicit tap through. */
@media(hover:none){
  .ttn .l-dd > .l-menu{display:none}
  .ttn .l-dd.open > .l-menu{display:flex;opacity:1;visibility:visible;transform:none;pointer-events:auto}
}

/* Dashboard status strip (assets/js/desk-state.js).
 * One row of readings above the widgets, so the page opens with a position
 * instead of a grid the reader has to assemble one themselves.  Cells are links:
 * the strip states the reading, the product page behind it shows the working.
 * Tone is never the only carrier — every cell prints its state as words too. */
.deskstate{margin:0 0 26px}
.deskstate .ds-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1px;background:var(--tt-line,rgba(232,236,233,.14));border:1px solid var(--tt-line,rgba(232,236,233,.14));border-radius:8px;overflow:hidden}
.deskstate .ds-cell{display:flex;flex-direction:column;gap:5px;min-width:0;padding:13px 14px;background:#000;color:inherit;text-decoration:none}
a.deskstate .ds-cell,.deskstate a.ds-cell{transition:background 150ms ease}
.deskstate a.ds-cell:hover,.deskstate a.ds-cell:focus-visible{background:rgba(232,236,233,.045)}
.deskstate a.ds-cell:focus-visible{outline:none;box-shadow:inset 0 0 0 2px rgba(51,255,102,.5)}
.deskstate .ds-k{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:10px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:#8a948c}
.deskstate .ds-v{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:17px;font-weight:700;line-height:1.15;overflow-wrap:anywhere}
.deskstate .ds-s{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:11px;line-height:1.4;color:#8a948c;overflow-wrap:anywhere}
.deskstate .ds-up{color:#33ff66}
.deskstate .ds-dn{color:#ff7a7a}
.deskstate .ds-mid{color:#e8ece9}
.deskstate .ds-stale{margin-left:7px;padding:1px 5px;border:1px solid rgba(255,206,84,.5);border-radius:3px;font-size:9px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:#ffce54;vertical-align:middle}
.deskstate .ds-foot{margin:9px 0 0;font-family:'JetBrains Mono',ui-monospace,monospace;font-size:11px;line-height:1.5;color:#5a635c}
@media(max-width:900px){.deskstate .ds-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.deskstate .ds-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.deskstate .ds-v{font-size:15px}}

/* Screener desk highlights (assets/js/screener-highlights.js).
 * Sits above the boards: what the desk would look at, and what it threw out. */
.hl{margin:0 0 26px}
.hl .hl-h{font-family:'Space Grotesk',sans-serif;font-size:19px;color:#eafff0;margin:0 0 4px}
.hl .hl-gate{margin:0 0 14px;font-size:12.5px;line-height:1.55;color:#8a948c}
.hl .hl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(224px,1fr));gap:10px}
.hl .hl-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:12px 13px;border:1px solid rgba(232,236,233,.12);border-radius:8px;background:#000}
.hl .hl-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hl .hl-sym{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:15px;font-weight:700;color:#e8ece9}
.hl .hl-dir{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:9.5px;font-weight:500;letter-spacing:.1em;text-transform:uppercase;padding:2px 6px;border-radius:3px}
.hl .hl-long{color:#33ff66;border:1px solid rgba(51,255,102,.4)}
.hl .hl-short{color:#ff7a7a;border:1px solid rgba(255,122,122,.4)}
.hl .hl-name{font-size:11.5px;color:#8a948c;overflow-wrap:anywhere}
.hl .hl-fac{margin:2px 0 0;padding:0 0 0 15px;font-size:12px;line-height:1.5;color:#c3cabf}
.hl .hl-fac li{margin:0 0 3px}
.hl .hl-count{margin-top:auto;padding-top:6px;font-family:'JetBrains Mono',ui-monospace,monospace;font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:#5a635c}
.hl .hl-rej{margin:14px 0 0;padding:11px 13px;border:1px solid rgba(255,206,84,.32);border-radius:8px;background:rgba(255,206,84,.05);font-size:12px;line-height:1.55;color:#c3cabf}
.hl .hl-rej b{color:#ffce54}
.hl .hl-rej ul{margin:6px 0 0;padding:0 0 0 15px}
.hl .hl-note{margin:12px 0 0;font-size:11.5px;line-height:1.55;color:#5a635c}
/* Screener board groups (§9.9): a heading that says what kind of question each
   group of boards answers, so a table is never just a table. */
.grouph{font-family:'Space Grotesk',sans-serif;font-size:19px;color:#eafff0;margin:34px 0 3px}
.groups{font-size:12.5px;line-height:1.5;color:#8a948c;margin:0 0 12px}
.hl .hl-age{color:#5a635c}
.hl .hl-late{color:#ffce54}

/* Daily Read — what changed since yesterday (§9.8), directly under the verdict. */
.changed{margin:12px 0 20px;padding:12px 14px;border:1px solid rgba(232,236,233,.14);border-left:2px solid #62a8ff;border-radius:8px;background:rgba(98,168,255,.05)}
.changed.held{border-left-color:#5a635c;background:rgba(232,236,233,.03)}
.changed .ch-k{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:10.5px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:#62a8ff}
.changed.held .ch-k{color:#8a948c}
.changed .ch-age{color:#5a635c;letter-spacing:.06em}
.changed .ch-l{margin:7px 0 0;padding:0 0 0 16px;font-size:13px;line-height:1.6;color:#c3cabf}
.changed .ch-l li{margin:0 0 3px}
.changed .ch-p{margin:6px 0 0;font-size:13px;line-height:1.6;color:#8a948c}
