/* ZLex: "Chromatic mist". One stylesheet for phone, iPad and desktop, light and dark.
   Layout rules that keep text from ever overlapping: every flex child that holds text has
   min-width:0; long citations and party names wrap (overflow-wrap:anywhere); fixed heights
   are never set on text containers; clamp() scales type to the screen. */

@font-face { font-family: "Fraunces"; src: url(/static/fonts/fraunces-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/static/fonts/fraunces-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/static/fonts/fraunces-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/static/fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/static/fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/static/fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/static/fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/static/fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/static/fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Instrument Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-read: "Source Serif 4", "Iowan Old Style", Georgia, serif;

  --bg: #FBFAF6; --bg-2: #F5F2EA; --surface: #FFFFFF; --surface-2: #FAF8F3; --surface-3: #F3F0E8;
  --ink: #1B2538; --ink-2: #3A4459; --muted: #5F687B; --faint: #8A90A0;
  --line: #E6E1D6; --line-2: #D9D3C5;
  --brass: #A8833C; --brass-ink: #7D5F22; --brass-soft: #F7EAC9;
  --nav: #1B2538; --on-nav: #FBFAF6;
  --sky: #DDEAF8; --sky-ink: #20406B; --lav: #E7E0F7; --lav-ink: #44357A; --mint: #DBEFE4; --mint-ink: #1F5A40;
  --peach: #FCE5D4; --peach-ink: #8A3E1C; --gold: #F7EAC9; --gold-ink: #6B5A2C; --rose: #F8DCDC; --rose-ink: #8E2C2C;
  --mark: #F7EAC9;
  --m1: #DDEAF8; --m2: #E7E0F7; --m3: #FCE5D4; --m4: #DBEFE4; --mist-o: .85;
  --shadow-1: 0 1px 2px rgba(27,37,56,.04), 0 6px 18px rgba(27,37,56,.05);
  --shadow-2: 0 2px 6px rgba(27,37,56,.05), 0 24px 60px rgba(27,37,56,.09);
  --focus: 0 0 0 3px rgba(168,131,60,.35);
  --paper: #F6F2E8; --paper-ink: #1B2538;

  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px;
  --gap: clamp(12px, 1.6vw, 20px);
  --pad: clamp(16px, 3.2vw, 44px);
  --side: 248px; --rail: 84px; --tabbar: 64px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { color-scheme: dark;
  --bg: #0E1320; --bg-2: #121a2b; --surface: #161D2E; --surface-2: #1A2235; --surface-3: #1F2840;
  --ink: #EEEBE3; --ink-2: #D2CFC6; --muted: #A2AABB; --faint: #7D8598;
  --line: #2A3349; --line-2: #343F59;
  --brass: #D4B06A; --brass-ink: #E6C988; --brass-soft: #43371A;
  --nav: #EEEBE3; --on-nav: #0E1320;
  --sky: #1B2E4D; --sky-ink: #9CC4F5; --lav: #2C2650; --lav-ink: #C6B5F7; --mint: #15372D; --mint-ink: #9FE2C3;
  --peach: #4A2A22; --peach-ink: #F6B89A; --gold: #43371A; --gold-ink: #F2D48C; --rose: #4A2026; --rose-ink: #F4A9AE;
  --mark: #5A4A1E;
  --m1: #1E3A66; --m2: #3B2E6E; --m3: #5A2E22; --m4: #164436; --mist-o: .55;
  --shadow-1: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-2: 0 2px 8px rgba(0,0,0,.35), 0 30px 70px rgba(0,0,0,.45);
  --focus: 0 0 0 3px rgba(212,176,106,.45);
  --paper: #F3EEE2; --paper-ink: #1B2538;
} }
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #0E1320; --bg-2: #121a2b; --surface: #161D2E; --surface-2: #1A2235; --surface-3: #1F2840;
  --ink: #EEEBE3; --ink-2: #D2CFC6; --muted: #A2AABB; --faint: #7D8598;
  --line: #2A3349; --line-2: #343F59;
  --brass: #D4B06A; --brass-ink: #E6C988; --brass-soft: #43371A;
  --nav: #EEEBE3; --on-nav: #0E1320;
  --sky: #1B2E4D; --sky-ink: #9CC4F5; --lav: #2C2650; --lav-ink: #C6B5F7; --mint: #15372D; --mint-ink: #9FE2C3;
  --peach: #4A2A22; --peach-ink: #F6B89A; --gold: #43371A; --gold-ink: #F2D48C; --rose: #4A2026; --rose-ink: #F4A9AE;
  --mark: #5A4A1E;
  --m1: #1E3A66; --m2: #3B2E6E; --m3: #5A2E22; --m4: #164436; --mist-o: .55;
  --shadow-1: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-2: 0 2px 8px rgba(0,0,0,.35), 0 30px 70px rgba(0,0,0,.45);
  --focus: 0 0 0 3px rgba(212,176,106,.45);
  --paper: #F3EEE2; --paper-ink: #1B2538;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent; font-feature-settings: "kern"; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
.in-app { -webkit-user-select: none; user-select: none; }
.in-app .selectable, .in-app input, .in-app textarea, .in-app .reader, .in-app .prose { -webkit-user-select: text; user-select: text; }
::selection { background: var(--brass-soft); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
.num, .cite { font-variant-numeric: tabular-nums; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; word-break: normal; }

/* the mist */
.mist { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mist i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--mist-o); }
.mist .m1 { width: 60vmax; height: 46vmax; left: -18vmax; top: -20vmax; background: var(--m1); }
.mist .m2 { width: 48vmax; height: 42vmax; right: -14vmax; top: -12vmax; background: var(--m2); }
.mist .m3 { width: 50vmax; height: 38vmax; right: 6vmax; bottom: -22vmax; background: var(--m3); opacity: calc(var(--mist-o) * .8); }
.mist .m4 { width: 44vmax; height: 36vmax; left: 6vmax; bottom: -20vmax; background: var(--m4); }
body[data-tint="lav"] .mist .m1 { background: var(--m2); }
body[data-tint="gold"] .mist .m1 { background: var(--gold); }
body[data-tint="mint"] .mist .m1 { background: var(--m4); }

.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-mark { font: 600 44px var(--font-display); letter-spacing: -.5px; color: var(--ink); opacity: .9; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }

/* ------------------------------------------------------------------ shell */
.app { position: relative; z-index: 1; min-height: 100dvh; }
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px;
  padding: calc(22px + var(--safe-t)) 14px calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); overflow-y: auto; }
.brand { display: flex; align-items: baseline; gap: 8px; padding: 2px 10px 18px; }
.brand b { font: 600 30px/1 var(--font-display); letter-spacing: -.5px; }
.brand small { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sec { margin: 14px 10px 6px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px;
  color: var(--ink-2); font-size: 15px; font-weight: 500; transition: background .15s, color .15s; }
.nav a svg { width: 20px; height: 20px; flex: none; opacity: .85; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--nav); color: var(--on-nav); }
.nav a[aria-current="page"] svg { opacity: 1; }
.nav a .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--nav);
  color: var(--brass-soft); font: 500 15px var(--font-display); }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; padding: calc(var(--safe-t) + 14px) calc(var(--pad) + var(--safe-r)) calc(40px + var(--safe-b)) var(--pad); }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-bottom: 18px; }
.topbar .grow { flex: 1; min-width: 0; }
.mini-search { position: relative; flex: 1; max-width: 640px; min-width: 0; }
.mini-search input { width: 100%; height: 46px; padding: 0 16px 0 44px; border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow-1); outline: none; font-size: 15px; }
.mini-search svg { position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; color: var(--brass); }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--line-2); }

