:root {
  color-scheme: light;
  --ink: #162329;
  --muted: #5a6872;
  --line: #d9e4e5;
  --paper: #f7faf8;
  --surface: #ffffff;
  --teal: #0f5f66;
  --teal-dark: #0a3f45;
  --mint: #dff0ea;
  --gold: #c47a1a;
  --coral: #c94d3f;
  --plum: #6d426c;
  --blue: #2b638f;
  --shadow: 0 18px 48px rgba(17, 43, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 250, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
}

.main-nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.main-nav a,
.site-footer a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.main-nav .language-link {
  padding: 5px 10px;
  color: var(--teal-dark);
  background: var(--mint);
  border: 1px solid #b9d7d0;
  border-radius: 8px;
  font-weight: 800;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--teal-dark);
}

main {
  overflow: hidden;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: start;
  padding: clamp(34px, 6vw, 76px) clamp(18px, 4vw, 56px) 28px;
}

.tool-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.5rem);
}

h3 {
  font-size: 1.15rem;
}

.lead {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
}

.planning-note {
  max-width: 640px;
  margin: 16px 0 0;
  padding: 12px 14px;
  color: #34454d;
  background: #f0f7f5;
  border: 1px solid #c7ddda;
  border-radius: 8px;
  font-size: 0.92rem;
}

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.selector-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.35fr 1.1fr;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: #f9fbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 95, 102, 0.28);
  outline-offset: 3px;
}

.result-card {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.result-region {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 700;
}

.season-badge {
  justify-self: start;
  min-width: 92px;
  padding: 8px 14px;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  text-align: center;
}

.season-badge[data-level="low"] {
  background: var(--blue);
}

.season-badge[data-level="mid"] {
  background: var(--teal);
}

.season-badge[data-level="high"] {
  background: var(--gold);
}

.season-badge[data-level="super"] {
  background: var(--coral);
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.result-metrics div {
  min-height: 82px;
  padding: 12px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
}

dd {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 850;
}

.result-advice {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
}

.result-disclaimer {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.tip-list,
.alternative-list,
.cluster-grid ul,
.source-list {
  margin: 0;
  padding-left: 20px;
}

.tip-list li + li,
.alternative-list li + li,
.cluster-grid li + li,
.source-list li + li {
  margin-top: 6px;
}

.score-breakdown,
.comfort-alternatives {
  display: grid;
  gap: 10px;
}

.score-breakdown h3,
.comfort-alternatives h3 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 1rem;
}

#score-breakdown {
  display: grid;
  gap: 9px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 2fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.breakdown-bar {
  height: 8px;
  overflow: hidden;
  background: #dfe9e8;
  border-radius: 999px;
}

.breakdown-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--coral));
}

.breakdown-value {
  color: var(--coral);
  font-weight: 850;
}

.alternative-list {
  color: #34454d;
}

.mini-actions {
  display: flex;
  min-height: 36px;
  gap: 10px;
  align-items: center;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--teal-dark);
  background: var(--mint);
  border: 1px solid #b9d7d0;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

#copy-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.map-visual {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 960px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9f2f2;
}

.map-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.quick-guides,
.market-section,
.drive-section,
.school-trip-section,
.fireworks-section,
.table-section,
.deep-dives,
.content-clusters,
.seed-articles,
.season-window-section,
.article-blueprint,
.method-section,
.sources {
  padding: clamp(38px, 7vw, 80px) clamp(18px, 4vw, 56px);
}

