/* Tonttu (named Tomte until 2026-11-13) — "Workshop label" (founder 2026-11-10). A well-organised garage: ochre, charcoal, linen;
   Familjen Grotesk headlines, JetBrains Mono dates and part numbers, Inter sentences; hard outlines
   and offset shadows; tape labels, a late stamp, dashed part tags.
   Source of truth: the design system (claude.ai artifact Xt5ReRbYhzFNuMfF549GTx, still titled Tomte)
   and the brand guide (~/.claude/skills/tonttu). Class names .tomte-* are internal and stay. Rules that bite: ochre is a FILL, never text on a light
   ground; red ("late") means past due and nothing else; no inline styles (CSP style-src 'self'). */

@font-face { font-family: "Familjen Grotesk"; src: url("/fonts/familjen-grotesk.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ground: #F4EFE4;      /* linen */
  --paper: #FFFEFB;
  --ink: #1C1A17;
  --ink-2: #5E594F;
  --rule: #D6CFC0;
  --outline: #1C1A17;
  --charcoal: #1C1A17;
  --on-charcoal: #FFFEFB;
  --on-charcoal-2: #D6CFC0;
  --ochre: #E09A2D;
  --on-ochre: #1C1A17;
  --ochre-tint: #F3E6CC;
  --ochre-ink: #6B450C;
  --late: #B4321F;
  --late-tint: #FBE9E5;
  --skill-1: #4E8A3E; --skill-2: #E09A2D; --skill-3: #D2691E; --skill-4: #A84E14; /* easy → call a pro */
  --shadow-ink: #1C1A17;
  --focus: #E09A2D;
  --display: "Familjen Grotesk", "Arial Narrow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --stroke: 2px;
  --radius: 6px;
  --shadow: 4px 4px 0 var(--shadow-ink);
  --shadow-ochre: 4px 4px 0 var(--ochre);
  --shadow-press: 3px 3px 0 var(--shadow-ink);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #191714;
    --paper: #24211C;
    --ink: #F4EFE4;
    --ink-2: #B9B1A2;
    --rule: #3A352D;
    --outline: #E9E2D3;
    --charcoal: #0F0E0C;
    --on-charcoal: #F4EFE4;
    --on-charcoal-2: #B9B1A2;
    --ochre-tint: #3A2D16;
    --ochre-ink: #E9A94A;
    --late: #F0715C;
    --late-tint: #3A1E18;
    --skill-1: #74B862; --skill-2: #E09A2D; --skill-3: #EC8740; --skill-4: #E0702A;
    --shadow-ink: #000000;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 var(--body);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
main { max-width: 560px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); outline: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
main:focus, main:focus-visible { outline: none; } /* focus moves here on each screen for screen readers; no ring */
p { margin: 0 0 12px; }

/* ---- chrome: charcoal header and tab bar (both stay charcoal in dark mode) --------------------- */

.top { background: var(--charcoal); color: var(--on-charcoal); padding-top: env(safe-area-inset-top); }
.top-in {
  max-width: 560px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-charcoal); }
.brand .word { font: 700 26px/1 var(--display); letter-spacing: -0.03em; }
.mark .hat { fill: var(--ochre); } .mark .eave { fill: var(--on-charcoal); } .mark .door { fill: var(--charcoal); }

/* ---- opening walk-in (spec 2026-11-13-opening-animation, mockup v2, palette B) ----------------
   On every open/refresh the tomte walks in from the column's left edge, sits, and his hat lands on
   the mark's exact spot; the last frame IS the logo (the mark's shapes are the top layer). 1.3 s,
   CSS only (starts at first paint, never waits for the app); app.js removes .play when it ends or on a tap;
   reduce-motion shows the logo alone. The one sanctioned appearance of the character (brand skill). */
.top-in { overflow: hidden; } /* he steps in from the edge, not from mid-air on wide screens */
.mark { overflow: visible; }
.mark * { transform-box: view-box; }
.mark .beard { fill: #E3DACA; } .mark .nose { fill: #D9876A; } .mark .coat { fill: #B37A22; }
.mark .shin { fill: #F4EFE4; } .mark .boot { fill: #6B6457; }
.mark .tomte { opacity: 0; } /* at rest only the logo exists */
.brand.play .tomte { opacity: 1; }
.brand.play .walker { animation: tomte-walk 1080ms cubic-bezier(.25,.7,.35,1) both; }
.brand.play .bob { animation: tomte-bob 270ms ease-in-out 4 alternate both; }
.brand.play .leg-l { transform-origin: 10.5px 17px; animation: tomte-step-l 270ms linear 4 alternate both; }
.brand.play .leg-r { transform-origin: 13.5px 17px; animation: tomte-step-r 270ms linear 4 alternate both; }
.brand.play .head { animation: tomte-sit 1950ms cubic-bezier(.3,.8,.3,1) both; }
.brand.play .tomte-body { animation: tomte-tuck 1950ms ease-in both; }
.brand.play .tomte-face { animation: tomte-hide 1950ms ease-in both; }
.brand.play .word { animation: tomte-word 1950ms ease-out both; }
@keyframes tomte-walk { from { transform: translateX(-40px); } to { transform: translateX(0); } }
@keyframes tomte-bob { from { transform: translateY(0); } to { transform: translateY(-1px); } }
@keyframes tomte-step-l { from { transform: rotate(22deg); } to { transform: rotate(-22deg); } }
@keyframes tomte-step-r { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes tomte-sit { 0%, 55% { transform: translateY(-9px); } 82% { transform: translateY(.6px) scaleY(.96); } 92% { transform: translateY(-.3px); } 100% { transform: translateY(0); } }
@keyframes tomte-tuck { 0%, 58% { transform: translateY(0) scaleY(1); opacity: 1; } 86% { transform: translateY(4px) scaleY(.4); opacity: 1; } 100% { transform: translateY(5px) scaleY(.2); opacity: 0; } }
@keyframes tomte-hide { 0%, 70% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-3px); } }
@keyframes tomte-word { 0%, 45% { opacity: 0; transform: translateX(-6px); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .brand.play .tomte { opacity: 0; }
  .brand.play *, .brand.play .word { animation: none !important; }
}
.top-meta { font: 500 13px/1 var(--mono); color: var(--ochre); text-transform: uppercase; letter-spacing: .02em; }


.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: flex; justify-content: center;
  background: var(--charcoal);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.tabs a {
  flex: 1; max-width: 140px; text-align: center; padding: 16px 4px;
  font: 600 15px/1 var(--display); color: var(--on-charcoal-2); text-decoration: none;
}
.tabs a[aria-current="page"] { background: var(--ochre); color: var(--on-ochre); font-weight: 700; }

/* ---- type ------------------------------------------------------------------------------------- */

h1 { font: 700 30px/1.08 var(--display); margin: 18px 0 10px; letter-spacing: -0.03em; text-wrap: balance; }
/* Home's summary: "1 late. / 1 to order." */
h1.summary { font-size: 34px; line-height: 1.05; letter-spacing: -0.035em; margin-top: 4px; text-wrap: balance; }
h2 {
  font: 700 12px/1.33 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  margin: 28px 0 12px; display: flex; align-items: baseline; gap: 8px;
}
/* Tape labels: a section that needs attention gets a strip of tape, slightly crooked. */
h2 .count { font-weight: 500; font-variant-numeric: tabular-nums; }
h3 { font: 700 18px/1.25 var(--display); letter-spacing: -0.02em; margin: 0 0 6px; }
.lede { color: var(--ink-2); max-width: 34em; }
.eyebrow { font: 700 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 18px 0 0; }
/* Back arrow, top left beside the eyebrow (spec 2026-11-13-back-arrow). Ochre is a fill, arrow charcoal. */
.head-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.head-row .eyebrow { margin: 0; }
button.back {
  width: 44px; height: 44px; min-height: 44px; padding: 0; flex: none;
  background: var(--ochre); color: var(--on-ochre); border-color: var(--charcoal); box-shadow: var(--shadow-press);
}
button.back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-ink); }
button.back svg { width: 22px; height: 22px; }
button.back path { fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.pad { padding: 16px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.late-text { color: var(--late); }
.spacer { flex: 1; }

/* ---- controls -------------------------------------------------------------------------------- */

button, .btn {
  font: 700 16px/1 var(--display); cursor: pointer;
  min-height: 48px; padding: 10px 18px; border-radius: var(--radius);
  border: var(--stroke) solid var(--outline); background: var(--paper); color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary, .btn-order { background: var(--ochre); color: var(--on-ochre); border-color: var(--charcoal); box-shadow: var(--shadow-press); }
.btn-primary:active, .btn-order:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-ink); }
.btn-done { background: var(--charcoal); color: var(--on-charcoal); border-color: var(--outline); }
.btn-danger { border-color: var(--late); color: var(--late); }
.btn-link {
  border: 0; padding: 6px 2px; min-height: 0; background: none; box-shadow: none;
  font: 600 15px/1.3 var(--body); text-decoration: underline; text-underline-offset: 3px;
}
button:disabled { opacity: .45; cursor: default; box-shadow: none; transform: none; }
.wide { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; align-items: center; }

/* Setup answers */
.choices { display: grid; gap: 12px; margin: 18px 0; }
.choice {
  text-align: left; font: 600 17px/1.3 var(--display); color: var(--ink); background: var(--paper);
  border: var(--stroke) solid var(--outline); border-radius: var(--radius); padding: 14px 16px;
  display: grid; gap: 4px; justify-content: stretch; min-height: 0;
}
.choice small { color: var(--ink-2); font: 400 14px/1.4 var(--body); }
.choice:hover { box-shadow: var(--shadow); }
.choice[aria-pressed="true"] { background: var(--ochre-tint); box-shadow: var(--shadow-ochre); }

.alts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { font: 600 15px/1 var(--body); min-height: 44px; border-width: var(--stroke); border-radius: var(--radius); padding: 8px 14px; }
.pill[aria-pressed="true"] { background: var(--charcoal); color: var(--on-charcoal); border-color: var(--charcoal); }

form { margin: 0; }
label { display: block; font-weight: 600; font-size: 15px; margin: 18px 0 6px; }
label.first { margin-top: 0; }
label.inline-label { display: inline; margin: 0; font-weight: 600; }
.hint { font-weight: 400; color: var(--ink-2); font-size: 14px; }
input, select, textarea {
  width: 100%; font: 16px/1.4 var(--body); color: var(--ink);
  background: var(--paper); border: var(--stroke) solid var(--outline); border-radius: var(--radius); padding: 10px 12px; min-height: 48px;
}
textarea { min-height: 96px; resize: vertical; }
/* iOS Safari draws date inputs at a fixed native width (they ran past the card edge, founder
   2026-11-10) and shows nothing when empty. Plain box on iOS only; desktop keeps its calendar icon. */
input[type=date] { display: block; min-width: 0; max-width: 100%; }
@supports (-webkit-touch-callout: none) {
  input[type=date] { -webkit-appearance: none; appearance: none; }
  input[type=date]::-webkit-date-and-time-value { text-align: left; }
  input[type=date][data-empty]::before { content: 'Tap to pick a date'; color: var(--ink-2); }
}
.inline { display: flex; gap: 8px; align-items: center; }
.inline > * { flex: 1; min-width: 0; }
.inline > .fit { flex: 0 0 auto; width: auto; }
.inline > input.fit { width: 5.5em; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; font-weight: 400; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.check > input[type=checkbox] { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; accent-color: var(--ochre); }
.check b { font: 700 17px/1.3 var(--display); letter-spacing: -0.01em; }
.check label { margin: 10px 0 4px; font-size: 14px; }
.every { color: var(--ink-2); font-size: 14px; font-weight: 400; display: block; }
.error { color: var(--late); font-weight: 600; margin: 12px 0 0; }

/* ---- cards ------------------------------------------------------------------------------------ */

.card { background: var(--paper); border: var(--stroke) solid var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-top: 14px; }
.card .actions { margin-top: 14px; }
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 4px 16px 16px; margin-top: 18px; }
.detail-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; margin-bottom: 8px; }
.detail-row button { min-width: 48px; padding: 0; }
.note { font-size: 14px; color: var(--ink-2); border: 1.5px dashed var(--ink-2); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0 0; }
.note .btn-link { color: var(--ink); font-size: 14px; }

/* Part tags: things you'd read off a part or its box. */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.tag { border: 1.5px dashed var(--outline); border-radius: 4px; padding: 3px 8px; font: 700 13px/1.3 var(--mono); text-transform: uppercase; }

/* ---- why it matters / who can do it ---------------------------------------------------------- */

.why { margin-top: 16px; border-top: var(--stroke) solid var(--outline); padding: 14px 0 4px; }
.why ul { margin: 6px 0; padding-left: 18px; }
.why li { margin: 4px 0; }
.cost { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 15px; margin: 10px 0; }
.cost span:nth-child(even) { text-align: right; font: 700 14px/1.4 var(--mono); }
.src { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }

/* Filled steps coloured easy → hard: green, yellow, orange, deep orange (founder 2026-11-13, spec
   2026-11-13-back-arrow §8). Never red: red means late only (founder 2026-11-10). The level is also
   named in words, so the colour never carries the meaning alone. */
.diy { margin: 18px 0 6px; }
.diy-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font: 700 17px/1.3 var(--display); }
.diy-head .small { font: 500 13px/1.6 var(--mono); text-transform: uppercase; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 0 4px; }
.meter i { height: 10px; background: var(--rule); } /* only the job's own step is coloured (founder 2026-11-13) */
.meter i.on:nth-child(1) { background: var(--skill-1); }
.meter i.on:nth-child(2) { background: var(--skill-2); }
.meter i.on:nth-child(3) { background: var(--skill-3); }
.meter i.on:nth-child(4) { background: var(--skill-4); }
.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font: 500 10.5px/1.3 var(--mono); text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.scale span:nth-child(2), .scale span:nth-child(3) { text-align: center; }
.scale span:last-child { text-align: right; }
.scale span.on { color: var(--ink); font-weight: 700; }

