/* Rail & Landing site styles. Palette and type from SPEC 1.4 (contrast measured with research/evidence/palette/contrast.py).
   Body text 19px (never below 18px; small, hint, caption and table-head text also 18px), line height 1.5, lines up to about 70 characters, targets at least 48px, no motion. */
:root {
  --ink: #1D2528;
  --spruce: #234B44;
  --spruce-hover: #1A3934;
  --paper: #F6F3EC;
  --stone: #E6E0D3;
  --brass-light: #DDBF8A;
  --brass-dark: #6B4813;
  --slate: #454F4D;
  --rule: #B9B2A3;
  --field: #FFFFFF;
  --field-border: #454F4D;
  --on-spruce: #F6F3EC;
  --link: #234B44;
  --focus: #6B4813;
  --mark: #F1DFAF;
  --bg: var(--paper);
  --text: var(--ink);
  --panel: var(--stone);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14191A;
    --text: #EDE8DE;
    --panel: #1F2A28;
    --slate: #C9C2B4;
    --rule: #4A5552;
    --field: #1A2122;
    --field-border: #C9C2B4;
    --spruce: #DDBF8A;
    --spruce-hover: #E8CFA2;
    --on-spruce: #14191A;
    --link: #E4C995;
    --brass-dark: #DDBF8A;
    --focus: #DDBF8A;
    --mark: #5A4720;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 1.1875rem; line-height: 1.5;
}
@media (max-width: 480px) { body { font-size: 1.125rem; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--text); margin: 1.6em 0 0.5em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); margin-top: 0.6em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem); }
h3 { font-size: 1.35rem; }
p, ul, ol, dl { margin: 0 0 1em; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.prose { max-width: 44rem; }
.lead { font-size: 1.25em; max-width: 40rem; }
.small { font-size: 1.125rem; }
.muted { color: var(--slate); }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin: 0 0 0.35em; }

.skip { position: absolute; left: 8px; top: -100px; background: var(--spruce); color: var(--on-spruce); padding: 12px 16px; z-index: 10; font-weight: 700; }
.skip:focus { top: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 16px; padding-bottom: 12px; }
.brand { text-decoration: none; color: var(--text); display: inline-block; padding: 4px 0; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; line-height: 1.15; display: inline-block; border-bottom: 3px solid currentColor; padding-bottom: 2px; color: var(--text); }
.wordmark-small { font-size: 1.35rem; border-bottom-width: 0; margin: 0 0 4px; }
.descriptor { display: block; font-weight: 500; font-size: 1.125rem; color: var(--slate); margin-top: 6px; }
.header-call { margin: 0; display: flex; flex-direction: column; align-items: flex-start; }
@media (min-width: 720px) { .header-call { align-items: flex-end; text-align: right; } }
.phone-big { font-size: 1.6rem; font-weight: 700; color: var(--text); text-decoration: underline; display: inline-block; min-height: 48px; line-height: 48px; }
.nav { background: var(--panel); border-top: 1px solid var(--rule); }
.nav-list { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0 4px; padding-top: 4px; padding-bottom: 4px; }
.nav-list a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; color: var(--text); font-weight: 500; text-decoration: none; border-bottom: 3px solid transparent; }
.nav-list a:hover { text-decoration: underline; }
.nav-list a[aria-current="page"] { border-bottom-color: var(--brass-dark); font-weight: 700; }
.nav-list .nav-quote { background: var(--spruce); color: var(--on-spruce); border-radius: 6px; margin: 4px 0 4px 4px; min-height: 48px; }
@media (max-width: 719px) {
  .nav-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; padding-left: 8px; padding-right: 8px; }
  .nav-list a { padding: 0 8px; width: 100%; }
  .nav-list .nav-quote { margin: 4px 0; justify-content: center; }
}

/* sections */
.hero { padding: 8px 0 32px; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; gap: 24px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.section { padding: 24px 0 40px; }
.band { background: var(--panel); padding: 8px 0 40px; margin: 24px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 22px; background: var(--spruce); color: var(--on-spruce); font-family: var(--sans); font-size: 1.1875rem; font-weight: 700; border: 2px solid var(--spruce); border-radius: 8px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--spruce-hover); text-decoration: underline; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn-ghost:hover { background: transparent; }
.btn-big { min-height: 60px; font-size: 1.25rem; padding: 12px 28px; width: 100%; max-width: 26rem; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: 16px 0; padding: 0; list-style: none; }
.card { background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; }
.band .card { background: var(--bg); }
.card h3 { margin-top: 0; }
.card .price { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.4em; }
.price-note { color: var(--slate); font-size: 1.125rem; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.steps li { counter-increment: step; background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 20px; }
.steps li::before { content: "Step " counter(step); display: block; font-weight: 700; color: var(--brass-dark); margin-bottom: 4px; }

.table-wrap { overflow-x: auto; margin: 0 0 1.5em; }
table { border-collapse: collapse; width: 100%; max-width: 52rem; }
caption { text-align: left; font-weight: 700; padding: 0 0 8px; }
th, td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); }
th[scope="col"] { font-size: 1.125rem; color: var(--slate); }
td.num { white-space: nowrap; font-weight: 700; }

