/* Virginia School Law: reading-first news layout */
:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --ink: #17202f;
  --ink-2: #4a5466;
  --ink-3: #6b7486;
  --rule: #e6e2da;
  --rule-2: #efece6;
  --navy: #14233f;
  --accent: #1f4f99;
  --accent-soft: #e8eef8;
  --court: #6b3fa0;   --court-bg: #f1ebf8;
  --gov: #0f6b5c;     --gov-bg: #e5f3ef;
  --news: #8a4b12;    --news-bg: #f8eee3;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 46rem;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f141c; --surface: #151b25; --ink: #e8ebf0; --ink-2: #b4bcc9; --ink-3: #8a93a3;
    --rule: #263042; --rule-2: #1d2532; --navy: #0b1220; --accent: #8db4f0; --accent-soft: #1b2840;
    --court: #c4a6ea; --court-bg: #2a2140; --gov: #7fd2bf; --gov-bg: #15302b; --news: #e6b483; --news-bg: #33251a;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.preview-banner { background: #fff4d6; color: #5a4300; text-align: center; font-size: .85rem; padding: .45rem 1rem; border-bottom: 1px solid #f0dc9c; }

/* Masthead */
.masthead { background: var(--navy); color: #fff; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; max-width: 64rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; min-width: 0; }
.brand-mark { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 8px; background: #fff; color: var(--navy); font: 700 1.35rem/1 var(--serif); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 700 1.25rem/1.15 var(--serif); letter-spacing: -.01em; }
.brand-tag { font-size: .78rem; color: #b9c4d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: .25rem; flex: none; }
.nav a { color: #d6deeb; text-decoration: none; font-size: .9rem; font-weight: 500; padding: .4rem .65rem; border-radius: 6px; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
@media (max-width: 640px) {
  .brand-tag, .nav-rss, .nav-home { display: none; }
  .brand-name { font-size: 1.1rem; white-space: nowrap; }
  .brand-mark { width: 2rem; height: 2rem; font-size: 1.2rem; }
  .nav a { padding: .4rem .5rem; }
}

/* Hero */
.hero { padding-top: 2.75rem; padding-bottom: 1.5rem; }
.hero h1 { font: 700 clamp(1.9rem, 4.6vw, 2.6rem)/1.12 var(--serif); letter-spacing: -.02em; margin: 0 0 .6rem; }
.lede { font-size: 1.125rem; color: var(--ink-2); margin: 0; max-width: 38rem; }
.eyebrow { margin: 0 0 .4rem; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.eyebrow a { text-decoration: none; }
.updated { display: flex; align-items: center; gap: .5rem; margin: 1rem 0 0; font-size: .85rem; color: var(--ink-3); }
.pulse { width: .5rem; height: .5rem; border-radius: 50%; background: #2fa36b; box-shadow: 0 0 0 0 rgba(47,163,107,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(47,163,107,0); } 100% { box-shadow: 0 0 0 0 rgba(47,163,107,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* Section labels */
.section-label, .day-label {
  font: 600 .75rem/1 var(--sans); text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3);
  margin: 0 0 .9rem; display: flex; align-items: center; gap: .75rem;
}
.section-label::after, .day-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* Key developments */
.key { margin-top: 1rem; margin-bottom: 2rem; }
.key-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.key-card { min-width: 0; }
@media (min-width: 720px) { .key-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.key-card { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.2rem; }
.key-card.kind-court { border-top-color: var(--court); }
.key-card.kind-government { border-top-color: var(--gov); }
.key-card.kind-news { border-top-color: var(--news); }
.key-card h3 { font: 600 1.2rem/1.3 var(--serif); margin: .35rem 0 .5rem; }
.key-card h3 a { color: var(--ink); text-decoration: none; }
.key-card h3 a:hover { color: var(--accent); }
.key-card .summary { font-size: .95rem; margin: 0; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.key-card .meta { flex-wrap: nowrap; white-space: nowrap; }
.key-card .meta .src { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (min-width: 720px) { .key-card:first-child:nth-last-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 719px) { .key-card .summary { display: none; } .key-card { padding: .9rem 1rem; } .key-card h3 { font-size: 1.08rem; margin-bottom: 0; } }

/* Filters */
.filters { padding: .25rem 0 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--rule); display: grid; gap: .65rem; }
.search { position: relative; }
.search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { width: 100%; font: inherit; font-size: 1rem; padding: .65rem .9rem .65rem 2.4rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seg { display: inline-flex; background: var(--rule-2); border-radius: 999px; padding: 3px; width: max-content; max-width: 100%; overflow-x: auto; }
.seg button { font: 500 .85rem/1 var(--sans); border: 0; background: transparent; color: var(--ink-2); padding: .5rem .9rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .chips { flex-wrap: wrap; overflow: visible; } }
.chip, .tag { font: 500 .8rem/1 var(--sans); border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); padding: .45rem .7rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.chip:hover, .tag:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"] { color: #0f141c; } }

/* Feed */
.day { margin-bottom: 1.75rem; }
.item { padding: 1.1rem 0 1.2rem; border-bottom: 1px solid var(--rule-2); }
.item:last-child { border-bottom: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: .8rem; color: var(--ink-3); }
.badge { font: 600 .68rem/1 var(--sans); text-transform: uppercase; letter-spacing: .07em; padding: .32rem .5rem; border-radius: 5px; }
.badge-court { color: var(--court); background: var(--court-bg); }
.badge-government { color: var(--gov); background: var(--gov-bg); }
.badge-news { color: var(--news); background: var(--news-bg); }
.src { font-weight: 500; color: var(--ink-2); }
.ai-note { font-size: .72rem; color: var(--ink-3); border: 1px dashed var(--rule); border-radius: 4px; padding: .1rem .35rem; }
.headline { font: 600 1.28rem/1.32 var(--serif); letter-spacing: -.005em; margin: .45rem 0 .4rem; }
.headline a { color: var(--ink); text-decoration: none; }
.headline a:hover { color: var(--accent); text-decoration: underline; }
.ext { font: 400 .85em var(--sans); color: var(--ink-3); margin-left: .3rem; }
.summary { margin: 0 0 .6rem; color: var(--ink-2); max-width: 40rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 0; }
.tag { font-size: .74rem; padding: .32rem .55rem; background: transparent; }
.result-note { font-size: .9rem; color: var(--ink-3); margin: -.25rem 0 1rem; }
.empty { background: var(--surface); border: 1px dashed var(--rule); border-radius: var(--radius); padding: 1.5rem; color: var(--ink-2); }
.more-wrap { text-align: center; margin: 1rem 0 2rem; }
.more { font: 600 .9rem/1 var(--sans); background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 999px; padding: .75rem 1.4rem; cursor: pointer; }
.more:hover { border-color: var(--accent); color: var(--accent); }
.archive-link { text-align: center; font-size: .95rem; margin-bottom: 3rem; }

/* Archive + prose */
.month-list { list-style: none; padding: 0; margin: 0 0 3rem; border-top: 1px solid var(--rule); }
.month-list a { display: flex; justify-content: space-between; padding: 1rem .25rem; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font: 600 1.15rem var(--serif); }
.month-list a:hover { color: var(--accent); }
.count { font: 400 .9rem var(--sans); color: var(--ink-3); }
.prose { padding-bottom: 3rem; }
.prose h2 { font: 600 1.35rem/1.3 var(--serif); margin: 2rem 0 .5rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: .4rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); padding: 2rem 0 2.5rem; margin-top: 2rem; }
.disclaimer { font-size: .88rem; color: var(--ink-2); margin: 0 0 1rem; }
.fine { font-size: .8rem; color: var(--ink-3); margin: .25rem 0; }
.fine a { color: inherit; }
