/* Roadwise — "Atlas field guide" aesthetic: warm map paper, asphalt ink, guide-sign green, signal amber. Local fonts only. */
:root {
  --paper: #f3ede0;
  --paper-2: #ebe3d2;
  --card: #faf6ec;
  --ink: #1e2733;
  --ink-soft: #4a5361;
  --muted: #7a7f86;
  --rule: #d8ccb4;
  --route: #1d5b4f;
  --route-deep: #123d35;
  --amber: #e9a23b;
  --amber-soft: #f6d9a5;
  --brick: #b4452e;
  --sky: #2d5a86;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, "Bitstream Charter", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Seravek, Ubuntu, Cantarell, "Noto Sans", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --wrap: 1180px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  min-height: 100dvh; display: flex; flex-direction: column;
}
body::before { /* paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.38 0 0 0 0 0.25 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { flex: 1; }
a { color: var(--route); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brick); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 200; border-radius: 8px; }
.skip:focus { left: 12px; color: var(--paper); }
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--route); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 0; border-top: 2px dashed var(--amber); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; transition: transform .5s var(--ease); }
.brand:hover svg { transform: rotate(-8deg); }
.brand small { font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; color: var(--muted); font-weight: 400; text-transform: uppercase; display: block; margin-top: -4px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .93rem; padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 9px 16px; font: 600 .85rem var(--sans); cursor: pointer; align-items: center; gap: 8px; }
.menu-btn .bars { width: 16px; height: 10px; position: relative; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 12px 20px 20px; display: none; }
  .nav.open { display: flex; animation: drop .25s var(--ease); }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--route); }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 36ch; }
.hero-art { position: relative; aspect-ratio: 1 / 1.05; }
.hero-art svg { width: 100%; height: 100%; }
.dash-anim { stroke-dasharray: 18 16; animation: lane 2.4s linear infinite; }
@keyframes lane { to { stroke-dashoffset: -68; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .98rem; transition: transform .25s var(--ease), background .2s, color .2s; }
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--route); color: var(--paper); }
.btn-primary:hover { background: var(--route-deep); color: var(--paper); transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 420px; } }

/* ---------- State reminder ---------- */
.state-note { display: flex; gap: 14px; align-items: flex-start; background: var(--amber-soft); border: 1.5px solid var(--amber); border-radius: var(--radius); padding: 14px 18px; font-size: .94rem; color: var(--ink); margin: 0 0 28px; }
.state-note svg { flex: 0 0 26px; width: 26px; height: 26px; margin-top: 2px; }
.state-note strong { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; display: block; color: var(--brick); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head p { color: var(--ink-soft); max-width: 52ch; margin: 0; }
.road-rule { height: 0; border: 0; border-top: 3px dashed var(--rule); margin: 0; }
.band { background: var(--ink); color: var(--paper); }
.band h2, .band h3 { color: var(--paper); }
.band p { color: #c9c4b8; }
.band .eyebrow { color: var(--amber); }
.band a { color: var(--amber-soft); }

/* Category cards: asymmetric route-sign mosaic */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card { grid-column: span 2; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; text-decoration: none; color: var(--ink); position: relative; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; display: flex; flex-direction: column; min-height: 220px; }
.cat-card:nth-child(1) { grid-column: span 3; background: var(--route); color: var(--paper); border-color: var(--route); }
.cat-card:nth-child(2) { grid-column: span 3; }
.cat-card:nth-child(1) p { color: #cfe0da; }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -18px rgba(30,39,51,.45); color: inherit; border-color: var(--ink); }
.cat-card:nth-child(1):hover { color: var(--paper); }
.cat-card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.cat-card h3 { margin: 18px 0 8px; }
.cat-card .count { margin-top: auto; padding-top: 18px; font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.cat-card .shield { width: 46px; height: 46px; }
@media (max-width: 860px) { .cat-grid { grid-template-columns: 1fr; } .cat-card, .cat-card:nth-child(1), .cat-card:nth-child(2) { grid-column: auto; } }

/* Article list: mile-marker rows */
.mm-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.mm-list li { border-bottom: 1px solid var(--rule); }
.mm-list a { display: grid; grid-template-columns: 74px 1fr auto; gap: 20px; align-items: center; padding: 20px 6px; text-decoration: none; color: var(--ink); transition: background .2s, padding .3s var(--ease); }
.mm-list a:hover { background: var(--card); padding-left: 14px; color: var(--ink); }
.mm { font-family: var(--mono); font-size: .72rem; background: var(--route); color: var(--paper); border-radius: 6px; padding: 6px 0; text-align: center; letter-spacing: .06em; line-height: 1.2; border: 2px solid var(--route); box-shadow: inset 0 0 0 2px var(--paper); }
.mm b { display: block; font-size: 1.1rem; }
.mm-list h3 { font-size: 1.18rem; margin: 0 0 4px; }
.mm-list p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.mm-list .meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.mm-list .arrow { transition: transform .3s var(--ease); display: inline-block; }
.mm-list a:hover .arrow { transform: translateX(5px); color: var(--brick); }
@media (max-width: 640px) { .mm-list a { grid-template-columns: 56px 1fr; } .mm-list .meta { display: none; } }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.chip { font: 600 .85rem var(--sans); padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.chip:hover, .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.cat-section { scroll-margin-top: 90px; margin-bottom: 52px; }
.cat-section[hidden] { display: none; }
.cat-section header { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.cat-section header svg { width: 44px; height: 44px; flex: none; }
.cat-section header h2 { margin: 0; }
.cat-section header p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Page header */
.page-head { padding: 56px 0 36px; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.page-head p.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 62ch; }
.crumbs { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; margin-bottom: 18px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 8px; }

/* Article */
.article-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 48px 0 72px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: .9rem; }
.toc h2 { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 3px dashed var(--rule); }
.toc li a { display: block; padding: 6px 0 6px 16px; color: var(--ink-soft); text-decoration: none; margin-left: -3px; border-left: 3px solid transparent; transition: color .2s, border-color .2s; }
.toc li a:hover { color: var(--ink); border-left-color: var(--amber); }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.8em; scroll-margin-top: 90px; font-size: 1.7rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--route); font-weight: 700; }
.prose .intro p:first-child { font-size: 1.2rem; font-family: var(--serif); line-height: 1.55; }
.prose .intro p:first-child::first-letter { float: left; font-size: 3.6em; line-height: .85; padding: 6px 10px 0 0; color: var(--route); font-weight: 700; }
.takeaway { background: var(--card); border-left: 6px solid var(--route); border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 26px; margin: 2em 0; }
.takeaway h2 { margin-top: 0 !important; font-size: 1.3rem; }
.art-meta { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--mono); font-size: .76rem; color: var(--muted); letter-spacing: .05em; margin-top: 18px; }
.related { margin-top: 48px; }
.related h2 { font-size: 1.3rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.related-grid a { display: block; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--ink); transition: transform .3s var(--ease), border-color .2s; }
.related-grid a:hover { transform: translateY(-3px); border-color: var(--route); color: var(--ink); }
.related-grid small { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--route); display: block; margin-bottom: 4px; }
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; } }

