/* Home Review — one stylesheet. Every class is prefixed "hr-" so components never collide
   (lesson from the prototype: a shared ".bar" class broke the nav). */

:root {
  --bg: #f4f6f8; --surface: #ffffff; --ink: #18232e; --muted: #566573; --line: #d6dde4;
  --accent: #1d5d8c; --accent-soft: #e3eef7; --signal: #c2571b;
  --good: #1f7a4d; --good-bg: #e2f3ea; --warn: #8a5f00; --warn-bg: #fbf1d6; --bad: #b3261e; --bad-bg: #fbe4e2;
  --unk: #6b5b8a; --unk-bg: #ece8f4; --info: #1d5d8c; --info-bg: #e3eef7;
  --seg-drive: #c2571b; --seg-walk: #d9a441; --seg-train: #1d5d8c; --seg-path: #6b7c8c;
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10171e; --surface: #17212b; --ink: #e6edf3; --muted: #9fb0bf; --line: #2b3a48;
    --accent: #6fb1e3; --accent-soft: #1b3347; --signal: #f08a4b;
    --good: #5cc896; --good-bg: #16352a; --warn: #e3b341; --warn-bg: #3a2f12; --bad: #ff8a80; --bad-bg: #3d1d1b;
    --unk: #b9a6e0; --unk-bg: #2b2440; --info: #6fb1e3; --info-bg: #1b3347;
    --seg-drive: #f08a4b; --seg-walk: #e3b341; --seg-train: #6fb1e3; --seg-path: #8fa1b3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10171e; --surface: #17212b; --ink: #e6edf3; --muted: #9fb0bf; --line: #2b3a48;
  --accent: #6fb1e3; --accent-soft: #1b3347; --signal: #f08a4b;
  --good: #5cc896; --good-bg: #16352a; --warn: #e3b341; --warn-bg: #3a2f12; --bad: #ff8a80; --bad-bg: #3d1d1b;
  --unk: #b9a6e0; --unk-bg: #2b2440; --info: #6fb1e3; --info-bg: #1b3347;
  --seg-drive: #f08a4b; --seg-walk: #e3b341; --seg-train: #6fb1e3; --seg-path: #8fa1b3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--f-body); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.02rem; margin-bottom: 6px; }
p { margin: 0; }
.hr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hr-wrap { max-width: 1000px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left)) 72px; display: grid; gap: 22px; }
.hr-eyebrow { font: 500 .72rem/1 var(--f-data); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hr-note { font-size: .86rem; color: var(--muted); }
.hr-alert { border-left: 4px solid var(--signal); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.hr-alert-bad { border-left-color: var(--bad); background: var(--bad-bg); }
.hr-plain { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.hr-qlist { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.hr-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.hr-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* App bar (start, settings) */
.hr-appbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-left)); background: var(--surface); border-bottom: 1px solid var(--line); }
.hr-brand { font: 700 1.05rem var(--f-display); color: var(--ink); text-decoration: none; }
.hr-appbar nav { display: flex; gap: 14px; }
.hr-appbar nav a { text-decoration: none; font-weight: 600; color: var(--muted); }
.hr-appbar nav a:hover { color: var(--ink); }

/* Buttons and fields */
.hr-btn { font: 600 .95rem var(--f-body); padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 40px; }
.hr-btn:hover:not(:disabled) { border-color: var(--accent); }
.hr-btn:disabled { opacity: .55; cursor: not-allowed; }
.hr-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.hr-btn-quiet { background: transparent; }
.hr-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.hr-field { display: grid; gap: 5px; font-size: .9rem; color: var(--muted); }
.hr-field input, .hr-rate input, .hr-down-num input {
  font: 500 1rem var(--f-data); padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); width: 100%; min-height: 42px;
}
.hr-affix { display: flex; align-items: center; gap: 6px; }
.hr-affix i { font-style: normal; color: var(--muted); font-family: var(--f-data); }
.hr-check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.hr-check input { width: 18px; height: 18px; }
.hr-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; align-items: start; }

