:root {
  --paper: #fbfaf6;
  --paper-2: #f5efe3;
  --ink: #171a1a;
  --muted: #65706f;
  --line: #d9d2c5;
  --line-strong: #bdb4a5;
  --teal: #0f6f6c;
  --teal-dark: #084d4b;
  --teal-soft: #e5f3f2;
  --kraft: #c99355;
  --kraft-soft: #f2dfc4;
  --alert: #e95d2a;
  --white: #fffdfa;
  --shadow: 0 14px 40px rgba(40, 31, 18, 0.08);
  --radius: 8px;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "IBM Plex Serif", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(15, 111, 108, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 111, 108, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 86% 8%, rgba(201, 147, 85, 0.13), transparent 28%),
    var(--paper);
  background-size: 36px 36px, 36px 36px, auto, auto;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
label,
summary {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  min-height: 76px;
  padding: 0 clamp(20px, 6vw, 92px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 39px;
  height: 39px;
  color: var(--teal);
  flex: 0 0 auto;
}

.brand span {
  font-size: clamp(20px, 2vw, 29px);
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 76px;
  padding: 0 18px;
  color: #222827;
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 4px;
  background: transparent;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--teal);
}

.site-nav a.is-active::after {
  background: var(--teal);
}

main {
  width: min(1350px, calc(100% - 40px));
  margin: 0 auto;
}

.tool-shell {
  padding: 28px 0 18px;
}

.tool-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.tool-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 3px solid var(--teal);
  border-radius: 6px;
  color: var(--teal);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.tool-heading h1 {
  margin-bottom: 2px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(34px, 4vw, 45px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: 0;
}

.article-hero h1,
.blog-detail h1 {
  margin-bottom: 10px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(34px, 3.35vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
}

.tool-heading p,
.article-hero p,
.article-dek {
  max-width: 780px;
  margin-bottom: 0;
  color: #3e4846;
  font-size: 17px;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--teal);
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  background: var(--teal-dark);
  box-shadow: 0 8px 18px rgba(15, 111, 108, 0.16);
  transform: translateY(-1px);
}

.button.ghost {
  background: var(--white);
  color: var(--ink);
  border-color: #9fa9a7;
}

.button.ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.button.compact {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(420px, 0.97fr);
  gap: 16px;
  align-items: start;
}

.input-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.86);
  box-shadow: var(--shadow);
}

.input-panel {
  padding: 14px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.input-section {
  padding: 0 0 14px;
  border-bottom: 1px solid #e6dfd4;
}

.input-section + .input-section,
.split-fields + .input-section {
  padding-top: 14px;
}

.input-section:last-of-type {
  border-bottom: 0;
}

.input-section legend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  color: #1b2221;
  font-size: 18px;
  font-weight: 750;
}

.input-section legend span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
}

.input-section legend em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
}

.segmented {
  display: grid;
  gap: 4px;
}

.home-options {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stuff-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segment {
  position: relative;
  display: block;
  min-width: 0;
}

.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment > span {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  color: #1d2423;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.segment strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.2;
}

.segment small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.segment input:focus-visible + span,
.checkbox-grid input:focus-visible,
.stepper button:focus-visible,
.button:focus-visible,
.site-nav a:focus-visible {
  outline: 3px solid rgba(15, 111, 108, 0.25);
  outline-offset: 2px;
}

.segment input:checked + span {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.segment input:checked + span::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.segment-icon > span {
  min-height: 72px;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 10px;
}

.segment-icon i {
  grid-row: span 2;
  align-self: center;
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #e6dfd4;
}

.compact-section {
  padding: 0;
  border: 0;
}

.stepper {
  display: grid;
  grid-template-columns: 42px minmax(56px, 1fr) 42px;
  width: min(220px, 100%);
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
}

.stepper button,
.stepper output {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
}

.stepper button {
  cursor: pointer;
}

.stepper button:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.stepper output {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-size: 18px;
  font-weight: 700;
}

.checkbox-grid,
.supply-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
}

.checkbox-grid label,
.supply-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #2d3635;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-grid input,
.supply-grid input {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid #b7bebc;
  border-radius: 4px;
  background: var(--white);
  flex: 0 0 auto;
}

.checkbox-grid input:checked,
.supply-grid input:checked {
  border-color: var(--teal);
  background: var(--teal);
}

.checkbox-grid input:checked::after,
.supply-grid input:checked::after {
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.checkbox-grid span,
.supply-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.estimate-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 10px 10px;
  border: 1px solid #cfe1df;
  border-radius: 6px;
  background: linear-gradient(90deg, #ecf8f8, #f8fbfb);
}

.estimate-note > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--teal);
  border-radius: 50%;
  color: var(--teal);
  font-weight: 700;
}

