/* Business guides: /businesses/<slug>/guides/<guide>/. Builds on main.css (.story, .nums, .btn, .crumbs). */
.guide {
  --series-1: #eb6834;
  --series-2: #2a78d6;
  --ice: #a9cdf3;
  --melt: #fdeee6;
  --box: 10px;
  --rail: 320px;
}

.guide .page-head {
  padding: clamp(0.75rem, 2vw, 1.5rem) 0 clamp(1rem, 2vw, 1.5rem);
}

.guide .page-head h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
}

.guide .lede {
  max-width: 60ch;
  margin-bottom: 0.7rem;
  font-size: 1.08rem;
  line-height: 1.5;
}

.guide .crumbs {
  margin-bottom: 0.6rem;
}

.guide .byline {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.guide .byline a {
  color: inherit;
}

.guide .head-grid,
.guide .body-grid {
  display: grid;
  gap: 1.25rem;
}

.guide .col {
  min-width: 0;
  max-width: none;
  margin: 0;
}

.guide .rail {
  display: none;
}

@media (min-width: 56rem) {
  .guide .head-grid,
  .guide .body-grid {
    grid-template-columns: minmax(0, 1fr) var(--rail);
    gap: 3rem;
  }

  .guide .head-grid {
    align-items: center;
  }

  .guide .body-grid {
    align-items: start;
  }

  .guide .rail {
    display: block;
    position: sticky;
    top: 96px;
  }

}

/* figures */
.guide figure img {
  border-radius: var(--box);
  background: var(--paper-2);
}

.guide figure.lead-fig {
  max-width: none;
  margin: 0;
}

.guide figure.lead-fig img {
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.guide figure.lead-fig figcaption {
  margin-top: 0.4rem;
  font-size: 0.78rem;
}

@media (min-width: 56rem) {
  .guide figure.lead-fig img {
    aspect-ratio: 3 / 2;
  }
}

.guide .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.guide .col p.g-note {
  margin: 0.6rem 2px 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.guide .nums {
  grid-template-columns: repeat(2, 1fr);
  margin: 0 0 0.5rem;
}

.guide .nums div {
  border-radius: var(--box);
}

.guide .nums b {
  font-size: 1.45rem;
}

/* rail */
.g-toc {
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 2px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.4;
}

.g-toc__label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.g-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.g-toc li {
  margin: 0 0 0.45rem;
}

.g-toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.g-toc a:hover {
  color: var(--accent-ink);
}

/* prose */
.guide .prose {
  max-width: none;
}

.guide .prose li {
  margin-bottom: 0.5em;
  font-size: 1.06rem;
  line-height: 1.65;
}

.guide .prose sup {
  font-size: 0.68em;
  line-height: 0;
}

.guide .prose sup a {
  padding: 0 1px;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.guide .col blockquote p {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-style: normal;
  line-height: 1.38;
}

/* cards */
.guide .cards,
.guide .prose .checklist {
  display: grid;
  gap: 0.75rem;
  margin: 1.6rem 0;
  padding: 0;
  list-style: none;
}

.guide .prose .checklist {
  grid-template-columns: 1fr 1fr;
}

.guide .cards li,
.guide .prose .checklist li {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--box);
  background: #fff;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.45;
}

.guide .cards strong,
.guide .checklist strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.guide .cards__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

@media (min-width: 40rem) {
  .guide .cards--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .guide .prose .checklist {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* table */
.guide .data {
  width: 100%;
  margin: 0.8rem 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--box);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.guide .data caption {
  padding: 0 2px 0.6rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: left;
}

.guide .data th,
.guide .data td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.guide .data tbody tr:last-child th,
.guide .data tbody tr:last-child td {
  border-bottom: 0;
}

.guide .data thead th {
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide .data .is-melt {
  background: var(--melt);
  color: #a3401a;
  font-weight: 600;
}

/* diagrams and chart share one box */
.guide .diagram,
.guide .g-chart,
.guide .scale {
  width: 100%;
  height: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--box);
  background: #fff;
}

.guide .d-snow { fill: #e9e6df; }
.guide .d-ice { fill: var(--ice); }
.guide .d-water { fill: var(--series-2); }
.guide .d-roof { stroke-width: 5; stroke-linecap: round; }
.guide .d-warm { stroke: var(--series-1); }
.guide .d-cold { stroke: var(--series-2); }
.guide .d-frame, .guide .d-gutter { fill: none; stroke: var(--ink); stroke-width: 2; }
.guide .d-heat { stroke: var(--series-1); stroke-width: 2.5; stroke-dasharray: 5 4; }
.guide .d-heat-tip { fill: var(--series-1); }
.guide .d-lead { stroke: var(--muted); stroke-width: 1; }
.guide .d-label { fill: var(--ink); font-family: var(--font-body); font-size: 14px; }
.guide .d-strong { font-family: var(--font-display); font-weight: 700; }
.guide .d-insul { fill: #f4dfa0; }
.guide .d-pipe { stroke: var(--ink); stroke-width: 6; }
.guide .d-wire { stroke: var(--ink); stroke-width: 2; }
.guide .d-gap { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.guide .d-chimney { fill: var(--line-2); stroke: var(--ink); stroke-width: 2; }
.guide .d-num circle { fill: var(--accent-ink); }
.guide .d-num text { fill: #fff; font-family: var(--font-body); font-size: 14px; font-weight: 700; }
.guide .s-grow { fill: var(--series-2); }
.guide .s-slow { fill: var(--ice); }
.guide .s-thaw { fill: #e9e6df; }
.guide .s-in { fill: #fff; font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.guide .s-in--dark { fill: var(--ink); }
.guide .s-tick { fill: var(--muted); font-family: var(--font-body); font-size: 13px; }
.guide .s-tick--key { fill: var(--ink); font-weight: 700; }
.guide .c-grid { stroke: var(--line); stroke-width: 1; }
.guide .c-axis { stroke: var(--line-2); stroke-width: 1; }
.guide .c-tick, .guide .c-title { fill: var(--muted); font-family: var(--font-body); font-size: 13px; }
.guide .c-band { opacity: 0.18; }
.guide .c-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.guide .c-band.c-s1 { fill: var(--series-1); }
.guide .c-line.c-s1 { stroke: var(--series-1); }
.guide .c-band.c-s2 { fill: var(--series-2); }
.guide .c-line.c-s2 { stroke: var(--series-2); }
.guide .c-label { fill: var(--ink); font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.guide .c-ref { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 4; }
.guide .c-reflabel { fill: var(--ink); font-family: var(--font-body); font-size: 13px; font-weight: 700; }
.guide .c-cross { stroke: var(--ink); stroke-width: 1; visibility: hidden; }
.guide .c-hit { fill: transparent; cursor: crosshair; }

.guide figure.viz {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
}

.guide .viz__legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.6rem 2px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.guide .viz__key {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.guide .viz__key--1 { background: var(--series-1); }
.guide .viz__key--2 { margin-left: 0.9rem; background: var(--series-2); }

.guide .viz__table {
  margin: 0.6rem 2px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.guide .viz__table summary {
  cursor: pointer;
}

.guide .viz__tip {
  position: absolute;
  z-index: 1;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 19, 15, 0.12);
  font-size: 0.82rem;
  line-height: 1.45;
  pointer-events: none;
  white-space: nowrap;
}

.guide .viz__tip b {
  display: block;
  font-family: var(--font-display);
}

/* business band */
.guide .cta {
  margin: 2.6rem 0 0;
  padding: 1.4rem 1.5rem;
  border-radius: var(--box);
  background: var(--ink);
}

.guide .col .cta__text {
  margin: 0 0 1.1rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.35;
}

.guide .col .btn-row {
  margin: 0;
}

.guide .cta .btn {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

.guide .cta .btn.ghost {
  border-color: rgba(255, 255, 255, 0.34);
  background: transparent;
  color: #fff;
}

.guide .faq__item {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.guide .faq__item h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.guide .col .faq__item p {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
}

.guide ol.src li {
  overflow-wrap: anywhere;
}

.guide ol.src li:target {
  background: var(--accent-soft);
}

.guide .g-more ul {
  padding-left: 1.2rem;
}

@media (min-width: 56rem) {
  .guide .nums {
    grid-template-columns: repeat(4, 1fr);
  }
}