/* ---- home ------------------------------------------------------------------------------------ */

.nudge {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--ochre); color: var(--on-ochre); border: var(--stroke) solid var(--charcoal); border-radius: var(--radius);
  box-shadow: var(--shadow-press); padding: 10px 14px; margin: 12px 0 4px; font-size: 15px; font-weight: 500;
}
.nudge .btn-link { color: var(--on-ochre); font-weight: 700; white-space: nowrap; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.row {
  position: relative; color: var(--ink); background: var(--paper); text-decoration: none;
  border: var(--stroke) solid var(--outline); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
}
.row:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.row .t { font: 700 19px/1.2 var(--display); letter-spacing: -0.02em; min-width: 0; }
.row .m { font-size: 14px; color: var(--ink-2); grid-column: 1; min-width: 0; }
.row .d { grid-row: 1 / span 2; grid-column: 2; font: 700 13px/1.3 var(--mono); text-transform: uppercase; text-align: right; white-space: nowrap; }
/* Coming up, later, landlord: a plain list, not more boxes. */
.rows.flat { gap: 0; border-top: var(--stroke) solid var(--outline); }
.rows.flat .row { border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; box-shadow: none; background: none; padding: 12px 2px; }
.rows.flat .row .t { font-size: 17px; font-weight: 600; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 6px; vertical-align: 1px; }
.chip { font: 700 11px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; border: 1.5px solid var(--ink-2); color: var(--ink-2); border-radius: 4px; padding: 0 6px; }
.chip.est { border-style: dashed; }
.chip.ord { background: var(--ochre); border-color: var(--charcoal); color: var(--on-ochre); }
.chip.ll, .chip.q { border-color: var(--ink); color: var(--ink); }
/* Home (spec 2026-11-14-calm-app §4.1): one plain list; the row opens the job, the circle marks it done. */
.rows.home { gap: 0; border-top: 1px solid var(--rule); margin-top: 18px; }
.home-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule); transition: opacity .3s, transform .3s; }
.home-row.leaving { opacity: 0; transform: translateX(24px); }
.row-link { flex: 1; min-width: 0; padding: 13px 0; color: var(--ink); text-decoration: none; display: grid; gap: 2px; }
.row-link .t { font: 600 18px/1.25 var(--display); letter-spacing: -0.015em; }
.row-link:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.row-link .m { font-size: 14px; color: var(--ink-2); }
.row-link .m.late { color: var(--late); font-weight: 600; }
.done-circle { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: transparent; color: var(--ink); border: var(--stroke) solid var(--outline); box-shadow: none; }
.done-circle svg { width: 20px; height: 20px; opacity: .4; }
.done-circle path { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done-circle:hover svg, .home-row.leaving .done-circle svg { opacity: 1; }
.home-row.leaving .done-circle { background: var(--ink); color: var(--ground); }
.home-row .buy { flex: none; min-height: 44px; padding: 0 16px; }
p.next { margin: 18px 0 0; padding: 12px 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); font-size: 15px; color: var(--ink-2); }
p.next b { color: var(--ink); font-weight: 600; }
a.see-all { display: inline-block; margin-top: 16px; font: 600 16px/1.3 var(--display); color: var(--ink); text-underline-offset: 4px; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast[hidden] { display: none; }
.toast-action { background: none; border: 0; box-shadow: none; color: var(--ochre); font: 700 15px/1 var(--display); padding: 8px 4px; min-height: 0; }
@media (prefers-reduced-motion: reduce) { .home-row { transition: none; } }
/* Home-tab count (critical path 6, amended 2026-11-14): ochre, never red; charcoal on the active tab. */
.tabs .count { display: inline-block; margin-left: 6px; min-width: 20px; padding: 2px 5px; border-radius: 10px; background: var(--ochre); color: var(--on-ochre);
  font: 700 12px/16px var(--mono); text-align: center; vertical-align: 1px; }
.tabs .count[hidden] { display: none; }
.tabs a[aria-current="page"] .count { background: var(--charcoal); color: var(--ochre); }
/* All jobs (§4.3). */
.jobs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.jobs-head h1 { margin-bottom: 6px; }
.seg { display: inline-flex; border: var(--stroke) solid var(--outline); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; border-radius: 0; box-shadow: none; min-height: 40px; padding: 0 12px; font: 600 14px/1 var(--display); background: var(--paper); color: var(--ink); }
.seg button + button { border-left: var(--stroke) solid var(--outline); }
.seg button[aria-pressed="true"] { background: var(--ochre); color: var(--on-ochre); }
h2.group { font: 700 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 22px 0 6px; }
.row .d.late { color: var(--late); }
.row .m .mono { font: 500 13px/1 var(--mono); }

details { border-bottom: 1px solid var(--rule); }
details.later { margin-top: 22px; border-bottom: 0; }
details.later .rows { padding-bottom: 8px; }
summary { cursor: pointer; padding: 12px 0; font: 700 16px/1.3 var(--display); }
summary small { font: 500 13px var(--mono); color: var(--ink-2); }
.plain { list-style: none; margin: 0; padding: 0; border-top: var(--stroke) solid var(--outline); }
.plain li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--rule); font-size: 15px; }
.plain li .muted { font: 700 13px/1.6 var(--mono); text-transform: uppercase; }

