:root {
  --paper: #f3efe4; --card: #fffdf8; --ink: #23272e; --muted: #626872; --line: #e0d8c6;
  --blue: #2f6f62; --blue-dk: #1f4d44; --sky: #9fd3e6; --amber: #e3a33b; --amber-dk: #9c6b14; --rust: #b5562f; --teal: #2f6f62;
  --radius: 14px; --shadow: 0 1px 0 rgba(35,39,46,.04), 0 6px 18px rgba(35,39,46,.06);
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink);
  background: var(--paper) radial-gradient(circle at 4% 0%, rgba(47,111,98,.13), transparent 42%), radial-gradient(circle at 96% 28%, rgba(227,163,59,.12), transparent 46%); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-dk); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1080px; margin: 0 auto; padding: 18px 18px 6px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.01em; font-family: var(--serif); }
.sub { margin: 0; color: var(--muted); font-size: .92rem; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
main { max-width: 1080px; margin: 0 auto; padding: 6px 18px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
main > *, .two > * { min-width: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }
.banner { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; font-size: .93rem; }
.banner.bad { background: #f6dcd2; color: #8e2f1a; }
.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--blue-dk); text-decoration: underline; font-weight: 600; cursor: pointer; }
.sm-link { font-size: .85rem; font-weight: 400; }
button { cursor: pointer; border-radius: 10px; border: 1px solid transparent; padding: 9px 14px; min-height: 42px; background: none; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(47,95,122,.35); outline-offset: 2px; }
.ghost { background: transparent; border-color: var(--line); }
.ghost:hover { background: #ebe5d6; }
.solid { background: var(--blue); color: #fff; font-weight: 600; }
.solid:hover { background: var(--blue-dk); }
.sm { min-height: 34px; padding: 3px 10px; font-size: 1rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
h2 { font-family: var(--serif); font-size: 1.12rem; margin: 0; }
.hand { font-family: var(--hand); font-size: 2rem; color: var(--blue-dk); font-weight: 700; margin: 0; line-height: 1.1; }
.hand.big { font-size: 2.9rem; margin-top: 10px; }
.step-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.step-aside, .hint { color: var(--muted); font-size: .88rem; }
.hint { margin: 10px 0 0; }
input, select { border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 6px 9px; min-height: 38px; }
input[type=number] { width: 4.6em; text-align: center; font-weight: 600; }

.hero { background: linear-gradient(160deg, #fffdf8, #f1efe6); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 20px 20px; }
.lede { max-width: 62ch; margin: 8px 0 4px; }
.search input[type=search] { flex: 1 1 240px; min-width: 0; }
.results { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.results button { background: #e4eef2; color: var(--blue-dk); border-color: #cfe0e7; }
.results button:hover { background: #d4e6ee; }
.place-line { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: .93rem; }
.place { font-weight: 700; }
.reading { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; font-size: 1.05rem; }
.stepper { display: inline-flex; gap: 4px; align-items: center; }
.small { font-size: .86rem; }
code { background: #efe9da; padding: 0 4px; border-radius: 4px; font-size: .9em; }
.kicker { margin: 0; color: var(--muted); font-size: .92rem; }
.hand.big.no { color: var(--rust); }
.chip.ok { background: #dcebe5; color: var(--blue-dk); }
.chip.bad { background: #f6dcd2; color: #8e2f1a; }
.chip.pay { background: #dbe6f0; color: #24486a; }
.chip.warn { background: #fbefc8; color: #7a5410; }
.row.tight { margin-top: 4px; gap: 6px; }

.pole-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 16px; align-items: start; }
@media (max-width: 560px) { .pole-wrap { grid-template-columns: minmax(0, 1fr); } }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px 11px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .95rem; line-height: 1.55; resize: vertical; }
textarea:focus-visible { outline: 3px solid rgba(47,111,98,.3); outline-offset: 1px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.chipbtn { min-height: 32px; padding: 2px 11px; border-radius: 999px; background: #e3eee9; color: var(--blue-dk); border: 1px solid #cde0d8; font-weight: 600; font-size: .9rem; }
.chipbtn:hover { background: #d3e6de; }
.photo { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.photo summary { cursor: pointer; font-weight: 600; color: var(--blue-dk); }
.filebtn { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; cursor: pointer; min-height: 38px; }
.filebtn input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* the pole, drawn */
.pole { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 40px; min-height: 160px; }
.pole::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 10px; margin-left: -5px; background: linear-gradient(90deg, #a7a092, #d9d3c3 45%, #9a9385); border-radius: 3px; z-index: 0; }
.plate { position: relative; z-index: 1; width: 150px; background: #fff; border: 2px solid #2b2b2b; border-radius: 6px; padding: 6px 6px 7px; text-align: center; box-shadow: 0 2px 0 rgba(0,0,0,.12); font-family: Arial, Helvetica, sans-serif; color: #1f6b3a; line-height: 1.15; }
.plate .big { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; display: block; }
.plate .word { font-weight: 800; font-size: .95rem; display: block; letter-spacing: .02em; }
.plate .when { font-size: .74rem; font-weight: 700; display: block; margin-top: 3px; text-transform: uppercase; }
.plate .note { font-size: .68rem; font-weight: 700; display: block; margin-top: 3px; text-transform: uppercase; }
.plate.red { color: #c0281c; }
.plate.clearway { background: #c0281c; color: #fff; border-color: #8a1a12; }
.plate.permit { color: #1f6b3a; }
.plate.unknown { color: #6b6b6b; border-style: dashed; background: #faf7ee; font-family: inherit; }
.plate .slash { display: inline-block; width: 26px; height: 26px; border: 3px solid currentColor; border-radius: 50%; position: relative; vertical-align: middle; }
.plate .slash::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 3px; margin-left: -1.5px; background: currentColor; transform: rotate(-45deg); }
.plate.active { outline: 3px solid var(--amber); outline-offset: 2px; }
.pole-empty { position: relative; z-index: 1; background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; font-size: .85rem; color: var(--muted); text-align: center; width: 150px; }

.field { margin-bottom: 12px; }
.field > label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 2px; }
.toggles { border: 0; padding: 0; margin: 0 0 6px; }
.toggles legend { font-weight: 600; font-size: .93rem; padding: 0; margin-bottom: 4px; }
.toggles label { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: .95rem; }
.toggles input { width: 18px; height: 18px; min-height: 0; accent-color: var(--blue); }
.saved { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.mini { font-family: var(--serif); font-size: 1rem; margin: 0 0 6px; }
.saved-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.saved-list li { display: inline-flex; align-items: center; background: #ebe5d6; border-radius: 999px; padding-left: 4px; }
.saved-list button { min-height: 30px; padding: 2px 8px; font-size: .9rem; }
.saved-list .x { color: var(--muted); padding: 2px 8px 2px 2px; }

/* week grid */
.week { display: grid; grid-template-columns: 74px repeat(48, minmax(0, 1fr)); gap: 1px 0; font-size: .78rem; user-select: none; }
.week .dl { color: var(--muted); padding-right: 6px; align-self: center; white-space: nowrap; font-weight: 600; }
.week .hr { color: var(--muted); font-size: .7rem; grid-column: span 6; border-left: 1px solid var(--line); padding-left: 2px; }
.week .c { height: 26px; border: 0; padding: 0; min-height: 0; border-radius: 0; position: relative; }
.week .c:hover { filter: brightness(.92); }
.week .c.now::after { content: ""; position: absolute; left: 0; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.week .c.st { box-shadow: inset 0 -6px 0 var(--amber-dk); }
.c.free, .sw.free { background: #cfe5d6; }
.c.paid, .sw.paid { background: #bcd3e6; }
.c.limit, .sw.limit { background: #f2dca6; }
.c.permit, .sw.permit { background: #d9cde6; }
.c.no, .sw.no { background: #e9b3a2; }
.sw { display: inline-block; width: 14px; height: 12px; border-radius: 3px; margin: 0 3px 0 8px; vertical-align: -1px; }
.sw.stay { background: var(--amber-dk); height: 5px; vertical-align: 2px; }
@media (max-width: 700px) { .week { grid-template-columns: 44px repeat(48, minmax(0, 1fr)); } .week .hr:nth-child(odd) { visibility: hidden; } }
.foot { max-width: 80ch; margin: 4px 2px 0; }
.link-ish { background: none; border: 0; color: var(--ink); font-weight: 600; }
.stat .num { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--blue-dk); }
.stat .num small { font-family: inherit; font-size: .9rem; color: var(--muted); font-weight: 400; }
.stat .vs { font-size: .86rem; color: var(--muted); }


.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: #ebe5d6; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat .lbl { color: var(--muted); font-size: .84rem; }
.stat .num { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--blue-dk); }
.stat .num small { font-family: inherit; font-size: .9rem; color: var(--muted); font-weight: 400; }
.stat .vs { font-size: .86rem; color: var(--muted); }
.key { font-size: .82rem; color: var(--muted); display: inline-flex; gap: 2px; flex-wrap: wrap; align-items: center; }