.estimate-note p {
  margin: 0;
  color: #29413f;
  font-size: 13px;
}

.result-panel {
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 20%, rgba(201, 147, 85, 0.18), transparent 36%),
    linear-gradient(135deg, #fff7e8, #fffdfa 58%);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-hero h2 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1;
}

.result-hero h2 span {
  margin-right: 8px;
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 0.9;
}

.result-hero p:last-child {
  margin: 0;
  color: #4c5755;
  font-size: 13px;
}

.box-stack-visual {
  position: relative;
  width: 166px;
  height: 108px;
}

.box-stack-visual span,
.box-cube {
  display: block;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.28), transparent 46%),
    var(--kraft);
  border: 1px solid #9f6e38;
  box-shadow: inset 16px 0 0 rgba(255,255,255,0.13);
}

.box-stack-visual span::before,
.box-cube::before {
  content: "";
  position: absolute;
  inset: 8px auto auto 50%;
  width: 1px;
  height: calc(100% - 16px);
  background: rgba(119, 76, 35, 0.55);
}

.box-stack-visual span {
  position: absolute;
  width: 62px;
  height: 50px;
}

.box-stack-visual span:nth-child(1) {
  right: 72px;
  bottom: 12px;
}

.box-stack-visual span:nth-child(2) {
  right: 26px;
  bottom: 20px;
  width: 70px;
  height: 60px;
  background-color: #d5a36b;
}

.box-stack-visual span:nth-child(3) {
  right: 54px;
  top: 0;
  width: 58px;
  height: 46px;
  background-color: #e0b47e;
}

.box-stack-visual i {
  position: absolute;
  right: 4px;
  bottom: 12px;
  width: 36px;
  height: 56px;
  border: 6px solid #477b51;
  border-bottom-color: #836344;
  border-radius: 50% 50% 6px 6px;
}

.mix-list {
  padding: 8px 16px 0;
}

.mix-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 48px 42px minmax(70px, 0.8fr);
  gap: 12px;
  align-items: center;
  min-height: 49px;
  padding: 5px 0;
  border-bottom: 1px solid #eee6da;
}

.mix-row div {
  display: grid;
  gap: 2px;
}

.mix-row strong,
.mix-row b {
  font-size: 17px;
  line-height: 1.05;
}

.mix-row small,
.mix-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mix-row i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) var(--pct), #ddd 0);
}

.box-cube {
  position: relative;
  width: 32px;
  height: 28px;
  transform: skewY(-5deg);
}

.supply-checklist,
.room-preview {
  margin: 8px 16px;
  padding: 10px 14px;
  border: 1px solid #e2dacd;
  border-radius: 6px;
  background: rgba(255, 253, 250, 0.78);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h3,
.supply-checklist h3,
.room-preview h3 {
  margin: 0;
  font-size: 15px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 700;
  cursor: pointer;
}

.supply-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supply-grid b {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.room-preview ul,
.check-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-preview li,
.check-list li {
  position: relative;
  padding-left: 22px;
  color: #384341;
  font-size: 14px;
}

.room-preview li::before,
.check-list li::before {
  content: "";
  position: absolute;
  top: 0.63em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--teal);
}

.number-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: #384341;
}

