/* hostpilot interface. The brand colour comes from /assets/brand.css. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("fonts/barlow-700.woff2") format("woff2"); }

:root {
  --brand: #0f4a3c;
  --on-brand: #ffffff;
  --ground: #f2f5f1;
  --surface: #ffffff;
  --ink: #14201c;
  --ink-2: #45534d;
  --line: #d2d9d3;
  --line-strong: #76847c;
  /* The one colour for "this changes the total". Used for nothing else. */
  --total: #f2c230;
  --info: #174f86;
  --info-bg: #e4edf7;
  --error: #a3211a;
  --error-bg: #fbebea;
  --ok: #1d6a45;
  --on-brand-2: color-mix(in srgb, var(--on-brand) 78%, var(--brand));
  --rail-hover: color-mix(in srgb, var(--on-brand) 9%, var(--brand));
  --rail-current: color-mix(in srgb, var(--on-brand) 17%, var(--brand));
  --radius: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 106.25%; -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  font-family: "Barlow", "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  caret-color: var(--ink);
  accent-color: var(--ink);
}
body.has-aside { grid-template-columns: 17.5rem minmax(0, 1fr) 21.5rem; }

::selection { background: var(--brand); color: var(--on-brand); }

h1, h2, p, ul, ol, dl, dd, fieldset, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.5rem 0.9rem; background: var(--surface); color: var(--ink); border-radius: var(--radius); }
.skip:focus { top: 1rem; }

.icon { flex: none; width: 1.15em; height: 1.15em; }
.n, .qn, .amount, .price, .num, .total strong, table { font-variant-numeric: tabular-nums lining-nums; }

/* --- rail ------------------------------------------------------------- */

.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 1.5rem 1rem 1.25rem;
  background: var(--brand); color: var(--on-brand);
  scrollbar-color: var(--on-brand-2) transparent; scrollbar-width: thin;
}
.rail :focus-visible { outline-color: var(--on-brand); }
.rail ::selection { background: var(--on-brand); color: var(--brand); }
.brand { padding: 0 0.6rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.rail-title { margin: 0.15rem 0 1.5rem; padding: 0 0.6rem; color: var(--on-brand-2); font-size: 0.94rem; overflow-wrap: anywhere; }

/* Positioned so that visually hidden labels stay inside the scrolling strip. */
.sections, .sections a { position: relative; }
.sections a {
  display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) 0.6rem 1.25rem; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.6rem; border-radius: var(--radius);
  text-decoration: none; font-weight: 500;
  transition: background-color 160ms var(--ease);
}
.sections a:hover { background: var(--rail-hover); }
.sections a[aria-current] { background: var(--rail-current); font-weight: 600; }
.sections .n { color: var(--on-brand-2); font-weight: 600; }
.sections a[aria-current] .n { color: var(--on-brand); }
.dot { display: block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #a9cff5; }

.mark { display: inline-flex; --mark-ground: var(--ground); }
.rail .mark { --mark-ground: var(--brand); }
.mark .ring { fill: none; stroke: currentColor; stroke-width: 1.75; opacity: 0.6; }
.mark .half, .mark .tick { display: none; }
.mark-progress .ring, .mark-complete .ring { opacity: 1; }
.mark-progress .half { display: block; fill: currentColor; }
.mark-complete .ring { fill: currentColor; }
.mark-complete .tick { display: block; fill: none; stroke: var(--mark-ground); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }

.rail-links { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rail-current); }
.rail-links a { display: block; padding: 0.4rem 0.6rem; border-radius: var(--radius); text-decoration: none; }
.rail-links a:hover { background: var(--rail-hover); }
.rail-links a[aria-current] { background: var(--rail-current); font-weight: 600; }
.rail-foot { margin-top: auto; padding: 1.5rem 0.6rem 0; }
.langs { display: flex; gap: 1rem; font-size: 0.94rem; }
.langs span { font-weight: 600; }
.langs a { color: var(--on-brand-2); }

/* --- main ------------------------------------------------------------- */

main { padding: 2.75rem 3rem 5rem; min-width: 0; }
main:focus { outline: none; }
.page { max-width: 46rem; }
.page.wide { max-width: 62rem; }
.nowrap { white-space: nowrap; }

