:root {
    --ink: #44375c;
    --text: #50465d;
    --accent: #7147a0;
    --accent2: #a44e32;
    --muted: #6f607e;
    --paper: #fcfaff;
    --lilac: #eee8f6;
    --copper: #f7e5df;
    --line: #ded3e8;
    --white: #fff;
    --shell: 1240px;
}
* { box-sizing: border-box; }
html { color: var(--text); background: var(--paper); font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; }
body { margin: 0; line-height: 1.65; }
a { color: var(--accent); text-decoration: none; font-weight: 400; }
a:hover { color: var(--accent); background-color: #e9dff2; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #aa5a3f; outline-offset: 3px; }
h1,h2,h3,p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: 40px; font-weight: 650; color: var(--ink); line-height: 1.13; letter-spacing: -.025em; }
h2 { font-size: 28px; font-weight: 400; color: var(--ink); line-height: 1.2; }
h3 { font-size: 18px; font-weight: 400; color: var(--accent2); line-height: 1.35; }
p { font-size: 16px; font-weight: 400; }
.shell { width: min(calc(100% - 64px), var(--shell)); margin-inline: auto; }
.top { background: #f2ecf8; border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 15px; }
.brand { display: flex; gap: 13px; align-items: center; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { width: 40px; height: 40px; display: grid; grid-template-columns: repeat(2,1fr); gap: 4px; background: var(--accent); border-radius: 7px; padding: 6px; flex: none; }
.brand-mark i { border: 1.5px solid #f4d8c6; border-radius: 50%; }
.top nav { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { border: 1px solid #cdb9e1; padding: 6px 15px; border-radius: 5px; }
.front { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); align-items: center; gap: 30px; padding: 28px 34px; margin-top: 24px; background: linear-gradient(120deg,#f3edf9,#f9f2f0); border: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.front-copy { display: grid; gap: 16px; }
.front-copy p { max-width: 67ch; }
.front.hero { grid-template-columns: minmax(0,1fr) minmax(0,.8fr); }
.front.reverse { grid-template-columns: minmax(0,.85fr) minmax(0,1fr); background: linear-gradient(115deg,#f9ede7,#eee8f6); }
.front.reverse .front-copy { grid-column: 2; grid-row: 1; }
.front.reverse .front-visual { grid-column: 1; grid-row: 1; }
.front-visual { min-width: 0; }
.metric { background: #fff; padding: 18px 22px; border: 1px solid var(--line); border-left: 4px solid #a95f44; border-radius: 4px; display: grid; gap: 7px; align-content: center; }
.value { color: var(--accent); font-size: clamp(29px,3vw,49px); line-height: 1.08; letter-spacing: -.035em; font-weight: 400; overflow-wrap: anywhere; }
.metric-label { color: var(--accent2); font-size: 16px; }
.metric p { color: var(--muted); }
.topic-rail { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; background: var(--white); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.topic-rail a { padding: 5px 13px; border-radius: 4px; border: 1px solid var(--line); background: #f6f1fa; flex: 1 1 auto; text-align: center; }
.topic-rail a:hover { background: #e9dff2; }
.chapters { display: grid; gap: 22px; margin: 24px 0; }
.chapter { padding: 22px 27px 25px; border-top: 2px solid #a386c3; background: var(--white); border-radius: 3px 3px 9px 9px; box-shadow: 0 2px 6px #704f9610; }
.chapter.tint { background: #f0eaf7; }
.chapter-heading { display: flex; align-items: baseline; gap: 13px; margin-bottom: 16px; }
.chapter-no { font-size: 16px; color: var(--accent2); letter-spacing: .03em; flex: none; }
.chapter-body { display: grid; align-items: start; gap: 26px; }
.split.wide .chapter-body { grid-template-columns: minmax(0,1.8fr) minmax(0,1fr); }
.split.narrow .chapter-body { grid-template-columns: minmax(0,1fr) minmax(0,1.8fr); }
.split.equal .chapter-body { grid-template-columns: repeat(2,minmax(0,1fr)); }
.segment { min-width: 0; display: grid; gap: 10px; align-content: start; }
.side-segment { border-left: 1px solid #dfd4e8; padding-left: 24px; }
.chapter .segment > h3:not(:first-child) { margin-top: 4px; }
.equation { padding: 13px 15px; background: #e8def2; color: var(--ink); border-left: 3px solid #9472ba; border-radius: 3px; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.table-shell { min-width: 0; border: 1px solid #dacde7; border-radius: 5px; background: #fff; }
table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 15px; }
th,td { text-align: left; vertical-align: top; font-weight: 400; padding: 9px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { background: #e6dcf0; color: var(--ink); }
tbody tr:nth-child(even) { background: #f8f4fb; }
tbody tr:last-child > * { border-bottom: 0; }
.calculator { display: grid; gap: 10px; padding: 16px; border: 1px solid #d5c4e3; background: #fff; border-radius: 6px; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-items: end; }
.calculator label { min-width: 0; display: grid; font-size: 14px; color: var(--ink); gap: 4px; }
.calculator input,.calculator select { width: 100%; min-width: 0; font: inherit; color: var(--ink); background: #fcfaff; border: 1px solid #b5a1cc; border-radius: 4px; padding: 9px; }
.calculator button { justify-self: start; font: inherit; color: #fff; background: var(--accent); border: none; padding: 8px 20px; border-radius: 4px; cursor: pointer; }
.calculator button:hover { background: #8056aa; }
.calculator output { display: block; padding: 10px 12px; background: #f7e5df; border-left: 3px solid #a95f44; color: #74442f; overflow-wrap: anywhere; }
.calculator p { color: var(--muted); }
.sources { margin-bottom: 27px; padding: 16px 21px; background: #f1ebf7; border-left: 3px solid #a386c3; display: grid; gap: 6px; }
.sources p { color: var(--muted); }
.foot { background: #eee7f5; border-top: 1px solid var(--line); }
.foot-inner { display: grid; grid-template-columns: 1.25fr 1fr .8fr; gap: 25px; padding-block: 22px; }
.foot-group { display: grid; gap: 4px; align-content: start; }
.foot-group h3 { margin-bottom: 5px; }
.foot-group a { width: fit-content; }
/* Illustrations, all built with CSS and HTML. */
.art { padding: 10px; max-width: 490px; margin-inline: auto; }
.worktop { background: repeating-linear-gradient(105deg,#dbd3e2 0 2px,#e6ddeb 3px 8px,#eee5ef 8px 13px); padding: 13px 20px 21px; border-radius: 12px; border-bottom: 8px solid #baa9c2; box-shadow: 0 9px 16px #684a7933; }
.glass { position: relative; aspect-ratio: 1.73; background: linear-gradient(145deg,#8e7d9d 0%,#635773 46%,#736582 78%,#a294ae 100%); border: 3px solid #b5a5bf; border-radius: 7px; box-shadow: inset 0 0 0 2px #8f7e9f,0 6px 8px #705b8570; }
.zone { position: absolute; width: 28%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #d7cce3; box-shadow: inset 0 0 0 6px #8f819b55; }
.zone:after,.zone:before { content: ''; position: absolute; inset: 14%; border: 1px solid #c3b4d2; border-radius: 50%; }
.zone:after { inset: 29%; border-color: #aa99bc; }
.zone-a { left: 10%; top: 7%; }
.zone-b { right: 12%; top: 7%; width: 25%; }
.zone-c { left: 13%; bottom: 14%; width: 24%; }
.zone-d { right: 9%; bottom: 14%; }
.pan-object { position: absolute; width: 29%; aspect-ratio: 1; left: 9%; top: 5%; border-radius: 50%; background: radial-gradient(circle at 38% 36%,#e0dfe8 0%,#b5b4c1 31%,#8d889d 55%,#c9c4d2 68%,#f4eef5 70%,#90889f 76%); border: 3px solid #e1dbe9; box-shadow: 5px 10px 9px #54446875; }
.pan-object span { position: absolute; width: 82%; height: 14%; left: 87%; top: 53%; border-radius: 5px 14px 14px 5px; transform-origin: left center; transform: rotate(31deg); background: linear-gradient(#ddd5e8,#8c819d 45%,#746784); border: 1px solid #bbacc7; box-shadow: 2px 4px 5px #5a4d6870; }
.touch-strip { position: absolute; bottom: 3%; height: 7%; left: 33%; right: 32%; display: flex; align-items: center; justify-content: space-around; gap: 3px; }
.touch-strip i { display: block; width: 8%; height: 2px; background: #e2cbd8; }
.touch-strip b { font-size: 13px; font-weight: 400; color: #ffcfb0; line-height: 1; }
.metal-deck { position: relative; aspect-ratio: 1.7; background: repeating-linear-gradient(0deg,#dad4df 0 2px,#e9e4ed 2px 4px); border: 4px solid #b7adbf; border-bottom-width: 10px; border-radius: 12px; box-shadow: 0 7px 12px #69587640; }
.burner { position: absolute; width: 24%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle,#9b8ba8 0 25%,#746680 26% 32%,#c5bacc 33% 44%,#84738e 45% 51%,#e3dae8 52%); border: 2px solid #aa9ab5; box-shadow: 2px 4px 4px #73647e45; }
.burner i,.burner b { position: absolute; top: 44%; left: -12%; width: 124%; height: 12%; border-radius: 3px; background: linear-gradient(#a69aaf,#756783); box-shadow: 0 2px 2px #7f7388; }
.burner b { transform: rotate(90deg); }
.burner-a { top: 8%; left: 10%; }
.burner-b { top: 7%; right: 16%; width: 27%; }
.burner-c { bottom: 16%; left: 13%; width: 19%; }
.burner-d { bottom: 13%; right: 18%; width: 20%; }
.knobs { position: absolute; left: 32%; right: 32%; bottom: 4%; display: flex; gap: 10%; }
.knobs i { flex: 1; aspect-ratio: 1; border: 1px solid #b3a5be; border-radius: 50%; background: linear-gradient(130deg,#fff,#a89ab6); box-shadow: 1px 3px 3px #8a7a9c; }
@media (max-width: 1050px) { .shell { width: calc(100% - 44px); } .front { padding: 23px; gap: 22px; } .chapter { padding: 20px; } .chapter-body { gap: 18px; } .side-segment { padding-left: 18px; } }
@media (max-width: 820px) { .shell { width: calc(100% - 32px); } .front,.front.hero,.front.reverse { grid-template-columns: minmax(0,1fr); padding: 20px; } .front.reverse .front-copy,.front.reverse .front-visual { grid-column: auto; grid-row: auto; } .front-visual .metric { padding: 15px; } .split.wide .chapter-body,.split.narrow .chapter-body,.split.equal .chapter-body { grid-template-columns: minmax(0,1fr); } .side-segment { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 15px; } .foot-inner { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; } }
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) and (pointer: coarse) { .top nav { display: none; } .masthead { padding-block: 12px; } }
@media (max-width: 480px) { .shell { width: calc(100% - 24px); } .front { margin-top: 14px; } .front,.front.hero,.front.reverse { padding: 16px; } .chapter { padding: 15px 13px; } .chapters { gap: 15px; margin-block: 17px; } .chapter-heading { gap: 9px; } .topic-rail { padding: 10px; } .fields { grid-template-columns: minmax(0,1fr); } .foot-inner { grid-template-columns: minmax(0,1fr); gap: 16px; } .foot-group { grid-template-columns: repeat(2,minmax(0,1fr)); } .foot-group h3 { grid-column: 1/-1; } .table-shell table { font-size: 14px; } th,td { padding: 7px 5px; } .calculator { padding: 11px; } .art { padding: 3px; } }
@media (min-width: 821px) {
    .chapter.split:has(form[data-calc]) .chapter-body { grid-template-columns: minmax(0,2.7fr) minmax(0,1fr); }
    .chapter.split:has(form[data-calc]) .fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .chapter.split:has(form[data-calc="water"]) .fields,.chapter.split:has(form[data-calc="gas"]) .fields { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .chapter.split:has(form[data-calc="payback"]) .fields,.chapter.split:has(form[data-calc="area"]) .fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .chapter.split.table-flow .chapter-body { grid-template-columns: minmax(0,1fr); gap: 12px; }
    .chapter.split.table-flow .side-segment { border-left: none; padding-left: 0; }
}
@media (min-width: 821px) and (max-width: 1050px) {
    .chapter.split:has(form[data-calc]) .fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.zone { width: 23%; }
.zone-a { left: 13%; top: 7%; }
.zone-b { right: 15%; top: 7%; width: 21%; }
.zone-c { left: 15%; bottom: 14%; width: 20%; }
.zone-d { right: 13%; bottom: 14%; width: 23%; }
.pan-object { width: 24%; left: 12%; top: 5%; }
.burner-a { width: 21%; }
.burner-b { width: 23%; }
@media (min-width: 1051px) {
    .chapter.split:has(form[data-calc="power"]) .fields { grid-template-columns: repeat(5,minmax(0,1fr)); }
    .chapter.split:has(form[data-calc="cost"]) .chapter-body { grid-template-columns: minmax(0,3.15fr) minmax(0,1fr); }
    .chapter.split:has(form[data-calc="cost"]) .calculator { gap: 7px; padding: 13px; }
}
