/* Hallmark · pre-emit critique: P4 H5 E5 S5 R3 V4
 * Hallmark · macrostructure: Catalogue · studied-DNA fidelity pass
 * nav: N1b · footer: Ft2
 */

@import url("../tokens.css");

html,
body {
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-navy);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-navy-deep);
  overflow-wrap: anywhere;
  min-width: 0;
}

.skip {
  position: absolute;
  left: var(--space-sm);
  top: -48px;
  z-index: 100;
  background: var(--color-navy);
  color: var(--color-paper);
  padding: var(--space-2xs) var(--space-sm);
}

.skip:focus {
  top: var(--space-sm);
}

.wrap {
  width: var(--page);
  margin-inline: auto;
}

.topline {
  color: var(--color-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 10px var(--gutter) 6px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--color-paper);
}

.site-header__inner {
  width: var(--page);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 76px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-navy-deep);
  min-height: 44px;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__name em {
  font-family: var(--font-outlier);
  font-style: normal;
  font-weight: 700;
  font-size: 1.55em;
  margin-right: 1px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

.nav a {
  text-decoration: none;
  color: var(--color-ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-navy-deep);
  box-shadow: inset 0 -2px 0 var(--color-navy);
}

.nav-toggle {
  display: none;
  border: var(--rule) solid var(--color-rule);
  background: var(--color-paper);
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
}

/* Hero */
.hero {
  padding: 28px 0 8px;
}

.hero--cover {
  --hero-image: url("../images/hero-heater.jpg");
  position: relative;
  isolation: isolate;
  min-height: 28rem;
  padding: 56px 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero--cover .hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero--cover .hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--color-hero-veil-mid) 0%,
    var(--color-hero-veil) 28%,
    var(--color-hero-veil) 72%,
    var(--color-hero-veil-mid) 100%
  );
}

.hero--cover .wrap {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero__copy {
  max-width: 46rem;
  margin-inline: auto;
}

.hero--cover h1 .line2 {
  justify-content: center;
}

.hero--cover .points {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 32rem;
  margin-inline: auto;
  text-align: left;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: center;
}

.trust-flag {
  display: inline-flex;
  align-items: center;
  margin: 0 0 16px;
  padding: 8px 14px;
  background: var(--color-gold);
  color: var(--color-navy-deep);
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.pill {
  display: inline-block;
  background: var(--color-navy);
  color: var(--color-paper);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  margin: 0 0 16px;
}

.hero h1 {
  margin: 0;
  font-size: var(--text-display);
  letter-spacing: 0.01em;
}

.hero h1 .line2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--color-navy-deep);
}

.crown {
  width: 34px;
  height: 28px;
  flex: none;
  color: var(--color-gold);
}

.lede {
  margin: 14px 0 22px;
  color: var(--color-ink-soft);
  font-size: 16px;
  font-weight: 500;
}

.points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.points li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--color-ink-soft);
  font-weight: 500;
}

.points__icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--color-icon-bg);
  color: var(--color-navy);
  display: grid;
  place-items: center;
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.promo-foot {
  padding: 8px 0 32px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--color-warn-bg);
  border: var(--rule) solid var(--color-warn-line);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--color-ink-soft);
  line-height: 1.7;
}

.notice__icon {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  margin-top: 2px;
}

.notice strong {
  color: var(--color-navy-deep);
}

/* Ranking */
.ranking {
  padding: 48px 0 28px;
}

.section-head {
  text-align: center;
  margin-bottom: 22px;
  position: relative;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.section-head h2::before,
.section-head h2::after {
  content: "";
  width: 56px;
  height: 1px;
  background: var(--color-rule);
}

.diamond {
  width: 8px;
  height: 8px;
  background: var(--color-navy);
  transform: rotate(45deg);
  flex: none;
}

.section-head .note {
  position: absolute;
  right: 0;
  top: 8px;
  margin: 0;
  color: var(--color-muted);
  font-size: 11px;
}

.rank {
  display: grid;
  grid-template-columns: 108px minmax(0, 1.15fr) minmax(0, 1.05fr) 210px;
  border: var(--rule) solid var(--color-rule);
  border-radius: 18px;
  margin-bottom: 16px;
  overflow: hidden;
  min-width: 0;
  background: var(--color-paper);
}

.rank--1 {
  background: var(--color-rank1);
  border-color: var(--color-gold);
}

.rank--2 {
  background: var(--color-rank2);
}

.rank--3 {
  background: var(--color-rank3);
}

.rank__medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-display);
  color: var(--color-gold-deep);
  background: var(--color-rank1-side);
}

.rank--2 .rank__medal {
  background: var(--color-rank2-side);
  color: var(--color-navy);
}

.rank--3 .rank__medal {
  background: var(--color-rank3-side);
}

.rank__medal .num {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.rank__main,
.rank__specs {
  padding: 22px 18px;
  min-width: 0;
}

.rank__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent-deep);
}

.rank h3 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 0.01em;
}

.rating {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
}

