/* ==========================================================================
   chiefadminofficer.com — design system
   ========================================================================== */

:root {
  --bg: #f7f3ec;
  --bg-alt: #fffdf9;
  --surface: #ffffff;
  --surface-2: #f2ece2;
  --ink: #16201c;
  --muted: #56615b;
  --faint: #7d857f;
  --line: rgba(22, 32, 28, 0.1);
  --line-strong: rgba(22, 32, 28, 0.18);
  --forest: #1f4a3d;
  --forest-ink: #143128;
  --forest-soft: rgba(31, 74, 61, 0.08);
  --copper: #b0532a;
  --copper-strong: #8f3f1c;
  --copper-soft: rgba(176, 83, 42, 0.1);
  --gold: #e3ad55;
  --gold-soft: rgba(227, 173, 85, 0.18);
  --on-dark: #f6f1e8;
  --on-dark-muted: rgba(246, 241, 232, 0.72);
  --shadow-sm: 0 1px 2px rgba(22, 32, 28, 0.06), 0 1px 1px rgba(22, 32, 28, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(22, 32, 28, 0.22), 0 2px 6px rgba(22, 32, 28, 0.05);
  --shadow-lg: 0 30px 60px -24px rgba(22, 32, 28, 0.35), 0 8px 18px -8px rgba(22, 32, 28, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --content: 1180px;
  --gutter: max(20px, calc((100% - var(--content)) / 2));
  --header-h: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1613;
    --bg-alt: #131c18;
    --surface: #18231e;
    --surface-2: #1e2b25;
    --ink: #ece7de;
    --muted: #aab3ad;
    --faint: #879089;
    --line: rgba(236, 231, 222, 0.1);
    --line-strong: rgba(236, 231, 222, 0.2);
    --forest: #7cc3a6;
    --forest-ink: #0c1f19;
    --forest-soft: rgba(124, 195, 166, 0.1);
    --copper: #ec9a6c;
    --copper-strong: #f3b08a;
    --copper-soft: rgba(236, 154, 108, 0.12);
    --gold: #e9b866;
    --gold-soft: rgba(233, 184, 102, 0.14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variation-settings: "opsz" 72;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-variation-settings: "opsz" 36;
}

h4 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  letter-spacing: 0;
  font-weight: 650;
}

a {
  color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--copper-strong);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 4px;
}

strong {
  font-weight: 650;
  color: var(--ink);
}

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

img,
svg {
  max-width: 100%;
  display: block;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--forest);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px -16px rgba(22, 32, 28, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2a5c4c, #163a2f);
  color: #f6f1e8;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 14px -6px rgba(20, 49, 40, 0.6);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-tagline {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--forest-soft);
}

.site-nav a.active,
.site-nav a[aria-current="page"] {
  color: var(--forest);
  background: var(--forest-soft);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  display: block;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.read-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--forest), var(--gold));
  pointer-events: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 24px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(31, 74, 61, 0.7);
}

.btn.primary::after {
  content: "→";
  transition: transform 0.2s ease;
}

.btn.primary:hover {
  background: #183c31;
  color: #fff;
  box-shadow: 0 14px 28px -12px rgba(31, 74, 61, 0.8);
}

.btn.primary:hover::after {
  transform: translateX(3px);
}

.btn.ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.btn.ghost:hover {
  border-color: var(--forest);
  color: var(--forest);
}

@media (prefers-color-scheme: dark) {
  .btn.primary {
    background: #2f7a62;
  }

  .btn.primary:hover {
    background: #36896e;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(48px, 6vw, 80px);
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 70% at 85% 20%, var(--gold-soft), transparent 70%),
    radial-gradient(50% 60% at 0% 90%, var(--forest-soft), transparent 70%);
  mask-image: linear-gradient(#000 70%, transparent);
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 80% at 75% 40%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 80% at 75% 40%, #000 10%, transparent 75%);
  opacity: 0.55;
}

.hero:only-child,
.hero:not(:has(.hero-art)) {
  grid-template-columns: minmax(0, 1fr);
}

.hero-content {
  max-width: 680px;
}

.hero-content h1 {
  font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--forest);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--copper);
}

.lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 620px;
  text-wrap: pretty;
}

.hero .note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--faint);
}

.hero .note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3aa57c;
  box-shadow: 0 0 0 4px rgba(58, 165, 124, 0.16);
}

.read-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read-time::before {
  content: "·";
  color: var(--faint);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 18px;
}