/* Sheets and sections */
.hr-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; min-width: 0; }
.hr-section { display: grid; gap: 14px; scroll-margin-top: 112px; min-width: 0; }
.hr-head { display: grid; gap: 8px; }
.hr-head > .hr-pill, .hr-page-head > .hr-pill { justify-self: start; }
.hr-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .93rem; }

/* Pills */
.hr-pill { display: inline-block; font: 700 .76rem/1 var(--f-body); padding: 5px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.hr-good { background: var(--good-bg); color: var(--good); }
.hr-ok { background: var(--warn-bg); color: var(--warn); }
.hr-bad { background: var(--bad-bg); color: var(--bad); }
.hr-unk { background: var(--unk-bg); color: var(--unk); }
.hr-info { background: var(--info-bg); color: var(--info); }

/* Start page */
.hr-hero { display: grid; gap: 8px; padding-top: 8px; }
.hr-hero p { color: var(--muted); font-size: 1.05rem; }
.hr-start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.hr-start-card { align-content: start; }
.hr-start-card form { display: grid; gap: 10px; }
.hr-start-sample { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* Review: sticky bar + section nav */
.hr-reviewbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.hr-reviewbar-row { display: flex; align-items: center; gap: 12px; padding: 8px max(16px, env(safe-area-inset-left)); max-width: 1000px; margin: 0 auto; }
.hr-back { font-size: 1.3rem; text-decoration: none; padding: 2px 6px; }
.hr-reviewbar-title { display: grid; line-height: 1.2; flex: 1; min-width: 0; }
.hr-reviewbar-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-sectionnav { display: flex; gap: 2px; overflow-x: auto; padding: 0 max(10px, env(safe-area-inset-left)) 6px; max-width: 1000px; margin: 0 auto; scrollbar-width: none; }
.hr-sectionnav::-webkit-scrollbar { display: none; }
.hr-sectionnav button { flex: none; background: none; border: 0; padding: 7px 10px; border-radius: 6px; font: 600 .9rem var(--f-body); color: var(--muted); cursor: pointer; }
.hr-sectionnav button:hover { background: var(--accent-soft); color: var(--ink); }

/* Summary */
.hr-summary-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hr-verdict-box { display: grid; gap: 10px; align-content: start; }
.hr-verdict-box .hr-pill { font-size: 1rem; padding: 8px 12px; justify-self: start; }
.hr-facts-inline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.hr-facts-inline div { display: grid; }
.hr-facts-inline dt { font-size: .78rem; color: var(--muted); }
.hr-facts-inline dd { margin: 0; font: 500 .98rem var(--f-data); }
.hr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.hr-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; align-content: start; }
.hr-kpi span { color: var(--muted); font-size: .84rem; }
.hr-kpi b { font: 600 1.18rem/1.2 var(--f-data); font-variant-numeric: tabular-nums; }
.hr-kpi small { color: var(--muted); font-size: .78rem; }

/* Photos */
.hr-photo { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--accent-soft) 0 10px, var(--bg) 10px 20px); color: var(--muted); font-size: .88rem; }
.hr-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hr-photo-btn { position: absolute; right: 8px; bottom: 8px; z-index: 1; font-weight: 700; font-size: .85rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
.hr-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 320px); gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.hr-gallery-item { scroll-snap-align: start; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--bg); }
.hr-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Price ladder */
.hr-ladder { position: relative; margin: 6px 4px 0; }
.hr-ladder-axis { position: absolute; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--line); }
.hr-ladder-band { position: absolute; height: 16px; border-radius: 4px; background: var(--good-bg); border: 1px solid var(--good); }
.hr-ladder-range { position: absolute; display: flex; justify-content: center; font-size: .78rem; color: var(--good); font-weight: 600; white-space: nowrap; }
.hr-ladder-mk { position: absolute; display: grid; justify-items: center; transform: translateX(-50%); font-size: .78rem; color: var(--muted); }
.hr-ladder-mk.hr-al-start { transform: translateX(-1px); justify-items: start; }
.hr-ladder-mk.hr-al-end { transform: translateX(calc(-100% + 1px)); justify-items: end; }
.hr-mk-text { white-space: nowrap; background: var(--surface); padding: 1px 4px; border-radius: 4px; }
.hr-mk-text b { font: 600 .8rem var(--f-data); color: var(--ink); }
.hr-ladder-mk i { display: block; width: 2px; background: var(--ink); margin-top: 2px; }
.hr-mk-ask i { background: var(--signal); } .hr-mk-ask .hr-mk-text b { color: var(--signal); }
.hr-mk-cap i { background: var(--bad); } .hr-mk-cap .hr-mk-text b { color: var(--bad); }
.hr-mk-offer i, .hr-mk-walk i { background: var(--good); }

