:root {
  --paper: #f7f5f0;
  --ink: #1b1b1b;
  --muted: #5a5a5a;
  --sea: #12364f;
  --accent: #b5451b;
  --line: #d9d4c8;
  --panel: #fffdf8;
}

* { box-sizing: border-box; }
/* The hidden attribute wins over any display rule below, so a hidden button is hidden. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* A hash in a sentence is one long word; on a phone it wraps rather than scrolls the page sideways. */
  overflow-wrap: break-word;
}

.masthead {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--sea);
  color: #fff;
}
.masthead .wordmark { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; }
.masthead .mast-role { font-size: 0.72rem; letter-spacing: 0.14em; font-weight: 650; }
.masthead .tag { font-size: 0.8rem; opacity: 0.8; border: 1px solid rgba(255,255,255,0.5); padding: 0 0.4rem; border-radius: 2px; }
.masthead nav { margin-left: auto; }
.masthead nav a { color: #fff; }

.banner {
  margin: 0;
  padding: 0.5rem 1.25rem;
  background: #fbe9c8;
  border-bottom: 1px solid #e3c98f;
  font-size: 0.9rem;
}

main { max-width: 64rem; margin: 0 auto; padding: 0.9rem; }
footer { max-width: 64rem; margin: 2rem auto; padding: 0 0.9rem; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }
img { max-width: 100%; }

h1 { font-size: 1.6rem; margin: 0.5rem 0; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; color: var(--sea); }
h3 { font-size: 1.1rem; margin: 0 0 0.25rem; }
h4 { font-size: 0.9rem; margin: 0.75rem 0 0.25rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; }
/* A hash or a pack link is one long word; on a phone it wraps rather than scrolls the page sideways. */
code { overflow-wrap: anywhere; word-break: break-all; }
pre { white-space: pre-wrap; word-break: break-all; background: var(--panel); border: 1px solid var(--line); padding: 0.5rem; }

.facts, .hint, .meta, .dates { color: var(--muted); font-size: 0.92rem; }
.notice { background: #e6f1ea; border: 1px solid #b7d6c2; padding: 0.5rem 0.75rem; }
.error { background: #f8e3df; border: 1px solid #e0a89c; padding: 0.5rem 0.75rem; }
.summary, .verify { background: var(--panel); border: 1px solid var(--line); padding: 0.5rem 0.75rem; }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--sea);
  border-radius: 3px;
  background: #fff;
  color: var(--sea);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.button.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.big, button.big { width: 100%; font-size: 1.15rem; min-height: 52px; }
button:disabled { opacity: 0.5; cursor: default; }
form.inline { display: inline; }
.actions-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }

.system { margin-top: 1.5rem; }
.slot {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sea);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
.slot.hull-only { border-left-style: dashed; border-left-color: var(--accent); }
.child-slot { margin-left: 1.5rem; }

.slot ul, .slot ol { padding-left: 1.2rem; }
.items li { margin: 0.25rem 0; }
.item.state-ended { color: var(--muted); }

.enrich-proposals { margin: 1rem 0; }
.enrich-proposal { margin: 0.75rem 0; padding: 0.6rem 0.9rem; background: var(--panel); border: 1px dashed var(--muted); }
.event { margin: 0.75rem 0; padding: 0.5rem 0.75rem; border-left: 4px solid #999; background: #fff; }
.event .statement { margin: 0.25rem 0; }
.event .label { font-weight: 600; margin: 0.25rem 0; }
.event.label-professionally-signed { border-left: 4px solid var(--sea); }
.event.label-yard-signed { border-left: 4px double var(--sea); }
.event.label-owner-labeled { border-left: 4px dashed var(--accent); }
.event.label-not-signed { border-left: 4px dotted #999; }

/* Sale pack: signed is a solid rule and the word Signed. Unsigned is a dotted rule and the words Not signed. The difference is the rule and the word, so it holds in print and without colour. */
.sale-statement { margin: 0.75rem 0; padding: 0.5rem 0.75rem; background: #fff; border-left: 4px solid #1a1a1a; }
.sale-statement[data-ink="unsigned"] { border-left: 4px dotted #1a1a1a; }
.sale-statement[data-ink="signed"] { border-left: 4px solid #1a1a1a; }
@media print {
  .sale-statement[data-ink="signed"] { border-left: 4px solid #000; }
  .sale-statement[data-ink="unsigned"] { border-left: 4px dotted #000; }
}

.evidence { margin: 0.5rem 0; }
.evidence img { max-width: 320px; width: 100%; border: 1px solid var(--line); display: block; }
.evidence figcaption { font-size: 0.85rem; color: var(--muted); }
/* A receipt is owner evidence of cost: dashed like every owner-labeled thing, its amount plain, never a price tag. */
.evidence.receipt img { border: 1px dashed var(--accent); }
.evidence .evidence-kind { font-weight: 600; color: var(--ink); }
.evidence .amount { font-weight: 600; color: var(--ink); }
label.receipt-toggle { display: flex; gap: 0.6rem; align-items: flex-start; min-height: 44px; padding: 0.4rem 0; }
label.receipt-toggle input { flex: none; width: 24px; height: 24px; margin: 0.15rem 0 0; accent-color: var(--sea); }

.attestation summary { cursor: pointer; }

fieldset { border: 1px solid var(--line); margin: 0 0 1rem; padding: 0.5rem 0.75rem; }
label.block { display: block; margin: 0.75rem 0; font-weight: 600; }
label.block .field-hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; margin: 0.1rem 0 0; }
label.block input, label.block select, label.block textarea { display: block; width: 100%; margin-top: 0.25rem; padding: 0.4rem; font: inherit; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-weight: 400; }
label.radio { display: block; margin: 0.4rem 0; }
.subform { border-left: 3px solid var(--line); padding-left: 0.75rem; margin: 0.5rem 0; }
blockquote.statement { border-left: 4px solid var(--sea); margin: 1rem 0; padding: 0.5rem 1rem; background: var(--panel); }

body.pack .masthead { background: #2b2b2b; }
.hulls li { margin: 0.4rem 0; }

/* The slot sheet anchor a job links to */
.slot:target, .system:target > h2 { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ------------------------------------------------------------------------ */
/* Owner home: an instrument, laid out for a 360px phone first, one column.  */
/* ------------------------------------------------------------------------ */

.hull-head h1 { margin: 0.25rem 0 0; }
.hull-head .facts { margin: 0.1rem 0 0.75rem; }

.status { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--muted); padding: 0.6rem 0.9rem 0.5rem; margin: 0.75rem 0; }
.status.call-leave { border-left-color: #1e6b3a; }
.status.call-blocked { border-left-color: var(--accent); }
.status.call-unknown { border-left-color: var(--muted); }
.status h2 { margin: 0 0 0.4rem; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.phase-card h2 { text-transform: uppercase; letter-spacing: 0.05em; }
.chip-row { margin: 0; }
.chip {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--muted);
}
.chip-leave { background: #1e6b3a; }
.chip-blocked { background: var(--accent); }
.chip-unknown { background: #4a4a4a; }
.status .facts-table { margin: 0.5rem 0 0.25rem; }
.status details.words, .own-home details.words { margin-top: 0.4rem; }
.status details.words summary, .own-home details.words summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--sea); font-weight: 600; }
.status details.words .facts-table, .own-home details.words .facts-table { margin: 0 0 0.5rem; table-layout: fixed; }
.status details.words .facts-table th, .own-home details.words .facts-table th { width: 7.5rem; }
.status details.words .fact .facts-table, .own-home details.words .fact .facts-table { margin: 0 0 0.4rem; }
.status details.words .cited-facts { margin: 0 0 0.5rem; }
.status details.words .citation { padding: 0.4rem 0.6rem; }
.status details.words .citation .facts-table { margin: 0 0 0.35rem; }

.next h2, .places h2, .winter h2, .growth h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 1.25rem 0 0.4rem; }
/* Before the winter: the season's jobs in one list, template gaps like the rest. */
.winter { margin-top: 0.75rem; }
.winter > .hint { margin: 0 0 0.5rem; }
.winter .job-list + .hint { margin-top: 0.4rem; }
/* Growth in warm water: the same list, the same reader, the other theatre. */
.growth { margin-top: 0.75rem; }
.growth > .hint { margin: 0 0 0.5rem; }
.growth .job-list + .hint { margin-top: 0.4rem; }

.job-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--sea);
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.job-card:hover, .job-card:focus { border-color: var(--sea); background: #fff; }
.job-card.blocks { border-left-color: var(--accent); }
.job-card.done { border-left-style: dashed; border-left-color: var(--accent); }
.job-card.empty { border-left-color: var(--line); color: var(--muted); }
.job-card-photo { display: block; width: 100%; max-height: 240px; object-fit: cover; border: 1px solid var(--line); margin: 0 0 0.6rem; background: #fff; }
.job-card-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.job-card-title { font-size: 1.15rem; font-weight: 600; color: var(--sea); }
.job-card.small .job-card-title { font-size: 1.02rem; }
.job-card-note { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.9rem; }
.job-list { list-style: none; padding: 0; margin: 0; }
.job-list li { margin: 0.5rem 0; }

.kind { display: inline-block; font-size: 0.8rem; line-height: 1.5; padding: 0 0.5rem; border: 1px solid var(--sea); border-radius: 2px; color: var(--sea); background: #fff; vertical-align: middle; text-transform: lowercase; letter-spacing: 0.02em; }
.kind-replace { border-style: double; }
.kind-inspect { border-style: dashed; }
.kind-upgrade { border-style: dotted; }
.flag { display: inline-block; font-size: 0.8rem; line-height: 1.5; padding: 0 0.5rem; border-radius: 2px; color: #fff; background: var(--accent); vertical-align: middle; }
/* A job the climate opened: Season as Winter or Growth. Ice blue, never the green of Leave. */
.season { display: inline-block; font-size: 0.8rem; line-height: 1.5; padding: 0 0.5rem; border: 1px solid #5b7f99; border-radius: 2px; color: #234; background: #e6f0f7; vertical-align: middle; letter-spacing: 0.02em; }

/* The hull figure and its hotspots */
.hull { margin: 0; }
.own-hull-marks { margin: 0 0 0.75rem; }
.own-hull-marks > h2 { margin: 0 0 0.35rem; }
.hull-figure { display: block; width: 100%; height: auto; background: #eef3f6; border: 1px solid var(--line); }
.hull figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }
.hull-figure .water { stroke: #9db6c6; stroke-width: 1.5; }
.hull-figure .sail { fill: #ffffff; stroke: #b9c8d2; stroke-width: 1; }
.hull-figure .stay, .hull-figure .mast, .hull-figure .boom { stroke: var(--sea); stroke-width: 2; stroke-linecap: round; }
.hull-figure .hull-body { fill: #ffffff; stroke: var(--sea); stroke-width: 2.5; stroke-linejoin: round; }
.hull-figure .coachroof { fill: #ffffff; stroke: var(--sea); stroke-width: 2; }
.hull-figure .keel, .hull-figure .rudder { fill: var(--sea); stroke: var(--sea); stroke-width: 1.5; }
.hotspot { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.hotspot circle { fill: #fff; stroke: var(--sea); stroke-width: 2.5; }
.hotspot .dot { fill: var(--sea); stroke: none; }
.hotspot.heat-hot circle { fill: var(--accent); stroke: var(--accent); }
.hotspot.blocked circle { stroke: #6b1a00; stroke-width: 5; }
.hotspot .count { fill: #fff; font: 700 18px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.hotspot .name { fill: var(--ink); font: 600 12px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-transform: uppercase; letter-spacing: 0.06em; }
.hotspot.open circle, .hotspot:focus-visible circle { stroke: var(--ink); stroke-width: 4; }
.hotspot.open .name { text-decoration: underline; }

.place-panels { margin-top: 0.75rem; }
.place { background: var(--panel); border: 1px solid var(--line); padding: 0.6rem 0.9rem 0.4rem; margin: 0.5rem 0; }
.place h3 { font-size: 1rem; margin: 0 0 0.4rem; color: var(--sea); }
.place h4 { margin: 0.75rem 0 0.25rem; }
.place .hint a { color: var(--sea); }

.actions { margin-top: 1.5rem; display: grid; gap: 0.6rem; }
.actions form.inline, .actions .button, .actions button { display: flex; width: 100%; }
.actions .hint { margin: 0; }
.shares-list { margin: 0; padding-left: 1.2rem; }
.shares-list li { margin: 0.3rem 0; }

/* ------------------------------------------------------------------------ */
/* Job page: a worksheet                                                     */
/* ------------------------------------------------------------------------ */

.job-photo { margin: 0 0 0.75rem; }
.job-photo img { display: block; width: 100%; max-height: 280px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.job-photo figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }
.job-head h1 { margin: 0.25rem 0 0.2rem; }
.job-head .facts-table { margin: 0 0 0.5rem; table-layout: fixed; }
.job-head .facts-table th { width: 6.5rem; }
.job-head .facts-table td { overflow-wrap: anywhere; }
.job-meta { margin: 0.5rem 0 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.92rem; }
.place-link { color: var(--sea); display: inline-flex; align-items: center; min-height: 44px; }
.facts-table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; background: var(--panel); }
.facts-table th, .facts-table td { text-align: left; vertical-align: top; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.facts-table th { width: 7.5rem; font-weight: 600; color: var(--muted); }
.this-job { margin: 0.75rem 0 1rem; }
.this-job h2, .place-job h2, .started h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.4rem; }
.this-job .chips { margin: 0.5rem 0 0; }
.place-job { margin: 0 0 1rem; padding: 0.5rem 0.75rem; background: var(--panel); border: 1px solid var(--line); }
.save-progress { min-height: 44px; margin: 0.5rem 0 0; }
.started { margin: 0.75rem 0; }
.started-list { list-style: none; padding: 0; margin: 0; }
.started-card { margin: 0.5rem 0; background: var(--panel); border: 1px solid var(--line); padding: 0.75rem 0.9rem; }
.started-item { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 650; }
.started-card .facts-table { margin: 0; table-layout: fixed; }
.started-card .facts-table th { width: 6.5rem; }
.started-card .facts-table td { overflow-wrap: anywhere; }
.started-card .button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: flex-start; text-align: left; }
.chrome-own .hull-head .facts-table { margin: 0.1rem 0 0.75rem; table-layout: fixed; }
.chrome-own .hull-head .facts-table td { overflow-wrap: anywhere; }
.archive-places { margin: 0 0 1rem; }
.archive-place { margin: 0 0 0.75rem; background: var(--panel); border: 1px solid var(--line); }
.archive-place h2 { font-size: 1rem; margin: 0; padding: 0.5rem 0.6rem 0; }
.archive-place h2 a { color: var(--sea); }
.archive-place .facts-table { margin: 0; table-layout: fixed; }
.archive-place .facts-table th { width: 6.5rem; }
.archive-place .facts-table td { overflow-wrap: anywhere; }
.archive-place .findings { list-style: none; padding: 0; margin: 0; }
.archive-note { margin: 0; }
.archive-note .facts-table { margin: 0; table-layout: fixed; }
.archive-note .facts-table th { width: 6.5rem; }
.fitted { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.95rem; }
.flag-line { margin: 0.25rem 0; padding: 0.4rem 0.6rem; background: #f8e3df; border-left: 4px solid var(--accent); font-weight: 600; }

.worksheet h2, .did-it h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 1.25rem 0 0.4rem; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { margin: 0 0 0.5rem; }
.ticks .facts-table { margin: 0; table-layout: fixed; }
.ticks .facts-table td { overflow-wrap: anywhere; }
.tick-done { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.tick-done input.tick { width: 24px; height: 24px; margin: 0; accent-color: var(--sea); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-item { background: #fff; border: 1px solid var(--sea); border-radius: 1rem; padding: 0.4rem 0.8rem; font-size: 0.92rem; line-height: 1.35; color: var(--ink); }
.chip-item.unknown { border-style: dashed; color: var(--muted); }
.chip-item.none { border-style: dotted; color: var(--muted); }

.did-it { margin-top: 1.25rem; }
.owner-work { background: var(--panel); border: 1px dashed var(--accent); padding: 0.5rem 0.75rem; margin: 0.75rem 0; }
.owner-work .events, .record .events { list-style: none; padding-left: 0; }

details.record { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 0.5rem; }
details.record summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--sea); font-weight: 600; }
details.record h3 { margin-top: 1rem; }
.need-list > li { margin: 0.4rem 0; }

.offer { margin-top: 2rem; background: #ececec; border-top: 3px dashed #777; border-bottom: 3px dashed #777; padding: 0.6rem 0.9rem; color: #333; font-size: 0.92rem; }
.offer h2 { color: #444; font-size: 1rem; margin: 0.25rem 0 0.4rem; }
.offer h2::before { content: "Commercial"; display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid #777; padding: 0 0.35rem; margin-right: 0.5rem; vertical-align: middle; background: #fff; }
.offer p { margin: 0.25rem 0; }
.offer .facts-table { background: transparent; margin: 0; }
.offer .facts-table th { color: #555; }
.back { margin-top: 1.25rem; }
.back .button { width: 100%; }

/* ------------------------------------------------------------------------ */
/* New hull: one short form. Open stays on screen.                           */
/* ------------------------------------------------------------------------ */

.lead { margin: 0.25rem 0 0.75rem; }
.subcopy { color: var(--muted); margin: 0.15rem 0 1rem; }
.provenance { color: var(--muted); margin: 0.2rem 0 0.85rem; }
.year-class { display: flex; flex-direction: column; gap: 0.45rem; }
.year-class input, .year-class select { width: 100%; }
.open-record .wizard-cta .primary { text-transform: uppercase; letter-spacing: 0.08em; }
.wizard input, .wizard select, .wizard textarea { border-color: var(--muted); min-height: 44px; }
.wizard textarea { min-height: 3.5rem; }
.wizard .subform { margin: 0.25rem 0 0.75rem; }
.wizard .facts-table { margin: 0 0 0.75rem; table-layout: fixed; }
.wizard .facts-table th { width: 6.5rem; vertical-align: middle; }
.wizard .facts-table input, .wizard .facts-table select { width: 100%; box-sizing: border-box; }
.wizard-cta {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0.75rem 0 0;
  padding: 0.6rem 0 0.25rem;
  background: var(--paper);
}
.wizard-cta .primary { width: 100%; }
.places-system { font-size: 0.85rem; margin: 0.75rem 0 0.1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ------------------------------------------------------------------------ */
/* The surveyor's door: photo first, one column, the field's words            */
/* ------------------------------------------------------------------------ */

.who { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sea); padding: 0.6rem 0.9rem; margin: 0.75rem 0; }
.who.window-closed { border-left-color: var(--accent); }
.who h2, .open-hull h2, .held h2, .as-found h2, .hand-to-owner h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.4rem; }
.who .facts-table, .hull-head .facts-table { margin: 0; }
.ceremony { background: #fbe9c8; border: 1px solid #e3c98f; }
.findings-so-far h2, .pack-back h2, .walk h2, .yard-so-far h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 1.25rem 0 0.4rem; }
.findings, .yard-work-list { list-style: none; padding: 0; margin: 0; }
.yard-work { background: #fff; border: 1px solid var(--line); border-left: 4px dotted #999; padding: 0.6rem 0.9rem; margin: 0.6rem 0; }
.yard-work.label-yard-signed { border-left: 4px solid var(--sea); }
.yard-work-item { margin: 0 0 0.4rem; font-size: 1rem; }
.finding { background: #fff; border: 1px solid var(--line); border-left: 4px dotted #999; padding: 0.6rem 0.9rem; margin: 0.6rem 0; }
.finding.label-professionally-signed { border-left: 4px solid var(--sea); }
.finding .finding-photo { margin: 0 0 0.5rem; }
.finding .finding-photo img { max-width: 100%; width: 100%; max-height: 280px; object-fit: cover; }
.finding .facts-table { margin: 0; }
.finding .finding-place { color: var(--sea); font-weight: 600; }
.finding .found { white-space: pre-line; }
.finding .label { font-weight: 600; }
.finding .verified { color: var(--muted); }
.pack-back form.inline, .pack-back button { display: flex; width: 100%; }
.place-card { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sea); margin: 0.5rem 0; }
.place-card.hull-only, .place-card.new-place { border-left-style: dashed; border-left-color: var(--accent); }
.place-card summary { display: flex; flex-direction: column; gap: 0.1rem; min-height: 44px; padding: 0.6rem 0.9rem; cursor: pointer; list-style: none; }
.place-card summary::-webkit-details-marker { display: none; }
.place-card summary::after { content: "Record"; color: var(--sea); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.place-card[open] summary::after { content: "Close"; }
.place-card-name { font-weight: 700; color: var(--sea); font-size: 1.05rem; }
.place-card-fitted { color: var(--muted); font-size: 0.9rem; }
.place-card .facts-table { margin: 0 0.9rem 0.5rem; width: calc(100% - 1.8rem); }
.place-card .finding-form { padding: 0 0.9rem 0.9rem; border-top: 1px solid var(--line); }
.place-card .finding-form input, .place-card .finding-form select, .place-card .finding-form textarea { min-height: 44px; border-color: var(--muted); }
.to-sign { list-style: none; padding: 0; margin: 0.75rem 0; }
.to-sign-item { margin: 0.75rem 0; }
.finding-desk { display: none; }
.invite-desk { display: none; }
.subscribe-quiet { color: var(--muted); margin: 0.35rem 0 0.85rem; }
.subscribe-desk { display: none; }
.subscribe-shapes { margin: 0; padding-left: 1.1rem; }
.history-desk { display: none; }
.finding-drafts, .finding-editor { background: var(--panel); border: 1px solid var(--line); padding: 0.75rem 0.9rem; }
.finding-drafts h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.4rem; }
.finding-editor-title { font-size: 1.25rem; color: var(--sea); margin: 0 0 0.5rem; }
.finding-draft-list { list-style: none; padding: 0; margin: 0; }
.finding-draft { display: grid; gap: 0.15rem; margin: 0 0 0.5rem; }
.finding-draft a { display: flex; align-items: center; min-height: 44px; font-weight: 650; color: var(--sea); text-decoration: none; }
.finding-draft.is-on a, .finding-draft a[aria-current="true"] { color: var(--accent); }
.sign-actions { margin: 0.75rem 0 0; }
.sign-actions p { margin: 0.5rem 0; }
.sign-status { font-weight: 600; margin: 0.25rem 0; }
.sign-status[data-status="blocked"], .sign-status[data-status="failed"] { color: var(--accent); }
.sign-status[data-status="signed"] { color: #1e6b3a; }

@media (max-width: 40rem) {
  h1 { font-size: 1.4rem; }
  .actions-bar .button, .actions-bar button { width: 100%; text-align: center; }
  .masthead { flex-wrap: nowrap; align-items: center; padding: 0.4rem 0.75rem; gap: 0.5rem; }
  .masthead nav { margin-left: auto; width: auto; display: flex; align-items: center; flex-wrap: nowrap; gap: 0.55rem; white-space: nowrap; }
  .masthead nav a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 0; }
  .masthead .who-am-i { display: none; }
  body.chrome-own main { padding-top: 0.7rem; }
  body.chrome-own .status { margin: 0.5rem 0; }
  body.chrome-own .next-due, body.chrome-own .due-link { margin: 0.5rem 0; }
}

@media (min-width: 40rem) {
  main, footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .actions { grid-template-columns: auto auto auto; justify-content: start; align-items: center; }
  .actions form.inline, .actions .button, .actions button { width: auto; }
  .actions .hint, .actions .shares-list { grid-column: 1 / -1; }
  .pack-back form.inline, .pack-back button { display: inline-flex; width: auto; }
  .back .button { width: auto; }
  button.big { width: auto; min-width: 16rem; }
  .hull-figure { max-height: 24rem; }
}

/* Identity in the masthead: a session, shown as a name. Never a signature. */
.masthead .who-am-i { color: #fff; opacity: 0.85; font-size: 0.9rem; margin-right: 0.5rem; }

/* The signing ceremony: the passkey first, the labelled demo key as the fallback. */
.ceremony-choice { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sea); padding: 0.6rem 0.9rem 0.75rem; margin: 1rem 0; }
.ceremony-choice h2, .ceremony-fallback h2 { font-size: 1.05rem; margin: 0 0 0.4rem; }
.ceremony-choice p button { width: 100%; }
.attest-ceremony { margin: 1rem 0; }
.attest-ceremony p button { width: 100%; min-height: 44px; }
.ceremony-fallback { border-top: 1px solid var(--line); padding-top: 0.5rem; margin-top: 1rem; }

/* Rules and their citations: the rule by id, then the record's facts, ids in the record's own words. */
.job-card-rule { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.85rem; }
.citation-rule a { color: var(--sea); }
.citation { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--sea); padding: 0.6rem 0.9rem; margin: 0.5rem 0; }
.citation-rule { margin: 0 0 0.4rem; }
.cited-facts .fact { margin: 0 0 0.35rem; }
.cited-facts .facts-table { background: transparent; }
.cited-facts { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.fact { border-top: 1px solid var(--line); padding: 0.4rem 0; font-size: 0.95rem; }
.fact-kind { display: inline-block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid var(--muted); border-radius: 2px; padding: 0 0.35rem; margin-right: 0.4rem; color: var(--muted); vertical-align: middle; }
.fact-absence .fact-kind { border-style: dashed; }
.rules { list-style: none; padding: 0; }
.rule-entry { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sea); padding: 0.6rem 0.9rem; margin: 0.75rem 0; }
.rule-entry h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }

/* Own-hull first open, Due, place walk-around */
.status .phase-line { margin: 0.4rem 0 0; }
.status .phase-read { margin: 0; }
.status .phase-title { margin: 0.15rem 0 0; font-weight: 700; font-size: 1.55rem; line-height: 1.2; }
.status .phase-function { margin: 0.35rem 0 0; font-weight: 700; font-size: 1.15rem; }
.status .phase-sentence { margin: 0.4rem 0 0; color: var(--muted); }
.status .blocking-signed { margin: 0.6rem 0 0; padding: 0.4rem 0.6rem; background: #f8e3df; border-left: 4px solid var(--accent); }
.status .hands { margin: 0.6rem 0 0; }
.status .hands a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sea); font-weight: 600; }
.next-due { margin: 0.75rem 0; }
.next-due-label { margin: 0 0 0.35rem; font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.next-due-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
}
.next-due-item {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.next-due-status { margin: 0; color: var(--accent); font-weight: 600; font-size: 0.92rem; }
.next-due-why, .next-due-last, .next-due-source { margin: 0; }
.next-due-card .button {
  margin-top: 0.55rem;
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.other-due { list-style: none; padding: 0; margin: 0.35rem 0 0; }
.other-due-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid var(--line);
  padding: 0.15rem 0;
}
.other-due-item [data-other-due-status] { color: var(--accent); font-weight: 600; }
.next-due .button.big {
  width: 100%;
  min-height: 52px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.due-link { margin: 0.75rem 0; }
.due-link .button { width: 100%; }
.place-walk { list-style: none; padding: 0; margin: 0; }
.place-walk li { margin: 0; }
.place-walk-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--sea);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.due-list { list-style: none; padding: 0; margin: 0; counter-reset: due; }
.due-row {
  counter-increment: due;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.35rem 0.5rem;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--sea);
  padding: 0.45rem 0.75rem;
  margin: 0.35rem 0;
}
.due-row::before { content: counter(due) "."; font-weight: 700; color: var(--muted); padding-top: 0.55rem; }
.due-row .due-item { grid-column: 2; margin: 0; font-size: 1.05rem; font-weight: 650; }
.due-row .facts-table { grid-column: 2; margin: 0; table-layout: fixed; }
.due-row .facts-table th { width: 6.5rem; }
.due-row .facts-table td { overflow-wrap: anywhere; }
.due-row .place-chip { grid-column: 2; justify-self: start; }
.due-row .due-row-actions { grid-column: 2; margin: 0.15rem 0 0; }
.due-mark { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; color: var(--accent); text-decoration: none; }
.due-title, .due-continue, .need-title { color: var(--sea); font-weight: 600; text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.need-plan { display: none; }
.need-plan h2 { margin: 0.15rem 0 0.75rem; font-size: 1.25rem; color: var(--ink); }
.need-vessel { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; white-space: nowrap; }
.survey-phase { margin: 0.35rem 0 1rem; }
.own-home > .need-vessel,
.due-phone-head .need-vessel { margin: 0.15rem 0 0.65rem; }
.need-vessel-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  background: var(--panel);
}
.need-vessel-link.is-on, .need-vessel-link[aria-current="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.need-vessel-sep { display: none; }
.need-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.need-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
}
.need-card[data-next="1"] { border-color: var(--accent); }
.need-item { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 650; }
.need-card .facts-table { margin: 0; }
.need-card .facts-table th { width: 6.5rem; }
.empty-need { color: var(--muted); }
.place-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.7rem;
  border: 1px solid var(--sea);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sea);
  background: #fff;
  white-space: nowrap;
}
.place-chip.place-hard { border-color: #5b7f99; color: #234; background: #e6f0f7; }
.empty-due, .empty-usage { color: var(--muted); }
.due-desk { display: none; }
.due-context { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.92rem; }
.due-wide-title { margin: 0.15rem 0 0.25rem; font-size: 1.7rem; color: var(--ink); }
.due-vessel-links { white-space: nowrap; }
.due-vessel-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}
.due-vessel-link.is-on, .due-vessel-link[aria-current="true"] { color: var(--accent); }
.due-vessel-sep { margin: 0 0.35rem; color: var(--muted); font-weight: 600; }
.due-systems { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.9rem; }
.due-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.due-chip.is-on, .due-chip[aria-current="true"] { border-color: var(--sea); color: var(--sea); }
.due-batch { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--panel); }
.due-batch th, .due-batch td { text-align: left; vertical-align: top; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
.due-batch th { color: var(--muted); font-weight: 600; }
.due-batch th:nth-child(1), .due-batch td:nth-child(1) { width: 24%; }
.due-batch th:nth-child(2), .due-batch td:nth-child(2) { width: 5.5rem; white-space: nowrap; overflow-wrap: normal; }
.due-batch th:nth-child(3), .due-batch td:nth-child(3) { width: 7rem; }
.due-batch th:nth-child(3) { white-space: nowrap; }
.due-batch th:nth-child(5), .due-batch td:nth-child(5) { width: 6.25rem; white-space: nowrap; overflow-wrap: normal; }
.due-batch-row[data-selected="1"] { background: #fff6f2; }
.due-batch-item { color: var(--sea); font-weight: 650; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.due-status { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 650; white-space: nowrap; }
.due-status::before {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}
.due-detail { background: var(--panel); border: 1px solid var(--line); padding: 0.85rem 1rem; }
.due-detail h2 { margin: 0 0 0.5rem; color: var(--ink); }
.due-detail-actions { display: grid; gap: 0.5rem; margin: 1rem 0 0; }
.due-wide-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; margin: 0 0 0.85rem; }
.due-wide-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--sea); text-decoration: none; }
.due-wide-nav a[aria-current="page"] { color: var(--accent); }
@media (min-width: 48rem) {
  .need-plan { display: block; }
  .own-home > .empty-due,
  .own-home > .due-link { display: none; }
  .due-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
  .due-row { margin: 0; }
}
@media (min-width: 56rem) {
  .due-desk { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
  .due-wide-nav { flex-direction: column; align-items: flex-start; gap: 0.15rem; margin: 0; }
  .due-desk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 16rem); gap: 1.25rem; align-items: start; }
  .due-detail-col { min-width: 0; }
  .due-page .due-phone-head,
  .due-page .due-list,
  .due-page > .empty-due,
  .due-page .hull-nav,
  .due-page .back { display: none; }
  body:has(.due-page) main { padding-bottom: 0.9rem; }
}
.due-here { display: flex; align-items: center; min-height: 44px; margin: 0 0 0.75rem; font-weight: 600; color: var(--sea); text-decoration: none; }
.looked-at { margin: 0 0 0.75rem; font-weight: 600; }
.place-photos { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.place-photos .place-photo, .place-photos .evidence { margin: 0; }
.place-photos img { width: 100%; max-height: 240px; object-fit: cover; border: 1px solid var(--line); display: block; }
.place-photos .evidence.receipt img { border: 1px dashed var(--accent); }
#place-form { margin-top: 0.5rem; padding-top: 0.25rem; scroll-margin-top: 1rem; }
#place-form h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.4rem; }
#place-form input, #place-form textarea { min-height: 44px; }
#place-form input[type="hidden"] { display: none; }
.place-facts { margin: 0 0 0.75rem; }
.place-facts .facts-table { margin: 0; }
.part-crumb { margin: 0; color: var(--muted); font-size: 0.95rem; }
.part-read h1 { margin: 0.1rem 0 0.2rem; }
.part-lede { margin: 0 0 1rem; color: var(--muted); }
.part-read .part-jobs h2,
.part-read .place-history h2,
.part-read .place-consumables h2 { font-size: 1.15rem; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 700; margin: 1.15rem 0 0.45rem; }
.part-jobs { margin: 0; }
.job-card { background: #fff; border: 1px solid var(--line); padding: 0.75rem 0.9rem; margin: 0 0 0.6rem; }
.job-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; }
.job-card h3 { margin: 0; font-size: 1.05rem; font-weight: 650; }
.job-card .due-here { margin: 0; min-height: 44px; }
.job-card-meta { margin: 0.1rem 0 0; color: var(--muted); }
.job-card-done .job-card-meta { color: var(--ink); }
.place-history, .place-consumables { margin: 0.75rem 0 0; }
.place-history ol, .place-consumables ul { list-style: none; padding: 0; margin: 0; }
.history-line { margin: 0 0 0.45rem; }
.place-consumables a { display: flex; align-items: center; min-height: 44px; color: var(--sea); font-weight: 600; text-decoration: none; }
.consumable-state { display: block; margin: -0.35rem 0 0.45rem; color: var(--muted); }
.job-done { margin: 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.job-done label.block { margin: 0; }
.job-done input { min-height: 44px; }
.job-done button { min-height: 44px; }
.place-fields { display: grid; gap: 0; }
@media (min-width: 40rem) {
  .place-fields { grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .place-fields > label.block:has(input[type="file"]),
  .place-fields > #last-done-field { grid-column: 1 / -1; }
  #place-receipt-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .place-page .sheet-actions { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .place-page .sheet-actions .button.big,
  .place-page .sheet-actions button.big { width: auto; }
}
@media (min-width: 56rem) {
  .place-desk {
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    column-gap: 2rem;
    row-gap: 0.35rem;
    align-items: start;
  }
  .place-desk > .part-meta { grid-column: 1; grid-row: 1 / span 12; margin: 0; }
  .place-desk > :not(.part-meta) { grid-column: 2; }
  .place-desk > #place-form { margin-top: 1.25rem; padding-top: 0; }
  .job-card-head { flex-wrap: nowrap; align-items: flex-start; }
  .job-card-copy { min-width: 0; }
  .job-done { flex: 0 0 auto; flex-wrap: nowrap; align-items: flex-end; }
  .job-done label.block { width: 10.5rem; }
  .job-done input { width: 100%; }
}
.place-claim { margin: 0.75rem 0; padding: 0.5rem 0.75rem; border-left: 4px dashed var(--accent); background: #fff; }
.place-claim[data-attested="1"] { border-left-style: solid; }
.place-claim .seal { font-weight: 600; margin: 0.35rem 0 0; }
.work-list { list-style: none; padding: 0; margin: 0; }
.work-row { margin: 0 0 0.75rem; }
.work-row .facts-table { margin: 0; }
.empty-work { color: var(--muted); }
.hull-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 0;
  padding: 0.15rem 0.35rem calc(0.15rem + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.hull-nav:has(> a:nth-child(6)) { grid-template-columns: repeat(6, 1fr); }
.hull-nav:has(> a:nth-child(6)) a {
  font-size: 0.68rem;
  line-height: 1.1;
  padding: 0.35rem 0;
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}
.hull-nav-read { grid-template-columns: repeat(4, 1fr); }
.hull-nav-read:has(> a:nth-child(5)) { grid-template-columns: repeat(5, 1fr); }
.hull-nav-buyer { grid-template-columns: repeat(3, 1fr); }
.assurance-score { font-size: 2.5rem; font-weight: 700; margin: 0.25rem 0; }
.assurance-label {
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.05rem 0.45rem;
  border: 1px solid var(--ink);
  font-weight: 600;
}
.assurance-label[data-label="Unknown"] { color: var(--muted); border-color: var(--muted); }
.hull-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.hull-nav a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -3px 0 var(--accent);
}
body:has(.hull-nav) main { padding-bottom: 4.75rem; }
body:has(.hull-nav) > footer { display: none; }
.sheet-actions { display: grid; gap: 0.6rem; margin: 0.75rem 0 0; }
.place-step { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 1rem 0; }
.place-step .button, .place-step a.button { min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; }
.place-step .button.disabled { opacity: 0.45; pointer-events: none; }

/* Access: open shares; closed ones folded. */
.access h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 1.25rem 0 0.4rem; }
.access-list { list-style: none; padding: 0; margin: 0; }
.access-item { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sea); padding: 0.6rem 0.9rem; margin: 0.5rem 0; }
.access-item.closed { border-left-style: dashed; border-left-color: var(--muted); color: var(--muted); }
.access-who { margin: 0 0 0.2rem; }
.access-when, .access-opened, .access-status, .access-closed { margin: 0 0 0.5rem; font-size: 0.92rem; color: var(--muted); }
.access-item form.inline { display: block; }
.access-item .revoke { width: 100%; }
.closed-shares { margin-top: 0.5rem; }
.closed-shares summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--sea); font-weight: 600; }
.share-form { display: grid; gap: 0.25rem; width: 100%; }
.share-form label.block { margin: 0.25rem 0; }
.share-form button { width: 100%; min-height: 44px; }
.share-fold, .signals-fold, .home-water-fold, .transfer-fold, .pack-fold, .invite-fold, .invite-home-fold, .archive-fold, .surveyor-home { margin-top: 0.75rem; }
.share-fold > summary, .signals-fold > summary, .home-water-fold > summary, .transfer-fold > summary, .pack-fold > summary, .invite-fold > summary, .invite-home-fold > summary, .archive-fold > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--sea); font-weight: 600; }
.surveyor-home #invite-heading { margin-top: 0; }
.hand-to-owner { margin-top: 1.5rem; }
.owner-invite-form button { min-height: 44px; }
.home-water-form, .transfer-form { display: grid; gap: 0.25rem; width: 100%; }
.home-water-form button, .transfer-form button, .revoke-share-form button, .close-window-form button, .archive-form button, .unarchive-form button, .surveyor-invite-accept button, .transfer-invite-accept button { width: 100%; min-height: 44px; }
.archive-form, .unarchive-form { margin-top: 0.5rem; }
.hidden-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.hidden-item { margin: 0 0 0.75rem; }
.revoke-share-form, .close-window-form { margin-top: 0.5rem; }
.share-fold .access h2 { margin-top: 0.75rem; }
.invite h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 1.25rem 0 0.4rem; }
.invite-list { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.invite-item { background: var(--panel); border: 1px solid var(--line); padding: 0.6rem 0.9rem; margin: 0.5rem 0; }
.invite-item .facts-table { margin: 0; }
.settings-card { border-left: 4px solid var(--sea); }
.settings-card .facts-table, .access-item .facts-table, .pack-fold > .facts-table, .insurer-pack-list > .facts-table, .transfer-fold > .facts-table, .archive-fold > .facts-table, .home-water-fold .facts-table, .hidden-item .facts-table { margin: 0 0 0.5rem; table-layout: fixed; }
.settings-card .facts-table td, .access-item .facts-table td, .home-water-fold .facts-table td { overflow-wrap: anywhere; }
.invite-link { margin: 0.4rem 0 0; word-break: break-all; }
.invite-link code { font-size: 0.85rem; }
[data-accept] td { overflow-wrap: anywhere; word-break: break-all; }
#invite-form button { min-height: 44px; }
.window-note { font-weight: 600; }
@media (min-width: 40rem) { .access-item .revoke { width: auto; } }

/* Usage: proposal and current as fact tables. Devices never attest. */
.signals h2 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 1.25rem 0 0.4rem; }
.proposals { list-style: none; padding: 0; margin: 0; }
.proposal { background: var(--panel); border: 1px solid var(--line); border-left: 6px dotted #999; padding: 0.6rem 0.9rem; margin: 0.5rem 0; }
.proposal-item { margin: 0 0 0.4rem; font-size: 1rem; }
.proposal .facts-table, .usage-current .facts-table { table-layout: fixed; }
.proposal .facts-table { margin: 0 0 0.5rem; }
.proposal .facts-table td, .usage-current .facts-table td { overflow-wrap: anywhere; }
.proposal-actions { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.proposal-actions form.inline { display: block; }
.proposal-actions button { width: 100%; }
.proposal-actions .edit-form label.block { margin: 0 0 0.4rem; }
.usage-current { background: var(--panel); border: 1px solid var(--line); border-left: 4px dashed var(--accent); padding: 0.5rem 0.9rem; margin: 0.4rem 0; }
.usage-current .facts-table { margin: 0; }
@media (min-width: 40rem) { .proposal-actions { grid-template-columns: 1fr 2fr 1fr; align-items: end; } .proposal-actions button { width: auto; } }

.hull-list { list-style: none; padding: 0; margin: 1rem 0; }
.door-hull { margin: 0 0 0.75rem; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sea); }
.door-hull .facts-table { margin: 0; table-layout: fixed; }
.door-hull .facts-table th { width: 6.5rem; }
.door-hull .facts-table td { overflow-wrap: anywhere; }
.prospect-list { list-style: none; padding: 0; margin: 1rem 0; }
.prospect-row { margin: 0 0 0.75rem; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--line); }
.prospect-row .facts-table { margin: 0; table-layout: fixed; }
.prospect-row .facts-table th { width: 6.5rem; }
.prospect-row .facts-table td { overflow-wrap: anywhere; }
.hull-door-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--sea);
  text-decoration: none;
  font-weight: 600;
}
.hidden-item .hull-door-link { display: flex; }
.door-actions { display: grid; gap: 0.75rem; margin: 1.25rem 0 0.4rem; }
.door-actions .button { width: 100%; }
.door-as-found { margin: 0 0 1.25rem; }
.door-as-found a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

/* The surveyor's door: open a hull by HIN or id; aim the pack at the owner or a named buyer. */
.open-form input[name=hull] { text-transform: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.held-hulls { list-style: none; padding: 0; margin: 0; }
.held-hull { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sea); padding: 0.6rem 0.9rem; margin: 0.4rem 0; }
.held-hull a { display: flex; align-items: center; min-height: 44px; color: var(--sea); text-decoration: none; }
.held-hull .facts-table { margin: 0.25rem 0 0; }
.empty-held, .empty-findings { color: var(--muted); }
.access-who .purpose { display: inline-block; font-size: 0.78rem; border: 1px solid var(--muted); border-radius: 2px; padding: 0 0.4rem; margin-left: 0.3rem; color: var(--muted); vertical-align: middle; }
.access-who .purpose-insurer { border-color: var(--accent); color: var(--accent); }
.purpose-line { background: var(--panel); border-left: 4px solid var(--accent); padding: 0.5rem 0.9rem; margin: 0.6rem 0; }

/* Condition as found, in the words survey practice uses: a badge on the Finding, the same colours as its weight. */
.condition { display: inline-block; font-size: 0.8rem; line-height: 1.5; padding: 0 0.5rem; border: 1px solid var(--muted); border-radius: 2px; color: var(--muted); vertical-align: middle; margin-right: 0.3rem; }
.condition-good { border-color: #4a7d5a; color: #2f5a3b; }
.condition-fair { border-color: #6b7d4a; color: #3f5a2f; }
.condition-poor { border-color: #9a6b1f; color: #7a5316; }
.condition-defective { border-color: var(--accent); color: var(--accent); }
.condition-words { font-size: 0.85rem; }

/* Severity is the call, not a second copy of the condition word. */
.severity { display: inline-block; font-size: 0.8rem; line-height: 1.5; padding: 0 0.5rem; border: 1px solid var(--muted); border-radius: 2px; color: var(--muted); vertical-align: middle; margin-right: 0.3rem; }
.severity-stop { border-color: var(--accent); color: var(--accent); }
.severity-high { border-color: #9a6b1f; color: #7a5316; }
.severity-medium { border-color: #6b7d4a; color: #3f5a2f; }
.severity-low { border-color: var(--muted); color: var(--muted); }
.severity-clear { border-color: #4a7d5a; color: #2f5a3b; }

/* Buyer Kind Read: shared record, identity, signed Findings, quiet notes. */
.chip-shared {
  min-height: 2rem;
  line-height: 2rem;
  padding: 0 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--sea);
}
.kind-read-status { margin: 0.25rem 0 0.85rem; color: var(--muted); }
.expires-loud { color: var(--accent); font-weight: 700; }
.kind-read-id { margin: 0 0 1rem; }
.kind-read-id .facts-table { margin: 0; }
.kind-read-signed h2 { margin-top: 0.75rem; }
.kind-read-lines,
.kind-read-notes {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
}
.kind-read-notes { margin-top: 0.75rem; }
.kind-read-finding, .owner-note { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
.kind-read-finding:last-child, .owner-note:last-child { border-bottom: 0; }
.kind-read-item { margin: 0 0 0.2rem; }
.kind-read-condition { margin: 0 0 0.25rem; }
.kind-read-condition .condition { font-size: 1rem; font-weight: 700; }
.kind-read-signed-by { margin: 0; font-size: 0.85rem; color: var(--muted); }
.owner-note .kind-read-item { color: var(--muted); font-weight: 600; }
.owner-due { margin: 0 0 0.15rem; color: var(--muted); font-weight: 400; }
.owner-noted { margin: 0; font-size: 0.85rem; color: var(--muted); }
.thin-pack { margin: 1.5rem 0 0; }
.thin-pack a { color: var(--muted); font-size: 0.92rem; }

/* Insurer desk: identity, Findings by severity, thin pack preview. Stacks on a phone. */
.insurer-kicker { margin: 0 0 0.25rem; font-weight: 700; color: var(--sea); }
.insurer-desk .kind-read-status { margin: 0 0 0.5rem; }
.insurer-desk-grid { display: grid; gap: 1rem; }
.insurer-desk-grid > section { background: var(--panel); border: 1px solid var(--line); padding: 0.75rem 0.9rem; }
.insurer-desk-grid h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.insurer-id .facts-table { margin: 0; }
.insurer-findings { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
.insurer-findings th, .insurer-findings td { text-align: left; vertical-align: top; padding: 0.45rem 0.35rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; overflow-wrap: anywhere; }
.insurer-findings th { font-weight: 600; color: var(--muted); }
.finding-name { display: block; font-weight: 700; }
.finding-cond { display: block; font-size: 0.85rem; }
.insurer-signed { color: var(--muted); font-size: 0.85rem; }
.preview-note { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--muted); }
.preview-card { border: 1px solid var(--line); padding: 0.6rem 0.75rem; margin: 0 0 0.75rem; background: #fff; }
.preview-card .facts-table { margin: 0 0 0.5rem; }
.preview-findings { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.preview-signed { margin: 0; font-size: 0.85rem; color: var(--muted); }
.thin-pack-quiet { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--muted); }
.thin-pack-preview .thin-pack { margin: 0.5rem 0 0; }
@media (min-width: 48rem) {
  .sign-page {
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
    gap: 0.75rem 1.25rem;
    align-items: start;
  }
  .sign-page > h1,
  .sign-page > #sign-status { grid-column: 1 / -1; }
  .invite-desk { display: block; background: var(--panel); border: 1px solid var(--line); padding: 0.75rem 0.9rem; }
  .subscribe-desk { display: block; background: var(--panel); border: 1px solid var(--line); padding: 0.75rem 0.9rem; margin: 0 0 0.85rem; }
  .history-desk { display: block; }
  .finding-desk {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    gap: inherit;
    align-items: start;
  }
  .sign-page > .to-sign { display: none; }
  .sign-page > #sign-error,
  .sign-page > .sign-actions { grid-column: 2; margin-top: 0; }
}
@media (min-width: 56rem) {
  .insurer-desk-grid { grid-template-columns: 1fr 1fr 1fr; align-items: start; }
}

/* Rating pills: Condition and Severity stay two scales. */
.rating-pills, .purpose-pills, .expiry-pills {
  border: 0;
  padding: 0;
  margin: 0.75rem 0;
}
.rating-pills legend, .purpose-pills legend, .expiry-pills legend {
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.rating-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  background: var(--panel);
  font-weight: 600;
}
.rating-pill:has(input:checked) { border-color: var(--sea); color: var(--sea); }
.rating-pill input { margin-right: 0.4rem; }
.finding-scope, .owner-ticks-out { color: var(--muted); font-size: 0.92rem; }
.finding-sign { display: block; }
.finding-sign button.big { width: 100%; }
.finding-rows { list-style: none; padding: 0; margin: 0.75rem 0; }
.finding-row { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sea); padding: 0.6rem 0.9rem; margin: 0.6rem 0; }
.finding-row .finding-item { margin: 0 0 0.35rem; font-size: 1.05rem; }

.own-home > .need-vessel { margin: 0 0 0.75rem; }

.parts-page .parts-systems { margin: 0.5rem 0 1rem; }
.parts-cards { list-style: none; padding: 0; margin: 0; }
.parts-card { background: var(--panel); border: 1px solid var(--line); padding: 0.75rem 0.9rem; margin: 0 0 0.6rem; }
.parts-write { margin: 0.6rem 0 0; }
.parts-write .button { width: 100%; min-height: 44px; display: flex; align-items: center; }
.parts-item { margin: 0 0 0.4rem; font-size: 1.1rem; }
.parts-item a { color: var(--ink); text-decoration: none; }
.parts-facts { display: grid; grid-template-columns: 1fr; gap: 0; }
.parts-facts .facts-table { margin: 0; }
@media (min-width: 40rem) {
  .parts-facts { grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
}

.share-compose { background: var(--panel); border: 1px solid var(--line); padding: 0.9rem 1rem; margin: 0 0 1rem; }
.named-share-list, .insurer-pack-list { margin-top: 1rem; }
.named-share-list h3, .insurer-pack-list h3 { margin: 0 0 0.35rem; }
.share-preview { display: grid; gap: 0.75rem; margin: 0.75rem 0; }
@media (min-width: 48rem) { .share-preview { grid-template-columns: 1fr 1fr; } }
.share-preview-loud h3 { margin: 0 0 0.35rem; }
.share-preview-quiet-box h3, .share-preview-quiet-box, .share-preview-notes { color: var(--muted); }
.share-preview-signed, .share-preview-notes { margin: 0; padding-left: 1.1rem; }

.file-findings { list-style: none; padding: 0; margin: 0; }
.file-finding { margin: 0 0 0.75rem; }
.file-finding h3 { margin: 0 0 0.25rem; }
.file-finding .facts-table { margin: 0; table-layout: fixed; }
.file-finding .facts-table th { width: 6.5rem; }
.file-finding .facts-table td { overflow-wrap: anywhere; }
.share-compose .sheet-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* First paint of Home while Aura is still answering. Not a record. */
.home-buffer { margin: 0.5rem 0 1rem; }
.home-buffer-status { color: var(--muted); margin: 0.25rem 0 0.75rem; }
.skeleton {
  background: linear-gradient(90deg, var(--line) 0%, var(--panel) 50%, var(--line) 100%);
  background-size: 200% 100%;
  animation: home-skeleton 1.2s ease-in-out infinite;
  border-radius: 3px;
  margin: 0.55rem 0;
}
.skeleton-title { height: 1.6rem; width: 42%; }
.skeleton-line { height: 0.9rem; width: 72%; }
.skeleton-short { width: 38%; }
.skeleton-block { height: 6.5rem; width: 100%; }
@keyframes home-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; background: var(--line); }
}

/* Battery places: house, start, and thruster are a solid rail. Charger, solar, and a fuel cell are dotted. A Batteries heading is dashed, and it is not those places. */
li.parts-card[data-battery-place="house"],
li.parts-card[data-battery-place="start"],
li.parts-card[data-battery-place="thruster"],
li.need-card[data-battery-place="house"],
li.need-card[data-battery-place="start"],
li.need-card[data-battery-place="thruster"] {
  border-left: 4px solid var(--sea);
}
li.parts-card[data-battery-place="off"],
li.need-card[data-battery-place="off"],
li.due-row[data-battery-place="off"] {
  border-left: 4px dotted var(--muted);
}
li.parts-card[data-battery-umbrella="1"],
li.need-card[data-battery-umbrella="1"],
li.due-row[data-battery-umbrella="1"] {
  border-left: 4px dashed var(--muted);
}
aside.place-facts[data-battery-place="house"],
aside.place-facts[data-battery-place="start"],
aside.place-facts[data-battery-place="thruster"],
aside.due-detail[data-battery-place="house"],
aside.due-detail[data-battery-place="start"],
aside.due-detail[data-battery-place="thruster"] {
  border-left: 4px solid var(--sea);
}
aside.place-facts[data-battery-place="off"],
aside.due-detail[data-battery-place="off"] {
  border-left: 4px dotted var(--muted);
}
.battery-place { margin: 0.2rem 0 0; color: var(--muted); }

/* Card grammar. Phone stays as it is. At a wide desk, read and write are different cards, and each verb is its own control. */
.surface-kicker { display: none; }
.card-verbs { margin: 0.35rem 0 0; }
.due-read { min-width: 0; }

@media (min-width: 64rem) {
  .own-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 1.5rem;
    row-gap: 0.15rem;
    align-items: start;
    grid-auto-flow: dense;
  }
  .own-home > :not(.phase-card):not(.next-due) { grid-column: 1 / -1; }
  .own-home > .phase-card { grid-column: 1; margin-top: 0.35rem; }
  .own-home > .next-due { grid-column: 2; margin-top: 0.35rem; }
  .own-home:not(:has(.phase-card)) > .next-due { grid-column: 1 / -1; }

  [data-surface="read"] > .surface-kicker,
  [data-surface="write"] > .surface-kicker {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .due-kit-write[data-surface="write"],
  #place-form[data-surface="write"],
  .retire-form[data-surface="write"],
  .restore-form[data-surface="write"],
  .add-part[data-surface="write"] {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 4px dashed var(--accent);
    padding: 0.9rem 1rem 1rem;
    margin-top: 1.15rem;
  }
  .place-page #place-form .sheet-actions {
    display: flex;
    justify-content: flex-start;
  }
  .place-page #place-form .sheet-actions .button,
  .place-page #place-form .sheet-actions button {
    width: auto;
    min-width: 12rem;
  }
  .card-verbs {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
  }
  .next-due-card .card-verbs .button,
  .need-card .card-verbs .button,
  .due-detail-actions.card-verbs .button,
  .due-kit-write[data-surface="write"] button {
    display: inline-flex;
    width: auto;
    min-width: 9rem;
  }
  .due-kit-write[data-surface="write"] {
    margin-top: 0.75rem;
  }
  .due-kit-write[data-surface="write"] .sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  .due-detail-actions.card-verbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  .job-done[data-verb="mark-done"] {
    border-left: 4px solid var(--accent);
    padding-left: 0.65rem;
  }
  aside.place-facts[data-surface="read"] {
    padding-left: 0.15rem;
  }
}