.hero-stats > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--faint);
}

.stat-value {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

/* Hero briefing card */

.hero-art {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.orb-one {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 35% 35%, rgba(240, 196, 120, 0.95), rgba(176, 83, 42, 0.35) 60%, transparent 72%);
  top: -10px;
  right: 0;
  animation: float 14s ease-in-out infinite;
}

.orb-two {
  width: 170px;
  height: 170px;
  background: radial-gradient(circle at 40% 40%, rgba(47, 110, 90, 0.9), rgba(31, 74, 61, 0.25) 60%, transparent 72%);
  bottom: -10px;
  left: 0;
  animation: float 18s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, -14px);
  }
}

.grid-card {
  position: relative;
  width: min(380px, 100%);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 26px 18px;
  transform: rotate(-1.2deg);
  transition: transform 0.4s ease;
}

.grid-card:hover {
  transform: rotate(0deg) translateY(-3px);
}

.grid-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--forest), var(--gold), var(--copper));
}

.grid-card h3,
.grid-card-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
  margin-bottom: 10px;
  line-height: 1.4;
}

.grid-card ul {
  list-style: none;
  counter-reset: brief;
}

.grid-card li {
  counter-increment: brief;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  font-variation-settings: "opsz" 24;
}

.grid-card li:first-child {
  border-top: none;
}

.grid-card li::before {
  content: counter(brief, decimal-leading-zero);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--copper);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.grid-card li a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  margin-bottom: 22px;
  font-size: 0.85rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--faint);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--line-strong);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--forest);
  text-decoration: underline;
}

.breadcrumbs [aria-current] {
  color: var(--faint);
  max-width: 34ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Table of contents ---------- */

.toc {
  padding: 8px var(--gutter) 24px;
}

.toc h2 {
  font-size: 0.75rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
  font-weight: 650;
  margin-bottom: 16px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  counter-reset: toc;
}

.toc-grid a {
  counter-increment: toc;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.35;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.toc-grid a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--copper);
  font-variant-numeric: tabular-nums;
}

.toc-grid a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--forest) 35%, transparent);
  box-shadow: var(--shadow-md);
  color: var(--forest);
}

.article-toc {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.article-toc-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-toc-label {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.article-toc ol {
  list-style: none;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}

.article-toc ol::-webkit-scrollbar {
  display: none;
}

.article-toc a {
  display: block;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.article-toc a:hover {
  color: var(--ink);
  background: var(--forest-soft);
}

.article-toc a.active {
  color: #fff;
  background: var(--forest);
}

@media (prefers-color-scheme: dark) {
  .article-toc a.active {
    color: var(--forest-ink);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(56px, 7vw, 96px) var(--gutter);
}

.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section.alt + .section,
.section + .section.alt {
  border-top-color: var(--line);
}

.section > * + * {
  margin-top: 28px;
}

.section > h3 {
  margin-top: 44px;
  font-size: 1.35rem;
}

.section > h3 + * {
  margin-top: 16px;
}

.section > p,
.section > ul,
.section > ol {
  max-width: 760px;
  color: var(--muted);
}

.section > ul,
.section > ol {
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.section-header {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-header + * {
  margin-top: 0;
}

.section-header h2 {
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem);
  margin-bottom: 16px;
  text-wrap: balance;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  text-wrap: pretty;
}

.section-header p + p {
  margin-top: 12px;
}

.section-header .eyebrow {
  margin-bottom: 14px;
}

/* ---------- Cards ---------- */

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card > * + * {
  margin-top: 12px;
}

.card h3 {
  margin-bottom: 4px;
}

.card h3 + * {
  margin-top: 10px;
}

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

.card ul,
.card ol,
.comparison-card ul,
.resource-card ul {
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.card ul,
.comparison-card ul,
.resource-card ul {
  list-style: none;
}

.card ul li,
.comparison-card ul li,
.resource-card ul li {
  position: relative;
  padding-left: 22px;
}

.card ul li::before,
.comparison-card ul li::before,
.resource-card ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--copper);
  opacity: 0.85;
  transform: rotate(45deg);
}

.card ol {
  list-style: none;
  counter-reset: steps;
}

.card ol > li {
  counter-increment: steps;
  position: relative;
  padding-left: 40px;
  min-height: 28px;
}

.card ol > li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: -1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--forest);
  background: var(--forest-soft);
  border: 1px solid color-mix(in srgb, var(--forest) 20%, transparent);
}

.card ol > li + li::after {
  content: "";
  position: absolute;
  left: 12.5px;
  top: -10px;
  height: 9px;
  width: 1px;
  background: color-mix(in srgb, var(--forest) 25%, transparent);
}

.card > a:last-child,
.card > p:last-child > a:only-child:not([href^="mailto"]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 600;
  text-decoration: none;
  color: var(--copper);
}

.card > a:last-child::after {
  content: "→";
  transition: transform 0.2s ease;
}

.card > a:last-child:hover::after {
  transform: translateX(3px);
}

.card > a[download]:last-child::after {
  content: "↓";
}

.card > a[download]:last-child {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--copper) 35%, transparent);
  background: var(--copper-soft);
  font-size: 0.92rem;
}

