/* Indoor Project Planner — design system
   Concept: an interior designer's material schedule. Warm, precise, quiet.
   One typeface (Archivo, variable width + weight), self-hosted. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  /* colour */
  --plaster: #F6F4F0;      /* page */
  --paper: #FFFFFF;        /* surfaces */
  --charcoal: #26231F;     /* text */
  --ink-2: #4A453F;        /* secondary text */
  --muted: #645E56;        /* tertiary text, 5.9:1 on plaster */
  --line: #E4DFD7;
  --line-strong: #CFC7BB;
  --field: #867E72;        /* form control borders, 3.9:1 on white */
  --walnut: #7B4A2B;       /* accent, 7.9:1 on white */
  --walnut-dark: #5E3720;
  --walnut-tint: #F3EAE1;
  --oak: #C8955E;
  --sage: #4F6B59;         /* "best option", 5.9:1 on white */
  --sage-tint: #E6EEE8;
  --focus: #7B4A2B;

  /* type */
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.45rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.375rem, 1.6rem + 3vw, 3.75rem);

  /* space */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --gutter: clamp(20px, 4vw, 40px);
  --max: 1200px;

  /* shape */
  --r-sm: 8px;    /* controls */
  --r-md: 12px;   /* cards, panels */
  --r-lg: 18px;   /* the plan sheet */
  --shadow-sheet: 0 1px 2px rgba(38, 35, 31, .06), 0 18px 40px -18px rgba(70, 45, 25, .28);
  --shadow-hover: 0 1px 2px rgba(38, 35, 31, .05), 0 10px 24px -14px rgba(70, 45, 25, .30);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--plaster); color: var(--charcoal);
  font: 400 var(--step-0)/1.6 var(--font); font-stretch: 100%;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--walnut); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--walnut-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; font-stretch: 112%; font-weight: 640; letter-spacing: -0.015em; line-height: 1.12; margin: 0 0 var(--s4); color: var(--charcoal); }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.005em; }
p { margin: 0 0 var(--s4); text-wrap: pretty; }
small { font-size: var(--step--1); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--paper); padding: var(--s2) var(--s4); border-radius: var(--r-sm); }
.skip:focus { left: var(--s4); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 10px 18px; border: 1px solid var(--walnut); border-radius: var(--r-sm);
  background: var(--walnut); color: #fff; font: 600 0.9375rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--walnut-dark); border-color: var(--walnut-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: var(--paper); color: var(--charcoal); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--charcoal); color: var(--charcoal); background: var(--paper); }
.btn.small { min-height: 38px; padding: 7px 12px; font-size: var(--step--1); font-weight: 560; }
.btn-lg { min-height: 52px; padding: 13px 24px; font-size: 1rem; }
.btn.on-dark { background: var(--plaster); color: var(--charcoal); border-color: var(--plaster); }
.btn.on-dark:hover { background: #fff; border-color: #fff; color: var(--charcoal); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--walnut); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--walnut-dark); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(246, 244, 240, .94); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(246, 244, 240, .86); backdrop-filter: blur(8px); } }
.header-row { display: flex; align-items: center; gap: var(--s5); min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--charcoal); text-decoration: none; font-weight: 660; font-stretch: 110%; font-size: 1.0625rem; letter-spacing: -0.01em; white-space: nowrap; }
.logo:hover { color: var(--charcoal); text-decoration: none; }
.logo-mark { flex: none; color: var(--walnut); }
.nav { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
.nav a { position: relative; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; background: var(--walnut); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.nav a:hover { color: var(--charcoal); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--charcoal); font-weight: 600; }
.menu-btn { display: none; }

@media (max-width: 959px) {
  .menu-btn {
    display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-height: 44px; padding: 8px 12px;
    background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    font: 600 0.9375rem/1 var(--font); color: var(--charcoal); cursor: pointer;
  }
  .menu-btn svg { flex: none; width: 20px; height: 20px; }
  .js .nav { display: none; }
  .js .nav.open { display: flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s2) var(--gutter) var(--s4); background: var(--plaster); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px -20px rgba(38, 35, 31, .35);
  }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1rem; }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { color: var(--walnut); }
  html:not(.js) .site-header { position: static; }
  html:not(.js) .nav { position: static; padding: 0 0 var(--s3); box-shadow: none; border: 0; }
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .header-row { flex-wrap: wrap; }
}

