/* ExitAtlas: one stylesheet, no web fonts, mobile first, light + dark. */

:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --text: #1b1f1d;
  --muted: #5d6662;
  --line: #dcdfd9;
  --brand: #0a5c36;     /* highway sign green */
  --brand-2: #0d7444;
  --accent: #ffd43b;
  --link: #0b6b8f;
  --fuel: #d9480f;
  --food: #2b8a3e;
  --bed: #1c7ed6;
  --ev: #7048e8;
  --rest: #0b7285;
  --warn-bg: #fff4e0;
  --warn-ink: #7a4100;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 20, .06), 0 4px 16px rgba(16, 24, 20, .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412;
    --surface: #171e1b;
    --text: #e5ebe8;
    --muted: #9aa8a1;
    --line: #2a3530;
    --brand: #08482a;
    --brand-2: #0c5e37;
    --link: #6cc4e6;
    --warn-bg: #3a2709;
    --warn-ink: #ffd8a3;
    --shadow: none;
    color-scheme: dark;
  }
  .map img { filter: brightness(.92); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.3rem, 2.8vw, 1.6rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1.4em 0 .5em; }
p { margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.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: 8px; background: var(--accent); color: #000; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 5; border-bottom: 3px solid var(--accent); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.2rem; font-weight: 600; }
.logo b, .footer-logo b { color: var(--accent); }
.menu-toggle { margin-left: auto; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--brand); padding: 8px 16px 16px; flex-direction: column; }
.site-nav.is-open { display: flex; }
.site-nav a { color: #e3f1ea; text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current] { background: var(--brand-2); color: #fff; }
html:not(.js) .site-nav { display: flex; position: static; flex-direction: row; flex-wrap: wrap; padding: 0; }
html:not(.js) .menu-toggle { display: none; }
@media (min-width: 760px) {
  .menu-toggle { display: none; }
  .site-nav, html:not(.js) .site-nav { display: flex; position: static; flex-direction: row; padding: 0; margin-left: auto; background: none; gap: 4px; }
}

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 14px auto 0; font-size: .88rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; }

/* Article */
.article { padding-top: 8px; padding-bottom: 48px; }
.page-head { margin-bottom: 18px; }
.kicker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; margin: 10px 0 0; flex-wrap: wrap; }
.shield { display: inline-block; background: var(--brand); color: #fff; font-weight: 700; padding: 1px 9px; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--brand); font-size: .85rem; }
.shield.big { font-size: 1.15rem; padding: 4px 12px; }
.lead { font-size: 1.12rem; color: var(--text); }
.prose { max-width: 760px; }

/* Facts row */
.facts { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0; margin: 0 0 20px; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.facts li.wide { grid-column: 1 / -1; }
.facts svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(4, 1fr); } }

/* Map image */
.map { margin: 0 0 24px; }
.map img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #f4f1ea; }
.map figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }

/* Lists of businesses */
.poi-list { list-style: none; padding: 0; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.poi-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.poi-list li:first-child { border-top: 0; }
.poi-name { font-weight: 600; }
.poi-meta { color: var(--muted); font-size: .92rem; }
.poi-dir { margin-left: auto; font-size: .88rem; }
.tag { font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--text); }
.tag-truck { background: #ffe8cc; color: #7a3a00; }
.tag-ev { background: #e5dbff; color: #3b1f99; }
@media (prefers-color-scheme: dark) { .tag-truck { background: #4a2a0a; color: #ffd8a8; } .tag-ev { background: #2c2257; color: #d0bfff; } }

.rest-list, .route-list, .plain-list, .feature-list { padding-left: 1.2em; }
.rest-list li, .route-list li, .plain-list li { margin-bottom: 8px; }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.feature-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }

/* Notes */
.note { border-radius: 10px; padding: 12px 14px; }
.note-warn { background: var(--warn-bg); color: var(--warn-ink); border-left: 4px solid var(--fuel); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.exit-table th, .exit-table td { padding: 10px 12px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.exit-table thead th { border-top: 0; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.exit-table tbody th { font-weight: 600; white-space: nowrap; }
.exit-table .is-here { background: color-mix(in srgb, var(--accent) 22%, transparent); }
th[aria-sort], table[data-sortable] thead th { cursor: pointer; }
th[aria-sort="ascending"]::after { content: " ▲"; }
th[aria-sort="descending"]::after { content: " ▼"; }

/* Service icons */
.icons { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.ic { display: inline-flex; align-items: center; gap: 3px; font-size: .9rem; font-weight: 600; }
.ic svg { width: 17px; height: 17px; }
.ic-fuel { color: var(--fuel); } .ic-food { color: var(--food); } .ic-lodging { color: var(--bed); } .ic-ev { color: var(--ev); }
.ic.is-off { color: var(--muted); opacity: .45; font-weight: 400; }

/* Cards */
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.card:hover { border-color: var(--brand); }
.card svg { width: 26px; height: 26px; color: var(--brand); }
.card span { color: var(--muted); font-size: .92rem; }
.card .shield { color: #fff; align-self: flex-start; }

/* Hero + forms */
.hero { background: linear-gradient(180deg, var(--brand) 0%, #0c4f30 100%); color: #fff; padding: 36px 0 40px; }
.hero h1 { color: #fff; }
.hero .lead { color: #dcefe5; max-width: 680px; }
.exit-search, .planner { display: grid; gap: 12px; grid-template-columns: 1fr; background: var(--surface); color: var(--text); padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); margin: 0 0 24px; }
@media (min-width: 760px) { .exit-search { grid-template-columns: 1fr 1.4fr 1fr auto; align-items: end; } .planner { grid-template-columns: 1fr 1fr; } }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
select, input[type="number"] { font: inherit; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); min-height: 46px; width: 100%; }
fieldset.mode { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
fieldset.mode label { flex-direction: row; align-items: center; font-weight: 400; gap: 8px; }
button, .btn { font: inherit; font-weight: 600; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 11px 18px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 46px; }
button:hover, .btn:hover { background: var(--brand-2); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 24px; }
.plan { padding-left: 1.2em; }
.plan li { margin-bottom: 10px; }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 12px; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; padding: 0 14px; }
.faq summary { cursor: pointer; padding: 12px 0; list-style-position: outside; }
.faq summary h3 { display: inline; font-size: 1.02rem; margin: 0; }
.faq details p { margin: 0 0 12px; }

.next-states { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.updated { font-size: .88rem; color: var(--muted); margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; }

/* Ads */
.ad { margin: 24px 0; min-height: 100px; }
.ad-placeholder { border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-size: .85rem; }

/* Footer */
.site-footer { background: #0c2219; color: #c4d6cc; padding: 32px 0 16px; font-size: .92rem; }
.site-footer a { color: #e6f2ec; }
.footer-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 760px) { .footer-grid > div:first-child { grid-column: auto; } }
.footer-logo { font-size: 1.2rem; font-weight: 600; color: #fff; margin-bottom: 6px; }
.footer-head { font-weight: 600; color: #fff; margin-bottom: 6px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 4px; }
.footer-note { border-top: 1px solid #1f3a2d; margin-top: 20px; padding-top: 12px; font-size: .82rem; }

.not-found { text-align: left; }

/* Inline icons in lists and links */
.poi-dir { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; color: var(--link); }
.poi-dir:hover { background: var(--line); }
.poi-dir svg { width: 18px; height: 18px; }
main { overflow-wrap: anywhere; }
.facts li.wide { display: block; }
