/* Shared Forma Pauperis identity. System fonts only; no remote assets. */
html:root:has(body[data-site-theme="editorial"]){
  color-scheme:light;
  --bg:#faf7f1;--bg-2:#f2ebe2;--line:#d9cec1;
  --text:#28241f;--text-2:#595047;--text-3:#6c5f54;
  --accent:#a63f30;--accent-ink:#fffaf5;--focus:#804a0b;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --mono:ui-monospace,"SFMono-Regular",Consolas,monospace;
}
html:root[data-ui-theme="dark"],html:root:has(body[data-site-theme="editorial"] #theme-dark:checked){
  color-scheme:dark;
  --bg:#211e1b;--bg-2:#2c2722;--line:#51463c;
  --text:#f7eee3;--text-2:#d2c4b5;--text-3:#bfb09e;
  --accent:#f49b85;--accent-ink:#211e1b;--focus:#ffd487;
}
body[data-site-theme="editorial"]{background:var(--bg);color:var(--text);font-family:var(--serif);font-size:18px;line-height:1.6}
body[data-site-theme] main{width:100%;max-width:66rem;margin:0 auto;padding:0 1.5rem 3rem;gap:3rem;min-width:0}
body[data-site-theme] main>*,body[data-site-theme] .body{min-width:0}
body[data-site-theme] .page-head{padding-bottom:2rem;border-bottom:1px solid var(--line)}
body[data-site-theme] .masthead{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:72px;border-bottom:1px solid var(--line)}
body[data-site-theme] .wordmark{display:inline-flex;align-items:center;gap:.5rem;min-width:0;min-height:44px;font:.8rem/1.5 var(--mono);letter-spacing:.12em;text-transform:uppercase;text-decoration:none;color:var(--text)}
body[data-site-theme] .brand-mark{display:block;flex:none;width:40px;height:40px;object-fit:contain}
body[data-site-theme] .brand-name{min-width:0}
body[data-site-theme] .theme-control{display:flex;align-items:center;gap:.5rem;min-height:44px;font:.8rem/1.4 var(--sans);cursor:pointer;color:var(--text-2)}
body[data-site-theme] .theme-control input{width:1.1rem;height:1.1rem;accent-color:var(--accent)}
body[data-site-theme] .theme-control input:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
body[data-site-theme] .tabs{position:relative;display:flex;flex-wrap:wrap;gap:0 .25rem;margin:0;padding:.25rem 0;border-bottom:1px solid var(--line);font:.8rem/1.5 var(--sans)}
body[data-site-theme] .tabs .t{min-height:44px}
body[data-site-theme] .tabs details.t{position:static}
body[data-site-theme] .tabs details.t div{left:auto;right:0;top:100%;width:min(100%,34rem);min-width:0;max-width:100%;background:var(--bg);border-color:var(--line)}
body[data-site-theme] .tabs details.t div a{min-height:44px;overflow-wrap:anywhere}
body[data-site-theme] .kicker{font:.75rem/1.5 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--accent);margin:2.5rem 0 0}
body[data-site-theme] .meta{font:.85rem/1.6 var(--sans);color:var(--text-3);margin:.85rem 0 0}
body[data-site-theme] .lede{font-size:1.2rem;color:var(--text-2);max-width:65ch}
body[data-site-theme]:not([data-page-kind="home"]) h1{display:block;max-width:20ch;font-family:var(--serif);font-size:clamp(2rem,4.5vw,3.5rem);font-weight:500;line-height:1.12;letter-spacing:-.035em;margin-top:1.25rem;color:var(--text)}
body[data-site-theme]:not([data-page-kind="home"]) h1 .plain{display:block;max-width:65ch;font-size:1.125rem;line-height:1.5;font-weight:400;letter-spacing:0;color:var(--text-2);margin-top:1rem;text-wrap:pretty}
body[data-site-theme] h2{font-family:var(--serif);font-size:clamp(1.7rem,3.5vw,2.5rem);font-weight:500;line-height:1.2;color:var(--text)}
body[data-site-theme] h3{font-family:var(--serif);font-weight:600}
body[data-site-theme] a{color:var(--accent)}
body[data-site-theme] a:focus-visible,body[data-site-theme] summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
body[data-site-theme] .button{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;min-height:48px;background:var(--accent);color:var(--accent-ink);font:.8rem/1.4 var(--mono);letter-spacing:.04em;padding:1rem 1.5rem;border:1px solid var(--accent);border-radius:2rem;box-shadow:none;text-decoration:none}
body[data-site-theme] .button.secondary{background:transparent;color:var(--text);border-color:var(--text-3)}
body[data-site-theme] .button:hover{text-decoration:underline}
body[data-site-theme] .biglinks>li>a,body[data-site-theme] .sources>li>a{font-family:var(--serif);font-size:1.4rem;font-weight:500;color:var(--text)}
body[data-site-theme] .index a{font-weight:500;min-height:48px}
body[data-site-theme] .offices dt,body[data-site-theme] .note,body[data-site-theme] .disclaimer,body[data-site-theme] .toggle-row,body[data-site-theme] .codenav,body[data-site-theme] footer{font-family:var(--sans)}
body[data-site-theme] .rule,body[data-site-theme] .callout{border-radius:0;border-left:2px solid var(--accent)}
body[data-site-theme] .rule cite{font-family:var(--sans)}
body[data-site-theme] .track-section{border-top:1px solid var(--line)}
body[data-site-theme] .chooser h3{font-family:var(--mono);font-size:.8rem;color:var(--accent)}
body[data-site-theme] .lines .name{font-family:var(--serif);font-size:1.35rem;font-weight:500}
body[data-site-theme] .lines .tag,body[data-site-theme] .station .num,body[data-site-theme] .stops .n{font-family:var(--mono);color:var(--accent-ink)}
body[data-site-theme] .rulelist{font-family:var(--serif)}
body[data-site-theme] .rulelist a{display:inline-block;min-height:44px;padding:.45rem 0;font-weight:500}
body[data-site-theme] .railmap .num{fill:var(--accent-ink)}
body[data-site-theme] .railmap .branch-node+.num{fill:var(--bg)}
body[data-site-theme] [hidden]{display:none!important}
body[data-site-theme] #rule-finder{max-width:44rem}
body[data-site-theme] #rule-finder label{display:block;font-family:var(--sans);margin-bottom:.5rem}
body[data-site-theme] #rule-query{width:100%;min-width:0;min-height:48px;padding:.7rem;font:1rem var(--sans);color:var(--text);background:var(--bg);border:1px solid var(--text-3);border-radius:.25rem}
body[data-site-theme] #rule-query:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
body[data-site-theme] #rule-status{font: .9rem/1.5 var(--sans);color:var(--text-2);margin:.75rem 0}
body[data-site-theme] #rule-parts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.25rem;margin:0;font:.875rem var(--sans)}
body[data-site-theme] #rule-parts li{margin:0;padding:0}
body[data-site-theme] #rule-parts a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:.25rem}
body[data-site-theme] .rule-part>.toc{padding:.5rem 1rem}
body[data-site-theme] .reading{overflow-wrap:anywhere}
body[data-site-theme] .plainview .d1{margin-left:1rem}
body[data-site-theme] .plainview .d2{margin-left:2rem}
body[data-site-theme] .plainview .d3,body[data-site-theme] .plainview .d4{margin-left:3rem}
body[data-site-theme] details.more summary{min-height:48px;font-weight:500}
body[data-site-theme] .toggle{border-radius:1.5rem;font-family:var(--sans)}
body[data-site-theme] .code .op-duty{color:#a63f30}
body[data-site-theme] .code .op-may{color:#643580}
body[data-site-theme]:has(#theme-dark:checked) .code .op-duty{color:#f49b85}
body[data-site-theme]:has(#theme-dark:checked) .code .op-may{color:#d5a6ed}
body[data-site-theme] footer{font-size:.85rem;gap:.5rem 1.25rem}
body[data-site-theme] footer a{color:var(--text-3)}
@media(min-width:40rem){body[data-site-theme] main{padding:0 3rem 4rem;gap:4rem}}
@media(max-width:480px){
  body[data-site-theme]:not([data-page-kind="home"]){font-size:17px}
  body[data-site-theme]:not([data-page-kind="home"]) .kicker{margin-top:1.5rem}
  body[data-site-theme]:not([data-page-kind="home"]) .lede{font-size:1.0625rem}
  body[data-site-theme] .tabs details.t div{columns:auto;display:block;max-height:60vh;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
  body[data-site-theme] details.more summary{flex-wrap:wrap}
  body[data-site-theme] details.more summary small{margin-left:1.2rem;padding-left:0;white-space:normal}
  body[data-site-theme] .offices dd,body[data-site-theme] .writ dd{overflow-wrap:anywhere}
}
@media print{
  html:root:has(body[data-site-theme]),html:root:has(body[data-site-theme] #theme-dark:checked){--bg:#fff;--bg-2:#fff;--text:#000;--text-2:#222;--text-3:#333;--accent:#000;--accent-ink:#fff;--line:#999}
  body[data-site-theme] .masthead,body[data-site-theme] .tabs{display:none}
  body[data-site-theme] main{max-width:none;padding:0;gap:1.2rem}
  body[data-site-theme] .page-head{padding-bottom:1rem}
  body[data-site-theme] .kicker{margin-top:0}
}