.note { border-left: 6px solid var(--brass-dark); background: var(--panel); padding: 12px 16px; max-width: 44rem; }
.call-box { border: 2px solid var(--spruce); border-radius: 10px; padding: 16px 20px; background: var(--bg); max-width: 30rem; }
.call-box-h { font-weight: 700; margin-bottom: 0; }
figure { margin: 0 0 1.5em; }
figure.ill { background: var(--panel); border-radius: 10px; padding: 12px; max-width: 34rem; }
figure.ill img { display: block; width: 100%; }
figcaption { font-size: 1.125rem; color: var(--slate); margin-top: 8px; }
.photo-slot { border: 3px dashed var(--rule); border-radius: 10px; padding: 24px; min-height: 10rem; display: flex; align-items: center; max-width: 34rem; color: var(--slate); }
.photo-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.two-col { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.two-col > *, .hero-grid > *, .field-row > * { min-width: 0; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
details { border: 1px solid var(--rule); border-radius: 8px; padding: 0 16px; margin: 0 0 12px; background: var(--bg); max-width: 48rem; }
summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; padding: 8px 0; }
details[open] summary { border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
dt { font-weight: 700; }
dd { margin: 0 0 12px; }
.faq h2 { font-size: 1.5rem; }
.checklist { list-style: none; padding: 0; max-width: 46rem; }
.checklist li { position: relative; padding: 8px 0 8px 44px; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border: 2px solid var(--text); border-radius: 4px; }
.checklist.notes li { padding-left: 0; }
.checklist.notes li::before { display: none; }

/* forms */
.quote-form { max-width: 46rem; }
.form-note { font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.quote-form > fieldset { border-top: 1px solid var(--rule); padding-top: 8px; }
legend { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; padding: 0; margin: 12px 0 8px; }
fieldset.group legend.label, .label, .sub-legend { font-family: var(--sans); font-size: 1.1875rem; font-weight: 700; margin: 0 0 6px; display: block; }
.field { margin: 0 0 20px; }
.field-row { display: grid; gap: 0 20px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; min-height: 52px; padding: 10px 12px; font: inherit; color: var(--text); background: var(--field);
  border: 2px solid var(--field-border); border-radius: 6px;
}
input.short { max-width: 9rem; }
textarea { min-height: 7rem; }
input[type="file"] { font: inherit; min-height: 52px; padding: 8px 0; max-width: 100%; }
input[type="checkbox"], input[type="radio"] { width: 28px; height: 28px; margin: 0; flex: none; accent-color: var(--spruce); }
.choices { display: grid; gap: 8px; }
label.choice { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border: 2px solid var(--rule); border-radius: 6px; font-weight: 500; margin: 0; background: var(--field); cursor: pointer; }
label.choice:has(input:checked) { border-color: var(--spruce); }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; }
.check input { margin-top: 2px; }
.check label { font-weight: 500; margin: 0; }
.hint { color: var(--slate); font-size: 1.125rem; margin: 6px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.thumbs li { display: flex; align-items: center; gap: 12px; }
.thumbs img, .thumbs .heic { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--panel); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.thumbs .name { flex: 1; overflow-wrap: anywhere; }
.thumbs button { min-height: 48px; min-width: 48px; padding: 0 14px; font: inherit; font-weight: 700; background: var(--bg); color: var(--text); border: 2px solid var(--text); border-radius: 6px; cursor: pointer; }
.form-status { font-weight: 700; min-height: 1.5em; }
.form-error { border: 3px solid var(--brass-dark); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; background: var(--bg); }
.form-error p:first-child { font-weight: 700; }
.field-error { font-weight: 700; margin: 6px 0 0; }
.field-error::before { content: "Error: "; }
[aria-invalid="true"] { border-width: 3px; border-style: solid; border-color: var(--brass-dark); }
.photo-guide { margin: 12px 0 16px; }

/* footer */
.site-footer { margin-top: 48px; border-top: 3px solid var(--spruce); background: var(--panel); padding: 24px 0 32px; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-h { font-family: var(--sans); font-size: 1.1875rem; font-weight: 700; margin: 0 0 8px; }
.site-footer a { display: inline-block; min-height: 48px; line-height: 48px; }
.legal { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 16px; }

/* review mode */
mark.confirm { background: var(--mark); color: var(--text); padding: 0 2px; }
.review mark.confirm { outline: 3px solid var(--brass-dark); }
.review-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--ink); color: #F6F3EC; padding: 10px 16px; display: flex; gap: 16px; align-items: center; z-index: 20; }
.review-bar button { min-height: 48px; padding: 0 16px; font: inherit; font-weight: 700; }

/* print (home check list and price list) */
@page { margin: 14mm 14mm 14mm 14mm; }
@media print {
  body { font-size: 13pt; line-height: 1.35; background: #fff; color: #000; }
  .site-footer { display: none !important; }
  .site-header { border: 0; background: #fff; }
  .header-row { padding: 0 0 4pt; }
  .wordmark { font-size: 18pt; }
  h1 { font-size: 20pt; margin: 6pt 0 4pt; }
  h2 { font-size: 15pt; margin: 10pt 0 2pt; }
  .lead { font-size: 13pt; }
  .small, .hint, figcaption, th[scope="col"] { font-size: 12pt; }
  .checklist li { padding: 3pt 0 3pt 30pt; }
  .checklist li::before { width: 16pt; height: 16pt; top: 4pt; }
  .checklist.notes li { padding-left: 0; }
  p, ul { margin-bottom: 6pt; }
  .wrap { padding: 0; max-width: none; }
  .site-header .nav, .header-call, .skip, .no-print, .site-footer .footer-grid > div:last-child, .review-bar { display: none !important; }
  .site-footer { background: #fff; border-top: 1px solid #000; margin-top: 12pt; }
  a { color: #000; }
  .band, .card, details { background: #fff; }
  .page-break { break-before: page; }
  h1, h2, h3 { break-after: avoid; }
  .checklist li { break-inside: avoid; }
}

/* AAA contrast: secondary slate text is used on paper only; on stone panels it switches to the body text colour. */
figure.ill figcaption, .band .price-note, .band .hint, .nav .small, .site-footer .small, .note .hint { color: var(--text); }
