/* Lava pricing questions. Calm and readable: warm paper, ink, one ember accent.
   System fonts only; nothing is loaded from other sites. */

:root {
  --bg: #f6f3ee;
  --surface: #fffdfa;
  --surface-2: #f1ede6;
  --ink: #1d2024;
  --ink-2: #3b4047;
  --muted: #6a6f76;
  --line: #e3ddd3;
  --line-strong: #cfc7ba;
  --accent: #b4461d;
  --accent-hover: #9a3a16;
  --accent-ink: #ffffff;
  --accent-soft: #f7e8df;
  --right: #2c6a4c;
  --right-soft: #e2efe7;
  --notq: #9b5508;
  --notq-soft: #f9ecd8;
  --dk: #545b66;
  --dk-soft: #e9ebee;
  --focus: #1f6fd1;
  --shadow: 0 1px 2px rgba(40, 30, 20, .05), 0 4px 16px rgba(40, 30, 20, .05);
  --radius: 14px;
  --radius-sm: 9px;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141518;
    --surface: #1c1e22;
    --surface-2: #23262b;
    --ink: #eceae6;
    --ink-2: #cfccc6;
    --muted: #9da1a8;
    --line: #2d3036;
    --line-strong: #40444b;
    --accent: #ef8a5c;
    --accent-hover: #f6a17a;
    --accent-ink: #1b1209;
    --accent-soft: #35241b;
    --right: #82c9a3;
    --right-soft: #1b2e24;
    --notq: #f0b468;
    --notq-soft: #352817;
    --dk: #b8bec7;
    --dk-soft: #2a2e34;
    --focus: #7db3ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); letter-spacing: -.01em; }
h2 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.js .nojs-only { display: none !important; }
html:not(.js) .js-only { display: none !important; }

/* ---------- top bar ---------- */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.top-in { max-width: 860px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f3a06f, var(--accent) 60%, #7c2a0c); box-shadow: 0 0 0 3px var(--accent-soft); }
.brand-sub { font-weight: 500; color: var(--muted); }
.top-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font-size: .93rem; }
.top-nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.top-nav a:hover { color: var(--ink); }
.top-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.top-nav .who { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; }
.top-nav .who::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--right); }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 4px 0; color: var(--muted); cursor: pointer; font-size: .93rem; }
button.link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .brand-sub { display: none; }
  .top-in { padding: 10px 16px; }
  .top-nav { gap: 4px 14px; font-size: .88rem; }
}

/* ---------- layout ---------- */
.main { padding: 0 0 96px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 40px 20px 0; }
@media (max-width: 560px) { .wrap { padding: 24px 16px 0; } }
.narrow { max-width: 460px; margin: 0 auto; padding: 0 16px; }
.center-card { min-height: calc(100vh - 140px); display: grid; align-content: center; padding-top: 32px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); display: grid; gap: 16px; }
@media (max-width: 560px) { .panel { padding: 26px 20px; } }
.stack { display: grid; gap: 16px; }
.eyebrow { font-size: .78rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--ink-2); font-size: 1.04rem; max-width: 62ch; }
.fine { color: var(--muted); font-size: .88rem; }
.hint { color: var(--muted); font-size: .92rem; }
.opt { font-weight: 400; color: var(--muted); font-size: .85em; }
.alert { background: var(--notq-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--notq) 35%, transparent); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .95rem; }

/* ---------- buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: .97rem; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-quiet { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.btn-wide { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 1.3rem; line-height: 1; flex: none; }
.icon-btn:hover { color: var(--ink); background: var(--surface-2); }

.field { display: grid; gap: 6px; }
.field-label { font-weight: 600; font-size: .97rem; }
.field-hint { color: var(--muted); font-size: .9rem; margin-top: -2px; }
input[type=text], input[type=password], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

/* ---------- name picker ---------- */
.name-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.name-btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 1.05rem; text-align: left; transition: border-color .15s, background-color .15s; }
.name-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.name-btn.is-current { border-color: var(--accent); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--serif); font-weight: 700; flex: none; }

/* ---------- index ---------- */
.intro { display: grid; gap: 14px; margin-bottom: 28px; }
.intro-tight { margin-bottom: 20px; }
.howto { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; color: var(--ink-2); font-size: .97rem; }
.howto li { display: flex; gap: 12px; align-items: baseline; }
.howto-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); transform: translateY(-1px); }
.progress-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); display: grid; gap: 14px; margin-bottom: 40px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.progress-count { font-size: 1.05rem; color: var(--ink-2); }
.progress-count strong { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); margin-right: 2px; }
.segments { display: flex; gap: 4px; }
.seg { flex: 1; height: 8px; border-radius: 4px; background: var(--line); }
.seg.st-right, .step.st-right { background: var(--right); }
.seg.st-not_right, .step.st-not_right { background: var(--notq); }
.seg.st-dont_know, .step.st-dont_know { background: var(--dk); }

