/* ───────────────────────────────────────────────────
   Design tokens
   ─────────────────────────────────────────────────── */
:root {
  --bg: #f8f9fb;
  --bg-subtle: #f1f3f6;
  --surface: #ffffff;
  --surface-hover: #fafbfc;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.08);
  --accent-glow: rgba(13, 148, 136, 0.15);
  --warm: #f59e0b;
  --warm-soft: rgba(245, 158, 11, 0.1);
  --success: #10b981;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 48px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --container: min(1120px, calc(100vw - 2rem));
  --transition: 180ms ease;
}

/* ───────────────────────────────────────────────────
   Reset & base
   ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Aptos", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1, h2, h3, h4 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.05rem; }

p { margin: 0; }

/* ───────────────────────────────────────────────────
   Utility
   ─────────────────────────────────────────────────── */
.container {
  width: var(--container);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
  background: var(--accent);
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}

/* ───────────────────────────────────────────────────
   Header
   ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 249, 251, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-copy strong {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-copy small {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.header-nav a {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: background var(--transition), color var(--transition);
}

.header-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.header-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ───────────────────────────────────────────────────
   Breadcrumbs
   ─────────────────────────────────────────────────── */
.breadcrumbs {
  padding: 0.9rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 0.4rem;
  opacity: 0.5;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* ───────────────────────────────────────────────────
   Hero
   ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-home {
  padding: 3rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy h1,
.article-hero h1 {
  margin: 0.5rem 0 1rem;
  line-height: 1.1;
}

.hero-lead {
  max-width: 44rem;
  font-size: 1.05rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

.hero-art {
  min-height: 22rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--accent-soft) 0%, var(--bg-subtle) 50%, rgba(245, 158, 11, 0.05) 100%);
  border: 1px solid var(--line);
  display: flex;
  align-items: stretch;
}

.hero-calendar-ribbon {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1rem;
  align-content: center;
}

.hero-calendar-ribbon span {
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  min-height: 5.5rem;
  display: grid;
  align-content: end;
  gap: 0.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  font-size: 0.82rem;
}

.hero-calendar-ribbon span:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-calendar-ribbon span strong {
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-calendar-ribbon span small {
  font-size: 0.72rem;
  color: var(--muted);
}

.hero-calendar-ribbon span.is-hot {
  border-color: var(--accent-glow);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface));
}

.hero-calendar-ribbon span.is-hot small {
  color: var(--accent);
  font-weight: 600;
}

/* ───────────────────────────────────────────────────
   Eyebrow / badge
   ─────────────────────────────────────────────────── */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.3rem;
}

/* ───────────────────────────────────────────────────
   Trust strip
   ─────────────────────────────────────────────────── */
.trust-strip {
  padding: 0 0 1.5rem;
}

.trust-strip-inner {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}

.trust-strip-inner span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.trust-strip-inner span::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ───────────────────────────────────────────────────
   Buttons
   ─────────────────────────────────────────────────── */
.button-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin: 1.2rem 0 1.5rem;
}

.button,
button.button {
  appearance: none;
  border: 0;
  border-radius: var(--radius-xs);
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition);
}

.button-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.3);
}

.button-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  transform: translateY(-1px);
}

.button-secondary {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-secondary);
}

.button-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--accent-glow);
  color: var(--accent);
}

/* ───────────────────────────────────────────────────
   Sections
   ─────────────────────────────────────────────────── */
.section,
.page-heading {
  padding: 2rem 0;
}

.section-block,
.article-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.section-copy {
  max-width: 40rem;
  margin-bottom: 1.25rem;
}

