:root {
  color-scheme: light;
  --paper: #f7f4ed;
  --ink: #263a30;
  --muted: #4c5b50;
  --rule: #d4d8cb;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
  font: 100%/1.55 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, figure, p, h1, h2 { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; }
em { font-weight: inherit; }
:focus-visible { outline: 2px solid #8b4d35; outline-offset: 5px; }
[id] { scroll-margin-block-start: 1.5rem; }

.shell { width: min(100% - 7rem, 82rem); margin-inline: auto; }
.skip { position: absolute; top: .8rem; left: .8rem; z-index: 1; padding: .65rem 1rem; background: var(--paper); transform: translateY(-200%); }
.skip:focus { transform: none; }
.header, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding-block: 1.35rem; }
.header { border-bottom: 1px solid var(--rule); }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; white-space: nowrap; font: 1.23rem/1 var(--serif); text-decoration: none; }
.header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem clamp(1rem, 3vw, 2.6rem); }
.header nav a, .footer > a:last-child { font-size: .92rem; font-weight: 600; text-decoration: none; }
.header nav a:hover, .footer > a:last-child:hover { text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(2.3rem, 4.8vw, 4.5rem) clamp(3rem, 6vw, 5.5rem); }
.eyebrow, .category { font-size: .875rem; font-weight: 700; letter-spacing: .115em; text-transform: uppercase; }
.hero h1, h2, .guide-title { font-family: var(--serif); font-weight: 400; }
.hero h1 { margin-block: 1rem 1.4rem; font-size: clamp(3.7rem, 7.6vw, 7.4rem); line-height: .96; letter-spacing: -.066em; }
.hero h1 em { color: #566b53; }
.intro { max-width: 29ch; color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.24rem); }
.button { display: inline-block; margin-top: 1.85rem; padding: .85rem 1.4rem; border-radius: 2rem; background: var(--ink); color: white; font-weight: 600; text-decoration: none; }
.button:hover { background: #41584a; }
.hero-visual img { width: 100%; height: auto; aspect-ratio: 1.36; object-fit: cover; border-radius: .25rem .25rem 5.4rem .25rem; background: #e6d9c7; }
.hero-visual figcaption { padding-top: .65rem; color: var(--muted); font-size: .88rem; }

.studio { border-top: 1px solid var(--rule); padding-block: 2.6rem clamp(3rem, 6vw, 5rem); }
.planner:not([hidden]) { display: grid; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: 1rem; }
.controls, .stage { border: 1px solid var(--rule); border-radius: .3rem; }
.controls { display: grid; align-content: start; gap: 1rem; padding: clamp(1rem, 3vw, 1.65rem); background: #fcfaf5; }
.controls fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.controls legend, .controls label { font-weight: 600; }
.controls legend { margin-bottom: .4rem; padding: 0; }
.dimensions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.dimensions label, .controls small { font-size: .875rem; }
.dimensions label span, .controls small { color: var(--muted); }
.controls input, .controls select { display: block; width: 100%; min-height: 2.7rem; margin-top: .35rem; padding: .35rem .5rem; border: 1px solid #a5afa1; border-radius: .25rem; background: #fff; color: var(--ink); font: inherit; }
.controls input:invalid { border-color: #9a4129; }
.dimension-error { color: #873722; font-size: .875rem; }
.dimension-error:empty { display: none; }
.estimate { display: grid; gap: .15rem; padding-top: .7rem; border-top: 1px solid var(--rule); }
.estimate output { font-family: var(--serif); font-size: 2rem; line-height: 1.2; }
.planner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.planner-actions .button, .text-button { margin: 0; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.text-button { padding: .5rem; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.save-status { min-height: 1.35em; font-size: .875rem; }
.stage { display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: #ece8db; }
.stage canvas { display: block; width: 100%; height: clamp(20rem, 45vw, 33rem); }
.stage-controls { display: grid; grid-template-columns: auto minmax(0, 14rem); align-items: center; justify-content: center; gap: 1rem; padding: 1rem; background: #fcfaf5; }
.stage-controls input { width: 100%; min-height: 2rem; accent-color: var(--ink); }

.guides { border-top: 1px solid var(--rule); padding-block: 2.6rem clamp(3rem, 6vw, 5.5rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .8rem 2rem; margin-bottom: 1.6rem; }
h2 { font-size: clamp(2.5rem, 5vw, 4.55rem); line-height: 1.03; letter-spacing: -.05em; }
.section-heading h2 { margin-top: .35rem; }
.section-heading > p { max-width: 36ch; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.guide { border-radius: .25rem; background: #e8ebe1; }
.guide-storage { background: #f1e3d6; }
.guide-moving { background: #efe9d9; }
.guide summary { display: flex; flex-direction: column; align-items: flex-start; min-height: 16rem; padding: clamp(1.25rem, 2.5vw, 2rem); cursor: pointer; list-style: none; }
.guide summary::-webkit-details-marker { display: none; }
.guide-title { margin-block: .8rem .5rem; font-size: clamp(1.6rem, 2.45vw, 2.25rem); line-height: 1.03; letter-spacing: -.03em; }
.guide-description { margin-bottom: 1rem; }
.guide-action { display: inline-flex; align-items: center; gap: .5rem; margin-top: auto; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.guide-action::after { content: '+' / ''; font-size: 1.15rem; }
.guide[open] .guide-action::after { content: '−' / ''; }
.guide-body { border-top: 1px solid #263a3033; padding: 1.1rem clamp(1.25rem, 2.5vw, 2rem) 1.5rem; }
.guide-body p + p { margin-top: .75rem; }

.footer { border-top: 1px solid var(--rule); padding-block: 1.6rem; }

@media (max-width: 56rem) {
  .shell { width: calc(100% - 3.5rem); }
  .hero { gap: 1.6rem; }
  .guide summary { min-height: 17rem; }
}

@media (max-width: 42rem) {
  .shell { width: calc(100% - 2.25rem); }
  .hero, .guide-grid, .planner:not([hidden]) { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(3.5rem, 12vw, 5.4rem); }
  .hero-visual img { border-bottom-right-radius: 3.5rem; }
  .guide summary { min-height: 0; }
}

@media (max-width: 24rem) {
  .header { flex-wrap: wrap; }
  .footer .wordmark { font-size: 1rem; }
}
