@font-face {
  font-family: "Satoshi";
  src: url("assets/fonts/satoshi/Satoshi-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   Tokens. The warm theme is the base; minimal and dark override tokens and
   switch the chapter cards off in favor of a flat document.
--------------------------------------------------------------------------- */

:root {
  color-scheme: light;
  --canvas: #f5f1e8;
  --surface: #fffdf9;
  --ink: #262119;
  --muted: color-mix(in srgb, var(--ink) 60%, var(--canvas));
  --hairline: color-mix(in srgb, var(--ink) 13%, transparent);
  --hairline-soft: color-mix(in srgb, var(--ink) 7%, transparent);
  --well: color-mix(in srgb, var(--ink) 4%, var(--surface));
  --accent: #b7532f;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 8%, var(--surface));
  --header-bg: color-mix(in srgb, var(--canvas) 92%, transparent);
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --button-radius: 999px;
  --content: 760px;
  --section-pad: 52px;
  --shadow: 0 18px 44px -18px color-mix(in srgb, var(--ink) 28%, transparent);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.62 "Satoshi", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
textarea {
  font-family: "Satoshi", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--ink);
}

a:visited {
  color: var(--ink);
}

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

img {
  display: block;
  max-width: 100%;
}

strong {
  font-weight: 600;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

h1 {
  max-width: 21ch;
  font-size: clamp(32px, 4.6vw, 46px);
  font-weight: 620;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

h2 {
  max-width: 30ch;
  margin-bottom: 10px;
  font-size: clamp(22px, 2.6vw, 26px);
  font-weight: 620;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.proposal-section > p,
.section-intro {
  max-width: 58ch;
  margin-bottom: 0;
}

.proposal-section > h2 + p,
.proposal-section > p + p {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Header
-------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--header-bg);
  padding: 8px 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  width: min(1080px, 100%);
  margin: auto;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 620;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:visited {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  margin-right: 10px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--surface);
  place-items: center;
  font-size: 11px;
  font-weight: 620;
}

.header-project {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.header-total {
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.header-total small {
  color: var(--muted);
  font-size: 12px;
}

.header-total strong {
  font-size: 16px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Buttons
-------------------------------------------------------------------------- */

.button,
.attachment,
.icon-button {
  min-height: 44px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--button-radius);
  padding: 0 20px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  border-color: color-mix(in srgb, var(--accent) 88%, var(--ink));
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
}

.button-secondary {
  border-color: var(--hairline);
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
}

.question-count {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Proposal shell — warm theme shows chapter cards
-------------------------------------------------------------------------- */

main {
  padding: 28px 20px 120px;
}

.proposal {
  display: grid;
  width: min(var(--content), 100%);
  margin: auto;
  gap: 18px;
}

.proposal-section {
  scroll-margin-top: 84px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: var(--section-pad);
}

.section-marker,
.kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Hero — image with an overlapping title card (warm theme)
-------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.hero-image {
  order: 1;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-image figcaption {
  display: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  order: 2;
  margin: -104px 40px 40px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 36px;
  box-shadow: var(--shadow);
}

.hero-copy h1 {
  margin-bottom: 14px;
}

.hero-copy > p:not(.kicker) {
  max-width: 54ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

/* Key facts as a quiet inline description list */

.facts {
  display: flex;
  flex-wrap: wrap;
  margin: 26px 0 0;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 20px;
  column-gap: 36px;
  row-gap: 14px;
}

.facts div {
  min-width: 0;
}

.facts dt {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Team & contact
-------------------------------------------------------------------------- */

.plain-list,
.attachment-list,
.comments {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list {
  margin-top: 24px;
  border-top: 1px solid var(--hairline-soft);
}

.person {
  display: flex;
  align-items: center;
  min-height: 96px;
  border-bottom: 1px solid var(--hairline-soft);
  padding: 18px 0;
  gap: 18px;
}

.person:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.person img {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(0.8);
}

.person p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Shared table rhythm — planning, quote, rates, agreements, cost summary all
   use the same hairline rows and one right-hand numeric axis.
-------------------------------------------------------------------------- */

.table-shell {
  margin-top: 26px;
}

.table-head,
.planning-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 132px;
  align-items: start;
  gap: 16px;
}

.table-head {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.table-head span:last-child {
  text-align: right;
}

.planning-row {
  position: relative;
  border-bottom: 1px solid var(--hairline-soft);
  padding: 18px 0;
}

.planning-row strong,
.planning-row small {
  display: block;
}

.planning-row strong {
  font-size: 16px;
}

.planning-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.planning-row .milestone {
  display: flex;
  align-items: baseline;
  margin-top: 8px;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}

.planning-row .milestone::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}

.planning-row time {
  text-align: right;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.phase-number {
  color: var(--accent);
  font-size: 14px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Gallery & attachments
-------------------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
  gap: 16px 14px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.gallery figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.attachment-list {
  margin-top: 28px;
  border-top: 1px solid var(--hairline);
}

.attachment {
  display: flex;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid var(--hairline-soft);
  border-radius: 0;
  padding: 13px 2px;
  gap: 14px;
  text-align: left;
  transition: background-color 0.15s ease;
}

.attachment:hover {
  background: var(--well);
}

.attachment strong {
  display: block;
  font-size: 15px;
}

.attachment small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 13px;
}

.file-icon {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  place-items: center;
}

.file-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.file-icon small {
  position: absolute;
  right: -5px;
  bottom: -5px;
  border-radius: 4px;
  background: var(--accent);
  padding: 2px 4px;
  color: var(--accent-ink);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.file-copy {
  min-width: 0;
}

.download-icon {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
}

.attachment:hover .download-icon {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Quote tables — same model as the product, unboxed and on one rhythm
-------------------------------------------------------------------------- */

fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.quote-document {
  margin-top: 6px;
}

.quote-group {
  margin-top: 30px;
}

.quote-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  gap: 14px;
}

.quote-group-heading h3,
.quote-group-heading > span:first-child {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.group-mode {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.quote-table-head,
.quote-row {
  display: grid;
  align-items: start;
  gap: 14px;
}

.quote-table-head,
.quote-row-fixed {
  grid-template-columns: minmax(0, 1fr) 62px 84px 44px 96px;
}

.quote-row-choice {
  grid-template-columns: 26px minmax(0, 1fr) 62px 84px 44px 96px;
  cursor: pointer;
}

.quote-table-head {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.quote-table-head span:nth-child(n + 2) {
  text-align: right;
}

.quote-row {
  border-bottom: 1px solid var(--hairline-soft);
  padding: 14px 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

fieldset .quote-row:first-of-type {
  border-top: 1px solid var(--hairline);
}

.quote-row-fixed > span:nth-child(n + 2),
.quote-row-choice > span:nth-child(n + 3) {
  text-align: right;
  color: var(--muted);
  line-height: 1.55;
  white-space: nowrap;
}

.select-cell {
  display: flex;
  justify-content: flex-start;
  padding-top: 3px;
}

.select-cell input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.item-cell strong,
.item-cell small,
.mobile-meta {
  display: block;
}

.item-cell strong {
  font-size: 15px;
}

.item-cell small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.mobile-meta {
  display: none;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.row-total {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.55;
}

.row-empty {
  color: var(--muted);
  text-align: right;
  line-height: 1.55;
}

.quote-totals {
  display: grid;
  width: min(320px, 100%);
  margin: 18px 0 0 auto;
  gap: 7px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.quote-totals > small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
}

.quote-totals > div,
.cost-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.quote-totals > div > span:first-child {
  color: var(--muted);
}

.quote-total-row {
  align-items: baseline;
  margin-top: 5px;
  border-top: 1px solid var(--ink);
  padding-top: 12px;
}

.quote-total-row > strong:first-child {
  font-size: 15px;
  font-weight: 500;
}

.quote-total-row > strong:last-child {
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.valid-until {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

/* Reference rates: a simple informational list on the same rhythm */

.rate-table {
  margin-top: 26px;
  border-top: 1px solid var(--hairline);
}

.rate-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline-soft);
  padding: 14px 0;
  gap: 24px;
}

.rate-row strong {
  display: block;
  font-size: 15px;
}

.rate-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.rate-price {
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Agreements
-------------------------------------------------------------------------- */

.agreement-table {
  margin: 26px 0 0;
  border-top: 1px solid var(--hairline);
}

.agreement-row {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 14px 0;
  gap: 24px;
}

.agreement-row:last-child {
  border-bottom: 0;
}

.agreement-row dt,
.agreement-row dd {
  margin: 0;
}

.agreement-row dt {
  font-weight: 600;
  font-size: 15px;
}

.agreement-row dd {
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Contact
-------------------------------------------------------------------------- */

.contact-list {
  display: grid;
  margin: 26px 0 0;
  gap: 12px;
}

.contact-card {
  display: flex;
  align-items: center;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  background: var(--well);
  padding: 18px;
  gap: 18px;
}

.contact-card img {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(0.8);
}

.contact-card h3 {
  margin-bottom: 1px;
}

.contact-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.contact-card a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-right: 16px;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.company-details {
  margin-top: 26px;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 18px;
}

.company-details p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.company-details strong {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Review & approval
-------------------------------------------------------------------------- */

.cost-summary {
  margin: 26px 0 0;
  border-top: 1px solid var(--hairline);
}

.cost-row {
  border-bottom: 1px solid var(--hairline-soft);
  padding: 13px 0;
  font-size: 15px;
}

.cost-row span:last-child {
  flex: 0 0 auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 28px;
  gap: 10px;
}

.status,
.inline-notice {
  margin: 16px 0 0;
  border-radius: var(--radius-sm);
  background: var(--well);
  padding: 12px 14px;
  color: var(--ink);
  font-size: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  text-decoration-color: transparent;
}

.back-link:visited {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Questions drawer
-------------------------------------------------------------------------- */

.question-drawer {
  width: min(420px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  border: 0;
  border-left: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  padding: 0;
}

.question-drawer::backdrop {
  background: rgba(15, 14, 12, 0.4);
}

.drawer-layout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid var(--hairline-soft);
  padding: 20px;
  gap: 12px;
}

.drawer-header h2 {
  margin: 0;
  font-size: 18px;
}

.drawer-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  margin-left: auto;
  border-color: var(--hairline);
  border-radius: 50%;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.comments {
  align-content: start;
  overflow-y: auto;
  padding: 20px;
  gap: 10px;
}

.comment {
  max-width: 92%;
  border-radius: var(--radius);
  border-bottom-left-radius: 4px;
  background: var(--well);
  padding: 12px 14px;
  font-size: 14px;
}

.comment.vendor {
  margin-left: auto;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: 4px;
  background: var(--accent-soft);
}

.comment strong {
  font-size: 13px;
}

.comment p {
  margin: 3px 0;
  line-height: 1.5;
}

.comment small {
  color: var(--muted);
  font-size: 12px;
}

.comment-form {
  display: grid;
  border-top: 1px solid var(--hairline-soft);
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  gap: 10px;
}

.comment-form label {
  font-weight: 600;
  font-size: 14px;
}

.comment-form textarea {
  min-height: 96px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  font-size: 15px;
  resize: vertical;
}

.mobile-dock {
  display: none;
}

/* --------------------------------------------------------------------------
   Sidebar navigation (?nav=side) — desktop only, falls back to the top bar
-------------------------------------------------------------------------- */

.side-nav {
  display: none;
}

@media (min-width: 1100px) {
  html[data-nav="side"] .site-header {
    display: none;
  }

  html[data-nav="side"] .side-nav {
    position: fixed;
    z-index: 20;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 280px;
    border-right: 1px solid var(--hairline-soft);
    background: var(--canvas);
    padding: 30px 28px 26px;
  }

  html[data-nav="side"] main {
    margin-left: 280px;
    padding-top: 44px;
  }

  html[data-nav="side"] .proposal {
    width: min(var(--content), 100%);
  }
}

.side-project {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.side-sections {
  display: grid;
  margin-top: 28px;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 18px;
  gap: 2px;
}

.side-sections a {
  display: flex;
  align-items: baseline;
  min-height: 32px;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.side-sections a:visited {
  color: var(--muted);
}

.side-sections a:hover {
  color: var(--ink);
}

.side-sections .s-num {
  flex: 0 0 auto;
  width: 20px;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.side-sections a.is-active {
  color: var(--ink);
  font-weight: 600;
}

.side-sections a.is-active .s-num {
  color: var(--accent);
  font-weight: 620;
}

.side-total {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}

.side-total small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.side-total strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.side-nav .button {
  margin-top: 14px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Theme: minimal — flat white document, monochrome ink
-------------------------------------------------------------------------- */

html[data-theme="minimal"] {
  --canvas: #ffffff;
  --surface: #ffffff;
  --ink: #1d1c19;
  --accent: #1d1c19;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--ink) 5%, var(--surface));
  --muted: color-mix(in srgb, var(--ink) 55%, var(--canvas));
  --well: color-mix(in srgb, var(--ink) 4%, var(--surface));
  --button-radius: 10px;
  --content: 720px;
}

/* --------------------------------------------------------------------------
   Theme: dark — same flat document in a calm dark reading mode
-------------------------------------------------------------------------- */

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #141311;
  --surface: #141311;
  --ink: #eceade;
  --muted: color-mix(in srgb, var(--ink) 58%, var(--canvas));
  --hairline: color-mix(in srgb, var(--ink) 18%, transparent);
  --hairline-soft: color-mix(in srgb, var(--ink) 10%, transparent);
  --well: color-mix(in srgb, var(--ink) 6%, var(--canvas));
  --accent: #d9a84e;
  --accent-ink: #191610;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--canvas));
  --button-radius: 10px;
  --content: 720px;
  --shadow: none;
}

html[data-theme="dark"] .question-drawer,
html[data-theme="dark"] .comment-form textarea {
  background: #1b1a17;
}

html[data-theme="dark"] .comment,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .status,
html[data-theme="dark"] .inline-notice {
  background: #201f1b;
}

html[data-theme="dark"] img {
  filter: brightness(0.94);
}

/* Flat document rules shared by minimal and dark */

html[data-theme="minimal"] .proposal,
html[data-theme="dark"] .proposal {
  gap: 0;
}

html[data-theme="minimal"] .proposal-section,
html[data-theme="dark"] .proposal-section {
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
  padding: 56px 0;
  border-color: var(--hairline);
}

html[data-theme="minimal"] main,
html[data-theme="dark"] main {
  padding-top: 0;
}

html[data-theme="minimal"] .hero,
html[data-theme="dark"] .hero {
  border-top: 0;
  padding-top: 44px;
}

html[data-theme="minimal"] .hero-copy,
html[data-theme="dark"] .hero-copy {
  order: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

html[data-theme="minimal"] .hero-image,
html[data-theme="dark"] .hero-image {
  order: 2;
  margin-top: 34px;
}

html[data-theme="minimal"] .hero-image img,
html[data-theme="dark"] .hero-image img {
  border-radius: var(--radius);
}

html[data-theme="minimal"] .hero-image figcaption,
html[data-theme="dark"] .hero-image figcaption {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

html[data-theme="minimal"] .facts,
html[data-theme="dark"] .facts {
  border-top: 0;
  padding-top: 6px;
}

html[data-theme="minimal"] .section-marker,
html[data-theme="minimal"] .kicker {
  color: var(--muted);
}

html[data-theme="minimal"] .brand-mark {
  border-radius: 7px;
}

html[data-theme="minimal"] .contact-card,
html[data-theme="dark"] .contact-card {
  border: 1px solid var(--hairline-soft);
}

/* --------------------------------------------------------------------------
   Mobile
-------------------------------------------------------------------------- */

@media (max-width: 720px) {
  :root {
    --section-pad: 30px 22px;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  h1 {
    font-size: 31px;
  }

  h2 {
    font-size: 22px;
  }

  .site-header {
    min-height: 58px;
    padding: 6px 16px;
  }

  .header-project,
  .header-total {
    display: none;
  }

  .header-inner > .button {
    margin-left: auto;
    padding: 0 14px;
    font-size: 14px;
  }

  main {
    padding: 14px 12px 64px;
  }

  .proposal {
    gap: 12px;
  }

  .proposal-section {
    border-radius: 14px;
  }

  .hero {
    padding: 0;
  }

  .hero-copy {
    margin: -60px 12px 12px;
    padding: 24px 22px;
  }

  .hero-copy > p:not(.kicker) {
    font-size: 16px;
  }

  .hero-image img {
    aspect-ratio: 4 / 3;
  }

  .facts {
    display: grid;
    padding-top: 16px;
    row-gap: 0;
  }

  .facts div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--hairline-soft);
    padding: 9px 0;
    gap: 16px;
  }

  .facts div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .facts dt {
    margin: 0;
  }

  .table-head {
    display: none;
  }

  .table-head + .planning-row {
    border-top: 1px solid var(--hairline);
  }

  .planning-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
  }

  .planning-row time {
    grid-column: 2;
    margin-top: 6px;
    text-align: left;
  }

  .gallery {
    gap: 12px 10px;
  }

  .gallery figcaption {
    font-size: 12px;
  }

  .quote-group {
    margin-top: 26px;
  }

  .quote-group-heading {
    flex-wrap: wrap;
    gap: 2px 14px;
  }

  .quote-table-head {
    display: none;
  }

  .quote-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .quote-table-head + .quote-row {
    border-top: 1px solid var(--hairline);
  }

  .quote-row-fixed {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .quote-row-fixed > span:nth-child(2),
  .quote-row-fixed > span:nth-child(3),
  .quote-row-fixed > span:nth-child(4) {
    display: none;
  }

  .quote-row-fixed .row-total {
    grid-column: 2;
    grid-row: 1;
  }

  .quote-row-choice {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .quote-row-choice > span:nth-child(3),
  .quote-row-choice > span:nth-child(4),
  .quote-row-choice > span:nth-child(5) {
    display: none;
  }

  .quote-row-choice .row-total {
    grid-column: 3;
    grid-row: 1;
  }

  .mobile-meta {
    display: block;
  }

  .quote-totals {
    width: 100%;
    margin-top: 20px;
  }

  .agreement-row {
    display: block;
    padding: 12px 0;
  }

  .agreement-row dd {
    margin-top: 2px;
  }

  .contact-card {
    align-items: flex-start;
    padding: 16px;
  }

  .contact-card img {
    width: 56px;
    height: 56px;
  }

  .contact-card a {
    display: flex;
    width: fit-content;
    min-height: 36px;
    margin-right: 0;
    overflow-wrap: anywhere;
  }

  .approval-actions {
    display: grid;
  }

  .mobile-dock {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(92px, 1fr) auto;
    align-items: center;
    border-top: 1px solid var(--hairline);
    background: var(--surface);
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  html[data-theme="dark"] .mobile-dock {
    background: #1b1a17;
  }

  .mobile-dock small {
    display: block;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-dock strong {
    display: block;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
  }

  .mobile-dock .button {
    min-width: 0;
    padding: 0 16px;
    white-space: nowrap;
    font-size: 14px;
  }

  .question-drawer {
    border-left: 0;
  }

  html[data-theme="minimal"] main,
  html[data-theme="dark"] main {
    padding-right: 20px;
    padding-left: 20px;
  }

  html[data-theme="minimal"] .proposal-section,
  html[data-theme="dark"] .proposal-section {
    border-radius: 0;
    padding: 36px 0;
  }

  html[data-theme="minimal"] .hero,
  html[data-theme="dark"] .hero {
    padding-top: 28px;
  }

  html[data-theme="minimal"] .hero-image img,
  html[data-theme="dark"] .hero-image img {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 350px) {
  .brand-mark {
    margin-right: 7px;
  }

  .header-inner {
    gap: 8px;
  }

  .header-inner > .button {
    padding: 0 10px;
    font-size: 13px;
  }

  .mobile-dock .button {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 13px;
  }

  .mobile-dock strong {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* --------------------------------------------------------------------------
   Theme: wasbeheer — brand-specific light document, teal accent
   Flat white reading model like minimal, with the Wasbeheer teal (#027896)
   as the single accent. Self-contained: does not touch the minimal/dark
   selector lists above.
-------------------------------------------------------------------------- */

html[data-theme="wasbeheer"] {
  --canvas: #ffffff;
  --surface: #ffffff;
  --ink: #16333b;
  --muted: color-mix(in srgb, var(--ink) 52%, var(--canvas));
  --hairline: color-mix(in srgb, var(--ink) 14%, transparent);
  --hairline-soft: color-mix(in srgb, var(--ink) 8%, transparent);
  --well: color-mix(in srgb, var(--ink) 4%, var(--surface));
  --accent: #027896;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, var(--surface));
  --header-bg: color-mix(in srgb, var(--canvas) 90%, transparent);
  --button-radius: 10px;
  --content: 720px;
}

/* Continuous-document layout (mirrors the minimal/dark flat rules) */

html[data-theme="wasbeheer"] .proposal {
  gap: 0;
}

html[data-theme="wasbeheer"] .proposal-section {
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
  padding: 56px 0;
  border-color: var(--hairline);
}

html[data-theme="wasbeheer"] main {
  padding-top: 0;
}

html[data-theme="wasbeheer"] .hero {
  border-top: 0;
  padding-top: 44px;
}

html[data-theme="wasbeheer"] .hero-copy {
  order: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

html[data-theme="wasbeheer"] .hero-image {
  order: 2;
  margin-top: 34px;
}

html[data-theme="wasbeheer"] .hero-image img {
  border-radius: var(--radius);
}

html[data-theme="wasbeheer"] .hero-image figcaption {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

html[data-theme="wasbeheer"] .facts {
  border-top: 0;
  padding-top: 6px;
}

html[data-theme="wasbeheer"] .contact-card {
  border: 1px solid var(--hairline-soft);
}

/* Brand + accent touches */

html[data-theme="wasbeheer"] .brand-mark {
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
}

html[data-theme="wasbeheer"] .brand {
  letter-spacing: 0.02em;
  font-weight: 700;
}

html[data-theme="wasbeheer"] .section-marker,
html[data-theme="wasbeheer"] .kicker {
  color: var(--accent);
}

/* SVG equipment tiles reuse the .gallery grid in place of photos */

html[data-theme="wasbeheer"] .equip-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

html[data-theme="wasbeheer"] .equip-tile svg {
  width: 46%;
  height: auto;
  color: var(--accent);
}

@media (max-width: 720px) {
  html[data-theme="wasbeheer"] main {
    padding-right: 20px;
    padding-left: 20px;
  }

  html[data-theme="wasbeheer"] .proposal-section {
    border-radius: 0;
    padding: 36px 0;
  }

  html[data-theme="wasbeheer"] .hero {
    padding-top: 28px;
  }

  html[data-theme="wasbeheer"] .hero-image img {
    aspect-ratio: 4 / 3;
  }
}