.empty { padding: 20px 0 8px; }
.empty p { margin: 0 0 16px; max-width: 30em; }

.toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--charcoal); color: var(--on-charcoal); padding: 12px 16px; border-radius: var(--radius);
  border: var(--stroke) solid var(--charcoal); box-shadow: var(--shadow-ochre);
  font-weight: 600; z-index: 20; max-width: calc(100% - 32px);
}

@media (prefers-reduced-motion: no-preference) {
  .screen { animation: in .18s ease-out; }
  @keyframes in { from { opacity: .4; transform: translateY(4px); } }
}

/* ---- the job page, in order (calm-app §4.4) ---------------------------------------------------- */
.status-line { margin: 6px 0 0; font-size: 17px; }
.state-note { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.state-note .btn-link { font-size: 14px; color: var(--ink); }
.job-actions { display: flex; gap: 10px; margin-top: 18px; }
.job-actions > * { flex: 1; min-height: 52px; font-size: 18px; }
.job-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.job-links .btn-link { min-height: 44px; font-size: 15px; }
.earlier { margin-top: 4px; }
.can-i { margin-top: 26px; }
.can-i h2 { margin: 0 0 4px; font-size: 18px; }
.can-i p { margin: 0 0 8px; }
.can-i .diy { margin: 6px 0 0; max-width: 360px; }
.can-i .meter i { height: 6px; }
details.fold summary { min-height: 44px; display: flex; align-items: center; }
details.fold > p, details.fold > div, details.fold > ul { margin: 0 0 14px; }
.can-i + details.fold, .can-i + .folds-end { margin-top: 14px; }
.folds-end { margin-top: 26px; }
.folds-end details.fold summary { font-size: 15px; }
.edit-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 600; color: var(--ink); }

/* the thing card on a job's page (calm-app §4.4 step 6) */
.thing-card { margin-top: 26px; border: 2px solid var(--outline); border-radius: var(--radius); background: var(--paper); padding: 14px 16px 10px; }
.thing-card h2 { margin: 0 0 6px; font-size: 18px; }
.card-row { border-top: 1px solid var(--rule); padding: 8px 0; }
.card-row:first-of-type { border-top: 0; }
.card-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.card-row .k { font-weight: 600; margin: 0; }
.card-row .v { font: 600 15px/1.3 var(--mono); text-align: right; overflow-wrap: anywhere; }
.card-row p.small { margin: 0 0 4px; }
.card-row .inline { margin-top: 6px; }
.card-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink); }
details.fold summary .count { margin-left: 8px; }

/* Settings: the privacy link sits apart from the sign-out buttons (pilot 2026-11-15). */
.privacy-link { margin-top: 28px; }
