/* RepairShopKit site. Colors match the templates (slate headers, light-yellow input cells). */
:root {
  --ink: #13201E;
  --muted: #56655F;
  --line: #D3DCD8;
  --paper: #F4F6F5;
  --card: #FFFFFF;
  --dark: #1F2A2E;
  --accent: #0E6656;
  --accent-hover: #0A5145;
  --accent-soft: #DDEEE9;
  --yellow: #FFF6CC;
  --yellow-line: #E6D27A;
  --max: 1080px;
  --gutter: 20px;
  --radius: 10px;
  color-scheme: light;
}
@media (max-width: 480px) { :root { --gutter: 16px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--card);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.site-head .head-grid { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "logo nav cta"; align-items: center; gap: 8px 24px; padding-block: 12px; }
.head-grid .logo { grid-area: logo; }
.head-grid .nav { grid-area: nav; justify-self: end; }
.head-grid .head-cta { grid-area: cta; padding: 9px 14px; font-size: 0.95rem; }
@media (max-width: 620px) {
  .site-head .head-grid { grid-template-columns: 1fr auto; grid-template-areas: "logo cta" "nav nav"; gap: 4px 12px; padding-block: 10px; }
  .head-grid .nav { justify-self: start; gap: 0 18px; font-size: 0.9rem; }
  .head-grid .nav a { padding: 2px 0; }
  .head-grid .head-cta { padding: 8px 12px; font-size: 0.88rem; }
}
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.logo span { background: linear-gradient(transparent 58%, var(--yellow) 58%); color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  padding: 13px 20px; border-radius: 8px; border: 2px solid var(--accent); line-height: 1.2;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.disabled { background: var(--paper); border-color: var(--line); color: var(--muted); cursor: default; }
.btn.disabled:hover { background: var(--paper); border-color: var(--line); color: var(--muted); }
.buybox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; background: var(--yellow); border: 1px solid var(--yellow-line); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0 14px; }
.buybox .price { margin: 0; font-size: 2rem; font-weight: 800; line-height: 1.1; }
.buybox .price small { font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.buybox .note { margin: 4px 0 0; }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn small { display: block; font-weight: 400; font-size: 0.8rem; opacity: 0.85; margin-top: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Type */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
h1, h2 { font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 0 0 18px; font-weight: 700; }
h2 { font-size: clamp(1.45rem, 3.2vw, 1.9rem); margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lede { font-size: 1.15rem; max-width: 60ch; color: var(--ink); }
.muted { color: var(--muted); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.mark { background: var(--yellow); padding: 0 3px; border-radius: 2px; }

/* Sections */
section { padding-block: 56px; }
section.band { background: var(--paper); border-block: 1px solid var(--line); }
.section-intro { max-width: 62ch; color: var(--muted); margin-bottom: 26px; }

/* Hero */
.hero { padding-block: 48px 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.paper-shot { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 1px 2px rgba(19,32,30,.08), 0 6px 16px rgba(19,32,30,.06); overflow: hidden; }
.paper-shot.crop { aspect-ratio: 4 / 3.1; }
.paper-shot.crop img { width: 100%; }
picture { display: block; }
picture img { width: 100%; }
figure { margin: 0; }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* Data block */
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 700px) { .stat { grid-template-columns: 1fr; } }
.stat-num { font-size: clamp(3rem, 9vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat-num small { display: block; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--muted); margin-top: 6px; }
.dots { display: grid; grid-template-columns: repeat(14, 22px); gap: 6px; margin: 14px 0 8px; }
@media (max-width: 480px) { .dots { grid-template-columns: repeat(7, 22px); } }
.dots i { width: 22px; height: 22px; border-radius: 4px; border: 2px solid var(--dark); background: var(--card); }
.dots i.no { background: var(--dark); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.85rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--dark); vertical-align: -1px; margin-right: 6px; }
.legend i.no { background: var(--dark); }

/* Cards */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid2, .grid4 { grid-template-columns: 1fr; } }
/* The three template cards: three across, one column on phones and small tablets */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--dark); color: #fff; font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }
a.card { text-decoration: none; color: var(--ink); display: block; }
a.card:hover { border-color: var(--accent); }
a.card h3 { color: var(--accent); }
.tcard img { border: 1px solid var(--line); border-radius: 4px; margin-bottom: 14px; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; width: 100%; }
.formats { font-size: 0.85rem; color: var(--muted); margin-top: 6px !important; }

/* Pricing */
.price { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center; border: 2px solid var(--dark); border-radius: var(--radius); padding: 24px; background: var(--card); }
@media (max-width: 700px) { .price { grid-template-columns: 1fr; } }
.price-big { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.price-big span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price ul { margin: 12px 0 0; padding-left: 1.1em; color: var(--muted); }

/* Template page */
.tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 44px; align-items: start; }
@media (max-width: 900px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-grid figure { position: sticky; top: 20px; }
@media (max-width: 900px) { .tpl-grid figure { position: static; } }
.downloads { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0 8px; }
.dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 16px 18px; border-top: 1px solid var(--line); background: var(--card); }
.dl:first-child { border-top: 0; }
.dl.top { background: var(--yellow); }
.dl h3 { margin: 0; font-size: 1.05rem; }
.dl p { margin: 2px 0 0; font-size: 0.92rem; color: var(--muted); }
.dl .btn { padding: 10px 16px; font-size: 0.95rem; white-space: nowrap; }
@media (max-width: 480px) { .dl { grid-template-columns: 1fr; } .dl .btn { justify-self: start; } }
/* Any-state notice and state picker above the download box; the California version is the box's last row. */
.any-state { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 24px 0 0; }
.any-state + .downloads { margin-top: 10px; }
.any-state > p { margin: 0; font-size: 0.95rem; }
.state-pick { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 10px; }
.state-pick label { font-size: 0.9rem; font-weight: 700; }
.state-pick select { font: inherit; font-size: 0.95rem; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--muted); background: var(--card); color: var(--ink); max-width: 100%; }
.st-sum { flex-basis: 100%; font-size: 0.9rem; }
.st-sum:empty { display: none; }
.st-sum p { margin: 6px 0 0; }
.st-sum .ca-tip { font-weight: 700; color: var(--accent); }
.dl.ca { grid-template-columns: 1fr; background: var(--paper); }
.ca-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ca-btns .btn { padding: 8px 14px; font-size: 0.92rem; }
.note { font-size: 0.9rem; color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 18px; height: 18px; border-radius: 4px; background: var(--yellow); border: 1.5px solid var(--yellow-line); }
.checks li::after { content: ""; position: absolute; left: 6px; top: calc(0.32em + 3px); width: 5px; height: 9px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
ol.steps { padding-left: 1.3em; margin: 0; }
ol.steps li { margin-bottom: 8px; padding-left: 4px; }
.table-wrap { overflow-x: auto; }
table.simple { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 480px; }
table.simple th, table.simple td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 640px) {
  table.simple.stack { min-width: 0; }
  table.simple.stack thead { position: absolute; left: -9999px; }
  table.simple.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.simple.stack td { display: block; border: 0; padding: 4px 12px; }
  table.simple.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--muted, #555); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; display: block; }
}
table.simple thead th { background: var(--dark); color: #fff; font-size: 0.85rem; }
.law { border-left: 4px solid var(--dark); padding: 4px 0 4px 18px; }
.law ul { margin: 8px 0 12px; padding-left: 1.1em; }
.law li { margin-bottom: 4px; }
.source { font-size: 0.85rem; color: var(--muted); }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 1.4rem; font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink); }

/* CTA band */
.cta { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 32px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; }
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { color: #D7E0DD; margin: 0; }
.cta .btn { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.cta .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }
@media (max-width: 700px) { .cta { grid-template-columns: 1fr; padding: 24px; } }

/* State rules */
.picker { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 20px 0 28px; }
.picker label { font-weight: 700; }
.picker select { font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--muted); background: var(--card); color: var(--ink); min-width: 240px; max-width: 100%; }
.state { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; margin-bottom: 10px; background: var(--card); scroll-margin-top: 12px; }
.state > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.state > summary::-webkit-details-marker { display: none; }
.state > summary h2 { font-size: 1.25rem; margin: 0; }
.state > summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--accent); }
.state[open] > summary::after { content: "–"; }
.state[open] { padding-bottom: 18px; }
.state dl { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px 20px; margin: 0; }
.state dt { font-weight: 700; font-size: 0.95rem; }
.state dd { margin: 0; }
.state dd ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 620px) { .state dl { grid-template-columns: 1fr; gap: 2px 0; } .state dd { margin-bottom: 10px; } }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; letter-spacing: 0.02em; }
.tag.partial { background: var(--yellow); color: #6B5600; }

/* Draft notes (visible on the private preview only; remove before launch) */
.draft { background: var(--yellow); border: 1px dashed #B39B2E; border-radius: 8px; padding: 12px 14px; font-size: 0.92rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--paper); margin-top: 24px; padding-block: 32px; font-size: 0.9rem; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 40px; }
@media (max-width: 700px) { .site-foot .wrap { grid-template-columns: 1fr; } }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--ink); }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* Narrow reading column for text-led sections */
.wrap.narrow { max-width: 820px; }
.source { font-size: 0.85rem; color: var(--muted); }
.lede + .lede { margin-top: -4px; }

