/* QuoteRuler — estimate-sheet look: slate ink, spruce actions, tape-measure yellow for price bands */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/assets/fonts/archivo.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/assets/fonts/source-serif-4.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url(/assets/fonts/source-serif-4-italic.woff2) format("woff2"); }
:root {
  --paper: #fbfcfd;
  --panel: #f1f4f6;
  --ink: #1f2a37;
  --ink-soft: #4a5868;
  --rule: #d9e0e6;
  --spruce: #1e5b4f;
  --spruce-dark: #164539;
  --tape: #f2c230;
  --tape-soft: #fbedb7;
  --alert: #a63d2f;
  --ok: #2f7a4b;
  --radius-s: 4px;
  --radius-m: 8px;
  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141a21; --panel: #1c242d; --ink: #e8edf2; --ink-soft: #a9b5c1; --rule: #2e3944;
    --spruce: #6fc2ad; --spruce-dark: #94d6c4; --tape: #e0b52a; --tape-soft: #3d3418; --alert: #e58a7c; --ok: #7fc99a;
  }
}
:root[data-theme="dark"] {
  --paper: #141a21; --panel: #1c242d; --ink: #e8edf2; --ink-soft: #a9b5c1; --rule: #2e3944;
  --spruce: #6fc2ad; --spruce-dark: #94d6c4; --tape: #e0b52a; --tape-soft: #3d3418; --alert: #e58a7c; --ok: #7fc99a;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.125rem; line-height: 1.65;
  font-variant-numeric: lining-nums;
}
img { max-width: 100%; height: auto; }
a { color: var(--spruce); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--spruce-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

h1, h2, h3, h4, .brand, .num, button, label, .eyebrowless, table, .meta, .crumbs, .site-nav, .btn, input, select {
  font-family: var(--head);
}
h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; font-stretch: 112%; }
h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin: 0 0 1rem; }
h2 { font-size: 1.6rem; margin: 2.6rem 0 0.8rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 0.5rem; font-stretch: 100%; }
p, ul, ol { margin: 0 0 1.1rem; }
li { margin-bottom: 0.35rem; }
.num, table td, .price { font-variant-numeric: tabular-nums; }

/* layout */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; font-stretch: 118%; display: inline-flex; align-items: center; gap: .55rem; }
.brand svg { flex: none; }
.site-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .95rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

.crumbs { font-size: .85rem; color: var(--ink-soft); margin: 1.4rem 0 1rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs span[aria-hidden] { margin: 0 .35rem; }

.article-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) 300px; gap: 3rem; align-items: start; }
.article-body { min-width: 0; }
.aside { position: sticky; top: 1.2rem; font-family: var(--head); font-size: .92rem; }
.aside h2 { font-size: 1rem; margin: 0 0 .6rem; font-stretch: 100%; }
.toc ol { padding-left: 1.2rem; margin: 0; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--spruce); text-decoration: underline; }
@media (max-width: 980px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .aside { position: static; order: -1; }
  .toc { display: none; }
}