.card > a[download]:last-child:hover::after {
  transform: translateY(2px);
}

.note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--faint);
}

.card .note {
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}

/* ---------- Pills ---------- */

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.pill::before {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--forest-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%232f7a62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 20px no-repeat;
}

/* ---------- Framework ---------- */

.framework {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  counter-reset: fw;
}

.framework-item {
  position: relative;
  background: var(--surface);
  padding: 28px 24px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.framework-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--forest), color-mix(in srgb, var(--forest) 30%, var(--gold)));
}

.framework-item:nth-child(4n + 2)::before {
  background: linear-gradient(90deg, color-mix(in srgb, var(--forest) 30%, var(--gold)), var(--gold));
}

.framework-item:nth-child(4n + 3)::before {
  background: linear-gradient(90deg, var(--gold), var(--copper));
}

.framework-item:nth-child(4n + 4)::before {
  background: linear-gradient(90deg, var(--copper), var(--copper-strong));
}

.framework-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.framework-item h3 {
  margin-bottom: 10px;
}

.framework-item p,
.framework-item ul {
  color: var(--muted);
  font-size: 0.97rem;
}

.framework-item > * + * {
  margin-top: 10px;
}

.framework-item ul {
  padding-left: 18px;
}

/* ---------- Callout ---------- */

.callout {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px 40px;
  align-items: start;
  background:
    linear-gradient(135deg, var(--gold-soft), transparent 60%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  border-left: 4px solid var(--gold);
  padding: 28px 30px;
  border-radius: var(--radius);
  color: var(--muted);
}

.callout:has(> :only-child) {
  grid-template-columns: 1fr;
}

.callout h3 {
  margin-bottom: 8px;
}

.callout p + p {
  margin-top: 10px;
}

.checklist {
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--ink);
}

.checklist li {
  position: relative;
  padding-left: 32px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--forest)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 20px no-repeat;
}

/* ---------- Stats ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--copper-soft);
}

.stat-card h4 {
  margin-bottom: 6px;
  color: var(--copper);
}

.stat-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Comparison ---------- */

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}

.comparison-card {
  position: relative;
  background: var(--surface);
  padding: 30px 28px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.comparison-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--forest);
}

.comparison-card:nth-child(3n + 2)::before {
  background: var(--copper);
}

.comparison-card:nth-child(3n + 3)::before {
  background: var(--gold);
}

.comparison-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.comparison-card > p {
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.comparison-card > * + ul {
  margin-top: 0;
}

/* ---------- Resource cards ---------- */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}

.resource-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.resource-card:has(> a:last-child):hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--forest) 30%, transparent);
}

.resource-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.resource-card p {
  color: var(--muted);
  font-size: 0.97rem;
  flex-grow: 1;
}

.resource-card > * + * {
  margin-top: 10px;
}

.resource-card > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--copper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.resource-card > a:last-child::after {
  content: "→";
  transition: transform 0.2s ease;
}

.resource-card > a:last-child::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.resource-card:hover > a:last-child::after {
  transform: translateX(4px);
}

/* ---------- Related links ---------- */

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.related-links a::after {
  content: "→";
  color: var(--copper);
  transition: transform 0.2s ease;
}

.related-links a:hover {
  border-color: var(--forest);
  color: var(--forest);
  transform: translateY(-1px);
}

.related-links a:hover::after {
  transform: translateX(3px);
}

/* ---------- Tables ---------- */

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

.data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table caption {
  text-align: left;
  padding: 16px 20px 0;
  color: var(--faint);
  font-size: 0.9rem;
}

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