/* Generic content pages */
.page-body { padding: 48px 0 72px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; }
.panel h3 { margin-top: 0; }
.stack > * + * { margin-top: 16px; }

/* Glossary */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; }
.az a { font-family: var(--mono); width: 36px; height: 36px; display: grid; place-items: center; border: 1.5px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; transition: background .2s, border-color .2s; }
.az a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gl-letter { scroll-margin-top: 90px; display: grid; grid-template-columns: 80px 1fr; gap: 24px; border-top: 1px solid var(--rule); padding: 26px 0; }
.gl-letter > span { font-family: var(--serif); font-size: 3rem; color: var(--route); line-height: 1; }
.gl-letter dl { margin: 0; }
.gl-letter dt { font-weight: 700; font-family: var(--serif); font-size: 1.15rem; }
.gl-letter dd { margin: 2px 0 16px; color: var(--ink-soft); }
@media (max-width: 600px) { .gl-letter { grid-template-columns: 1fr; gap: 8px; } }

/* FAQ */
.faq-group { margin-bottom: 40px; }
details { border: 1px solid var(--rule); border-radius: 12px; background: var(--card); margin-bottom: 10px; transition: border-color .2s; }
details[open] { border-color: var(--route); }
summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font-weight: 600; font-family: var(--serif); font-size: 1.1rem; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--route); border-bottom: 2.5px solid var(--route); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease); }
details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
details > div { padding: 0 22px 18px; color: var(--ink-soft); }

/* Signs */
.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.sign-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; transition: transform .35s var(--ease); }
.sign-card:hover { transform: translateY(-4px); }
.sign-card svg { width: 96px; height: 96px; display: block; margin-bottom: 14px; transition: transform .5s var(--ease); }
.sign-card:hover svg { transform: rotate(-6deg) scale(1.04); }
.sign-card p { font-size: .94rem; color: var(--ink-soft); margin: 0; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.swatch { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 14px; }
.swatch i { width: 44px; height: 44px; border-radius: 8px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.swatch p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* Tips / numbered */
.tip-list { counter-reset: tip; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; list-style: none; padding: 0; }
.tip-list li { counter-increment: tip; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px 24px 24px 76px; position: relative; }
.tip-list li::before { content: counter(tip, decimal-leading-zero); position: absolute; left: 22px; top: 22px; font-family: var(--mono); font-weight: 700; color: var(--paper); background: var(--brick); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: .85rem; }
.tip-list h3 { margin: 0 0 6px; font-size: 1.15rem; }
.tip-list p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Record timeline */
.clocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.clock { border-top: 6px solid var(--route); background: var(--card); border-radius: 0 0 var(--radius) var(--radius); padding: 24px; }
.clock:nth-child(2) { border-color: var(--amber); }
.clock:nth-child(3) { border-color: var(--brick); }
.clock .mono { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .clocks { grid-template-columns: 1fr; } }

/* Contact */
.mail-big { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2.6rem); word-break: break-word; }
.pending { display: inline-block; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; background: var(--paper-2); border: 1px dashed var(--brick); color: var(--brick); padding: 3px 8px; border-radius: 6px; vertical-align: middle; }

/* Footer */
.site-footer { background: var(--ink); color: #cdc7ba; margin-top: 40px; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; background: repeating-linear-gradient(90deg, var(--amber) 0 40px, transparent 40px 70px); opacity: .9; }
.site-footer .wrap { padding: 56px 0 36px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); font-weight: 500; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #ece6d8; text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }
.site-footer .brand { color: var(--paper); }
.disclaimer { margin-top: 40px; border-top: 1px solid #3a4554; padding-top: 24px; font-size: .86rem; line-height: 1.6; }
.disclaimer p { margin: 0 0 10px; }
.disclaimer strong { color: var(--paper); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* Reveal motion */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