/* Tables */
.hr-tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.hr-tbl table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.hr-tbl th, .hr-tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hr-tbl th { font: 600 .72rem/1.25 var(--f-data); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
.hr-tbl tr:last-child td { border-bottom: 0; }
.hr-tbl .num { font-family: var(--f-data); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.hr-tbl th.num { text-align: right; }
.hr-strong td { font-weight: 700; background: var(--accent-soft); }
.hr-adj { list-style: none; margin: 4px 0 0; padding: 0; text-align: right; font-size: .82rem; display: grid; gap: 2px; white-space: normal; }
details summary { cursor: pointer; }

/* Cost inputs */
.hr-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; align-items: start; }
.hr-down { display: grid; gap: 6px; }
.hr-down-label { font-size: .9rem; color: var(--muted); }
.hr-down-row { display: flex; gap: 12px; align-items: center; }
.hr-down-row input[type="range"] { flex: 1; accent-color: var(--accent); min-height: 32px; }
.hr-down-num { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-data); }
.hr-down-num input { width: 74px; text-align: right; }
.hr-rate label { display: grid; gap: 5px; font-size: .9rem; color: var(--muted); max-width: 200px; }

/* Cards */
.hr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.hr-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: grid; grid-template-rows: auto 1fr; }
.hr-card .hr-photo { border-radius: 0; }
.hr-card-body { padding: 12px; display: grid; gap: 5px; align-content: start; }
.hr-card-price { font: 600 1.1rem/1 var(--f-data); }
.hr-card-subject { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Commute bars */
.hr-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--muted); }
.hr-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.hr-bars { display: grid; gap: 12px; }
.hr-bar-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: 12px; align-items: center; }
.hr-fail { opacity: .62; }
.hr-track { display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.hr-seg { display: block; height: 100%; }
.hr-seg-drive { background: var(--seg-drive); } .hr-seg-walk { background: var(--seg-walk); }
.hr-seg-train { background: var(--seg-train); } .hr-seg-path { background: var(--seg-path); }
.hr-bar-total { font: 600 .92rem var(--f-data); display: flex; gap: 8px; align-items: center; white-space: nowrap; }

/* To-do */
.hr-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hr-todo li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.hr-todo-done { opacity: .7; }

/* Printable pages: toolbar */
.hr-printbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 10px max(16px, env(safe-area-inset-left)); background: var(--surface); border-bottom: 1px solid var(--line); }
.hr-printbar-extra { flex: 1; min-width: 180px; }

