:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --ink: #20241f;
  --muted: #62695f;
  --line: #dfe4d8;
  --accent: #1f7a5a;
  --accent-strong: #0f5c41;
  --orange: #d96c2c;
  --blue: #356d9f;
  --shadow: 0 12px 40px rgba(32, 36, 31, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(24px, calc((100vw - 1160px) / 2));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 245, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand,
nav,
.site-footer,
.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
}

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

nav a:hover,
.site-footer a:hover,
.section-heading a:hover {
  color: var(--accent-strong);
}

main {
  min-height: calc(100vh - 150px);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 28px;
  padding: 64px 0 36px;
  align-items: stretch;
}

.hero-copy {
  padding: 42px 0;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.35rem, 6vw, 4.85rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.lede,
.page-head p,
.article-head p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.search-shell,
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.text-link {
  color: var(--accent-strong);
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

input,
select,
button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

input,
select {
  width: 100%;
  background: white;
  color: var(--ink);
  padding: 0 14px;
}

button {
  padding: 0 18px;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

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

.stat-grid div {
  min-height: 130px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-grid dt {
  font-size: 2.4rem;
  font-weight: 850;
  color: var(--accent-strong);
}

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

.section-band,
.tool-panel,
.type-list,
.article,
.content-block {
  padding: 30px 0 48px;
}

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

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

.page-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 190px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.page-card:hover,
.type-grid a:hover,
.offer-card:hover,
.template-links a:hover,
.type-row:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.page-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.offer-card,
.conversion-strip,
.template-panel,
.template-links a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.offer-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  padding: 18px;
  text-decoration: none;
}

.offer-card p,
.conversion-strip p,
.template-panel p,
.template-links span {
  color: var(--muted);
  line-height: 1.55;
}

.type-pill,
.meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.type-pill {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf7;
  text-transform: capitalize;
}

.meta {
  margin-top: auto;
}

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

.type-grid a,
.type-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.type-grid a {
  flex-direction: column;
}

.type-grid span,
.type-row small,
.type-row em {
  color: var(--muted);
  font-style: normal;
}

.page-head {
  padding: 56px 0 22px;
}

.not-found-head {
  min-height: 54vh;
}

.tool-panel {
  padding-top: 12px;
}

.filters {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) minmax(150px, 190px);
  margin: 0 0 16px;
}

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

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

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

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

td a {
  display: block;
  font-weight: 750;
  text-decoration: none;
}

td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

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

.type-row span {
  display: grid;
  gap: 8px;
}

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

.article {
  max-width: 980px;
}

.article-head {
  padding: 56px 0 22px;
}

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

.article-meta span {
  padding: 6px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
}

.answer-box,
.detail-grid > div,
.fit-grid > div,
.content-section,
.content-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.answer-box {
  padding: 22px;
  margin: 18px 0;
}

.conversion-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.5fr) auto;
  gap: 18px;
  align-items: center;
  margin: 18px 0;
  padding: 18px;
}

.conversion-strip .eyebrow,
.conversion-strip p {
  margin: 0;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.answer-box p,
.content-block p {
  color: var(--muted);
  line-height: 1.65;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
  gap: 14px;
  margin: 18px 0;
}

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

.fit-grid > div {
  padding: 22px;
}

.content-section {
  padding: 22px;
  margin: 18px 0;
}

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

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

.fact-list dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.fact-list dd {
  margin: 6px 0 0;
  line-height: 1.5;
}

.source-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.example-list,
.qa-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.code-example {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #101713;
}

.code-example figcaption {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #f8faf7;
  border-bottom: 1px solid var(--line);
}

.code-example figcaption span {
  color: var(--muted);
  font-size: 0.9rem;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  color: #e8f4ee;
  font-size: 0.92rem;
  line-height: 1.55;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

details {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

summary {
  cursor: pointer;
  font-weight: 750;
}

details p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-grid > div {
  padding: 22px;
}

li {
  margin: 10px 0;
  color: var(--muted);
}

.source-link {
  display: block;
  color: var(--blue);
  overflow-wrap: anywhere;
}

.source-link span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.related {
  margin-top: 32px;
}

.content-block {
  padding: 24px;
}

.template-list {
  display: grid;
  gap: 16px;
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto 18px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto 18px;
}

.template-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
  gap: 22px;
  padding: 22px;
}

.template-links {
  display: grid;
  gap: 10px;
}

.template-links a {
  display: grid;
  gap: 6px;
  padding: 14px;
  text-decoration: none;
}

.content-block h2 + p {
  margin-bottom: 26px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.notice,
.article-disclaimer {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: #6b573a;
  line-height: 1.55;
}

.article-disclaimer {
  margin-top: 18px;
  max-width: 780px;
  font-size: 0.95rem;
}

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

  nav {
    flex-wrap: wrap;
  }

  .hero,
  .detail-grid,
  .fit-grid,
  .conversion-strip,
  .template-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-copy {
    padding: 16px 0;
  }

  .page-grid,
  .type-grid,
  .offer-grid,
  .list-layout,
  .checklist-grid,
  .fact-list {
    grid-template-columns: 1fr;
  }

  .filters,
  .search-shell {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
