:root {
  --ink: #25302b;
  --muted: #64716a;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --soft: #f0f3ed;
  --line: #d9dfda;
  --moss: #42624f;
  --moss-dark: #304a3b;
  --moss-pale: #dfe9e1;
  --clay: #ad6b4f;
  --gold: #b58a3a;
  --danger: #9b3f3f;
  --shadow: 0 24px 60px rgba(37, 48, 43, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
button, input, select { font: inherit; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.container { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.narrow { width: min(960px, calc(100% - 36px)); }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 10px 14px; color: #fff; background: var(--moss-dark); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(217,223,218,.85); background: rgba(251,250,246,.92); backdrop-filter: blur(16px); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 36px; color: var(--moss); }
.brand-mark circle, .brand-mark path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { text-decoration: none; color: var(--muted); font-size: .94rem; }
.site-header nav a:hover { color: var(--ink); }

.hero { padding: 84px 0 74px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 76px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .step-kicker { margin: 0 0 12px; color: var(--moss); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.035em; }
h1 { max-width: 680px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 6vw, 5.2rem); font-weight: 500; }
h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 500; }
h3 { font-size: 1.35rem; }
.hero-lead { max-width: 610px; margin: 24px 0 30px; color: var(--muted); font-size: 1.16rem; }
.microcopy { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; padding: 10px 20px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(66,98,79,.28); outline-offset: 3px; }
.button-primary { color: #fff; background: var(--moss); }
.button-primary:hover { background: var(--moss-dark); }
.button-secondary { color: var(--moss-dark); border-color: var(--line); background: var(--surface); }
.button-quiet { color: var(--ink); background: transparent; border-color: var(--line); }
.hero-visual { position: relative; min-height: 390px; display: grid; place-content: center; gap: 22px; }
.hero-visual::before { content: ""; position: absolute; inset: 5% 2%; border-radius: 46% 54% 59% 41% / 44% 42% 58% 56%; background: var(--moss-pale); transform: rotate(-7deg); }
.yarn-card { position: relative; width: min(380px, 88%); display: flex; align-items: center; gap: 18px; padding: 18px 22px; border: 1px solid rgba(217,223,218,.8); border-radius: var(--radius); background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.yarn-card:last-of-type { margin-left: auto; }
.yarn-card span:last-child { display: grid; }
.yarn-card small { color: var(--muted); }
.yarn-ball { width: 74px; height: 66px; flex: 0 0 auto; border-radius: 48%; background: repeating-linear-gradient(16deg, transparent 0 7px, rgba(255,255,255,.4) 8px 10px), var(--clay); transform: rotate(-6deg); box-shadow: inset -10px -8px 20px rgba(37,48,43,.15); }
.yarn-ball-substitute { background: repeating-linear-gradient(-18deg, transparent 0 7px, rgba(255,255,255,.4) 8px 10px), var(--moss); transform: rotate(6deg); }
.match-arrow { position: relative; width: 84px; margin-inline: auto; color: var(--moss); }
.match-arrow path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.calculator-section { scroll-margin-top: 84px; padding: 90px 0; background: var(--soft); }
.section-heading { max-width: 720px; margin: 0 auto 38px; text-align: center; }
.section-heading > p:last-child { color: var(--muted); }
.calculator-shell { max-width: 940px; margin: auto; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.progress { margin: 0; padding: 0 42px; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.progress-step { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 76px; color: var(--muted); font-size: .88rem; }
.progress-step::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; }
.progress-step span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: .75rem; }
.progress-step.is-current, .progress-step.is-done { color: var(--ink); font-weight: 750; }
.progress-step.is-current::after, .progress-step.is-done::after { background: var(--moss); }
.progress-step.is-current span, .progress-step.is-done span { color: #fff; border-color: var(--moss); background: var(--moss); }
.form-step, .result { padding: 42px; }
.step-heading { margin-bottom: 30px; }
.step-heading h3 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 500; }
.step-heading p { margin: 10px 0 0; color: var(--muted); }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 22px; }
.field { min-width: 0; display: grid; align-content: start; gap: 8px; margin: 0; border: 0; padding: 0; font-size: .92rem; font-weight: 750; }
.field.full-width { margin-bottom: 22px; }
.field small { color: var(--muted); font-weight: 450; }
.label-note { display: inline; margin-left: 5px; font-size: .75rem; }
.field-label { font-weight: 750; }
input:not([type="radio"]):not([type="range"]), select { width: 100%; min-width: 0; height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 0 13px; color: var(--ink); background: var(--surface); }
input::placeholder { color: #98a19c; }
input[type="range"] { width: 100%; accent-color: var(--moss); }
.unit-field { display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 8px; }
.range-field { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; color: var(--muted); font-weight: 450; }
.choice-grid { display: grid; gap: 10px; }
.choice-grid.two { grid-template-columns: repeat(2, 1fr); }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; min-height: 54px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 650; }
.choice:has(input:checked) { border-color: var(--moss); background: var(--moss-pale); }
.choice input { accent-color: var(--moss); }
.form-error { margin-top: 8px; border-left: 4px solid var(--danger); padding: 10px 12px; color: var(--danger); background: #fff6f5; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.privacy-note { color: var(--muted); font-size: .82rem; }

.result-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.quantity-card, .status-card { border-radius: var(--radius); padding: 28px; display: grid; align-content: center; gap: 8px; }
.quantity-card { min-height: 190px; color: #fff; background: var(--moss); }
.quantity-card strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 7vw, 4.2rem); font-weight: 500; line-height: 1; }
.status-card { border: 1px solid var(--line); }
.status-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--moss-pale); font-weight: 850; }
.status-card[data-status="possible"] .status-icon { background: #f3e8c9; }
.status-card[data-status="risky"] .status-icon { color: var(--danger); background: #f4dcdc; }
.result-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 26px 0 0; }
.result-metrics div { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.result-metrics dt { color: var(--muted); font-size: .78rem; }
.result-metrics dd { margin: 3px 0 0; font-weight: 800; font-size: 1.1rem; }
.signals { margin-top: 20px; border-top: 1px solid var(--line); }
.signal { display: grid; grid-template-columns: .7fr .75fr 1.4fr; gap: 22px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }
.signal small { color: var(--muted); }
.swatch-callout { display: flex; align-items: center; gap: 18px; margin-top: 22px; border-radius: 14px; padding: 18px; background: var(--soft); }
.swatch-callout svg { width: 54px; flex: 0 0 auto; }
.swatch-callout path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.swatch-callout p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.result-actions > span { display: flex; gap: 10px; }
.copy-feedback { margin: 12px 0 0; color: var(--moss); text-align: right; }

.content-section, .gauge-section { padding: 94px 0; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.info-grid article { border-top: 1px solid var(--line); padding-top: 20px; }
.info-grid article > span { color: var(--clay); font-weight: 800; }
.info-grid h3 { margin-top: 18px; }
.info-grid p { color: var(--muted); }
.text-link { color: var(--moss); font-weight: 750; text-underline-offset: 3px; }
.gauge-section { background: var(--moss-dark); color: #fff; }
.gauge-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; }
.gauge-grid p { color: rgba(255,255,255,.72); }
.gauge-grid .eyebrow { color: #bcd0c2; }
.gauge-photo { width: min(100%, 380px); height: 270px; justify-self: end; object-fit: cover; object-position: 70% center; border-radius: var(--radius); box-shadow: var(--shadow); }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: 20px 0; }
summary { cursor: pointer; font-weight: 800; }
details p { max-width: 760px; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: .85rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

.legal-main { padding: 70px 0 100px; }
.legal-article { width: min(780px, 100%); margin-inline: auto; }
.guide-article { width: min(880px, 100%); }
.legal-article h1 { margin-bottom: 12px; font-size: clamp(2.4rem, 6vw, 4rem); }
.legal-article h2 { margin: 42px 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 500; }
.legal-article h3 { margin: 28px 0 10px; }
.legal-article p, .legal-article li { color: var(--muted); }
.legal-article a { color: var(--moss); }
.legal-meta { margin: 0 0 42px; color: var(--muted); }
.legal-placeholder { display: inline-block; border-radius: 5px; padding: 1px 5px; color: var(--danger); background: #fff1ef; font-weight: 750; }
.legal-contact { border-left: 4px solid var(--moss); padding: 10px 16px; background: var(--soft); }
.legal-article table { width: 100%; margin: 24px 0 34px; border-collapse: collapse; font-size: .92rem; }
.legal-article th, .legal-article td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
.legal-article th { color: var(--ink); background: var(--soft); }
.guide-callout { margin: 30px 0; border-radius: 14px; padding: 20px 22px; background: var(--moss-pale); }
.guide-callout p:last-child { margin-bottom: 0; }
.guide-cta { margin: 42px 0 10px; border-radius: var(--radius); padding: 28px; color: #fff; background: var(--moss); }
.guide-cta h2, .guide-cta p { color: #fff; }
.guide-cta .button { color: var(--moss-dark); background: #fff; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 30px 0; }
.guide-grid > p { display: contents; }
.guide-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; text-decoration: none; }
.guide-card:hover { border-color: var(--moss); background: var(--soft); }
.guide-card strong { display: block; color: var(--ink); }
.guide-card span { color: var(--muted); font-size: .88rem; }
.related-guides { margin-top: 56px; border-top: 1px solid var(--line); padding-top: 34px; }
.related-guides h2 { margin-bottom: 22px; font-size: clamp(1.7rem, 3vw, 2.25rem); }
.related-guides-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.related-guide { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 20px; text-decoration: none; }
.related-guide:hover { border-color: var(--moss); background: var(--soft); }
.related-guide strong { color: var(--ink); }
.related-guide span { color: var(--muted); font-size: .9rem; }

[hidden] { display: none !important; }
@media (max-width: 800px) {
  .site-header nav { display: none; }
  .hero { padding-top: 58px; }
  .hero-grid, .gauge-grid { grid-template-columns: 1fr; gap: 46px; }
  .hero-visual { min-height: 330px; }
  .progress { padding-inline: 18px; }
  .progress-step { font-size: 0; }
  .progress-step span { font-size: .75rem; }
  .form-step, .result { padding: 28px 22px; }
  .result-hero, .info-grid { grid-template-columns: 1fr; }
  .signal { grid-template-columns: 1fr; gap: 3px; }
  .gauge-photo { width: min(100%, 420px); height: 240px; justify-self: center; }
}
@media (min-width: 801px) {
  .how-it-works-heading { max-width: 900px; }
  .how-it-works-heading h2 { white-space: nowrap; }
}
@media (max-width: 560px) {
  .fields-grid, .choice-grid.two, .choice-grid.three, .result-metrics { grid-template-columns: 1fr; }
  .form-actions, .result-actions, .site-footer .container { align-items: stretch; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .guide-grid, .related-guides-grid { grid-template-columns: 1fr; }
  .form-actions .button { width: 100%; }
  .result-actions > span { display: grid; }
  .privacy-note { text-align: center; }
  .unit-field { grid-template-columns: 1fr 112px; }
  .hero-visual { min-height: 300px; }
  .yarn-ball { width: 58px; height: 52px; }
}
@media print {
  .site-header, .hero, .progress, .form-actions, .content-section, .gauge-section, .site-footer, .section-heading { display: none !important; }
  .calculator-section { padding: 0; background: #fff; }
  .calculator-shell { border: 0; box-shadow: none; }
  .result { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
