/* btown-pages/kit/pages.css: the one plain style every full page shares.
   Do not restyle a page in its own file beyond layout it truly needs; the final look is
   applied here once and every page changes together. Tokens first, then the pieces. */
:root {
  --bg: #F6F1E7; --card: #FFFDF8; --soft: #EFE7D8; --ink: #2B241D; --ink-2: #6F6457; --rule: #E3DACA;
  --accent: #C94F1E; --accent-ink: #FFFDF8; --good: #4F7A3A; --warn: #B7791F; --bad: #B3261E;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 16px; --radius: 16px; --shadow: 0 1px 2px rgba(43, 36, 29, .08), 0 6px 18px rgba(43, 36, 29, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1B1814; --card: #27221C; --soft: #312A23; --ink: #F1E9DC; --ink-2: #B5A999; --rule: #3A3229; --accent: #E8743D; --accent-ink: #1B1814; --good: #8FBF73; --warn: #E0B15A; --bad: #F08A80; --shadow: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .055); }
}
:root[data-theme="light"] { --bg: #F6F1E7; --card: #FFFDF8; --soft: #EFE7D8; --ink: #2B241D; --ink-2: #6F6457; --rule: #E3DACA; --accent: #C94F1E; --accent-ink: #FFFDF8; --good: #4F7A3A; --warn: #B7791F; --bad: #B3261E; }
:root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] { --bg: #1B1814; --card: #27221C; --soft: #312A23; --ink: #F1E9DC; --ink-2: #B5A999; --rule: #3A3229; --accent: #E8743D; --accent-ink: #1B1814; --good: #8FBF73; --warn: #E0B15A; --bad: #F08A80; --shadow: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .055); }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--sans); padding-bottom: env(safe-area-inset-bottom); }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter) 48px; }
.wrap.wide { max-width: 980px; }
/* the top of every page: back to the index, the title, nothing else */
.top { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; }
.top .back { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--soft); text-decoration: none; font: 700 22px/1 var(--sans); flex: none; }
.top .theme { margin-left: auto; flex: none; width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font: 400 17px/1 var(--sans); cursor: pointer; }
.mast .theme { flex: none; width: 36px; height: 36px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink); font: 400 16px/1 var(--sans); cursor: pointer; }
.top h1 { margin: 0; font: 700 22px/1.15 var(--serif); letter-spacing: -.01em; }
/* the answer: one big line that is the reason the page exists */
.big { margin: 10px 0 14px; padding: 22px 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.big .word { font: 800 44px/1 var(--serif); letter-spacing: -.02em; }
.big .line { margin-top: 8px; font: 500 16px/1.4 var(--sans); color: var(--ink-2); }
.big.yes .word, .big.good .word { color: var(--good); } .big.no .word { color: var(--ink); } .big.warn .word { color: var(--warn); } .big.bad .word { color: var(--bad); }
h2 { margin: 26px 0 10px; font: 800 12.5px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.card { margin: 10px 0; padding: 14px 16px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; font: 700 18px/1.2 var(--serif); }
.card p { margin: 4px 0 0; color: var(--ink-2); }
.kicker { font: 800 11px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows > li, .row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.rows > li:last-child { border-bottom: 0; }
.row .t, .rows .t { flex: 1; min-width: 0; }
.row .hed, .rows .hed { font: 700 16.5px/1.25 var(--serif); }
.row .sub, .rows .sub { font: 500 13.5px/1.35 var(--sans); color: var(--ink-2); margin-top: 2px; }
.row img, .rows img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; background: var(--soft); }
.num { font: 800 15px/1.3 var(--sans); color: var(--accent); min-width: 22px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.fact { padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.fact b { display: block; font: 800 22px/1.1 var(--serif); }
.fact span { display: block; margin-top: 3px; font: 500 12.5px/1.3 var(--sans); color: var(--ink-2); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 10px 14px; cursor: pointer; border: 0; border-radius: 999px; background: var(--soft); font: 700 13.5px/1 var(--sans); text-decoration: none; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--bg); }
.chip b { margin-left: 6px; font-weight: 800; color: var(--accent); } .chip.on b { color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--soft); font: 700 15px/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.block { display: flex; width: 100%; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
/* the doors a real-life thing gets: I'm in, Calendar, Text a friend, Directions */
.doors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.door { padding: 11px 14px; border-radius: 999px; background: var(--soft); font: 700 13px/1 var(--sans); text-decoration: none; }
.door.going { background: var(--soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); } .door.going.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; } .door.going.on::after { content: " ✓"; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; margin-bottom: 6px; font: 700 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font: 500 16px/1.3 var(--sans); -webkit-appearance: none; appearance: none; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); }
/* every reference fact says when it was checked and where it came from */
.stamp { font: 600 11.5px/1.3 var(--sans); color: var(--ink-2); }
.stamp a { text-decoration: underline; text-underline-offset: 2px; }
.pill { display: inline-block; padding: 4px 9px; border-radius: 999px; background: var(--soft); font: 700 11.5px/1 var(--sans); color: var(--ink-2); }
.pill.good { background: var(--good); color: var(--bg); } .pill.warn { background: var(--warn); color: var(--bg); } .pill.bad { background: var(--bad); color: var(--bg); }
.map { height: 56vh; min-height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--soft); margin: 10px 0; }
.map.tall { height: 72vh; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sponsor { margin: 16px 0; padding: 12px 14px; border: 1px dashed var(--rule); border-radius: 14px; font: 600 13px/1.35 var(--sans); color: var(--ink-2); }
.sponsor[hidden] { display: none; }
.empty { margin: 18px 0; color: var(--ink-2); }
/* long answers: add .long to .big when the answer is a phrase, not a word */
.big .word { text-wrap: balance; overflow-wrap: break-word; }
.big.long .word { font-size: 30px; line-height: 1.08; }
.rows .hed a, .row .hed a, .card h3 a { text-decoration: none; }
/* a chip bar that runs off the edge fades out, so a cut label reads as "more this way" */
.chips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); padding-right: 30px; }
.chips.wrap-all { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; padding-right: var(--gutter); }
/* long lists: show the first screenful, then one button (P.more) */
.more { display: flex; width: 100%; margin: 12px 0; }
/* street maps in dark mode: P.map tags its OSM layer .bp-osm; add className: 'bp-osm' to any OSM layer you add yourself. Never put it on photo or aerial tiles. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bp-osm { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.55); }
  :root:not([data-theme="light"]) .leaflet-container:has(.bp-osm) { background: #27301f !important; }
  :root:not([data-theme="light"]) .leaflet-bar a, :root:not([data-theme="light"]) .leaflet-bar a:hover { background: var(--card) !important; color: var(--ink) !important; border-color: var(--rule) !important; }
  :root:not([data-theme="light"]) .leaflet-control-attribution { background: rgba(27, 24, 20, .7) !important; color: var(--ink-2) !important; }
  :root:not([data-theme="light"]) .leaflet-control-attribution a { color: var(--ink-2) !important; }
  :root:not([data-theme="light"]) .leaflet-popup-content-wrapper, :root:not([data-theme="light"]) .leaflet-popup-tip { background: var(--card) !important; color: var(--ink) !important; }
}
:root[data-theme="dark"] .bp-osm { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.55); }
:root[data-theme="dark"] .leaflet-container:has(.bp-osm) { background: #27301f !important; }
:root[data-theme="dark"] .leaflet-bar a, :root[data-theme="dark"] .leaflet-bar a:hover { background: var(--card) !important; color: var(--ink) !important; border-color: var(--rule) !important; }
:root[data-theme="dark"] .leaflet-control-attribution { background: rgba(27, 24, 20, .7) !important; color: var(--ink-2) !important; }
:root[data-theme="dark"] .leaflet-control-attribution a { color: var(--ink-2) !important; }
:root[data-theme="dark"] .leaflet-popup-content-wrapper, :root[data-theme="dark"] .leaflet-popup-tip { background: var(--card) !important; color: var(--ink) !important; }
/* Leaflet draws hairline seams between tiles at fractional zoom; a half-pixel overlap hides them */
.leaflet-container img.leaflet-tile { outline: 1px solid transparent; }
[hidden] { display: none !important; }
/* a select says it opens */
.field select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23908473' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
/* the last row P.more leaves showing has no rule under it */
.rows > li:has(+ li[hidden]) { border-bottom: 0; }
/* paper is light, whatever the phone is set to */
@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --card: #fff; --soft: #f2f2f2; --ink: #000; --ink-2: #444; --rule: #ccc; --accent: #C94F1E; --accent-ink: #fff; --good: #4F7A3A; --warn: #B7791F; --bad: #B3261E; --shadow: none; }
  .top .back, .chips, .btnrow, .doors, .more { display: none !important; }
  body { background: #fff; color: #000; }
}
