/* Walkdown. The look is the approved prototype's: warm and light, teal and lime on a warm ground.
   PC (900px and up): controls on the left, the live quote on the right.
   Phone: four steps (add, check, set up, review), one thing per screen. */
:root {
  color-scheme: light;
  --ground: #F3F1EC;
  --surface: #FFFFFF;
  --surface-2: #FAF8F4;
  --ink: #1D2A33;
  --muted: #5B6670;
  --faint: #8A939A;
  --line: #E4DFD6;
  --line-2: #EEEAE3;
  --teal: #007A77;
  --teal-deep: #005B59;
  --teal-soft: #E1F0EE;
  --teal-tint: #F1F8F7;
  --lime: #D6E028;
  --lime-soft: #F5F8D2;
  --lime-line: #CDD566;
  --lime-ink: #474C00;
  --rust: #8A3B00;
  --rust-soft: #FBEDE3;
  --rust-line: #E8B993;
  --navy: #1F4E79;
  --desk: #E7E3DC;
  --shadow: 0 1px 2px rgba(29, 42, 51, 0.06), 0 10px 30px rgba(29, 42, 51, 0.08);
  --shadow-sm: 0 1px 2px rgba(29, 42, 51, 0.06), 0 3px 10px rgba(29, 42, 51, 0.05);
  --r-lg: 16px;
  --r-md: 12px;
  --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --bar-h: 56px;
}
* { box-sizing: border-box; }
html, body { background: var(--ground); margin: 0; }
body { color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal-deep); }
:focus-visible { outline: 3px solid rgba(0, 122, 119, 0.45); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shared bits (from the prototype) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 11px 18px; font-weight: 700; border: 1px solid transparent; min-height: 44px; transition: background 0.15s, border-color 0.15s, transform 0.05s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #FFFFFF; }
.btn-primary:hover { background: var(--teal-deep); }
.btn[disabled] { background: #E2E7E6; color: #5F6D6D; cursor: not-allowed; border-color: transparent; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--faint); }
.btn-danger { background: var(--surface); border-color: var(--rust-line); color: var(--rust); }
.btn-sm { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--teal-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ico { width: 20px; height: 20px; flex: none; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 8px 12px; font-weight: 600; color: var(--muted); min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 700; }
.seg.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg.wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.stepper button { width: 42px; height: 42px; border: 0; background: var(--surface-2); font-size: 20px; font-weight: 600; color: var(--ink); }
.stepper button:hover { background: var(--teal-soft); }
.stepper output { min-width: 96px; text-align: center; font-weight: 700; padding: 0 6px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); min-height: 44px; }
.textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(0, 122, 119, 0.15); }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.switch-row:last-child { border-bottom: 0; }
.switch-row .why { display: block; font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; flex: none; margin-top: 2px; vertical-align: middle; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: #CFCAC1; border-radius: 999px; transition: background 0.15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: transform 0.15s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 3px solid rgba(0, 122, 119, 0.45); outline-offset: 2px; }
.flag { background: var(--lime-soft); border: 1px solid var(--lime-line); border-radius: var(--r-md); padding: 14px 16px; }
.flag.fix { background: var(--rust-soft); border-color: var(--rust-line); }
.flag-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--lime-ink); }
.flag.fix .flag-title { color: var(--rust); }
.flag p { margin: 4px 0 10px; color: #3C4100; overflow-wrap: anywhere; }
.flag.fix p { color: #5A2A00; }
.flag .src { font-size: 12.5px; color: var(--muted); margin: -6px 0 10px; }
.flag-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ok-note { display: flex; align-items: center; gap: 8px; color: var(--teal-deep); font-weight: 600; background: var(--teal-tint); border: 1px solid var(--teal-soft); border-radius: var(--r-md); padding: 10px 14px; }
.ok-note small { font-weight: 500; color: var(--muted); }
.source { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; max-width: 100%; text-decoration: none; color: var(--ink); }
.source span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source i { width: 24px; height: 24px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-deep); display: inline-flex; align-items: center; justify-content: center; flex: none; font-style: normal; }
.source i .ico { width: 14px; height: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--teal-soft); border-top-color: var(--teal); animation: spin 0.8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flash { 0% { background: #EEF39A; } 100% { background: transparent; } }
.flash { animation: flash 1.6s ease-out; }
@keyframes rise { from { opacity: 0.4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.35s ease-out; }
@media (prefers-reduced-motion: reduce) { .flash, .rise, .spinner { animation: none; } }
.hint { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.kv > span, .kv > label { font-weight: 600; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.card-h { font-size: 12px; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; border: 0; }

/* ---------- app bar ---------- */
.appbar { position: sticky; top: 0; z-index: 20; height: var(--bar-h); display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.appbar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.appbar img { height: 34px; width: auto; }
.appbar .name { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: 0.2px; }
.appbar nav { display: flex; gap: 2px; margin-left: 8px; flex: 1 1 auto; }
.appbar nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.appbar nav a.on { background: var(--teal-tint); color: var(--teal-deep); }
.menu-wrap { position: relative; margin-left: auto; }
.menu { position: absolute; right: 0; top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 220px; padding: 6px; z-index: 30; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.menu .who b { display: block; color: var(--ink); font-size: 14px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; border: 0; background: none; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .phone-only { display: none; }

/* ---------- PC: controls left, quote right ---------- */
.pc-main { display: flex; min-height: calc(100vh - var(--bar-h)); background: var(--ground); }
.pc-left { flex: 0 1 560px; min-width: 0; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.pc-left-scroll { padding: 24px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.pc-right { flex: 1 1 0; min-width: 0; background: var(--desk); padding: 24px 28px 34px; }
.preview-stick { position: sticky; top: calc(var(--bar-h) + 16px); }
.preview-top { max-width: 760px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: space-between; color: #46525B; font-size: 13px; font-weight: 600; gap: 8px; flex-wrap: wrap; }
.preview-top .acts { display: flex; gap: 10px; align-items: center; }
.pill-upd { background: var(--lime); color: #2B2F00; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.pill-wait { background: var(--surface); color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.pages { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - var(--bar-h) - 90px); overflow-y: auto; padding: 2px 4px 8px; }
.pages img { width: 100%; height: auto; display: block; background: #FFFFFF; border-radius: 3px; box-shadow: 0 2px 4px rgba(29,42,51,0.08), 0 12px 32px rgba(29,42,51,0.12); transition: opacity 0.2s; }
.pages.updating img { opacity: 0.55; }
.paper-empty { max-width: 760px; margin: 0 auto; aspect-ratio: 8.5 / 11; background: #FFFFFF; border-radius: 3px; box-shadow: 0 2px 4px rgba(29,42,51,0.08), 0 12px 32px rgba(29,42,51,0.12); position: relative; padding: 40px; }
.paper-empty .ghost { height: 10px; border-radius: 4px; background: #EEF0F2; margin: 9px 0; }
.paper-empty .ttl { height: 16px; width: 40%; margin: 26px auto 18px; border-radius: 4px; background: #DCE4EC; }
.paper-empty .lh { height: 50px; border-bottom: 3px solid var(--navy); display: flex; align-items: center; }
.paper-empty .lh img { height: 42px; opacity: 0.6; }
.empty-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-msg .bubble { background: rgba(255,255,255,0.94); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow-sm); max-width: 320px; }
.empty-msg b { color: var(--ink); font-size: 17px; }
.greet { font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1.05; margin: 0; }
.greet-sub { margin: 6px 0 0; color: var(--muted); font-size: 16px; max-width: 46ch; }
.dropzone { border: 2px dashed #9CCBC7; background: var(--teal-tint); border-radius: var(--r-lg); padding: 22px; text-align: center; transition: background 0.15s, border-color 0.15s; }
.dropzone.over { background: var(--teal-soft); border-color: var(--teal); }
.dropzone .big-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--surface); color: var(--teal); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.dropzone .big-ico .ico { width: 26px; height: 26px; }
.dropzone h3 { margin: 12px 0 2px; font-size: 17px; }
.dropzone > p { margin: 0 0 14px; color: var(--muted); }
.drop-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.drop-btns button { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 52px; font-weight: 700; }
.drop-btns button:hover { border-color: var(--teal); }
.drop-btns button .ico { color: var(--teal); }
.drop-btns small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.tray { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.tray .item { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.tray .item:last-of-type { border-bottom: 0; }
.tray .item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.x-btn { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.x-btn:hover { background: var(--surface-2); color: var(--ink); }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.how div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px; font-size: 13.5px; color: var(--muted); }
.how b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.how .n { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-deep); font-weight: 800; font-size: 12px; align-items: center; justify-content: center; margin-bottom: 6px; }
.block { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.block-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.block-h h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.block-h .done { width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.block-h .done .ico { width: 14px; height: 14px; }
.block-h .todo { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--lime-line); background: var(--lime-soft); flex: none; }
.block-h small { color: var(--muted); font-weight: 600; text-align: right; }
.block-b { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--teal-deep); list-style: none; padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "− "; }
.list-ed { display: flex; flex-direction: column; gap: 6px; }
.list-ed .li { display: flex; gap: 8px; align-items: flex-start; }
.list-ed .k { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; margin-top: 11px; }
.list-ed .textarea { min-height: 44px; }
.cat { border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.sugg { background: var(--teal-tint); border: 1px solid var(--teal-soft); border-radius: var(--r-md); padding: 10px 14px; }
.price-box { background: var(--ink); color: #FFFFFF; border-radius: var(--r-md); padding: 14px 16px; }
.price-box .pr { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.price-box .pr label, .price-box .pr .lab { color: #B6C3CB; }
.price-box input { width: 150px; text-align: right; border: 0; border-radius: 8px; padding: 8px 10px; background: #FFFFFF; color: var(--ink); font-variant-numeric: tabular-nums; min-height: 38px; }
.price-box .line input.desc { width: auto; flex: 1 1 auto; text-align: left; min-width: 0; }
.price-box .tot { border-top: 1px solid #3A4B57; margin-top: 6px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price-box .tot input { font-family: var(--font-display); font-size: 24px; font-weight: 700; width: 180px; }
.price-box .link-btn { color: var(--lime); }
.price-box .x-btn { color: #B6C3CB; }
.price-box .hint { color: #B6C3CB; margin-top: 6px; }
.actionbar { position: sticky; bottom: 0; background: rgba(255,255,255,0.97); border-top: 1px solid var(--line); padding: 12px 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; z-index: 5; }
.actionbar .grow { flex: 1 1 100%; font-size: 13px; color: var(--muted); }
.actionbar .btn { flex: 1 1 0; white-space: nowrap; }
.sent { text-align: center; padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sent .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--teal); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px var(--teal-soft); }
.sent .tick .ico { width: 32px; height: 32px; }
.sent h3 { margin: 10px 0 0; font-family: var(--font-display); font-size: 30px; }
.sent p { margin: 0; color: var(--muted); max-width: 44ch; }
.reading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 80px 20px; text-align: center; }
.reading b { font-size: 18px; }
.reading span { color: var(--muted); max-width: 40ch; }
.err-box { background: var(--rust-soft); border: 1px solid var(--rust-line); color: #5A2A00; border-radius: var(--r-md); padding: 14px 16px; }
.history { font-size: 13.5px; }
.history li { margin: 0 0 6px; }
.history .when { color: var(--faint); }
.revs { display: flex; flex-direction: column; gap: 8px; }
.rev { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
.rev b { font-size: 15px; }
.rev .links { display: flex; gap: 12px; align-items: center; }

/* ---------- lists, admin ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 24px 20px 72px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-h h1 { font-family: var(--font-display); font-weight: 700; font-size: 34px; margin: 0; line-height: 1.05; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { max-width: 320px; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
table.grid th, table.grid td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.grid th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); background: var(--surface-2); }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tr.click { cursor: pointer; }
table.grid tr.click:hover td { background: var(--teal-tint); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.st-draft { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.st-check { background: var(--lime-soft); color: var(--lime-ink); border: 1px solid var(--lime-line); }
.st-done { background: var(--teal-soft); color: var(--teal-deep); }
.st-reading { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.st-failed { background: var(--rust-soft); color: var(--rust); }
.qcards { display: none; flex-direction: column; gap: 8px; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; }
.qcard .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.pcard h3 { margin: 0; font-size: 17px; }
.pcard ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
.three { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.three button { border: 0; background: var(--surface); padding: 5px 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.three button[aria-pressed="true"] { background: var(--teal); color: #FFFFFF; }
.three button + button { border-left: 1px solid var(--line); }

/* ---------- sign-in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin main { background: var(--surface); border-radius: 20px; padding: 32px 28px; width: 100%; max-width: 420px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.signin img { height: 54px; width: auto; align-self: flex-start; }
.signin h1 { font-family: var(--font-display); font-size: 34px; margin: 0; line-height: 1.05; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- modal, toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(29, 42, 51, 0.4); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-2); gap: 10px; }
.modal-h h2 { margin: 0; font-size: 19px; }
.modal-b { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.mail-item { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.mail-item:hover { border-color: var(--teal); }
.mail-item b { display: block; }
.mail-item small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #FFFFFF; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; max-width: calc(100vw - 32px); font-weight: 600; }
.toast.bad { background: var(--rust); }

/* ---------- phone: four steps ---------- */
.ph { display: flex; flex-direction: column; min-height: calc(100vh - var(--bar-h)); }
.ph-head { background: var(--surface); padding: 12px 16px 12px; border-bottom: 1px solid var(--line); }
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.ph-back { background: none; border: 0; display: inline-flex; align-items: center; gap: 4px; color: var(--teal-deep); font-weight: 700; padding: 6px 0; min-height: 34px; }
.ph-step { font-size: 13px; font-weight: 700; color: var(--muted); }
.ph-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.ph-bar i { height: 5px; border-radius: 3px; background: var(--line); }
.ph-bar i.on { background: var(--teal); }
.ph-title { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.08; margin: 8px 0 0; }
.ph-sub { margin: 4px 0 0; color: var(--muted); }
.ph-body { flex: 1; padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.ph-foot { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.ph-foot .btn { width: 100%; min-height: 52px; font-size: 16px; border-radius: 12px; }
.ph-foot .btn.btn-ghost { min-height: 44px; font-size: 15px; }
.ph-foot .note { font-size: 13px; color: var(--muted); text-align: center; }
.big-choice { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-height: 76px; box-shadow: var(--shadow-sm); }
.big-choice:hover { border-color: var(--teal); }
.big-choice .bi { width: 46px; height: 46px; border-radius: 14px; background: var(--teal-soft); color: var(--teal-deep); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.big-choice b { display: block; font-size: 16px; }
.big-choice small { color: var(--muted); font-size: 13px; }
.big-choice.primary { background: var(--teal); border-color: var(--teal); color: #FFFFFF; }
.big-choice.primary .bi { background: rgba(255,255,255,0.16); color: #FFFFFF; }
.big-choice.primary small { color: #CDE9E6; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-height: 60px; }
.checklist { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.checklist div { display: flex; align-items: center; gap: 8px; }
.checklist .ico { color: var(--teal); width: 18px; height: 18px; }
.checklist .no .ico { color: var(--lime-ink); }
.ph .pages { max-height: none; overflow: visible; padding: 0; }
.wave { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.05; margin: 4px 0 4px; }

@media (max-width: 899px) {
  .appbar { padding: 0 14px; gap: 10px; }
  .appbar nav { display: none; }
  .appbar img { height: 30px; }
  .menu .phone-only { display: block; }
  .row2, .drop-btns, .how { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 16px 16px 72px; }
  .page-h h1 { font-size: 30px; }
  table.grid.quotes { display: none; }
  .qcards { display: flex; }
  .price-box input { width: 130px; }
  .price-box .tot input { width: 150px; font-size: 22px; }
  .toolbar .input { max-width: none; flex: 1 1 100%; }
  .modal-back { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 88vh; }
  table.grid.users th:nth-child(4), table.grid.users td:nth-child(4) { display: none; }
}
