/* ============================================================
   PAGE — content pages with sidebar (page.php + template-general.php)
   ============================================================ */

/* ── PAGE HEADER ── */
.thead {
  position: relative;
  background: var(--blue);
  color: var(--paper);
  overflow: hidden;
}
.thead-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.thead-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.thead-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(43, 54, 144, 0.72) 0%,
    rgba(43, 54, 144, 0.84) 60%,
    rgba(34, 44, 118, 0.97) 100%
  );
}
.thead-inner {
  position: relative;
  z-index: 2;
  padding: clamp(130px, 17vh, 200px) 0 clamp(52px, 7vh, 88px);
  max-width: var(--maxw);
}
.thead h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}
.t-deck {
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 400;
  color: var(--paper-dim);
  max-width: 58ch;
  margin: 26px 0 0;
  line-height: 1.6;
}
.t-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--paper-faint);
  margin-top: 22px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.t-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--steel-soft);
}

/* ── CRUMB ── */
.crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 28px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.crumb a {
  color: var(--steel-soft);
  transition: color 0.2s;
}
.crumb a:hover {
  color: var(--paper);
}

/* ── BODY LAYOUT ── */
.page-main {
  background: var(--white);
}

.page-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(40px, 5vw, 80px);
  padding-block: clamp(52px, 8vh, 96px);
  align-items: start;
}

/* article body */
.t-body {
  font-size: 18px;
  line-height: 1.8;
  color: #2a3160;
  max-width: 680px;
}
.t-body > *:first-child {
  margin-top: 0;
}
.t-body section {
  scroll-margin-top: 100px;
}

.t-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 48px 0 16px;
}
.t-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 32px 0 10px;
}
.t-body p {
  margin: 0 0 22px;
}
.t-body strong {
  color: var(--ink);
  font-weight: 600;
}
.t-body a {
  color: var(--blue);
  border-bottom: 1px solid var(--line-light);
}
.t-body a:hover {
  color: var(--red);
}
.t-body ul,
.t-body ol {
  margin: 0 0 22px;
  padding-left: 22px;
}
.t-body li {
  margin-bottom: 8px;
}
.t-body blockquote {
  border-left: 3px solid var(--red);
  background: var(--blue-soft);
  border-radius: 0 8px 8px 0;
  padding: 22px 26px;
  margin: 32px 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.t-body blockquote p {
  margin: 0;
}
.t-body img {
  border-radius: 8px;
  margin: 24px 0;
}
.t-body img.alignleft {
  float: left;
  margin-right: 10px;
}
.t-body img.alignright {
  float: right;
  margin-left: 10px;
}
.t-body figure {
  margin: 24px 0;
}
.t-body figcaption {
  font-size: 13px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  margin-top: 8px;
}
.t-body sup {
  color: var(--red);
  font-weight: 600;
  font-size: 0.7em;
}

/* sidebar */
.t-side {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.side-card {
  border: 1px solid var(--line-light);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}
.side-card h4 {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
  padding: 18px 20px 0;
}

/* TOC */
.toc {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0 20px;
}
.toc li {
  margin-bottom: 9px;
}
.toc a {
  font-size: 13.5px;
  color: var(--ink-dim);
  display: flex;
  gap: 10px;
  align-items: baseline;
  transition: color 0.2s;
}
.toc a .tc-n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red);
  flex-shrink: 0;
}
.toc a:hover,
.toc a.active {
  color: var(--ink);
}
.toc a.active {
  font-weight: 600;
}

/* key facts card */
.keyfacts {
  background: var(--blue);
  color: var(--paper);
  border: none;
}
.keyfacts h4 {
  color: var(--paper-faint);
}
.kf-list {
  list-style: none;
  margin: 12px 0 4px;
  padding: 0 20px 18px;
}
.kf-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-blue);
}
.kf-list li:last-child {
  border-bottom: none;
}
.kf-v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: #fff;
  flex-shrink: 0;
  min-width: 64px;
}
.kf-l {
  font-size: 13px;
  color: var(--paper-dim);
  line-height: 1.4;
}

/* sidebar CTA card */
.side-cta {
  padding: 18px 20px 22px;
}
.side-cta p {
  font-size: 13.5px;
  color: var(--ink-dim);
  margin: 0 0 14px;
  line-height: 1.55;
}
.side-cta .btn-red {
  width: 100%;
  justify-content: center;
  font-size: 12px;
  padding: 11px 16px;
}

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .page-grid {
    grid-template-columns: 1fr;
  }
  .t-body {
    max-width: none;
  }
  .t-side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .t-side .side-card {
    flex: 1;
    min-width: 240px;
  }
}

@media (max-width: 560px) {
  .t-side {
    flex-direction: column;
  }
}
