:root {
  --ink: #13231f;
  --muted: #5f6e69;
  --line: #dbe4df;
  --paper: #fbfcf8;
  --green: #0d7552;
  --green-dark: #07533b;
  --mint: #dff4e8;
  --yellow: #e7d85c;
  --red: #a94e3f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.site-header {
  height: 76px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 5px; font-size: 23px; font-weight: 800; letter-spacing: -1.2px; }
.brand span:last-child { color: var(--green); }
.brand i { color: var(--yellow); font-style: normal; }
nav { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 700; }
.nav-cta { background: var(--ink); color: white; padding: 11px 17px; border-radius: 999px; }

.hero {
  max-width: 1180px;
  min-height: 590px;
  margin: 0 auto;
  padding: 78px 28px 92px;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  align-items: center;
  gap: 72px;
}
.eyebrow { margin: 0 0 16px; color: var(--green); text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; }
.pulse { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px #e7d85c35; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(48px, 6vw, 78px); line-height: .98; letter-spacing: -.058em; font-weight: 750; }
h1 span:first-child { color: var(--green); }
h1 span:last-child { color: #947f17; }
.hero-lead { max-width: 600px; color: var(--muted); font-size: 19px; line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; border-radius: 10px; padding: 15px 20px; font-size: 14px; font-weight: 800; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); }
.primary { background: var(--green); color: white; box-shadow: 0 10px 28px #0d755228; }
.secondary { border: 1px solid var(--line); background: white; }
.privacy-note { margin: 15px 0 0; color: #7d8a86; font-size: 12px; }

.concept-card { background: var(--ink); color: white; border-radius: 24px; padding: 34px; box-shadow: 0 22px 60px #1a32292a; }
.flow-visual { display: grid; grid-template-columns: 1fr auto 1.15fr; align-items: center; min-height: 245px; }
.flow-source, .flow-time, .flow-energy div { display: flex; flex-direction: column; align-items: center; }
.flow-source { align-self: center; }
.flow-icon { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 16px; background: var(--yellow); color: var(--ink); border-radius: 50% 50% 50% 12px; font-size: 26px; }
.flow-visual b { font-size: 30px; letter-spacing: -.04em; }
.flow-visual small { color: #aac0b8; margin-top: 5px; }
.flow-time { gap: 4px; padding: 0 12px; color: #d2dfda; }
.flow-time > span { font-size: 26px; }
.flow-time b { font-size: 19px; }
.flow-energy { display: flex; align-items: center; gap: 18px; }
.flow-energy > span { color: var(--yellow); font-size: 30px; }
.flow-energy div { width: 142px; height: 142px; justify-content: center; background: var(--green); border-radius: 16px 16px 46% 46%; box-shadow: inset 0 -24px 0 #ffffff0c; }
.concept-rule { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-top: 1px solid #ffffff20; padding-top: 22px; color: #b6c8c1; font-size: 13px; }
.concept-rule code { color: white; font-size: 17px; font-weight: 800; }

.bucket-card { position: relative; overflow: hidden; user-select: none; }
.bucket-card::after { content: ""; position: absolute; right: -90px; top: -90px; width: 230px; height: 230px; border: 1px solid #ffffff12; border-radius: 50%; box-shadow: 0 0 0 42px #ffffff07, 0 0 0 84px #ffffff04; pointer-events: none; }
.analogy-kicker { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.analogy-kicker span { color: #9fb5ad; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.analogy-kicker b { font-size: 15px; }
.bucket-stage { position: relative; z-index: 2; height: 330px; margin: 10px 0 12px; border-radius: 14px; cursor: pointer; outline: none; }
.bucket-stage:focus-visible { box-shadow: 0 0 0 3px var(--yellow); }
.flow-meter { position: absolute; z-index: 5; left: 0; top: 8px; display: flex; flex-direction: column; }
.flow-meter b { color: var(--yellow); font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.flow-meter small, .bucket-wrap > small { color: #9fb5ad; font-size: 10px; }
.stage-status { position: absolute; z-index: 5; right: 0; top: 12px; padding: 6px 9px; border: 1px solid #ffffff1c; border-radius: 999px; color: #b7c9c2; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.tap-art { position: absolute; z-index: 3; left: calc(50% - 150px); top: 28px; width: 250px; height: 105px; }
.tap-art i { position: absolute; display: block; }
.tap-pipe { left: 0; top: 39px; width: 151px; height: 23px; border-radius: 999px 7px 7px 999px; background: linear-gradient(#d8e1de, #b3c1bc); box-shadow: inset 0 -5px 0 #96a7a1; }
.tap-valve { left: 57px; top: 7px; width: 18px; height: 42px; border-radius: 5px; background: #b8c6c1; }
.tap-valve::before { content: ""; position: absolute; left: -28px; top: -8px; width: 74px; height: 14px; border-radius: 999px; background: #d7dfdc; box-shadow: inset 0 -4px 0 #a4b2ad; }
.tap-neck { left: 139px; top: 39px; width: 22px; height: 51px; border-radius: 0 0 9px 9px; background: linear-gradient(90deg, #b2c1bc, #d5dfdc 55%, #9caca6); box-shadow: inset 0 -4px 0 #93a49e; }
.tap-mouth { left: 130px; top: 80px; width: 40px; height: 18px; border-radius: 5px 5px 7px 7px; background: linear-gradient(#c4d0cc, #9caea7); box-shadow: inset 0 -5px 0 #71857e; }
.tap-mouth::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 2px; height: 3px; border-radius: 50%; background: #526a62; opacity: .7; }
.water-stream { position: absolute; z-index: 1; left: 50%; top: 124px; height: 46px; opacity: 0; transform: translateX(-50%) scaleY(0); transform-origin: top; background: linear-gradient(90deg, #4aafdb, #b8efff 48%, #4aafdb); border-radius: 0 0 45% 45%; transition: width .2s ease, opacity .15s ease; }
.bucket-card.is-running .water-stream { opacity: .95; transform: translateX(-50%) scaleY(1); animation: stream-shimmer .65s ease-in-out infinite alternate; }
@keyframes stream-shimmer { from { filter: brightness(.92); } to { filter: brightness(1.14); } }
.bucket-wrap { position: absolute; z-index: 2; left: 50%; bottom: 0; width: 175px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 9px; }
.bucket-shell { position: relative; width: 158px; height: 145px; overflow: hidden; clip-path: polygon(3% 0, 97% 0, 82% 100%, 18% 100%); background: #d9e4df; box-shadow: inset 0 0 0 5px #a9bbb4; }
.bucket-shell::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, #ffffff32, transparent 32%, transparent 68%, #18372b18); pointer-events: none; }
.bucket-water { position: absolute; left: 0; right: 0; bottom: 0; min-height: 2px; background: linear-gradient(180deg, #5cc4e8, #258ebc); transition: height .08s linear; }
.bucket-water::before { content: ""; position: absolute; left: 8%; right: 8%; top: -3px; height: 7px; border-radius: 50%; background: #a4e8fb; opacity: .8; }
.water-ripple { display: none; }
.bucket-value { position: absolute; z-index: 2; left: 50%; top: 52%; width: 108px; padding: 5px 7px; transform: translate(-50%, -50%); border-radius: 6px; background: #102820c9; color: white; font-size: 17px; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.power-control { position: relative; z-index: 2; padding: 11px 13px; display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 18px; border-radius: 9px; background: #ffffff0b; }
.power-control span { display: flex; flex-direction: column; gap: 2px; }
.power-control b { font-size: 12px; }
.power-control small { color: #9fb5ad; font-size: 9px; }
.power-control input { width: 100%; accent-color: var(--yellow); cursor: ew-resize; }
.concept-time { position: relative; z-index: 2; margin: 8px 0 17px; padding: 8px 13px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-radius: 9px; background: #ffffff08; }
.concept-time span { font-size: 13px; }
.concept-time b { font-variant-numeric: tabular-nums; }
.concept-time b > span { display: inline-block; width: 4.5ch; text-align: right; }
.concept-time button { padding: 0; border: 0; background: transparent; color: #b9cbc4; cursor: pointer; font-size: 10px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.live-formula { display: grid; grid-template-columns: 72px 12px 68px 12px 91px; align-items: baseline; justify-content: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-formula > span { text-align: right; }
.live-formula i { font-style: normal; text-align: center; }
.live-formula b { display: inline-block; text-align: right; }
.formula-power b { width: 3.2ch; }
.formula-time b { width: 4.4ch; }
.formula-energy b { width: 4.4ch; }

.quick-answer, .calculator-section, .kw-h-section, .physics-depth, .next-tools, .calculator-page-hero, .calculator-page-lab, .calculator-next, footer { max-width: 1180px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.quick-answer { padding-top: 100px; padding-bottom: 110px; }
.section-heading { max-width: 690px; margin-bottom: 46px; }
.section-heading h2, .kw-h-title h2, .next-tools h2 { margin-bottom: 14px; font-size: clamp(34px, 4vw, 52px); line-height: 1.05; letter-spacing: -.045em; }
.section-heading > p:last-child, .split-heading > p, .next-tools > div > p:last-child { color: var(--muted); line-height: 1.7; }
.comparison-grid { display: grid; grid-template-columns: 1fr 58px 1fr; align-items: center; }
.definition-card { min-height: 405px; padding: 34px; border: 1px solid var(--line); background: white; }
.power-card { border-radius: 20px 4px 4px 20px; }
.energy-card { border-radius: 4px 20px 20px 4px; }
.definition-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 38px; }
.definition-top span { display: grid; place-items: center; min-width: 72px; height: 54px; padding: 0 13px; color: white; background: var(--green); border-radius: 8px; font-size: 24px; font-weight: 800; }
.energy-card .definition-top span { background: #a48e1e; }
.definition-top em { color: var(--muted); font-style: normal; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.definition-card h3 { font-size: 24px; letter-spacing: -.025em; }
.definition-card > p { min-height: 54px; color: var(--muted); line-height: 1.6; }
.definition-card ul { list-style: none; padding: 0; margin: 30px 0 0; border-top: 1px solid var(--line); }
.definition-card li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.definition-card li span { color: var(--muted); }
.times-symbol { position: relative; z-index: 2; display: grid; place-items: center; width: 58px; height: 58px; border: 7px solid var(--paper); border-radius: 50%; background: var(--ink); color: white; font-size: 20px; }
.times-symbol small { position: absolute; top: 64px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.mental-model { display: grid; grid-template-columns: 1fr 48px 1fr 48px 1fr; align-items: center; }
.mental-model article { min-height: 338px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.mental-model article > span { color: #9aa6a1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; }
.model-unit { width: max-content; min-width: 70px; height: 58px; margin: 25px 0 12px; padding: 0 13px; display: grid; place-items: center; border-radius: 9px; background: var(--green); color: white; font-size: 27px; font-weight: 850; letter-spacing: -.04em; }
.time-unit { background: var(--ink); }
.mental-model article > small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.mental-model h3 { margin: 27px 0 9px; font-size: 20px; line-height: 1.15; }
.mental-model p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.model-result { border-color: #a8cfbd !important; background: var(--mint) !important; }
.model-result .model-unit { background: #9a8417; }
.model-operator { position: relative; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border: 6px solid var(--paper); border-radius: 50%; background: var(--ink); color: white; font-size: 18px; }
.result-operator { background: #9a8417; }
.same-energy { margin-top: 22px; padding: 31px; display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 45px; border-radius: 18px; background: var(--ink); color: white; }
.same-energy .eyebrow { margin-bottom: 10px; color: var(--yellow); }
.same-energy h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.same-energy-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.same-energy-examples p { margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 5px; border: 1px solid #ffffff18; border-radius: 10px; background: #ffffff08; }
.same-energy-examples span { color: #aabbb5; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.same-energy-examples b { font-size: 15px; }
.same-energy-examples strong { color: var(--yellow); font-size: 17px; }

.calculator-section { padding-top: 100px; padding-bottom: 110px; }
.split-heading { max-width: none; display: grid; grid-template-columns: 1fr 420px; align-items: end; gap: 50px; }
.split-heading > p { margin-bottom: 12px; }
.calculator-panel { border: 1px solid #ccdad4; border-radius: 24px; background: white; box-shadow: 0 18px 60px #243d3420; overflow: hidden; }
.calculator-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px; border-bottom: 1px solid var(--line); background: #f2f5f1; }
.calculator-tabs button { min-height: 50px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 800; }
.calculator-tabs button span { margin-right: 8px; color: #93a09b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.calculator-tabs button.active { background: white; color: var(--ink); box-shadow: 0 3px 12px #263b3317; }
.calculator-tabs button.active span { color: var(--green); }
.tab-panel[hidden] { display: none; }
.calculator-grid { display: grid; grid-template-columns: 1.2fr .8fr; }
.calculator-inputs { padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.field select, .input-shell { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfa; color: var(--ink); }
.field select { padding: 0 14px; }
.input-shell { display: flex; align-items: center; overflow: hidden; }
.input-shell input { width: 100%; min-width: 0; height: 100%; padding: 0 8px 0 14px; border: 0; outline: 0; background: transparent; font-weight: 700; }
.input-shell:focus-within, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px #0d75521a; outline: none; }
.input-shell b { padding-right: 14px; color: #6b7974; white-space: nowrap; }
.input-with-select select { width: 112px; height: 100%; padding: 0 9px; border: 0; border-left: 1px solid var(--line); background: #f2f5f1; color: var(--ink); outline: 0; }
.helper-note { margin-top: 2px; padding: 15px 17px; border-left: 3px solid var(--yellow); background: #faf9ed; color: var(--muted); font-size: 12px; line-height: 1.55; }
.helper-note b { color: var(--ink); }
.helper-note p { margin: 4px 0 0; }
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; max-width: 320px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #f2f5f1; }
.mode-toggle button { padding: 10px 16px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; }
.mode-toggle button.active { background: white; color: var(--green-dark); box-shadow: 0 2px 8px #172d2515; }
.result-card { margin: 14px; padding: 34px; display: flex; flex-direction: column; justify-content: center; background: var(--mint); border-radius: 15px; }
.result-card > strong { color: var(--green-dark); font-size: clamp(44px, 5vw, 64px); letter-spacing: -.055em; line-height: 1; }
.result-card > span { margin-top: 9px; color: var(--muted); }
.result-details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 35px; padding-top: 22px; border-top: 1px solid #aacdbd; }
.result-details div { display: flex; flex-direction: column; gap: 5px; }
.result-details b { font-size: 17px; }
.result-details span { color: var(--muted); font-size: 12px; }
.formula-mini { margin: 27px 0 0; color: #60766e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.conversion-result { align-items: flex-start; }
.conversion-result > strong { font-size: clamp(40px, 5vw, 58px); }
.result-equation { width: 100%; margin: 35px 0 0; padding-top: 22px; border-top: 1px solid #aacdbd; color: #415d52; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.kw-h-section { padding-top: 108px; padding-bottom: 110px; display: grid; grid-template-columns: .74fr 1.26fr; gap: 82px; }
.kw-h-title { padding-top: 8px; }
.kw-h-title h2 { font-size: clamp(48px, 6vw, 76px); }
.kw-h-answer { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kw-h-answer > div { padding: 28px; border-radius: 16px; }
.kw-h-answer span { display: block; margin-bottom: 20px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kw-h-answer b { display: block; font-size: 52px; letter-spacing: -.05em; }
.kw-h-answer p { margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.right-answer { background: var(--green); color: white; }
.right-answer span { color: #bce5d3; }
.wrong-answer { border: 1px solid #e5d1cc; color: var(--red); background: #fff7f3; }
.plain-explanation { grid-column: 2; padding-top: 26px; border-top: 1px solid var(--line); }
.plain-explanation h3 { font-size: 21px; }
.plain-explanation p { color: var(--muted); line-height: 1.75; }
.plain-explanation code { display: inline-block; margin: 0 5px; padding: 2px 7px; border-radius: 5px; background: #eef1ed; color: var(--ink); font-weight: 700; }

.physics-depth { padding-bottom: 95px; }
.physics-depth details { border: 1px solid var(--line); border-radius: 16px; background: white; }
.physics-depth summary { padding: 24px 27px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; }
.physics-depth summary::-webkit-details-marker { display: none; }
.physics-depth summary span { display: flex; flex-direction: column; gap: 4px; }
.physics-depth summary small { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.physics-depth summary b { font-size: 20px; }
.physics-depth summary i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-size: 21px; font-style: normal; transition: transform .2s; }
.physics-depth details[open] summary i { transform: rotate(45deg); }
.physics-content { padding: 0 27px 28px; border-top: 1px solid var(--line); }
.physics-content > p { max-width: 760px; margin: 24px 0; color: var(--muted); line-height: 1.7; }
.unit-chain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.unit-chain p { margin: 0; padding: 18px; display: flex; flex-direction: column; gap: 5px; border-radius: 10px; background: #f3f7f3; }
.unit-chain span { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.unit-chain b { font-size: 18px; }
.unit-chain small { color: var(--muted); font-size: 11px; }
.physics-note code { color: var(--ink); font-weight: 800; }

.calculator-page-hero { padding-top: 82px; padding-bottom: 48px; }
.calculator-page-hero h1 { max-width: 850px; margin-bottom: 22px; font-size: clamp(48px, 6vw, 76px); }
.calculator-page-hero > p:last-child { max-width: 700px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.calculator-page-lab { padding-bottom: 85px; }
.calculator-page-lab > .privacy-note { margin-top: 14px; text-align: center; }
.calculator-next { margin-bottom: 100px; padding-top: 44px; padding-bottom: 44px; display: flex; align-items: center; justify-content: space-between; gap: 35px; border-radius: 20px; background: var(--yellow); }
.calculator-next > div { max-width: 680px; }
.calculator-next .eyebrow { margin-bottom: 8px; color: #6e6111; }
.calculator-next h2 { margin-bottom: 7px; font-size: 34px; letter-spacing: -.035em; }
.calculator-next p { margin-bottom: 0; color: #4f4a23; line-height: 1.6; }

.next-tools { margin-top: 20px; margin-bottom: 100px; padding-top: 50px; padding-bottom: 50px; display: flex; justify-content: space-between; align-items: center; gap: 40px; border-radius: 22px; background: var(--yellow); }
.next-tools > div { max-width: 650px; }
.next-tools .eyebrow { color: #6e6111; }
.next-tools h2 { margin-bottom: 8px; font-size: 36px; }
.next-tools p { margin-bottom: 0; }
.dark { background: var(--ink); color: white; white-space: nowrap; }

footer { min-height: 150px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 45px; border-top: 1px solid var(--line); }
.footer-brand p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; gap: 22px; font-size: 13px; font-weight: 700; }
.copyright { margin: 0; color: #89938f; font-size: 12px; }

.back-link { color: var(--green-dark); font-size: 13px; font-weight: 800; }
.legal-content { max-width: 820px; margin: 0 auto; padding: 80px 28px 120px; }
.legal-content h1 { margin-bottom: 56px; color: var(--ink); font-size: clamp(44px, 7vw, 72px); }
.legal-content h2 { margin: 42px 0 12px; font-size: 22px; letter-spacing: -.02em; }
.legal-content p { color: var(--muted); line-height: 1.75; }
.legal-note { padding: 13px 16px; border-left: 3px solid var(--yellow); background: #faf9ed; font-size: 13px; }

/* Haushalts-Check */
.household-page { min-height: 100vh; background: #f6f7f2; }
.household-hero, .household-summary, .household-settings, .import-preview, .device-workspace, .household-explanation, .household-page footer { max-width: 1180px; margin-left: auto; margin-right: auto; }
.household-hero { padding: 72px 28px 60px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 72px; }
.household-hero h1 { max-width: 720px; font-size: clamp(48px, 6vw, 76px); }
.household-hero h1 span { color: var(--green); }
.household-hero > div:first-child > p:last-child { max-width: 670px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.privacy-panel { padding: 28px; border: 1px solid #cfe0d8; border-radius: 18px; background: var(--mint); }
.privacy-panel > b { display: block; margin-bottom: 8px; font-size: 20px; }
.privacy-panel > p { color: #526b61; line-height: 1.6; }
.storage-status { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid #b7d7c8; }
.storage-status span { color: var(--green-dark); font-size: 13px; font-weight: 800; }
.storage-status button, .text-button { padding: 0; border: 0; background: transparent; color: var(--green-dark); cursor: pointer; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.storage-actions, .storage-off { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.storage-off > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.storage-actions .danger-link, .storage-off .danger-link, .danger-link { padding: 0; border: 0; background: transparent; color: var(--red); cursor: pointer; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.delete-confirm { margin-top: 16px; padding: 14px; border: 1px solid #e5b6ac; border-radius: 10px; background: #fff8f5; }
.delete-confirm > b { display: block; color: #702e21; font-size: 12px; }
.delete-confirm div { margin-top: 10px; display: flex; gap: 12px; }
.delete-confirm button { padding: 7px 10px; border: 1px solid #c66b58; border-radius: 7px; background: white; color: #702e21; cursor: pointer; font-size: 11px; font-weight: 800; }
.delete-confirm button:first-child { background: #8f3f2f; color: white; }
.action-message { margin: 12px 0 0 !important; color: var(--muted) !important; font-size: 11px !important; }

.household-summary { padding: 0 28px; display: grid; grid-template-columns: repeat(4, 1fr); }
.household-summary article { min-height: 145px; padding: 25px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-right: 0; background: white; }
.household-summary article:first-child { border-radius: 16px 0 0 16px; }
.household-summary article:last-child { border-right: 1px solid var(--line); border-radius: 0 16px 16px 0; background: var(--ink); color: white; }
.household-summary article > span { margin-bottom: 13px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.household-summary article:last-child > span, .household-summary article:last-child small { color: #b9c9c3; }
.household-summary strong { font-size: clamp(25px, 3vw, 35px); letter-spacing: -.04em; }
.household-summary small { margin-top: 6px; color: var(--muted); }
.household-summary .summary-warning { background: #6d382e; }

.household-settings { margin-top: 18px; padding: 18px 28px; display: grid; grid-template-columns: 200px 270px 1fr; align-items: end; gap: 14px; }
.data-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.data-actions button { min-height: 48px; padding: 0 15px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 800; }
.data-actions button:hover { border-color: var(--green); }
.data-actions button:disabled { opacity: .4; cursor: not-allowed; }
.export-message { flex-basis: 100%; margin: 2px 0 0; color: var(--muted); font-size: 11px; text-align: right; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.import-preview { margin-top: 20px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 35px; border: 1px solid #b8d7c8; border-radius: 16px; background: var(--mint); }
.import-preview .eyebrow { margin-bottom: 8px; }
.import-preview h2 { margin-bottom: 8px; font-size: 25px; }
.import-preview p { margin-bottom: 0; color: var(--muted); }
.import-preview ul { margin: 12px 0 0; padding-left: 20px; color: var(--red); font-size: 12px; }
.import-actions { min-width: 225px; display: flex; flex-direction: column; gap: 8px; }
.import-actions .button { width: 100%; padding: 12px 16px; }
.import-actions button:disabled { opacity: .4; cursor: not-allowed; }

.device-workspace { padding: 70px 28px 105px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 24px; }
.device-form-card, .device-list-card { border: 1px solid var(--line); border-radius: 20px; background: white; }
.device-form-card { padding: 30px; }
.device-form-card .section-heading { margin-bottom: 24px; }
.device-form-card .section-heading h2 { font-size: 31px; }
.preset-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 24px; }
.preset-list button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: #f8faf7; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 700; }
.preset-list button:hover { border-color: var(--green); color: var(--green-dark); }
.device-form { display: flex; flex-direction: column; gap: 17px; }
.device-form [hidden] { display: none !important; }
#measuredFields, #estimatedFields { display: flex; flex-direction: column; gap: 17px; }
.plain-input { width: 100%; height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfa; color: var(--ink); outline: 0; }
.plain-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #0d75521a; }
.measurement-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.measurement-switch button { padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf8; color: var(--ink); cursor: pointer; }
.measurement-switch button span { color: var(--muted); font-size: 10px; }
.measurement-switch button.active { border-color: var(--green); background: var(--mint); box-shadow: inset 0 0 0 1px var(--green); }
.estimate-mode-toggle { padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 10px; background: #eef1eb; }
.estimate-mode-toggle button { padding: 10px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.estimate-mode-toggle button span { color: var(--muted); font-size: 10px; }
.estimate-mode-toggle button.active { background: white; color: var(--green-dark); box-shadow: 0 2px 8px #172d2515; }
.three-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.expert-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.estimate-preview { margin: -2px 0 0; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 3px 12px; border-left: 3px solid var(--green); border-radius: 0 8px 8px 0; background: #f4f8f3; }
.estimate-preview span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.estimate-preview b { color: var(--green-dark); font-size: 15px; }
.estimate-preview small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.form-actions { display: flex; gap: 9px; margin-top: 4px; }
.form-error { margin: 0; color: var(--red); font-size: 12px; font-weight: 700; }

.device-list-card { overflow: hidden; }
.device-list-heading { padding: 30px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; border-bottom: 1px solid var(--line); }
.device-list-heading .eyebrow { margin-bottom: 8px; }
.device-list-heading h2 { margin: 0; font-size: 27px; }
.device-list-heading > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.empty-state { min-height: 420px; padding: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 20px; border-radius: 50%; background: var(--mint); color: var(--green); font-size: 27px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { max-width: 380px; color: var(--muted); line-height: 1.6; }
.device-list { padding: 0 20px; }
.device-row { padding: 21px 9px; border-bottom: 1px solid var(--line); }
.device-row:last-child { border-bottom: 0; }
.device-main, .device-values, .row-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.device-name { display: flex; flex-direction: column; gap: 4px; }
.device-name b { font-size: 15px; }
.device-name span { color: var(--muted); font-size: 11px; }
.source-badge { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.source-badge.measured { background: var(--mint); color: var(--green-dark); }
.source-badge.estimated { background: #f3eed1; color: #75660d; }
.usage-bar { height: 5px; margin: 15px 0 11px; overflow: hidden; border-radius: 999px; background: #edf1ed; }
.usage-bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.device-values b { font-size: 12px; }
.device-values strong { color: var(--green-dark); font-size: 16px; }
.row-actions { justify-content: flex-start; margin-top: 12px; }
.row-actions button { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.row-actions button:last-child { color: var(--red); }

.household-explanation { margin-bottom: 100px; padding: 48px 28px; display: grid; grid-template-columns: .45fr 1.55fr; gap: 60px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.household-explanation h2 { font-size: 32px; line-height: 1.15; letter-spacing: -.03em; }
.household-explanation p { color: var(--muted); line-height: 1.7; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding-top: 58px; }
  .concept-card { max-width: 620px; }
  .mental-model { grid-template-columns: 1fr; gap: 0; }
  .model-operator { margin: -5px auto; }
  .same-energy { grid-template-columns: 1fr; gap: 25px; }
  .unit-chain { grid-template-columns: 1fr; }
  .split-heading { grid-template-columns: 1fr; gap: 0; }
  .calculator-grid { grid-template-columns: 1fr; }
  .kw-h-section { grid-template-columns: 1fr; gap: 28px; }
  .plain-explanation { grid-column: 1; }
  .next-tools { border-radius: 0; }
  .calculator-next { border-radius: 0; }
  .household-hero { grid-template-columns: 1fr; gap: 28px; }
  .household-summary { grid-template-columns: 1fr 1fr; gap: 1px; }
  .household-summary article, .household-summary article:first-child, .household-summary article:last-child { border: 1px solid var(--line); border-radius: 10px; }
  .household-settings { grid-template-columns: 1fr 1fr; }
  .data-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .device-workspace { grid-template-columns: 1fr; }
  .household-explanation { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 620px) {
  .site-header { height: 66px; padding: 0 18px; }
  nav a:not(.nav-cta) { display: none; }
  .hero, .quick-answer, .calculator-section, .kw-h-section, .physics-depth, .calculator-page-hero, .calculator-page-lab, footer { padding-left: 18px; padding-right: 18px; }
  .hero { min-height: auto; padding-top: 52px; padding-bottom: 72px; gap: 46px; }
  h1 { font-size: 48px; }
  .hero-lead { font-size: 17px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .concept-card { padding: 22px 18px; }
  .analogy-kicker { align-items: flex-start; flex-direction: column; gap: 5px; }
  .bucket-stage { height: 316px; }
  .flow-meter { top: 13px; }
  .flow-meter b { font-size: 24px; }
  .stage-status { top: 16px; max-width: 120px; text-align: center; }
  .tap-art { top: 28px; }
  .bucket-wrap { width: 158px; }
  .bucket-shell { width: 145px; height: 132px; }
  .bucket-value { min-width: 78px; font-size: 14px; }
  .power-control { grid-template-columns: 1fr; gap: 9px; }
  .concept-time { gap: 8px; }
  .concept-rule { align-items: flex-start; flex-direction: column; gap: 7px; }
  .live-formula { width: 100%; justify-content: start; }
  .mental-model article { min-height: auto; }
  .same-energy { padding: 24px 18px; }
  .same-energy-examples { grid-template-columns: 1fr; }
  .flow-visual { min-height: 210px; }
  .flow-icon { width: 54px; height: 54px; }
  .flow-visual b { font-size: 23px; }
  .flow-energy { gap: 8px; }
  .flow-energy div { width: 112px; height: 112px; }
  .comparison-grid { grid-template-columns: 1fr; gap: 12px; }
  .definition-card { min-height: auto; border-radius: 16px; padding: 25px; }
  .times-symbol { margin: -6px auto; transform: rotate(90deg); }
  .times-symbol small { display: none; }
  .calculator-inputs { padding: 24px 18px; }
  .calculator-tabs { grid-template-columns: 1fr; gap: 3px; }
  .calculator-tabs button { min-height: 42px; text-align: left; padding-left: 18px; }
  .field-row, .kw-h-answer { grid-template-columns: 1fr; }
  .result-card { padding: 28px 22px; }
  .next-tools { margin-bottom: 60px; padding: 38px 18px; flex-direction: column; align-items: flex-start; }
  .physics-depth { padding-bottom: 65px; }
  .physics-depth summary { padding: 20px 18px; }
  .physics-content { padding: 0 18px 22px; }
  .calculator-page-hero { padding-top: 52px; }
  .calculator-next { margin-bottom: 60px; padding: 34px 18px; flex-direction: column; align-items: flex-start; }
  footer { grid-template-columns: 1fr; gap: 20px; padding-top: 35px; padding-bottom: 35px; }
  .legal-content { padding: 55px 18px 80px; }
  .legal-page .site-header { gap: 18px; }
  .back-link { text-align: right; }
  .household-hero, .household-summary, .household-settings, .import-preview, .device-workspace, .household-explanation, .household-page footer { padding-left: 18px; padding-right: 18px; }
  .household-hero { padding-top: 52px; }
  .household-summary { grid-template-columns: 1fr; }
  .household-settings { grid-template-columns: 1fr; }
  .data-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .data-actions button:last-of-type { grid-column: 1 / -1; }
  .import-preview { align-items: stretch; flex-direction: column; }
  .import-actions { min-width: 0; }
  .device-workspace { padding-top: 45px; }
  .device-form-card { padding: 23px 18px; }
  .three-fields { grid-template-columns: 1fr; }
  .expert-fields { grid-template-columns: 1fr; }
  .estimate-mode-toggle { grid-template-columns: 1fr; }
  .measurement-switch { grid-template-columns: 1fr; }
  .device-list-heading { align-items: flex-start; flex-direction: column; padding: 24px 20px; }
  .empty-state { min-height: 330px; padding: 35px 20px; }
  .household-explanation { margin-bottom: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .bucket-card.is-running .water-stream { animation: none; }
}