.number-list li {
  padding-left: 4px;
  font-size: 15px;
}

.number-list li::marker {
  color: var(--teal);
  font-weight: 800;
}

.bottom-actions {
  padding: 2px 16px 12px;
}

.copy-status {
  min-height: 20px;
  margin: -6px 16px 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.preview-bands {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.preview-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44%;
  gap: 12px;
  min-height: 230px;
  padding: 22px;
  border-right: 1px solid var(--line);
  color: var(--ink);
  transition: background 150ms ease, transform 150ms ease;
}

.preview-band:last-child {
  border-right: 0;
}

.preview-band:hover {
  background: #fff8ea;
}

.preview-band span,
.blog-card span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-band h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.08;
}

.preview-band p {
  margin: 0;
  color: #485452;
}

.preview-band img {
  align-self: end;
  width: 100%;
  min-width: 130px;
}

.home-blog-section {
  margin: 20px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(244, 232, 206, 0.38), rgba(255, 255, 255, 0) 34%),
    var(--white);
  box-shadow: var(--shadow);
}

.home-blog-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.74fr) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.home-blog-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.08;
}

.home-blog-head p:not(.eyebrow) {
  margin: 0 0 3px;
  color: #40504d;
}

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-blog-card {
  display: block;
  min-height: 164px;
  overflow: hidden;
  border: 1px solid #dde2dc;
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.86);
  color: var(--ink);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.home-blog-card:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
  background: #fff9ed;
}

.home-blog-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid #e8dfd1;
}

.home-blog-card span {
  display: inline-flex;
  margin: 15px 17px 9px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-blog-card h3 {
  margin: 0 17px 9px;
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.12;
}

.home-blog-card p {
  margin: 0 17px 17px;
  color: #4e5a58;
}

.content-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin: 20px 0 34px;
  padding: 18px 20px;
  border: 1px solid #cfe0de;
  border-radius: var(--radius);
  background: var(--teal-soft);
}

.content-strip h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 25px;
}

.content-strip p {
  margin: 0;
  color: #334341;
}

.article-shell {
  padding: 24px 0 44px;
}

.article-hero {
  max-width: 900px;
  margin-bottom: 22px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 930px) 300px;
  justify-content: center;
  gap: 20px;
  align-items: start;
  min-width: 0;
}

.article-body {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(255, 253, 250, 0.9)),
    var(--white);
  box-shadow: var(--shadow);
}

.article-lead {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.78fr);
  gap: 20px;
  align-items: stretch;
  padding-bottom: 18px;
  border-bottom: 1px solid #eee6da;
}

.article-lead-copy {
  align-self: center;
  min-width: 0;
}

.article-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.article-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #d6e4e1;
  border-radius: 999px;
  background: #f2fbfa;
  color: #34504d;
  font-size: 12px;
  font-weight: 700;
}

.article-body section + section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #eee6da;
}

.article-body h2 {
  margin-bottom: 9px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.15;
}

.article-body p {
  max-width: 760px;
  color: #34403e;
  font-size: 17px;
}

.article-body p:last-child,
.article-body ul:last-child,
.article-body ol:last-child {
  margin-bottom: 0;
}

.article-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e7ddcf;
  border-radius: 8px;
  background: var(--white);
}

.article-figure img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-figure figcaption {
  display: none;
}

.article-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 24px;
  overflow: hidden;
  border: 1px solid #dce6e3;
  border-radius: 7px;
  background: var(--teal-soft);
}

.article-summary-grid div {
  padding: 13px 14px;
  border-right: 1px solid #d0dfdc;
  background: rgba(229, 243, 242, 0.86);
}

.article-summary-grid div:last-child {
  border-right: 0;
}

