/* Quality Interior DFW app. Phone first: large touch targets, readable in sunlight, light and dark mode. */
:root {
  --brand: #1F3864;
  --brand-bright: #2F5597;
  --on-brand: #FFFFFF;
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --ink: #18202E;
  --muted: #5A6476;
  --line: #DFE3EA;
  --focus: #2F6FE0;
  --danger: #B3261E;
  --radius: 14px;
  --tap: 48px;
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E131B;
    --surface: #172030;
    --ink: #EDF1F7;
    --muted: #9BA6B9;
    --line: #283449;
    --focus: #6E9BFF;
    --danger: #FF8A80;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: var(--tap) 1fr auto;
  align-items: center;
  gap: 4px;
  padding: calc(env(safe-area-inset-top) + 6px) 8px 6px;
  background: var(--brand);
  color: var(--on-brand);
}
.topbar-title { margin: 0; font-size: 19px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 4px; }
.icon-btn {
  width: var(--tap);
  height: var(--tap);
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.icon-btn:active { background: rgba(255, 255, 255, 0.16); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.is-spinning .icon { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- layout and text ---------- */
.content { max-width: 720px; margin: 0 auto; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
.toolbar { display: grid; gap: 10px; }
.stack { display: grid; gap: 12px; }
.muted { color: var(--muted); }
.label { font-size: 15px; font-weight: 600; color: var(--muted); }
.version { margin-top: 28px; text-align: center; font-size: 13px; color: var(--muted); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.status-line { margin: 12px 2px 8px; font-size: 14px; color: var(--muted); }

/* ---------- form controls ---------- */
.field {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font-size: 18px;   /* 16px or more stops iPhone zooming in on focus */
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.field:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(47, 111, 224, 0.25); }
.field-code { font-size: 28px; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }
.btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 650;
  cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
@media (prefers-color-scheme: dark) { .btn-primary { background: var(--brand-bright); } }
.link { min-height: var(--tap); padding: 12px 4px; border: 0; background: none; color: var(--focus); font-size: 16px; cursor: pointer; }
.row-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.form-error { margin: 0; color: var(--danger); font-size: 15px; }
.form-error:empty { display: none; }
.hint {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* ---------- sign-in ---------- */
.signin { min-height: 100vh; min-height: 100dvh; }
.signin-hero {
  padding: calc(env(safe-area-inset-top) + 48px) 24px 32px;
  background: var(--brand);
  color: var(--on-brand);
  text-align: center;
}
.signin-hero h1 { margin: 14px 0 4px; font-size: 25px; }
.signin-hero p { margin: 0; opacity: 0.85; }
.brand-mark { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.signin-body {
  display: grid;
  gap: 20px;
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
}

/* ---------- project list ---------- */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: var(--line);
}
.segment {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.segment.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.list { display: grid; gap: 8px; }
.card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}
.card:active { transform: scale(0.99); }
.card-main { flex: 1; min-width: 0; }
.card-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnum { margin-right: 6px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.card-sub { margin-top: 2px; font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-side { display: grid; justify-items: end; gap: 6px; text-align: right; }
.amount { font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- status chips ---------- */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 650; background: #E7EDF8; color: #23406F; }
.chip-won { background: #E2F3E6; color: #1D6A34; }
.chip-complete { background: #ECEEF2; color: #4A5263; }
.chip-lost { background: #FBE5E3; color: #9A2A21; }
.chip-on-hold { background: #FFF0D6; color: #865700; }
@media (prefers-color-scheme: dark) {
  .chip { background: rgba(110, 155, 255, 0.18); color: #C5D6FF; }
  .chip-won { background: rgba(76, 175, 80, 0.2); color: #A8E5AC; }
  .chip-complete { background: rgba(255, 255, 255, 0.1); color: #C7CDD8; }
  .chip-lost { background: rgba(244, 67, 54, 0.2); color: #FFB4AB; }
  .chip-on-hold { background: rgba(255, 179, 0, 0.18); color: #FFD88A; }
}

/* ---------- one project ---------- */
.panel { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-title { margin: 0; font-size: 22px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 16px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

/* ---------- messages ---------- */
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  z-index: 50;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: #18202E;
  color: #FFFFFF;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* ================================================================ v0.2: tabs, forms, details */
:root { --accent-ink: #1F3864; --warn-bg: #FFF4DB; --warn-ink: #6B4A00; --warn-line: #F0D28A; }
@media (prefers-color-scheme: dark) {
  :root { --accent-ink: #9DB8FF; --warn-bg: #3A2F12; --warn-ink: #FFE2A3; --warn-line: #6B5520; }
}

/* ---------- bottom tabs and the + button ---------- */
.has-tabbar { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 58px;
  padding: 8px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.tab.is-on { color: var(--accent-ink); }
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 21;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  padding: 0 20px 0 14px;
  border-radius: 26px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
@media (prefers-color-scheme: dark) { .fab { background: var(--brand-bright); } }

/* ---------- details ---------- */
.link-title { display: block; color: var(--ink); text-decoration: none; }
.link-title[href]::after { content: " ›"; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.contact-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.contact-btn {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 64px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.contact-btn.is-off { opacity: 0.35; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 24px 2px 10px; }
.section-title h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.btn { display: inline-grid; place-items: center; text-decoration: none; }
.btn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.small-btn {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.small { font-size: 14px; }
.empty.small { padding: 12px; }
.card-sub.is-soon { color: var(--accent-ink); font-weight: 600; }
.due { font-size: 13px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.due.is-today { color: #B26A00; }
.due.is-late { color: var(--danger); }

/* ---------- status chips for leads ---------- */
.chip-contacted { background: #FFF0D6; color: #865700; }
.chip-converted { background: #E2F3E6; color: #1D6A34; }
.chip-not-interested, .chip-no-response, .chip-duplicate { background: #ECEEF2; color: #4A5263; }
@media (prefers-color-scheme: dark) {
  .chip-contacted { background: rgba(255, 179, 0, 0.18); color: #FFD88A; }
  .chip-converted { background: rgba(76, 175, 80, 0.2); color: #A8E5AC; }
  .chip-not-interested, .chip-no-response, .chip-duplicate { background: rgba(255, 255, 255, 0.1); color: #C7CDD8; }
}

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field-row { grid-column: 1 / -1; display: grid; gap: 6px; min-width: 0; }
.field-row.half { grid-column: auto; }
.full { grid-column: 1 / -1; }
.field-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.field-hint { font-size: 13px; color: var(--muted); }
textarea.field { min-height: 96px; resize: vertical; line-height: 1.35; }
select.field { appearance: auto; }
.field.is-invalid { border-color: var(--danger); }
.form-actions { display: grid; gap: 10px; }

/* ---------- customer picker and duplicate warning ---------- */
.picker { display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.picker-label { font-size: 14px; font-weight: 700; color: var(--muted); }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  text-align: left;
  cursor: pointer;
}
.match-name { font-weight: 650; }
.notice { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--warn-line); border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); }
.notice[hidden] { display: none; }
.match { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.match .muted { color: inherit; opacity: 0.8; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check-row input { width: 22px; height: 22px; }

/* messages sit above the bottom tabs */
.toast { bottom: calc(env(safe-area-inset-bottom) + 76px); }

/* ================================================================ v0.3: measuring */
:root { --ok-ink: #1D6A34; --on-bg: #E7EDF8; }
@media (prefers-color-scheme: dark) { :root { --ok-ink: #A8E5AC; --on-bg: rgba(110, 155, 255, 0.22); } }

/* grids never grow wider than the screen because of long one-line text */
.stack, .list, .window-form, .more-body, .measure, .measure-box { grid-template-columns: minmax(0, 1fr); }

/* save status, in the top bar */
.sync-chip {
  min-height: 32px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--on-brand);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  align-self: center;
}
.sync-chip.is-waiting { background: #FFE2A3; color: #4A3300; }
.sync-chip.is-problem { background: #FFD3CF; color: #7A1A13; }

/* project details: Rooms & windows */
.measure-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}
.measure-box-text { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.measure-box .small-btn { min-height: 46px; }
.small-btn.is-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
@media (prefers-color-scheme: dark) { .small-btn.is-primary { background: var(--brand-bright); border-color: var(--brand-bright); } }
.done-note { margin: 0; color: var(--ok-ink); font-weight: 600; }

/* rooms */
.measure-head .muted { margin: 4px 0 0; }
.measure-count { margin: 8px 0 0; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  min-height: 40px;
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.chip-btn:active { background: var(--on-bg); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.inline-form .small-btn { min-height: 52px; }
.win-num {
  flex: none;
  min-width: 44px;
  padding: 6px 0;
  border-radius: 10px;
  background: var(--on-bg);
  color: var(--accent-ink);
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* one window */
.window-form { display: grid; gap: 18px; }
.measure { display: grid; gap: 8px; }
.measure-top { display: flex; align-items: baseline; justify-content: space-between; }
.measure-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.measure-input { font-size: 24px; font-variant-numeric: tabular-nums; }
.fracs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.frac {
  min-height: 44px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}
.frac.is-on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
@media (prefers-color-scheme: dark) { .frac.is-on { background: var(--brand-bright); border-color: var(--brand-bright); } }
.more { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.more summary { min-height: var(--tap); padding: 12px 14px; font-weight: 650; color: var(--accent-ink); cursor: pointer; }
.more-body { display: grid; gap: 18px; padding: 4px 14px 16px; }
.link.danger { color: var(--danger); justify-self: center; }

/* review */
.room-title { margin: 0 0 8px; font-size: 17px; }
.summary-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.summary-size { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-row .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================ v0.4: photos */
.measure-buttons { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.photo-strip { display: grid; gap: 10px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs[hidden] { display: none; }
.thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
  text-decoration: none;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-empty { font-size: 22px; opacity: 0.5; }
.thumb.is-waiting::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #F2A900;
}
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.camera-wrap { position: relative; display: inline-flex; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.camera-btn { min-height: 46px; }
.upload-note { margin: 6px 0 10px; }
.type-select { min-height: 46px; font-size: 16px; }
.photo-row { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.photo-row-label { display: flex; align-items: center; gap: 10px; text-decoration: none; }

/* full-size viewer */
.viewer-picture { display: grid; place-items: center; min-height: 240px; border-radius: 12px; overflow: hidden; background: #000; }
.viewer-picture .muted { color: #C7CDD8; }
.viewer-picture img { display: block; max-width: 100%; max-height: 70vh; }
.viewer-caption { margin: 0; font-weight: 600; }
.danger-btn { color: var(--danger); }

/* ================================================================ v0.5: money and orders */
.money-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.money-big { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; }
.money-big.is-due, .amount.is-due { color: #B26A00; }
.money-big.is-paid { color: var(--ok-ink); }
@media (prefers-color-scheme: dark) { .money-big.is-due, .amount.is-due { color: #FFC266; } }
.money .facts { margin-top: 12px; }
.money .btn-row { margin-top: 16px; }
.lines { display: grid; gap: 6px; margin-top: 12px; }
.lines-title { margin: 6px 2px 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
}
.line-main { display: grid; flex: 1; min-width: 0; }
.line-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-title { font-weight: 600; }
.amount.is-refund { color: var(--danger); }
.remove-btn { display: block; margin: 12px auto 0; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-actions { display: grid; gap: 4px; }
.order-actions .chips { margin-bottom: 4px; }
.chip-btn.is-on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
@media (prefers-color-scheme: dark) { .chip-btn.is-on { background: var(--brand-bright); border-color: var(--brand-bright); } }
.receive-row { display: grid; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.received-count { margin: -4px 2px 6px; font-weight: 650; }
.item-check { align-items: flex-start; padding: 4px 0; }
.item-check input { flex: none; margin-top: 2px; }

/* order status chips */
.chip-not-ordered { background: #ECEEF2; color: #4A5263; }
.chip-in-production, .chip-missing-items { background: #FFF0D6; color: #865700; }
.chip-delivered { background: #E2F3E6; color: #1D6A34; }
.chip-damaged { background: #FBE5E3; color: #9A2A21; }
@media (prefers-color-scheme: dark) {
  .chip-not-ordered { background: rgba(255, 255, 255, 0.1); color: #C7CDD8; }
  .chip-in-production, .chip-missing-items { background: rgba(255, 179, 0, 0.18); color: #FFD88A; }
  .chip-delivered { background: rgba(76, 175, 80, 0.2); color: #A8E5AC; }
  .chip-damaged { background: rgba(244, 67, 54, 0.2); color: #FFB4AB; }
}

/* ================================================================ v0.6: stages and installs */
.chip-tone-action { background: #FFF0D6; color: #865700; }
.chip-tone-done { background: #E2F3E6; color: #1D6A34; }
.chip-tone-stopped { background: #ECEEF2; color: #4A5263; }
.chip-tone-lost { background: #FBE5E3; color: #9A2A21; }
.chip-tone-on-hold { background: #FFF0D6; color: #865700; }
@media (prefers-color-scheme: dark) {
  .chip-tone-action, .chip-tone-on-hold { background: rgba(255, 179, 0, 0.18); color: #FFD88A; }
  .chip-tone-done { background: rgba(76, 175, 80, 0.2); color: #A8E5AC; }
  .chip-tone-stopped { background: rgba(255, 255, 255, 0.1); color: #C7CDD8; }
  .chip-tone-lost { background: rgba(244, 67, 54, 0.2); color: #FFB4AB; }
}
.stage-line { display: grid; gap: 10px; margin-top: 10px; }
.stage-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.stage-line .stage-top { margin-top: 0; }
.stage-warnings { gap: 4px; font-size: 15px; }
.ready-tag { font-size: 13px; font-weight: 700; color: #B26A00; white-space: nowrap; }
.ready-tag.is-ready { color: var(--ok-ink); }
@media (prefers-color-scheme: dark) { .ready-tag { color: #FFC266; } }
.checks { display: grid; gap: 6px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.check { display: flex; gap: 10px; align-items: baseline; }
.check-mark { flex: none; width: 18px; font-weight: 800; color: var(--danger); text-align: center; }
.check.is-ok .check-mark { color: var(--ok-ink); }
.install-page { display: grid; gap: 8px; }
.install-page > .small-btn { justify-self: start; }

/* ================================================================ v0.7: Today and tasks */
.today-date { margin: 4px 2px 0; font-size: 20px; font-weight: 700; }
.today > .section-title:first-child { margin-top: 4px; }
.appt-time { display: grid; justify-items: start; min-width: 72px; font-variant-numeric: tabular-nums; }
.todo {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 60px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}
.todo-main { display: grid; flex: 1; gap: 2px; min-width: 0; text-decoration: none; }
.todo-title { font-weight: 650; color: var(--ink); text-decoration: none; }
.todo-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--on-bg); color: var(--accent-ink); }
.todo-icon .icon { width: 20px; height: 20px; }
.suggestion { border-color: var(--warn-line); }
.suggestion .todo-icon { background: var(--warn-bg); color: var(--warn-ink); }
.todo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.later { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.later[hidden] { display: none; }
.tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
  cursor: pointer;
}
.tick .icon { width: 20px; height: 20px; stroke-width: 3; }
.tick:active, .tick.is-done { border-color: var(--ok-ink); background: var(--ok-ink); color: #FFFFFF; }
.is-late { color: var(--danger); }
.task-extra { display: grid; gap: 10px; margin-top: 16px; }
