/* =========================================================================
   «Терма» — engineering plumbing and heating store.

   Clean technical: calm white surfaces, a precise hairline grid, cold blue
   for water and action, heat orange for warmth and selection, Inter with
   tabular figures, schematic line icons, spec-first product cards. Loaded
   after the parent's theme, blocks and chrome styles and after the modules'
   styles; it remaps the parent's tokens, then dresses the chrome, the shop,
   the shared blocks it meets on its pages and its own blocks.

   1. Fonts   2. Design settings   3. Tokens   4. Base   5. Header
   6. Footer   7. Shared blocks   8. Own blocks   9. Shop   10. Variants
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Fonts — Inter, Manrope and Onest are the parent's; JetBrains Mono
   ships with the template (OFL, licence in assets/fonts).
   ------------------------------------------------------------------------- */
@font-face {
    font-family: 'Terma Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(/themes/default/assets/fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Terma Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(/themes/default/assets/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
    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+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Terma Manrope';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url(/themes/default/assets/fonts/manrope-cyrillic-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Terma Manrope';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url(/themes/default/assets/fonts/manrope-latin-wght-normal.woff2) format('woff2-variations');
    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+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Terma Onest';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(/themes/default/assets/fonts/onest-cyrillic-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Terma Onest';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(/themes/default/assets/fonts/onest-latin-wght-normal.woff2) format('woff2-variations');
    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+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Terma Mono';
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url(../fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Terma Mono';
    font-style: normal;
    font-display: swap;
    font-weight: 100 800;
    src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
    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+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -------------------------------------------------------------------------
   2. The owner's design settings (theme.json → design.controls). Core
   prints the chosen values as :root{--terma-…} after this file, so these
   are only the defaults; the tokens below derive from them.
   ------------------------------------------------------------------------- */
:root {
    --terma-cold: #1a64b4;
    --terma-hot: #ea5f24;
    --terma-font-display: 'Terma Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --terma-font-text: 'Terma Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --terma-font-figures: 'Terma Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --terma-radius: 6px;
}

/* -------------------------------------------------------------------------
   3. Tokens
   ------------------------------------------------------------------------- */
html.terma {
    /* surfaces — «white» by default; the other surfaces are in section 10 */
    --tm-page: #ffffff;
    --tm-soft: #f3f6f9;
    --tm-sunk: #e8eef4;
    --tm-line: #dce3eb;
    --tm-line-2: #c2cdd9;
    --tm-grid-line: rgba(26, 64, 110, 0.055);
    --tm-ink: #0f2233;
    --tm-ink-2: #45576b;
    --tm-ink-3: #5f6f82;
    --tm-navy: #0c1f33;
    --tm-navy-2: #14304b;
    --tm-navy-line: rgba(255, 255, 255, 0.12);

    --tm-cold: var(--terma-cold);
    --tm-cold-deep: color-mix(in srgb, var(--tm-cold) 80%, #000);
    --tm-cold-soft: color-mix(in srgb, var(--tm-cold) 8%, #fff);
    --tm-cold-mid: color-mix(in srgb, var(--tm-cold) 22%, #fff);
    --tm-hot: var(--terma-hot);
    --tm-hot-deep: color-mix(in srgb, var(--tm-hot) 82%, #000);
    --tm-hot-soft: color-mix(in srgb, var(--tm-hot) 10%, #fff);
    --tm-hot-text: color-mix(in srgb, var(--tm-hot) 72%, #000);
    --tm-ok: #1d7a4c;
    --tm-pipe: linear-gradient(90deg, var(--tm-cold) 0%, var(--tm-cold) 38%, var(--tm-hot) 62%, var(--tm-hot) 100%);
    --tm-graph:
        linear-gradient(var(--tm-grid-line) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, var(--tm-grid-line) 1px, transparent 1px) 0 0 / 24px 24px;
    --tm-r: var(--terma-radius);
    --tm-fig: var(--terma-font-figures);

    /* the parent's tokens */
    --paper: var(--tm-page);
    --c-bg: var(--tm-page);
    --c-surface: #fff;
    --c-surface-sunk: var(--tm-soft);
    --c-text: var(--tm-ink);
    --c-text-strong: #07182a;
    --c-text-muted: var(--tm-ink-2);
    --c-text-faint: var(--tm-ink-3);
    --c-border: var(--tm-line);
    --c-border-strong: var(--tm-line-2);
    --c-accent: var(--tm-cold);
    --c-accent-hover: var(--tm-cold-deep);
    --c-accent-soft: var(--tm-cold-soft);
    --c-accent-contrast: #fff;
    --c-link: var(--tm-cold);
    --c-link-hover: var(--tm-cold-deep);
    --c-mark: var(--tm-hot);
    --c-mark-text: var(--tm-hot-text);
    --c-mark-soft: var(--tm-hot-soft);
    --c-slab: var(--tm-navy);
    --c-slab-text: #eef3f8;
    --c-slab-muted: #a8b7c7;
    --c-success: var(--tm-ok);

    --font-ui: var(--terma-font-text);
    --font-display: var(--terma-font-display);
    --font-prose: var(--terma-font-text);
    --fw-heading: 650;
    --tr-tight: -0.022em;
    --tr-snug: -0.012em;

    --r-xs: calc(var(--tm-r) * 0.5);
    --r-sm: var(--tm-r);
    --r-md: calc(var(--tm-r) * 1.34);
    --r-lg: calc(var(--tm-r) * 2);
    --r-btn: var(--tm-r);
    --card-radius: var(--tm-r);
    --card-bg: #fff;
    --card-border: 1px solid var(--tm-line);
    --card-shadow: none;
    --shadow-lift: 0 18px 40px -24px rgba(12, 31, 51, 0.35);

    --w-container: 76rem;
    --w-wide: 84rem;
    --sp-xs: 1.25rem;
    --sp-sm: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
    --sp-md: clamp(2.75rem, 2rem + 3vw, 4.25rem);
    --sp-lg: clamp(3.5rem, 2.5rem + 4.5vw, 5.75rem);
}

/* -------------------------------------------------------------------------
   4. Base
   ------------------------------------------------------------------------- */
html.terma body {
    background: var(--tm-page);
    color: var(--tm-ink);
    font-family: var(--terma-font-text);
    font-feature-settings: 'cv11' 1, 'ss01' 1;
}

.tm-wrap {
    width: min(100% - 2 * var(--gutter), var(--w-wide));
    margin-inline: auto;
}

html.terma :is(h1, h2, h3, h4),
html.terma .cms-section__title {
    font-family: var(--terma-font-display);
    font-weight: 650;
    letter-spacing: -0.022em;
    line-height: 1.12;
    color: var(--c-text-strong);
}

/* Section heads: a short cold-to-hot rule above the title. */
html.terma .cms-section__head--left { margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem); }
html.terma .cms-section__head::before {
    content: '';
    display: block;
    width: 3rem;
    height: 3px;
    margin-bottom: 0.9rem;
    border-radius: 2px;
    background: var(--tm-pipe);
}
html.terma .cms-section__head--center::before { margin-inline: auto; }
html.terma .cms-section__head--right::before { margin-left: auto; }
html.terma .cms-section__title { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); }
html.terma .cms-section__subtitle { color: var(--tm-ink-2); max-width: 46rem; margin-top: 0.45rem; }
html.terma .cms-section__head--center .cms-section__subtitle { margin-inline: auto; }

html.terma .cms-tone-soft { --section-bg: var(--tm-soft); background: var(--tm-soft); }
html.terma .cms-tone-dark { --section-bg: var(--tm-navy); background: var(--tm-navy); }
/* Tones work by redefinition (the parent's /design.css is not linked). */
html.terma :is(.cms-tone-dark, .cms-calc__result) {
    --c-text: #dbe4ee;
    --c-text-strong: #ffffff;
    --c-text-muted: #b4c3d3;
    --c-text-faint: #93a6ba;
    --c-border: rgba(255, 255, 255, 0.14);
    --c-border-strong: rgba(255, 255, 255, 0.28);
    --c-surface: var(--tm-navy-2);
    --c-surface-sunk: #102840;
    --c-bg: var(--tm-navy);
    --c-link: #9cc7f2;
    --c-link-hover: #fff;
    --c-accent: var(--tm-hot);
    --c-accent-hover: var(--tm-hot-deep);
    --c-accent-soft: rgba(255, 255, 255, 0.08);
    color: var(--c-text);
}
/* a light card inside a dark band goes back to the page's ink */
html.terma .cms-tone-dark :is(.cms-leadform__box, .cms-card:not(.cms-card--plain)) {
    --c-text: var(--tm-ink);
    --c-text-strong: #07182a;
    --c-text-muted: var(--tm-ink-2);
    --c-text-faint: var(--tm-ink-3);
    --c-border: var(--tm-line);
    --c-border-strong: var(--tm-line-2);
    --c-surface: #fff;
    --c-surface-sunk: var(--tm-soft);
    --c-link: var(--tm-cold);
    --c-accent: var(--tm-cold);
    color: var(--tm-ink);
    background: #fff;
}
html.terma .cms-tone-dark .cms-leadform__bullets .cms-icon { background: rgba(255, 255, 255, 0.08); }
html.terma .cms-tone-dark .cms-section__title { color: #fff; }
html.terma .cms-tone-dark .cms-section__subtitle { color: #b4c3d3; }
html[data-terma-grid="on"] .cms-tone-dark {
    background-color: var(--tm-navy);
    background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 24px 24px;
}

html.terma a { text-underline-offset: 0.18em; }
html.terma :focus-visible { outline: 2px solid var(--tm-cold); outline-offset: 2px; }

/* the figures font everywhere a number matters */
.tm-fig,
html.terma :is(.shop-price, .shop-price__value, .shop-price__now, .shop-price__old, .shop-table__spec, .shop-table__sku, .shop-card__sku, .shop-cart__total, .cms-calc__total-value, .cms-calc__number, .cms-stats__value) {
    font-family: var(--tm-fig);
    font-variant-numeric: tabular-nums;
}

/* Buttons */
html.terma .cms-btn,
.tm-btn {
    font-family: var(--terma-font-text);
    font-weight: 600;
    letter-spacing: 0;
    border-radius: var(--tm-r);
}
.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3rem;
    padding: 0.7rem 1.35rem;
    font-size: 1rem;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tm-btn .cms-icon { width: 1.1em; height: 1.1em; }
.tm-btn--cold { background: var(--tm-cold); color: #fff; }
.tm-btn--cold:hover { background: var(--tm-cold-deep); color: #fff; }
.tm-btn--hot { background: #fff; color: var(--tm-hot-text); border-color: var(--tm-hot); }
.tm-btn--hot:hover { background: var(--tm-hot); color: #fff; }
html.terma .cms-btn--primary { background: var(--tm-cold); border-color: var(--tm-cold); color: #fff; }
html.terma .cms-btn--primary:hover { background: var(--tm-cold-deep); border-color: var(--tm-cold-deep); }

.tm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1rem;
    padding: 0.3rem 0.75rem 0.3rem 0.55rem;
    border: 1px solid var(--tm-line);
    border-radius: 999px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tm-ink-2);
}
.tm-eyebrow__dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: conic-gradient(var(--tm-cold) 0 50%, var(--tm-hot) 50% 100%);
}

.tm-more { margin: 1.5rem 0 0; }
.tm-more__link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--tm-cold); text-decoration: none; }
.tm-more__link:hover { text-decoration: underline; }
.tm-more__link .cms-icon { width: 1rem; height: 1rem; }

/* the cold-to-hot line */
.tm-pipe { height: 3px; background: var(--tm-pipe); }
html[data-terma-pipe="off"] .tm-pipe { display: none; }

/* schematic icons */
.tm-ico { width: 3rem; height: 3rem; color: var(--tm-ink); }
.tm-ico .tm-ico__hot { stroke: var(--tm-hot); }
.tm-ico circle.tm-ico__hot { fill: var(--tm-hot); stroke: none; }
.tm-ico .tm-ico__cold { stroke: var(--tm-cold); }

/* -------------------------------------------------------------------------
   5. Header
   ------------------------------------------------------------------------- */
.tm-hdr {
    position: relative;
    z-index: 40;
    background: #fff;
    border-bottom: 0;
    box-shadow: none;
}
html.terma .site-header--sticky.tm-hdr { position: sticky; top: 0; }

/* service row */
.tm-top {
    background: var(--tm-soft);
    border-bottom: 1px solid var(--tm-line);
    color: var(--tm-ink-2);
    font-size: 0.8125rem;
}
.tm-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 2.35rem;
}
.tm-top__zone { display: flex; align-items: center; gap: 1.5rem; min-width: 0; }
.tm-top .hdr-text { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.tm-top .hdr-text .cms-icon { width: 15px; height: 15px; color: var(--tm-cold); }
.tm-top .hdr-links { display: flex; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.tm-top a { color: var(--tm-ink-2); text-decoration: none; }
.tm-top a:hover { color: var(--tm-cold); }
html.terma .tm-top .hdr-phone { display: flex; flex-direction: row; align-items: baseline; gap: 0.5rem; }
.tm-top .hdr-phone__number {
    font-family: var(--tm-fig);
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tm-ink);
}
.tm-top .hdr-phone__caption { color: var(--tm-ink-3); font-size: 0.75rem; }
.tm-top .hdr-phone__icon { display: none; }

/* main row */
.tm-main { background: #fff; }
.tm-main__inner {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 0.4rem + 1.2vw, 2rem);
    min-height: 4.75rem;
}
.tm-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--tm-ink);
    text-decoration: none;
    flex: none;
}
.tm-logo__img { height: var(--logo-h, 40px); width: auto; }
.tm-mark { width: 2.6rem; height: 2.6rem; color: var(--tm-ink); flex: none; }
.tm-mark .tm-mark__cold { stroke: var(--tm-cold); }
.tm-mark .tm-mark__hot { stroke: var(--tm-hot); }
.tm-logo__text { display: grid; line-height: 1; }
.tm-logo__name {
    font-family: var(--terma-font-display);
    font-size: 1.55rem;
    font-weight: 750;
    letter-spacing: -0.03em;
}
.tm-logo__tagline {
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--tm-ink-3);
}
.tm-logo:hover .tm-logo__name { color: var(--tm-cold); }

.tm-main__center { flex: 1 1 auto; min-width: 0; max-width: 44rem; margin-inline: auto; }
.tm-main__center .hdr-el { width: 100%; }
.tm-main__right { display: flex; align-items: center; gap: 0.35rem; flex: none; }
.tm-main .hdr-actions:empty { display: none; }
.tm-main :is(input[type="search"], .shop-search__input, .shop-hsearch__input) {
    min-height: 2.9rem;
    border: 1.5px solid var(--tm-line-2);
    border-radius: var(--tm-r);
    background: #fff;
}
.tm-main :is(input[type="search"], .shop-search__input, .shop-hsearch__input):focus { border-color: var(--tm-cold); }
.tm-main :is(.hdr-icon-btn, .shop-hdr-btn, .shop-cart-btn, .shop-hlink) { color: var(--tm-ink); }

/* menu row: equal cells split by hairlines */
.tm-bar {
    background: #fff;
    border-top: 1px solid var(--tm-line);
    border-bottom: 1px solid var(--tm-line);
}
.tm-bar__inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.1rem;
}
.tm-bar__zone { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.tm-bar__zone--left { flex: 1 1 auto; align-items: stretch; }
.tm-bar .hdr-nav { width: 100%; display: flex; }
.tm-bar .hdr-nav__list { gap: 0; align-items: stretch; }
.tm-bar .hdr-nav__item { border-right: 1px solid var(--tm-line); }
.tm-bar .hdr-nav__item:first-child { border-left: 1px solid var(--tm-line); }
.tm-bar .hdr-nav__link {
    position: relative;
    min-height: 3.1rem;
    padding: 0 0.8rem;
    gap: 0.4rem;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tm-ink);
}
.tm-bar .hdr-nav__link > span { background-image: none; }
.tm-bar .hdr-nav__link .cms-icon { width: 17px; height: 17px; color: var(--tm-cold); }
.tm-bar .hdr-nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--tm-pipe);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease);
}
.tm-bar .hdr-nav__link:hover { background: var(--tm-cold-soft); }
.tm-bar .hdr-nav__link:hover::after,
.tm-bar .hdr-nav__link.is-active::after { transform: scaleX(1); }
.tm-bar .hdr-nav__item--parent > .hdr-nav__link:not(.hdr-nav__heading) { padding-inline-end: 0.3rem; }
.tm-bar .hdr-nav__toggle { margin-right: 0.35rem; }
.tm-bar .hdr-nav__item--highlight > .hdr-nav__link { color: var(--tm-hot-text); }
.tm-bar .hdr-nav__item--highlight > .hdr-nav__link .cms-icon { color: var(--tm-hot); }
.tm-bar .hdr-sub { padding-top: 0; }
.tm-bar .hdr-sub__list {
    border-radius: 0 0 var(--tm-r) var(--tm-r);
    border-top: 2px solid var(--tm-cold);
}
.tm-bar .hdr-button .cms-btn,
.tm-bar .cms-btn {
    min-height: 2.35rem;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    background: var(--tm-hot);
    border-color: var(--tm-hot);
    color: #fff;
}
.tm-bar .cms-btn:hover { background: var(--tm-hot-deep); border-color: var(--tm-hot-deep); }

.tm-burger { display: none; }
.tm-drawer .tm-logo__name { font-size: 1.25rem; }
.tm-drawer .tm-mark { width: 2.2rem; height: 2.2rem; }

@media (max-width: 1180px) {
    .tm-top__zone--left .hdr-text:nth-child(n + 3) { display: none; }
    .tm-logo__tagline { display: none; }
    .tm-bar .hdr-nav__link .cms-icon { display: none; }
    .tm-bar .hdr-nav__link { padding: 0 0.7rem; }
}
@media (max-width: 900px) {
    .tm-top { display: none; }
    .tm-bar { display: none; }
    .tm-burger { display: inline-grid; }
    .tm-main__inner { min-height: 3.75rem; flex-wrap: wrap; row-gap: 0; }
    .tm-logo__name { font-size: 1.3rem; }
    .tm-mark { width: 2.2rem; height: 2.2rem; }
    .tm-main__center { order: 5; flex-basis: 100%; max-width: none; padding-bottom: 0.6rem; }
    .tm-main__center:empty { display: none; }
    .tm-main__right { margin-left: auto; }
}
@media (max-width: 600px) {
    .tm-main__right > .hdr-el:not(.hdr-el--mobile) { display: none; }
    .tm-main__inner { gap: 0.6rem; }
}

/* -------------------------------------------------------------------------
   6. Footer
   ------------------------------------------------------------------------- */
.tm-ftr {
    margin-top: var(--sp-md);
    background: var(--tm-soft);
    color: var(--tm-ink);
    border-top: 0;
}
.tm-ftr__band { background: var(--tm-cold); color: #fff; }
.tm-ftr__band-inner {
    display: grid;
    grid-template-columns: 1fr minmax(0, 28rem);
    gap: 2rem;
    align-items: center;
    padding-block: 2rem;
}
.tm-ftr__band-title { color: #fff; font-size: 1.5rem; margin: 0; }
.tm-ftr__band-lead { color: rgba(255, 255, 255, 0.82); margin: 0.5rem 0 0; }

.tm-ftr__sheet {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(10.5rem, 1fr));
    margin-block: clamp(1.75rem, 1rem + 2.5vw, 3rem);
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    background: #fff;
    overflow: hidden;
}
.tm-ftr__col {
    padding: clamp(1.1rem, 0.8rem + 1vw, 1.6rem);
    border-left: 1px solid var(--tm-line);
    min-width: 0;
}
.tm-ftr__col:first-child { border-left: 0; }
.tm-ftr__col--about { background: #fff var(--tm-graph); }
.tm-ftr__title {
    margin: 0 0 0.9rem;
    font-family: var(--terma-font-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tm-cold);
}
.tm-ftr__about { color: var(--tm-ink-2); font-size: 0.92rem; max-width: 26rem; margin: 1rem 0; line-height: 1.55; }
.tm-logo--ftr .tm-logo__name { font-size: 1.4rem; }
.tm-ftr__menu { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; font-size: 0.92rem; }
.tm-ftr a { color: var(--tm-ink); text-decoration: none; }
.tm-ftr a:hover { color: var(--tm-cold); text-decoration: underline; }
.tm-ftr__menu a.is-hot { color: var(--tm-hot-text); font-weight: 600; }
.tm-ftr__contacts { font-style: normal; display: grid; gap: 0.55rem; font-size: 0.9rem; }
.tm-ftr__contacts p { margin: 0; }
.tm-ftr__phone a {
    font-family: var(--tm-fig);
    font-variant-numeric: tabular-nums;
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
}
.tm-ftr__phone span { display: block; font-size: 0.78rem; color: var(--tm-ink-3); }
.tm-ftr__line { display: flex; gap: 0.5rem; align-items: flex-start; color: var(--tm-ink-2); overflow-wrap: anywhere; }
.tm-ftr__line .cms-icon { width: 16px; height: 16px; flex: none; margin-top: 0.2rem; color: var(--tm-cold); }
.tm-ftr__pay { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.tm-ftr__pay-item {
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--tm-line-2);
    border-radius: var(--tm-r);
    background: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tm-ink-2);
}
.tm-ftr__bottom { background: var(--tm-navy); color: #a9b8c8; font-size: 0.82rem; }
.tm-ftr__bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    padding-block: 1rem;
}
.tm-ftr__bottom a { color: #dbe4ee; }
.tm-ftr__bottom a:hover { color: #fff; }
.tm-ftr__copy, .tm-ftr__company { margin: 0; }
.tm-ftr__links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.tm-ftr .site-footer__slot:empty { display: none; }
@media (max-width: 1000px) {
    .tm-ftr__sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tm-ftr__col--about { grid-column: 1 / -1; }
    .tm-ftr__col { border-left: 0; border-top: 1px solid var(--tm-line); }
    .tm-ftr__col--about { border-top: 0; }
    .tm-ftr__col:nth-child(2n + 1):not(.tm-ftr__col--about) { border-left: 1px solid var(--tm-line); }
    .tm-ftr__band-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .tm-ftr__sheet { grid-template-columns: 1fr; }
    .tm-ftr__col:nth-child(n) { border-left: 0; }
}

/* -------------------------------------------------------------------------
   7. Shared blocks the template meets on its pages
   ------------------------------------------------------------------------- */
/* FAQ: hairline rows, a plus that turns into a minus */
html.terma .cms-block--faq details {
    border: 0;
    border-bottom: 1px solid var(--tm-line);
    border-radius: 0;
    background: none;
}
html.terma .cms-block--faq summary { font-weight: 600; color: var(--tm-ink); }
html.terma .cms-block--faq details[open] summary { color: var(--tm-cold); }

/* features / steps / stats as data cells */
html.terma .cms-block--features [class*="feature-card"],
html.terma .cms-block--features .cms-card {
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    box-shadow: none;
}
html.terma .cms-block--features [class*="__icon"] { color: var(--tm-cold); }
html.terma .cms-block--steps [class*="__num"],
html.terma .cms-block--steps [class*="__marker"] { font-family: var(--tm-fig); color: var(--tm-cold); }

/* stages: the current step in heat orange */
html.terma .cms-stages { --stage-accent: var(--tm-cold); }
html.terma .cms-stages [class*="--current"] [class*="__num"],
html.terma .cms-stages [class*="--current"] [class*="__marker"] { background: var(--tm-hot); border-color: var(--tm-hot); color: #fff; }

/* pricing table: the featured plan framed in heat orange */
html.terma .cms-ptable [class*="--featured"] { border-color: var(--tm-hot); box-shadow: 0 0 0 1px var(--tm-hot) inset; }
html.terma .cms-ptable [class*="__badge"] { background: var(--tm-hot); color: #fff; }
html.terma .cms-ptable [class*="__price"] { font-family: var(--tm-fig); }

/* calculator — the boiler selection: a data sheet with a heat result */
html.terma .cms-calc__inputs,
html.terma .cms-calc__result {
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    box-shadow: none;
}
html.terma .cms-calc__inputs { background: #fff; }
html.terma .cms-calc__result {
    position: relative;
    overflow: hidden;
    background: var(--tm-navy);
    color: #eef3f8;
    border-color: var(--tm-navy);
}
html.terma .cms-calc__result::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--tm-pipe);
}
html.terma .cms-calc__result :is(.cms-calc__total-label, .cms-calc__note, .cms-calc__lines, .cms-calc__breakdown-title) { color: #b4c3d3; }
html.terma .cms-calc__total-value { color: #fff; font-weight: 750; letter-spacing: -0.02em; }
html.terma .cms-calc__result .cms-calc__send-title { color: #fff; }
html.terma .cms-calc__result :is(input, select, textarea) { background: #fff; color: var(--tm-ink); }
html.terma .cms-calc__result a { color: #9cc7f2; }
html.terma .cms-calc__result .cms-btn--primary,
html.terma .cms-calc__button { background: var(--tm-hot); border-color: var(--tm-hot); color: #fff; }
html.terma .cms-calc__result .cms-btn--primary:hover,
html.terma .cms-calc__button:hover { background: var(--tm-hot-deep); border-color: var(--tm-hot-deep); }
html.terma .cms-calc__variant-card { border-radius: var(--tm-r); }
html.terma .cms-calc__variant input:checked + .cms-calc__variant-card,
html.terma .cms-calc__radio:checked + .cms-calc__variant-card { border-color: var(--tm-cold); box-shadow: 0 0 0 1px var(--tm-cold) inset; background: var(--tm-cold-soft); }
html.terma .cms-calc__variant-price { font-family: var(--tm-fig); color: var(--tm-cold); }
html.terma .cms-calc__range { accent-color: var(--tm-hot); }
html.terma .cms-calc__label { font-weight: 600; }

/* lead form on a dark band */
html.terma .cms-block--form .cms-leadform__box {
    border-radius: var(--tm-r);
    border: 1px solid var(--tm-line);
    box-shadow: none;
}
html.terma .cms-tone-dark .cms-leadform__box { border-color: transparent; border-top: 4px solid var(--tm-hot); }
html.terma .cms-tone-dark .cms-leadform__bullets .cms-icon { color: var(--tm-hot); }
html.terma .cms-leadform__box .cms-btn--primary { background: var(--tm-hot); border-color: var(--tm-hot); }
html.terma .cms-leadform__box .cms-btn--primary:hover { background: var(--tm-hot-deep); border-color: var(--tm-hot-deep); }

/* media + text: the photo in a hairline frame */
html.terma .cms-block--media_text img { border-radius: var(--tm-r); }

/* -------------------------------------------------------------------------
   8. Own blocks
   ------------------------------------------------------------------------- */
/* --- hero --- */
.tm-hero { padding-top: clamp(0.75rem, 0.4rem + 1.2vw, 1.75rem); }
.tm-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    overflow: hidden;
    background: #fff;
}
.tm-hero__copy {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(1.75rem, 1rem + 3vw, 3.75rem);
    padding-bottom: clamp(4rem, 3rem + 3vw, 5.5rem);
}
html[data-terma-grid="on"] .tm-hero__copy { background: #fff var(--tm-graph); }
.tm-hero__title {
    margin: 0;
    font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    max-width: 16ch;
}
.tm-hero__lead {
    margin: 1.1rem 0 0;
    max-width: 36rem;
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    line-height: 1.55;
    color: var(--tm-ink-2);
}
.tm-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.tm-hero__loop {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.25rem;
    width: 100%;
    height: 2.4rem;
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
}
.tm-hero__loop-hot { stroke: var(--tm-hot); }
.tm-hero__loop-cold { stroke: var(--tm-cold); }
.tm-hero__media {
    position: relative;
    min-height: clamp(20rem, 14rem + 18vw, 34rem);
    border-left: 1px solid var(--tm-line);
    background: var(--tm-soft);
}
.tm-hero__media picture { position: absolute; inset: 0; }
.tm-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tm-hero--nophoto .tm-hero__media { background: var(--tm-soft) var(--tm-graph); }

.tm-callout {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 2;
    display: flex;
    align-items: center;
    transform: translate(-0.4rem, -50%);
}
.tm-callout__dot {
    width: 0.8rem;
    height: 0.8rem;
    flex: none;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--tm-hot);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tm-hot) 30%, transparent);
}
.tm-callout__tag {
    position: relative;
    display: grid;
    margin-left: 2.25rem;
    padding: 0.45rem 0.7rem;
    border-radius: var(--tm-r);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px -14px rgba(12, 31, 51, 0.6);
    line-height: 1.2;
    white-space: nowrap;
}
.tm-callout__tag::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    width: 2.25rem;
    height: 1.5px;
    background: #fff;
}
.tm-callout--left { flex-direction: row-reverse; transform: translate(calc(-100% + 0.4rem), -50%); }
.tm-callout--left .tm-callout__tag { margin-left: 0; margin-right: 2.25rem; }
.tm-callout--left .tm-callout__tag::before { right: auto; left: 100%; }
.tm-callout__label { font-size: 0.78rem; font-weight: 600; color: var(--tm-ink-2); text-decoration: none; }
a.tm-callout__label:hover { color: var(--tm-cold); text-decoration: underline; }
.tm-callout__value { font-family: var(--tm-fig); font-variant-numeric: tabular-nums; font-size: 0.95rem; font-weight: 700; color: var(--tm-ink); }

.tm-hero__figures {
    display: grid;
    grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--tm-line);
    border-top: 0;
    border-radius: 0 0 var(--tm-r) var(--tm-r);
    background: #fff;
}
.tm-hero:has(.tm-hero__figures) .tm-hero__grid { border-radius: var(--tm-r) var(--tm-r) 0 0; }
.tm-hero__figure {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem clamp(1rem, 0.6rem + 1vw, 1.5rem);
    border-left: 1px solid var(--tm-line);
}
.tm-hero__figure:first-child { border-left: 0; }
.tm-hero__num {
    font-family: var(--tm-fig);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.9rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--tm-cold);
    line-height: 1.1;
}
.tm-hero__figure:nth-child(3) .tm-hero__num { color: var(--tm-hot-text); }
.tm-hero__cap { font-size: 0.85rem; color: var(--tm-ink-2); line-height: 1.3; }
@media (max-width: 900px) {
    .tm-hero__grid { grid-template-columns: 1fr; }
    .tm-hero__media { border-left: 0; border-top: 1px solid var(--tm-line); min-height: 17rem; order: -1; }
    .tm-hero__figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tm-hero__figure:nth-child(3) { border-left: 0; }
    .tm-hero__figure:nth-child(n + 3) { border-top: 1px solid var(--tm-line); }
    .tm-callout__tag { padding: 0.35rem 0.55rem; }
    .tm-callout__label { font-size: 0.7rem; }
    .tm-callout__value { font-size: 0.82rem; }
}
@media (max-width: 520px) {
    .tm-callout:nth-of-type(n + 3) { display: none; }
    .tm-callout__tag { margin-left: 1.25rem; }
    .tm-callout__tag::before { width: 1.25rem; }
    .tm-callout--left .tm-callout__tag { margin-right: 1.25rem; }
    .tm-hero__actions .tm-btn { flex: 1 1 100%; }
}

/* --- engineering systems --- */
.tm-systems__grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--tm-line);
    border-left: 1px solid var(--tm-line);
}
.tm-system {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(1.1rem, 0.8rem + 1vw, 1.6rem);
    border-right: 1px solid var(--tm-line);
    border-bottom: 1px solid var(--tm-line);
    background: #fff;
    transition: background var(--dur) var(--ease);
}
.tm-system::before {
    content: '';
    position: absolute;
    inset: -1px -1px auto;
    height: 3px;
    background: var(--tm-pipe);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 240ms var(--ease);
}
.tm-system:hover { background: var(--tm-cold-soft); }
.tm-system:hover::before { transform: scaleX(1); }
.tm-system__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.tm-system .tm-ico { width: 3.25rem; height: 3.25rem; }
.tm-system .tm-ico .tm-ico__hot { transition: stroke 240ms var(--ease); }
.tm-system__num { font-family: var(--tm-fig); font-size: 0.85rem; font-weight: 600; color: var(--tm-ink-3); }
.tm-system__title { margin: 0; font-size: 1.2rem; }
.tm-system__link { color: inherit; text-decoration: none; }
.tm-system__link::after { content: ''; position: absolute; inset: 0; }
.tm-system__link:focus-visible { outline: none; }
.tm-system:has(.tm-system__link:focus-visible) { outline: 2px solid var(--tm-cold); outline-offset: -2px; }
.tm-system__text { margin: 0.4rem 0 0; color: var(--tm-ink-2); font-size: 0.93rem; }
.tm-system__meta { margin: 0.65rem 0 0; font-size: 0.8rem; color: var(--tm-ink-3); }
.tm-system__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: auto 0 0;
    padding-top: 1rem;
}
.tm-system__price { font-family: var(--tm-fig); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--tm-ink); }
.tm-system__go {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-left: auto;
    border: 1px solid var(--tm-line-2);
    border-radius: 50%;
    color: var(--tm-cold);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tm-system__go .cms-icon { width: 1rem; height: 1rem; }
.tm-system:hover .tm-system__go { background: var(--tm-cold); border-color: var(--tm-cold); color: #fff; }
@media (max-width: 1000px) { .tm-systems__grid { --cols: 2 !important; } }
@media (max-width: 560px) { .tm-systems__grid { --cols: 1 !important; } .tm-system__top { margin-bottom: 0.6rem; } }

/* --- prices for installers --- */
.tm-trade {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 1rem + 3vw, 4rem);
    align-items: start;
}
.tm-trade__text { color: var(--tm-ink-2); max-width: 36rem; }
.tm-trade__text p { margin: 0 0 0.75rem; }
.tm-trade__perks { margin: 1.25rem 0 1.75rem; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.tm-trade__perks li { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; }
.tm-trade__perks .cms-icon {
    flex: none;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0.2rem;
    border-radius: 50%;
    background: var(--tm-cold-soft);
    color: var(--tm-cold);
}
.tm-levels {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    background: #fff;
    overflow: hidden;
}
.tm-level {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
    padding: 1.1rem 1.25rem;
    border-top: 1px solid var(--tm-line);
}
.tm-level:first-child { border-top: 0; }
.tm-level.is-hot { background: var(--tm-hot-soft); box-shadow: 3px 0 0 var(--tm-hot) inset; }
.tm-level__who { font-weight: 650; font-size: 1.05rem; }
.tm-level__val {
    font-family: var(--tm-fig);
    font-variant-numeric: tabular-nums;
    font-size: 1.25rem;
    font-weight: 750;
    text-align: right;
    color: var(--tm-cold);
}
.tm-level.is-hot .tm-level__val { color: var(--tm-hot-text); }
/* the whole track is the cold-to-hot gradient; the span hides what the level
   does not reach, so a longer bar is a warmer one */
.tm-level__bar {
    position: relative;
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 3px;
    background: var(--tm-pipe);
    overflow: hidden;
}
.tm-level__bar > span { position: absolute; top: 0; right: 0; bottom: 0; background: var(--tm-sunk); }
.tm-level__note { grid-column: 1 / -1; font-size: 0.85rem; color: var(--tm-ink-2); }
.tm-trade__note { margin: 0.8rem 0 0; font-size: 0.82rem; color: var(--tm-ink-3); }
@media (max-width: 900px) { .tm-trade { grid-template-columns: 1fr; } }

/* --- installation packages --- */
.tm-service { display: grid; gap: 1rem; }
.tm-service--photo { grid-template-columns: minmax(0, 0.8fr) minmax(0, 3fr); align-items: stretch; }
.tm-service__pic { position: relative; margin: 0; min-height: 16rem; border-radius: var(--tm-r); overflow: hidden; background: var(--tm-soft); }
.tm-service__pic picture { position: absolute; inset: 0; }
.tm-service__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tm-service__list {
    display: grid;
    grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tm-pack {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.35rem;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    background: #fff;
}
.tm-pack.is-featured { border-color: var(--tm-hot); box-shadow: 0 0 0 1px var(--tm-hot) inset; }
.tm-pack__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.9rem; }
.tm-pack__badge {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--tm-hot);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}
.tm-pack__title { margin: 0; font-size: 1.2rem; }
.tm-pack__text { margin: 0.4rem 0 0; color: var(--tm-ink-2); font-size: 0.93rem; }
.tm-pack__includes { margin: 1rem 0 0; padding: 0.9rem 0 0; list-style: none; display: grid; gap: 0.45rem; border-top: 1px dashed var(--tm-line-2); font-size: 0.9rem; }
.tm-pack__includes li { display: flex; gap: 0.5rem; align-items: flex-start; }
.tm-pack__includes .cms-icon { flex: none; width: 1rem; height: 1rem; margin-top: 0.2rem; color: var(--tm-cold); }
.tm-pack__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1rem;
    margin-top: auto;
    padding-top: 1.1rem;
}
.tm-pack__price { font-family: var(--tm-fig); font-variant-numeric: tabular-nums; font-size: 1.2rem; font-weight: 750; color: var(--tm-ink); }
.tm-pack__term { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; color: var(--tm-ink-2); }
.tm-pack__term .cms-icon { width: 14px; height: 14px; }
.tm-pack__link { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: auto; font-weight: 600; font-size: 0.9rem; color: var(--tm-cold); text-decoration: none; }
.tm-pack__link:hover { text-decoration: underline; }
.tm-pack__link .cms-icon { width: 15px; height: 15px; }
@media (max-width: 1100px) {
    .tm-service--photo { grid-template-columns: 1fr; }
    .tm-service__pic { min-height: 0; aspect-ratio: 16 / 7; }
}
@media (max-width: 900px) { .tm-service__list { grid-template-columns: 1fr; } }

/* --- brand nameplates --- */
.tm-brands__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tm-plate {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 9.5rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    background: #fff;
    transition: border-color var(--dur) var(--ease);
}
.tm-plate:hover { border-color: var(--tm-cold); }
.tm-plate__country {
    align-self: flex-start;
    margin-bottom: 0.9rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--tm-line-2);
    border-radius: 3px;
    font-family: var(--tm-fig);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tm-ink-3);
}
.tm-plate__name { margin: 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.tm-plate__logo { max-height: 2.5rem; width: auto; }
.tm-plate__link { color: var(--tm-ink); text-decoration: none; }
.tm-plate__link::after { content: ''; position: absolute; inset: 0; }
.tm-plate__text { margin: 0.4rem 0 0; font-size: 0.87rem; color: var(--tm-ink-2); padding-right: 1.5rem; }
.tm-plate__go { position: absolute; right: 1rem; bottom: 1rem; color: var(--tm-ink-3); }
.tm-plate__go .cms-icon { width: 1.1rem; height: 1.1rem; }
.tm-plate:hover .tm-plate__go { color: var(--tm-cold); }

/* --- guides --- */
.tm-guides__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(1rem, 0.5rem + 2vw, 2.5rem);
    align-items: start;
}
.tm-guides__grid--one { grid-template-columns: minmax(0, 1fr); max-width: 44rem; }
.tm-guide { position: relative; }
.tm-guide__pic { position: relative; margin: 0 0 1rem; aspect-ratio: 16 / 10; border-radius: var(--tm-r); overflow: hidden; background: var(--tm-soft) var(--tm-graph); }
.tm-guide__pic picture { position: absolute; inset: 0; }
.tm-guide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.tm-guide--lead:hover .tm-guide__img { transform: scale(1.03); }
.tm-guide__meta { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0 0 0.35rem; font-size: 0.8rem; color: var(--tm-ink-3); }
.tm-guide__meta .cms-icon { width: 14px; height: 14px; }
.tm-guide__title { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.tm-guide--lead .tm-guide__title { font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.65rem); }
.tm-guide__link { color: var(--tm-ink); text-decoration: none; }
.tm-guide__link::after { content: ''; position: absolute; inset: 0; }
.tm-guide__link:hover { color: var(--tm-cold); }
.tm-guide__excerpt { margin: 0.5rem 0 0; color: var(--tm-ink-2); font-size: 0.93rem; }
.tm-guides__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--tm-line); }
.tm-guide--row {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--tm-line);
}
.tm-guide--row .tm-guide__meta { margin: 0.5rem 0 0; }
.tm-guide--row .tm-guide__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-guide__num { font-family: var(--tm-fig); font-size: 1.35rem; font-weight: 750; color: var(--tm-cold); line-height: 1.1; }
@media (max-width: 900px) { .tm-guides__grid { grid-template-columns: 1fr; } }