.section-copy p:not(.eyebrow) {
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

/* ───────────────────────────────────────────────────
   Planner
   ─────────────────────────────────────────────────── */
.planner-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.planner-form,
.result-grid,
.planner-detail-grid,
.guide-grid,
.month-grid,
.opportunity-grid,
.metric-strip,
.state-grid,
.footer-grid {
  display: grid;
  gap: 0.75rem;
}

.planner-form,
.result-grid--planner {
  grid-template-columns: repeat(3, 1fr);
}

.calculator-form {
  grid-template-columns: repeat(4, 1fr);
}

.planner-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

select,
input[type="date"] {
  width: 100%;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

select:focus,
input[type="date"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ───────────────────────────────────────────────────
   Metrics
   ─────────────────────────────────────────────────── */
.metric-strip {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metric-panel {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: box-shadow var(--transition);
}

.metric-panel:hover {
  box-shadow: var(--shadow-sm);
}

.metric-panel strong {
  display: block;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.metric-panel .eyebrow {
  margin-bottom: 0.2rem;
}

/* ───────────────────────────────────────────────────
   Planner detail
   ─────────────────────────────────────────────────── */
.planner-detail-grid {
  grid-template-columns: 1.1fr 0.9fr;
  margin-top: 1rem;
}

/* ───────────────────────────────────────────────────
   Opportunity / window cards
   ─────────────────────────────────────────────────── */
.opportunity-grid,
.guide-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.opportunity-item,
.guide-card,
.month-card,
.state-link {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.opportunity-item:hover,
.guide-card:hover,
.month-card:hover,
.state-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent-glow);
}

.opportunity-item h3,
.guide-card h3 {
  margin: 0.25rem 0 0.4rem;
}

.opportunity-item p,
.guide-card p {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* ───────────────────────────────────────────────────
   Month grid
   ─────────────────────────────────────────────────── */
.month-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.month-card h3 {
  margin: 0.2rem 0 0.35rem;
}

.month-card p {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

/* ───────────────────────────────────────────────────
   State grid
   ─────────────────────────────────────────────────── */
.state-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.state-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
}

.state-link strong {
  font-size: 0.88rem;
}

.state-link span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.state-link::after {
  content: "→";
  font-size: 0.85rem;
  color: var(--muted);
  transition: transform var(--transition), color var(--transition);
}

.state-link:hover::after {
  transform: translateX(3px);
  color: var(--accent);
}

/* ───────────────────────────────────────────────────
   Mini list / compact list
   ─────────────────────────────────────────────────── */
.mini-list,
.compact-list {
  margin: 0.6rem 0 0;
  padding-left: 0;
  list-style: none;
}

.mini-list li,
.compact-list li {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.15rem 0;
}

.mini-list li::before {
  content: "·";
  margin-right: 0.4rem;
  font-weight: 700;
}

.compact-list li + li {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

/* ───────────────────────────────────────────────────
   Text link
   ─────────────────────────────────────────────────── */
.text-link {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap var(--transition);
}

.text-link:hover {
  gap: 0.4rem;
}

.text-link::after {
  content: "→";
  font-size: 0.8rem;
}

/* ───────────────────────────────────────────────────
   Tables
   ─────────────────────────────────────────────────── */
.table-shell {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.25rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.88rem;
}

.data-table th {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 2px solid var(--line-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.data-table td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-secondary);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: var(--accent-soft);
}

/* ───────────────────────────────────────────────────
   FAQ
   ─────────────────────────────────────────────────── */
.faq-list {
  display: grid;
  gap: 0.5rem;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0;
  background: var(--surface);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq-list details:hover {
  box-shadow: var(--shadow-sm);
}

.faq-list details[open] {
  box-shadow: var(--shadow-sm);
}

.faq-list summary {
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  padding: 0 1.1rem 1rem;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

/* ───────────────────────────────────────────────────
   Article / guide pages
   ─────────────────────────────────────────────────── */
.article-shell {
  padding: 2rem;
}

.article-hero {
  margin-bottom: 1.5rem;
}

.article-body {
  display: grid;
  gap: 1.5rem;
}

.article-body h2 {
  margin-bottom: 0.4rem;
}

.article-body p,
.prose p {
  max-width: 68ch;
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.75;
}

.article-body a,
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.article-body a:hover,
.prose a:hover {
  color: var(--accent-hover);
}

.legal-note {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(13, 148, 136, 0.06));
}

.legal-note strong {
  font-size: 0.92rem;
}

.legal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.legal-list li,
.legal-address {
  max-width: 68ch;
  color: var(--ink-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-list span {
  display: block;
  margin-bottom: 0.12rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

/* ───────────────────────────────────────────────────
   Year pills
   ─────────────────────────────────────────────────── */
.year-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.year-pill {
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-xs);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all var(--transition);
}

.year-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent-glow);
  color: var(--accent);
}

/* ───────────────────────────────────────────────────
   Page heading
   ─────────────────────────────────────────────────── */
.hero-mini {
  padding: 2rem 0 0.5rem;
}

.calculator-result {
  margin-top: 1rem;
}

/* ───────────────────────────────────────────────────
   Muted / meta
   ─────────────────────────────────────────────────── */
.muted,
.mini-meta,
.section-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.section-note {
  margin-top: 0.75rem;
}

/* ───────────────────────────────────────────────────
   Footer
   ─────────────────────────────────────────────────── */
.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  background: var(--bg-subtle);
}

.footer-grid {
  grid-template-columns: 1.5fr 1fr 1fr;
  align-items: start;
  gap: 2rem;
}

.site-footer h2 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.site-footer h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 28rem;
}

.footer-note {
  margin-top: 0.75rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 0.3rem;
}

.site-footer a {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ───────────────────────────────────────────────────
   Responsive
   ─────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-grid,
  .planner-detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 16rem;
  }

  .hero-calendar-ribbon {
    grid-template-columns: repeat(4, 1fr);
  }

  .planner-form,
  .result-grid--planner,
  .calculator-form {
    grid-template-columns: 1fr 1fr;
  }

  .article-shell {
    padding: 1.25rem;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.7rem 0;
    gap: 0.5rem;
  }

  .header-nav {
    gap: 0.1rem;
  }

  .planner-form,
  .result-grid--planner,
  .calculator-form,
  .hero-calendar-ribbon {
    grid-template-columns: 1fr;
  }

  .section,
  .page-heading {
    padding: 1.4rem 0;
  }

  .hero-home {
    padding-top: 1.5rem;
  }

  .section-block,
  .planner-shell {
    padding: 1rem;
  }

  .hero-art {
    min-height: 14rem;
  }

  .hero-calendar-ribbon {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ───────────────────────────────────────────────────
   Print
   ─────────────────────────────────────────────────── */
@media print {
  .site-header,
  .site-footer,
  .button-row,
  .planner-wrap,
  .skip-link {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}