/* ---------- home hero ---------- */
.home-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 104px); border-bottom: 1px solid var(--line); }
.home-hero-grid { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 1000px) { .home-hero-grid { grid-template-columns: minmax(0, 4.4fr) minmax(0, 6.6fr); gap: var(--s7); } }
.home-hero h1 { font-size: clamp(2.25rem, 1.45rem + 2.5vw, 3.15rem); max-width: 15ch; text-wrap: balance; margin-bottom: var(--s5); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 36ch; margin-bottom: var(--s6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s6); }
.assurances { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); color: var(--ink-2); font-size: 0.9375rem; }
.assurances li { display: inline-flex; align-items: center; gap: 8px; }
.assurances svg { color: var(--sage); flex: none; }

/* the plan sheet: the one bold element */
.plan-sheet { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sheet); overflow: hidden; }
.sheet-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: var(--s3); padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid var(--line); }
.sheet-head .tag { grid-row: 1 / span 2; align-self: center; }
.sheet-head h2 { font-size: var(--step-1); margin: 0; }
.sheet-head p { margin: 0; font-size: var(--step--1); color: var(--muted); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--walnut-tint); color: var(--walnut-dark); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.sheet-body { display: grid; gap: var(--s5); padding: var(--s5); align-items: center; }
@media (min-width: 640px) { .sheet-body { grid-template-columns: 168px minmax(0, 1fr); } }
.floor-plan { display: block; width: 100%; max-width: 220px; margin: 0 auto; font-family: var(--font); }
.schedule { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.schedule thead th { text-align: left; font-size: 0.8125rem; font-weight: 500; color: var(--muted); padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.schedule thead th:not(:first-child), .schedule td { text-align: right; white-space: nowrap; }
.schedule tbody th, .schedule td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.schedule tbody th { text-align: left; font-weight: 600; }
.mat-cell { display: flex; align-items: center; gap: 12px; }
.schedule td { padding-left: 12px; font-variant-numeric: tabular-nums; }
.mat small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8125rem; line-height: 1.35; }
.schedule tfoot th, .schedule tfoot td { padding: 14px 0 0; text-align: left; font-weight: 640; font-stretch: 108%; font-size: 1.0625rem; }
.schedule tfoot td { text-align: right; font-variant-numeric: tabular-nums; border-bottom: 0; }
.swatch { flex: none; width: 34px; height: 34px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(38, 35, 31, .12); }
.swatch--oak { background: linear-gradient(90deg, transparent 0 56%, #B98450 56% 59%, transparent 59%) 0 0 / 100% 50%, linear-gradient(90deg, transparent 0 24%, #B98450 24% 27%, transparent 27%) 0 100% / 100% 50%, repeating-linear-gradient(0deg, #D9AE7E 0 16px, #BE8A55 16px 17px); background-repeat: no-repeat, no-repeat, repeat; }
.swatch--sage { background: #7FA08B; }
.swatch--trim { background: linear-gradient(180deg, #fff 0 30%, #EDE7DE 30% 38%, #fff 38% 70%, #E2DACE 70% 76%, #fff 76%); }
.sheet-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 var(--s5); padding: var(--s3) var(--s4); background: var(--sage-tint); color: #2E4537; border-radius: var(--r-sm); font-size: 0.9375rem; line-height: 1.45; }
.sheet-note svg { flex: none; color: var(--sage); margin-top: 1px; }
@media (max-width: 559px) {
  .sheet-head { grid-template-columns: 1fr; row-gap: 8px; }
  .sheet-head .tag { grid-row: auto; justify-self: start; }
  .schedule, .schedule tbody, .schedule tfoot { display: block; width: 100%; }
  .schedule tfoot tr { display: flex; justify-content: space-between; align-items: baseline; }
  .schedule thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .schedule tbody tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .schedule tbody th { grid-column: 1 / -1; padding: 0 0 6px; border: 0; }
  .schedule tbody td { padding: 0 0 0 46px; border: 0; text-align: left; color: var(--ink-2); }
  .schedule tbody td:last-child { text-align: right; padding: 0; color: var(--charcoal); font-weight: 600; }
}
.plan-sheet figcaption { padding: var(--s4) var(--s5) var(--s5); font-size: 0.8125rem; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--plain { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s6); margin-bottom: var(--s6); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); }

/* ---------- planner cards ---------- */
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.tool-card {
  position: relative; display: flex; flex-direction: column; min-height: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tool-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.tool-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: var(--s4); border-radius: 10px; background: var(--walnut-tint); color: var(--walnut); }
.tool-card-title { font-size: 1.1875rem; margin-bottom: var(--s2); }
.card-link { color: var(--charcoal); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); }
.card-link:hover { color: var(--charcoal); text-decoration: none; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.tool-card p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; margin-bottom: var(--s5); }
.card-cta { margin-top: auto; font-weight: 600; font-size: 0.9375rem; color: var(--walnut); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .15s ease; }
.tool-card:hover .card-cta { text-decoration-color: currentColor; }
.tool-card-art { display: block; width: 100%; height: auto; border-radius: 10px; margin-bottom: var(--s5); }
.tool-card--featured .tool-icon { display: none; }
.tool-card--featured .tool-card-title { font-size: var(--step-2); }
.tool-card--featured p { font-size: var(--step-0); max-width: 34ch; }

@media (min-width: 640px) {
  .tool-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid--home .tool-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s6); align-items: center; }
  .tool-grid--home .tool-card--featured .tool-card-art { grid-row: 1 / span 4; margin: 0; }
  .tool-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .tool-grid--home { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .tool-grid--home .tool-card--featured { grid-column: 1; grid-row: 1 / span 2; display: flex; align-items: stretch; }
  .tool-grid--home .tool-card--featured .tool-card-art { margin-bottom: var(--s5); }
  .tool-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- steps ---------- */
.steps { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s6); counter-reset: none; }
.steps li { position: relative; }
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: var(--s4);
  border: 1.5px solid var(--walnut); border-radius: 50%; background: var(--plaster);
  color: var(--walnut); font-weight: 650; font-stretch: 110%; font-size: 1.125rem; position: relative; z-index: 1;
}
.steps h3 { margin-bottom: var(--s2); }
.steps p { color: var(--ink-2); max-width: 34ch; margin: 0; }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); }
  /* a dimension line linking the steps */
  .steps li:not(:last-child)::before {
    content: ""; position: absolute; top: 22px; left: 56px; right: calc(-1 * var(--s6) + 12px); height: 0;
    border-top: 1px dashed var(--line-strong);
  }
}