.data-table thead th {
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.data-table td {
  color: var(--muted);
}

.data-table td:first-child,
.data-table tbody th {
  color: var(--ink);
  font-weight: 600;
  min-width: 150px;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background: var(--forest-soft);
}

.data-table tr:last-child td,
.data-table tr:last-child th {
  border-bottom: none;
}

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  gap: 12px;
  max-width: 880px;
}

.faq-grid details {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-grid details[open] {
  border-color: color-mix(in srgb, var(--forest) 30%, transparent);
  box-shadow: var(--shadow-md);
}

.faq-grid summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
}

.faq-grid summary::-webkit-details-marker {
  display: none;
}

.faq-grid summary::after {
  content: "";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--forest-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M9 14h10M14 9v10' fill='none' stroke='%232f7a62' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 28px no-repeat;
  transition: transform 0.25s ease;
}

.faq-grid details[open] summary::after {
  transform: rotate(45deg);
}

.faq-grid summary:hover {
  color: var(--forest);
}

.faq-grid details > :not(summary) {
  padding: 0 22px 20px;
  color: var(--muted);
}

.faq-grid details > :not(summary) + :not(summary) {
  margin-top: -8px;
}

/* ---------- CTA ---------- */

.cta {
  position: relative;
  padding: clamp(64px, 8vw, 110px) var(--gutter);
  background: #143128;
  color: var(--on-dark);
  overflow: hidden;
  isolation: isolate;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 80% at 100% 0%, rgba(227, 173, 85, 0.28), transparent 70%),
    radial-gradient(40% 70% at 0% 100%, rgba(176, 83, 42, 0.3), transparent 70%);
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
}

.cta-content {
  max-width: 720px;
}

.cta-content h2 {
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  margin-bottom: 14px;
  color: #fff;
  text-wrap: balance;
}

.cta-content p {
  color: var(--on-dark-muted);
  font-size: 1.08rem;
  margin-bottom: 28px;
}

.cta-content a:not(.btn) {
  color: var(--gold);
}

.cta-content a:not(.btn):hover {
  color: #f5cf8d;
}

.cta-content .btn + .btn {
  margin-left: 8px;
}

.cta .btn.primary {
  background: var(--gold);
  color: #1b1a14;
  box-shadow: 0 12px 26px -12px rgba(227, 173, 85, 0.8);
}

.cta .btn.primary:hover {
  background: #edbd6c;
  color: #1b1a14;
}

.cta .btn.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.cta .btn.ghost:hover {
  border-color: #fff;
  color: #fff;
}

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 64px var(--gutter) 32px;
  background: #0f1915;
  color: rgba(246, 241, 232, 0.66);
  font-size: 0.92rem;
}

.site-footer .brand-title {
  color: #fff;
  font-size: 1.2rem;
}

.site-footer .brand {
  margin-bottom: 16px;
}

.site-footer .brand-mark {
  width: 38px;
  height: 38px;
}

.footer-about p {
  max-width: 340px;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(246, 241, 232, 0.45);
  margin-bottom: 14px;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links a,
.footer-about a,
.footer-meta a {
  text-decoration: none;
  color: rgba(246, 241, 232, 0.82);
}

.footer-links a:hover,
.footer-about a:hover,
.footer-meta a:hover {
  color: var(--gold);
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(246, 241, 232, 0.5);
}

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--forest);
  color: #fff;
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* ---------- Reveal animation ---------- */

.js .fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .site-footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  :root {
    --header-h: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .site-nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    min-height: 0;
    padding: 24px 0;
  }

  .grid-card {
    transform: none;
  }
}

@media (max-width: 640px) {
  .brand-tagline {
    display: none;
  }

  .hero-art:not(:has(a)) {
    display: none;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-stats > div + div {
    padding-left: 0;
    border-left: none;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .orb-one {
    width: 150px;
    height: 150px;
  }

  .orb-two {
    width: 120px;
    height: 120px;
  }

  .card,
  .comparison-card,
  .resource-card {
    padding: 22px;
  }

  .callout {
    padding: 22px;
  }

  .article-toc-label {
    display: none;
  }

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .cta-content .btn + .btn {
    margin: 10px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .fade-up {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .article-toc,
  .back-to-top,
  .cta,
  .hero-art,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section,
  .hero {
    padding: 16px 0;
  }

  .card,
  .table-wrap {
    box-shadow: none;
    break-inside: avoid;
  }
}
