*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #f9f6f1;
  --warm-white: #fdfcfa;
  --sand: #ede8df;
  --stone: #c9bfb0;
  --ink: #1a1814;
  --ink-light: #4a4540;
  --ink-muted: #8a8278;
  --accent: #c17f4a;
  --accent-light: #e8c99e;
}

html { scroll-behavior: smooth; }
body {
  font-family: "DM Sans", sans-serif;
  background: var(--warm-white);
  color: var(--ink);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.8;
}

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 220;
  width: 0;
  transition: width 0.1s linear;
}

.page-wrapper {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 60px;
}

.article-header {
  padding-top: 148px;
  padding-bottom: 48px;
  border-bottom: 0;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 38px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}

.article-back:hover {
  color: var(--ink);
  gap: 12px;
}

.article-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.article-subtitle {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-muted);
  font-weight: 300;
  margin-bottom: 28px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.meta-byline {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-muted);
}

.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--stone); }
.meta-item { font-size: 13px; color: var(--ink-muted); }

.featured-image {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: var(--sand);
  margin: 40px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.placeholder-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

.article-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 560px) 180px;
  gap: 72px;
  padding-top: 56px;
  padding-bottom: 120px;
  align-items: start;
  justify-content: center;
}

.article-body { min-width: 0; }
.article-body {
  grid-column: 2;
  grid-row: 1;
  max-width: 560px;
}
.article-body p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-light);
  margin-bottom: 24px;
}

.article-body p.lead {
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 32px;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 52px;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding-top: 0;
  border-top: 0;
}

.article-body h2[id],
.article-body h3[id] {
  scroll-margin-top: 108px;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 36px;
  margin-bottom: 14px;
  line-height: 1.3;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.article-body li {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-light);
  margin-bottom: 8px;
}

.article-body strong { font-weight: 500; color: var(--ink); }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--ink); }

.article-body blockquote {
  margin: 36px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  background: var(--cream);
}

.article-body blockquote p {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px !important;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5 !important;
  color: var(--ink) !important;
  margin: 0 !important;
}

.article-body blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-style: normal;
}

.highlight-box {
  background: var(--cream);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  margin: 32px 0;
}

.highlight-box p {
  font-size: 15px !important;
  color: var(--ink-light) !important;
  margin: 0 !important;
  line-height: 1.75 !important;
}

.key-takeaways {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 6px;
  padding: 28px 32px;
  margin: 36px 0;
}

.key-takeaways-label {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
  display: block;
}

.key-takeaways-items p {
  font-size: 15px !important;
  color: var(--ink-light) !important;
  margin: 0 0 10px !important;
  line-height: 1.65 !important;
}

.key-takeaways-items p:last-child { margin-bottom: 0 !important; }

.key-takeaways-content p {
  color: var(--ink-light);
  margin: 0 0 12px;
  line-height: 1.7;
}

.key-takeaways-content p:last-child {
  margin-bottom: 0;
}

.key-takeaways-content ul,
.key-takeaways-content ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.key-takeaways-content li {
  color: var(--ink-light);
  margin-bottom: 6px;
  line-height: 1.7;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
}

.article-body th {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  padding: 10px 14px;
  border-bottom: 2px solid var(--ink);
  text-align: left;
}

.article-body td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sand);
  color: var(--ink-light);
  vertical-align: top;
  line-height: 1.55;
}

.article-body tr:hover td { background: var(--cream); }

