/* Heating Layout Planner — site styles. Art direction "Tervlap": frost drawing paper with a grid,
   ink lines, a cold-to-warm thermal band, sheet numbers and a title block in the footer. */

@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/sofia-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/sofia-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/sofia-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/sofia-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/sofia-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/sofia-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/sofia-sans-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/sofia-sans-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Azeret Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/azeret-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Azeret Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/azeret-mono-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Azeret Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/azeret-mono-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Azeret Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/azeret-mono-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --frost: #eef1f4;
  --paper: #f6f8fa;
  --grid: #e0e5ea;
  --grid-major: #d0d7de;
  --ink: #2b1e24;
  --soft: #5b5157;
  --line: #d3d9df;
  --heat: #c62f3e;
  --heat-dark: #a3222f;
  --cold: #2f7fa6;
  --cold-dark: #22668a;
  --amber: #e9b949;
  --white: #fff;
  --sans: "Sofia Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Azeret Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --thermal: linear-gradient(90deg, var(--cold), var(--amber) 55%, var(--heat));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--frost);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 200px 200px, 200px 200px, 40px 40px, 40px 40px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--heat-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--cold); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
p, li, dd, dt, summary, td, th { overflow-wrap: anywhere; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--white); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.small { font-size: 0.9rem; color: var(--soft); }

/* Header */
.top { background: rgba(246, 248, 250, 0.96); border-bottom: 1.5px solid var(--ink); position: relative; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; min-width: 0; }
.brand img { border-radius: 4px; flex: none; }
.nav { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 500; border: 1.5px solid transparent; border-radius: 4px; }
.nav a:hover { border-color: var(--line); background: var(--white); }
.nav a[aria-current="page"] { border-color: var(--ink); background: var(--white); }
.band { height: 5px; background: var(--thermal); }

/* Shared */
.kicker { font-family: var(--mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--heat-dark); margin: 0 0 12px; }
.section-title { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); margin: 0 0 28px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); min-width: 24px; }
.section-title .tick { width: 3px; height: 18px; background: var(--heat); flex: none; }
.section-title.light { color: #d9cdd2; }
.section-title.light::after { background: #5a4950; }
.lead { font-size: 1.2rem; color: var(--soft); max-width: 40em; }
.link-arrow { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--heat); padding-bottom: 2px; }
.link-arrow::after { content: " →"; }

.play { display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 8px 22px; background: var(--ink); color: var(--white); text-decoration: none; border-radius: 6px; line-height: 1.15; border: 2px solid var(--ink); }
.play:hover { background: var(--heat-dark); border-color: var(--heat-dark); color: var(--white); }
.play-small { font-size: 0.8rem; font-family: var(--mono); letter-spacing: 0.04em; }
.play-big { font-size: 1.2rem; font-weight: 800; }
.play-soon { background: transparent; color: var(--ink); border-style: dashed; cursor: default; }
.play-soon:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
.cta-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 28px; }

.shot { margin: 0; background: var(--ink); border: 3px solid var(--ink); border-top-width: 0; position: relative; max-width: 380px; width: 100%; }
.shot::before { content: ""; display: block; height: 8px; background: var(--thermal); }
.shot img { width: 100%; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--heat); }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-family: var(--mono); font-size: 0.82rem; font-weight: 700; border: 1.5px solid var(--ink); background: var(--white); padding: 6px 10px; border-radius: 3px; }
.hero-sheet { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; justify-self: center; width: 100%; max-width: 460px; }
.hero-sheet .dim { grid-column: 1 / -1; position: relative; text-align: center; font-family: var(--mono); font-size: 0.8rem; color: var(--soft); border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); margin-right: 56px; }
.hero-sheet .dim::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink); }
.hero-sheet .dim span { position: relative; background: var(--frost); padding: 0 10px; }
.shot-hero { max-width: none; }
.scale { display: flex; flex-direction: column; justify-content: space-between; height: 72%; min-height: 260px; padding-left: 30px; position: relative; font-family: var(--mono); font-size: 0.8rem; color: var(--soft); margin-top: 24px; }
.scale::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; border: 2px solid var(--ink); background: linear-gradient(180deg, var(--heat), var(--amber) 45%, var(--cold)); }
.chain { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: var(--white); }
.chain li { padding: 12px 14px; font-weight: 700; border-left: 1.5px solid var(--ink); display: flex; flex-direction: column; gap: 2px; }
.chain li:first-child { border-left: 0; }
.chain-no { font-family: var(--mono); font-size: 0.75rem; color: var(--heat-dark); }