.meta { color: var(--ink-soft); font-size: .9rem; margin: -.2rem 0 1.6rem; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.lede { font-size: 1.22rem; }

/* summary panel */
.summary { border: 1px solid var(--rule); border-left: 6px solid var(--tape); background: var(--panel); padding: 1.1rem 1.25rem 1.2rem; margin: 1.4rem 0 2rem; border-radius: 0 var(--radius-m) var(--radius-m) 0; }
.summary dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem 1.5rem; margin: 0 0 .8rem; font-family: var(--head); }
.summary dt { font-size: .82rem; color: var(--ink-soft); }
.summary dd { margin: 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary p { margin: 0; font-size: .98rem; color: var(--ink-soft); }
@media (max-width: 560px) { .summary dl { grid-template-columns: 1fr 1fr; } }

/* the range ruler: the one memorable element */
.ruler { position: relative; height: 46px; margin: 1.6rem 0 .4rem; font-family: var(--head); }
.ruler-track { position: absolute; left: 0; right: 0; top: 18px; height: 10px; background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 10%); border-top: 2px solid var(--ink-soft); }
.ruler-band { position: absolute; top: 12px; height: 22px; background: var(--tape); border-radius: 2px; }
.ruler-est { position: absolute; top: 14px; height: 18px; background: repeating-linear-gradient(135deg, var(--spruce) 0 6px, var(--spruce-dark) 6px 12px); opacity: .85; border-radius: 2px; transition: left .35s ease, width .35s ease; }
.ruler-quote { position: absolute; top: 4px; width: 0; height: 38px; border-left: 3px solid var(--alert); transition: left .35s ease; }
.ruler-quote::after { content: attr(data-label); position: absolute; top: -1.35rem; left: -2rem; width: 4rem; text-align: center; font-size: .75rem; color: var(--alert); font-weight: 700; }
.ruler-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ruler-key { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-family: var(--head); font-size: .82rem; color: var(--ink-soft); margin-top: .5rem; }
.ruler-key i { display: inline-block; width: 14px; height: 10px; margin-right: .35rem; vertical-align: middle; border-radius: 2px; }
.key-band { background: var(--tape); }
.key-est { background: var(--spruce); }
.key-quote { background: var(--alert); width: 3px !important; }
@media (prefers-reduced-motion: reduce) { .ruler-est, .ruler-quote { transition: none; } }

/* calculator */
.calc { border: 2px solid var(--ink); border-radius: var(--radius-m); padding: 1.3rem 1.3rem 1.1rem; margin: 2rem 0 2.4rem; background: var(--paper); }
.calc h2 { margin-top: 0; font-size: 1.35rem; }
.calc-intro { font-size: 1rem; color: var(--ink-soft); }
.calc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; margin: 1rem 0 1.2rem; }
@media (max-width: 620px) { .calc-fields { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .3rem; }
.field select, .field input[type="number"] {
  width: 100%; font-size: 1rem; padding: .55rem .6rem; border: 1px solid var(--ink-soft); border-radius: var(--radius-s);
  background: var(--paper); color: var(--ink);
}
.field-check { display: flex; align-items: center; gap: .55rem; padding-top: 1.5rem; }
.field-check input { width: 1.15rem; height: 1.15rem; accent-color: var(--spruce); }
.field-check label { margin: 0; }
.unit { font-size: .8rem; color: var(--ink-soft); font-family: var(--head); }
.calc-result { border-top: 1px dashed var(--rule); padding-top: 1rem; font-family: var(--head); }
.calc-result .big { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; font-variant-numeric: tabular-nums; font-stretch: 112%; line-height: 1.1; }
.calc-result .sub { color: var(--ink-soft); font-size: .92rem; margin: .3rem 0 0; }
.quote-check { margin-top: 1.2rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: end; max-width: 30rem; }
.quote-verdict { font-family: var(--head); font-size: .98rem; margin: .7rem 0 0; min-height: 1.5em; }
.quote-verdict.high { color: var(--alert); font-weight: 600; }
.quote-verdict.low { color: var(--alert); font-weight: 600; }
.quote-verdict.fair { color: var(--ok); font-weight: 600; }
.btn { display: inline-block; font-size: .95rem; font-weight: 600; padding: .6rem 1rem; border: 0; border-radius: var(--radius-s); background: var(--spruce); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--spruce-dark); color: #fff; }
:root[data-theme="dark"] .btn, :root:not([data-theme="light"]) .btn { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #0f1a17; } }
.calc-note { font-size: .82rem; color: var(--ink-soft); margin: 1rem 0 0; font-family: var(--head); }

/* tables */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.6rem; border: 1px solid var(--rule); border-radius: var(--radius-m); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { background: var(--panel); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td:not(:first-child), th:not(:first-child) { white-space: nowrap; }
.state-table { max-height: 34rem; overflow-y: auto; }
.state-table th { position: sticky; top: 0; }
.state-table td.hi { color: var(--alert); }
.state-table td.lo { color: var(--ok); }

/* faq, sources */
.faq details { border-top: 1px solid var(--rule); padding: .8rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 1.05rem; }
.faq details p { margin: .6rem 0 0; }
.sources ol { font-size: .92rem; padding-left: 1.3rem; }
.sources li { margin-bottom: .55rem; }
.sources .used { color: var(--ink-soft); }
.method { font-size: .95rem; background: var(--panel); border-radius: var(--radius-m); padding: 1rem 1.2rem; margin: 2rem 0; }
.method p:last-child { margin: 0; }
.related ul { list-style: none; padding: 0; display: grid; gap: .5rem; }

/* home */
.hero { padding: 3.2rem 0 1.4rem; max-width: 46rem; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); font-stretch: 118%; }
.hero p { font-size: 1.2rem; color: var(--ink-soft); }
.guide-index { margin: 1.5rem 0 3rem; border-top: 2px solid var(--ink); }
.guide-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 9.5rem; gap: 1.2rem; align-items: center; padding: .95rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.guide-row:hover .g-title { color: var(--spruce); text-decoration: underline; }
.g-title { font-family: var(--head); font-weight: 700; font-size: 1.08rem; }
.g-cat { font-family: var(--head); font-size: .82rem; color: var(--ink-soft); display: block; font-weight: 400; }
.g-bar { position: relative; height: 12px; border-top: 2px solid var(--rule); }
.g-bar span { position: absolute; top: -7px; height: 12px; background: var(--tape); border-radius: 2px; }
.g-range { font-family: var(--head); font-variant-numeric: tabular-nums; text-align: right; font-size: .95rem; }
.scale-note { font-family: var(--head); font-size: .82rem; color: var(--ink-soft); display: flex; justify-content: space-between; margin-top: .4rem; }
@media (max-width: 720px) {
  .guide-row { grid-template-columns: minmax(0, 1fr) auto; }
  .g-bar { grid-column: 1 / -1; order: 3; }
}
.cat-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; font-family: var(--head); font-size: .92rem; }
.cat-list a { display: inline-block; border: 1px solid var(--rule); border-radius: 999px; padding: .3rem .8rem; color: var(--ink); text-decoration: none; }
.cat-list a:hover { border-color: var(--spruce); color: var(--spruce); }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 2.5rem 0 3.5rem; }
.how h3 { margin-top: 0; }
.how p { font-size: 1rem; color: var(--ink-soft); }
@media (max-width: 820px) { .how { grid-template-columns: 1fr; gap: .5rem; } }