/* The Kit, shown as an estimate in the templates' own style */
.estimate { border: 1px solid #9AA8A3; margin: 8px 0 14px; background: var(--card); }
.estimate-head { display: flex; justify-content: space-between; gap: 12px; background: var(--dark); color: #fff; padding: 8px 12px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em; }
.estimate-head span:last-child { font-weight: 400; letter-spacing: 0; }
.estimate table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.estimate th { background: #E6ECEA; font-size: 0.78rem; text-align: left; padding: 6px 10px; border-bottom: 1px solid #9AA8A3; }
.estimate td { padding: 10px; border-bottom: 1px solid #D3DCD8; vertical-align: top; }
.estimate td.ln { color: var(--muted); text-align: center; width: 44px; }
.estimate td:last-child, .estimate th:last-child { width: 84px; }
@media (max-width: 620px) {
  .estimate thead { display: none; }
  .estimate tr, .estimate td { display: block; width: auto !important; }
  .estimate tr { padding: 12px 12px 10px; border-bottom: 1px solid #D3DCD8; }
  .estimate td { border: 0; padding: 0; }
  .estimate td.ln { display: none; }
  .estimate td.work { font-size: 1rem; margin-bottom: 4px; }
  .estimate td.billed { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
  .estimate td.billed::before { content: "Billed: "; }
}
.estimate-total { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; margin: 0; padding: 10px 12px; font-variant-numeric: tabular-nums; justify-items: end; }
.estimate-total dt { color: var(--muted); }
.estimate-total dd { margin: 0; font-weight: 700; min-width: 90px; text-align: right; }

/* Change log */
.log { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.log li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.log .when { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; font-variant-numeric: tabular-nums; }

/* Research findings: big figure, plain sentence, source underneath */
.findings { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: 0 22px; margin: 6px 0 18px; border-top: 1px solid var(--line); }
.findings dt, .findings dd { padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.findings dt { font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif; font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.findings dd span { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 520px) { .findings { grid-template-columns: 1fr; } .findings dt { border-bottom: 0; padding-bottom: 0; } }

/* Word section on the invoice page: text beside the blank layout */
.word-section { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.word-section figure img { border: 1px solid var(--line); border-radius: 3px; }
@media (max-width: 700px) { .word-section { grid-template-columns: 1fr; } .word-section figure { max-width: 320px; } }

/* Two Kits side by side, each shown as a stacked estimate */
.kits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 900px) { .kits { grid-template-columns: minmax(0, 1fr); } }
.estimate.stacked table, .estimate.stacked tbody { display: block; width: 100%; }
.estimate-for { margin: 0; padding: 12px 12px 2px; color: var(--ink); font-weight: 700; font-size: 1rem; }
.estimate.stacked .estimate-head span:first-child { font-weight: 400; }
.estimate.stacked .estimate-head span:last-child { font-weight: 700; }
.estimate.stacked thead { display: none; }
.estimate.stacked tr, .estimate.stacked td { display: block; width: auto !important; }
.estimate.stacked tr { padding: 12px 12px 10px; border-bottom: 1px solid #D3DCD8; }
.estimate.stacked td { border: 0; padding: 0; }
.estimate.stacked td.ln { display: none; }
.estimate.stacked td.work { font-size: 1rem; margin-bottom: 4px; }
.estimate.stacked td.billed { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.estimate.stacked td.billed::before { content: "Billed: "; }
.estimate-note { margin: 0; padding: 0 12px 12px; font-size: 0.85rem; color: var(--muted); }