/* Sheets */
.sheets { padding: 56px 0 24px; }
.sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 56px; align-items: center; background: var(--paper); border: 1.5px solid var(--ink); padding: 40px; margin-bottom: 36px; position: relative; }
.sheet::after { content: ""; position: absolute; right: -1.5px; bottom: -1.5px; width: 140px; height: 26px; border: 1.5px solid var(--ink); border-right: 0; border-bottom: 0; background: var(--white); }
.sheet-flip { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
.sheet-flip .shot { order: -1; }
.sheet-no { font-family: var(--mono); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; color: var(--heat-dark); text-transform: uppercase; margin: 0 0 10px; }
.sheet h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.01em; }
.points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.points li { position: relative; padding-left: 26px; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 14px; height: 4px; background: var(--heat); }

/* Extras */
.extras { padding: 32px 0 56px; }
.extras-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.extras-grid div { padding: 22px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); background: var(--white); }
.extras-grid dt { font-weight: 800; font-size: 1.15rem; margin-bottom: 6px; }
.extras-grid dd { margin: 0; color: var(--soft); }

/* Method */
.method { background: var(--ink); color: #efe7ea; padding: 64px 0; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.method p { font-size: 1.12rem; }
.method-note { color: #cdbfc5; font-size: 0.98rem !important; border-left: 3px solid var(--heat); padding-left: 14px; }
.formulas { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.formulas li { border: 1.5px solid #5a4950; padding: 16px 18px; background: #34262c; }
.f-label { display: block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.formulas code { font-family: var(--mono); font-size: 1rem; color: var(--white); overflow-wrap: anywhere; }

/* Closing */
.closing { padding: 64px 0; }
.closing-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; border: 1.5px solid var(--ink); background: var(--white); padding: 36px; }
.closing h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.closing-cta { display: grid; gap: 12px; justify-items: start; }

/* Inner pages */
.page { padding: 48px 0 64px; }
.page h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
.page .section-title { margin-top: 48px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; background: var(--white); border: 1.5px solid var(--ink); padding: 20px 20px 20px 72px; position: relative; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 20px; top: 20px; font-family: var(--mono); font-weight: 700; color: var(--heat-dark); font-size: 1.1rem; }
.steps h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--soft); }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--white); border: 1.5px solid var(--line); padding: 0 18px; }
.faq details[open] { border-color: var(--ink); }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; min-height: 44px; list-style-position: outside; }
.faq details p { margin: 0 0 16px; color: var(--soft); }
.prose { background: var(--white); border: 1.5px solid var(--ink); padding: 40px; }
.prose h2 { font-size: 1.35rem; font-weight: 800; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }

/* Footer: drawing title block */
.foot { padding: 0 0 40px; }
.titleblock { width: 100%; border-collapse: collapse; background: var(--white); border: 3px solid var(--ink); font-size: 0.95rem; table-layout: fixed; }
.titleblock th, .titleblock td { border: 1.5px solid var(--ink); padding: 10px 14px; text-align: left; vertical-align: top; }
.titleblock th { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); font-weight: 700; width: 16%; }
.tb-name { font-weight: 800; font-size: 1.1rem; }
.tb-name img { display: inline-block; vertical-align: middle; margin-right: 6px; border-radius: 3px; }

@media (max-width: 960px) {
  .hero-grid, .method-grid, .closing-grid { grid-template-columns: 1fr; }
  .sheet, .sheet-flip { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
  .sheet-flip .shot { order: 0; }
  .sheet .shot { justify-self: center; }
  .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chain li:nth-child(4) { border-left: 0; }
  .chain li:nth-child(n + 4) { border-top: 1.5px solid var(--ink); }
  .extras-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .hero { padding: 36px 0 28px; }
  .lead { font-size: 1.08rem; }
  .brand { font-size: 1.05rem; }
  .nav a { padding: 0 8px; }
  .hero-sheet { grid-template-columns: minmax(0, 1fr); }
  .hero-sheet .dim { margin-right: 0; }
  .scale { display: none; }
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain li { border-left: 1.5px solid var(--ink) !important; border-top: 1.5px solid var(--ink); }
  .chain li:nth-child(odd) { border-left: 0 !important; }
  .chain li:nth-child(-n + 2) { border-top: 0; }
  .sheet, .sheet-flip { padding: 20px 16px 40px; }
  .extras-grid { grid-template-columns: 1fr; }
  .closing-grid, .prose { padding: 22px 16px; }
  .steps li { padding: 52px 16px 16px; }
  .steps li::before { left: 16px; top: 16px; }
  .titleblock, .titleblock tbody, .titleblock tr, .titleblock th, .titleblock td { display: block; width: 100%; }
  .titleblock tr { border-bottom: 1.5px solid var(--ink); }
  .titleblock th { border: 0; padding: 10px 14px 0; }
  .titleblock td { border: 0; padding: 2px 14px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