/* ---------- why compare (dark band) ---------- */
.why { background: var(--charcoal); color: #ECE7E0; padding: clamp(56px, 8vw, 104px) 0; margin-bottom: clamp(56px, 8vw, 104px); }
.why h2 { color: #fff; }
.why-grid { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 1000px) { .why-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s8); } }
.why-copy p { color: #D6CFC5; max-width: 46ch; }
.why-copy .btn { margin-top: var(--s3); }
.why-example { margin: 0; background: #322E29; border: 1px solid #45403A; border-radius: var(--r-lg); padding: var(--s5); }
.why-example figcaption { margin-bottom: var(--s4); }
.why-example figcaption strong { display: block; color: #fff; font-weight: 620; font-stretch: 108%; font-size: var(--step-1); line-height: 1.3; }
.why-example figcaption span { color: #C9C1B6; font-size: 0.9375rem; }
.why-example table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.why-example thead th { text-align: right; font-weight: 500; font-size: 0.8125rem; color: #B9B0A4; padding: 0 0 8px 12px; border-bottom: 1px solid #4A443D; }
.why-example thead th:first-child { text-align: left; padding-left: 0; }
.why-example tbody th, .why-example td { padding: 14px 0 14px 12px; border-bottom: 1px solid #4A443D; vertical-align: middle; }
.why-example tbody th { text-align: left; padding-left: 0; font-weight: 640; color: #fff; font-size: 1.0625rem; }
.why-example tbody th small { display: block; font-weight: 400; font-size: 0.8125rem; color: #B9B0A4; }
.why-example td { text-align: right; color: #ECE7E0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.why-example td:last-child { font-weight: 600; color: #fff; }
.unused { display: block; height: 6px; width: var(--w); min-width: 6px; margin: 0 0 6px auto; max-width: 96px; border-radius: 3px; background: var(--oak); }
.why-example > p { margin: var(--s4) 0 0; color: #D6CFC5; font-size: 0.9375rem; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s8); align-items: start; } }
.faq-grid > h2 { margin: 0; }
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: 18px 2px; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--walnut); }
.faq-sign { position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); }
.faq-sign::before, .faq-sign::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; margin: -0.8px 0 0 -5.5px; background: currentColor; transition: transform .2s ease; }
.faq-sign::after { transform: rotate(90deg); }
.faq details[open] .faq-sign::after { transform: rotate(0deg); }
.faq details[open] summary { color: var(--walnut); }
.faq-body p { margin: 0 0 18px; padding-right: 44px; color: var(--ink-2); max-width: 62ch; }
.page .faq { margin-top: var(--s4); }

/* ---------- inner pages ---------- */
.page { padding-top: var(--s6); padding-bottom: var(--s8); }
.hero { padding: var(--s6) 0 var(--s6); }
.page .hero h1 { font-size: var(--step-3); max-width: 22ch; margin-bottom: var(--s3); }
.hero p { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 58ch; margin: 0; }
.badge { display: inline-block; margin-top: var(--s4); font-size: var(--step--1); color: var(--muted); }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); align-items: center; }
.hero-img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: var(--r-lg); }
@media (min-width: 900px) { .hero-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .hero-img { justify-self: end; } }
@media (max-width: 899px) { body:not([data-tool=""]) .hero-img { display: none; } }

.prose:not(.wrap) { max-width: 740px; }
.wrap.prose > * { max-width: 740px; }
.prose h2 { font-size: var(--step-2); margin-top: var(--s7); }
.prose h3 { margin-top: var(--s5); }
.prose li { margin-bottom: 6px; }
.prose code { background: var(--walnut-tint); color: var(--walnut-dark); padding: 2px 6px; border-radius: 5px; font-size: .9em; font-family: inherit; font-weight: 600; }
.page > .prose, .page.prose:not(.wrap) { max-width: 740px; }
.wrap.prose > * { max-width: 740px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; margin: var(--s4) 0; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); min-width: 120px; }
.legal thead th { font-size: 0.8125rem; color: var(--muted); font-weight: 600; }
.legal dl { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: 6px 16px; }
.legal dt { font-weight: 600; } .legal dd { margin: 0; }
.related { margin-top: var(--s8); padding-top: var(--s7); border-top: 1px solid var(--line); }
.related h2 { font-size: var(--step-2); }
.page-404 .tool-grid { margin-top: var(--s6); }

/* ---------- planner (tool pages) ---------- */
.tool-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin: 0 0 var(--s4); }
.tool-bar p { margin: 0; font-size: var(--step--1); color: var(--muted); }
.units { display: inline-flex; padding: 3px; background: var(--paper); border: 1px solid var(--field); border-radius: 999px; }
.units button { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; font: 500 0.875rem/1 var(--font); color: var(--ink-2); cursor: pointer; }
.units button:hover { color: var(--charcoal); }
.units button[aria-pressed="true"] { background: var(--charcoal); color: #fff; }
.tool { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.tool > * { min-width: 0; }
@media (min-width: 960px) { .tool { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: start; } .results { position: sticky; top: 88px; } }
.inputs { display: grid; gap: var(--s4); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); }
.panel > h2 { display: flex; align-items: center; gap: var(--s3); font-size: 1.1875rem; margin-bottom: var(--s3); }
.panel--results { box-shadow: var(--shadow-sheet); border-radius: var(--r-lg); }
.step { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--walnut); color: var(--walnut); font-size: 0.875rem; font-weight: 650; font-stretch: 105%; }
.hint { font-size: 0.9375rem; color: var(--muted); margin: 0 0 var(--s3); line-height: 1.5; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: var(--s3); align-items: end; padding: var(--s4) 0; border-top: 1px solid var(--line); }
.panel > .hint + div > .row:first-child, .panel > h2 + div > .row:first-child, .panel > h2 + .row, .panel > .hint + .row { border-top: 0; padding-top: var(--s2); }
label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; line-height: 1.3; }
input[type=text], input[type=number], select {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--field); border-radius: var(--r-sm);
  background: #fff; color: var(--charcoal); font: 400 1rem/1.2 var(--font); font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover { border-color: var(--charcoal); }
