/* CastCalc Article Shared Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:       #f8f5ef;
  --cream-2:     #f0ebe0;
  --cream-3:     #e4ddd0;
  --ink:         #16140f;
  --ink-2:       #3a3730;
  --ink-3:       #6b6760;
  --ink-4:       #9a9790;
  --rule:        #d8d3c8;
  --gold:        #9a7b3f;
  --gold-2:      #b8963f;
  --gold-light:  #f5edda;
  --gold-border: #dfc98a;
  --charcoal:    #1e1c18;
  --charcoal-2:  #2d2b26;
  --charcoal-3:  #454238;
  --white:       #ffffff;
  --serif:       'Playfair Display', Georgia, serif;
  --serif-body:  'Libre Baskerville', Georgia, serif;
  --sans:        'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--serif-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ─── TOPBAR ─── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,245,239,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}
.topbar__inner {
  max-width: 1120px; margin: 0 auto; padding: 0 32px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar__brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.topbar__sub {
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-left: 1px solid var(--rule);
  padding-left: 10px;
}
.topbar__logo {
  height: 24px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.topbar__back {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.15s;
}
.topbar__back:hover { color: var(--ink); }
.topbar__cta {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--charcoal);
  padding: 9px 20px;
  text-decoration: none;
  transition: background 0.15s;
}
.topbar__cta:hover { background: var(--charcoal-3); }

/* ─── ARTICLE HEADER ─── */
.article-header {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
}
.article-header__inner { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.article-header__meta {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
  font-family: var(--sans);
}
.article-header__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.article-header__dot { color: var(--rule); }
.article-header__read {
  font-size: 0.78rem;
  color: var(--ink-4);
}
.article-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.article-header__lede {
  font-family: var(--serif-body);
  font-size: 1.1rem;
  color: var(--ink-2);
  line-height: 1.75;
  border-left: 3px solid var(--gold);
  padding-left: 20px;
  margin-top: 8px;
}
.article-header__byline {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; gap: 14px;
  font-family: var(--sans);
}
.article-header__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid var(--rule);
}
.article-header__byline-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.article-header__byline-role {
  font-size: 0.78rem;
  color: var(--ink-4);
}

/* ─── ARTICLE BODY ─── */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 32px 96px;
}
.article-body h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  margin: 52px 0 18px;
  line-height: 1.25;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 36px 0 14px;
}
.article-body p {
  margin-bottom: 22px;
  color: var(--ink-2);
}
.article-body p:last-child { margin-bottom: 0; }
.article-body strong { font-weight: 700; color: var(--ink); }
.article-body em { font-style: italic; }

/* Pull quote */
.pull-quote {
  margin: 44px 0;
  padding: 28px 32px;
  border-left: 4px solid var(--gold);
  background: var(--gold-light);
  border-top: 1px solid var(--gold-border);
  border-bottom: 1px solid var(--gold-border);
}
.pull-quote p {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
  margin: 0;
  line-height: 1.6;
}

/* Data callout */
.data-callout {
  margin: 44px 0;
  background: var(--charcoal);
  padding: 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
}
.data-callout__num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  white-space: nowrap;
}
.data-callout__label {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: #6a6860;
  line-height: 1.6;
  padding-top: 8px;
}
.data-callout__label strong { color: #9a9890; font-weight: 500; }

/* Numbered list */
.article-list {
  margin: 28px 0;
  padding-left: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 16px;
  counter-reset: article-counter;
}
.article-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: var(--ink-2);
  counter-increment: article-counter;
  line-height: 1.7;
}
.article-list li strong:first-child {
  display: block;
  margin-bottom: 2px;
}
.article-list li::before {
  content: counter(article-counter);
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  min-width: 32px;
  width: 32px;
  height: 32px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.article-list--labeled li {
  flex-direction: row;
  align-items: flex-start;
}
.article-list--labeled li .li-content {
  display: block;
  flex: 1;
  min-width: 0;
}
.article-list--labeled li .li-content strong {
  display: inline;
  color: var(--ink);
}


.compare-table {
  margin: 36px 0;
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.compare-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--charcoal);
  color: #9a9890;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--charcoal-3);
}
.compare-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  vertical-align: top;
  line-height: 1.5;
}
.compare-table tr:nth-child(even) td { background: var(--cream-2); }
.compare-table .td-highlight {
  font-weight: 600;
  color: var(--ink);
}

/* CTA box at end of article */
.article-cta {
  margin-top: 64px;
  padding: 40px;
  background: var(--charcoal);
  border-left: 4px solid var(--gold);
  font-family: var(--sans);
}
.article-cta__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.article-cta h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: #f0ece4;
  margin-bottom: 10px;
}
.article-cta p {
  font-size: 0.88rem;
  color: #6a6860;
  margin-bottom: 24px;
  line-height: 1.65;
}
.article-cta a {
  display: inline-block;
  padding: 11px 22px;
  background: var(--gold);
  color: var(--white);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.article-cta a:hover { background: var(--gold-2); }

/* Related articles */
.related {
  border-top: 1px solid var(--rule);
  background: var(--cream-2);
  padding: 64px 0;
  font-family: var(--sans);
}
.related__inner { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.related__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 28px;
}
.related__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s;
}
.related-card:hover { border-color: var(--gold); }
.related-card__tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.related-card__title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

/* Footer */
footer {
  background: var(--charcoal);
  padding: 40px 0;
  font-family: var(--sans);
}
.footer__inner {
  max-width: 1120px; margin: 0 auto; padding: 0 32px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer__brand { font-family: var(--serif); font-size: 1rem; color: #8a8880; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { font-size: 0.78rem; color: #5a5850; text-decoration: none; }
.footer__links a:hover { color: #9a9890; }

.topbar__right {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.topbar__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  flex-shrink: 0;
}
.topbar__burger span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.2s;
}
.topbar__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.topbar__burger.is-open span:nth-child(2) { opacity: 0; }
.topbar__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.topbar__drawer {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: rgba(248,245,239,0.98);
  border-bottom: 1px solid var(--rule);
  padding: 24px 32px 32px;
  flex-direction: column;
  gap: 0;
  z-index: 99;
}
.topbar__drawer.is-open { display: flex; }
.topbar__drawer a {
  font-size: 1rem; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}
.topbar__drawer a:last-child { border-bottom: none; }
.topbar__drawer .drawer-cta {
  margin-top: 20px; padding: 14px 0;
  background: var(--charcoal); color: var(--white);
  text-align: center; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; border-bottom: none;
}

@media (max-width: 700px) {
  .topbar__back span { display: none; }
  .topbar__cta { display: none; }
  .topbar__burger { display: flex; }
  .article-header__inner, .article-body, .related__inner { padding: 0 20px; }
  .article-header { padding: 48px 0 40px; }
  .article-header h1 { font-size: 1.8rem; }
  .data-callout { grid-template-columns: 1fr; gap: 12px; }
  .related__grid { grid-template-columns: 1fr; }
}
