/* RigRules: built from the road. Asphalt and lane paint for the big moments,
   guide-sign green for state info, interstate-shield blue for the rulebook,
   warning yellow and safety orange for what you must know. Typeface: Overpass,
   an open-source cousin of the US highway sign alphabet. */

@import url("https://fonts.googleapis.com/css2?family=Overpass:wght@400;600;800;900&display=swap");

:root {
  --sign: #0b6b47;          /* guide-sign green */
  --sign-deep: #064a31;
  --sign-ink: #ffffff;
  --shield: #1d4fb8;        /* interstate-shield blue */
  --shield-deep: #12357d;
  --shield-red: #d93b2b;    /* top of the interstate shield */
  --warn: #ffc21a;          /* warning-sign yellow */
  --warn-ink: #1b1d1f;
  --orange: #ff7a1a;        /* work-zone orange */
  --asphalt: #22272c;
  --asphalt-2: #2e353b;
  --paper: #f4f1ea;         /* warm, like a paper road atlas */
  --card: #ffffff;
  --ink: #1e2226;
  --muted: #5b636a;
  --line: #ddd8cc;
  --link: #1d4fb8;
  --focus: #1d4fb8;
  --tint-green: #e3f3ea;
  --tint-blue: #e4ecfb;
  --tint-yellow: #fff3cc;
  --tint-orange: #ffe6d4;
  /* map scale: how many must-know rules a state has */
  --m0: #e2ded3; --m1: #ffe38f; --m2: #ffb52e; --m3: #ff7a1a; --m4: #d93b2b;
  --map-empty: var(--m0);
  --radius: 18px;
  --radius-sign: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(30,34,38,.06), 0 6px 20px rgba(30,34,38,.07);
  --font: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --tabbar-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121517; --card: #1b1f22; --ink: #ebeef0; --muted: #a0a8ae; --line: #2e3439;
    --link: #8fb4ff; --focus: #8fb4ff; --sign: #0e7a52; --shield: #2f62d0; --asphalt: #0c0e10; --asphalt-2: #1a1e22;
    --tint-green: #15291f; --tint-blue: #172238; --tint-yellow: #2d2610; --tint-orange: #33200f;
    --m0: #2c3237; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --paper: #121517; --card: #1b1f22; --ink: #ebeef0; --muted: #a0a8ae; --line: #2e3439;
  --link: #8fb4ff; --focus: #8fb4ff; --sign: #0e7a52; --shield: #2f62d0; --asphalt: #0c0e10; --asphalt-2: #1a1e22;
  --tint-green: #15291f; --tint-blue: #172238; --tint-yellow: #2d2610; --tint-orange: #33200f;
  --m0: #2c3237; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.5;
  padding-bottom: var(--tabbar-h);
}
a { color: var(--link); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; }
h1 { font-size: clamp(32px, 6vw, 54px); font-weight: 900; letter-spacing: -.015em; }
h2 { font-size: clamp(23px, 3.4vw, 28px); font-weight: 900; margin-top: 1.6em; }
h3 { font-size: 19px; font-weight: 800; }
p { margin: 0 0 .9em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.doc .wrap { max-width: 780px; padding-bottom: 40px; }
.hidden { display: none !important; }

/* ---- header ---- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; row-gap: 6px;
  width: 100%; max-width: 1160px; margin: 0 auto; padding: 14px 16px;
}
.brand { font-weight: 900; font-size: 22px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.brand::before { /* a tiny guide sign */
  content: ""; width: 26px; height: 19px; border-radius: 5px; background: var(--sign);
  box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 3.5px #fff, 3px 3px 0 var(--warn);
}
.brand span b { color: var(--sign); font-weight: 900; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 7px 13px 5px; border-radius: 999px; }
.top nav a:hover { background: var(--card); }
.top nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.top nav a.go { background: var(--warn); color: var(--warn-ink); }

/* ---- phone tab bar (added by common.js) ---- */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tabbar-h: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .top nav { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    background: var(--asphalt); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 18px rgba(0,0,0,.18);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 4px;
    color: #c9cfd3; text-decoration: none; font-size: 12px; font-weight: 800; border-radius: 12px; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: var(--warn-ink); background: var(--warn); }
  .tabbar a.track:not([aria-current="page"]) { color: var(--warn); }
}