/* --- delivery table --- */
.tm-delivery__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    overflow: hidden;
    background: #fff;
}
.tm-delivery__table thead th {
    padding: 0.7rem 1.1rem;
    background: var(--tm-soft);
    border-bottom: 1px solid var(--tm-line);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    color: var(--tm-cold);
}
.tm-delivery__table :is(tbody th, tbody td) { padding: 1rem 1.1rem; border-top: 1px solid var(--tm-line); text-align: left; vertical-align: middle; }
.tm-delivery__table tbody tr:first-child :is(th, td) { border-top: 0; }
.tm-delivery__method { display: flex; align-items: center; gap: 1rem; font-weight: 400; }
.tm-delivery__method .tm-ico { width: 2.5rem; height: 2.5rem; flex: none; }
.tm-delivery__what { display: grid; gap: 0.15rem; }
.tm-delivery__title { font-weight: 650; }
.tm-delivery__text { font-size: 0.87rem; color: var(--tm-ink-2); }
.tm-delivery__term { color: var(--tm-ink-2); white-space: nowrap; }
.tm-delivery__price { font-family: var(--tm-fig); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.tm-delivery__note { margin: 1rem 0 0; font-size: 0.9rem; color: var(--tm-ink-2); padding-left: 0.9rem; border-left: 3px solid var(--tm-hot); }
@media (max-width: 720px) {
    .tm-delivery__table thead { display: none; }
    .tm-delivery__table,
    .tm-delivery__table tbody,
    .tm-delivery__row { display: block; }
    .tm-delivery__row { border-top: 1px solid var(--tm-line); padding: 0.9rem 1rem; }
    .tm-delivery__row:first-child { border-top: 0; }
    .tm-delivery__table :is(tbody th, tbody td) { display: flex; padding: 0; border: 0; white-space: normal; }
    .tm-delivery__table tbody td { justify-content: space-between; gap: 1rem; margin-top: 0.35rem; margin-left: 3.5rem; font-size: 0.9rem; }
    .tm-delivery__table tbody td[data-label]::before { content: attr(data-label); color: var(--tm-ink-3); font-family: var(--terma-font-text); font-weight: 400; }
}

/* -------------------------------------------------------------------------
   9. Shop
   ------------------------------------------------------------------------- */
html.terma .shop-price__value { font-weight: 750; color: var(--tm-ink); }
html.terma .shop-price__off { background: var(--tm-hot); color: #fff; border-radius: 3px; }
html.terma .shop-price--request { color: var(--tm-hot-text); }

/* what installers pay */
.tm-gp {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.45rem;
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.3;
}
.tm-gp__label { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--tm-ink-2); }
.tm-gp__label .cms-icon { width: 13px; height: 13px; color: var(--tm-hot); }
.tm-gp__value { font-family: var(--tm-fig); font-variant-numeric: tabular-nums; font-weight: 750; font-size: 0.95rem; color: var(--tm-hot-text); }
.tm-gp__off {
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    background: var(--tm-hot-soft);
    color: var(--tm-hot-text);
    font-family: var(--tm-fig);
    font-size: 0.72rem;
    font-weight: 700;
}
.tm-gp--xs { font-size: 0.72rem; }
.tm-gp--xs .tm-gp__value { font-size: 0.85rem; }
.tm-gp--lg {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.75rem;
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border: 1px dashed var(--tm-hot);
    border-radius: var(--tm-r);
    background: var(--tm-hot-soft);
    font-size: 0.85rem;
}
.tm-gp--lg .tm-gp__label { grid-column: 1 / -1; font-weight: 650; color: var(--tm-ink); }
.tm-gp--lg .tm-gp__value { font-size: 1.5rem; }
.tm-gp--lg .tm-gp__off { justify-self: start; align-self: center; font-size: 0.85rem; background: #fff; }
.tm-gp--lg .tm-gp__join { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; color: var(--tm-cold); }
.tm-gp--lg .tm-gp__join .cms-icon { width: 15px; height: 15px; }

/* cards — specs first */
html.terma .shop-card {
    border: 1px solid var(--tm-line);
    border-radius: var(--tm-r);
    background: #fff;
    box-shadow: none;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
html.terma .shop-card:hover { border-color: var(--tm-cold-mid); box-shadow: var(--shadow-lift); }
html.terma .shop-card__media {
    background: var(--tm-soft);
    border-bottom: 1px solid var(--tm-line);
    border-radius: var(--tm-r) var(--tm-r) 0 0;
}
html.terma .shop-card__img { mix-blend-mode: multiply; }
html.terma .shop-card__brand {
    font-family: var(--tm-fig);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tm-cold);
}
html.terma .shop-card__title { font-family: var(--terma-font-text); font-size: 0.97rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
html.terma .shop-card__link { color: var(--tm-ink); }
html.terma .shop-card__sku { font-size: 0.75rem; color: var(--tm-ink-3); }
.tm-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0.7rem 0 0.2rem;
    padding: 0;
    border: 1px solid var(--tm-line);
    border-radius: calc(var(--tm-r) * 0.7);
    overflow: hidden;
    background: var(--tm-line);
    gap: 1px;
}
.tm-specs--1 { grid-template-columns: 1fr; }
.tm-specs--3 .tm-specs__cell:last-child { grid-column: 1 / -1; }
html.terma .tm-specs__cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    margin: 0;
    padding: 0.4rem 0.55rem;
    background: #fff;
    border: 0;
}
html.terma .tm-specs__cell dt { font-size: 0.66rem; color: var(--tm-ink-3); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.terma .tm-specs__cell dd {
    margin: 0;
    font-family: var(--tm-fig);
    font-variant-numeric: tabular-nums;
    font-size: 0.84rem;
    font-weight: 650;
    color: var(--tm-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}
html.terma .shop-card--row .tm-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* a narrow card (a phone, a listing beside the filter) lists its specs as rows */
html.terma .shop-card__body { container-type: inline-size; }
@container (max-width: 15rem) {
    .tm-specs { grid-template-columns: 1fr; }
    .tm-specs--3 .tm-specs__cell:last-child { grid-column: auto; }
    html.terma .tm-specs__cell { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0.5rem; }
    html.terma .tm-specs__cell dt { flex: 0 1 auto; }
    html.terma .tm-specs__cell dd { flex: 0 0 auto; max-width: 62%; text-align: right; }
}
html.terma .shop-card__foot { border-top: 0; }
html.terma .shop-card .cms-btn { font-size: 0.85rem; }
html.terma .shop-card--request .shop-request__btn,
html.terma .shop-request__btn {
    background: #fff;
    border: 1.5px solid var(--tm-hot);
    color: var(--tm-hot-text);
    border-radius: var(--tm-r);
    font-weight: 600;
}
html.terma .shop-request__btn:hover { background: var(--tm-hot); color: #fff; }
html.terma .shop-sticker { border-radius: 3px; font-weight: 700; letter-spacing: 0.02em; }
html.terma .shop-sticker--hit { background: var(--tm-hot); color: #fff; }
html.terma .shop-sticker--new { background: var(--tm-cold); color: #fff; }
html.terma .shop-pick__chip { border-radius: calc(var(--tm-r) * 0.7); }
html.terma .shop-stock--in { color: var(--tm-ok); }

/* table view: a spec sheet */
html.terma .shop-table-wrap { border-color: var(--tm-line); border-radius: var(--tm-r); background: #fff; }
@media (min-width: 48rem) {
    html.terma .shop-table .shop-table__buy { width: 8.5rem; min-width: 8.5rem; }
    html.terma .shop-table .shop-table__price { right: 8.5rem; }
}
html.terma .shop-table .tm-gp--xs { flex-wrap: nowrap; white-space: nowrap; }
.tm-gp--xs .tm-gp__label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.terma .shop-table thead th {
    background: var(--tm-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tm-cold);
    border-bottom: 1px solid var(--tm-line-2);
}
html.terma .shop-table__row:nth-child(even) { background: #fbfcfd; }
html.terma .shop-table__row:hover { background: var(--tm-cold-soft); }
html.terma .shop-table__spec { font-weight: 600; }
html.terma .shop-table__link { color: var(--tm-ink); font-weight: 600; }
html.terma .shop-table__img { mix-blend-mode: multiply; }

/* listing chrome */
html.terma :is(.shop-toolbar, .shop-listing__bar) { border-radius: var(--tm-r); }
html.terma :is(.shop-view__btn, .shop-view button, .shop-sort select) { border-radius: var(--tm-r); }
html.terma .shop-filter { border-radius: var(--tm-r); }
html.terma :is(.shop-filter__title, .shop-facet__title, .shop-facet summary) { font-weight: 650; }
html.terma :is(.shop-cats__item, .shop-subcats a, .shop-category-tile) { border-radius: var(--tm-r); }

/* product page */
html.terma .shop-product__title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.1; letter-spacing: -0.03em; }
html.terma .shop-keyspecs { border: 1px solid var(--tm-line); border-radius: var(--tm-r); background: #fff var(--tm-graph); }
html.terma .shop-specs dd { font-family: var(--tm-fig); font-variant-numeric: tabular-nums; font-weight: 600; }
html.terma .shop-pros__item .cms-icon { color: var(--tm-cold); }
html.terma .shop-buybox { border-radius: var(--tm-r); border-color: var(--tm-line); }

/* -------------------------------------------------------------------------
   10. Variants (design settings)
   ------------------------------------------------------------------------- */
/* surfaces */
html[data-terma-surface="frost"] {
    --tm-page: #f5f8fb;
    --tm-soft: #e9f0f7;
    --tm-sunk: #dde7f1;
    --tm-line: #d3dde8;
    --tm-line-2: #b8c7d7;
}
html[data-terma-surface="paper"] {
    --tm-page: #fbfaf7;
    --tm-soft: #f3f0ea;
    --tm-sunk: #e9e4da;
    --tm-line: #e2ddd2;
    --tm-line-2: #cbc3b4;
    --tm-grid-line: rgba(110, 80, 40, 0.06);
}
html[data-terma-surface="paper"] .tm-top,
html[data-terma-surface="frost"] .tm-top { background: var(--tm-soft); }

/* header */
html[data-terma-header="blue"] .tm-bar { background: var(--tm-cold); border-color: var(--tm-cold); }
html[data-terma-header="blue"] .tm-bar .hdr-nav__item,
html[data-terma-header="blue"] .tm-bar .hdr-nav__item:first-child { border-color: rgba(255, 255, 255, 0.18); }
html[data-terma-header="blue"] .tm-bar :is(.hdr-nav__link, .hdr-nav__toggle, .hdr-nav__link .cms-icon) { color: #fff; }
html[data-terma-header="blue"] .tm-bar .hdr-nav__link:hover { background: rgba(255, 255, 255, 0.1); }
html[data-terma-header="blue"] .tm-bar .hdr-nav__link::after { background: var(--tm-hot); }
html[data-terma-header="ink"] .tm-bar { background: var(--tm-navy); border-color: var(--tm-navy); }
html[data-terma-header="ink"] .tm-bar .hdr-nav__item,
html[data-terma-header="ink"] .tm-bar .hdr-nav__item:first-child { border-color: var(--tm-navy-line); }
html[data-terma-header="ink"] .tm-bar :is(.hdr-nav__link, .hdr-nav__toggle) { color: #eef3f8; }
html[data-terma-header="ink"] .tm-bar .hdr-nav__link .cms-icon { color: #8fbdf0; }
html[data-terma-header="ink"] .tm-bar .hdr-nav__link:hover { background: var(--tm-navy-2); }
html:is([data-terma-header="blue"], [data-terma-header="ink"]) .tm-bar .hdr-nav__item--highlight > .hdr-nav__link { color: #ffc9ad; }

/* cards: photo first — the specs step back to a quiet two-line list */
html[data-terma-cards="photo"] .tm-specs { background: none; border: 0; gap: 0; grid-template-columns: 1fr; margin-top: 0.4rem; }
html[data-terma-cards="photo"] .tm-specs__cell { flex-direction: row; justify-content: space-between; gap: 0.75rem; padding: 0.15rem 0; background: none; }
html[data-terma-cards="photo"] .tm-specs__cell:nth-child(n + 3) { display: none; }
html[data-terma-cards="photo"] .tm-specs--3 .tm-specs__cell:last-child { grid-column: auto; }
html[data-terma-cards="photo"] .shop-card__media { aspect-ratio: 1 / 1.05; }

/* the graph paper off */
html[data-terma-grid="off"] :is(.tm-hero__copy, .tm-ftr__col--about, .shop-keyspecs) { background-image: none; }

@media (prefers-reduced-motion: reduce) {
    .tm-system::before,
    .tm-bar .hdr-nav__link::after,
    .tm-guide__img,
    .tm-btn,
    html.terma .shop-card { transition: none; }
    .tm-guide--lead:hover .tm-guide__img { transform: none; }
}

/* -------------------------------------------------------------------------
   11. A guide (entry-blog_post.twig)
   ------------------------------------------------------------------------- */
.tm-post { width: min(100% - 2 * var(--gutter), 46rem); margin: clamp(1.5rem, 1rem + 2vw, 3rem) auto 0; }
.tm-post__head { padding-bottom: 1.25rem; margin-bottom: 1.5rem; border-bottom: 3px solid transparent; border-image: var(--tm-pipe) 1; }
.tm-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.1rem; margin: 0 0 0.9rem; font-size: 0.85rem; color: var(--tm-ink-3); }
.tm-post__meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.tm-post__meta .cms-icon { width: 14px; height: 14px; }
.tm-post__cat { padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--tm-cold-soft); color: var(--tm-cold); font-weight: 600; text-decoration: none; }
.tm-post__title { margin: 0; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); letter-spacing: -0.03em; line-height: 1.1; }
.tm-post__lead { margin: 0.9rem 0 0; font-size: 1.15rem; line-height: 1.55; color: var(--tm-ink-2); }
.tm-post__cover { position: relative; margin: 0 0 1.75rem; aspect-ratio: 16 / 9; border: 1px solid var(--tm-line); border-radius: var(--tm-r); overflow: hidden; background: var(--tm-soft); }
.tm-post__cover picture { position: absolute; inset: 0; }
.tm-post__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tm-post__body { font-size: 1.05rem; line-height: 1.7; }
.tm-post__body h2 { margin: 2rem 0 0.6rem; font-size: 1.45rem; }
.tm-post__body blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--tm-hot); border-radius: 0 var(--tm-r) var(--tm-r) 0; background: var(--tm-hot-soft); font-style: normal; }
.tm-post__body blockquote p { margin: 0; }
.tm-post__back { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--tm-line); }

/* the table view: specs may wrap, the name column does not hog the width */
html.terma .shop-table__spec { white-space: normal; min-width: 5.5rem; }
html.terma .shop-table__name { min-width: 9rem; }
/* the cart button of a row is an icon (its words stay for screen readers) */
html.terma .shop-table__btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.terma .shop-table__btn { min-width: 2.75rem; padding-inline: 0.7rem; }