h1 { font-size: 2rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
h1 .n { margin-right: 0.7rem; color: var(--ink-2); font-weight: 500; }
h2 { font-size: 1.2rem; line-height: 1.3; font-weight: 600; }
.lead { margin: 0.6rem 0 2rem; max-width: 62ch; font-size: 1.1rem; color: var(--ink-2); text-wrap: pretty; }
.note { font-size: 0.9rem; color: var(--ink-2); }

.group { margin-top: 2.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.group > h2 { margin-bottom: 0.5rem; }
.group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.when-api .group:first-child, .when-manual .group:first-child { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

.field { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); padding: 0.8rem 0; }
.field:target .qb { outline: 3px solid var(--info); outline-offset: 0.5rem; border-radius: 3px; }
.qn { padding-top: 0.12rem; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
label, legend, .label { font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-2); font-size: 0.92rem; }
.help { margin: 0.15rem 0 0; max-width: 62ch; font-size: 0.94rem; font-weight: 400; color: var(--ink-2); }
.help.unit { margin: 0 0 0.75rem 3.1rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"],
input[type="date"], input[type="time"], select, textarea {
  display: block; width: 100%; margin-top: 0.4rem; padding: 0.55rem 0.7rem;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color 160ms var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input::placeholder { color: var(--ink-2); opacity: 1; }
input[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
select:disabled { background: var(--ground); color: var(--ink-2); border-color: var(--line); }
textarea { min-height: 6.5rem; resize: vertical; }
input.short { width: 9rem; }
input[type="checkbox"], input[type="radio"] { flex: none; width: 1.15rem; height: 1.15rem; margin: 0; }
input[type="file"] { font: inherit; max-width: 100%; }
input[type="file"]::file-selector-button { margin-right: 0.75rem; padding: 0.3rem 0.7rem; font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--ink); background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius); cursor: pointer; }

.options { margin-top: 0.35rem; }
.option { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; font-weight: 400; cursor: pointer; }
.qb > .option { font-weight: 600; }

.with-swatch { display: flex; align-items: flex-end; gap: 0.75rem; }
.swatch { height: 48px; }
.swatch svg { display: block; }

/* Price-list lines: the signature of the interface. */
.boxes li { display: flex; align-items: baseline; gap: 0.6rem; }
.dots { flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--line-strong); transform: translateY(-0.28em); }
/* A leader row: the name may wrap; the dots start after its last word and run
   to the price, which sits on the last line. --row is the ground behind the row. */
.leader, .lines li, .rline { --row: var(--ground); display: block; position: relative; overflow: hidden; padding-right: 6.75rem; }
.leader > .dots, .lines .dots { display: none; }
.leader .lname::after, .lines .lname::after, .rline .lname::after {
  content: ""; position: absolute; width: 100%; height: 0.95em; margin-left: 0.55rem;
  border-bottom: 2px dotted var(--line-strong);
}
.leader .price, .lines .amount, .rline .price { position: absolute; right: 0; background: var(--row); box-shadow: -0.55rem 0 0 var(--row); }
.leader { padding: 0.5rem 6.75rem 0.5rem 1.85rem; cursor: pointer; }
.leader input { position: absolute; left: 5px; top: 0.72rem; }
.leader .price { bottom: 0.45rem; }
.field:has(> .qb > .leader) > .qn { padding-top: 0.62rem; }
.lname { font-weight: 600; }
.price { padding: 0.05rem 0.45rem; border-radius: 4px; font-weight: 600; white-space: nowrap; transition: background-color 180ms var(--ease); }
.price.free { font-weight: 400; color: var(--ink-2); }
.leader + .help { margin-left: 1.85rem; margin-bottom: 0.35rem; }

/* Fields that only apply to one choice. */
form:has(#f-customer_mode-existing:checked) .when-new,
form:not(:has(#f-customer_mode-existing:checked)) .when-existing,
form:not(:has(#f-forge_mode-existing:checked)) .when-forge-existing,
form:not(:has(#f-dns_mode-api:checked)) .when-api,
form:not(:has(#f-dns_mode-manual:checked)) .when-manual { display: none; }

.err p { display: flex; gap: 0.45rem; margin-top: 0.4rem; color: var(--error); font-weight: 600; font-size: 0.96rem; }
.err .icon, .advice .icon, .result .icon { margin-top: 0.18em; }
.advice { display: flex; gap: 0.55rem; margin-top: 0.5rem; padding: 0.6rem 0.75rem; max-width: 62ch; background: var(--info-bg); color: #0f3a66; border-radius: var(--radius); font-size: 0.96rem; }

button, .button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1rem; font: inherit; font-weight: 600; line-height: 1.35;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
button:hover, .button:hover { background: var(--line); }
button:active, .button:active { background: var(--line-strong); color: var(--surface); }
.primary { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.primary:hover { background: color-mix(in srgb, var(--brand) 86%, var(--ink)); }
.primary:active { background: color-mix(in srgb, var(--brand) 70%, var(--ink)); color: var(--on-brand); }
button:disabled, button:disabled:hover { color: var(--ink-2); background: var(--line); border-color: var(--line); cursor: not-allowed; }
.small { padding: 0.3rem 0.7rem; font-size: 0.92rem; }

.form-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1.5rem 0 0; }

/* tables and repeated rows */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 0.5rem 0.75rem 0.5rem 0; text-align: left; vertical-align: middle; }
thead th { font-size: 0.9rem; font-weight: 600; color: var(--ink-2); border-bottom: 1.5px solid var(--ink); }
tbody tr { border-bottom: 1px solid var(--line); }
tbody th { font-weight: 500; }
.num { text-align: right; }
.hours { margin-top: 0.6rem; table-layout: fixed; }
.hours th:first-child { width: 6.4rem; }
.hours th:nth-child(2) { width: 6.6rem; }
.hours input[type="time"] { margin: 0; width: 100%; padding: 0.35rem 0.4rem; }
/* Times are typed; the picker button would hide half of the value. */
.hours input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.hours tr:has(input[type="checkbox"]:checked) input[type="time"] { background: var(--ground); border-color: var(--line); color: var(--ink-2); }
.rows { margin: 0.4rem 0 0.75rem; }
.rowline { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 0.35rem 0; }
.rowline label { flex: 0 1 10.5rem; font-size: 0.9rem; font-weight: 500; color: var(--ink-2); }
.rowline label.grow { flex: 1 1 14rem; }
.rowline label.narrow { flex: 0 1 7.5rem; }
.rowline input { margin-top: 0.15rem; font-size: 1rem; }
.rowline + .rowline label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.records { margin: 0.75rem 0 1rem; }
.records td { font-weight: 500; overflow-wrap: anywhere; }

.logo-current { display: flex; align-items: center; gap: 1rem; margin-top: 0.6rem; }
.logo-preview { display: block; height: 4rem; max-width: 14rem; padding: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); object-fit: contain; }
.logo-on-light { background: #ffffff; }
.logo-on-dark { background: #14201c; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.6rem; }

.result p { display: flex; gap: 0.45rem; margin-top: 0.6rem; max-width: 62ch; }
.result .ok { color: var(--ok); font-weight: 600; }
.result .bad { color: var(--error); font-weight: 600; }
.result .wait { color: var(--ink); }

/* --- right column ----------------------------------------------------- */

/* Only the price list stays pinned; advice scrolls with the page, so nothing
   needs a scrollbar of its own. */
aside { padding: 2.75rem 1.5rem 2rem 0; }
.pricebox { position: sticky; top: 1.5rem; z-index: 1; }
.pricebox::before { content: ""; position: absolute; left: -0.5rem; right: -0.5rem; bottom: 100%; height: 1.6rem; background: var(--ground); }
aside h2 { font-size: 1.05rem; }
.pricebox { padding: 1.1rem 1.15rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px rgb(20 32 28 / 0.06), 0 6px 16px -8px rgb(20 32 28 / 0.18); }
.lines { margin: 0.6rem 0 0.75rem; }
.lines li { --row: var(--surface); padding-top: 0.22rem; padding-bottom: 0.22rem; }
.lines .amount { bottom: 0.22rem; }
.lines .lname { font-weight: 400; }
.lines-included { margin-top: -0.5rem; color: var(--ink-2); }
.lines-included .amount { font-weight: 400; }
.rline .lname { font-weight: 400; }
.rline .price { bottom: 0; }
.rline .price.on, .leader:has(input:checked) .price:not(.free) { background: var(--total); }
.amount { white-space: nowrap; font-weight: 500; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0.75rem; background: var(--total); color: #14201c; border-radius: var(--radius); font-weight: 600; }
.total strong { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.01em; }
.pricebox .note { margin-top: 0.6rem; }
.sample { display: flex; gap: 0.4rem; }
.advicebox { margin-top: 1.75rem; padding: 0 0.25rem; }
.advicebox ul { margin: 0.4rem 0 0.75rem; }
.advicebox li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.advicebox a { display: block; font-weight: 600; color: var(--info); }
.advicebox a .n { margin-right: 0.45rem; }
.sort { font-size: 0.9rem; color: var(--ink-2); }
.advicebox .note { margin-top: 0.4rem; }
.saved { display: flex; align-items: center; gap: 0.4rem; margin-top: 1.5rem; padding: 0 0.25rem; font-size: 0.9rem; color: var(--ink-2); }
.totalbar { display: none; }

/* --- start page, review, progress ------------------------------------- */

.page > h2 { margin: 3rem 0 0.75rem; }
.empty { padding: 1.5rem; border: 1.5px dashed var(--line-strong); border-radius: 8px; }
.empty p { max-width: 58ch; }
.empty form { margin: 1rem 0 0.4rem; }
.drafts th[scope="row"] { font-weight: 600; }

.review-section { margin-top: 2.25rem; }
.review-section header { display: flex; align-items: center; gap: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1.5px solid var(--ink); }
.review-section header h2 { margin-right: auto; }
.review-section h2 .n, .hand-section h2 .n, .open-sections .n { margin-right: 0.55rem; color: var(--ink-2); font-weight: 500; }
.answers > div { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.answers dt { color: var(--ink-2); }
.answers dt { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); }
.answers .line { display: block; overflow-wrap: anywhere; }
.answers .none { color: var(--ink-2); }
.missing { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--error); font-weight: 600; }
.advised { display: flex !important; gap: 0.4rem; margin-top: 0.25rem; color: var(--info); font-size: 0.94rem; }
.create { margin-top: 3rem; padding-top: 1.5rem; border-top: 1.5px solid var(--ink); }
.create p { margin: 0.4rem 0 1rem; max-width: 58ch; }
.open-sections { margin: 0 0 1.25rem; }
.open-sections li { padding: 0.2rem 0; }

.steps { border-bottom: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.75rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.steps h2 { font-size: 1.08rem; }
.steps p { max-width: 58ch; color: var(--ink-2); }
.steps .detail { margin-top: 0.2rem; font-size: 0.88rem; overflow-wrap: anywhere; }
code { font-family: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace; font-size: 0.92em; }
.state { padding-top: 0.1rem; }
.state-label { font-size: 0.9rem; font-weight: 600; }
.step-done .state, .step-done .state-label { color: var(--ok); }
.step-waiting .state, .step-waiting .state-label { color: var(--ink-2); }
.step-failed .state, .step-failed .state-label { color: var(--error); }

/* --- handout ---------------------------------------------------------- */

body.handout { display: block; }
.hand-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.hand-bar p { margin-right: auto; color: var(--ink-2); font-size: 0.94rem; }
.sheet { width: min(210mm, 100% - 2rem); margin: 1.5rem auto 4rem; padding: 16mm 18mm; background: #fff; box-shadow: 0 1px 2px rgb(20 32 28 / 0.08), 0 12px 32px -12px rgb(20 32 28 / 0.25); font-size: 0.94rem; }
/* Letterhead: ink only, so any white-label colour prints legibly. */
.hand-head .brand { margin-bottom: 1.4rem; padding: 0 0 0.45rem; border-bottom: 1.5px solid #14201c; font-size: 1.15rem; color: #14201c; }
.hand-head h1 { margin: 0 0 0.4rem; font-size: 1.7rem; }
.hand-meta { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; margin-top: 1rem; }
.hand-meta dt { font-size: 0.85rem; color: var(--ink-2); }
.hand-section { margin-top: 1.6rem; }
.hand-section h2 { padding-bottom: 0.25rem; border-bottom: 1.5px solid #14201c; break-after: avoid; }
.hand-q { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); padding: 0.5rem 0 0.35rem; break-inside: avoid; }
.hand-label { font-weight: 600; }
.hand-note { margin-top: 0.3rem; font-size: 0.88rem; color: var(--ink-2); }
.write { display: block; min-height: 1.85em; border-bottom: 1px solid #5d6963; }
.write.filled { padding-top: 0.2em; font-weight: 500; }
.boxes { display: flex; flex-direction: column; margin-top: 0.2rem; }
.boxes li { padding: 0.12rem 0; }
.boxes .lname { font-weight: 400; }
.box { flex: none; align-self: center; display: inline-flex; width: 1.05em; height: 1.05em; border: 1.5px solid #14201c; border-radius: 2px; }
.box .icon { width: 100%; height: 100%; stroke-width: 3; }
.hand-hours { margin-top: 0.3rem; }
.hand-hours th, .hand-hours td { height: 1.9em; padding: 0.15rem 0.5rem; border: 1px solid #5d6963; font-weight: 400; }
.hand-hours thead th { color: #14201c; font-size: 0.85rem; }
.hand-foot { margin-top: 1.75rem; padding-top: 0.6rem; border-top: 1px solid #5d6963; font-size: 0.88rem; }

@page { size: A4; margin: 15mm 16mm; }
@media print {
  html { font-size: 10.5pt; }
  body.handout { background: #fff; }
  .hand-bar { display: none; }
  .sheet { width: auto; margin: 0; padding: 0; box-shadow: none; }
}

/* --- narrower screens -------------------------------------------------- */

@media (max-width: 1180px) {
  body.has-aside { grid-template-columns: 17.5rem minmax(0, 1fr); }
  aside { grid-column: 2; padding: 0 3rem 4rem; max-width: 49rem; }
  .pricebox { position: static; }
  .pricebox::before { content: none; }
  main { padding-bottom: 2.5rem; }
}

@media (max-width: 800px) {
  body, body.has-aside { display: block; }
  body.has-aside { padding-bottom: 3.5rem; }
  .rail { position: static; height: auto; padding: 0.9rem 1rem 0.75rem; }
  .brand { padding: 0; font-size: 1.25rem; }
  .rail-title { margin: 0 0 0.75rem; padding: 0; }
  /* All nine sections stay visible; nothing hides behind a sideways scroll. */
  .sections { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0.15rem; }
  .sections a { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.4rem 0 0.45rem; }
  .sections a .name { display: none; }
  .sections a .flag { position: absolute; top: 0.35rem; right: 0.25rem; }
  .rail-links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-top: 0.5rem; padding-top: 0.5rem; }
  .rail-links a { padding: 0.4rem 0.5rem; }
  .rail-foot { margin-top: 0.25rem; padding: 0.5rem 0 0; }
  main { padding: 1.5rem 1rem 2rem; }
  aside { padding: 0 1rem 2rem; }
  h1 { font-size: 1.6rem; }
  .field { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .help.unit { margin-left: 2.5rem; }
  .totalbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: baseline; padding: 0.7rem 1rem; background: var(--total); color: #14201c; text-decoration: none; font-weight: 600; box-shadow: 0 -2px 10px rgb(20 32 28 / 0.18); }
  .totalbar strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
  .form-foot { flex-direction: column-reverse; }
  .form-foot > * { justify-content: center; }

  .hours thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .hours tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 0.75rem; padding: 0.6rem 0; }
  .hours th { grid-column: 1; padding: 0; font-weight: 600; }
  .hours td { padding: 0; }
  .hours td:nth-child(2) { grid-column: 2; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.5rem; }
  .hours td::before { content: attr(data-label); display: block; font-size: 0.85rem; color: var(--ink-2); }
  .hours input[type="time"] { width: 100%; }
  .drafts thead { display: none; }
  .drafts tr { display: block; padding: 0.6rem 0; }
  .drafts th, .drafts td { display: inline-block; padding: 0 0.75rem 0 0; }
  .drafts th { display: block; }
  .answers > div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .answers dd { padding-left: 2.6rem; }
  .steps li { grid-template-columns: 2rem minmax(0, 1fr); }
  .state-label { grid-column: 2; }
  .hand-bar p { display: none; }
  .hand-bar { justify-content: space-between; }
  .sheet { padding: 1.25rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
