:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #60706c;
  --paper: #f4f1e9;
  --panel: #fffdf8;
  --line: #c9d1ca;
  --accent: #c85735;
  --accent-dark: #963a23;
  --green: #244c43;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 86% 8%, rgba(200,87,53,.08), transparent 24rem), var(--paper); }
.masthead { min-height: 68px; padding: 14px clamp(20px, 5vw, 72px); display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255,253,248,.92); backdrop-filter: blur(12px); }
.brand { color: var(--green); font-size: 1.2rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand span { font-weight: 500; }
.top-nav { display: flex; gap: 24px; }
.top-nav a { color: var(--muted); font-size: .875rem; font-weight: 750; text-decoration: none; }
.top-nav a:hover { color: var(--accent-dark); }
.privacy-note { justify-self: end; color: var(--muted); font-size: .8rem; }
main { padding: clamp(28px, 5vw, 72px); }
.workspace { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(280px, .8fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.intro { grid-column: 1 / -1; max-width: 820px; padding-block: clamp(10px, 2vw, 24px); }
.eyebrow, .result-kicker { margin: 0 0 8px; color: var(--accent-dark); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 780px; margin: 0 0 18px; font: 700 clamp(2.5rem, 5.6vw, 5.25rem)/.94 Georgia, serif; letter-spacing: -.055em; text-wrap: balance; }
.intro > p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.planner-card, .results-card { padding: clamp(20px, 3vw, 32px); border: 1px solid rgba(36,76,67,.22); border-radius: 18px; background: rgba(255,253,248,.96); box-shadow: 0 18px 55px rgba(26,49,43,.07); }
fieldset { margin: 0 0 20px; padding: 0; border: 0; }
legend { margin-bottom: 10px; font-weight: 800; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .875rem; font-weight: 700; }
input, select, textarea { width: 100%; padding: 12px 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: white; font: inherit; font-size: 1rem; }
textarea { resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: #9aaaa5; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(200,87,53,.2); border-color: var(--accent); }
button { width: 100%; padding: 14px 18px; border: 0; border-radius: 10px; color: white; background: var(--green); font: inherit; font-weight: 800; cursor: pointer; }
button:hover { background: #183a32; transform: translateY(-1px); }
.results-card { min-height: 340px; border-top: 5px solid var(--accent); }
.results-card h2 { margin: 0 0 10px; font: 700 1.8rem/1.15 Georgia, serif; }
.results-card p { color: var(--muted); line-height: 1.5; }
.unit-picker { max-width: 180px; margin: 0 0 24px auto; }
.last-field { margin-bottom: 20px; }
.field-help { margin: -8px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.suggestions { margin-top: -6px; color: var(--muted); font-size: .8rem; }
.frame-choices { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.frame-chip { width: auto; padding: 7px 10px; color: var(--green); border: 1px solid var(--line); background: white; font-size: .78rem; }
.frame-chip:hover { color: white; background: var(--green); }
.muted { color: var(--muted); }
.result-heading { display: flex; justify-content: space-between; gap: 16px; }
.status { align-self: start; padding: 6px 10px; color: #176044; border-radius: 999px; background: #dff3e7; font-size: .75rem; font-weight: 800; }
.preview { display: grid; place-items: center; min-height: 150px; margin: 20px 0; padding: 18px; background: #ebe6da; border-radius: 12px; }
.frame-shape { display: grid; place-items: center; max-width: 230px; max-height: 170px; width: 68%; border: 8px solid #543e2d; background: #f7f3e8; box-shadow: 0 7px 14px rgba(0,0,0,.15); }
.art-shape { background: linear-gradient(145deg, #bd6750, #334f54); box-shadow: 0 0 0 1px #fff; }
.cut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cut-grid div { padding: 12px; background: var(--panel); }
.cut-grid dt { color: var(--muted); font-size: .75rem; font-weight: 700; }
.cut-grid dd { margin: 4px 0 0; font-weight: 800; }
.fine-print { font-size: .78rem; }
.error { border-top-color: #a52727; }
.result-actions { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button.secondary { color: var(--green); border: 1px solid var(--green); background: transparent; }
button.secondary:hover { color: white; background: var(--green); }
button:disabled { opacity: .5; cursor: not-allowed; }
.guide-links { max-width: 1180px; margin: clamp(70px, 9vw, 120px) auto 20px; padding-top: 34px; display: grid; grid-template-columns: .8fr 1fr; gap: 54px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.tool-callout { max-width: 1180px; margin: 70px auto 0; padding: clamp(22px, 4vw, 38px); display: flex; justify-content: space-between; align-items: center; gap: 30px; color: white; border-radius: 20px; background: var(--green); }
.tool-callout h2 { margin: 0 0 8px; font: 700 clamp(1.7rem, 4vw, 2.8rem)/1 Georgia, serif; }
.tool-callout p { max-width: 680px; margin-bottom: 0; line-height: 1.5; }
.tool-callout .eyebrow { color: #f4aa8e; }
.tool-button { flex: 0 0 auto; padding: 13px 16px; color: var(--green); border-radius: 10px; background: white; text-decoration: none; font-weight: 800; }
.tools-section { max-width: 1180px; margin: clamp(70px, 9vw, 120px) auto 0; scroll-margin-top: 24px; }
.section-intro { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 24px; }
.section-intro h2 { max-width: 650px; margin: 0; font: 700 clamp(2rem, 4.2vw, 3.7rem)/.98 Georgia, serif; letter-spacing: -.04em; text-wrap: balance; }
.section-intro > p { max-width: 360px; margin: 0; color: var(--muted); line-height: 1.55; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tool-card { min-height: 275px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 26px; color: white; border: 1px solid rgba(255,255,255,.15); border-radius: 18px; background: var(--green); box-shadow: 0 15px 36px rgba(23,50,44,.12); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.tool-card:nth-child(2) { background: #2d5b51; }
.tool-card:nth-child(3) { background: #38685d; }
.tool-card:hover { color: white; background: #183a32; box-shadow: 0 20px 44px rgba(23,50,44,.2); transform: translateY(-4px); }
.tool-number { color: #f4aa8e; font-size: .78rem; font-weight: 850; letter-spacing: .14em; }
.tool-card h3 { margin: 0 0 10px; font: 700 1.65rem/1.05 Georgia, serif; }
.tool-card p { margin: 0; color: rgba(255,255,255,.78); line-height: 1.5; }
.tool-arrow { align-self: end; display: grid; place-items: center; width: 38px; height: 38px; color: var(--green); border-radius: 50%; background: white; font-size: 1.1rem; }
.yield-workspace { grid-template-columns: minmax(360px, .85fr) minmax(360px, 1.15fr); }
.yield-workspace .intro h1 { max-width: 920px; font-size: clamp(2.5rem, 5vw, 4.85rem); }
.check-label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 10px; color: var(--ink); }
.check-label input { width: auto; }
.blank-head, .blank-row { display: grid; grid-template-columns: 1fr 1fr .7fr auto; gap: 8px; align-items: end; }
.blank-head { margin-bottom: 6px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.blank-row { margin-bottom: 10px; }
.blank-row label { font-size: 0; }
.blank-row button { width: auto; padding: 12px 10px; }
button.compact { width: auto; margin: 2px 0 18px; padding: 10px 12px; }
.yield-results { min-height: 500px; }
.sheet-plan { margin-top: 28px; }
.sheet-plan h3 { font: 700 1.25rem Georgia, serif; }
.sheet-map { position: relative; max-height: 430px; border: 8px solid #d8d0bc; background: #f8f5ed; box-shadow: inset 0 0 0 1px #b9ae96; overflow: hidden; }
.placed-blank { position: absolute; display: grid; place-items: center; color: white; border: 1px solid #fff; background: color-mix(in srgb, var(--accent) 84%, var(--green)); font-size: .72rem; font-weight: 800; }
.sheet-plan ol { padding-left: 22px; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.member-row { display: grid; grid-template-columns: 1fr .65fr auto; gap: 8px; align-items: end; margin-bottom: 10px; }
.member-row button { width: auto; padding: 12px 10px; }
.moulding-results { min-height: 500px; }
.stick-plan { margin-top: 28px; }
.stick-plan h3 { font: 700 1.1rem Georgia, serif; }
.stick-map { position: relative; height: 58px; border: 5px solid #d8d0bc; background: #efe9dc; }
.stick-map span { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; color: white; border-inline: 1px solid white; background: var(--accent); font-size: .7rem; font-weight: 800; overflow: hidden; }
.stick-plan ol { padding-left: 22px; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.collage-results { min-height: 540px; }
.collage-map { position: relative; max-height: 430px; margin: 24px auto; border: 8px solid #d8d0bc; background: #f8f5ed; box-shadow: inset 0 0 0 1px #b9ae96; }
.collage-opening { position: absolute; display: grid; place-items: center; color: white; border: 2px solid white; background: var(--accent); font-size: .75rem; font-weight: 800; }
.collage-results h3 { margin-top: 26px; font: 700 1.15rem Georgia, serif; }
.coordinate-list { padding-left: 22px; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.offcut-workspace { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: start; }
.offcut-workspace > .intro { grid-column: 1 / -1; }
.inventory-card { grid-column: 1 / -1; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.section-heading h2 { margin: 0 0 18px; font: 700 1.8rem/1.15 Georgia, serif; }
.inline-picker { margin: 0; }
.offcut-head, .offcut-row { display: grid; grid-template-columns: 1.1fr 1.3fr .7fr .7fr .5fr auto; gap: 8px; align-items: end; }
.need-head, .need-row { display: grid; grid-template-columns: 1.3fr .8fr .8fr .55fr auto; gap: 8px; align-items: end; }
.offcut-head, .need-head { margin-bottom: 6px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.offcut-row, .need-row { margin-bottom: 10px; }
.offcut-row label, .need-row label { font-size: 0; }
.offcut-row button, .need-row button { width: auto; padding: 12px 10px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.file-button { display: inline-block; width: auto; padding: 10px 12px; color: var(--green); border: 1px solid var(--green); border-radius: 10px; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.offcut-results { min-height: 500px; }
.warning { border-top-color: #b06a12; }
.warning .status { color: #704007; background: #f8e7c6; }
.shortfall { margin: 18px 0; padding: 14px; color: #704007; border-radius: 10px; background: #fff2d8; line-height: 1.5; }
.guide-links h2 { margin: 0; font: 700 clamp(1.8rem, 4vw, 3.2rem)/1 Georgia, serif; letter-spacing: -.035em; }
.guide-links nav { display: grid; gap: 4px; }
.guide-links a { display: flex; justify-content: space-between; gap: 20px; padding: 15px 14px; color: var(--ink); border-radius: 9px; text-decoration: none; font-weight: 750; }
.guide-links a:hover { color: var(--accent-dark); background: rgba(255,253,248,.8); }
footer { padding: 24px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: .8rem; }
.masthead > a:last-child { color: var(--green); font-weight: 750; }
.masthead > a:last-child:nth-child(2) { grid-column: 3; justify-self: end; }
.article { max-width: 760px; margin: 0 auto; padding-block: clamp(48px, 8vw, 100px); }
.article h1 { font-size: clamp(2.5rem, 7vw, 4.8rem); }
.article h2 { margin-top: 42px; font: 700 1.55rem/1.2 Georgia, serif; }
.article p, .article li { color: #3e4d49; font-size: 1.05rem; line-height: 1.75; }
.article .lede { color: var(--muted); font-size: 1.2rem; }
.article li + li { margin-top: 10px; }
.callout { margin-top: 36px; padding: 22px; color: var(--green); border-left: 5px solid var(--accent); background: var(--panel); font-weight: 650; line-height: 1.6; }
@media (max-width: 760px) {
  .masthead { grid-template-columns: 1fr auto; }
  .masthead > a:last-child:nth-child(2) { grid-column: 2; }
  .privacy-note { display: none; }
  .top-nav { gap: 14px; }
  .workspace { grid-template-columns: 1fr; }
  .result-actions { grid-column: 1; }
  .guide-links { grid-template-columns: 1fr; }
  .yield-workspace { grid-template-columns: 1fr; }
  .offcut-workspace { grid-template-columns: 1fr; }
  .tool-callout { align-items: flex-start; flex-direction: column; }
  .section-intro { align-items: start; flex-direction: column; gap: 12px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 210px; }
  .field-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) { .offcut-head, .need-head { display: none; } .offcut-row, .need-row { grid-template-columns: 1fr 1fr; } .offcut-row label, .need-row label { font-size: .875rem; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } .blank-head { display: none; } .blank-row, .member-row { grid-template-columns: 1fr 1fr; } .blank-row label { font-size: .875rem; } }
@media print {
  .masthead, .intro, .planner-card, .result-actions, .guide-links, .tool-callout, .tools-section, footer { display: none !important; }
  main { padding: 0; }
  .workspace { display: block; }
  .results-card { border: 0; box-shadow: none; }
}
