:root {
  --ink: #17201b;
  --muted: #5d6861;
  --soft: #f6f7f4;
  --paper: #fffdf8;
  --line: #dfe4dd;
  --white: #ffffff;
  --jade: #1f7a5d;
  --jade-dark: #14533f;
  --cinnabar: #bd3d2a;
  --rail: #1f4d7a;
  --gold: #b78732;
  --shadow: 0 18px 60px rgba(18, 33, 27, 0.14);
  --soft-shadow: 0 10px 34px rgba(18, 33, 27, 0.08);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 228, 221, 0.82);
  background: rgba(246, 247, 244, 0.92);
  backdrop-filter: blur(16px);
}

.nav-inner {
  width: min(var(--max), calc(100% - 40px));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1.5px solid rgba(31, 122, 93, 0.36);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(237, 246, 240, 0.96));
  position: relative;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
}

.brand-mark::before {
  width: 14px;
  height: 18px;
  left: 9px;
  top: 8px;
  border: 2px solid var(--jade);
  border-radius: 5px;
  background: rgba(31, 122, 93, 0.08);
  transform: rotate(-10deg);
}

.brand-mark::after {
  width: 8px;
  height: 5px;
  left: 14px;
  top: 16px;
  border-left: 2px solid var(--jade);
  border-bottom: 2px solid var(--jade);
  transform: rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--jade);
  color: var(--white);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.nav-cta {
  height: 38px;
  flex: 0 0 auto;
}

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

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 0.42fr);
  gap: 42px;
  align-items: center;
}

.breadcrumb {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--jade-dark);
  text-decoration: none;
  font-weight: 720;
}

.kicker {
  margin: 0 0 14px;
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1;
  font-weight: 650;
  text-wrap: balance;
}

.dek {
  margin: 22px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.hero-card,
.cta-card,
.source-box,
.quick-box,
.toc,
.related-card,
.guide-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.hero-card {
  padding: 22px;
  box-shadow: var(--soft-shadow);
}

.hero-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.hero-card ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
}

.hero-card li + li {
  margin-top: 8px;
}

.page {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 82px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 270px;
  gap: 48px;
  justify-content: center;
  align-items: start;
}

.content {
  min-width: 0;
  background: transparent;
}

.content > * {
  min-width: 0;
}

.content h2 {
  margin: 52px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.5vw, 38px);
  line-height: 1.12;
  text-wrap: balance;
}

.content h3 {
  margin: 30px 0 10px;
  font-size: 21px;
  line-height: 1.25;
}

.content p,
.content li {
  color: var(--muted);
  font-size: 17px;
}

.content p {
  margin: 0 0 18px;
}

.content > h2:first-of-type {
  margin-top: 40px;
}

.content ul,
.content ol {
  padding-left: 24px;
  margin-top: 0;
}

.content li + li {
  margin-top: 8px;
}

.content a {
  color: var(--jade-dark);
  font-weight: 700;
}

.toc {
  padding: 18px;
  position: sticky;
  top: 88px;
  box-shadow: var(--soft-shadow);
}

.toc strong {
  display: block;
  margin-bottom: 12px;
}

.toc a {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.toc a:hover {
  color: var(--jade-dark);
}

.quick-box {
  margin: 0 0 30px;
  padding: 22px 24px;
  background: #f8fbf7;
  box-shadow: var(--soft-shadow);
}

.quick-box strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.article-image {
  margin: 34px 0;
}

.article-image img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.article-image figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.article-image.product-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbf7;
  box-shadow: var(--soft-shadow);
}

.article-image.product-preview img {
  width: min(100%, 560px);
  margin: 0 auto;
  border: 0;
  box-shadow: none;
  aspect-ratio: auto;
  object-fit: contain;
}

.article-image.product-preview figcaption {
  text-align: center;
}

.callout {
  margin: 30px 0;
  padding: 20px 22px;
  border: 1px solid #f1d4c5;
  border-left: 4px solid var(--cinnabar);
  border-radius: var(--radius);
  background: #fff8f2;
  color: var(--muted);
}

.callout strong {
  color: var(--ink);
}

