:root {
  color-scheme: dark;
  --page: #101411;
  --panel: #1b1b18;
  --panel-warm: #272019;
  --line: #3d463e;
  --warm-line: #70513c;
  --ink: #f1e4d4;
  --muted: #b9aca0;
  --quiet: #829080;
  --peach: #edc49f;
  --peach-deep: #d9a97d;
  --danger: #ffb5a6;
  font-family: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body { margin: 0; background: radial-gradient(circle at 84% 3%, #2a221b 0, transparent 29rem), var(--page); color: var(--ink); }

.site-header, main, footer { width: min(1060px, calc(100% - 40px)); margin-inline: auto; }

.site-header { min-height: 77px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); color: var(--quiet); font: 11px/1.2 'DM Mono', monospace; letter-spacing: .09em; }
.brand { color: var(--ink); text-decoration: none; font-weight: 500; }
.brand span { color: var(--peach); padding-inline: 5px; }
.site-header p { margin: 0; }

main { padding: 86px 0 52px; }
.intro { max-width: 720px; margin-bottom: 52px; }
.eyebrow, .number { color: var(--peach); font: 10px/1.2 'DM Mono', monospace; letter-spacing: .12em; margin: 0 0 10px; }
h1, h2 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-weight: 500; }
h1 { max-width: 670px; font-size: clamp(43px, 6vw, 71px); letter-spacing: -.055em; line-height: .98; }
h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; line-height: 1.08; }
.lede { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 18px; line-height: 1.6; }

.calculator-card, .shared-panel, .method-note { border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(135deg, rgba(255,255,255,.02), transparent 60%), var(--panel); }
.calculator-card { padding: clamp(23px, 4vw, 35px); }
.sizing-card { border-color: var(--warm-line); background: linear-gradient(135deg, rgba(237,196,159,.06), transparent 54%), var(--panel-warm); }
.section-heading { display: flex; gap: 17px; align-items: flex-start; margin-bottom: 27px; }
.number { width: 22px; padding-top: 5px; color: #acc596; }
.section-heading .eyebrow { color: var(--muted); }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(230px, .7fr); gap: 32px; align-items: stretch; }
.fields-grid, .shared-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.3; }
input { width: 100%; min-height: 50px; padding: 11px 13px; border: 1px solid #505148; border-radius: 8px; background: rgba(8,10,8,.36); color: var(--ink); font: 16px 'DM Mono', monospace; outline: none; }
input:focus { border-color: var(--peach); box-shadow: 0 0 0 3px rgba(237,196,159,.17); }
.result-panel { display: grid; align-content: center; gap: 8px; min-height: 180px; padding: 26px; border-radius: 11px; background: #151714; border: 1px solid #41453d; }
.sizing-card .result-panel { background: rgba(16,14,12,.45); border-color: #72523c; }
.result-label { color: var(--muted); font-size: 12px; }
.result-panel strong { color: var(--peach); font: 500 clamp(38px, 4vw, 54px)/1 'Playfair Display', Georgia, serif; letter-spacing: -.055em; }
.result-detail { color: var(--muted); font-size: 13px; line-height: 1.45; }
.helper { max-width: 760px; margin: 27px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.shared-panel { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(0, 1.6fr); gap: 28px; align-items: end; margin: 22px 0; padding: clamp(23px, 3vw, 30px); }
.shared-panel h2 { font-size: 25px; }
.shared-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shared-energy { grid-column: 1 / -1; margin: 0; color: #cad9bb; font: 12px 'DM Mono', monospace; }
.shared-explainer { grid-column: 1 / -1; max-width: 660px; margin: -14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.recharge-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.recharge-section label { margin-bottom: 22px; }
.result-panel.compact { min-height: 143px; }
.accent-card { border-color: var(--warm-line); }

.method-note { margin-top: 22px; padding: 28px clamp(23px, 4vw, 35px); }
.method-note h2 { font-size: 25px; }
.method-note p:last-child { max-width: 800px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.error-message { position: sticky; bottom: 18px; margin: 18px 0 0; padding: 13px 16px; border: 1px solid #a96c60; border-radius: 8px; background: #321d1a; color: var(--danger); }
footer { padding: 28px 0 44px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 12px; line-height: 1.5; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 28px, 1060px); }
  .site-header { min-height: 64px; }
  .site-header p { display: none; }
  main { padding-top: 50px; }
  .intro { margin-bottom: 36px; }
  .lede { font-size: 16px; }
  .calculator-layout, .shared-panel, .recharge-section { grid-template-columns: 1fr; }
  .fields-grid, .shared-fields { grid-template-columns: 1fr; }
  .result-panel { min-height: 144px; }
  .shared-panel { align-items: start; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
