/* The town pages: /towns, /towns/<state>, /towns/<state>/<town>.
   docs/traffic.md Phase 1. VERSION: 20261118-1700

   BUILT ON gifts.css's PROPORTIONS, with one difference that drives the
   rest: /gifts is a grid of photographs somebody browses, and a town page is
   mostly PROSE somebody reads. So the measure is narrower (66ch against
   72ch) and the line height is a reading line height, not a caption one.

   PHONE FIRST, and that is a measurement rather than a slogan: Search
   Console's first export put 29 of the site's 37 impressions on mobile. Every
   grid here collapses to one column before it has to, the video keeps its
   aspect ratio with no fixed heights anywhere, and nothing relies on hover --
   the "nearby stops" cards are the only interactive thing below the fold and
   they are whole-card links.

   body.towns and body.town both exist: the index and the state pages share
   the card grid, and only the town page has prose and facts. */
body.towns,body.town{background:#161e26;overflow:auto;height:auto;min-height:100%}

.townwrap{max-width:66ch;margin:0 auto;padding:32px 20px 72px;
  font-size:17px;line-height:1.68}
.townwrap.narrow{max-width:52ch}
.townwrap h1{margin:0 0 4px;font-size:32px;line-height:1.15;
  letter-spacing:-.015em}
.townwrap h2{margin:34px 0 10px;font-size:21px;letter-spacing:-.01em}
.townwrap h3{margin:22px 0 6px;font-size:17px}
.townwrap .lede{margin:0 0 18px;font-size:17px;color:rgba(245,241,232,.78)}
.townwrap .sub{margin:0 0 20px;font-size:15px;color:var(--muted)}
.townwrap p{margin:0 0 14px}

/* The breadcrumb matches the BreadcrumbList in the head -- see town.html.
   Small, quiet, and above the h1 where a trail belongs. */
.crumbs{margin:0 0 14px;font-size:14px;color:var(--muted)}
.crumbs a{color:rgba(245,241,232,.72)}
.crumbs a:hover{color:var(--orange)}
.crumbs span[aria-hidden]{padding:0 5px;opacity:.5}

/* THE DRIVE. aspect-ratio rather than the padding-top box: it is supported
   everywhere this site is read and it means the iframe cannot be the one
   element that disagrees with the column when the measure changes. */
.drive{margin:4px 0 8px;border-radius:12px;overflow:hidden;
  background:#0f151b;border:1px solid var(--line)}
.drive iframe{display:block;width:100%;aspect-ratio:16/9;border:0}

/* The prose from city_scripts, rendered by sitecopy.render(). Those are
   Bryce's words and the only styling they get is a comfortable measure --
   no drop caps, no pull quotes, nothing that would make a sentence mean
   something it did not mean in the script. */
.prose p{margin:0 0 14px}
.prose ul,.prose ol{margin:0 0 14px;padding-left:1.25em}
.prose li{margin:0 0 7px}

/* The five facts, with their sources. The source list is deliberately
   PLAIN and small: it is there to be checkable, not to be read first. */
.factlist{margin:0;padding-left:1.35em}
.factlist > li{margin:0 0 18px}
.factlist .fact{margin:0 0 2px;font-size:16px;font-weight:600}
/* Inline, not a line of its own: it is part of the fact's name ("The name —
   Bronson Park"), and on its own line it read as a second fact. */
.factlist .place{font-weight:400;color:var(--muted)}
.sources{list-style:none;margin:2px 0 0;padding:0;font-size:14px;
  color:var(--muted)}
.sources li{display:inline;margin:0}
.sources li + li::before{content:" · ";opacity:.6}
.sources a{color:rgba(245,241,232,.66);text-decoration:underline;
  text-underline-offset:2px}
.sources a:hover{color:var(--orange)}

/* Cards: the other cuts from this stop, the nearby stops, the index and the
   state pages all use one shape. TWO COLUMNS AT MOST on a laptop and one on
   a phone -- the same call gifts.css made and for the same reason: a wider
   grid turns a considered list into a catalogue. */
.towncards,.cutlist,.nearlist{list-style:none;margin:0;padding:0;
  display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.towncards li,.cutlist li,.nearlist li{margin:0}
.towncards a,.cutlist a,.nearlist a{display:flex;flex-direction:column;
  height:100%;border-radius:12px;overflow:hidden;background:#1E2730;
  border:1px solid var(--line);color:var(--offwhite);text-decoration:none;
  transition:border-color .12s,background .12s}
.towncards a:hover,.cutlist a:hover,.nearlist a:hover{border-color:var(--orange);
  background:#222c37;text-decoration:none}
.towncards img,.cutlist img,.nearlist img{display:block;width:100%;height:auto;
  aspect-ratio:16/9;object-fit:cover;background:#0f151b}
.tname,.nname,.cutlist span{padding:9px 12px 2px;font-size:16px;font-weight:600}
.tstop,.nstop{padding:0 12px 10px;font-size:13px;color:var(--muted)}
.cutlist span{padding-bottom:10px}

/* The index's by-state list IS THE CRAWL PATH -- every town page is reachable
   from it by a real anchor, which is the thing the map can never offer
   because its pins arrive from /api/pins after the page has loaded. So it is
   dense on purpose: 127 names should read as a list, not as 127 cards. */
.stateblock{margin:0 0 26px}
.stateblock h3{display:flex;align-items:baseline;gap:9px;margin:0 0 6px;
  font-size:19px}
.stateblock .count{font-size:13px;font-weight:400;color:var(--muted)}
.townnames{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;
  gap:4px 0;font-size:15px;line-height:1.5}
.townnames li{margin:0}
.townnames li::after{content:"·";padding:0 7px;color:rgba(245,241,232,.3)}
.townnames li:last-child::after{content:""}
.townnames a{color:rgba(245,241,232,.84)}
.townnames a:hover{color:var(--orange)}

.recent{margin-top:26px}
.near,.cuts{margin-top:30px}
.backtomap{margin:34px 0 0;font-size:16px}

@media (max-width:480px){
  .townwrap{padding:24px 16px 56px;font-size:16px}
  .townwrap h1{font-size:27px}
  /* One column, always, rather than minmax deciding: at 375px a 240px
     minimum leaves a card wider than the gutter allows and the grid
     overflows sideways. The map taught this page that lesson already. */
  .towncards,.cutlist,.nearlist{grid-template-columns:1fr}
}

/* --- the correction box ---------------------------------------------------
   docs/traffic.md 3a.3. Closed by default and quiet: most visitors came to
   watch a drive, and a form sitting open under every town page is furniture.
   The person it is for -- somebody who just read something wrong about their
   own town -- is looking for it. */
.tellus{margin:36px 0 0;border-top:1px solid var(--line);padding-top:18px}
.tellus summary{cursor:pointer;font-size:16px;font-weight:600;
  color:rgba(245,241,232,.8);list-style:none}
.tellus summary::-webkit-details-marker{display:none}
.tellus summary::before{content:"+ ";color:var(--orange)}
.tellus details[open] summary::before{content:"– "}
.tellus summary:hover{color:var(--orange)}
.tellus form{margin:12px 0 0;display:flex;flex-direction:column;gap:6px}
.tellnote{margin:0 0 6px;font-size:14.5px;line-height:1.55;color:var(--muted)}
.tellus label{font-size:14px;font-weight:600;color:rgba(245,241,232,.78)}
.tellus label span{font-weight:400;color:var(--muted)}
.tellus textarea,.tellus input[type="email"]{font:inherit;font-size:16px;
  /* 16px is not a taste. Anything smaller and iOS Safari zooms the page in
     when the field takes focus, which on a phone throws the reader out of
     the page they were reading. */
  color:var(--offwhite);background:#1E2730;border:1px solid var(--line);
  border-radius:9px;padding:9px 11px;width:100%}
.tellus textarea:focus,.tellus input[type="email"]:focus{outline:2px solid var(--orange);
  outline-offset:1px;border-color:transparent}
.tellus button{align-self:flex-start;margin-top:4px;border:0;border-radius:999px;
  padding:9px 20px;background:var(--orange);color:#1b1208;font-weight:650;
  font-size:15px}
.tellus button:disabled{opacity:.55}
/* THE HONEYPOT. Not display:none -- some form-filling bots skip hidden
   fields, and the point is that they fill this one in. Pushed off-screen
   instead, out of the tab order and out of the accessibility tree, so a
   person using a keyboard or a screen reader never reaches it either. */
.tellus .hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.tellsaid{margin:8px 0 0;font-size:14.5px;min-height:1.2em}
.tellsaid.good{color:#7fc49a}
.tellsaid.bad{color:#e8976c}

/* The unsubscribe button. Big and alone on the page: it is the only thing
   somebody came here to press, and a timid unsubscribe is how you get
   reported as spam instead. */
.unsubgo{border:0;border-radius:999px;padding:12px 26px;font-size:16px;
  font-weight:650;background:var(--orange);color:#1b1208;margin:4px 0 18px}

/* --------------------------------------------------------------- the ads
   The sponsor under the video, the books at the foot. advertising.md §3,
   slots town.page.local / .presented / .product.

   THE SAME CARD AS THE MAP FOOTER, and these are the footer's own rules
   rather than a lookalike -- Bryce, 2026-11-20: "i want the amazon cards to
   all look the same." They can be copied almost verbatim because this page
   is dark too (#161e26, the exact colour .mfpic already uses as its photo
   backing), so the one thing that usually forces a second design -- the
   background -- is the same on both surfaces.

   They are copied rather than shared because map.css is not loaded here: the
   town pages carry town.css alone, and pulling in the whole map stylesheet
   for two blocks would cost every town page the map's rules. If a third
   surface ever wants them, that is the point at which they move to a file of
   their own. */

/* THE SPONSOR. Under the video, which is where Bryce put it: "not near the
   bottom. possibly below the horizontal video or under the 5 facts." */
.townsponsor{margin:0 0 22px}
.tscard{display:flex;flex-direction:column;gap:4px;padding:10px 12px;
  border:1px solid var(--line);border-radius:8px;background:#0f151b;
  text-decoration:none;color:inherit}
.tscard:hover{border-color:var(--orange);text-decoration:none}
.townsponsor .slead{font-size:10.5px;letter-spacing:.04em;
  text-transform:uppercase;color:rgba(245,241,232,.45)}
.townsponsor .srow{display:flex;gap:9px;align-items:center;min-width:0}
.townsponsor .scard{width:46px;height:auto;flex:none;border-radius:4px}
.townsponsor .stext{display:flex;flex-direction:column;min-width:0}
.townsponsor .sname{font-size:14px;font-weight:600;color:var(--offwhite)}
.townsponsor .sphrase{font-size:11.5px;color:rgba(245,241,232,.55)}

/* THE ASK, on every town nobody has bought. It is a LINE and not a card on
   purpose: it should read as the page offering something rather than as an
   advertisement already sold, and it must never out-shout the town's own
   writing directly above it. */
.townsponsor .sponsorline{display:block;padding:9px 12px;
  border:1px dashed var(--line);border-radius:8px;font-size:13px;
  font-weight:600;color:var(--muted);text-decoration:none}
.townsponsor .sponsorline::after{content:" \2192"}
.townsponsor .sponsorline:hover{color:var(--orange);border-color:var(--orange);
  text-decoration:none}

/* THE BOOKS. Two across on a computer and one on a phone, which is the whole
   of Bryce's instruction and the only thing here the map footer does not
   already do -- it shows one card at a time.

   auto-fit with a 260px floor rather than a media query: the card stops
   being readable at about 260px wide, so the column count is decided by the
   space the card actually needs instead of by a guess at a device width.
   Below ~560px of content width that arithmetic yields one column by itself,
   which is the phone case asked for. */
.townbooks{margin:30px 0 24px}
.townbooks h2{margin:0 0 10px}
.bookgrid{display:grid;gap:12px;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.townbooks .mfprod{display:flex;gap:11px;align-items:stretch;padding:8px;
  min-height:114px;text-decoration:none;color:inherit;
  border:1px solid var(--line);border-radius:8px;background:#0f151b}
.townbooks .mfprod:hover{text-decoration:none;border-color:var(--orange)}
/* 3:4, the ratio tools/trim_gift_photos.py already trims them to. */
.townbooks .mfpic{width:78px;flex:none;align-self:stretch;height:auto;
  object-fit:cover;border-radius:5px;background:#161e26}
.townbooks .mftext{display:flex;flex-direction:column;justify-content:center;
  gap:3px;min-width:0}
.townbooks .mfname{font-size:12.5px;font-weight:500;line-height:1.3;
  color:var(--offwhite);overflow:hidden;display:-webkit-box;
  -webkit-line-clamp:2;-webkit-box-orient:vertical}
.townbooks .mfname b{font-weight:700}
.townbooks .mfprod:hover .mfname{color:var(--orange)}
.townbooks .mfwhy{font-size:10.5px;line-height:1.35;
  color:rgba(245,241,232,.62);overflow:hidden;display:-webkit-box;
  -webkit-line-clamp:3;-webkit-box-orient:vertical}
/* THE DISCLOSURE. Quiet, never styled away: a disclosed affiliate link made
   invisible is worse than an undisclosed one, because the styling is the
   part that looks deliberate. */
.townbooks .mfnote{margin-top:1px;font-size:10px;line-height:1.3;
  color:rgba(245,241,232,.48)}