.table-wrap {
  margin: 30px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

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

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

th {
  color: var(--ink);
  background: #eef3ed;
  font-size: 14px;
}

td {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

th:first-child,
td:first-child {
  width: 155px;
  color: var(--ink);
  font-weight: 760;
}

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

.source-box {
  margin-top: 36px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 14px;
}

.source-box strong {
  display: block;
  color: var(--ink);
  margin-bottom: 8px;
}

.source-box a {
  display: inline-block;
  margin: 4px 12px 4px 0;
  color: var(--jade-dark);
  font-weight: 720;
}

.cta-card {
  margin-top: 46px;
  padding: 28px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
}

.cta-card h2 {
  margin-top: 0;
  color: var(--white);
}

.cta-card p {
  color: rgba(255, 255, 255, 0.78);
}

.cta-card .button {
  background: var(--white);
  color: var(--ink);
}

.guide-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.guide-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.guide-card.featured {
  grid-column: span 2;
  min-height: 300px;
  background: var(--white);
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.guide-card span {
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
}

.guide-thumb {
  height: 150px;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #eef3ed;
}

.guide-card.featured .guide-thumb {
  height: 210px;
}

.guide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.guide-card:hover .guide-thumb img {
  transform: scale(1.03);
}

.guide-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.guide-card h2,
.guide-card h3 {
  margin: 18px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.03;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
}

.guide-card small {
  display: block;
  margin-top: auto;
  padding-top: 20px;
  color: var(--jade-dark);
  font-weight: 780;
}

.hub-path {
  margin: 8px 0 52px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.hub-path h2,
.topic-section h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
}

.hub-path p,
.topic-section > p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.path-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.path-step {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  text-decoration: none;
}

.path-thumb {
  display: block;
  height: 108px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #eef3ed;
}

.path-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.path-body {
  padding: 16px 18px 18px;
}

.path-number {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #edf4ef;
  color: var(--jade-dark);
  font-weight: 850;
}

.path-step strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.path-step em {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.topic-section {
  margin-top: 56px;
}

.topic-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.topic-header p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.related {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.related-card {
  padding: 18px;
  text-decoration: none;
}

.related-card strong {
  display: block;
  margin-bottom: 6px;
}

.related-card span {
  color: var(--muted);
  font-size: 14px;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.58;
}

.section-note {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.section-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.step-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.step-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.step-number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #edf4ef;
  color: var(--jade-dark);
  font-weight: 800;
}

.step-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.mistake-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.mistake-list div {
  padding: 16px 18px;
  border: 1px solid #ecd5ce;
  border-radius: var(--radius);
  background: #fff8f4;
  color: var(--muted);
}

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

.mini-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.mini-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.mini-card p {
  margin: 0;
  font-size: 15px;
}

footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .nav-inner {
    width: min(var(--max), calc(100% - 28px));
    gap: 12px;
  }

  .nav-links {
    display: none;
  }

  .brand {
    max-width: min(68vw, 290px);
  }

  .brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-cta {
    min-height: 42px;
    height: 42px;
    padding: 0 13px;
    font-size: 14px;
  }

  .hero-inner,
  .article-layout,
  .guide-index,
  .related,
  .path-list {
    grid-template-columns: 1fr;
  }

  .guide-card.featured {
    grid-column: auto;
  }

  .topic-header {
    display: block;
  }

  .hero-inner,
  .page,
  .footer-inner {
    width: min(var(--max), calc(100% - 28px));
  }

  .hero-inner {
    padding: 50px 0 32px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 46px);
    line-height: 1.02;
  }

  .dek {
    font-size: 18px;
  }

  .content h2 {
    margin-top: 40px;
    font-size: clamp(27px, 8vw, 34px);
  }

  .table-wrap {
    max-width: 100%;
  }

  table {
    min-width: 620px;
  }

  .toc {
    position: static;
  }

  .quick-box {
    margin-top: 0;
  }

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

  .step-item {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* Shared layout for the five long-form guide pages. */
.brand-mark {
  color: transparent;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  min-height: 66px;
  padding: 0 max(20px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(223, 228, 221, 0.82);
  background: rgba(246, 247, 244, 0.94);
  backdrop-filter: blur(16px);
}

.site-header .brand {
  min-width: 0;
}

.site-header .nav-links {
  flex: 1;
  justify-content: center;
}

.site-header .nav-cta {
  flex: 0 0 auto;
}

.article-shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 82px;
}

.article-shell > .breadcrumb {
  margin: 0 0 30px;
}

.article-shell .content {
  width: 100%;
  max-width: 820px;
}

img.article-image {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 34px 0;
  border: 1px solid rgba(210, 218, 208, 0.95);
  border-radius: var(--radius);
  background: #edf2ed;
  box-shadow: var(--soft-shadow);
}

@media (max-width: 900px) {
  .site-header {
    min-height: 66px;
    padding: 0 14px;
    gap: 12px;
  }

  .site-header .brand {
    max-width: calc(100vw - 116px);
  }

  .site-header .brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header .nav-links {
    display: none;
  }

  .site-header .nav-cta {
    height: 42px;
    min-height: 42px;
    margin-left: auto;
    padding: 0 13px;
  }

  .article-shell {
    width: 100%;
    max-width: 100%;
    padding: 24px 16px 70px;
  }

  .article-shell > .breadcrumb {
    margin: 0 0 22px;
    overflow-wrap: anywhere;
  }

  .article-shell .content {
    max-width: 100%;
  }

  .content h1 {
    max-width: 100%;
    font-size: clamp(34px, 10.6vw, 46px);
    overflow-wrap: break-word;
  }

  .content p,
  .content li {
    font-size: 16px;
    line-height: 1.66;
  }

  .content,
  .content > * {
    max-width: 100%;
  }

  img.article-image,
  .article-image {
    margin: 24px 0;
  }
}

@media (max-width: 640px) {
  .table-wrap.table-cards {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .table-cards table,
  .table-cards tbody,
  .table-cards tr,
  .table-cards td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .table-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .table-cards tbody {
    display: grid;
    gap: 12px;
  }

  .table-cards tr {
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
  }

  .table-cards td,
  .table-cards td:first-child {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .table-cards td + td {
    border-top: 1px solid var(--line);
  }

  .table-cards td::before {
    content: attr(data-label);
    color: var(--ink);
    font-size: 13px;
    font-weight: 780;
    line-height: 1.4;
  }
}