/* Showing sheet (screen preview) */
.hr-showing { max-width: 820px; margin: 0 auto; padding: 20px 16px 60px; display: grid; gap: 24px; }
.hr-page { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 6px; padding: 28px; display: grid; gap: 12px; font-size: .95rem; }
.hr-page h1 { font-size: 1.45rem; } .hr-page h2 { font-size: 1.15rem; margin-top: 4px; } .hr-page h3 { font-size: .98rem; }
.hr-page .hr-note { color: #555; }
.hr-qtable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hr-qtable th, .hr-qtable td { border: 1px solid #bbb; padding: 7px 8px; text-align: left; vertical-align: top; }
.hr-qtable th { background: #f1f3f5; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.hr-qtable-tall td { padding-top: 10px; padding-bottom: 10px; }
.hr-tick { width: 28px; text-align: center !important; }
.hr-ans { width: 34%; }
.hr-dontshare { border: 1px solid #c2571b; padding: 8px 10px; border-radius: 6px; }
.hr-checkcols { display: grid; gap: 12px; }
.hr-boxes { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.hr-boxes li { padding-left: 24px; position: relative; }
.hr-boxes li::before { content: "☐"; position: absolute; left: 2px; }
.hr-lines { display: grid; gap: 22px; padding-top: 10px; }
.hr-lines span { border-bottom: 1px solid #bbb; }


/* ---------- Milestone 2 ---------- */
.hr-appbar nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
select, .hr-select { font: 500 .95rem var(--f-body); padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); min-height: 40px; max-width: 100%; }
.hr-field select { width: 100%; }
.hr-textarea { width: 100%; font: 400 .95rem var(--f-body); padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.hr-wide-input { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
.hr-small-input { width: 70px; font: 500 1rem var(--f-data); padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); }
.hr-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hr-filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; }
.hr-inline { grid-template-columns: auto auto; align-items: center; gap: 8px; }
.hr-chip { display: inline-block; font-size: .8rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 3px 8px; }
.hr-hubrow { display: grid; gap: 6px; }

/* Tabs */
.hr-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.hr-tab { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 12px; font: 600 .93rem var(--f-body); color: var(--muted); cursor: pointer; }
.hr-tab-on { color: var(--ink); border-bottom-color: var(--accent); }

/* Commute rows: detail line under the bar */
.hr-bar-detail { grid-column: 1 / -1; margin-top: -4px; }
.hr-noise { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }

/* Map */
.hr-map { position: relative; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: #e8eef2; touch-action: none; cursor: grab; user-select: none; }
.hr-map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.hr-map-svg { position: absolute; inset: 0; pointer-events: none; }
.hr-map-circle { fill: rgba(29, 93, 140, .12); stroke: #1d5d8c; stroke-width: 2; }
.hr-map-pin { position: absolute; transform: translate(-50%, -50%); width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: #6b7c8c; padding: 0; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hr-pin-station-selected { width: 16px; height: 16px; background: #1d5d8c; z-index: 2; }
.hr-pin-home { background: #c2571b; }
.hr-pin-my-home { width: 16px; height: 16px; background: #1f7a4d; z-index: 3; }
.hr-map-pin span { position: absolute; left: 14px; top: -6px; white-space: nowrap; font: 700 .75rem var(--f-body); color: #111; background: rgba(255,255,255,.9); padding: 1px 5px; border-radius: 4px; }
.hr-map-zoom { position: absolute; right: 8px; top: 8px; display: grid; gap: 4px; }
.hr-map-zoom button { width: 34px; height: 34px; font: 700 1.1rem var(--f-body); border-radius: 6px; border: 1px solid #c9d0d6; background: #fff; color: #111; cursor: pointer; }
.hr-map-attr { position: absolute; right: 0; bottom: 0; font-size: .7rem; background: rgba(255,255,255,.85); color: #333; padding: 1px 6px; }
.hr-map-attr a { color: #1d5d8c; }

/* Station cards */
.hr-stationgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.hr-stationcard { gap: 10px; align-content: start; }
.hr-picked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.hr-stationcard-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.hr-stationcard-big b { font: 600 1.4rem var(--f-data); }
.hr-mini-dl { margin: 0; display: grid; gap: 6px; font-size: .88rem; }
.hr-mini-dl div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.hr-mini-dl dt { color: var(--muted); }
.hr-mini-dl dd { margin: 0; }

/* List home cards */
.hr-homegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.hr-homecard .hr-card-body { gap: 6px; }
.hr-homecard-photo { position: relative; display: block; }
.hr-homecard-photo .hr-photo { border-radius: 0; }
.hr-homecard-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hr-rank { position: absolute; left: 8px; top: 8px; font: 700 .85rem var(--f-data); background: rgba(0,0,0,.65); color: #fff; padding: 3px 7px; border-radius: 6px; }
.hr-score { position: absolute; right: 8px; top: 8px; font: 700 1rem var(--f-data); background: var(--good); color: #fff; padding: 4px 9px; border-radius: 999px; }
.hr-score-capped { background: var(--bad); }
.hr-score-inline { position: static; display: inline-block; font-size: 1.3rem; }
@media (max-width: 640px) { .hr-mini-dl div { grid-template-columns: 1fr; gap: 0; } }

/* v02 */
.hr-streetviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.hr-streetviews figure { margin: 0; display: grid; gap: 4px; }
.hr-streetviews img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--bg); }
.hr-files { display: grid; gap: 10px; }
.hr-version { text-align: center; font-size: .78rem; color: var(--muted); padding: 16px; }

/* Phones */
@media (max-width: 640px) {
  .hr-summary-top { grid-template-columns: 1fr; }
  .hr-facts-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-bar-row { grid-template-columns: 1fr auto; }
  .hr-bar-row .hr-track { grid-column: 1 / -1; grid-row: 2; }
  .hr-page { padding: 18px; }
  .hr-todo li { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Print: letter paper, light colors always, no app chrome */
@page { size: letter; margin: 0.5in; }

/* ---------- v05: setup, requirements, scorecard ---------- */
.hr-choice { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.hr-choice button { font: 600 .85rem var(--f-body); padding: 7px 10px; min-height: 36px; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.hr-choice button:last-child { border-right: 0; }
.hr-choice button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.hr-reqs { display: grid; gap: 14px; margin: 10px 0; }
.hr-reqgroup { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 4px; margin: 0; }
.hr-reqgroup legend { font: 700 .8rem var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 6px; }
.hr-reqrow { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.hr-reqrow:first-of-type { border-top: 0; }
@media (max-width: 560px) { .hr-reqrow { flex-direction: column; align-items: stretch; } .hr-choice { align-self: flex-start; } }
.hr-checklist, .hr-conlist { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.hr-checklist li, .hr-conlist li { padding-left: 1.6em; position: relative; }
.hr-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.hr-checklist-nice li::before { content: "○"; color: var(--accent); }
.hr-conlist li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); font-weight: 700; }
.hr-step { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--accent); color: #fff; font-size: .85em; margin-right: 6px; vertical-align: .1em; }
.hr-setup .hr-sheet { display: grid; gap: 10px; }
.hr-setup .hr-sheet > .hr-btn { justify-self: start; }
.hr-estimate { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; background: var(--accent-soft); }
.hr-estimate-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.hr-estimate-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; font-size: 1.08rem; }
.hr-setup-banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; border-left: 4px solid var(--signal); }
@media (max-width: 560px) { .hr-setup-banner { flex-direction: column; align-items: stretch; } }
.hr-row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hr-paste summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: 4px 0; }
.hr-paste textarea, .hr-paste-box textarea { width: 100%; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.hr-paste-box { display: grid; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hr-paste-box .hr-btn { justify-self: start; }
.hr-scoreline { font-size: 1.05rem; }
.hr-bad-text { color: var(--bad); font-weight: 700; }
.hr-tbl caption { text-align: left; font: 700 .9rem var(--f-display); padding: 8px 0 4px; }
.hr-down-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }


/* ---------- v06: working indicator, review cards, rating ---------- */
.hr-spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.15em; animation: hr-spin .8s linear infinite; opacity: .8; }
@keyframes hr-spin { to { transform: rotate(360deg); } }
.hr-busybar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; overflow: hidden; background: var(--accent-soft); }
.hr-busybar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--signal); animation: hr-slide 1.1s ease-in-out infinite; }
@keyframes hr-slide { from { left: -35%; } to { left: 100%; } }
.hr-busypill { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 100; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: calc(100vw - 32px); display: flex; gap: 10px; align-items: center; }
@media (prefers-reduced-motion: reduce) { .hr-spinner, .hr-busybar::after { animation-duration: 2.5s; } }
.hr-back { font-size: 1rem; font-weight: 600; white-space: nowrap; }
.hr-endnav { margin: 18px 0; }
.hr-rcards { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.hr-rcard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: grid; grid-template-rows: auto 1fr; }
.hr-rcard-photo { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--bg); color: var(--muted); text-decoration: none; overflow: hidden; }
.hr-rcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hr-rcard-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.hr-rcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.hr-rcard-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hr-rcard-not_interested { opacity: .7; }
.hr-rcard-showing { border-color: var(--good); box-shadow: inset 0 3px 0 var(--good); }
.hr-rcard-further { box-shadow: inset 0 3px 0 var(--accent); }
.hr-stars { display: inline-flex; }
.hr-stars button { background: none; border: 0; font-size: 1.35rem; line-height: 1; color: #d39b12; cursor: pointer; padding: 4px 2px; min-width: 32px; min-height: 36px; }
.hr-status-choice { flex-wrap: wrap; }
.hr-status-choice button { flex: 1 1 auto; }
.hr-status-choice button.hr-st-showing[aria-pressed="true"] { background: var(--good); }
.hr-status-choice button.hr-st-not_interested[aria-pressed="true"] { background: var(--muted); }
.hr-st-pill-showing { background: var(--good-bg); color: var(--good); }
.hr-st-pill-further { background: var(--info-bg); color: var(--info); }
.hr-st-pill-not_interested { background: var(--bg); color: var(--muted); }
.hr-linkbtn { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; cursor: pointer; justify-self: start; font: inherit; font-size: .85rem; }
.hr-notfor summary { cursor: pointer; margin-top: 12px; color: var(--muted); font-weight: 600; }
.hr-ourpick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hr-paste-found { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.hr-paste-found img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.hr-field textarea { width: 100%; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }

/* ---------- v07: drop zone ---------- */
.hr-drop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; border: 2px dashed var(--line); border-radius: var(--radius); margin: 10px 0; }
.hr-drop-on { border-color: var(--accent); background: var(--accent-soft); }

@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --bg: #fff; --surface: #fff; --ink: #111; --muted: #555; --line: #c9d0d6; --accent: #1d5d8c; --accent-soft: #eef3f8;
    color-scheme: light;
  }
  body { background: #fff; font-size: 10.5pt; }
  .hr-no-print, .hr-appbar, .hr-reviewbar, .hr-photo-btn { display: none !important; }
  .hr-wrap { padding: 0; gap: 14px; max-width: none; }
  .hr-sheet { border: 0; padding: 0; break-inside: auto; }
  .hr-section h2 { break-after: avoid; border-bottom: 2px solid #111; padding-bottom: 3px; }
  .hr-tbl { overflow: visible; border-color: #c9d0d6; }
  .hr-tbl tr, .hr-kpi, .hr-card, .hr-bar-row, .hr-todo li { break-inside: avoid; }
  .hr-tbl th { background: #f1f3f5 !important; }
  .hr-pill, .hr-seg, .hr-ladder-band, .hr-strong td, .hr-alert { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hr-print-doc .hr-photo { max-height: 3in; }
  .hr-photo:not(:has(img)) { display: none; }
  .hr-summary-top:not(:has(img)) { grid-template-columns: 1fr; }
  .hr-cards { grid-template-columns: repeat(3, 1fr); }
  .hr-print-doc .hr-two { grid-template-columns: 1fr; }
  .hr-print-doc .hr-tbl table { font-size: 9pt; }
  .hr-print-doc .hr-tbl th, .hr-print-doc .hr-tbl td { padding: 5px 7px; }
  .hr-print-doc .hr-adj { font-size: 8pt; }
  .hr-print-doc .hr-section { gap: 8px; }
  .hr-print-doc .hr-bars { gap: 6px; }
  .hr-showing { padding: 0; gap: 0; max-width: none; }
  .hr-page { border: 0; border-radius: 0; padding: 0; font-size: 10pt; }
  .hr-page + .hr-page { break-before: page; }
  .hr-page .hr-boxes { gap: 2px; font-size: 9pt; }
  .hr-page h2 { font-size: 12.5pt; } .hr-page h3 { font-size: 10.5pt; margin: 2px 0; }
  .hr-page { gap: 8px; }
  .hr-lines { gap: 18px; }
  a { color: inherit; text-decoration: none; }
}