.article-summary-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.article-summary-grid strong {
  display: block;
  color: #23302e;
  font-size: 14px;
  line-height: 1.35;
}

.article-aside {
  position: sticky;
  top: 100px;
  min-width: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.92);
  box-shadow: 0 10px 26px rgba(40, 31, 18, 0.05);
}

.article-aside h2 {
  margin: 0;
  padding: 16px 16px 10px;
  font-size: 17px;
}

.article-aside a,
.link-list a {
  display: block;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--teal);
  font-weight: 700;
}

.article-aside a:hover,
.link-list a:hover {
  border-color: #cbdedc;
  background: var(--teal-soft);
}

.article-aside a {
  padding: 12px 16px;
  border-top: 1px solid #eee6da;
  border-radius: 0;
}

.article-aside .aside-calculator {
  display: grid;
  gap: 3px;
  margin: 12px;
  padding: 14px;
  border: 1px solid #cfe0de;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(229, 243, 242, 0.96), rgba(255, 248, 234, 0.9));
  color: var(--ink);
}

.aside-calculator span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.aside-calculator strong {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.1;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: var(--white);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #eee6da;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--paper-2);
  color: #212827;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: #374341;
}

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 900px;
}

details {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

summary {
  cursor: pointer;
  padding: 15px 17px;
  color: var(--ink);
  font-weight: 750;
}

details p {
  margin: 0;
  padding: 0 17px 16px;
  color: #394442;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.blog-card {
  display: block;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.9);
  box-shadow: 0 8px 18px rgba(40, 31, 18, 0.04);
}

.blog-card:hover {
  border-color: var(--teal);
  background: #fff9ed;
}

.blog-card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid #e8dfd1;
}

.blog-card span {
  margin: 15px 18px 8px;
}

.blog-card h2 {
  margin: 0 18px 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.14;
}

.blog-card p {
  margin: 0 18px 18px;
  color: #4d5957;
}

.blog-detail {
  max-width: none;
}

.article-cta {
  padding: 18px;
  border: 1px solid #cfe0de;
  border-radius: 7px;
  background: var(--teal-soft);
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.site-footer {
  margin-top: 22px;
  padding: 34px clamp(20px, 6vw, 92px) 20px;
  border-top: 1px solid var(--line);
  background: #111817;
  color: #edf2ef;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 0.6fr));
  gap: 28px;
  max-width: 1350px;
  margin: 0 auto;
}

.footer-brand {
  color: #fff;
}

.site-footer p {
  max-width: 420px;
  margin: 12px 0 0;
  color: #aeb9b6;
}

.site-footer h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 15px;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: #c9d7d4;
}

.site-footer a:hover {
  color: #fff;
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1350px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
  color: #9dadab;
  font-size: 13px;
}

.mini-drawer,
.mini-sofa,
.mini-shelves,
.mini-stack {
  position: relative;
  display: block;
  width: 36px;
  height: 32px;
}

.mini-drawer::before {
  content: "";
  position: absolute;
  inset: 3px 5px;
  border: 2px solid #26302e;
  border-radius: 2px;
  box-shadow: inset 0 9px 0 transparent, inset 0 10px 0 #26302e, inset 0 19px 0 transparent, inset 0 20px 0 #26302e;
}

.mini-sofa::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 5px;
  height: 14px;
  border: 2px solid #26302e;
  border-radius: 7px 7px 3px 3px;
}

.mini-sofa::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 17px;
  height: 9px;
  border: 2px solid #26302e;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.mini-shelves::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #26302e;
  box-shadow: inset 0 8px 0 transparent, inset 0 10px 0 #26302e, inset 0 18px 0 transparent, inset 0 20px 0 #26302e;
}

.mini-stack::before,
.mini-stack::after {
  content: "";
  position: absolute;
  border: 2px solid #26302e;
}

.mini-stack::before {
  width: 14px;
  height: 14px;
  left: 4px;
  bottom: 5px;
}

