:root {
  --bg: #f7f6f2;
  --card: #ffffff;
  --ink: #1d2321;
  --muted: #5d6763;
  --line: #e2e0d8;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --warn: #9a5b00;
  --bad: #a3312a;
  --ok: #2c6e3f;
  --chip: #ebe9e1;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615;
    --card: #1b211f;
    --ink: #e8ece9;
    --muted: #9aa5a0;
    --line: #2b3431;
    --accent: #5fbfa3;
    --accent-ink: #0d1a16;
    --warn: #e0a64a;
    --bad: #ef8a80;
    --ok: #7fcb94;
    --chip: #26302d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }

.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: .2px; }
.city { color: var(--muted); }

main { max-width: 640px; margin: 0 auto; padding: 12px 16px 24px; }
.pad { padding: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 3;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;   /* as many tabs as there are */
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  text-align: center; padding: 14px 0; text-decoration: none; color: var(--muted);
  font-weight: 600;
}
.tabs a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 12px 0;
}
.card h2 { font-size: 15px; margin: 0 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.card h3 { font-size: 17px; margin: 0; }

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.place { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.place:first-of-type { border-top: 0; }
.place .name { font-weight: 600; }
.why { color: var(--muted); font-size: 14px; }

.btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
}
a.btn { display: inline-block; text-decoration: none; color: inherit; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--bad); }
.chip {
  border: 1px solid var(--line); background: var(--chip); border-radius: 999px;
  padding: 5px 12px; font-size: 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.fact { background: var(--chip); border-radius: 10px; padding: 8px; text-align: center; }
.fact b { display: block; font-size: 18px; }
.fact span { font-size: 13px; color: var(--muted); }

.insp-ok { color: var(--ok); }
.insp-warn { color: var(--warn); }
.insp-bad { color: var(--bad); }

input[type="search"], select {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }

.guide p { margin: 0 0 10px; white-space: pre-line; }
.guide ul { margin: 0 0 10px; padding-left: 20px; }
.guide li { margin-bottom: 6px; }
.attrib { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.refused { font-size: 14px; color: var(--muted); background: var(--chip); border-radius: 10px; padding: 8px 10px; }

.sheet {
  position: fixed; inset: 0; z-index: 5; background: rgba(0,0,0,.35);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet[hidden] { display: none; }
.sheet .panel {
  background: var(--bg); width: 100%; max-width: 640px; max-height: 85vh; overflow: auto;
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
}
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.note { font-size: 14px; color: var(--muted); }

/* mock-ups */
.top { flex-wrap: wrap; }
.cue {
  border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 600; padding: 4px 10px; cursor: pointer;
}
.trust {
  margin-left: auto; border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  font-size: 13px; padding: 4px 10px; cursor: pointer;
}
.narration { border-style: dashed; background: transparent; }
.question { border: 2px solid var(--accent); }
.alert { border: 2px solid var(--warn); }
.alert blockquote { margin: 8px 0; padding: 8px 10px; background: var(--chip); border-radius: 10px; }
.log { padding-left: 18px; }
.log li { margin-bottom: 8px; }
.researcher {
  position: fixed; left: 0; right: 0; bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 4;
  background: repeating-linear-gradient(45deg, var(--chip), var(--chip) 8px, var(--bg) 8px, var(--bg) 16px);
  border-top: 2px dashed var(--muted); padding: 8px 16px; display: grid; gap: 6px;
}
.researcher[hidden] { display: none; }
.researcher select { width: auto; flex: 1; margin: 0 8px; }
body:has(.researcher:not([hidden])) main { padding-bottom: 140px; }

/* session kit */
.rate { border-style: dotted; }
.rate .chip { min-width: 44px; }
.note-box, .researcher .btn.small { font: inherit; }
.note-box {
  width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink);
}
.btn.small { padding: 4px 10px; font-size: 13px; }
input[type="text"] {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}

/* study mode */
.cue-card { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.dismiss { float: right; margin: -4px -6px 0 8px; }
.rate-inline { border-top: 1px dotted var(--line); margin-top: 10px; padding-top: 6px; }
details summary { cursor: pointer; padding: 6px 0; }

/* weather */
.weather { padding: 10px 16px; }
.getting-there .row { padding: 4px 0; border-top: 1px solid var(--line); }

/* map presenter */
.mapbox { width: 100%; border-radius: 12px; overflow: hidden; margin: 8px 0; background: var(--chip); }
.pin {
  width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.35);
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--card);
  font: 600 13px system-ui, sans-serif; cursor: pointer; padding: 0;
}
.you { width: 14px; height: 14px; border-radius: 50%; background: #2a6fdb; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(42,111,219,.35); }
.view-toggle .chip { padding: 3px 10px; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* presenter by context */
.presenter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin: 4px 0 6px; }
.presenter-why { margin: 0; flex: 1 1 60%; }
.drive-floor { border: 2px solid var(--warn); }
.mode-pick { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); padding: 6px 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.mode-pick[aria-pressed="true"] { background: var(--chip); }

/* guided tour */
.tour {
  position: fixed; left: 0; right: 0; bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 4;
  max-height: 46vh; overflow: auto; padding: 12px 16px;
  background: var(--card); border-top: 3px solid var(--accent); box-shadow: 0 -6px 18px rgba(0,0,0,.18);
}
.tour h3 { margin: 4px 0 6px; }
.tour p { margin: 0 0 8px; font-size: 15px; }
.tour .tour-notice { background: var(--chip); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.tour .dots { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 50%; }
.tour .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour .dot.on { background: var(--accent); }
body.touring main { padding-bottom: 50vh; }
.tour-focus { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; animation: tourpulse 1.6s ease-out 2; }
@keyframes tourpulse { 0% { outline-color: var(--accent); } 50% { outline-color: transparent; } 100% { outline-color: var(--accent); } }

/* mock-ups: scene and cue */
.scene-when { margin: 0 0 6px; }
.cue.pulse { animation: cuepulse 1s ease-out 3; }
@keyframes cuepulse { 0% { box-shadow: 0 0 0 0 rgba(95,191,163,.7); } 100% { box-shadow: 0 0 0 12px rgba(95,191,163,0); } }

/* add-ons */
.addon { border-top: 1px solid var(--line); padding: 8px 0; }
.addon.off { opacity: .55; }
.addon .kind { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.handoff-text { background: var(--chip); border-radius: 10px; padding: 10px; }
.dial { display: inline-flex; gap: 4px; margin-top: 6px; }
.dial .chip { padding: 2px 10px; font-size: 13px; }
.qr { display: block; margin: 8px auto; background: #fff; padding: 8px; border-radius: 8px; }
.qr-pair { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.qr-pair figure { margin: 0; text-align: center; }
.meal-row { gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.meal-row .meal-name { min-width: 80px; }
.you-note { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; }
.moment-note { margin: 0 0 8px; }
.json { font-size: 12px; background: var(--chip); border-radius: 8px; padding: 8px; overflow: auto; max-height: 34vh; white-space: pre; }
.param { border-top: 1px solid var(--line); padding: 8px 0; }
.param .status { font-size: 12px; border-radius: 8px; padding: 1px 8px; background: var(--chip); }
.param .status.proposed { outline: 1px dashed var(--accent); }
.param .status.rejected { opacity: .6; text-decoration: line-through; }
.param .value { font-weight: 600; }
.linkish { background: none; border: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }
.tol { width: 6em; }
.lines .line { display: inline-block; border-radius: 4px; padding: 0 6px; margin-right: 3px; background: var(--line); color: #fff; font-size: 12px; }
.open-now { color: var(--accent); font-weight: 600; }
.closed-now { color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; }
.timeline .seg { width: 100%; text-align: left; }
.timeline .seg.walk, .timeline .seg.bike, .timeline .seg.vehicle, .timeline .seg.transit, .timeline .seg.gap { border-left: 3px solid var(--accent); padding-left: 10px; }
.timeline .tagged { color: var(--accent); }
.panel input[type=text] { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: inherit; }

/* Getting to know you */
.freq-row { padding: 4px 0; border-bottom: 1px solid var(--line, #8883); gap: 8px; }
.freq-row select { max-width: 55%; }
.know select, .know input[type="search"] { width: 100%; margin: 4px 0; }
.know .place { width: 100%; text-align: left; }
.answers { padding-left: 18px; margin: 8px 0; }
.answers li { margin: 2px 0; }

/* Days: an outing's row, heading its stops and legs */
.seg.outing { border-left: 3px solid var(--accent); padding-left: 10px; }

/* "Why?": hidden until asked (present/why.js) */
.why-wrap { margin-top: 6px; text-align: right; }
.why-toggle { color: var(--muted, #888); }
.why-panel { text-align: left; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line, #8883); font-size: 0.9em; }
.why-head { margin: 8px 0 4px; font-size: 0.85em; opacity: 0.75; }
.why-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.why-chip { border: 1px solid var(--line, #8885); border-radius: 6px; padding: 1px 8px; font-size: 0.85em; }
.why-used { list-style: none; padding: 0; margin: 0; }
.why-used li { margin: 3px 0; }
.why-src { font-size: 0.75em; border-radius: 6px; padding: 1px 6px; background: #8882; }
.why-src.src-said { background: #1d9e7533; }
.why-src.src-days { background: #7f77dd33; }
.why-src.src-guess { background: #ba751733; }
.why-next { display: grid; grid-template-columns: minmax(0, 8em) minmax(0, 1fr) 3em; gap: 4px 8px; align-items: center; margin: 4px 0 6px; font-size: 0.9em; }
.why-bar { display: block; height: 8px; background: var(--chip); border-radius: 4px; overflow: hidden; }
.why-fill { display: block; height: 100%; width: 0; background: var(--muted); border-radius: 4px; }
.why-fill.top { background: var(--accent); }
.why-pct { text-align: right; font-variant-numeric: tabular-nums; }

/* Ratings from Google Maps (ratings.js): always attributed */
.stars { font-weight: 600; }
.gm { color: var(--muted); font-size: 0.85em; }

/* Your areas (area.js): while drawing, the finger draws instead of panning */
.drawing .maplibregl-canvas-container { cursor: crosshair; touch-action: none; }

/* Typed entries (docs/TYPED-ENTRY.md): her words, shown as typed */
.panel textarea { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: inherit; resize: vertical; }
.panel input[type=time] { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: inherit; margin: 0 4px; }
.typed-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 2px 0; }

/* Her own ratings (myratings.js) */
.my-stars { display: flex; gap: 2px; }
.my-stars .star { background: none; border: 0; padding: 4px 6px; font-size: 1.4rem; line-height: 1; color: var(--accent, #1f6f5c); cursor: pointer; min-width: 36px; min-height: 36px; }
.stars.mine { color: var(--accent, #1f6f5c); }

/* the test copy at /citylens/test/ (js/variant.js) */
.test-copy .brand::after { content: ' TEST'; color: var(--warn, #e0a030); font-weight: 700; }
.test-copy .top { box-shadow: inset 0 -3px 0 var(--warn, #e0a030); }

/* a new version is ready (main.js newVersionBanner) */
.new-version { margin: 8px max(16px, calc((100% - 608px) / 2)) 0; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--card); color: var(--ink); border: 1px solid var(--accent); }
.new-version { flex-wrap: wrap; }
.new-version span { flex: 1; }
.new-version .whats-new { flex-basis: 100%; margin: 0; color: var(--muted, inherit); }

/* moving answers between devices (views/know.js) */
.qr-big { display: block; width: min(80vw, 320px); height: auto; margin: 10px auto; image-rendering: pixelated; background: #fff; }
video.scan { display: block; width: 100%; max-height: 50vh; border-radius: 12px; background: #000; }
.row.wrap { flex-wrap: wrap; align-items: center; }
/* favourite neighbourhoods as a checklist (views/know.js) */
.check-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line, #8883); border-radius: 10px; padding: 4px 10px; margin: 8px 0; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line, #8883); }
.check-row:last-child { border-bottom: 0; }
.check-row input { width: 20px; height: 20px; flex: none; }
.check-row[hidden], .check-head[hidden] { display: none; }
.check-head { margin: 10px 0 2px; text-transform: uppercase; letter-spacing: .04em; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 6px 0; }
/* "Don't suggest it" on Food's list rows (views/food.js) */
.place-wrap { position: relative; border-top: 1px solid var(--line); }
.place-wrap:first-child { border-top: 0; }
.place-wrap .place { border-top: 0; padding-right: 44px; }
.hide-x { position: absolute; right: 0; bottom: 8px; width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 15px; cursor: pointer; }

/* ======================================================================
   Easy to see, easy to tap (Maria, 30 Oct: the interface "does not seem to be
   usable to older people or people who are not tech savvy"; "be creative,
   inclusive, bright, obvious"). One layer over the rules above, so it can be
   read, tuned or removed in one place:
   - text at 17px, nothing under 15px except fine print;
   - every control at least 44px tall, with a visible edge, not just coloured text;
   - brighter colours with strong contrast (white on teal 6.2:1, ink on cream 15:1),
     a sunny yellow for focus and the current tab;
   - a picture and a word on every tab; state shown in words and marks, never colour alone.
   The levels keep their order of strength: a cue stays smaller than a card,
   a card smaller than a question (the study compares them).
   ====================================================================== */
:root {
  --bg: #fbf8f1;
  --ink: #15201d;
  --muted: #4a5551;
  --line: #d9d3c4;
  --accent: #0b6e58;
  --accent-soft: #dff3ec;
  --sun: #ffcf33;
  --chip: #efeadf;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101413; --ink: #f1f4f2; --muted: #b3bdb8; --line: #36403c;
    --accent: #6fd3b5; --accent-ink: #062019; --accent-soft: #173a31; --sun: #ffd84d; --chip: #26302d;
  }
}
body { font-size: 17px; line-height: 1.5; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.small, .note, .why, .kv, .tour p, .why-panel, .refused, .tour .tour-notice { font-size: 15px; }
.attrib, .fact span, .addon .kind, .param .status { font-size: 14px; }
.brand { font-size: 19px; }

/* headings say what a card is, in plain words, not small grey capitals */
.card { padding: 16px 18px; border-width: 1.5px; }
.card h2 { font-size: 19px; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 700; margin-bottom: 10px; }
.card h3 { font-size: 18px; }
.card > p:first-child, .card > div:first-child > p:first-child { margin-top: 0; }

/* buttons: big, solid, obvious */
.btn {
  min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 2px solid var(--accent);
  background: var(--card); color: var(--accent); font-weight: 700; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 16px; }
.btn:disabled { opacity: .55; }

/* choices: chips you can't miss, with a tick when chosen (not colour alone) */
.chip, .rate .chip, .dial .chip, .view-toggle .chip {
  min-height: 44px; padding: 8px 16px; font-size: 16px; font-weight: 600;
  border: 2px solid var(--line); background: var(--card); display: inline-flex; align-items: center;
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip[aria-pressed="true"]::before { content: "✓ "; white-space: pre; }

/* text links that act: tall enough to hit, underlined clearly */
.linkish {
  min-height: 44px; display: inline-flex; align-items: center; font-weight: 600;
  text-decoration-thickness: 2px; text-underline-offset: 4px; padding: 0 2px;
}
main a { text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 600; }
/* links that stand on their own line ("More food", "Next arrivals") get a full-size target */
.row > a, .row.spread > a, .why-wrap > a { min-height: 44px; display: inline-flex; align-items: center; }

/* "Why?" as a small button with an info mark */
.why-toggle {
  min-height: 44px; padding: 6px 14px; border: 2px solid var(--accent); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 700;
}
.why-toggle::before { content: "ⓘ "; white-space: pre; }

/* more inside: an arrow that turns */
details > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; font-size: 20px; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }

/* places in lists: roomy rows, bold names */
.place { padding: 14px 0; }
.place .name { font-size: 18px; }
.hide-x { width: 44px; height: 44px; border-radius: 22px; border-width: 2px; font-size: 18px; bottom: 6px; }

/* fields */
input[type="text"], input[type="search"], input[type="email"], select, .panel input[type=text] {
  min-height: 48px; font-size: 17px; border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px;
}
.check-row { padding: 10px 0; }
.check-row input, input[type="checkbox"] { width: 24px; height: 24px; }

/* the small cue stays the smallest thing, but big enough to tap */
.cue { font-size: 15px; padding: 10px 16px; min-height: 44px; }
.trust { font-size: 15px; padding: 8px 14px; min-height: 40px; }

/* the tabs: a picture and a word, the current one lit */
.tabs { border-top: 2px solid var(--line); }
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 0 12px; font-size: 15px; color: var(--muted);
}
.tabs a::before { font-size: 24px; line-height: 1; }
.tabs a[data-tab="now"]::before { content: "📍"; }
.tabs a[data-tab="food"]::before { content: "🍽️"; }
.tabs a[data-tab="days"]::before { content: "📔"; }
.tabs a[data-tab="guide"]::before { content: "🧭"; }
.tabs a[data-tab="you"]::before { content: "👤"; }
.tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 4px 0 var(--sun); background: var(--accent-soft); }

/* where the keyboard is: a thick sunny ring */
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 8px; }

/* the new-version bar and notices: impossible to miss */
.new-version { border: 2px solid var(--accent); background: var(--accent-soft); font-size: 16px; }
.study-nudge .card, .study-card { border: 2px solid var(--accent); }

@media (prefers-reduced-motion: reduce) { details > summary::before { transition: none; } }

/* the weather at a glance: a big picture, the temperature, the words (30 Oct) */
.wx { display: flex; align-items: center; gap: 14px; }
.wx-icon { font-size: 52px; line-height: 1; }
.wx-main { font-size: 19px; }
.wx-temp { font-size: 30px; }
.wx-rain { color: var(--muted); }
.wx-rain.wet { color: var(--ink); font-weight: 700; }

/* ======================================================================
   More contrast, bolder pictures (Maria, 30 Oct: "more contrast in the items,
   icons more pronounced"). Cards stand off the page; each place has a picture
   tile; open/closed is a badge with words; the distance is a pill.
   ====================================================================== */
:root { --card-edge: #cfc6b2; --tile: #fff1c7; --open-bg: #d9f2e6; --open-ink: #0a5a46; --soon-bg: #ffe9b8; --soon-ink: #7a4b00; --shut-bg: #ece8de; --shut-ink: #4a5551; }
@media (prefers-color-scheme: dark) {
  :root { --card: #1d2523; --card-edge: #46524d; --tile: #3a3420; --open-bg: #12402f; --open-ink: #8fe6c3; --soon-bg: #4a3608; --soon-ink: #ffd27a; --shut-bg: #2c3532; --shut-ink: #c4ccc8; }
}
.card { border: 1.5px solid var(--card-edge); box-shadow: 0 2px 6px rgb(0 0 0 / .08); }

/* card headings carry a picture too */
.food-card h2::before { content: "🍽️ "; }
.stops-card h2::before { content: "🚏 "; }
.commute h2::before { content: "🧭 "; }

/* a place: picture tile, then the words */
.place.with-icon { display: flex; gap: 14px; align-items: flex-start; }
.p-icon {
  flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--tile);
  display: flex; align-items: center; justify-content: center; font-size: 28px; line-height: 1;
}
.p-body { flex: 1; min-width: 0; display: block; }
.place .name { font-weight: 700; color: var(--ink); }
.place .why { color: var(--muted); }
.dist {
  flex: none; font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--chip); color: var(--ink); white-space: nowrap;
}
.place-wrap { border-top: 1.5px solid var(--line); }
.badge {
  display: inline-block; margin: 4px 0 2px; padding: 2px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
}
.badge.open { background: var(--open-bg); color: var(--open-ink); }
.badge.open::before { content: "● "; }
.badge.soon { background: var(--soon-bg); color: var(--soon-ink); }
.badge.soon::before { content: "◐ "; }
.badge.closed { background: var(--shut-bg); color: var(--shut-ink); }
.badge.closed::before { content: "○ "; }

/* Remove under a Days entry: small and quiet, out of the way of the thumb
   (Maria, 30 Oct: "too easy to accidentally click on"); it still asks first */
.remove-quiet {
  display: block; margin: 2px 0 0 auto; padding: 4px 6px; min-height: 0;
  background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 400;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.remove-quiet.inline { display: inline; margin: 0; padding: 4px 2px; font-size: inherit; }
.diary-day { margin: 16px 0 4px; font-size: 17px; border-bottom: 1.5px solid var(--line); padding-bottom: 4px; }

/* ======================================================================
   A colour for each kind of thing (Maria, 30 Oct: cards "outlined or highlighted
   in different colours, to make it doubly clear"). A thick stripe down the left
   and a tinted heading; the picture and the words still say what it is, so the
   colour is a second signal, never the only one. The same colour at every level
   (small line, card, question), so the study's levels stay equal.
     food: tomato · new places: violet · transit and commute: blue ·
     weather: sun · city basics: teal · CityLens itself (study, notices): green
   ====================================================================== */
:root {
  --k-food: #d4572a; --k-fresh: #7a4fc9; --k-transit: #1f6fd1; --k-weather: #e0a100; --k-orient: #0f8f86; --k-self: #0b6e58;
  --k-food-soft: #fdebe3; --k-fresh-soft: #efe8fb; --k-transit-soft: #e4eefb; --k-weather-soft: #fff4d1; --k-orient-soft: #dff4f2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --k-food: #ff8a5c; --k-fresh: #b393ff; --k-transit: #6eaaff; --k-weather: #ffd04d; --k-orient: #4fd1c5; --k-self: #6fd3b5;
    --k-food-soft: #3a2219; --k-fresh-soft: #2a2140; --k-transit-soft: #19283d; --k-weather-soft: #3a3012; --k-orient-soft: #133331;
  }
}
.card[data-lens], .card.weather, .card.commute { border-left-width: 7px; }
.card[data-lens="food"]    { border-left-color: var(--k-food); }
.card[data-lens="fresh"]   { border-left-color: var(--k-fresh); }
.card[data-lens="transit"], .card.commute { border-left-color: var(--k-transit); }
.card.weather              { border-left-color: var(--k-weather); }
.card[data-lens="orient"]  { border-left-color: var(--k-orient); }
/* the heading sits on a band of its colour, edge to edge */
.card[data-lens] > h2, .card.weather > h2, .card.commute > h2 {
  margin: -16px -18px 12px -18px; padding: 12px 18px; border-radius: 0 calc(var(--radius) - 2px) 0 0;
}
.card[data-lens="food"] > h2    { background: var(--k-food-soft); }
.card[data-lens="fresh"] > h2   { background: var(--k-fresh-soft); }
.card[data-lens="transit"] > h2, .card.commute > h2 { background: var(--k-transit-soft); }
.card.weather > h2              { background: var(--k-weather-soft); }
.card[data-lens="orient"] > h2  { background: var(--k-orient-soft); }
/* the small line (cue) gets its stripe too, and stays the smallest thing */
.cue-card[data-lens] { border-left-width: 7px; }
/* each way of showing has its own look, whatever it is about (Maria, 10 Nov): a small tag on the top edge and
   an outline by level. The kind keeps its colour on the left; the level never changes colour, only shape. */
.card[data-level] { position: relative; margin-top: 20px; }
.card[data-level]::after {
  position: absolute; top: -10px; left: 14px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 16px;
  background: var(--card); color: var(--muted); border: 1.5px solid var(--line);
}
.card[data-level="ambient"] { border-style: dashed; border-left-style: solid; }
.card[data-level="ambient"]::after { content: "Heads-up"; border-style: dashed; }
.card[data-level="suggestion"]::after { content: "Card"; }
.card[data-level="question"] { border-width: 3px; border-left-width: 7px; border-style: double; border-left-style: solid; }
.card[data-level="question"]::after { content: "Question"; border-width: 3px; border-style: double; top: -13px; }
/* CityLens talking about itself: the study and notices, in its own green */
.study-nudge .card, .study-card { border-left: 7px solid var(--k-self); }

/* one shape for every card (Maria, 30 Oct): heading band, content, actions along the bottom */
.card.weather > h2::before { content: "🌤️ "; }
.card.study-card > h2:first-child {
  margin: -16px -18px 12px -18px; padding: 12px 18px; border-radius: 0 calc(var(--radius) - 2px) 0 0;
  background: var(--accent-soft);
}
.card.study-card > h2:first-child::before { content: "🔬 "; }
/* where you are, not found yet: the first thing, big and bright */
.locate-first { border: 2px solid var(--accent); background: var(--accent-soft); }
.locate-big { width: 100%; min-height: 60px; font-size: 20px; gap: 10px; }
.locate-big span { font-size: 24px; }
.locate-first p { margin: 10px 0 2px; }
.fact-list { margin: 10px 0; }
.fact-list ul { margin: 6px 0 0; padding-left: 20px; }
/* a long name keeps its distance pill on the same line */
.p-body > .row.spread { flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
.p-body .name { min-width: 0; overflow-wrap: anywhere; }
.context-why { font-weight: 700; color: var(--accent); }

/* the food map (1 Nov): a picture on each pin, Find me over the map */
.pin.pin-kind { width: 34px; height: 34px; background: var(--card); border: 2px solid var(--accent); font-size: 19px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.mapbox { position: relative; }
.find-me { position: absolute; top: 10px; left: 10px; z-index: 2; box-shadow: 0 1px 4px rgb(0 0 0 / .3); }
.find-me-msg { position: absolute; top: 62px; left: 10px; right: 10px; z-index: 2; margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--card); box-shadow: 0 1px 4px rgb(0 0 0 / .3); font-size: 15px; }
.pin-n { position: absolute; right: -6px; bottom: -5px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 700 11px/16px system-ui, sans-serif; text-align: center; }

/* suggestions under the Food search (1 Nov) */
.suggest { margin: 6px 0 2px; }
.suggest-head { margin: 4px 0; }
.suggest-places { display: flex; flex-direction: column; align-items: flex-start; margin: 4px 0; }

/* What CityLens knows (test copy, views/modelpicture.js): a bar per topic, then what it can do */
.known-row { margin: 6px 0; }
.known-bar { display: flex; height: 10px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.known-said { background: var(--accent); }
.known-confirmed { background: color-mix(in srgb, var(--accent) 50%, transparent); }
.known-waiting { background: var(--warn); }
.known-swatch { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--line); vertical-align: -1px; }
.known-can { list-style: none; padding-left: 0; }
.known-can .can-yes span { color: var(--ok); }
.known-can .can-waiting span { color: var(--warn); }
.known-can .can-no { color: var(--muted); }

/* Same app, different screens (test copy, views/samescreens.js): pairs side by side, one column on a phone */
.same-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.same-side { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.same-you .same-side { border-color: var(--accent); }
.same-does { margin: 4px 0 0; }
.same-differs { margin: 8px 0 2px; }

/* Your day, written up (test copy, views/diaryentry.js) */
.entry-stops { padding-left: 1.2em; margin: 8px 0; }
.entry-text { margin: 6px 0; line-height: 1.5; }

/* What Context does (test copy, views/samescreens.js) */
.rule-list { list-style: none; padding-left: 0; margin: 4px 0 8px; }
.rule-list li { display: flex; gap: 8px; margin: 4px 0; }
.rule-mark { width: 1em; flex: none; text-align: center; }
.rule-on .rule-mark { color: var(--ok); font-weight: bold; }
.rule-off { color: var(--muted); }

/* Leave and delete: small, quiet and set apart from Stop, so it isn't tapped by accident (Maria, 6 Nov) */
.leave-quiet { display: block; margin: 20px 0 4px; color: var(--bad); font-size: 13px; text-decoration: underline; }

/* what needs them (test copy; js/attention.js): a dot on the You tab and on each box, and "Needs you" */
.tabs a.needs-you { position: relative; }
.tabs a.needs-you::after { content: ''; position: absolute; top: 6px; right: 22%; width: 8px; height: 8px; border-radius: 50%; background: #c2410c; }
.needs-dot { color: #c2410c; font-size: 0.8em; }
.fold-card.needs-you { border-left: 3px solid #c2410c; }
.needs-you-card { border-left: 3px solid #c2410c; }
.needs-you-card ul { margin: 0.25rem 0 0; padding-left: 0; list-style: none; }
.needs-you-card li { margin: 0.35rem 0; }
@keyframes needs-flash { from { box-shadow: 0 0 0 3px #c2410c; } to { box-shadow: 0 0 0 0 transparent; } }
.needs-flash { animation: needs-flash 1.6s ease-out; }
@media (prefers-reduced-motion: reduce) { .needs-flash { animation: none; outline: 2px solid #c2410c; } }

/* Now's cards fold to their title (views/collapse.js, test copy) */
.card.foldable > h2 { cursor: pointer; }
.card.foldable > h2::after { content: ' ▾'; font-size: 0.8em; opacity: 0.6; }
.card.foldable.folded > h2::after { content: ' ▸'; }
.card.foldable.folded > :not(h2) { display: none; }
.card.foldable > h2:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Your usual day, at the top of Your model (views/portrait.js): 24 hours a row, coloured by situation */
.day-row { display: grid; grid-template-columns: 5.5em 1fr; align-items: center; gap: 6px; margin: 4px 0; }
.day-strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 1px; }
.day-cell { display: block; height: 22px; background: var(--line); border-radius: 2px; }
.day-cell.faint { opacity: .45; }
.day-cell.meal { box-shadow: inset 0 -3px 0 var(--muted); }
.day-cell.leave { outline: 2px solid var(--ink); outline-offset: -2px; }
.day-hours { display: grid; grid-template-columns: repeat(4, 1fr); }
.known-swatch.day-cell { display: inline-block; width: 12px; height: 12px; vertical-align: -2px; }
.sit-at_home { background: #4f8fc0; }
.sit-about_to_leave { background: #8fc3e8; }
.sit-leaving_for_work { background: #e0a43a; }
.sit-at_work { background: #8a6fb0; }
.sit-on_the_way_home { background: #d97b4a; }
.sit-out_for_evening { background: #c2557e; }
.sit-out_and_about { background: #5aa86b; }
.sit-travelling { background: #7a7f85; }

/* the replayed day (tour/replay.js): its controls, fixed above the tabs */
.replay-bar { position: fixed; left: 0; right: 0; bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 4; padding: 10px 16px; background: var(--card); border-top: 3px solid var(--accent); box-shadow: 0 -6px 18px rgba(0,0,0,.18); }
.replay-bar p { margin: 0 0 6px; }
.replay-bar .replay-say { font-size: 16px; }
.replay-bar .row { margin: 0 0 6px; }
body.replaying main { padding-bottom: 130px; }

/* what it is reading (views/signals.js): six chips that light when they change */
.signals .sig-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.signals .sig { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid rgba(128,128,128,.35); border-radius: 10px; min-width: 0; }
.signals .sig > span:last-child { min-width: 0; }
.signals .sig-icon { font-size: 18px; }
.signals .sig-label { display: block; font-size: 12px; opacity: .7; }
.signals .sig b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signals .sig.lit { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
@media (prefers-reduced-motion: no-preference) { .signals .sig.lit { animation: sigpulse 1.2s ease-out 2; } }
@keyframes sigpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.signals .sig-since, .signals .sig-before { margin: 10px 0 0; font-size: 16px; }
.signals .sig-before { font-weight: 600; }
@media (max-width: 420px) { .signals .sig-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* big obvious buttons (Maria, 15 Nov: "they just need to press buttons, and it looks really cool") */
.bigrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.bigrow.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.bigbtn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 8px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; flex: 0 0 auto; transition: transform .12s, background .2s, border-color .2s; }
.bigbtn:active { transform: scale(.96); }
.bigbtn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bigbtn.go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bigbtn.quiet { border-style: dashed; font-weight: 600; opacity: .85; }
.bigbtn-top { font-size: 12px; font-weight: 600; opacity: .8; }
.signals .sig { background: var(--card); color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 52px; border-width: 2px; border-radius: 14px; }
.signals .sig[aria-pressed="true"] { border-color: var(--accent); }
.signals .sig:active { transform: scale(.97); }
.signals .sig-say { margin: 10px 0 0; font-size: 16px; }
.signals .sig-say.small { font-size: 15px; }
.replay-bar .replay-when { font-size: 15px; }
.replay-bar .replay-note { font-size: 12px; opacity: .7; margin: 8px 0 0; }
.replay-bar .bigbtn { min-height: 46px; padding: 6px 14px; }

/* a dial drawn as a dial (views/dials.js) */
.dialbox { display: grid; justify-items: center; gap: 2px; margin: 12px 0 4px; position: relative; }
.dialbox .dial-title { margin: 0; font-size: 15px; }
.dial-face svg { display: block; touch-action: none; cursor: pointer; max-width: 100%; }
.dial-arc { stroke: var(--line); stroke-width: 10; stroke-linecap: round; }
.dial-stop { fill: var(--card); stroke: var(--line); stroke-width: 2; }
.dial-stop.on { fill: var(--accent); stroke: var(--accent); }
.dial-needle line { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.dial-needle { transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.dial-hub { fill: var(--accent); }
.dial-ends { display: flex; justify-content: space-between; width: 240px; max-width: 100%; font-size: 13px; }
.dial-word { margin: 2px 0 0; font-size: 18px; font-weight: 700; }
.dial-range { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dial-range:focus-visible ~ *, .dialbox:has(.dial-range:focus-visible) .dial-face { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
.dial-fold { margin: 8px 0; }
@media (prefers-reduced-motion: reduce) { .dial-needle { transition: none; } }

/* colour as information (views/now.js): green = first for this moment, amber = worth a look now */
.hl-led { box-shadow: 0 0 0 3px var(--accent); position: relative; }
.hl-now { box-shadow: 0 0 0 3px var(--warn); position: relative; }
.hl-led::before, .hl-now::before { content: attr(data-hl); position: absolute; top: -11px; right: 14px; font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.hl-now::before { background: var(--warn); color: #fff; }
@media (prefers-color-scheme: dark) { .hl-now::before { color: #1b1300; } }
.signals .sig.alert { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.bigbtn.hl-green { border-color: var(--accent); }
.bigbtn.hl-amber { border-color: var(--warn); }
.bigbtn.hl-amber[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fff; }

/* how she is getting there (views/trips.js) */
.trip-row { margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, transparent); }
.trip-row .trip-ask { margin: 0; font-size: 15px; }
.wrap { overflow-wrap: anywhere; }
.replay-bar { padding: 8px 14px; }
.replay-bar .replay-for { align-self: center; font-size: 13px; opacity: .75; white-space: nowrap; flex: 0 0 auto; }
.replay-bar details.replay-note summary { cursor: pointer; }
.replay-bar details.replay-note p { margin: 4px 0 0; }
.replay-bar .bigrow { margin-top: 6px; }
/* Save stays in view at the bottom of a long sheet (Maria, 15 Nov: "then I have to go back down to save it") */
.sticky-save { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); z-index: 2; background: var(--bg); padding: 10px 0; margin: 0; border-top: 1px solid var(--line); }
.sticky-save .bigbtn { flex: 1 1 auto; }

/* Now pared down to the core (views/core.js, views/signals.js) */
.signals.compact { padding-top: 10px; padding-bottom: 10px; }
.sig-line { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.sig-dot { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(128,128,128,.35); font-size: 17px; flex: 0 0 auto; }
.sig-dot.lit { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.sig-dot.alert { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 18%, transparent); }
.sig-line-word { margin-left: auto; font-weight: 600; white-space: nowrap; }
.core-more .bigrow { margin-top: 6px; }
.core-more p { margin: 0; }
.core-foot { background: none; border: 0; box-shadow: none; padding-top: 0; padding-bottom: 0; }
[hidden] { display: none !important; }
/* the demo strip: slim, so the screen is not split (tour/replay.js) */
.replay-bar { padding: 6px 12px 8px; }
.replay-bar .replay-when { font-size: 13px; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replay-row { display: flex; gap: 6px; align-items: center; }
.replay-row .bigbtn { min-height: 42px; padding: 4px 12px; font-size: 15px; border-radius: 14px; }
.replay-row .bigbtn.go { flex: 1 1 auto; }
.replay-row .bigbtn:disabled { opacity: .35; }
/* the important card first: everything above it kept small (views/core.js) */
.card.slim { padding: 8px 14px; font-size: 14px; }
.card.slim .btn { padding: 4px 12px; min-height: 0; font-size: 14px; }
.card.slim .linkish { font-size: 13px; }
.signals.compact { padding: 6px 14px; }
.signals.compact .sig-dot { width: 28px; height: 28px; font-size: 14px; }
.signals.compact .sig-line { gap: 5px; font-size: 14px; }
/* Expert mode: the one switch, on You */
.expert-switch { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.expert-switch p { margin: 8px 0 0; }
/* the big sign for someone new */
.getting-started { border: 3px solid var(--accent); }
.big-sign { font-size: 30px; line-height: 1.1; letter-spacing: .04em; text-transform: uppercase; margin: 4px 0 8px; }
/* the way back from an opened section */
.back-row { margin: 0 0 10px; }
.core-more { scroll-margin-top: 70px; }

/* the simple way of asking (views/know.js): one question, answers as big buttons one under another */
.know-opts { display: grid; gap: 8px; margin: 12px 0; }
.know-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 54px; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; transition: transform .1s, background .15s, border-color .15s; }
.know-opt:active { transform: scale(.98); }
.know-opt[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.know-opt.check::before { content: "\2610"; position: absolute; }
.know-opt.check { padding-left: 46px; position: relative; }
.know-opt.check::before { left: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; }
.know-opt.check[aria-pressed="true"]::before { content: "\2611"; }
.know-opt.quiet { border-style: dashed; font-weight: 500; }
.know-opt.answer { min-height: 0; padding: 8px 14px; font-size: 15px; }
.know-done { width: 100%; margin-top: 4px; }
.know-foot { display: flex; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.know-foot .bigbtn { flex: 1 1 0; min-height: 44px; padding: 6px 8px; font-size: 15px; }
.know-bar { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; margin: 0 0 10px; }
.know-bar-fill { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.know-bar-fill.w0 { width: 0%; } .know-bar-fill.w5 { width: 5%; } .know-bar-fill.w10 { width: 10%; } .know-bar-fill.w15 { width: 15%; } .know-bar-fill.w20 { width: 20%; } .know-bar-fill.w25 { width: 25%; } .know-bar-fill.w30 { width: 30%; } .know-bar-fill.w35 { width: 35%; } .know-bar-fill.w40 { width: 40%; } .know-bar-fill.w45 { width: 45%; } .know-bar-fill.w50 { width: 50%; } .know-bar-fill.w55 { width: 55%; } .know-bar-fill.w60 { width: 60%; } .know-bar-fill.w65 { width: 65%; } .know-bar-fill.w70 { width: 70%; } .know-bar-fill.w75 { width: 75%; } .know-bar-fill.w80 { width: 80%; } .know-bar-fill.w85 { width: 85%; } .know-bar-fill.w90 { width: 90%; } .know-bar-fill.w95 { width: 95%; } .know-bar-fill.w100 { width: 100%; }
.signals.compact .sig-line { flex-wrap: wrap; }
.signals.compact .sig-line-word { margin-left: 0; white-space: normal; }
/* how often, one activity at a time */
.know-row { font-size: 20px; margin: 4px 0 2px; }
.know-rowfoot { display: flex; gap: 8px; margin-top: 6px; }
.know-rowfoot .bigbtn { flex: 1 1 0; min-height: 44px; padding: 6px 8px; font-size: 15px; }
/* Safety and alerts, made vivid (views/ahead.js; test copy and the demo) */
:root { --al-police: #c62828; --al-fire: #e2511a; --al-road: #b86e00; --al-weather: #8a6d00; --al-transit: #1f6fd1; --al-air: #5d6763; --al-band: #c62828; --al-calm: #2c6e3f; --think: #6a3fc0; --think-soft: #f1ebfc; --think-1: #1f6fd1; --think-2: #6a3fc0; --think-3: #1f6f5c; }
@media (prefers-color-scheme: dark) { :root { --al-police: #ff6b6b; --al-fire: #ff8a4c; --al-road: #ffb84d; --al-weather: #ffd04d; --al-transit: #6eaaff; --al-air: #a9b3af; --al-band: #d93a32; --al-calm: #2f7d48; --think: #b393ff; --think-soft: #251d3a; --think-1: #6eaaff; --think-2: #b393ff; --think-3: #6fd3b5; } }
.alert-card, .card.thinks { border-left-width: 7px; border-left-style: solid; }
.alert-card > h2, .card.thinks > h2 { margin: -16px -18px 12px -18px; padding: 12px 18px; border-radius: 0 calc(var(--radius) - 2px) 0 0; }
.alert-card.alert-on { border-left-color: var(--al-band); }
.alert-card.alert-on > h2 { background: var(--al-band); color: #fff; display: flex; align-items: center; gap: 8px; }
.alert-card.alert-calm { border-left-color: var(--al-calm); }
.alert-card.alert-calm > h2 { background: var(--al-calm); color: #fff; }
.alert-mark { font-size: 1.15em; }
.alert-count { margin-left: auto; min-width: 28px; text-align: center; padding: 1px 9px; border-radius: 999px; background: #fff; color: var(--al-band); font-size: 15px; font-weight: 800; }
.alert-row { border-left: 5px solid var(--al-air); padding-left: 10px; margin: 8px 0; }
.alert-tag { display: inline-block; margin-right: 8px; padding: 1px 9px; border-radius: 999px; background: var(--al-air); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
@media (prefers-color-scheme: dark) { .alert-tag { color: #14110f; } }
.alert-row.k-police { border-left-color: var(--al-police); } .alert-row.k-police .alert-tag { background: var(--al-police); } .alert-row.k-fire { border-left-color: var(--al-fire); } .alert-row.k-fire .alert-tag { background: var(--al-fire); } .alert-row.k-road { border-left-color: var(--al-road); } .alert-row.k-road .alert-tag { background: var(--al-road); } .alert-row.k-weather { border-left-color: var(--al-weather); } .alert-row.k-weather .alert-tag { background: var(--al-weather); } .alert-row.k-transit { border-left-color: var(--al-transit); } .alert-row.k-transit .alert-tag { background: var(--al-transit); } .alert-row.k-air { border-left-color: var(--al-air); } .alert-row.k-air .alert-tag { background: var(--al-air); }
/* What CityLens thinks is going on, set apart as the system's own reading (views/reason.js; test copy and the demo) */
.card.thinks { border-left-color: var(--think); background: var(--think-soft); }
.card.thinks > h2 { background: var(--think); color: #fff; }
@media (prefers-color-scheme: dark) { .card.thinks > h2 { color: #14110f; } }
.thinks-sub { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.thinks-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 6px; }
.thinks-chip { padding: 8px 16px; border-radius: 999px; background: var(--think); color: #fff; font-size: 18px; font-weight: 800; }
.thinks-chip.unsure { background: transparent; color: var(--think); border: 2px dashed var(--think); }
@media (prefers-color-scheme: dark) { .thinks-chip { color: #14110f; } .thinks-chip.unsure { color: var(--think); } }
.thinks-sure { font-weight: 700; }
.thinks-bar { flex: 1 1 100%; margin: 0; background: var(--card); }
.thinks-bar .know-bar-fill { background: var(--think); }
.card.thinks h3 { margin: 16px 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--card); border-left: 6px solid var(--think-1); font-size: 16px; }
.card.thinks h3:nth-of-type(2) { border-left-color: var(--think-2); }
.card.thinks h3:nth-of-type(3) { border-left-color: var(--think-3); }
/* a card kept small because her answers say it is seldom hers (parking for someone who drives sometimes) */
.hint-card { padding: 10px 18px; }
.hint-card .linkish { font-size: 16px; font-weight: 600; }
.hint-card p { margin: 2px 0 0; }
/* On both copies since 20 Nov (Maria, from using the real app: "still no colours on the cards? We had shading in a previous version, did we loose that?"): these rules were scoped to the test copy and the demo, and now apply to every body. */
/* Brighter ordinary cards (Maria, 16 Nov: "slightly brighter on the ordinary cards - maybe an outline, or something so people want to look at it"). Test copy and the demo: each kind of card is outlined in its own colour and its heading band is a stronger tint of it. */
body .card[data-lens="food"] { border-color: var(--k-food); border-width: 2px; border-left-width: 7px; box-shadow: 0 2px 10px color-mix(in srgb, var(--k-food) 22%, transparent); }
body .card[data-lens="food"] > h2 { background: color-mix(in srgb, var(--k-food) 30%, var(--card)); border-bottom: 2px solid var(--k-food); }
body .card[data-lens="fresh"] { border-color: var(--k-fresh); border-width: 2px; border-left-width: 7px; box-shadow: 0 2px 10px color-mix(in srgb, var(--k-fresh) 22%, transparent); }
body .card[data-lens="fresh"] > h2 { background: color-mix(in srgb, var(--k-fresh) 30%, var(--card)); border-bottom: 2px solid var(--k-fresh); }
body .card[data-lens="transit"], body .card.commute { border-color: var(--k-transit); border-width: 2px; border-left-width: 7px; box-shadow: 0 2px 10px color-mix(in srgb, var(--k-transit) 22%, transparent); }
body .card[data-lens="transit"] > h2, body .card.commute > h2 { background: color-mix(in srgb, var(--k-transit) 30%, var(--card)); border-bottom: 2px solid var(--k-transit); }
body .card.weather { border-color: var(--k-weather); border-width: 2px; border-left-width: 7px; box-shadow: 0 2px 10px color-mix(in srgb, var(--k-weather) 22%, transparent); }
body .card.weather > h2 { background: color-mix(in srgb, var(--k-weather) 30%, var(--card)); border-bottom: 2px solid var(--k-weather); }
body .card[data-lens="orient"] { border-color: var(--k-orient); border-width: 2px; border-left-width: 7px; box-shadow: 0 2px 10px color-mix(in srgb, var(--k-orient) 22%, transparent); }
body .card[data-lens="orient"] > h2 { background: color-mix(in srgb, var(--k-orient) 30%, var(--card)); border-bottom: 2px solid var(--k-orient); }
/* the closed "What CityLens is reading" line: its name first, then each icon with its word */
.signals.compact .sig-line-word { flex: 1 1 100%; font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.signals.compact .sig-line { gap: 4px; align-items: flex-start; }
.sig-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1 1 0; min-width: 0; }
.sig-cell-word { font-size: 11px; font-weight: 600; opacity: .8; }
/* Colours follow the concept (Maria, 16 Nov: "make the cards different colours - match the colour to the concept in some way"): purple for what CityLens concludes, cyan for what it senses, wood for home, transit blue for getting there, sign blue for parking, magenta for going out, emerald for the shopping list, olive for the dog park, leaf green for the market, coral for what is about you. */
/* Every box on Now in the weather card's shape: an outline and a shaded heading band, each in its own colour (Maria, 16 Nov, the lab's walkthrough: "design the boxes like the weather style, so they are uniform", "just different colours", "shaded with colours"). Test copy and the demo. */
:root { --kc-lead: #6a3fc0; --kc-signals: #0b8fa8; --kc-home: #8a5a2b; --kc-commute: #1f6fd1; --kc-parking: #2f3fb0; --kc-things: #c2377f; --kc-leisure: #c2377f; --kc-errands: #0f8a5f; --kc-dogs: #7a6a1e; --kc-markets: #3d8f3d; --kc-getting-to-know-you: #d0506a; }
@media (prefers-color-scheme: dark) { :root { --kc-lead: #b393ff; --kc-signals: #4fd3e8; --kc-home: #d9a066; --kc-commute: #6eaaff; --kc-parking: #8f9bff; --kc-things: #ff8fc4; --kc-leisure: #ff8fc4; --kc-errands: #5fd6a6; --kc-dogs: #d6c46b; --kc-markets: #8fdc8f; --kc-getting-to-know-you: #ff9aa8; } }
body .card[data-fold="lead"] { --kc: var(--kc-lead); }
body .card[data-fold="signals"] { --kc: var(--kc-signals); }
body .card[data-fold="home"] { --kc: var(--kc-home); }
body .card[data-fold="commute"] { --kc: var(--kc-commute); }
body .card[data-fold="parking"] { --kc: var(--kc-parking); }
body .card[data-fold="things"] { --kc: var(--kc-things); }
body .card[data-fold="errands"] { --kc: var(--kc-errands); }
body .card[data-fold="dogs"] { --kc: var(--kc-dogs); }
body .card[data-fold="markets"] { --kc: var(--kc-markets); }
body .card[data-fold="leisure"] { --kc: var(--kc-leisure); }
body .card[data-fold="getting-to-know-you"] { --kc: var(--kc-getting-to-know-you); }
body .card:is([data-fold="lead"], [data-fold="signals"], [data-fold="home"], [data-fold="commute"], [data-fold="parking"], [data-fold="things"], [data-fold="errands"], [data-fold="dogs"], [data-fold="markets"], [data-fold="leisure"], [data-fold="getting-to-know-you"]) { border: 2px solid var(--kc); border-left-width: 7px; box-shadow: 0 2px 10px color-mix(in srgb, var(--kc) 22%, transparent); }
body section.card:is([data-fold="lead"], [data-fold="signals"], [data-fold="home"], [data-fold="commute"], [data-fold="parking"], [data-fold="things"], [data-fold="errands"], [data-fold="dogs"], [data-fold="markets"], [data-fold="leisure"], [data-fold="getting-to-know-you"]) > h2 { margin: -16px -18px 12px -18px; padding: 12px 18px; border-radius: 0 calc(var(--radius) - 2px) 0 0; background: color-mix(in srgb, var(--kc) 30%, var(--card)); border-bottom: 2px solid var(--kc); }
body section.card.folded:is([data-fold="lead"], [data-fold="signals"], [data-fold="home"], [data-fold="commute"], [data-fold="parking"], [data-fold="things"], [data-fold="errands"], [data-fold="dogs"], [data-fold="markets"], [data-fold="leisure"], [data-fold="getting-to-know-you"]) > h2 { margin-bottom: -16px; border-bottom: 0; border-radius: 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0; }
body details.card:is([data-fold="lead"], [data-fold="signals"], [data-fold="home"], [data-fold="commute"], [data-fold="parking"], [data-fold="things"], [data-fold="errands"], [data-fold="dogs"], [data-fold="markets"], [data-fold="leisure"], [data-fold="getting-to-know-you"]) > summary { margin: -16px -18px; padding: 12px 18px; border-radius: 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0; background: color-mix(in srgb, var(--kc) 30%, var(--card)); font-size: 19px; }
body details.card[open]:is([data-fold="lead"], [data-fold="signals"], [data-fold="home"], [data-fold="commute"], [data-fold="parking"], [data-fold="things"], [data-fold="errands"], [data-fold="dogs"], [data-fold="markets"], [data-fold="leisure"], [data-fold="getting-to-know-you"]) > summary { margin-bottom: 12px; border-bottom: 2px solid var(--kc); border-radius: 0 calc(var(--radius) - 2px) 0 0; }
body .signals.compact .sig-line { padding: 0; }
body .signals.compact .sig-line-word { margin: -16px -18px 10px -18px; padding: 12px 18px; flex-basis: calc(100% + 36px); border-radius: 0 calc(var(--radius) - 2px) 0 0; background: color-mix(in srgb, var(--kc) 30%, var(--card)); border-bottom: 2px solid var(--kc); font-size: 19px; }
body .signals.compact { overflow: hidden; }
/* What CityLens thinks, as the first thing on Now: what comes next, and the account one tap inside */
.thinks-next { font-size: 17px; font-weight: 600; margin: 8px 0 4px; }
.thinks-more { margin-top: 10px; }
.thinks-more > summary { cursor: pointer; font-weight: 700; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--think); color: var(--think); list-style: none; text-align: center; }
.thinks-more > summary::-webkit-details-marker { display: none; }
.thinks-more > summary::after { content: " \25BE"; }
.thinks-more[open] > summary::after { content: " \25B4"; }
.thinks-more > summary { display: block; }
/* The demo while it plays (tour/replay.js): every card is its title band, the one the moment calls for is open, and they slide to their new places */
body.replay-fast #view > .card > :not(h2):not(summary) { display: none; }
body.replay-fast #view > section.card > h2 { margin-bottom: -16px; border-bottom: 0; border-radius: 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0; }
body.replay-fast #view > details.card > summary { margin-bottom: -16px; border-bottom: 0; }
body.replay-fast #view > .card { margin: 8px 0; }
body.replay-fast #view > .card:not([data-fold]):not([data-lens]):not(.weather):not(.commute) { display: none; }
body.replay-fast #view > .card.thinks > .thinks-top, body.replay-fast #view > .card.thinks > .thinks-next { display: flex; }
body.replay-fast #view > .card.thinks > .thinks-next { display: block; }
body.replay-fast #view > .card.thinks > h2 { margin-bottom: 12px; border-radius: 0 calc(var(--radius) - 2px) 0 0; }
body.replay-fast #view > .card.signals.compact > .sig-line { display: flex; }
body.replay-fast #view > .card.demo-open > :not(h2):not(summary):not(.why):not(.note):not(details) { display: revert; animation: demo-open .5s ease-out; }
body.replay-fast #view > section.card.demo-open > h2 { margin-bottom: 12px; border-bottom: 2px solid var(--kc, currentColor); border-radius: 0 calc(var(--radius) - 2px) 0 0; }
body.replay-fast #view > .card.demo-open { max-height: 360px; overflow: hidden; box-shadow: 0 0 0 3px var(--accent), 0 6px 18px rgba(0,0,0,.25); }
@keyframes demo-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.replay-fast #view > .card.demo-open > * { animation: none; } }
.replay-bar .replay-when.big { font-size: 17px; }
/* a small cue has no title band: it stays as it is while the demo plays */
/* by class, and specific enough to win over the rule that folds the rest (the :has() form lost to it) */
body.replay-fast #view > .card.cue-card.cue-card > *, body.replay-fast #view > .card.question.question > *, body.replay-fast #view > .card.signals.signals:not(.compact) > * { display: revert; }
:root { --kc-study-way: #0b6e58; }
@media (prefers-color-scheme: dark) { :root { --kc-study-way: #6fd3b5; } }
/* Is it right? on the card that says what CityLens thinks (views/reason.js tellRow) */
.thinks-ask { margin: 10px 0 2px; }
.thinks-ask .bigbtn { flex: 1 1 0; min-height: 46px; }
.thinks-tell { margin: 10px 0 2px; }
.thinks-told { margin: 10px 0 2px; padding: 8px 12px; border-radius: 10px; background: var(--card); font-size: 15px; }
/* the study's two questions under an item: what they are about, and a scale that names its ends */
.rate-inline .rate-about { margin-bottom: 2px; }
.rate-inline .rate-scale { flex-wrap: wrap; gap: 6px; }
.rate-inline .chip { min-height: 40px; }
/* from a walk through the test app, 17 Nov: one arrow on the "How CityLens worked this out" button, not two; and a folding card's title reads in the text colour on its coloured band (it was the link green, weak on pink and wood) */
.thinks-more > summary { display: flex; justify-content: center; }
.thinks-more > summary::before { content: none; }
body details.card[data-fold] > summary { color: var(--ink); }
/* what "Quite sure" rests on: the signs that held, and her own checks (views/reason.js signsBox) */
.thinks-signs { margin: 8px 0 2px; padding: 8px 12px; border-radius: 10px; background: var(--card); }
.thinks-signs p { margin: 0 0 4px; }
.thinks-sign-list { margin: 0 0 6px; padding-left: 20px; }
.thinks-sign-list li { margin: 2px 0; }
.thinks-checks { font-weight: 600; }
body.replay-fast #view > .card.thinks > .thinks-signs { display: none; }
/* Tell me before my stop (views/stopalert.js), and the link out to Google Maps at the end of a list (views/food.js) */
:root { --kc-stop-alert: #1f6fd1; }
@media (prefers-color-scheme: dark) { :root { --kc-stop-alert: #6eaaff; } }
body .card[data-fold="stop-alert"] { --kc: var(--kc-stop-alert); border: 2px solid var(--kc); border-left-width: 7px; }
body section.card[data-fold="stop-alert"] > h2 { margin: -16px -18px 12px -18px; padding: 12px 18px; border-radius: 0 calc(var(--radius) - 2px) 0 0; background: color-mix(in srgb, var(--kc) 30%, var(--card)); border-bottom: 2px solid var(--kc); }
.stop-search { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: 17px; margin: 6px 0 10px; }
.stop-flash { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: #1f6fd1; color: #fff; animation: stop-flash 1s steps(2, jump-none) 6; }
.stop-flash.here { background: #c62828; }
.stop-flash-title { font-size: 34px; font-weight: 800; margin: 0; }
.stop-flash-name { font-size: 22px; margin: 0 0 12px; }
.stop-flash .bigbtn { min-width: 60%; background: #fff; color: #111; border-color: #fff; }
@keyframes stop-flash { 0% { filter: brightness(1.35); } 50% { filter: brightness(.75); } 100% { filter: brightness(1.35); } }
@media (prefers-reduced-motion: reduce) { .stop-flash { animation: none; } }
.find-more { margin: 14px 0 4px; }
.find-more .bigbtn { display: flex; width: 100%; justify-content: center; text-decoration: none; }

/* the study's steps in order, on You (study/steps.js) */
.study-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.study-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); counter-increment: step; }
.study-steps li:first-child { border-top: 0; }
.study-steps .step-mark { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.study-steps .step-mark:empty::before { content: counter(step); opacity: .7; }
.study-steps li.done .step-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.study-steps li.done { opacity: .75; }
.study-steps li.next .step-mark { border-color: var(--accent); }
.study-steps .step-send { display: block; margin-top: 6px; }
.study-steps li.done .step-send { opacity: 1; }
/* the study-day counter on You (views/study.js stepsCard) */
.study-day { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; font-weight: 700; }
.study-day-n { order: 2; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; background: var(--accent); color: var(--accent-ink); }
.study-day > span:nth-child(2) { order: 1; font-size: 18px; }
.study-day > .small { order: 3; font-weight: 400; }