.quick-guides,
.market-section,
.drive-section,
.school-trip-section,
.fireworks-section,
.method-section,
.content-clusters,
.season-window-section,
.deep-dives {
  background: var(--surface);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.guide-grid,
.cluster-grid,
.deep-grid,
.ranking-grid,
.drive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.guide-grid article,
.cluster-grid article,
.deep-grid article,
.rank-card,
.drive-card {
  min-height: 190px;
  padding: 18px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.guide-grid p,
.cluster-grid p,
.deep-grid p,
.rank-card p,
.drive-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.drive-card strong {
  display: block;
  margin-top: 8px;
  color: var(--teal-dark);
  font-size: 1.35rem;
}

.score-meter {
  width: 100%;
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  background: #dfe9e8;
  border-radius: 999px;
}

.score-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.ranking-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.rank-card {
  min-height: 250px;
}

.rank-number {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.rank-card strong {
  display: block;
  margin-top: 10px;
  color: var(--coral);
  font-size: 1.35rem;
}

.compact-table {
  max-width: 900px;
}

.compact-table table {
  min-width: 640px;
}

.fireworks-table table {
  min-width: 980px;
}

.seasonal-window-table table {
  min-width: 860px;
}

.fireworks-table td:first-child {
  width: 190px;
  font-weight: 800;
}

.source-note {
  max-width: 900px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.data-stamp {
  color: var(--teal-dark);
  font-weight: 750;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #ecf5f2;
  color: var(--teal-dark);
  font-size: 0.9rem;
}

td {
  color: #2e3f46;
  font-size: 0.92rem;
}

tr:last-child td {
  border-bottom: 0;
}

.level-chip {
  display: inline-block;
  margin-bottom: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  color: white;
  font-size: 0.78rem;
  font-weight: 850;
}

.level-chip.low {
  background: var(--blue);
}

.level-chip.mid {
  background: var(--teal);
}

.level-chip.high {
  background: var(--gold);
}

.level-chip.super {
  background: var(--coral);
}

.month-strip {
  margin-top: 18px;
}

.month-strip > h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.month-strip-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.strip-seg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.strip-label {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--ink);
}

.strip-tag {
  font-weight: 800;
  font-size: 0.82rem;
}

.strip-note {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.strip-seg.level-high {
  background: rgba(201, 77, 63, 0.1);
  border-color: rgba(201, 77, 63, 0.35);
}

.strip-seg.level-high .strip-tag {
  color: var(--coral);
}

.strip-seg.level-mid {
  background: rgba(196, 122, 26, 0.1);
  border-color: rgba(196, 122, 26, 0.35);
}

.strip-seg.level-mid .strip-tag {
  color: var(--gold);
}

.strip-seg.level-low {
  background: rgba(15, 95, 102, 0.08);
  border-color: rgba(15, 95, 102, 0.3);
}

.strip-seg.level-low .strip-tag {
  color: var(--teal);
}

.month-strip-legend {
  margin: 8px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

@media (max-width: 540px) {
  .month-strip-track {
    grid-template-columns: 1fr;
  }
}

.blueprint-list {
  display: grid;
  gap: 12px;
  max-width: 920px;
  margin: 0;
  padding-left: 22px;
}

.blueprint-list li {
  padding-left: 6px;
}

.article-list {
  columns: 3 260px;
  column-gap: 34px;
  max-width: 1120px;
  margin: 0;
  padding-left: 22px;
}

.article-list li {
  break-inside: avoid;
  margin: 0 0 10px;
  padding-left: 4px;
  color: #34454d;
}

.sources {
  background: #edf4f5;
}

.source-list {
  max-width: 820px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 56px);
  background: var(--ink);
  color: white;
}

.site-footer p {
  max-width: 640px;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
}

.text-page {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(38px, 7vw, 80px) clamp(18px, 4vw, 56px);
}

.text-page h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.text-page h2 {
  margin-top: 32px;
  font-size: 1.45rem;
}

.text-page p,
.text-page li {
  color: #34454d;
}

.article-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 76px) clamp(18px, 4vw, 56px);
}

.article-hero {
  max-width: 840px;
  margin-bottom: 28px;
}

.article-hero h1 {
  font-size: clamp(2rem, 4.6vw, 4rem);
}

.guide-index-hero {
  max-width: 900px;
}

.guide-index-hero h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
}

.guide-index-hero .lead {
  max-width: 820px;
}

.breadcrumb {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-summary,
.medical-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: #f0f7f5;
  border: 1px solid #c7ddda;
  border-radius: 8px;
  color: #34454d;
}

.article-summary {
  display: grid;
  gap: 4px;
}

.medical-note {
  background: #fff8ec;
  border-color: #efd3a8;
}

.inline-note {
  max-width: 760px;
  margin-top: 14px;
  font-size: 0.92rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

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

.fact-card {
  min-height: 210px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feature-card {
  background: #f0f7f5;
  border-color: #c7ddda;
}

.fact-card h2 {
  margin-top: 10px;
  font-size: 1.28rem;
}

.fact-card p {
  margin: 10px 0 0;
  color: #34454d;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  color: white;
  background: var(--teal);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 850;
}

.article-section {
  max-width: 920px;
  margin: 34px 0;
}

.article-section h2,
.source-box h2 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.article-section p,
.article-section li {
  color: #34454d;
}

.article-table {
  margin-top: 14px;
}

.article-table table {
  min-width: 760px;
}

.source-box {
  max-width: 920px;
  margin-top: 34px;
  padding: 18px;
  background: #edf4f5;
  border: 1px solid #cbdedf;
  border-radius: 8px;
}

.source-box ul,
.article-list-simple {
  margin: 0;
  padding-left: 20px;
}

.source-box li + li,
.article-list-simple li + li {
  margin-top: 7px;
}

.text-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: white;
  background: var(--teal);
  border: 1px solid var(--teal-dark);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 850;
  text-decoration: none;
}

.ad-slot {
  display: none;
  width: 100%;
  max-width: 920px;
  min-height: 112px;
  margin: 28px 0;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(15, 95, 102, 0.08), rgba(196, 122, 26, 0.08)),
    #f9fbfb;
  border: 1px dashed #b8cbcc;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.ad-slot-wide {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.ad-slot span {
  padding: 8px 10px;
}

.ad-slot[data-ad-state="loaded"] {
  display: block;
  min-height: 0;
  background: transparent;
  border: 0;
}

.ad-slot .adsbygoogle {
  display: block;
  width: 100%;
}

.consent-banner {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  left: clamp(14px, 3vw, 28px);
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.consent-banner[hidden],
.consent-settings-button[hidden] {
  display: none;
}

.consent-banner h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.consent-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.consent-button,
.consent-settings-button {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--teal-dark);
  background: #f0f7f5;
  border: 1px solid #b9d7d0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.consent-button.primary {
  color: white;
  background: var(--teal);
  border-color: var(--teal-dark);
}

.consent-button.reject {
  color: #73322c;
  background: #fff4f1;
  border-color: #efc3bb;
}

.consent-settings-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 55;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.82rem;
  box-shadow: 0 10px 28px rgba(17, 43, 48, 0.12);
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 980px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-shell {
    grid-template-columns: 1fr;
  }

  .selector-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-grid,
  .deep-grid,
  .ranking-grid,
  .drive-grid,
  .cluster-grid,
  .article-grid,
  .guide-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
  }

  .main-nav {
    gap: 10px;
  }

  .selector-grid,
  .result-metrics,
  .guide-grid,
  .deep-grid,
  .ranking-grid,
  .drive-grid,
  .cluster-grid,
  .article-grid,
  .guide-index-grid {
    grid-template-columns: 1fr;
  }

  .tool-shell {
    padding-top: 28px;
  }

  .result-metrics div {
    min-height: auto;
  }

  .breakdown-row {
    grid-template-columns: 1fr auto;
  }

  .breakdown-bar {
    grid-column: 1 / -1;
  }

  .ad-slot {
    min-height: 96px;
    margin: 22px 0;
  }

  .consent-banner {
    grid-template-columns: 1fr;
  }

  .consent-actions {
    justify-content: stretch;
  }

  .consent-button {
    flex: 1 1 120px;
  }
}