.foot { max-width: 1160px; margin: 48px auto 0; padding: 24px 16px 40px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px; }

/* ---- guide sign ---- */
.sign {
  background: var(--sign); color: var(--sign-ink); border-radius: var(--radius-sign);
  padding: 26px 28px; position: relative;
  box-shadow: inset 0 0 0 5px var(--sign), inset 0 0 0 7px rgba(255,255,255,.92), var(--shadow);
}
.sign a { color: #fff; }
.sign .lede { font-size: 19px; max-width: 50ch; opacity: .95; }
.sign.blue { background: var(--shield); box-shadow: inset 0 0 0 5px var(--shield), inset 0 0 0 7px rgba(255,255,255,.92), var(--shadow); }
.hero { margin-top: 8px; display: grid; gap: 14px; }
.hero h1 { max-width: 20ch; color: #fff; }

/* ---- the road: home page hero ---- */
.road {
  position: relative; overflow: hidden; margin-top: 6px; border-radius: var(--radius);
  background: radial-gradient(120% 140% at 85% -10%, #3a434b 0%, var(--asphalt) 55%);
  color: #fff; padding: 34px 28px 58px;
}
.road::after { /* dashed yellow center line */
  content: ""; position: absolute; left: 0; right: 0; bottom: 22px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--warn) 0 46px, transparent 46px 80px);
  animation: drive 1.6s linear infinite;
}
.road::before { /* white edge line */
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 3px; background: rgba(255,255,255,.85);
}
@keyframes drive { to { background-position: -80px 0; } }
.road .kicker { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; font-size: 14px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--warn); margin-bottom: 10px; }
.road .kicker::before { content: ""; width: 10px; height: 10px; background: var(--warn); transform: rotate(45deg); }
.road h1 { max-width: 17ch; color: #fff; }
.road h1 em { font-style: normal; color: var(--warn); }
.road .lede { font-size: 19px; max-width: 54ch; color: #dfe4e7; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; align-items: stretch; }
.picker { position: relative; display: flex; }
.picker select {
  appearance: none; -webkit-appearance: none; font: inherit; font-weight: 800; font-size: 18px; cursor: pointer;
  background: #fff; color: #1e2226; border: 0; border-radius: 12px; padding: 14px 46px 12px 18px; min-width: 230px; max-width: 100%;
}
.picker::after { content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 3px solid #1e2226; border-bottom: 3px solid #1e2226; transform: rotate(45deg); pointer-events: none; }
.perks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0 0; padding: 0; list-style: none; font-weight: 700; font-size: 15px; color: #dfe4e7; }
.perks li::before { content: "✓"; color: var(--warn); font-weight: 900; margin-right: 6px; }

/* how it works */
.steps { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 20px; padding: 0; list-style: none; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--card); border-radius: var(--radius-sm); padding: 18px 18px 14px 66px; position: relative; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 36px; height: 36px;
  display: grid; place-items: center; font-weight: 900; font-size: 19px; border-radius: 8px; }
.steps li:nth-child(1)::before { background: var(--sign); color: #fff; }
.steps li:nth-child(2)::before { background: var(--warn); color: var(--warn-ink); }
.steps li:nth-child(3)::before { background: var(--shield); color: #fff; border-radius: 8px 8px 18px 18px; }
.steps h3 { margin: 4px 0 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---- map ---- */
.mapgrid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 26px; }
@media (min-width: 960px) { .mapgrid { grid-template-columns: minmax(0, 1fr) 390px; align-items: start; } }
.mapbox { background: var(--card); border-radius: var(--radius); padding: 14px 14px 10px; box-shadow: var(--shadow); }
.mapbox h2 { margin: 2px 4px 2px; font-size: 22px; }
.mapbox .hint { margin: 0 4px 8px; color: var(--muted); font-size: 15px; }
#map svg { display: block; width: 100%; height: auto; }
#map path.state { stroke: var(--card); stroke-width: 1; cursor: pointer; transition: filter .15s, transform .15s; }
#map path.state:hover { filter: brightness(1.08) saturate(1.15); }
#map path.state.sel { stroke: var(--shield); stroke-width: 3.5; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }
#map path.state.todo { fill-opacity: .9; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 14px; color: var(--muted); padding: 8px 4px 2px; align-items: center; }
.legend b { color: var(--ink); }
.legend i { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; margin-right: 6px; }
.maploading { padding: 60px 12px; text-align: center; color: var(--muted); }

/* state panel = a guide sign */
.panel { position: sticky; top: 12px; scroll-margin-top: 12px; }
.panel .sign { padding: 22px 22px 20px; }
.panel h2 { color: #fff; margin: 0 0 4px; font-size: 30px; }
.panel .sub { opacity: .9; font-size: 15px; margin-bottom: 12px; }
.panel .pickhelp { display: grid; gap: 10px; margin-top: 8px; }
.panel .pickhelp p { margin: 0; display: flex; gap: 10px; align-items: flex-start; }
.panel .pickhelp p::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 7px; background: var(--warn); transform: rotate(45deg); }

/* at a glance tiles */
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.glance div { border-radius: var(--radius-sm); padding: 10px 12px 8px; background: #fff; color: #1e2226; min-width: 0; }
.glance b { display: block; font-size: 23px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.glance span { display: block; font-size: 13px; font-weight: 700; color: #4b5359; line-height: 1.25; }
.glance .g-must { background: var(--warn); }
.glance .g-must span { color: #4a3b00; }
.glance .g-cdl { background: #dbe6ff; }
.glance .g-reg { background: #ffe0c7; }
.glance .g-auth { background: #d6f0e1; }
.glance .na b { font-size: 17px; padding: 3px 0 2px; }

.rules { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.rules li { background: var(--card); color: var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; border-left: 5px solid var(--line); overflow-wrap: anywhere; }
.rules li.is-must { border-left-color: var(--warn); }
.rules li p { margin: 4px 0 6px; }
.rules li a { color: var(--link); font-size: 14px; font-weight: 700; }
.doc .rules li { box-shadow: var(--shadow); }
.tag.must {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800;
  color: var(--warn-ink); background: var(--warn); border-radius: 5px; padding: 2px 8px 0; margin-right: 8px;
}
.tag.must::before { content: ""; width: 8px; height: 8px; background: var(--warn-ink); transform: rotate(45deg); }
.note { font-size: 14px; opacity: .9; }
.sign .note { color: #fff; }
.lock {
  margin-top: 14px; border: 2px dashed rgba(255,255,255,.75); border-radius: var(--radius-sm); padding: 14px;
  background: rgba(0,0,0,.12);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  background: var(--warn); color: var(--warn-ink); border: 0; border-radius: 12px; padding: 12px 20px 10px;
  box-shadow: 0 2px 0 rgba(0,0,0,.18); transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.big { font-size: 19px; padding: 15px 24px 13px; }
.btn.ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.green { background: var(--sign); color: #fff; }
.btn.blue { background: var(--shield); color: #fff; }
.btn.white { background: #fff; color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* ---- section headings with a colored bar ---- */
.sechead { display: flex; align-items: center; gap: 12px; }
.sechead::before { content: ""; width: 8px; align-self: stretch; min-height: 26px; border-radius: 4px; background: var(--orange); }
.sechead.green::before { background: var(--sign); }
.sechead.blue::before { background: var(--shield); }

/* ---- federal list ---- */
.updates { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.updates li { padding: 16px 18px; background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-width: 86ch; border-left: 5px solid var(--shield); }
.updates li.muted { border-left-color: var(--line); }
.updates h3 { margin-bottom: 6px; }
.updates h3 a { color: var(--ink); text-decoration-color: var(--shield); }
.updates .meta { font-size: 14px; color: var(--muted); }
.updates .todo { font-weight: 700; background: var(--tint-yellow); border-radius: 8px; padding: 8px 10px; margin: 0; }

/* ---- pricing ---- */
.plans { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { border-radius: var(--radius); padding: 24px; background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; }
.plan.paid { border-color: var(--warn); background: linear-gradient(180deg, var(--tint-yellow), var(--card) 40%); position: relative; }
.plan.paid::before { content: "Most popular"; position: absolute; top: -13px; right: 18px; background: var(--orange); color: #fff;
  font-weight: 800; font-size: 13px; padding: 4px 12px 2px; border-radius: 999px; }
.plan ul { padding-left: 0; list-style: none; margin: 10px 0 20px; display: grid; gap: 6px; }
.plan li::before { content: "✓"; color: var(--sign); font-weight: 900; margin-right: 8px; }
.plan .price { font-size: 38px; font-weight: 900; margin: 0; }

/* ---- forms ---- */
input[type=email], input[type=text], select {
  font: inherit; padding: 11px 13px; border: 2px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); width: 100%; max-width: 420px;
}
input:focus, select:focus { border-color: var(--shield); outline: none; }
label.check { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.chip { padding: 6px 14px 4px; border: 2px solid var(--line); border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 700; }
.chip.on { background: var(--sign); border-color: var(--sign); color: #fff; }
.crumbs { margin-top: 18px; font-size: 15px; color: var(--muted); }
.cta { margin: 22px 0; padding: 20px; border-radius: var(--radius); background: linear-gradient(135deg, var(--tint-yellow), var(--tint-orange)); border: 2px solid var(--warn); }
.bills { padding-left: 18px; }
.bills li { margin: 8px 0; }
.lede { font-size: 19px; }
.statesel { max-height: 220px; overflow: auto; border: 2px solid var(--line); border-radius: 10px;
  padding: 8px 12px; max-width: 420px; columns: 2; background: var(--card); }
.msg { padding: 12px 16px; border-radius: 10px; background: var(--tint-green); border: 2px solid var(--sign); margin: 12px 0; }

/* account page */
.acct { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-top: 8px; }

/* ---- admin ---- */
table.stats td { padding: 4px 14px 4px 0; }
table.runs td { vertical-align: top; padding: 6px 10px 6px 0; }
pre { white-space: pre-wrap; font-size: 13px; }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
summary { cursor: pointer; font-weight: 700; }

/* ---- tracker app ---- */
body.app { min-height: 100vh; display: flex; flex-direction: column; }
.app .wrap { width: 100%; max-width: 760px; flex: 1; padding-bottom: 30px; }
.now { margin-top: 6px; text-align: left; overflow: hidden; }
.now .status { font-size: 16px; opacity: .92; display: flex; align-items: center; gap: 8px; margin: 0; }
.now .status::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.5); flex: none; }
.tracking .now .status::before { background: #6dff9e; box-shadow: 0 0 0 0 rgba(109,255,158,.7); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(109,255,158,0); } 100% { box-shadow: 0 0 0 0 rgba(109,255,158,0); } }
.now .where { font-size: clamp(44px, 12vw, 72px); font-weight: 900; line-height: 1; color: #fff; margin: 12px 0 8px; letter-spacing: -.02em; }
.now .status-sub { font-size: 16px; opacity: .92; margin: 0; }
.now .glance { margin-top: 16px; }
.glance-wait { margin: 14px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(0,0,0,.18); font-size: 15px; }
.startbtn { width: 100%; margin: 16px 0 6px; font-size: 22px; padding: 20px 24px 17px; border-radius: 16px; }
.startbtn svg { width: 26px; height: 26px; }
.tracking .startbtn { background: var(--shield-red); color: #fff; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; align-items: center; }
.controls select { width: auto; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card);
  border-radius: 12px; padding: 12px 14px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.toggle input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 999px;
  background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.toggle input:checked { background: var(--sign); }
.toggle input:checked::after { transform: translateX(18px); }
.bigbtn { font-size: 20px; padding: 14px 22px 12px; }
.safety { font-size: 14px; color: var(--muted); max-width: 70ch; background: var(--card); border-radius: 12px; padding: 12px 14px 12px 44px; position: relative; }
.safety::before { content: "!"; position: absolute; left: 14px; top: 12px; width: 20px; height: 20px; display: grid; place-items: center;
  background: var(--warn); color: var(--warn-ink); font-weight: 900; font-size: 13px; transform: rotate(45deg); border-radius: 3px; }
.crossed { animation: flash 1.2s ease-out 1; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 5px var(--sign), inset 0 0 0 7px #fff, 0 0 0 0 var(--warn); }
  40% { box-shadow: inset 0 0 0 5px var(--sign), inset 0 0 0 7px #fff, 0 0 0 12px var(--warn); }
  100% { box-shadow: inset 0 0 0 5px var(--sign), inset 0 0 0 7px #fff, 0 0 0 0 transparent; } }
.log { list-style: none; padding: 0; font-size: 15px; color: var(--muted); display: grid; gap: 6px; }
.log li { padding-left: 18px; position: relative; }
.log li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
@media (prefers-reduced-motion: reduce) {
  .crossed, .road::after, .tracking .now .status::before { animation: none; }
  #map path.state { transition: none; }
}

/* ---- rulebook ---- */
.qform { display: grid; gap: 10px; margin-top: 6px; max-width: 780px; }
.qform input { max-width: none; font-size: 19px; padding: 14px 16px; border: 0; border-radius: 12px; }
.qrow { display: flex; flex-wrap: wrap; gap: 8px; }
.qrow select { width: auto; max-width: 100%; border: 0; }
.btn.ghost-on-sign { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.85); box-shadow: none; }
.answer { margin-top: 22px; background: var(--card); border-top: 6px solid var(--shield); border-radius: var(--radius); padding: 20px 22px; max-width: 840px; box-shadow: var(--shadow); }
.answer h2 { margin-top: 0; }
.atext { font-size: 18px; max-width: 70ch; }
.atext sup a { text-decoration: none; font-weight: 800; padding: 0 2px; }
.cites { padding-left: 22px; } .cites li { margin: 6px 0; }
.note-plain { border-left: 4px solid var(--warn); padding-left: 10px; }
.hits { list-style: none; padding: 0; margin: 0; max-width: 840px; display: grid; gap: 8px; }
.hits li { padding: 14px 16px; background: var(--card); border-radius: var(--radius-sm); }
.hits p { margin: 4px 0 0; color: var(--muted); }
.hits li.jump { border-left: 5px solid var(--shield); }
mark { background: color-mix(in srgb, var(--warn) 60%, transparent); color: inherit; padding: 0 1px; border-radius: 2px; }
.tag.new { display: inline-block; font-size: 13px; font-weight: 800; background: var(--orange); color: #fff; border-radius: 5px; padding: 2px 8px 0; margin-left: 6px; }
.libgrid { display: grid; gap: 24px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 900px) { .libgrid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.libgrid > * { min-width: 0; }
.libgrid h3 { margin-top: 18px; }
.libgrid aside section { background: var(--card); border-radius: var(--radius); padding: 2px 18px 16px; margin-top: 22px; box-shadow: var(--shadow); }
.libgrid aside section h2 { margin-top: .8em; font-size: 21px; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.toc { list-style: none; padding: 0; display: grid; gap: 6px; }
.subpart { font-size: 19px; }
.reg .cite { color: var(--sign); white-space: nowrap; font-weight: 800; }
.regtools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.regtext p { max-width: 72ch; }
.regtext p.hit { background: color-mix(in srgb, var(--warn) 30%, transparent); border-radius: 4px; padding: 4px 6px; }
.regnav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.changed { margin: 8px 0; }
button.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; text-align: left; }
#reader { margin-top: 24px; border-top: 4px solid var(--shield); padding-top: 12px; }

/* roadside mode: maximum legibility, works in bright sun */
.roadside { position: fixed; inset: 0; z-index: 50; overflow: auto; background: #ffffff; color: #000000;
  font-size: 24px; line-height: 1.45; padding: calc(16px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); }
.roadside h1 { font-size: 1.35em; color: #000; margin: 14px 0; }
.roadside p { max-width: 46ch; }
.rs-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #0b6b47; color: #fff; border-radius: 10px; padding: 10px 14px; position: sticky; top: 0; }
.rs-cite { font-weight: 800; font-size: 1.1em; }
.rs-btn { font: inherit; font-size: 18px; font-weight: 800; background: #fff; color: #0b6b47; border: 0; border-radius: 8px; padding: 8px 14px 6px; cursor: pointer; }
.rs-tools { display: flex; gap: 8px; }
.rs-foot { font-size: 16px; color: #333; }
body.noscroll { overflow: hidden; }

/* ---- trucking costs ---- */
.costbox { background: var(--card); color: var(--ink); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 14px; overflow-wrap: anywhere; }
.sign .costbox h3, .sign .costbox h4 { color: var(--ink); }
.costbox h3 { margin: 0 0 6px; }
.costbox h4 { margin: 14px 0 4px; font-size: 16px; }
.costbox .rules li { border: 1px solid var(--line); border-left-width: 5px; }
.costbox .rules li.is-must { border-left-color: var(--warn); }
.costbox a { color: var(--link); }
dl.costs { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 8px 14px; margin: 10px 0; font-variant-numeric: tabular-nums; }
dl.costs dt { font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
dl.costs dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.costs { grid-template-columns: minmax(0, 1fr); } }
/* in the narrow map panel and the tracker list, put each label above its value */
.panel dl.costs, .costli dl.costs { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
.panel dl.costs dd, .costli dl.costs dd { margin-bottom: 12px; }
.panel dl.costs dd:last-child, .costli dl.costs dd:last-child { margin-bottom: 0; }
.rules li.costli { background: transparent; padding: 0; border: 0; }
.costtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.costtable th, .costtable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.costtable thead th { background: var(--asphalt); position: sticky; top: 0; z-index: 1; }
.costtable thead th button { font: inherit; font-weight: 800; background: none; border: 0; color: #fff; cursor: pointer; padding: 0; text-align: inherit; }
.costtable thead th[aria-sort] button { color: var(--warn); }
.costtable thead th[aria-sort="ascending"] button::after { content: " ▲"; }
.costtable thead th[aria-sort="descending"] button::after { content: " ▼"; }
.costtable tbody tr:nth-child(even) { background: color-mix(in srgb, var(--paper) 60%, var(--card)); }
.costtable tbody tr:hover { background: var(--tint-yellow); }
.costtable tbody th a { font-weight: 800; }
.costtable td.num, .costtable th.num { text-align: right; }
.costtable .low { background: var(--tint-green); border-radius: 6px; padding: 1px 6px; font-weight: 800; }
.tablewrap { overflow: auto; max-height: 75vh; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.findrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 12px; }
.findrow input { max-width: 300px; }

/* ---- payments and contact ---- */
.renew { background: rgba(255,255,255,.75); color: #1e2226; border-radius: 12px; padding: 12px 14px 6px; margin: 4px 0 14px; font-size: 15px; }
.renew p { margin: 0 0 8px; }
.renew label.check { align-items: flex-start; font-weight: 700; }
.renew input[type=checkbox] { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.planbtns[aria-disabled="true"] .btn { opacity: .45; }
.paypills { list-style: none; padding: 0; margin: 8px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.paypills li { background: var(--card); border: 2px solid var(--line); border-radius: 8px; padding: 4px 10px 2px; font-size: 14px; font-weight: 800; }
.cta .paypills li { background: rgba(255,255,255,.7); border-color: rgba(0,0,0,.08); color: #1e2226; }
.payrow { margin-top: 18px; background: var(--card); border-radius: var(--radius); padding: 16px 20px 6px; box-shadow: var(--shadow); }
.payrow p { margin: 0 0 6px; }
.planbtns { display: flex; flex-wrap: wrap; gap: 10px; }
.contactform { display: grid; gap: 6px; max-width: 560px; }
.contactform label { font-weight: 700; margin-top: 8px; }
.contactform input, .contactform select { max-width: none; }
textarea { font: inherit; padding: 11px 13px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); width: 100%; resize: vertical; }
textarea:focus { border-color: var(--shield); outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg.bad { background: var(--tint-orange); border-color: var(--orange); }

.tag.unofficial { display: inline-block; font-size: 12px; font-weight: 700; color: #8a4a00;
  background: var(--tint-orange); border-radius: 5px; padding: 1px 7px 0; margin-left: 6px; vertical-align: 1px; }

@media (max-width: 480px) {
  .top { padding-top: 10px; padding-bottom: 10px; }
  .road { padding: 26px 18px 54px; }
  .ctas > * { flex: 1 1 100%; }
  .picker select { width: 100%; }
  .sign { padding: 22px 20px; }
  .toggles { grid-template-columns: 1fr; }
}