/* compact: phone. Top app bar + bottom tab bar. */
.appbar, .tabbar { display: none; }
@media (max-width: 699px) {
  .shell { display: block; }
  .side { display: none; }
  .appbar { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: 8px;
    padding: calc(var(--safe-t) + 6px) calc(12px + var(--safe-r)) 8px calc(12px + var(--safe-l)); min-height: calc(56px + var(--safe-t));
    background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-bottom: 1px solid transparent; transition: border-color .2s; }
  .appbar.scrolled { border-bottom-color: var(--line); }
  .appbar .title { flex: 1; min-width: 0; font: 600 18px var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
  .appbar .slot { width: 44px; flex: none; display: flex; justify-content: center; }
  .appbar .icon-btn { box-shadow: none; background: transparent; border-color: transparent; }
  .main { padding: 10px calc(16px + var(--safe-r)) calc(var(--tabbar) + 28px + var(--safe-b)) calc(16px + var(--safe-l)); }
  .topbar { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px calc(6px + var(--safe-r)) calc(6px + var(--safe-b)) calc(6px + var(--safe-l));
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
    border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px;
    border-radius: 14px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .2px; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] svg { color: var(--brass); }
}
/* medium: iPad portrait and small laptops. Icon rail with small labels. */
@media (min-width: 700px) and (max-width: 1179px) {
  .shell { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .side { padding-left: calc(10px + var(--safe-l)); padding-right: 10px; align-items: stretch; }
  .brand { justify-content: center; padding: 0 0 14px; }
  .brand small, .nav-sec, .side-foot .who { display: none; }
  .nav a { flex-direction: column; gap: 4px; padding: 10px 4px; font-size: 10.5px; font-weight: 600; text-align: center; min-height: 58px; }
  .nav a .lbl { white-space: normal; line-height: 1.15; }
  .nav a svg { width: 22px; height: 22px; }
  .side-foot { justify-content: center; padding-left: 0; padding-right: 0; }
}

/* ------------------------------------------------------------------ type */
.eyebrow { font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.h-hero { font: 500 clamp(34px, 5.4vw, 60px)/1.04 var(--font-display); letter-spacing: -1px; }
.h1 { font: 500 clamp(26px, 3.2vw, 36px)/1.12 var(--font-display); letter-spacing: -.4px; }
.h2 { font: 500 clamp(20px, 2.2vw, 24px)/1.2 var(--font-display); }
.h3 { font: 500 18px/1.3 var(--font-display); }
.lead { color: var(--ink-2); font-size: clamp(15px, 1.6vw, 17px); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.prose { font: 400 clamp(16.5px, 1.6vw, 18.5px)/1.68 var(--font-read); color: var(--ink); }
.prose p + p { margin-top: 1em; }
mark, .prose b, .snip b { background: var(--mark); color: inherit; font-weight: inherit; padding: 0 .12em; border-radius: 3px; }

/* ------------------------------------------------------------------ surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.card.pad { padding: clamp(16px, 2vw, 24px); }
.glass { background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.stack.tight { gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.page { max-width: 1440px; margin: 0 auto; }
.page.narrow { max-width: 980px; }

/* tints */
.t-sky { background: var(--sky); color: var(--sky-ink); } .t-lav { background: var(--lav); color: var(--lav-ink); }
.t-mint { background: var(--mint); color: var(--mint-ink); } .t-peach { background: var(--peach); color: var(--peach-ink); }
.t-gold { background: var(--gold); color: var(--gold-ink); } .t-rose { background: var(--rose); color: var(--rose-ink); }
.t-ink { background: var(--nav); color: var(--on-nav); }

/* ------------------------------------------------------------------ controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .08s, box-shadow .15s, background .15s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: var(--line-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--nav); color: var(--on-nav); border-color: transparent; }
.btn.brass { background: var(--brass); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .btn.brass, :root[data-theme="auto"] .btn.brass { color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 500; max-width: 100%; }
.chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.on { background: var(--nav); color: var(--on-nav); border-color: transparent; }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.chip.on .n { color: inherit; opacity: .75; }
button.chip:hover, a.chip:hover { border-color: var(--line-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tone-good { background: var(--mint); color: var(--mint-ink); } .tone-caution { background: var(--gold); color: var(--gold-ink); }
.tone-adverse { background: var(--rose); color: var(--rose-ink); } .tone-neutral { background: var(--sky); color: var(--sky-ink); }
.tone-quiet { background: var(--surface-3); color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); outline: none; font-size: 16px; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus { border-color: var(--brass); box-shadow: var(--focus); }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.toggle input { width: 44px; height: 26px; appearance: none; -webkit-appearance: none; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; margin: 0; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.toggle input:checked { background: var(--brass); }
.toggle input:checked::after { transform: translateX(18px); }
.hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: none; }

/* ------------------------------------------------------------------ the omnibox */
.omni { position: relative; display: flex; align-items: center; gap: 12px; min-height: clamp(64px, 7vw, 88px); padding: 8px 10px 8px clamp(16px, 2vw, 26px);
  border-radius: clamp(20px, 2.2vw, 28px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.omni > svg { width: 24px; height: 24px; flex: none; color: var(--brass); }
.omni input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: clamp(16px, 1.9vw, 22px); color: var(--ink); }
.omni input::placeholder { color: var(--faint); }
.omni .btn.primary { min-height: clamp(48px, 5vw, 60px); padding: 0 clamp(18px, 2.4vw, 30px); border-radius: clamp(14px, 1.6vw, 20px); font-size: 16px; }
.omni:focus-within { border-color: color-mix(in srgb, var(--brass) 55%, var(--line)); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50; padding: 8px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-2); max-height: min(60vh, 460px); overflow-y: auto; }
.suggest .sg-h { padding: 8px 12px 4px; font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); }
.suggest a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; border-radius: 12px; }
.suggest a:hover, .suggest a.active { background: var(--surface-3); }
.suggest a .t { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest a .k { color: var(--muted); font-size: 13px; flex: none; }

/* ------------------------------------------------------------------ home */
.hero { padding: clamp(18px, 6vh, 72px) 0 clamp(8px, 2vh, 18px); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: var(--gap); }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 168px; padding: 20px;
  border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); transition: transform .12s, box-shadow .2s; overflow: hidden; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tile svg { width: 28px; height: 28px; }
.tile .tt { font: 500 22px/1.15 var(--font-display); color: var(--ink); }
.tile .td { margin-top: 6px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.tile .tn { position: absolute; right: 18px; top: 18px; font: 500 13px var(--font-ui); color: var(--ink-2); opacity: .8; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.stat { padding: 14px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); }
.stat b { display: block; font: 500 clamp(22px, 2.6vw, 30px)/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--gap); }
.list-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow > * { overflow: hidden; text-overflow: ellipsis; }
.list-row .t1 { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .t2 { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ results */
.results-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.results-layout.split { grid-template-columns: 250px minmax(0, 1fr) minmax(0, 1.15fr); }
@media (max-width: 1179px) { .results-layout, .results-layout.split { grid-template-columns: minmax(0, 1fr); } .results-layout .filters-col, .filters-col { display: none; } }
@media (min-width: 1180px) { .filters-btn { display: none !important; } }
.filters-col { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100dvh - 32px); overflow-y: auto; padding-bottom: 16px; scrollbar-width: thin; }
.fgroup { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.fgroup h4 { font: 600 11.5px var(--font-ui); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.fopt { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14.5px; cursor: pointer; }
.fopt input { width: 18px; height: 18px; accent-color: var(--nav); flex: none; margin: 0; }
.fopt .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fopt .n { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.result { display: block; padding: clamp(16px, 1.8vw, 22px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); transition: border-color .15s, transform .12s; min-width: 0; }
.result:hover { border-color: var(--line-2); }
.result.active { border-color: var(--brass); box-shadow: var(--focus); }
.r-meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; font-size: 13px; color: var(--muted); }
.r-meta .cite { font-size: 15px; font-weight: 600; color: var(--ink); }
.r-title { margin-top: 6px; font: 500 clamp(18px, 1.8vw, 21px)/1.25 var(--font-display); overflow-wrap: anywhere; }
.r-snip { margin-top: 8px; font: 400 15.5px/1.55 var(--font-read); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.r-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.res-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ask-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-md); }
.ask-banner .grow { font-size: 14.5px; }
.pane { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: var(--r-lg); }
@media (max-width: 1179px) { .pane { display: none; } }

/* ------------------------------------------------------------------ report reader */
.report-head { display: flex; flex-direction: column; gap: 10px; }
.report-head .h1 { overflow-wrap: anywhere; }
.rh-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.rh-meta a { color: var(--ink-2); border-bottom: 1px dotted var(--line-2); }
.tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; margin: 4px 0 0;
  background: linear-gradient(var(--bg) 70%, transparent); }
.tabs::-webkit-scrollbar { display: none; }
@media (max-width: 699px) { .tabs { top: calc(56px + var(--safe-t)); } }
.tabs button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.tabs button.on { background: var(--nav); color: var(--on-nav); }
.tabs button .n { font-weight: 500; opacity: .75; margin-left: 4px; font-variant-numeric: tabular-nums; }
.reader-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
@media (max-width: 1179px) { .reader-grid { grid-template-columns: minmax(0, 1fr); } }
.paper { background: var(--paper); color: var(--paper-ink); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 56px); box-shadow: var(--shadow-2); }
.paper .prose { color: var(--paper-ink); }
.jhead { text-align: center; font: 400 15px/1.5 var(--font-read); color: #3A4459; }
.jhead .c { font: 600 16px var(--font-read); letter-spacing: .5px; color: var(--paper-ink); }
.hn { font: 400 15.5px/1.62 var(--font-read); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.hn + .hn { margin-top: 12px; }
.hn .lab { font-weight: 600; }
.para { position: relative; font: 400 clamp(16px, 1.55vw, 17.5px)/1.72 var(--font-read); text-align: justify; hyphens: auto; -webkit-hyphens: auto; margin: 0 0 1em; color: var(--paper-ink); scroll-margin-top: 90px; overflow-wrap: anywhere; }
.para .pn { font-weight: 600; font-variant-numeric: tabular-nums; margin-right: .35em; }
.para.hit { background: #F2D98A; box-shadow: 0 0 0 6px #F2D98A; border-radius: 4px; }
.side-card { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1179px) { .side-card { position: static; } }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cases { display: flex; flex-direction: column; }
.case-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.case-row:last-child { border-bottom: 0; }
.case-row .grow { min-width: 0; }
.case-row .c1 { font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.case-row .c2 { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.case-row .c3 { margin-top: 4px; font: 400 14.5px/1.5 var(--font-read); color: var(--ink-2); overflow-wrap: anywhere; }
.badge-t { flex: none; }

/* thread of precedent */
.thread { width: 100%; overflow-x: auto; }
.thread svg { min-width: 720px; width: 100%; height: auto; }
.thread text { font-family: var(--font-ui); fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

/* ------------------------------------------------------------------ ask */
.ask-box { display: flex; flex-direction: column; gap: 12px; padding: clamp(14px, 1.8vw, 22px); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.ask-box textarea { width: 100%; min-height: 96px; border: 0; outline: 0; resize: none; background: transparent; font: 500 clamp(18px, 2vw, 23px)/1.35 var(--font-display); color: var(--ink); }
.ask-box textarea::placeholder { color: var(--faint); font-weight: 400; }
.steps { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.step { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); }
.step.done { color: var(--mint-ink); }
.step.live { color: var(--brass-ink); font-weight: 600; }
.step .spin { width: 10px; height: 10px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 0 var(--brass); animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.step svg { width: 16px; height: 16px; }
.verdict { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.verdict .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.answer { font: 400 clamp(17px, 1.7vw, 19px)/1.7 var(--font-read); }
.answer .s { }
.pin { display: inline-flex; align-items: center; gap: 4px; margin: 0 2px; padding: 2px 9px; border-radius: 8px; background: var(--lav); color: var(--lav-ink);
  font: 600 13px/1.6 var(--font-ui); vertical-align: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pin:hover { filter: brightness(.97); }
.auth { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.auth .a1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.auth .a1 .grow { min-width: 0; }
.auth .cite { font-weight: 600; font-size: 15px; }
.auth .tt { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.auth .why { font-size: 14px; color: var(--ink-2); }
.auth blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--brass); background: var(--surface); border-radius: 0 10px 10px 0;
  font: italic 400 15px/1.55 var(--font-read); color: var(--ink-2); overflow-wrap: anywhere; }
.arrive { animation: arrive .35s ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ statutes */
.section-list { display: flex; flex-direction: column; max-height: calc(100dvh - 140px); overflow-y: auto; border-radius: var(--r-md); }
.section-list a { display: flex; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 10px; font-size: 14px; align-items: baseline; }
.section-list a:hover { background: var(--surface-3); }
.section-list a.on { background: var(--mint); color: var(--mint-ink); }
.section-list .sn { flex: none; min-width: 44px; font-weight: 600; font-variant-numeric: tabular-nums; }
.section-list .sh { min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (max-width: 1023px) { .act-layout { grid-template-columns: minmax(0, 1fr); } .act-layout .section-list { max-height: 360px; } }
.stext { font: 400 clamp(16px, 1.55vw, 17.5px)/1.75 var(--font-read); white-space: pre-wrap; overflow-wrap: anywhere; }
.diff del { background: var(--rose); color: var(--rose-ink); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
.diff ins { background: var(--mint); color: var(--mint-ink); text-decoration: none; border-radius: 3px; padding: 0 2px; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 899px) { .compare { grid-template-columns: minmax(0, 1fr); } }
.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--brass), color-mix(in srgb, var(--brass) 15%, transparent)); }
.timeline .ev { position: relative; }
.timeline .ev::before { content: ""; position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brass); }
.timeline .ev.hi::before { background: var(--brass); }

/* ------------------------------------------------------------------ judges, words */
.judge-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; transition: border-color .15s; }
.judge-card:hover { border-color: var(--line-2); }
.mono { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 500 18px var(--font-display); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13.5px; }
.bar .lab { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; background: var(--brass); }
.az { display: flex; flex-wrap: wrap; gap: 4px; }
.az button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.az button.on { background: var(--nav); color: var(--on-nav); border-color: transparent; }
.az button:disabled { opacity: .35; }
.term-list { columns: 3 240px; column-gap: 24px; }
.term-list a { display: block; break-inside: avoid; padding: 8px 4px; border-bottom: 1px solid var(--line); font: 400 16px var(--font-read); }
.term-list a:hover { color: var(--brass-ink); }
.defn { padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.defn q { font: 400 16.5px/1.65 var(--font-read); quotes: none; display: block; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ sheets, toasts, dialogs */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(14,19,32,.38); backdrop-filter: blur(2px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 90; left: 50%; bottom: 0; transform: translateX(-50%); width: min(720px, 100%); max-height: 88dvh; display: flex; flex-direction: column;
  border-radius: 26px 26px 0 0; background: var(--surface); box-shadow: var(--shadow-2); animation: rise .28s cubic-bezier(.2,.8,.2,1);
  padding-bottom: var(--safe-b); }
@keyframes rise { from { transform: translate(-50%, 40px); opacity: 0; } }
@media (min-width: 700px) { .sheet { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 26px; animation: pop .22s cubic-bezier(.2,.8,.2,1); }
  @keyframes pop { from { transform: translate(-50%, -48%) scale(.98); opacity: 0; } } }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px 10px; }
.sheet-h .h2 { flex: 1; min-width: 0; }
.sheet-b { padding: 6px 20px 20px; overflow-y: auto; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; }
@media (min-width: 700px) { .grabber { display: none; } }
#toast-root { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (max-width: 699px) { #toast-root { bottom: calc(var(--tabbar) + 18px + var(--safe-b)); } }
.toast { pointer-events: auto; max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 14px; background: var(--nav); color: var(--on-nav); box-shadow: var(--shadow-2); font-size: 14.5px; animation: rise2 .25s; }
@keyframes rise2 { from { opacity: 0; transform: translateY(10px); } }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty .h2 { color: var(--ink); margin-bottom: 6px; }
.err { padding: 14px 18px; border-radius: var(--r-md); background: var(--rose); color: var(--rose-ink); font-size: 14.5px; }
.note { padding: 12px 16px; border-radius: var(--r-md); background: var(--gold); color: var(--gold-ink); font-size: 14px; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.more-grid a { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 96px; border-radius: 18px; }
.more-grid a svg { width: 24px; height: 24px; }
.more-grid a b { font: 500 16px var(--font-display); }

/* ------------------------------------------------------------------ login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--safe-t)) 20px calc(24px + var(--safe-b)); }
.login .card { width: min(440px, 100%); padding: clamp(24px, 4vw, 40px); }
.login .brand-xl { font: 600 52px/1 var(--font-display); letter-spacing: -1px; }

/* ------------------------------------------------------------------ upload */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 220px; padding: 24px; text-align: center;
  border: 2px dashed var(--line-2); border-radius: var(--r-xl); background: color-mix(in srgb, var(--surface) 70%, transparent); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--brass); background: var(--gold); }
.drop svg { width: 40px; height: 40px; color: var(--brass); }
.issue { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.issue .lt { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 14px var(--font-display); background: var(--gold); color: var(--gold-ink); }
.issue textarea { flex: none; width: 100%; min-width: 0; border: 0; outline: 0; resize: vertical; background: transparent; font: 500 16px/1.45 var(--font-ui); color: var(--ink); min-height: 48px; }
textarea.grow-ta { resize: none; overflow: hidden; }
.file-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.file-card .fi { width: 48px; height: 56px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); }
.file-card .fi svg { width: 24px; height: 24px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .side, .tabbar, .appbar, .topbar, .tabs, .mist, .no-print { display: none !important; } .shell { display: block; } .main { padding: 0; } .paper { box-shadow: none; } }

/* fixes after the first screenshot pass */
[hidden] { display: none !important; }
.omni input:focus-visible, .mini-search input:focus-visible, .ask-box textarea:focus-visible, .issue textarea:focus-visible { box-shadow: none; }
@media (max-width: 699px) {
  .para, .hn { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { min-height: 128px; padding: 14px; gap: 10px; border-radius: 18px; }
  .tile .tt { font-size: 18px; }
  .tile .td { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .tile svg { width: 24px; height: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 8px; }
  .report-head .row .btn.sm { flex: 1 1 auto; }
}
@media (min-width: 700px) and (max-width: 1179px) { .side-foot { flex-direction: column; gap: 8px; } }

/* Home tiles: one row of six on a wide screen, three by two on a tablet, two by three on a
   phone; every description takes the same height, so every title sits on the same line. */
.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1380px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile { justify-content: flex-start; }
.tile > div { margin-top: auto; }
.tile .td { min-height: calc(1.4em * 3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 699px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .td { min-height: calc(1.4em * 2); -webkit-line-clamp: 2; }
}

/* Pager */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; }
.pg-info { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pg-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-per { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-right: 6px; }
.pg-per select { min-height: 36px; padding: 0 28px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.pg-nums { display: inline-flex; gap: 4px; align-items: center; }
.pg-btn { min-width: 36px; min-height: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14px var(--font-ui); display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.pg-btn svg { width: 18px; height: 18px; }
.pg-btn.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pg-btn:disabled { opacity: .35; }
.pg-gap { color: var(--faint); padding: 0 2px; }
.pg-now { display: none; font-size: 14px; color: var(--ink-2); padding: 0 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 699px) {
  .pager { justify-content: center; }
  .pg-info { width: 100%; text-align: center; }
  .pg-nums { display: none; }
  .pg-now { display: inline; }
}

/* Cases by citation */
.cases-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; align-items: end; }
.cases-form .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cases-form .field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.cases-form .btn { min-height: 48px; }
.vol-list { display: flex; flex-direction: column; }
.vol-row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-top: 1px solid var(--line); border-radius: 10px; }
.vol-row:first-child { border-top: 0; }
.vol-row:hover { background: var(--surface-3); }
.vol-row.hit { background: color-mix(in srgb, var(--brass) 14%, transparent); }
.vol-row .vp { flex: none; width: 56px; text-align: right; font: 600 15px var(--font-ui); color: var(--brass-ink); font-variant-numeric: tabular-nums; }
.vol-row .t1 { display: block; font-weight: 600; font-size: 14px; }
.vol-row .t2 { display: block; color: var(--ink-2); font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.vol-row .vc { flex: none; text-align: right; font-size: 13px; color: var(--ink-2); max-width: 34%; }
@media (max-width: 699px) { .vol-row .vp { width: 40px; } .vol-row .vc { display: none; } }
@media (max-width: 699px) {
  .cases-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases-form .field.wide { grid-column: 1 / -1; }
}
/* Statutes: the jurisdictions keep a flowing grid */
#jurs .tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
@media (max-width: 699px) { #jurs .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ palettes (light mode)
   Chosen in Settings. 'mist' is the original; the others are quieter: one neutral tint for every
   tile, a single accent colour, and no coloured haze behind the page. */
:root[data-palette="chambers"][data-theme="light"] { --bg: #F7F5F0; --bg-2: #F1EDE4; --surface: #FFFFFF; --surface-2: #FAF8F4; --surface-3: #F2EEE6; --ink: #16202E; --ink-2: #384354; --muted: #5E6878; --faint: #8B919D; --line: #E4DED2; --line-2: #D6CFC0; --brass: #9A7633; --brass-ink: #6E5220; --brass-soft: #F2E8D3; --nav: #16202E; --on-nav: #FFFFFF; --sky: #F1ECE2; --sky-ink: #2A3445; --lav: #F1ECE2; --lav-ink: #2A3445; --mint: #F1ECE2; --mint-ink: #2A3445; --peach: #F1ECE2; --peach-ink: #2A3445; --gold: #F2E8D3; --gold-ink: #6E5220; --mark: #F2E6C8; --paper: #FBF9F4; --paper-ink: #16202E; --m1: #F7F5F0; --m2: #F7F5F0; --m3: #F7F5F0; --m4: #F7F5F0; --mist-o: 0; --focus: 0 0 0 3px color-mix(in srgb, #9A7633 35%, transparent); }
@media (prefers-color-scheme: light) { :root[data-palette="chambers"][data-theme="auto"] { --bg: #F7F5F0; --bg-2: #F1EDE4; --surface: #FFFFFF; --surface-2: #FAF8F4; --surface-3: #F2EEE6; --ink: #16202E; --ink-2: #384354; --muted: #5E6878; --faint: #8B919D; --line: #E4DED2; --line-2: #D6CFC0; --brass: #9A7633; --brass-ink: #6E5220; --brass-soft: #F2E8D3; --nav: #16202E; --on-nav: #FFFFFF; --sky: #F1ECE2; --sky-ink: #2A3445; --lav: #F1ECE2; --lav-ink: #2A3445; --mint: #F1ECE2; --mint-ink: #2A3445; --peach: #F1ECE2; --peach-ink: #2A3445; --gold: #F2E8D3; --gold-ink: #6E5220; --mark: #F2E6C8; --paper: #FBF9F4; --paper-ink: #16202E; --m1: #F7F5F0; --m2: #F7F5F0; --m3: #F7F5F0; --m4: #F7F5F0; --mist-o: 0; --focus: 0 0 0 3px color-mix(in srgb, #9A7633 35%, transparent); } }
:root[data-palette="chambers"]:not([data-theme="dark"]) .tile { border: 1px solid var(--line); box-shadow: var(--shadow-1); }
:root[data-palette="chambers"]:not([data-theme="dark"]) .tile svg { color: var(--brass-ink); }
:root[data-palette="oxford"][data-theme="light"] { --bg: #F5F6F8; --bg-2: #EEF0F4; --surface: #FFFFFF; --surface-2: #F8F9FB; --surface-3: #EEF1F5; --ink: #14213D; --ink-2: #33405A; --muted: #5B6579; --faint: #8A92A3; --line: #E1E5EC; --line-2: #D2D8E2; --brass: #7A1F2B; --brass-ink: #7A1F2B; --brass-soft: #F3E3E5; --nav: #14213D; --on-nav: #FFFFFF; --sky: #ECEFF5; --sky-ink: #14213D; --lav: #ECEFF5; --lav-ink: #14213D; --mint: #ECEFF5; --mint-ink: #14213D; --peach: #ECEFF5; --peach-ink: #14213D; --gold: #F3E3E5; --gold-ink: #7A1F2B; --mark: #F6E7C6; --paper: #FDFDFB; --paper-ink: #14213D; --m1: #F5F6F8; --m2: #F5F6F8; --m3: #F5F6F8; --m4: #F5F6F8; --mist-o: 0; --focus: 0 0 0 3px color-mix(in srgb, #7A1F2B 35%, transparent); }
@media (prefers-color-scheme: light) { :root[data-palette="oxford"][data-theme="auto"] { --bg: #F5F6F8; --bg-2: #EEF0F4; --surface: #FFFFFF; --surface-2: #F8F9FB; --surface-3: #EEF1F5; --ink: #14213D; --ink-2: #33405A; --muted: #5B6579; --faint: #8A92A3; --line: #E1E5EC; --line-2: #D2D8E2; --brass: #7A1F2B; --brass-ink: #7A1F2B; --brass-soft: #F3E3E5; --nav: #14213D; --on-nav: #FFFFFF; --sky: #ECEFF5; --sky-ink: #14213D; --lav: #ECEFF5; --lav-ink: #14213D; --mint: #ECEFF5; --mint-ink: #14213D; --peach: #ECEFF5; --peach-ink: #14213D; --gold: #F3E3E5; --gold-ink: #7A1F2B; --mark: #F6E7C6; --paper: #FDFDFB; --paper-ink: #14213D; --m1: #F5F6F8; --m2: #F5F6F8; --m3: #F5F6F8; --m4: #F5F6F8; --mist-o: 0; --focus: 0 0 0 3px color-mix(in srgb, #7A1F2B 35%, transparent); } }
:root[data-palette="oxford"]:not([data-theme="dark"]) .tile { border: 1px solid var(--line); box-shadow: var(--shadow-1); }
:root[data-palette="oxford"]:not([data-theme="dark"]) .tile svg { color: var(--brass-ink); }
:root[data-palette="ledger"][data-theme="light"] { --bg: #F4F6F5; --bg-2: #ECF0EE; --surface: #FFFFFF; --surface-2: #F8FAF9; --surface-3: #EDF1EF; --ink: #1D2A2E; --ink-2: #384A4F; --muted: #5C6B6F; --faint: #8A9699; --line: #DFE6E3; --line-2: #CFD9D5; --brass: #1F6F6A; --brass-ink: #185A56; --brass-soft: #DDEEEC; --nav: #1D2A2E; --on-nav: #FFFFFF; --sky: #E9F0EE; --sky-ink: #1D2A2E; --lav: #E9F0EE; --lav-ink: #1D2A2E; --mint: #E9F0EE; --mint-ink: #1D2A2E; --peach: #E9F0EE; --peach-ink: #1D2A2E; --gold: #DDEEEC; --gold-ink: #185A56; --mark: #F3E9C8; --paper: #FCFCFA; --paper-ink: #1D2A2E; --m1: #F4F6F5; --m2: #F4F6F5; --m3: #F4F6F5; --m4: #F4F6F5; --mist-o: 0; --focus: 0 0 0 3px color-mix(in srgb, #1F6F6A 35%, transparent); }
@media (prefers-color-scheme: light) { :root[data-palette="ledger"][data-theme="auto"] { --bg: #F4F6F5; --bg-2: #ECF0EE; --surface: #FFFFFF; --surface-2: #F8FAF9; --surface-3: #EDF1EF; --ink: #1D2A2E; --ink-2: #384A4F; --muted: #5C6B6F; --faint: #8A9699; --line: #DFE6E3; --line-2: #CFD9D5; --brass: #1F6F6A; --brass-ink: #185A56; --brass-soft: #DDEEEC; --nav: #1D2A2E; --on-nav: #FFFFFF; --sky: #E9F0EE; --sky-ink: #1D2A2E; --lav: #E9F0EE; --lav-ink: #1D2A2E; --mint: #E9F0EE; --mint-ink: #1D2A2E; --peach: #E9F0EE; --peach-ink: #1D2A2E; --gold: #DDEEEC; --gold-ink: #185A56; --mark: #F3E9C8; --paper: #FCFCFA; --paper-ink: #1D2A2E; --m1: #F4F6F5; --m2: #F4F6F5; --m3: #F4F6F5; --m4: #F4F6F5; --mist-o: 0; --focus: 0 0 0 3px color-mix(in srgb, #1F6F6A 35%, transparent); } }
:root[data-palette="ledger"]:not([data-theme="dark"]) .tile { border: 1px solid var(--line); box-shadow: var(--shadow-1); }
:root[data-palette="ledger"]:not([data-theme="dark"]) .tile svg { color: var(--brass-ink); }
.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.palette { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; font: inherit; }
.palette.on { border-color: var(--brass); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brass) 40%, transparent); }
.palette .sw { display: flex; gap: 4px; }
.palette .sw i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); }

/* ================================================================== review copy: shared screen parts
   Everything below is used by both design directions; the Design 3 block after it restyles them. */
:root { --t-good: var(--mint-ink); --t-neutral: var(--sky-ink); --t-adverse: var(--rose-ink); --t-quiet: var(--faint); --font-mono: ui-monospace, "SF Mono", Menlo, monospace; }
.design-switch { margin-left: 4px; }
.design-switch button { font-size: 13px; min-height: 32px; padding: 0 12px; }
.completeness { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--gold); color: var(--gold-ink); font-size: 14px; line-height: 1.45; }
.court-line { font-size: 13px; letter-spacing: .4px; color: var(--muted); }
.court-line .sep { opacity: .5; margin: 0 2px; }
.reported { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cite-tag { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.cite-tag.this { background: var(--nav); color: var(--on-nav); border-color: transparent; }
.cite-tag.court { border-style: dashed; font-weight: 500; color: var(--ink-2); }
.cite-tag.court:hover { border-color: var(--brass); }
.rh-meta.bench a { border-bottom: 1px dotted var(--faint); }
.report-head .actions { margin-top: 2px; }
.connected { font-size: 14px; }
.connected summary { cursor: pointer; color: var(--ink-2); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.connected summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.connected[open] summary::before { transform: rotate(45deg); }
.connected-list { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 2px; }
.row-c { display: flex; gap: 10px; min-height: 32px; align-items: center; padding: 2px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.row-c:last-of-type { border-bottom: 0; }
.row-c b { font-weight: 600; } .row-c.this b { color: var(--brass-ink); }
.panel-title { font-size: 12.5px; letter-spacing: .3px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.status .status-main { display: flex; align-items: center; gap: 12px; }
.status-label { font: 500 clamp(19px, 1.8vw, 22px)/1.2 var(--font-display); }
.shape { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.shape.tick::after { content: ""; width: 10px; height: 16px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.shape.diamond { border-radius: 6px; transform: rotate(45deg); width: 30px; height: 30px; margin: 5px; }
.shape.dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.count-list { display: flex; flex-direction: column; }
.count-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.count-row:last-child { border-bottom: 0; }
.count-row .num { font-variant-numeric: tabular-nums; font-size: 16px; }
.count-row:hover .num { color: var(--brass-ink); }
.read-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.read-tools .source-one { padding: 0 4px; }
.find { position: relative; display: flex; align-items: center; gap: 8px; min-width: 220px; flex: 1 1 220px; max-width: 360px; }
.find svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.find input { width: 100%; min-height: 38px; padding: 0 70px 0 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; }
.find input:focus { outline: none; border-color: var(--brass); box-shadow: var(--focus); }
.find-n { position: absolute; right: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.find-hit { background: var(--mark); border-radius: 3px; padding: 0 1px; }
.find-hit.current { outline: 2px solid var(--brass); }
.pdf-frame iframe { width: 100%; height: min(78dvh, 1100px); border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.pdf-frame p { margin-top: 8px; }
.divider { border: 0; border-top: 1px solid var(--line-2); margin: 22px 0; }
.para-wrap { position: relative; scroll-margin-top: 90px; }
.para-wrap .para { margin: 0 0 1em; }
.para-wrap.hit .para { background: var(--mark); box-shadow: 0 0 0 6px var(--mark); border-radius: 4px; }
.para .pn { display: inline-block; min-width: 2.2em; margin-left: -2.6em; padding-right: .4em; text-align: right; font: 500 13px/1 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.para-tools { position: absolute; right: -2px; top: -2px; display: none; gap: 2px; }
.para-tools button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.para-tools button:hover { color: var(--ink); border-color: var(--line-2); }
.para-tools svg { width: 15px; height: 15px; }
.para-wrap:hover .para-tools, .para-wrap:focus-within .para-tools { display: inline-flex; }
@media (hover: none) { .para-tools { display: inline-flex; opacity: .7; } }
.source-note { color: var(--muted); margin-top: 18px; }
.map-coverage { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.map-filters { align-items: center; }
.map-filters .years { gap: 6px; }
.input.sm { min-height: 36px; padding: 6px 10px; width: 84px; font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--brass-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.legend i.diamond { width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); }
.legend i.ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; }
.pane-in { padding: clamp(16px, 2vw, 24px); }
.pane-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; position: sticky; top: 0; z-index: 3; background: var(--surface); padding: 2px 0 8px; }
.spread.wrap { flex-wrap: wrap; }
@media (max-width: 640px) { .para .pn { display: inline; min-width: 0; margin: 0 .4em 0 0; padding: 0; } .design-switch { order: 9; } }

/* ================================================================== Design 3: "The Record"
   A law report, not an app: ink on paper, a newspaper's hierarchy, colour only for legal meaning. */
@font-face { font-family: "Newsreader"; src: url(/static/fonts/newsreader-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/static/fonts/newsreader-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/static/fonts/newsreader-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/static/fonts/newsreader-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/static/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/static/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/static/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/static/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/static/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

html[data-design="d3"] {
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-read: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-ui: "IBM Plex Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --bg: #FBFAF7; --bg-2: #F6F4EE; --surface: #FFFFFF; --surface-2: #F8F7F3; --surface-3: #F1EEE6;
  --ink: #12161C; --ink-2: #39404C; --muted: #5A6170; --faint: #8A909A;
  --line: #E3E0D8; --line-2: #D6D2C8;
  --brass: #C9B98F; --brass-ink: #6E5A2C; --brass-soft: #F3EBD8;
  --nav: #12161C; --on-nav: #FBFAF7;
  --t-good: #1F6B4F; --t-neutral: #39404C; --t-adverse: #7B1E2B; --t-quiet: #8A909A;
  --mint: #E7F1EC; --mint-ink: #1F6B4F; --gold: #F3EBD8; --gold-ink: #6E5A2C; --rose: #F4E4E6; --rose-ink: #7B1E2B;
  --sky: #ECEBE6; --sky-ink: #39404C; --lav: #ECEBE6; --lav-ink: #39404C; --peach: #ECEBE6; --peach-ink: #39404C;
  --mark: #F3EBD8; --m1: #FBFAF7; --m2: #FBFAF7; --m3: #FBFAF7; --m4: #FBFAF7; --mist-o: 0;
  --shadow-1: none; --shadow-2: none;
  --focus: 0 0 0 3px rgba(201,185,143,.6);
  --paper: #FFFFFF; --paper-ink: #12161C;
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --r-xl: 14px;
}
html[data-design="d3"][data-theme="dark"], html[data-design="d3"][data-theme="auto"] { color-scheme: light; }
@media (prefers-color-scheme: dark) { html[data-design="d3"][data-theme="auto"] { color-scheme: dark;
  --bg: #12161C; --bg-2: #171C23; --surface: #181D24; --surface-2: #1C222A; --surface-3: #222930;
  --ink: #FBFAF7; --ink-2: #C9C4B6; --muted: #9AA0AA; --faint: #6E747E; --line: #2A3038; --line-2: #363D47;
  --brass: #C9B98F; --brass-ink: #D9C9A0; --brass-soft: #2E2A1E; --nav: #FBFAF7; --on-nav: #12161C;
  --t-good: #7FC8A5; --t-neutral: #C9C4B6; --t-adverse: #E08A96; --t-quiet: #7A808A;
  --mint: #1B3A2D; --mint-ink: #7FC8A5; --gold: #2E2A1E; --gold-ink: #D9C9A0; --rose: #3A2226; --rose-ink: #E08A96;
  --sky: #262C34; --sky-ink: #C9C4B6; --lav: #262C34; --lav-ink: #C9C4B6; --peach: #262C34; --peach-ink: #C9C4B6; --mark: #3A3320;
  --paper: #181D24; --paper-ink: #FBFAF7; --focus: 0 0 0 3px rgba(201,185,143,.45); } }
html[data-design="d3"][data-theme="dark"] { color-scheme: dark;
  --bg: #12161C; --bg-2: #171C23; --surface: #181D24; --surface-2: #1C222A; --surface-3: #222930;
  --ink: #FBFAF7; --ink-2: #C9C4B6; --muted: #9AA0AA; --faint: #6E747E; --line: #2A3038; --line-2: #363D47;
  --brass: #C9B98F; --brass-ink: #D9C9A0; --brass-soft: #2E2A1E; --nav: #FBFAF7; --on-nav: #12161C;
  --t-good: #7FC8A5; --t-neutral: #C9C4B6; --t-adverse: #E08A96; --t-quiet: #7A808A;
  --mint: #1B3A2D; --mint-ink: #7FC8A5; --gold: #2E2A1E; --gold-ink: #D9C9A0; --rose: #3A2226; --rose-ink: #E08A96;
  --sky: #262C34; --sky-ink: #C9C4B6; --lav: #262C34; --lav-ink: #C9C4B6; --peach: #262C34; --peach-ink: #C9C4B6; --mark: #3A3320;
  --paper: #181D24; --paper-ink: #FBFAF7; --focus: 0 0 0 3px rgba(201,185,143,.45); }

/* chrome: hairlines and space, not boxes and blur */
html[data-design="d3"] body { font-size: 15px; }
html[data-design="d3"] .mist { display: none; }
html[data-design="d3"] .side { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-design="d3"] .brand b { font-weight: 600; letter-spacing: -.5px; }
html[data-design="d3"] .brand small, html[data-design="d3"] .nav-sec, html[data-design="d3"] .eyebrow, html[data-design="d3"] .fgroup h4 { font-family: var(--font-mono); letter-spacing: 1.5px; font-size: 10.5px; }
html[data-design="d3"] .nav a { border-radius: 8px; font-weight: 500; }
html[data-design="d3"] .card { box-shadow: none; border-radius: var(--r-lg); }
html[data-design="d3"] .mini-search input { border-radius: 10px; background: var(--surface); }
html[data-design="d3"] .btn, html[data-design="d3"] .chip, html[data-design="d3"] .seg, html[data-design="d3"] .seg button, html[data-design="d3"] .tabs button, html[data-design="d3"] .find input { border-radius: 8px; }
html[data-design="d3"] .seg { padding: 3px; background: var(--surface-3); }
html[data-design="d3"] .seg button.on { box-shadow: none; }
html[data-design="d3"] .pill { border-radius: 4px; font-weight: 500; font-size: 12px; letter-spacing: .2px; }
html[data-design="d3"] .h1 { font-weight: 500; letter-spacing: -1px; line-height: 1.05; font-size: clamp(30px, 3.8vw, 52px); }
html[data-design="d3"] .h2 { letter-spacing: -.5px; }
html[data-design="d3"] .cite, html[data-design="d3"] .cite-tag, html[data-design="d3"] .case-row .c1, html[data-design="d3"] .jhead .c, html[data-design="d3"] .r-meta .cite, html[data-design="d3"] .num { font-family: var(--font-mono); font-weight: 500; }
html[data-design="d3"] .court-line { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; }
html[data-design="d3"] .panel-title { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; }
html[data-design="d3"] .tabs { gap: 0; border-bottom: 1px solid var(--line); padding: 0; background: var(--bg); }
html[data-design="d3"] .tabs button { border-radius: 0; min-height: 44px; padding: 0 14px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
html[data-design="d3"] .tabs button.on { background: transparent; color: var(--ink); border-bottom-color: var(--ink); }
html[data-design="d3"] .tabs button .n { font-family: var(--font-mono); font-size: 12px; }
/* search: a list set in rules, with one dark element */
html[data-design="d3"] .result { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 16px 4px 18px; }
html[data-design="d3"] .result:hover { background: var(--surface); }
html[data-design="d3"] .result.active { box-shadow: inset 3px 0 0 var(--ink); background: var(--surface); }
html[data-design="d3"] .r-title { font-size: clamp(19px, 1.9vw, 22px); line-height: 1.25; letter-spacing: -.2px; }
html[data-design="d3"] .r-meta { font-size: 13px; }
html[data-design="d3"] .r-snip { font-family: var(--font-read); font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
html[data-design="d3"] .fgroup { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 2px; background: transparent; }
html[data-design="d3"] .completeness { border-radius: 0; border-left: 3px solid var(--brass); background: var(--surface); color: var(--ink-2); }
html[data-design="d3"] .res-head .h1 { font-size: clamp(26px, 2.8vw, 34px); }
/* the judgment page */
html[data-design="d3"] .cite-tag { border-radius: 6px; font-size: 14px; }
html[data-design="d3"] .reported { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html[data-design="d3"] .paper { background: var(--paper); box-shadow: none; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 4vw, 60px); }
html[data-design="d3"] .para { font: 400 clamp(17px, 1.65vw, 19.5px)/1.65 var(--font-read); text-align: left; hyphens: none; color: var(--paper-ink); }
html[data-design="d3"] .jhead { color: var(--ink-2); }
html[data-design="d3"] .hn { font-family: var(--font-read); }
html[data-design="d3"] .status-label { font-size: clamp(22px, 2vw, 28px); letter-spacing: -.3px; }
html[data-design="d3"] .shape.tone-good { background: var(--t-good); color: #fff; } html[data-design="d3"] .shape.tone-adverse { background: var(--t-adverse); color: #fff; }
html[data-design="d3"] .shape.tone-quiet, html[data-design="d3"] .shape.tone-neutral { background: var(--surface-3); color: var(--muted); }
html[data-design="d3"] .count-row .pill { background: transparent; padding-left: 0; color: var(--ink-2); }
html[data-design="d3"] .count-row .pill .dot { width: 9px; height: 9px; }
html[data-design="d3"] .count-row .pill.tone-good .dot { background: var(--t-good); } html[data-design="d3"] .count-row .pill.tone-adverse .dot { background: var(--t-adverse); border-radius: 2px; transform: rotate(45deg); }
html[data-design="d3"] .count-row .pill.tone-neutral .dot { background: var(--t-neutral); } html[data-design="d3"] .count-row .pill.tone-quiet .dot { background: var(--t-quiet); }
html[data-design="d3"] .side-card .card { background: var(--surface); }
html[data-design="d3"] .map-card .h3 { font-size: 22px; }
html[data-design="d3"] .thread text { font-family: var(--font-mono); }
html[data-design="d3"] .pane { border-radius: var(--r-lg); }
html[data-design="d3"] .tile, html[data-design="d3"] .stat { box-shadow: none; }

/* Codex V01 — Research workspace. Appearance changes colours, never research semantics. */
html[data-design="studio"], html[data-design="counsel"], html[data-design="observatory"] {
  --font-display: "Newsreader", Georgia, serif;
  --font-read: "Source Serif 4", Georgia, serif;
  --font-ui: "Instrument Sans", -apple-system, system-ui, sans-serif;
  --side: 204px; --pad: clamp(20px, 2.1vw, 34px);
  --r-xs: 5px; --r-sm: 7px; --r-md: 9px; --r-lg: 12px; --r-xl: 14px;
  --mist-o: 0; --shadow-1: 0 1px 3px rgba(24,46,78,.035); --shadow-2: 0 12px 32px rgba(24,46,78,.08);
  --bg: #FFFFFF; --bg-2: #F6F9FD; --surface: #FFFFFF; --surface-2: #F5F9FE; --surface-3: #EAF2FB;
  --ink: #172640; --ink-2: #344762; --muted: #61748E; --faint: #73839A;
  --line: #E0E8F2; --line-2: #C6D5E7; --paper: #FFFFFF; --paper-ink: #172640;
  --brass: #176AC0; --brass-ink: #155FAF; --brass-soft: #EAF3FE;
  --nav: #15324F; --on-nav: #FFFFFF; --sky: #EAF3FE; --sky-ink: #155FAF;
  --lav: #EDF3FA; --lav-ink: #365477; --mint: #E6F3EC; --mint-ink: #237151;
  --peach: #FFF1E8; --peach-ink: #975525; --gold: #FFF4DE; --gold-ink: #87601E;
  --rose: #FBEAEB; --rose-ink: #9A3D44; --mark: #E4EFFC;
  --rail-bg: #192940; --rail-ink: #E3EBF5; --rail-muted: #A8B9CF; --rail-active: #163C64;
  --focus: 0 0 0 3px rgba(23,106,192,.28); color-scheme: light;
}
html[data-design="counsel"] {
  --bg: #FFFFFF; --bg-2: #F6F9F7; --surface-2: #F5F9F7; --surface-3: #EAF3EE;
  --ink: #233B34; --ink-2: #3E554D; --muted: #63796F; --faint: #748A80;
  --line: #DFE8E3; --line-2: #C6D8CC; --paper-ink: #233B34;
  --brass: #16785E; --brass-ink: #136D55; --brass-soft: #E5F3EC;
  --nav: #16785E; --sky: #E5F3EC; --sky-ink: #136D55; --lav: #EDF4EF; --lav-ink: #3E554D;
  --mark: #DFEEE5; --rail-bg: #F6F9F7; --rail-ink: #233B34; --rail-muted: #677D72; --rail-active: #E0EFE6;
  --focus: 0 0 0 3px rgba(22,120,94,.25);
}
html[data-design="observatory"] {
  --bg: #101B2A; --bg-2: #142233; --surface: #172638; --surface-2: #1B2D40; --surface-3: #20374B;
  --ink: #E7EFF8; --ink-2: #CBD7E6; --muted: #A1B4C9; --faint: #8EA5BD;
  --line: #2A4057; --line-2: #3E5871; --paper: #172638; --paper-ink: #E7EFF8;
  --brass: #58D3C9; --brass-ink: #79E4DA; --brass-soft: #173C40;
  --nav: #58D3C9; --on-nav: #102932; --sky: #173C40; --sky-ink: #79E4DA;
  --lav: #223750; --lav-ink: #B9CDE3; --mint: #163E36; --mint-ink: #92D9B9;
  --peach: #433326; --peach-ink: #E3B691; --gold: #42391F; --gold-ink: #E4CC8F;
  --rose: #442C39; --rose-ink: #F0AFBA; --mark: #1D4850;
  --rail-bg: #0C1725; --rail-ink: #DCE8F4; --rail-muted: #9DB2C8; --rail-active: #193C49;
  --focus: 0 0 0 3px rgba(88,211,201,.28); color-scheme: dark;
}
html:is([data-design="studio"],[data-design="counsel"],[data-design="observatory"]) .mist { display: none; }
.side { background: var(--rail-bg, var(--surface)); color: var(--rail-ink, var(--ink)); backdrop-filter: none; padding-inline: 12px; }
.side .brand { padding: 2px 10px 20px; flex-wrap: wrap; gap: 5px; }
.side .brand b { color: var(--brass); font-size: 34px; }
.side .brand small { color: var(--rail-muted, var(--muted)); font-size: 9px; letter-spacing: 1.4px; }
.side .nav-sec { color: var(--rail-muted, var(--faint)); margin-top: 12px; font-size: 9px; letter-spacing: 1.7px; }
.side .nav a { color: var(--rail-ink, var(--ink-2)); min-height: 40px; font-size: 14px; border-radius: 6px; }
.side .nav a:hover, .side .nav a[aria-current="page"] { background: var(--rail-active, var(--nav)); color: var(--rail-ink, var(--on-nav)); }
.side .nav a[aria-current="page"] { box-shadow: inset 3px 0 var(--brass); }
.side .nav a[aria-current="page"] svg { color: var(--brass); }
.side-foot { border-color: color-mix(in srgb, var(--rail-muted) 24%, transparent); }
.side-foot .who span { color: var(--rail-muted); }
.side-foot .icon-btn { background: transparent; color: var(--rail-ink); border-color: transparent; width: 32px; height: 32px; }
.side-foot .avatar { width: 30px; height: 30px; background: var(--rail-active); color: var(--rail-ink); }
.side-foot .who b { font-size: 12px; }
.side-foot .who span { font-size: 11px; }
.topbar { border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 24px; min-height: 60px; }
.mini-search { max-width: 740px; }
.mini-search input { border-radius: 7px; box-shadow: none; background: var(--surface); }
.appearance-switch { flex: none; }
.appearance-switch select { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 9px 30px 9px 12px; font-size: 13px; min-height: 40px; max-width: 180px; color: var(--ink-2); }
.card { box-shadow: none; }
.btn { border-radius: 6px; }
.btn.primary { background: var(--brass-ink); border-color: var(--brass-ink); color: #FFFFFF; }
html[data-design="observatory"] .btn.primary { color: #102932; }
.h1 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.65px; }
.palettes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.palette.on { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); background: var(--surface-2); }
.research-intro { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.research-intro .h1 { font-size: 32px; }
.coverage-details { font-size: 12px; color: var(--muted); padding: 10px 0; }
.coverage-details summary { cursor: pointer; color: var(--muted); }
.coverage-details p { padding-top: 7px; max-width: 80ch; }
.results-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 26px; }
.results-layout.filters-hidden, .results-layout.filters-hidden.split { grid-template-columns: minmax(0, 1fr); }
.filters-hidden .filters-col { display: none; }
.refine-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 12px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.filters-col { gap: 16px; }
.filters-col .fgroup { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 16px; box-shadow: none; }
.research-results { min-width: 0; }
.research-results .relevance-result { position: relative; display: block; padding: 20px 8px 21px 42px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: none; }
.research-results .relevance-result:hover { background: var(--surface-2); }
.result-heading { min-width: 0; }
.result-number { position: absolute; top: 22px; left: 2px; width: 28px; height: 28px; display: grid; place-items: center; background: var(--surface-3); border-radius: 50%; font-size: 13px; font-weight: 600; }
.result-heading .r-title { font-size: clamp(22px, 2vw, 28px); margin: 6px 0 12px; line-height: 1.15; letter-spacing: -.3px; }
.result-heading a:hover .r-title { color: var(--brass-ink); }
.relevance-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(150px, .65fr); gap: 18px; background: var(--surface-2); border-radius: 5px; padding: 13px 15px; margin-bottom: 12px; font-size: 13px; }
.relevance-grid > * { min-width: 0; }
.relevance-grid > * + * { border-left: 1px solid var(--line-2); padding-left: 18px; }
.relevance-grid .eyebrow, .relevance-grid .small-label { color: var(--brass-ink); font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; margin-bottom: 4px; }
.relevance-proposition { font-weight: 600; }
.relevance-reason { color: var(--ink-2); }
.relevance-source { color: var(--muted); font-size: 12px; }
.research-quote { font: italic 16px/1.5 var(--font-read); color: var(--ink-2); max-width: 85ch; margin: 6px 0 12px; }
.result-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.result-footer .btn { min-height: 34px; padding: 6px 13px; font-size: 13px; }
.result-footer .linkish { text-decoration: none; font-size: 13px; }
@media (min-width: 1180px) { .filters-btn { display: inline-flex !important; } }
@media (min-width: 700px) and (max-width: 1179px) { .side .brand b { font-size: 24px; } .side .brand small, .side .who { display: none; } .side .nav a { font-size: 10px; } .side-foot .icon-btn { width: 28px; height: 28px; } }
@media (max-width: 1179px) { .results-layout, .results-layout.split { grid-template-columns: minmax(0, 1fr); } .relevance-grid { grid-template-columns: 1fr 1fr; } .relevance-source { grid-column: 1 / -1; } .relevance-grid > .relevance-source { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 9px; } }
@media (max-width: 699px) { .research-results .relevance-result { padding: 18px 0 18px 35px; } .result-number { width: 24px; height: 24px; font-size: 12px; } .relevance-grid { grid-template-columns: 1fr; gap: 9px; padding: 12px; } .relevance-grid > * + * { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 9px; } .result-heading .r-title { font-size: 23px; } .result-footer { justify-content: flex-start; gap: 8px; } .palettes { grid-template-columns: 1fr; } .research-intro .h1 { font-size: 27px; } .appearance-switch select { max-width: 150px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* Layout and colour are deliberately independent: nine combinations. */
html { --accent: var(--brass-ink); }
.appearance-switch { display: flex; align-items: center; gap: 6px; }
.switch-caption { font-size: 11px; color: var(--muted); }
.appearance-switch select { max-width: 160px; }
@media (min-width: 1180px) {
  html[data-layout="comparison"] .research-results .relevance-result { display: grid; grid-template-columns: minmax(155px, .75fr) minmax(230px, 1.4fr) minmax(190px, .9fr); gap: 12px 22px; padding: 24px 8px 24px 42px; }
  html[data-layout="comparison"] .result-heading { grid-column: 1; grid-row: 1 / 4; padding-right: 16px; border-right: 1px solid var(--line); }
  html[data-layout="comparison"] .result-heading .r-title { font-size: 24px; line-height: 1.15; }
  html[data-layout="comparison"] .relevance-grid { display: contents; }
  html[data-layout="comparison"] .relevance-proposition { grid-column: 2; grid-row: 1 / 4; background: var(--surface-2); border-radius: 5px; padding: 13px 16px; }
  html[data-layout="comparison"] .relevance-reason { grid-column: 3; grid-row: 1; border: 0; padding-left: 0; }
  html[data-layout="comparison"] .relevance-source { grid-column: 3; grid-row: 2; border: 0; padding: 0; }
  html[data-layout="comparison"] .result-footer { grid-column: 3; grid-row: 3; justify-content: flex-start; margin-top: 0; }
}
@media (min-width: 700px) {
  html[data-layout="counsel"] .shell { display: block; }
  html[data-layout="counsel"] .side { position: sticky; top: 0; z-index: 25; height: auto; display: flex; flex-direction: row; align-items: center; padding: 10px 24px; gap: 24px; border-bottom: 1px solid var(--line); border-right: 0; overflow: visible; }
  html[data-layout="counsel"] .side .brand { padding: 0; flex: none; }
  html[data-layout="counsel"] .side .brand b { font-size: 28px; }
  html[data-layout="counsel"] .side .brand small, html[data-layout="counsel"] .nav-sec, html[data-layout="counsel"] .side-foot { display: none; }
  html[data-layout="counsel"] .side .nav { min-width: 0; display: flex; flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: thin; }
  html[data-layout="counsel"] .side .nav a { flex: none; gap: 6px; min-height: 36px; padding: 6px 10px; font-size: 12px; }
  html[data-layout="counsel"] .side .nav a .lbl { display: inline; }
  html[data-layout="counsel"] .side .nav a svg { width: 15px; height: 15px; }
  html[data-layout="counsel"] .research-results .relevance-result { padding-top: 28px; padding-bottom: 28px; }
  html[data-layout="counsel"] .result-heading .r-title { font-size: 29px; }
}
@media (max-width: 1179px) { .switch-caption { display: none; } .appearance-switch select { max-width: 135px; font-size: 12px; padding-inline: 7px; } .topbar { gap: 8px; } }

/* Source-first search refinements */
.research-quote { margin-left:0;margin-right:0; font-weight:400; }
.extract-label { margin-top:12px; }
.relevance-source a { display:flex;align-items:center;gap:5px;margin-top:6px; }
.relevance-source svg,.result-footer svg { display:inline-block;width:14px;height:14px;vertical-align:middle; }
.relevance-source .source-treatment { color:var(--muted); font-size:12px; }
.result-heading .r-meta { font-size:12px;gap:6px 10px; }
.result-heading .r-title { font-family:var(--font-display); }
.research-results .result.active { box-shadow:inset 3px 0 var(--brass); }
.refine-heading {display:flex;justify-content:space-between;gap:12px;padding:0 0 18px;border-bottom:1px solid var(--line);margin-bottom:18px;font-size:14px;}
.refine-heading span {font-size:12px;color:var(--muted);}
.filters-hidden .filters-col {display:none !important;}
@media(min-width:1180px){.results-layout.filters-hidden{grid-template-columns:minmax(0,1fr);}.results-layout.filters-hidden.split{grid-template-columns:minmax(0,1fr) minmax(380px,1fr);}}
@media(min-width:1180px){html[data-layout="comparison"] .research-results .relevance-result {grid-template-columns:minmax(170px,.85fr) minmax(240px,1.45fr) minmax(190px,1fr);}}

html[data-design="studio"] .side .brand b { color:#82B6FF; }
html[data-design="studio"] .side .nav a[aria-current="page"] svg { color:#82B6FF; }

.relevance-grid {font-size:14px;}

/* Privacy and AI (Phase 3) */
.privacy ul { margin: 6px 0 0 18px; padding: 0; } .privacy li { margin: 3px 0; }
.privacy .tbl { border-collapse: collapse; width: 100%; } .privacy .tbl th, .privacy .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.privacy .mono, .pv-pre { font-family: ui-monospace, Menlo, monospace; }
.pv-pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; font-size: 12px; background: var(--surface-2, rgba(0,0,0,.04)); padding: 10px 12px; border-radius: 8px; }
.send-ok { align-items: flex-start; } .send-ok span { font-size: 13.5px; line-height: 1.45; }
.scroll-x { overflow-x: auto; }