input:focus, select:focus { outline: none; border-color: var(--walnut); box-shadow: 0 0 0 3px rgba(123, 74, 43, .18); }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2326231F' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.row .check { grid-column: span 2; }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--walnut); }
.check label { margin: 0; color: var(--charcoal); font-size: 0.9375rem; }
.remove { min-height: 44px; padding: 8px 12px; background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--muted); font: 500 0.875rem/1 var(--font); cursor: pointer; }
.remove:hover { border-color: #B44A3A; color: #9B3B2D; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s3); }

/* results */
.results h2 { font-size: 1.375rem; margin-bottom: var(--s4); }
.total { margin: 0 0 var(--s4); color: var(--ink-2); font-size: 0.9375rem; }
.total strong { display: block; color: var(--charcoal); font-size: var(--step-2); font-weight: 650; font-stretch: 110%; letter-spacing: -0.015em; line-height: 1.2; }
.table-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--s1)); padding: 0 var(--s1); }
.results table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.results th, .results td { text-align: right; padding: 10px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.results th:first-child, .results td:first-child { text-align: left; padding-left: 0; }
.results th:last-child, .results td:last-child { padding-right: 0; }
.results thead th { font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.results tr.best td { background: var(--sage-tint); }
.results tr.best td:first-child { box-shadow: inset 3px 0 0 var(--sage); padding-left: 10px; }
.results .tag { display: table; margin: 4px 0 0; background: var(--sage); color: #fff; font-size: 0.75rem; padding: 2px 8px; }
.results td:first-child { white-space: normal; min-width: 92px; }
.table-scroll { container-type: inline-size; }
@container (max-width: 440px) {
  .stack-narrow, .stack-narrow tbody { display: block; width: 100%; }
  .stack-narrow thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-narrow tr { display: block; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); }
  .stack-narrow td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .stack-narrow td::before { content: attr(data-label); color: var(--muted); font-size: 0.8125rem; text-align: left; }
  .stack-narrow td:first-child { display: block; padding: 0 0 6px; font-weight: 600; }
  .stack-narrow td:first-child::before { content: none; }
  .results .stack-narrow tr.best td { background: none; }
  .results .stack-narrow tr.best { background: var(--sage-tint); border-color: #C9D8CE; box-shadow: inset 3px 0 0 var(--sage); }
  .results .stack-narrow tr.best td:first-child { box-shadow: none; padding-left: 0; }
}
.verdict { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); background: var(--sage-tint); color: #2E4537; border-radius: var(--r-sm); font-size: 0.9375rem; line-height: 1.5; }
.empty { margin: 0; padding: var(--s5); text-align: center; color: var(--muted); background: var(--plaster); border: 1px dashed var(--line-strong); border-radius: var(--r-sm); font-size: 0.9375rem; }
.shopping { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
.shopping h3 { font-size: 1.0625rem; margin-bottom: var(--s3); }
.shopping ul { margin: 0 0 var(--s2); padding: 0; list-style: none; }
.shopping li { position: relative; padding: 6px 0 6px 26px; line-height: 1.45; }
.shopping li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 14px; height: 14px; border: 1.5px solid var(--line-strong); border-radius: 4px; }
.assumptions { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); }
.assumptions h3 { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); margin-bottom: var(--s2); font-stretch: 100%; letter-spacing: 0; }
.assumptions ul { padding-left: 18px; margin: 0 0 var(--s2); }
.assumptions li { margin-bottom: 4px; }
.ad-slot { margin: var(--s6) 0; }
.print-only { display: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding-top: var(--s7); font-size: 0.9375rem; color: var(--ink-2); }
.footer-grid { display: grid; gap: var(--s6); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { max-width: 40ch; margin: var(--s3) 0 0; color: var(--muted); font-size: var(--step--1); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: auto; } }
.site-footer h2 { font-size: 0.875rem; font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--charcoal); margin: 0 0 var(--s3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a, .site-footer .link-btn { color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; }
.site-footer a:hover, .site-footer .link-btn:hover { color: var(--walnut); text-decoration: underline; }
.footer-base { margin-top: var(--s6); padding-top: var(--s4); padding-bottom: var(--s5); border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); }
.footer-base p { margin: 0; }

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .inputs, .actions, .ad-slot, .no-print, .tool-bar, .badge, .hero-img { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .tool { display: block; }
  .panel, .panel--results { border: 0; padding: 0; box-shadow: none; }
  .print-only { display: block; }
  body:not([data-tool=""]) .prose, body:not([data-tool=""]) .related,
  body:not([data-tool=""]) .hero p, body:not([data-tool=""]) .assumptions a { display: none !important; }
}
