/* Page shell. Colours follow the current site (design review comes after the upgrade, roadmap D2). */
:root {
  --bg: #f8fafc; --paper: #fff; --ink: #0f172a; --text: #334155; --muted: #64748b; --faint: #94a3b8;
  --rule: #e2e8f0; --head: #0f172a; --blue: #2563eb; --blue-dark: #1d4ed8; --blue-soft: #eff6ff;
  --green: #047857; --green-soft: #ecfdf5; --red: #dc2626; --amber-soft: #fffbeb; --amber: #92400e;
  --radius: 16px; --wrap: 720px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 .4rem; }
code { font-size: .9em; background: #f1f5f9; padding: 0 .3em; border-radius: 4px; }
.muted { color: var(--muted); font-size: .9rem; }

.site-head { background: var(--head); color: #fff; position: sticky; top: 0; z-index: 20; }
.head-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand small { color: var(--faint); font-size: .75rem; }
.head-nav { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .85rem; }
.head-nav a { color: #cbd5e1; text-decoration: none; padding: .2rem 0; }
.head-nav a:hover, .head-nav a[aria-current="page"] { color: #fff; }

.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.prose { margin: 1.5rem 0; }
.prose p, .prose li { font-size: .95rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: .75rem 0 1rem; display: block; overflow-x: auto; }
.prose th { text-align: left; background: #f1f5f9; color: var(--ink); padding: .45rem .6rem; }
.prose td { padding: .45rem .6rem; border-bottom: 1px solid #f1f5f9; }
.example { background: var(--blue-soft); border-radius: 12px; padding: 14px 16px; }
.example p { margin: .35rem 0; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }

.intro { padding: 1.75rem 0 .5rem; }
.lede { font-size: 1.02rem; margin: 0; }
.explain > h2, .faq > h2 { margin-top: 2.25rem; }
.faq details { margin-bottom: .5rem; padding: 0; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--ink); font-size: .95rem; }
.faq details p { margin: 0; padding: 0 16px 16px; font-size: .92rem; }

.site-foot { background: var(--head); color: var(--faint); margin-top: 2.5rem; font-size: .8rem; }
.site-foot .wrap { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.site-foot a { color: #cbd5e1; }
.foot-links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .75rem 0; }
.foot-note, .foot-year { margin: .25rem 0; }

@media (min-width: 640px) {
  h1 { font-size: 1.9rem; }
  .panel { padding: 28px; }
}
