/* Navoris — site stylesheet
   No web fonts, no remote assets, no third-party requests.
   System font stack only. */

:root {
  --ink:        #0f172a;
  --ink-soft:   #334155;
  --muted:      #5b6b81;
  --bg:         #ffffff;
  --surface:    #f6f8fb;
  --surface-2:  #eef2f8;
  --line:       #dfe6ef;
  --line-soft:  #edf1f6;
  --brand:      #3730a3;
  --brand-2:    #4f46e5;
  --brand-ink:  #ffffff;
  --accent:     #0e7490;
  --warn-bg:    #fdf6e7;
  --warn-line:  #e9d08a;
  --warn-ink:   #6b4c0c;
  --ok:         #0f766e;
  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(15,23,42,.05), 0 8px 24px -12px rgba(15,23,42,.18);
  --shadow-lg:  0 2px 4px rgba(15,23,42,.06), 0 24px 48px -24px rgba(15,23,42,.28);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1220px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #e8eef7;
    --ink-soft:  #c4d0e0;
    --muted:     #94a6bd;
    --bg:        #0d1320;
    --surface:   #141c2c;
    --surface-2: #1b2437;
    --line:      #27324a;
    --line-soft: #1f2a3e;
    --brand:     #a5b4fc;
    --brand-2:   #818cf8;
    --brand-ink: #10152400;
    --accent:    #67e8f9;
    --warn-bg:   #2a2313;
    --warn-line: #6b5720;
    --warn-ink:  #f3ddab;
    --ok:        #5eead4;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.45), 0 24px 48px -24px rgba(0,0,0,.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Disclosure bar (must stay first in the document) ---------- */
.adbar {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-line);
  color: var(--warn-ink);
  font-size: .82rem;
  line-height: 1.5;
}
.adbar__in {
  max-width: var(--wrap); margin: 0 auto; padding: .6rem 20px;
  display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap;
}
.adbar strong { font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: .74rem; }
.adbar a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__in {
  max-width: var(--wrap); margin: 0 auto; padding: .7rem 20px;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand__name { font-weight: 800; font-size: 1.16rem; letter-spacing: -.02em; }
.brand__sub {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); border-left: 1px solid var(--line); padding-left: .55rem; margin-left: .2rem;
}
.nav { margin-left: auto; display: flex; gap: .2rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-size: .9rem; font-weight: 500;
  padding: .4rem .65rem; border-radius: 999px;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 650; }

/* ---------- Layout ---------- */
.shell { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.layout {
  display: grid; gap: 2.5rem;
  grid-template-columns: 220px minmax(0,1fr) 300px;
  align-items: start;
  padding: 2.2rem 0 3rem;
}
.layout--narrow { grid-template-columns: minmax(0, 76ch); justify-content: center; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0,1fr) 300px; }
  .rail-l { display: none; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0,1fr); gap: 2rem; }
  .rail-r { order: 3; }
}
.rail { position: sticky; top: 92px; font-size: .9rem; }
@media (max-width: 860px) { .rail { position: static; } }

.toc__title, .rail__title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--muted); margin: 0 0 .7rem; font-weight: 700;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0 0 .1rem; }
.toc a {
  display: block; text-decoration: none; color: var(--ink-soft);
  padding: .3rem .5rem .3rem 1.9rem; border-radius: var(--radius-sm); position: relative;
  font-size: .88rem; line-height: 1.4;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: .5rem; top: .3rem;
  font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.toc a[aria-current] {
  background: var(--surface-2); color: var(--ink); font-weight: 650;
  box-shadow: inset 2px 0 0 var(--brand-2);
}

/* ---------- Article typography ---------- */
.kicker {
  display: inline-block; font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  font-weight: 750; color: var(--accent); margin: 0 0 .7rem;
}
h1 {
  font-size: clamp(2rem, 1.35rem + 2.3vw, 3.05rem);
  line-height: 1.1; letter-spacing: -.028em; font-weight: 820; margin: 0 0 .8rem;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.4rem, 1.14rem + .85vw, 1.85rem);
  line-height: 1.2; letter-spacing: -.02em; font-weight: 750;
  margin: 2.6rem 0 .8rem; text-wrap: balance;
}
h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -.012em; margin: 1.8rem 0 .55rem; }
h4 { font-size: 1rem; font-weight: 700; margin: 1.4rem 0 .4rem; }