@media (max-width: 768px) {
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.cost-chart {
  margin: 26px 0 34px;
  padding: 18px 20px;
  background: var(--cream);
  border: 1px solid var(--sand);
}

.cost-chart figcaption {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.cost-chart-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.cost-chart-row:last-child {
  margin-bottom: 0;
}

.cost-chart-label {
  font-size: 13px;
  color: var(--ink);
}

.cost-chart-track {
  height: 10px;
  border-radius: 999px;
  background: var(--sand);
  overflow: hidden;
}

.cost-chart-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c17f4a 0%, #dfa873 100%);
}

.cost-chart-value {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: right;
}

.w-20 { width: 20%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-80 { width: 80%; }
.w-100 { width: 100%; }

.cost-flow {
  margin: 30px 0 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.cost-flow-step {
  background: var(--cream);
  border: 1px solid var(--sand);
  padding: 16px;
}

.cost-flow-step h3 {
  margin: 0 0 8px !important;
  font-size: 15px !important;
  font-style: normal !important;
  font-family: "DM Sans", sans-serif !important;
}

.cost-flow-step p {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.cost-flow-arrow {
  align-self: center;
  color: var(--accent);
  font-size: 22px;
}

.article-body pre {
  background: var(--ink);
  padding: 24px 28px;
  margin: 28px 0;
  overflow-x: auto;
}

.article-body pre code {
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: var(--stone);
  line-height: 1.7;
  background: none;
  padding: 0;
}

.article-body code {
  font-family: "Courier New", monospace;
  font-size: 14px;
  background: var(--sand);
  padding: 2px 7px;
  color: var(--ink-light);
}

.article-footer-cta {
  background: var(--ink);
  padding: 40px 44px;
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.cta-text h3 {
  margin-top: 0 !important;
  font-size: 20px;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 6px;
}

.cta-text p {
  font-size: 14px;
  color: var(--stone);
  line-height: 1.6;
  margin: 0 !important;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  background: var(--accent);
  color: #fff !important;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--sand);
}

.article-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--stone);
  padding: 5px 13px;
  text-decoration: none;
}

.article-share {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--sand);
  flex-wrap: wrap;
}

.share-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.share-btn {
  padding: 7px 16px;
  border: 1px solid var(--stone);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: none;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
}

.author-bio {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 48px;
  padding: 32px 36px;
  background: var(--cream);
  border-top: 3px solid var(--accent);
}

.author-bio-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  color: #fff;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center;
}

.author-bio-name { font-size: 16px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.author-bio-role {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.author-bio-text { font-size: 14px; line-height: 1.7; color: var(--ink-muted); }

.article-sidebar {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 88px;
}

.article-author-rail {
  grid-column: 3;
  grid-row: 1;
  position: static;
}

.author-rail-card {
  padding: 0;
}

.article-author-rail .author-bio-avatar {
  width: 46px;
  height: 46px;
  margin-bottom: 10px;
  font-size: 20px;
}

.article-author-rail .author-bio-name {
  font-size: 15px;
  margin-bottom: 2px;
}

.article-author-rail .author-bio-role {
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.article-author-rail .author-bio-text {
  font-size: 13px;
  line-height: 1.65;
}
.toc-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
  display: block;
}

.toc-list { list-style: none; }
.toc-list a {
  display: block;
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--sand);
  line-height: 1.45;
}

.toc-list a.active,
.toc-list a:hover {
  color: var(--ink);
  border-left-color: var(--accent);
}

.related-section { border-top: 1px solid var(--sand); padding: 72px 0 80px; }
.related-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
}

.related-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.related-all { font-size: 13px; color: var(--accent); text-decoration: none; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }

.related-card {
  background: var(--cream);
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-card-cat {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.related-card h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
}

.related-card p { font-size: 13px; color: var(--ink-muted); line-height: 1.6; }
.related-card-meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 14px;
  display: block;
}

@media (max-width: 900px) {
  .page-wrapper { padding: 0 24px; }
  .article-header {
    max-width: 100%;
    padding-top: 122px;
    padding-bottom: 32px;
  }
  .article-back {
    margin-bottom: 24px;
    font-size: 11px;
    gap: 6px;
  }
  .article-title {
    font-size: clamp(30px, 8vw, 38px);
    line-height: 1.18;
    margin-bottom: 14px;
  }
  .article-subtitle {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  .article-meta {
    gap: 10px;
  }
  .meta-sep {
    display: none;
  }
  .meta-item {
    font-size: 12px;
  }
  .featured-image {
    margin-top: 28px;
    aspect-ratio: 16 / 9;
  }
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-body {
    grid-column: auto;
    grid-row: auto;
  }
  .article-sidebar {
    display: none;
  }
  .article-author-rail {
    display: none;
  }
  .cost-chart-row {
    grid-template-columns: 100px minmax(0, 1fr) 72px;
  }
  .cost-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .cost-flow-arrow {
    display: none;
  }
  .related-grid { grid-template-columns: 1fr; }
  .article-footer-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
  .author-bio { flex-direction: column; padding: 24px; }
}
