:root {
  color-scheme: light;
  --ink: #16201f;
  --muted: #5c6865;
  --line: #d8e0dc;
  --surface: #f8faf7;
  --panel: #ffffff;
  --brand: #176b68;
  --brand-dark: #0d4747;
  --accent: #b86b2d;
  --soft: #e9f2ef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 247, 0.94);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--brand);
  color: white;
  font-size: 13px;
  letter-spacing: 0;
}

nav,
.footer-links,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

nav a,
.footer-links a,
.text-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

main {
  min-height: 72vh;
}

.hero,
.page-head,
.section-band,
.article,
.tool-panel,
.type-list,
.template-list,
.content-block {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 36px;
  align-items: end;
  padding: 72px 0 42px;
}

.hero h1,
.page-head h1,
.article-head h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede,
.page-head p,
.article-head > p {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.search-shell {
  display: flex;
  width: min(680px, 100%);
  margin: 26px 0 18px;
  border: 1px solid var(--line);
  background: white;
}

.search-shell input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 15px 16px;
  font: inherit;
  background: transparent;
}

.search-shell button,
.button-link {
  border: 0;
  padding: 12px 18px;
  background: var(--brand);
  color: white;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-link.secondary {
  background: var(--brand-dark);
}

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

.stat-grid div,
.page-card,
.offer-card,
.content-section,
.answer-box,
.conversion-strip,
.help-cta,
.template-panel,
.type-row,
.tool-panel,
.content-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stat-grid div {
  padding: 18px;
}

.stat-grid dt {
  font-size: 34px;
  font-weight: 850;
}

.stat-grid dd {
  margin: 0;
  color: var(--muted);
}

.section-band,
.page-head,
.article,
.tool-panel,
.type-list,
.template-list,
.content-block {
  margin-top: 32px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.section-heading h2,
.content-section h2,
.answer-box h2,
.conversion-strip h2,
.help-cta h2,
.content-block h2 {
  margin: 0 0 10px;
}

.notice {
  padding: 12px 14px;
  border-left: 4px solid var(--brand);
  background: var(--soft);
  color: var(--brand-dark);
}

.page-grid,
.offer-grid,
.fit-grid,
.detail-grid,
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-grid,
.fit-grid,
.checklist-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
}

.page-card,
.offer-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  text-decoration: none;
}

.page-card h2,
.page-card h3,
.offer-card h3 {
  margin: 0;
  line-height: 1.15;
}

.page-card p,
.offer-card p,
.meta,
.type-pill,
.article-meta,
.article-disclaimer {
  color: var(--muted);
}

.type-pill {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.meta {
  margin-top: auto;
  font-size: 13px;
}

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

.type-grid a,
.related-list a,
.template-links a,
.source-link {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-decoration: none;
}

.type-grid span,
.related-list span,
.template-links span,
.source-link span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.page-head {
  padding: 54px 0 16px;
}

.article {
  padding: 38px 0;
}

.article-head {
  padding-bottom: 18px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
}

.article-meta span {
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--soft);
}

.article-disclaimer {
  font-size: 14px;
}

.answer-box,
.content-section,
.conversion-strip,
.help-cta,
.content-block {
  padding: 20px;
  margin: 16px 0;
}

.conversion-strip,
.help-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #f3f8f6;
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.fact-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fact-list dt {
  font-weight: 850;
}

.fact-list dd {
  margin: 4px 0 0;
  color: var(--muted);
}

pre {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #15201f;
  color: #f4faf7;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.qa-list details {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.qa-list summary {
  cursor: pointer;
  font-weight: 800;
}

.related-list,
.template-links,
.source-list {
  display: grid;
  gap: 10px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 220px 180px;
  gap: 10px;
  padding: 16px;
}

.filters input,
.filters select {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
}

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

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

td span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.type-list,
.template-list {
  display: grid;
  gap: 12px;
}

.type-row,
.template-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px;
  text-decoration: none;
}

.template-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .hero,
  .conversion-strip,
  .help-cta,
  .type-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .page-grid,
  .offer-grid,
  .detail-grid,
  .fit-grid,
  .checklist-grid,
  .type-grid,
  .template-panel,
  .filters,
  .fact-list {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-head h1,
  .article-head h1 {
    font-size: 42px;
  }

  .search-shell {
    flex-direction: column;
  }
}