.mini-stack::after {
  width: 16px;
  height: 18px;
  right: 4px;
  bottom: 5px;
  box-shadow: -12px -13px 0 -2px var(--paper), -12px -13px 0 0 #26302e;
}

code {
  padding: 0.1em 0.35em;
  border: 1px solid #d8d0c3;
  border-radius: 4px;
  background: #fff8ec;
  color: #243130;
}

@media (max-width: 1180px) {
  main {
    width: min(100% - 28px, 980px);
  }

  .site-header {
    padding: 0 22px;
  }

  .calculator-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .result-panel,
  .article-aside {
    position: static;
  }

  .home-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preview-bands,
  .home-blog-grid,
  .article-summary-grid,
  .blog-grid,
  .link-list {
    grid-template-columns: 1fr 1fr;
  }

  .home-blog-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .home-blog-head .button {
    justify-self: start;
  }

  .preview-band:nth-child(2) {
    border-right: 0;
  }

  .preview-band:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .article-lead {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-figure img {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  body {
    background-size: 28px 28px, 28px 28px, auto, auto;
  }

  main {
    width: min(100% - 20px, 620px);
  }

  .site-header {
    position: static;
    display: grid;
    gap: 6px;
    padding: 12px 14px 0;
  }

  .brand span {
    font-size: 22px;
  }

  .site-nav {
    flex-wrap: wrap;
    overflow: visible;
    gap: 2px 4px;
    padding-bottom: 6px;
  }

  .site-nav a {
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
  }

  .tool-shell {
    padding-top: 18px;
  }

  .tool-title-row,
  .footer-base {
    display: grid;
    align-items: start;
  }

  .tool-heading {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .tool-icon {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .tool-heading h1,
  .article-hero h1,
  .blog-detail h1 {
    font-size: 34px;
  }

  .article-lead {
    gap: 14px;
    padding-bottom: 15px;
  }

  .article-meta-line span {
    min-height: 26px;
    padding: 0 8px;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .button {
    flex: 1 1 140px;
  }

  .input-panel {
    padding: 10px;
  }

  .home-options,
  .stuff-options,
  .checkbox-grid,
  .supply-grid,
  .preview-bands,
  .home-blog-grid,
  .article-summary-grid,
  .blog-grid,
  .link-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split-fields {
    grid-template-columns: 1fr 1fr;
  }

  .segment-icon > span {
    min-height: 66px;
  }

  .estimate-note {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .estimate-note .button {
    grid-column: 1 / -1;
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .box-stack-visual {
    display: none;
  }

  .mix-row {
    grid-template-columns: 36px minmax(0, 1fr) 42px 36px;
  }

  .mix-row i {
    grid-column: 2 / -1;
  }

  .preview-band {
    grid-template-columns: minmax(0, 1fr) 130px;
    min-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .preview-band:last-child {
    grid-column: auto;
    border-top: 0;
    border-bottom: 0;
  }

  .content-strip {
    grid-template-columns: 1fr;
  }

  .article-body {
    padding: 18px;
  }

  .article-body h2 {
    font-size: 23px;
  }

  .article-body p {
    font-size: 16px;
  }

  .article-summary-grid div {
    border-right: 0;
    border-bottom: 1px solid #d0dfdc;
  }

  .article-summary-grid div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 460px) {
  .split-fields {
    grid-template-columns: 1fr;
  }

  .preview-band {
    grid-template-columns: 1fr;
  }

  .preview-band img {
    max-height: 150px;
  }
}

@media print {
  .site-header,
  .preview-bands,
  .home-blog-section,
  .content-strip,
  .site-footer,
  .top-actions,
  .button,
  .article-aside {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main {
    width: 100%;
  }

  .calculator-grid,
  .article-layout {
    display: block;
  }

  .input-panel,
  .result-panel,
  .article-body {
    box-shadow: none;
    break-inside: avoid;
  }
}