.rating strong {
  font-size: 20px;
  color: var(--color-navy-deep);
}

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-star);
  vertical-align: middle;
}

.stars i {
  display: block;
  width: 15px;
  height: 15px;
  background: currentColor;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.rating__count {
  color: var(--color-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tags li {
  font-size: 11px;
  border: var(--rule) solid var(--color-rule);
  background: var(--color-paper);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  color: var(--color-navy);
  font-weight: 500;
}

.specs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 18px;
  margin: 0;
  align-items: baseline;
}

.specs dt {
  font-size: 12px;
  color: var(--color-muted);
  font-weight: 500;
}

.specs dd {
  margin: 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-navy-deep);
}

.specs .price {
  font-size: 22px;
  font-family: var(--font-display);
}

.rank__cta {
  margin: 14px;
  background: var(--color-cta-panel);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.rank__cta p {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy-deep);
  line-height: 1.5;
}

.btn-aff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 0 oklch(58% 0.14 55);
}

.btn-aff:hover {
  background: var(--color-accent-deep);
  color: var(--color-accent-ink);
}

.btn-aff:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 oklch(58% 0.14 55);
}

.btn-aff svg {
  width: 14px;
  height: 14px;
}

.aff-note {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  color: var(--color-muted);
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--color-navy);
  border-radius: var(--radius-pill);
  color: var(--color-navy);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--text-sm);
  white-space: nowrap;
}

.more-wrap {
  text-align: center;
  margin: 8px 0 36px;
}

.more-wrap summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 28px;
  border: 1.5px solid var(--color-navy);
  border-radius: var(--radius-pill);
  color: var(--color-navy);
  font-weight: 700;
  background: var(--color-paper);
}

.more-wrap summary::-webkit-details-marker {
  display: none;
}

.more-panel {
  text-align: left;
  margin-top: 16px;
}

.guides {
  padding: 0 0 36px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  text-decoration: none;
  color: inherit;
  border: var(--rule) solid var(--color-rule);
  border-radius: 16px;
  padding: 22px 18px 18px;
  min-width: 0;
  background: var(--color-paper);
}

.guide-card:hover {
  color: inherit;
}

.guide-card .ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-icon-bg);
  color: var(--color-navy);
  display: grid;
  place-items: center;
}

.guide-card h3 {
  margin: 14px 0 8px;
  font-size: 16px;
}

.guide-card p {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--color-muted);
  line-height: 1.6;
}

.guide-card span {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
}

.compare {
  background: var(--color-paper-2);
  border-radius: 18px;
  padding: 28px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 16px;
  align-items: center;
  margin-bottom: 56px;
}

.compare h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.compare p {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: 14px;
}

.compare img {
  width: 190px;
  justify-self: end;
}

.band {
  padding: var(--space-2xl) 0;
  border-top: var(--rule) solid var(--color-rule);
}

.prose {
  max-width: var(--measure);
}

.sheet {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.sheet th,
.sheet td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: var(--rule) solid var(--color-rule);
  vertical-align: top;
}

.sheet th {
  color: var(--color-muted);
  font-weight: 500;
  width: 34%;
}

.faq details {
  border-bottom: var(--rule) solid var(--color-rule);
  padding: 12px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.source {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.crumbs {
  font-size: var(--text-sm);
  color: var(--color-muted);
  padding: var(--space-sm) 0 0;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  list-style: none;
  padding: 0;
  margin: 0;
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-2xs);
}

.crumbs a {
  text-decoration: none;
}

.article-hero {
  padding: var(--space-xl) 0 var(--space-md);
}

.article-hero h1 {
  font-size: 1.8rem;
}

.meta {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.hero-photo img {
  width: 100%;
  max-height: 26rem;
  object-fit: cover;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.city-card {
  display: block;
  text-decoration: none;
  border: var(--rule) solid var(--color-rule);
  border-radius: var(--radius);
  padding: var(--space-md);
  color: inherit;
}

.city-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-navy-deep);
}

.site-footer {
  border-top: var(--rule) solid var(--color-rule);
  padding: 28px 0 36px;
  font-size: 13px;
  color: var(--color-muted);
}

.site-footer__inner {
  width: var(--page);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.site-footer a {
  text-decoration: none;
  color: var(--color-ink-soft);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

@media (max-width: 60rem) {
  .hero__grid,
  .split,
  .compare,
  .rank {
    grid-template-columns: 1fr;
  }

  .hero--cover .hero__bg::after {
    background: var(--color-hero-veil);
  }

  .guide-grid,
  .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank__medal {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }

  .section-head .note {
    position: static;
    display: block;
    margin-top: 6px;
  }

  .section-head h2::before,
  .section-head h2::after {
    width: 18px;
  }
}

@media (max-width: 40rem) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 8px;
  }

  .site-header.is-open .nav {
    display: flex;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .points,
  .guide-grid,
  .city-grid {
    grid-template-columns: 1fr;
  }

  .hero--cover .hero__bg::after {
    background: var(--color-hero-veil);
  }

  .compare img {
    width: 140px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