.page-body { max-width: var(--measure); padding-bottom: 3rem; }

.site-foot { border-top: 1px solid var(--rule); margin-top: 3rem; padding: 2rem 0 2.5rem; font-family: var(--head); font-size: .88rem; color: var(--ink-soft); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: .8rem; }
.site-foot a { color: var(--ink-soft); }
.theme-toggle { background: none; border: 1px solid var(--rule); color: var(--ink-soft); border-radius: var(--radius-s); padding: .25rem .6rem; font-size: .82rem; cursor: pointer; }

/* reserved ad slots (empty until AdSense approval) */
.ad-slot:empty { display: none; }
@media (max-width: 620px) { .field-check { padding-top: .2rem; } }
.ruler-quote.edge-r::after { left: auto; right: .2rem; text-align: right; }
.ruler-quote.edge-l::after { left: .2rem; text-align: left; }
.article-body, .sources li { overflow-wrap: anywhere; }
.byline { align-items: center; }
.byline-author { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.byline-author:hover { color: var(--spruce); text-decoration: underline; }
.byline-author img { border-radius: 50%; width: 32px; height: 32px; object-fit: cover; }
.author-page { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-bottom: 2rem; }
.author-photo { width: 240px; height: 240px; object-fit: cover; border-radius: var(--radius-m); border: 1px solid var(--rule); }
@media (max-width: 720px) { .author-page { grid-template-columns: 1fr; gap: 1rem; } .author-photo { width: 160px; height: 160px; } }
.site-foot .foot-cats { padding-bottom: .8rem; margin-bottom: .8rem; border-bottom: 1px solid var(--rule); }
