/* ============================================================
   The CUSS Handbook — "terminal signage editorial"
   Deliberately unrelated to the original site's design system.
   No animation libraries. No scroll-reveal. Nothing that can
   leave content stuck at opacity:0.
   ============================================================ */

:root{
  --ink:#161b1f;
  --ink-soft:#414a51;
  --ink-faint:#6b757c;
  --paper:#f6f3ec;
  --paper-2:#efeade;
  --slate:#12181c;
  --slate-2:#1c252b;
  --amber:#d9862a;
  --amber-lift:#f0a444;
  --teal:#2f6f7c;
  --rule:#d5cec0;
  --rule-dark:#2b353c;
  --measure:68ch;
  --sans:"Source Sans 3","Segoe UI",system-ui,-apple-system,Helvetica,Arial,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:18px;
  line-height:1.7;
  font-weight:400;
  overflow-x:hidden;
}
img{max-width:100%;height:auto;display:block;}

.skip{position:absolute;left:-9999px;top:0;background:var(--amber);color:var(--slate);padding:.6rem 1rem;z-index:200;font-weight:600;}
.skip:focus{left:0;}

/* ---------- header / nav ---------- */
.site-head{
  background:var(--slate);
  color:var(--paper);
  border-bottom:3px solid var(--amber);
  position:sticky;      /* never fixed — a fixed bar can cover content */
  top:0;
  z-index:50;
}
.head-inner{
  max-width:1180px;margin:0 auto;padding:.85rem 1.25rem;
  display:flex;flex-wrap:wrap;align-items:baseline;gap:.6rem 1.5rem;
  min-width:0;                /* nav-overflow guard */
}
.brand{display:flex;flex-direction:column;min-width:0;text-decoration:none;color:inherit;flex:0 0 auto;}
.brand .mark{font-size:1.18rem;font-weight:700;letter-spacing:.01em;line-height:1.2;color:var(--paper);}
.brand .eyebrow{font-family:var(--mono);font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;color:var(--amber);}

.nav{
  display:flex;flex-wrap:wrap;          /* wraps — never clipped past the viewport */
  gap:.15rem .95rem;
  margin-left:auto;
  min-width:0;
  list-style:none;padding:0;
}
.nav a{
  color:#cfd6da;text-decoration:none;font-size:.85rem;
  padding:.2rem 0;border-bottom:2px solid transparent;white-space:nowrap;
}
.nav a:hover,.nav a:focus{color:#fff;border-bottom-color:var(--amber);}
.nav a[aria-current="page"]{color:var(--amber-lift);border-bottom-color:var(--amber);}

/* ---------- layout ---------- */
main{display:block;}
.wrap{max-width:1180px;margin:0 auto;padding:0 1.25rem;}
main .wrap{max-width:940px;}   /* reading measure — keeps the prose column optically centred */
.prose{max-width:var(--measure);}
.page{padding:3rem 0 4rem;}

/* ---------- hero ---------- */
.hero{background:var(--slate-2);color:var(--paper);border-bottom:1px solid var(--rule-dark);}
.hero-figure{margin:0;position:relative;}
.hero-figure img{width:100%;object-fit:cover;max-height:52vh;filter:saturate(.86) contrast(1.03);}
.hero-cap{
  font-family:var(--mono);font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;
  color:#93a0a7;padding:.55rem 1.25rem;max-width:1180px;margin:0 auto;
}

/* ---------- typography ---------- */
h1{
  font-size:clamp(2rem,4.4vw,3rem);line-height:1.12;font-weight:700;letter-spacing:-.015em;
  margin:0 0 1.1rem;max-width:22ch;
}
h2{
  font-size:clamp(1.35rem,2.3vw,1.72rem);line-height:1.25;font-weight:700;letter-spacing:-.008em;
  margin:2.6rem 0 .85rem;padding-top:1.1rem;border-top:2px solid var(--rule);max-width:var(--measure);
}
h3{font-size:1.12rem;font-weight:700;margin:1.9rem 0 .55rem;color:var(--ink);}
p,ul,ol,dl{max-width:var(--measure);}
p{margin:0 0 1.05rem;}
.lede{font-size:1.16rem;line-height:1.62;color:var(--ink-soft);border-left:3px solid var(--amber);padding-left:1.1rem;margin-bottom:1.8rem;}
a{color:#1f5c68;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;}
a:hover,a:focus{color:var(--amber);}
strong{font-weight:700;}
ul,ol{padding-left:1.3rem;margin:0 0 1.15rem;}
li{margin-bottom:.5rem;}
.mono{font-family:var(--mono);font-size:.92em;background:var(--paper-2);padding:.05em .35em;border:1px solid var(--rule);}

/* ---------- notice (LOAD-BEARING non-affiliation) ---------- */
.notice{
  border:2px solid var(--rule);border-left:5px solid var(--teal);
  background:var(--paper-2);padding:1rem 1.15rem;font-size:.92rem;line-height:1.6;
  color:var(--ink-soft);margin:0 0 2rem;max-width:var(--measure);
}
.notice strong{color:var(--ink);}
.notice-major{border-left-color:var(--amber);padding:1.4rem 1.5rem;font-size:1rem;}
.notice-major p{margin:0 0 .85rem;max-width:none;}
.notice-major p:last-child{margin-bottom:0;}

.callout{
  border:2px solid var(--rule);border-top:4px solid var(--amber);
  background:#fff;padding:1.1rem 1.25rem;margin:1.8rem 0;max-width:var(--measure);font-size:.95rem;
}
.callout p{margin:0;max-width:none;}

/* ---------- cards list on the homepage ---------- */
ul.cards{list-style:none;padding:0;max-width:none;display:grid;gap:.05rem;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));border:1px solid var(--rule);background:var(--rule);}
ul.cards li{margin:0;background:var(--paper);padding:1rem 1.1rem;font-size:.95rem;line-height:1.55;color:var(--ink-soft);}
ul.cards li a{display:block;font-weight:700;font-size:1.02rem;color:var(--ink);text-decoration:none;margin-bottom:.2rem;}
ul.cards li a:hover{color:var(--amber);text-decoration:underline;}