.standfirst {
  font-size: clamp(1.06rem, .98rem + .4vw, 1.25rem);
  color: var(--ink-soft); line-height: 1.55; margin: 0 0 1.4rem; font-weight: 400;
}
.prose p, .prose li { font-family: var(--serif); font-size: 1.06rem; line-height: 1.75; }
.prose p { margin: 0 0 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.prose li { margin: 0 0 .45rem; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li {
  position: relative; padding-left: 1.5rem;
}
.prose ul > li::before {
  content: ""; position: absolute; left: .25rem; top: .78em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--brand-2);
}
.prose ol { list-style: decimal; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose a { font-weight: 600; }

.byline {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  font-size: .86rem; color: var(--muted);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: .8rem 0; margin: 0 0 1.8rem;
}
.byline__who { color: var(--ink); font-weight: 650; }
.byline span + span::before { content: "·"; margin-right: 1rem; color: var(--line); }

hr.rule { border: 0; height: 1px; background: var(--line); margin: 2.6rem 0; }

code, kbd {
  font-family: var(--mono); font-size: .88em;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 5px; padding: .08em .36em; white-space: nowrap;
}
.prose code { font-size: .84em; }

/* ---------- Disclosure box ---------- */
.disclosure {
  border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink);
  border-radius: var(--radius); padding: 1.05rem 1.15rem; margin: 0 0 1.9rem;
  font-size: .93rem; line-height: 1.6;
}
.disclosure h2, .disclosure p:first-child strong { margin-top: 0; }
.disclosure__t {
  display: block; font-weight: 750; font-size: .76rem; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: .4rem;
}
.disclosure p { margin: 0 0 .55rem; font-family: var(--sans); font-size: .93rem; }
.disclosure p:last-child { margin-bottom: 0; }
.disclosure a { color: inherit; font-weight: 650; }

/* ---------- Call to action ---------- */
.cta-block { margin: 2rem 0; }
.cta-block--center { text-align: center; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.02rem;
  padding: .92rem 1.7rem; border-radius: 999px; border: 0;
  box-shadow: var(--shadow); line-height: 1.25;
  transition: transform .12s ease, box-shadow .12s ease;
}
.cta:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.cta--outline {
  background: none; color: var(--brand); border: 1.5px solid var(--brand);
  box-shadow: none; font-size: .93rem; padding: .7rem 1.2rem;
}
.cta--outline:hover { background: var(--surface-2); color: var(--brand); }
.cta--full { display: flex; width: 100%; }
.cta__tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.22); padding: .18rem .45rem; border-radius: 5px;
  white-space: nowrap;
}
.cta--outline .cta__tag { background: var(--surface-2); color: var(--muted); }
.cta-label {
  display: block; margin: .5rem 0 0;
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.cta-note {
  margin: .35rem 0 0; font-size: .82rem; line-height: 1.55; color: var(--muted);
  max-width: 62ch;
}
.cta-block--center .cta-note { margin-left: auto; margin-right: auto; }

/* ---------- Cards, callouts, figures ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.15rem 1.25rem;
}
.card + .card { margin-top: 1rem; }
.card h3 { margin-top: 0; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.6rem 0; }
.cards .card { margin: 0; }
.cards p { font-family: var(--sans); font-size: .93rem; margin: 0; color: var(--ink-soft); }

.callout {
  border-left: 4px solid var(--brand-2); background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .95rem 1.1rem; margin: 1.6rem 0;
}
.callout p { font-family: var(--sans); font-size: .94rem; margin: 0 0 .5rem; }
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.callout__t { font-weight: 750; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; display: block; margin-bottom: .35rem; }

figure.fig { margin: 2rem 0; }
figure.fig svg, figure.fig img { display: block; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
figure.fig figcaption {
  margin-top: .6rem; font-size: .84rem; color: var(--muted); line-height: 1.55;
  font-family: var(--sans);
}
figure.fig figcaption b { color: var(--ink-soft); font-weight: 650; }

.table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; font-family: var(--sans); }
th, td { text-align: left; padding: .72rem .9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--surface-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td .yes { color: var(--ok); font-weight: 700; }
td .no  { color: var(--muted); font-weight: 600; }

.facts { list-style: none; margin: 0; padding: 0; font-size: .89rem; }
.facts li { display: flex; justify-content: space-between; gap: .8rem; padding: .48rem 0; border-bottom: 1px solid var(--line-soft); }
.facts li:last-child { border-bottom: 0; }
.facts dt, .facts b { color: var(--muted); font-weight: 500; }
.facts span:last-child { font-weight: 650; text-align: right; }

.sources { font-size: .88rem; }
.sources li { margin-bottom: .5rem; font-family: var(--sans); }

/* ---------- Page index / guide grid ---------- */
.tiles { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 1.8rem 0; }
.tile {
  display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.2rem; transition: border-color .12s ease, transform .12s ease;
}
.tile:hover { border-color: var(--brand-2); transform: translateY(-2px); color: inherit; }
.tile h3 { margin: 0; font-size: 1.04rem; }
.tile p { margin: 0; font-size: .9rem; color: var(--muted); }
.tile__more { font-size: .8rem; font-weight: 700; color: var(--brand); letter-spacing: .02em; }

/* ---------- Legal pages ---------- */
.legal h2 { font-size: 1.28rem; margin-top: 2.2rem; }
.legal .prose p, .legal .prose li { font-family: var(--sans); font-size: .98rem; line-height: 1.7; }
.legal dl { margin: 1.2rem 0; }
.legal dt { font-weight: 700; margin-top: .9rem; }
.legal dd { margin: .15rem 0 0; color: var(--ink-soft); }
.eff { font-size: .85rem; color: var(--muted); margin: 0 0 1.6rem; }

.identity {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; margin: 1.4rem 0;
}
.identity dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
.identity dt { font-weight: 650; color: var(--muted); font-size: .88rem; margin: 0; }
.identity dd { margin: 0; font-size: .95rem; }
@media (max-width: 520px) { .identity dl { grid-template-columns: 1fr; gap: .1rem 0; } .identity dd { margin-bottom: .55rem; } }

/* ---------- 404 ---------- */
.mid { min-height: 52vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 3rem 0; }
.mid h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--surface);
  margin-top: 3rem; padding: 2.6rem 0 2.2rem; font-size: .88rem;
}
.site-footer__in { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.foot-grid { display: grid; gap: 1.8rem; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h2 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--muted); margin: 0 0 .7rem; font-weight: 700;
}
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: .35rem; }
.foot-links a { color: var(--ink-soft); text-decoration: none; }
.foot-links a:hover { color: var(--brand); text-decoration: underline; }
.foot-id { color: var(--muted); line-height: 1.7; margin: 0; }
.foot-id b { color: var(--ink-soft); font-weight: 650; }
.foot-bottom {
  margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .82rem; line-height: 1.65;
}
.foot-bottom p { margin: 0 0 .55rem; }
.foot-bottom p:last-child { margin-bottom: 0; }

@media print {
  .site-header, .adbar, .rail, .cta-block, .site-footer { display: none !important; }
  .layout { grid-template-columns: 1fr; }
}
