:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
  background: #f8fafc;
}

* { box-sizing: border-box; }
body { margin: 0; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
header, main, footer { width: min(1040px, calc(100% - 32px)); margin: 0 auto; }
header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; }
nav, footer nav { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; font-weight: 700; }
a { color: #047857; text-decoration: none; }
a:hover { color: #065f46; }
.logo { height: 38px; width: auto; }
.hero { padding: 52px 0 34px; }
.eyebrow { color: #047857; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 10px 0 14px; max-width: 880px; font-size: clamp(38px, 6vw, 68px); line-height: 1; letter-spacing: -0.03em; }
h2 { margin: 36px 0 10px; font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; }
h3 { margin: 24px 0 8px; font-size: 20px; line-height: 1.3; }
p, li { color: #475569; font-size: 17px; line-height: 1.75; }
p { margin: 0 0 16px; }
ul, ol { padding-left: 22px; }
.lead { max-width: 780px; font-size: 19px; }
.meta { margin-top: 18px; color: #64748b; font-size: 14px; font-weight: 700; }
.content { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 42px; align-items: start; padding-bottom: 72px; }
article { min-width: 0; }
.toc { position: sticky; top: 18px; border: 1px solid #dbe3ea; background: #ffffff; border-radius: 8px; padding: 18px; }
.toc strong { display: block; margin-bottom: 10px; color: #0f172a; }
.toc a { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.card { border: 1px solid #dbe3ea; background: #ffffff; border-radius: 8px; padding: 20px; box-shadow: 0 12px 30px rgba(15, 23, 42, .05); }
.card h2, .card h3 { margin-top: 0; }
.cta { margin: 34px 0; border-left: 4px solid #059669; background: #ecfdf5; padding: 18px 20px; }
.cta p { margin-bottom: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px; background: #059669; color: #ffffff; font-size: 14px; font-weight: 900; }
.button:hover { color: #ffffff; background: #047857; }
.faq { margin-top: 38px; }
details { border: 1px solid #dbe3ea; border-radius: 8px; background: #ffffff; margin-top: 10px; padding: 0 18px; }
summary { cursor: pointer; list-style: none; padding: 16px 0; color: #0f172a; font-weight: 900; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; float: right; color: #059669; font-size: 20px; }
details[open] summary::after { content: '-'; }
details p { margin: 0; padding: 0 0 16px; font-size: 15px; }
.ad-slot { display: none; margin: 34px 0; border-block: 1px solid #dbe3ea; padding: 20px 0; text-align: center; }
.ad-slot.is-ready { display: block; }
.ad-slot p { margin: 0 0 12px; color: #94a3b8; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
footer { border-top: 1px solid #dbe3ea; padding: 28px 0 42px; color: #64748b; font-size: 14px; }
footer p { margin: 0 0 12px; color: #64748b; font-size: 14px; line-height: 1.6; }

.guide-index-page {
  background: #f7fbf8;
}

.guide-index-page header,
.guide-index-page main,
.guide-index-page footer {
  width: min(1180px, calc(100% - 32px));
}

.guide-index-page header {
  padding: 20px 0;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 48px;
  align-items: end;
  padding: 58px 0 34px;
}

.guide-hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 5.2vw, 72px);
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #cfe8da;
  border-radius: 8px;
  background: #ffffff;
  color: #047857;
  font-size: 14px;
  font-weight: 900;
}

.secondary-button:hover {
  border-color: #059669;
  color: #065f46;
}

.guide-hero-panel {
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .07);
  padding: 24px;
}

.panel-label {
  margin: 0 0 12px;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.panel-row {
  display: grid;
  gap: 4px;
  border-top: 1px solid #e5edf0;
  padding: 16px 0;
}

.panel-row:last-child {
  padding-bottom: 0;
}

.panel-row strong {
  color: #0f172a;
  font-size: 15px;
}

.panel-row span {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.guide-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #dbe3ea;
}

.guide-summary div {
  display: grid;
  gap: 4px;
  min-height: 96px;
  background: #ffffff;
  padding: 18px;
}

.guide-summary strong {
  color: #047857;
  font-size: 15px;
}

.guide-summary span {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.guide-library {
  padding: 58px 0 18px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 32px;
  align-items: end;
}

.section-head h2 {
  margin: 8px 0 0;
  max-width: 720px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}

.section-head p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.7;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.guide-card {
  display: flex;
  grid-column: span 4;
  min-height: 270px;
  flex-direction: column;
  border-color: #dbe3ea;
  padding: 24px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.guide-card:hover {
  border-color: #a3e8c4;
  box-shadow: 0 20px 42px rgba(15, 23, 42, .08);
  transform: translateY(-2px);
}

.guide-card-wide {
  grid-column: span 6;
  min-height: 230px;
}

.card-kicker {
  width: fit-content;
  border-radius: 999px;
  background: #ebfaf2;
  color: #047857;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-card h3 {
  margin: 18px 0 0;
  color: #1a7c45;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.guide-card p {
  margin: 14px 0 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.65;
}

.card-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 28px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.card-meta-line span:last-child {
  color: #047857;
}

.card-meta-line span:last-child::after {
  content: ' ->';
}

@media (max-width: 820px) {
  header { align-items: flex-start; flex-direction: column; }
  .content { display: block; }
  .toc { position: static; margin-bottom: 28px; }
  .guide-hero {
    display: block;
    padding-top: 38px;
  }
  .guide-hero-panel {
    margin-top: 26px;
  }
  .guide-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-head {
    display: block;
  }
  .section-head p {
    margin-top: 14px;
  }
  .guide-card,
  .guide-card-wide {
    grid-column: span 6;
  }
}

@media (max-width: 560px) {
  .guide-index-page header,
  .guide-index-page main,
  .guide-index-page footer {
    width: min(100% - 24px, 1180px);
  }
  .guide-hero h1 {
    font-size: 38px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .button,
  .secondary-button {
    width: 100%;
  }
  .guide-summary {
    grid-template-columns: 1fr;
  }
  .guide-card,
  .guide-card-wide {
    grid-column: span 12;
    min-height: 0;
  }
  .card-meta-line {
    flex-direction: column;
    gap: 6px;
  }
}