/* ---------- glossary / sources definition lists ---------- */
dl.glossary,dl.sources{max-width:var(--measure);margin:0 0 1.5rem;}
dl.glossary dt,dl.sources dt{font-weight:700;margin-top:1.35rem;padding-top:.55rem;border-top:1px solid var(--rule);}
dl.glossary dd,dl.sources dd{margin:.3rem 0 0;color:var(--ink-soft);font-size:.96rem;}

/* ---------- inline figure ---------- */
figure.inline{margin:2rem 0;max-width:var(--measure);}
figure.inline img{border:1px solid var(--rule);width:100%;}
figure.inline figcaption{font-family:var(--mono);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);padding-top:.5rem;}

/* ---------- page meta rail ---------- */
.page-head{border-bottom:2px solid var(--rule);padding-bottom:1.4rem;margin-bottom:2rem;}
.crumb{font-family:var(--mono);font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint);margin:0 0 .85rem;}
.crumb a{color:var(--ink-faint);text-decoration:none;}
.crumb a:hover{color:var(--amber);}

.pagenav{border-top:2px solid var(--rule);margin-top:3.2rem;padding-top:1.4rem;display:flex;flex-wrap:wrap;gap:1.5rem;max-width:var(--measure);}
.pagenav a{font-size:.92rem;}

/* ---------- footer ---------- */
.site-foot{background:var(--slate);color:#aab4ba;border-top:3px solid var(--amber);margin-top:0;padding:2.8rem 0 2rem;font-size:.9rem;}
.foot-grid{display:grid;gap:2rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));margin-bottom:2rem;}
.foot-grid h2{font-size:.72rem;font-family:var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--amber);
  margin:0 0 .7rem;border:0;padding:0;max-width:none;}
.foot-grid ul{list-style:none;padding:0;margin:0;max-width:none;}
.foot-grid li{margin-bottom:.35rem;}
.foot-grid a{color:#c3ccd1;text-decoration:none;}
.foot-grid a:hover{color:var(--amber-lift);text-decoration:underline;}
.foot-note{border-top:1px solid var(--rule-dark);padding-top:1.4rem;font-size:.82rem;line-height:1.6;color:#8e999f;max-width:none;}
.foot-note p{max-width:none;margin:0 0 .7rem;}
.foot-note strong{color:#d6dee2;}
.foot-note a{color:#b9c3c8;}
.foot-legal{font-family:var(--mono);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;color:#6d787e;margin:0;}

/* ---------- 404 ---------- */
.err{padding:5rem 0;}

/* ---------- responsive ---------- */
@media (max-width:820px){
  body{font-size:17px;}
  /* The nav wraps to many rows on a phone, so a sticky bar would cover a third
     of the viewport. Below this breakpoint the header scrolls away instead —
     a taller bar must never be allowed to sit on top of the content. */
  .site-head{position:static;}
  .head-inner{padding:.75rem 1rem;}
  .nav{margin-left:0;width:100%;gap:.05rem .75rem;}
  .nav a{font-size:.78rem;}
  .hero-figure img{max-height:34vh;}
  .page{padding:2.2rem 0 3rem;}
  h2{margin-top:2.1rem;}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
}
@media print{
  .site-head,.site-foot,.pagenav{display:none;}
  body{background:#fff;font-size:11pt;}
}