.group { margin-bottom: 36px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.group-head h2 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.group-count { color: var(--muted); font-size: .9rem; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qcard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.qcard:hover { color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow); }
.qnum { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 700; color: var(--muted); border: 1.5px solid var(--line-strong); font-variant-numeric: tabular-nums; }
.st-right > .qnum, .st-right .arow-head .qnum { background: var(--right); border-color: var(--right); color: var(--surface); }
.st-not_right > .qnum, .st-not_right .arow-head .qnum { background: var(--notq); border-color: var(--notq); color: var(--surface); }
.st-dont_know > .qnum, .st-dont_know .arow-head .qnum { background: var(--dk); border-color: var(--dk); color: var(--surface); }
.qbody { display: grid; gap: 4px; min-width: 0; flex: 1; }
.qtitle { font-weight: 600; line-height: 1.35; }
.qmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.chev { color: var(--line-strong); font-size: 1.6rem; line-height: 1; }
.qcard:hover .chev { color: var(--accent); }
.pill { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; letter-spacing: .01em; background: var(--surface-2); color: var(--muted); }
.pill.st-right { background: var(--right-soft); color: var(--right); }
.pill.st-not_right { background: var(--notq-soft); color: var(--notq); }
.pill.st-dont_know { background: var(--dk-soft); color: var(--dk); }

/* ---------- question page ---------- */
.q-wrap { padding-top: 24px; }
.q-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.back { color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--accent); }
.steps { display: flex; gap: 4px; margin-bottom: 28px; }
.step { flex: 1; height: 6px; border-radius: 3px; background: var(--line); position: relative; transition: transform .15s; }
.step::after { content: ""; position: absolute; inset: -10px 0; } /* bigger tap target */
.step:hover { transform: scaleY(1.6); }
.step.is-current { outline: 2px solid var(--ink); outline-offset: 2px; }
.q-title { margin-bottom: 24px; }
.q-title.has-ask { margin-bottom: 10px; }
/* "Ask AI": a quiet help bubble under the title, not a main action. */
.ask-ai { margin: 0 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ask-note { color: var(--muted); font-size: .8rem; }
.ask-ai a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 9px; border: 1px solid var(--line); border-radius: 999px 999px 999px 4px; background: var(--surface); color: var(--ink-2); font-size: .88rem; text-decoration: none; transition: border-color .15s, color .15s, background-color .15s; }
.ask-ai a:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.ask-ai svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.facts { display: grid; gap: 14px; margin-bottom: 32px; }
.fact-h { font-size: .76rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.found ul { margin: 0; padding: 0 0 0 1.1em; display: grid; gap: 8px; color: var(--ink-2); }
.found li::marker { color: var(--line-strong); }
.assume { background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px; border-left: 4px solid var(--accent); }
.assume .fact-h { color: var(--accent); }
.assume p { font-family: var(--serif); font-size: 1.16rem; line-height: 1.5; color: var(--ink); }
.matters p { color: var(--ink-2); }
.fact.found, .fact.matters { padding: 0 4px; }

.answer-form { display: grid; gap: 22px; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
@media (max-width: 560px) { .block { padding: 16px 14px; } }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.block-h, .block-head h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.sub-h { font-size: 1rem; font-weight: 650; margin-top: 6px; }

.answer { border: 0; margin: 0; padding: 0; min-width: 0; }
.answer-q { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin-bottom: 14px; padding: 0; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } }
.choice { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; border-radius: var(--radius); border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s, transform .08s; -webkit-tap-highlight-color: transparent; }
@media (max-width: 640px) { .choice { flex-direction: row; align-items: center; padding: 14px 16px; } }
.choice:hover { border-color: var(--ink-2); }
.choice:active { transform: scale(.99); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; transition: background-color .15s, color .15s; }
.choice-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.choice-text { display: grid; gap: 2px; }
.choice-text b { font-size: 1.08rem; }
.choice-text small { color: var(--muted); font-size: .88rem; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.c-right:has(input:checked) { border-color: var(--right); background: var(--right-soft); box-shadow: 0 0 0 1px var(--right) inset; }
.c-right:has(input:checked) .choice-icon { background: var(--right); color: var(--surface); }
.c-not_right:has(input:checked) { border-color: var(--notq); background: var(--notq-soft); box-shadow: 0 0 0 1px var(--notq) inset; }
.c-not_right:has(input:checked) .choice-icon { background: var(--notq); color: var(--surface); }
.c-dont_know:has(input:checked) { border-color: var(--dk); background: var(--dk-soft); box-shadow: 0 0 0 1px var(--dk) inset; }
.c-dont_know:has(input:checked) .choice-icon { background: var(--dk); color: var(--surface); }

.followup { display: none; padding: 16px 18px; border-radius: var(--radius); background: var(--notq-soft); border: 1px solid color-mix(in srgb, var(--notq) 30%, transparent); animation: reveal .2s ease-out; }
.answer-form:has(input[name=status][value=not_right]:checked) .followup { display: grid; }
@supports not selector(:has(*)) { .followup { display: grid; } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.conflict { background: var(--notq-soft); border: 1px solid var(--notq); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.conflict-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* sticky footer with previous / saved / next */
.qfoot { position: sticky; bottom: 0; z-index: 4; margin: 8px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
@media (max-width: 560px) { .qfoot { margin: 8px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); } }
.qfoot-in { display: flex; align-items: center; gap: 10px; }
.save-state { flex: 1; text-align: center; color: var(--muted); font-size: .86rem; min-width: 0; }
.save-state.is-saving::before, .save-state.is-saved::before, .save-state.is-error::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.save-state.is-saving::before { background: var(--line-strong); animation: pulse 1s infinite; }
.save-state.is-saved { color: var(--right); }
.save-state.is-saved::before { background: var(--right); }
.save-state.is-error { color: var(--notq); }
.save-state.is-error::before { background: var(--notq); }
@keyframes pulse { 50% { opacity: .3; } }
@media (max-width: 420px) { .qfoot .btn { padding: 10px 14px; } }

/* ---------- fleet ---------- */
.fleet-total { color: var(--muted); font-size: .95rem; }
.fleet-total strong { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.fleet-tools { display: flex; gap: 8px; }
.classes { display: grid; gap: 6px; }
.cls { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.cls[open] { background: var(--surface); }
.cls summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; min-height: 48px; border-radius: var(--radius-sm); }
.cls summary::-webkit-details-marker { display: none; }
.cls-caret { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; margin: 0 4px 0 2px; }
.cls[open] .cls-caret { transform: rotate(45deg); }
.cls-name { font-weight: 600; flex: 1; min-width: 0; }
.cls-count { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cls.has-off .cls-count { color: var(--notq); font-weight: 600; }
.cls.all-off .cls-name { color: var(--muted); }
.cls-all { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-2); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; white-space: nowrap; }
.cls-all:hover { border-color: var(--line-strong); }
.cls-all { min-height: 36px; padding: 6px 12px 6px 10px; margin-left: 4px; }
@media (max-width: 480px) {
  .cls summary { gap: 8px; }
  .cls-name { font-size: .95rem; }
}
.new-tag { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.hist-detail { color: var(--muted); }
.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 10px; padding: 4px 12px 12px 34px; }
@media (max-width: 480px) { .cars { padding-left: 12px; } }
.car { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 6px; cursor: pointer; font-size: .92rem; min-height: 40px; }
.car:hover { background: var(--surface-2); }
.car .plate { font-family: var(--mono); font-size: .86rem; font-weight: 600; letter-spacing: .03em; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--surface); }
.car .model { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car:has(input[type=checkbox]:not(:checked)) .plate { text-decoration: line-through; color: var(--muted); border-style: dashed; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; flex: none; margin: 0; }

/* ---------- cost floor ---------- */
.money { display: flex; align-items: stretch; max-width: 340px; }
.money input { border-top-right-radius: 0; border-bottom-right-radius: 0; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.money .unit { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--muted); font-size: .9rem; white-space: nowrap; }
.money-sm { max-width: 190px; }
.money-sm input { font-size: 1rem; }
.floor-rows { display: grid; gap: 8px; }
.floor-row { display: flex; gap: 8px; align-items: center; }
.floor-row select { flex: 1; min-width: 0; }
@media (max-width: 520px) {
  .floor-row { flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .floor-row select { flex-basis: 100%; }
  .money-sm { flex: 1; max-width: none; }
}

/* ---------- settings ---------- */
.setting-list { list-style: none; margin: 0; padding: 0; display: grid; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.setting:first-child { border-top: 0; padding-top: 4px; }
.setting-label { color: var(--ink-2); font-size: .95rem; }
.setting-now { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.toggle { display: inline-flex; align-self: start; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; background: var(--bg); }
.toggle label { position: relative; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { display: block; padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); transition: background-color .15s, color .15s; }
.toggle input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.toggle input[value=change]:checked + span { background: var(--accent); color: var(--accent-ink); }
.toggle label:has(input:focus-visible) span { outline: 3px solid var(--focus); outline-offset: 1px; }
.change-to { grid-column: 1 / -1; display: none; gap: 4px; max-width: 360px; }
.setting:has(input[value=change]:checked) .change-to { display: grid; }
@supports not selector(:has(*)) { .change-to { display: grid; } }
@media (max-width: 480px) { .setting { grid-template-columns: 1fr; } }

/* ---------- summary ---------- */
.answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.arow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; gap: 10px; }
.arow-head { display: flex; gap: 14px; align-items: flex-start; }
.arow-title { display: grid; gap: 4px; min-width: 0; }
.arow-title a { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.35; }
.arow-title a:hover { color: var(--accent); text-decoration: underline; }
.arow-body { margin: 0 0 0 46px; display: grid; gap: 8px; font-size: .94rem; }
.arow-body div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.arow-body dt { color: var(--muted); font-size: .85rem; padding-top: 2px; }
.arow-body dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .arow-body { margin-left: 0; }
  .arow-body div { grid-template-columns: 1fr; gap: 0; }
}
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.history { margin-left: 46px; font-size: .88rem; color: var(--muted); }
.history summary { cursor: pointer; width: max-content; }
.history ol { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
@media (max-width: 560px) { .history { margin-left: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.floor [data-add-row] { justify-self: start; }
@media (max-width: 560px) { .save-state .by { display: none; } }
