/* Law4All public pages (QW-1): the front door, accuracy, trust and taxonomy, readable without signing in or running
   script. The tokens mirror app.css's "registry" design system (ink, ledger paper, red tape as a structural mark only);
   kept separate so a public page does not load the whole app's stylesheet. */

@font-face { font-family: "Mukta"; font-weight: 400; font-style: normal; font-display: swap; src: url("/app/fonts/mukta-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Mukta"; font-weight: 600; font-style: normal; font-display: swap; src: url("/app/fonts/mukta-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-weight: 600; font-style: normal; font-display: swap; src: url("/app/fonts/literata-latin-600-normal.woff2") format("woff2"); }

:root {
  --ink: #1f2b45; --ink-soft: #2d3a57; --text: #283042; --muted: #667085; --faint: #646c7c;
  --paper: #f3f5f1; --surface: #ffffff; --rule: #dfe3dc; --rule-2: #c8cfc5; --tape: #b42335; --link: #2c4a8c;
  --ok: #2e6b4f; --ok-bg: #e6f1ea; --bad: #8e3b2e; --bad-bg: #f6e8e4; --warn: #85601a; --warn-bg: #f5eedb; --neutral-bg: #eef0ec;
  --r: 8px; --r-sm: 5px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --fs-sm: 14px; --fs-base: 16px; --fs-lg: 18px; --fs-xl: 22px;
  --measure: 72ch; --page: 1120px;
  --sans: "Mukta", "Segoe UI", system-ui, sans-serif; --serif: "Literata", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #d9e0ef; --ink-soft: #c3cce0; --text: #d3d9e4; --muted: #939cad; --faint: #8a93a3;
    --paper: #151a22; --surface: #1c222c; --rule: #2a313c; --rule-2: #38414e; --link: #9db6ee;
    --ok: #7fc7a1; --ok-bg: #1b3027; --bad: #e79a8b; --bad-bg: #36201c; --warn: #e2bf73; --warn-bg: #332a15; --neutral-bg: #252c36;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 var(--fs-base)/1.6 var(--sans); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 600; line-height: 1.3; }
h1 { font-size: 30px; margin-bottom: var(--s3); }
h2 { font-size: var(--fs-xl); margin: var(--s6) 0 var(--s3); }
h3 { font-size: var(--fs-lg); margin-bottom: var(--s2); }
p, ul { margin: var(--s3) 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--surface); padding: var(--s2) var(--s3); z-index: 10; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* header and footer */
.pub-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5);
  padding: var(--s4) max(var(--s4), calc((100% - var(--page)) / 2)); background: var(--ink); border-bottom: 4px solid var(--tape); }
@media (prefers-color-scheme: dark) { .pub-head { background: #10151d; } }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; color: #fff; text-decoration: none; }
.brand .mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--tape); }
.brand svg.logo { width: 20px; height: 20px; fill: #fff; }
.pub-head nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.pub-head nav a { color: #d4dbea; text-decoration: none; padding: var(--s1) 0; }
.pub-head nav a:hover, .pub-head nav a[aria-current] { color: #fff; text-decoration: underline; }
.pub-head nav a.head-btn { color: #fff; border: 1px solid #5d6a88; border-radius: var(--r-sm); padding: var(--s1) var(--s3); }
.pub-foot { padding: var(--s5) max(var(--s4), calc((100% - var(--page)) / 2)); border-top: 1px solid var(--rule); color: var(--muted);
  font-size: var(--fs-sm); }

main { display: block; max-width: var(--page); margin: 0 auto; padding: var(--s6) var(--s4) 64px; }
.lede { font-size: var(--fs-lg); max-width: var(--measure); color: var(--text); }
.hint { color: var(--faint); font-size: var(--fs-sm); max-width: var(--measure); }
td .hint { margin-top: var(--s1); }
.note { max-width: var(--measure); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--rule);
  border-left: 4px solid var(--tape); border-radius: var(--r); }
.crumb { margin-top: 0; font-size: var(--fs-sm); }

/* the front door */
.hero { padding-bottom: var(--s5); border-bottom: 1px solid var(--rule); }
.hero h1 { font-size: clamp(30px, 5vw, 44px); max-width: 20ch; }
.ctas { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.btn { display: inline-block; min-height: 44px; padding: 10px 20px; border-radius: var(--r-sm); border: 1px solid var(--rule-2);
  background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #10151d; } }
.feats { list-style: none; padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.feat, .panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: var(--s5); }
.feat p { margin-bottom: 0; }
.cols { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: var(--s6); }
.cols h2 { font-size: var(--fs-lg); margin-top: 0; }
.panel h3 { margin-top: 0; }
.big-num { font-family: var(--serif); font-size: 36px; font-weight: 600; color: var(--ink); line-height: 1.2; margin: var(--s2) 0; }
.big-num span { font-size: var(--fs-lg); color: var(--muted); }
.nots, .plain { max-width: var(--measure); padding-left: var(--s5); }
.nots li, .plain li { margin: var(--s2) 0; }

/* tables: stacked on a phone, never scrolled sideways */
.tbl { margin: var(--s4) 0; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
caption { text-align: left; color: var(--muted); font-size: var(--fs-sm); padding-bottom: var(--s2); }
th, td { text-align: left; vertical-align: top; padding: var(--s3); border-bottom: 1px solid var(--rule); overflow-wrap: break-word; }
th { color: var(--muted); font-weight: 600; font-size: var(--fs-sm); background: var(--neutral-bg); }
tbody tr:last-child td { border-bottom: 0; }
.frac { white-space: nowrap; }
.badge { display: inline-block; padding: 0 var(--s2); border-radius: var(--r-sm); background: var(--neutral-bg); font-size: var(--fs-sm); font-weight: 600; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
@media (max-width: 760px) {
  h1 { font-size: 26px; }
  main { padding-top: var(--s5); }
  table, thead, tbody, tr, td { display: block; }
  table { border: 0; background: none; }
  thead { position: absolute; left: -9999px; }
  tr { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: var(--s3); padding: var(--s2) 0; }
  caption { display: block; }
  td { border: 0; padding: var(--s1) var(--s4); overflow-wrap: anywhere; }
  td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
}
