/* 1. Tokens */
:root {
  --page: #f3eee5;
  --paper: #fbfaf6;
  --ink: #171717;
  --muted: #5f5f5d;
  --soft: #d9d7d2;
  --green: #174f3b;
  --green-2: #3f8a5a;
  --blue: #315f96;
  --deep-blue: #133080;
  --pale-navy: #dfe1f7;
  --orange: #c46f3d;
  --gold: #d1b06e;
  --glass: rgba(255, 255, 255, .58);
  --line: rgba(23, 23, 23, .10);
  --glass-border: rgba(255, 255, 255, .78);
  --hero-border: color-mix(in srgb, var(--pale-navy) 42%, var(--line));
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, .76);
  --hero-gradient:
    radial-gradient(circle at 4% 0%, rgba(223, 225, 247, .78) 0, rgba(223, 225, 247, 0) 26%),
    radial-gradient(circle at 96% 2%, rgba(246, 224, 227, .82) 0, rgba(246, 224, 227, 0) 29%),
    radial-gradient(circle at 72% 72%, rgba(231, 239, 224, .72) 0, rgba(231, 239, 224, 0) 34%),
    linear-gradient(135deg, #fbfaf6 0%, #f7f5ee 48%, #fbf7f4 100%);
  --terminal-red: #df5f5f;
  --terminal-yellow: #d8b96c;
  --terminal-green: #6fb777;
  --table-head: rgba(231, 239, 224, .62);
  --sidebar-active: rgba(222, 248, 232, .76);
  --shadow-soft: 0 18px 45px rgba(35, 33, 29, .08);
  --shadow-float: 0 28px 70px rgba(35, 33, 29, .13), 0 2px 8px rgba(35, 33, 29, .06);
  --shadow-fan: 0 24px 50px rgba(36, 33, 29, .18);
  --shadow-hero: 0 24px 70px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .72);
  --font-display: "Manrope", system-ui, sans-serif;
  --font-editorial: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --page-x: clamp(24px, 5vw, 72px);
  --section-y: clamp(96px, 12vw, 160px);
  --wide: 1180px;
  --reading: 740px;
  --type-hero: clamp(4.6rem, 7vw, 7.2rem);
  --type-page-title: clamp(3.4rem, 5.8vw, 5.8rem);
  --type-section-title: clamp(3.1rem, 5vw, 5.4rem);
  --type-card-title: clamp(1.9rem, 3vw, 2.8rem);
  --type-body-large: clamp(1.05rem, 1.45vw, 1.2rem);
  --type-editorial-title: clamp(2.75rem, 7vw, 4.6rem);
  --type-editorial-dek: clamp(1.22rem, 2.1vw, 1.5rem);
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-template: 32px;
  --radius-pill: 999px;
}

/* 2. Base */
* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  font-size: 18px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 255, 255, .52), transparent 68%),
    var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* 3. Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 72px;
  padding: 0 var(--page-x);
  background: rgba(243, 238, 229, .82);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 19px;
  color: rgba(23, 23, 23, .58);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

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

.site-nav a:hover {
  color: var(--green);
}

/* 4. Typography */
h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: 0;
}

h1 {
  max-width: 920px;
  margin: 0 auto 30px;
  font-size: var(--type-page-title);
  font-weight: 800;
  line-height: .96;
}

h1 em,
h2 em {
  color: var(--green);
  font-style: italic;
  font-weight: 600;
}

h2 {
  margin-bottom: 24px;
  font-size: var(--type-section-title);
  font-weight: 800;
  line-height: .98;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  font-weight: 800;
}

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

.eyebrow,
.section-label,
.panel-label,
.card span {
  color: rgba(23, 23, 23, .48);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 58px;
}

.section-label::after {
  content: "";
  width: 64px;
  height: 1px;
  background: rgba(19, 48, 128, .22);
}

.section-label span {
  letter-spacing: .18em;
}

/* 5. Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 26px;
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--shadow-float);
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.button-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--green-2);
}

.text-link {
  display: inline-flex;
  margin-top: 34px;
  color: var(--green-2);
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

/* 6. Hero */
main {
  padding: 0 var(--page-x) 96px;
}

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 96px 0 var(--section-y);
}

.hero-home {
  min-height: calc(100vh - 72px);
  text-align: center;
}

.hero-copy {
  max-width: 980px;
  margin: 0 auto;
}

.hero-bust {
  display: block;
  width: 116px;
  height: auto;
  margin: 0 auto 28px;
  background: var(--paper);
}

.hero .eyebrow {
  display: block;
  margin: 0 0 24px;
}

.hero-sub,
.page-hero p,
.section-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: var(--type-body-large);
  line-height: 1.85;
}

.hero-sub {
  margin-right: auto;
  margin-left: auto;
}

.hero-note {
  max-width: 600px;
  margin: 24px auto 0;
  color: rgba(23, 23, 23, .56);
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.65;
  text-transform: uppercase;
}

.hero-home h1 {
  font-size: var(--type-hero);
  line-height: .93;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 52px;
}

.overview-section {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1fr);
  gap: clamp(56px, 9vw, 132px);
  align-items: start;
}

.overview-intro {
  position: sticky;
  top: 110px;
}

.overview-intro h2 {
  max-width: 430px;
  font-size: var(--type-card-title);
}

.overview-intro .section-copy {
  max-width: 430px;
}

.overview-list {
  border-top: 1px solid var(--line);
}

.overview-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 22px;
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
}

.overview-index {
  color: var(--deep-blue);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
}

.overview-item h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.overview-item p {
  max-width: 620px;
  margin-bottom: 0;
}

.email-chapters {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.email-chapters a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(217, 215, 210, .48);
  color: var(--ink);
  text-decoration: none;
}

.email-chapters a:hover {
  background: rgba(231, 239, 224, .72);
}

.email-chapters span {
  flex: 0 0 auto;
  color: var(--deep-blue);
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
}

.email-chapters strong {
  font-size: .9rem;
  font-weight: 700;
  text-align: right;
}

.overview-points {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.overview-points li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
}

.overview-points li::before {
  position: absolute;
  left: 0;
  color: var(--green-2);
  content: "->";
  font-family: var(--font-mono);
}

/* 7. Layout */
.section,
.page {
  max-width: var(--wide);
  margin: 0 auto;
}

.section {
  padding: var(--section-y) 0;
}

.page {
  padding-top: 108px;
}

.page-hero {
  max-width: var(--reading);
  margin-bottom: 58px;
}

.page-hero h1 {
  margin-left: 0;
  font-size: var(--type-page-title);
  line-height: .98;
}

.page-hero p {
  margin-left: 0;
}

.editorial-split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, .7fr);
  gap: clamp(56px, 8vw, 120px);
  align-items: center;
}

.editorial-split h2 {
  max-width: 650px;
  font-size: var(--type-section-title);
}

.soft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.stack {
  display: grid;
  gap: 18px;
}

/* 8. Cards */
.fan-nav {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 340px;
  margin-top: 80px;
}

.fan-card {
  position: relative;
  display: grid;
  align-content: end;
  width: 190px;
  min-height: 270px;
  margin: 0 -16px;
  padding: 26px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-fan);
  color: white;
  text-decoration: none;
  transform-origin: 50% 100%;
  transition: transform .2s ease;
}

.fan-card:hover {
  z-index: 2;
  transform: translateY(-18px) rotate(0deg);
}

.fan-card span {
  position: absolute;
  top: 24px;
  left: 24px;
  color: rgba(255, 255, 255, .58);
  font-family: var(--font-mono);
}

.fan-card strong {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: .92rem;
  letter-spacing: .16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.fan-card small {
  color: rgba(255, 255, 255, .72);
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.55;
}

.fan-card-blue {
  background: var(--blue);
  transform: rotate(-11deg) translateY(34px);
}

.fan-card-deep {
  background: var(--deep-blue);
  transform: rotate(-5deg) translateY(6px);
}

.fan-card-orange {
  background: var(--orange);
  transform: rotate(0deg);
}

.fan-card-green {
  background: #2b7b4d;
  transform: rotate(6deg) translateY(12px);
}

.fan-card-gold {
  background: var(--gold);
  color: rgba(23, 23, 23, .82);
  transform: rotate(12deg) translateY(40px);
}

.fan-card-gold span,
.fan-card-gold small {
  color: rgba(23, 23, 23, .52);
}

.card,
.wide-card,
.feature-card,
.about-block {
  padding: 30px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.card span {
  display: block;
  margin-bottom: 28px;
  color: var(--deep-blue);
}

.card p,
.wide-card p,
.feature-card p,
.about-block p {
  margin-bottom: 0;
}

.card h2,
.card h3 {
  font-size: 1.08rem;
  line-height: 1.25;
}

.wide-card h2,
.feature-card h2 {
  font-size: var(--type-card-title);
  line-height: 1.05;
}

.about-block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
  max-width: 900px;
}

.about-block img {
  width: 100%;
}

/* 9. Workflow Components */
.workflow-chain-section {
  text-align: center;
}

.workflow-chain-section h2 {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  font-size: var(--type-section-title);
}

.workflow-chain {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 48px;
}

.workflow-chain span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: rgba(217, 215, 210, .74);
  color: var(--deep-blue);
  font-family: var(--font-mono);
}

.workflow-chain i {
  color: rgba(19, 48, 128, .36);
  font-style: normal;
  font-size: 1.4rem;
}

.newsletter-band {
  padding-bottom: 80px;
}

.newsletter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr);
  gap: 48px;
  align-items: end;
  padding: 48px;
  border-radius: var(--radius-lg);
  background: var(--deep-blue);
}

.newsletter-layout h2,
.newsletter-layout .section-copy {
  color: var(--paper);
}

.newsletter-layout h2 {
  max-width: 680px;
}

.newsletter-layout .section-copy {
  max-width: 650px;
}

.newsletter-meta {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.newsletter-meta p,
.newsletter-meta small {
  color: rgba(251, 250, 246, .72);
}

.newsletter-meta p {
  margin-bottom: 0;
  font-family: var(--font-mono);
  font-size: .78rem;
}

.newsletter-meta .button {
  color: var(--deep-blue);
}

.newsletter-meta small {
  max-width: 300px;
  font-size: .76rem;
  line-height: 1.5;
}

/* 10. Documentation Components */
.doc-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.doc-strip a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: rgba(217, 215, 210, .68);
  color: var(--deep-blue);
  font-family: var(--font-mono);
  font-size: .72rem;
  text-decoration: none;
  text-transform: uppercase;
}

/* 11. Template Components */
.template-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px var(--page-x) 120px;
}

.template-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(220px, .62fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
  margin: 24px 0 64px;
  padding: clamp(48px, 6vw, 80px);
  border: 1px solid var(--hero-border);
  border-radius: var(--radius-template);
  background: var(--hero-gradient);
  box-shadow: var(--shadow-hero);
  overflow: hidden;
}

.template-hero h1 {
  max-width: 840px;
  margin: 0 0 24px;
  font-size: clamp(4.6rem, 7.3vw, 7.4rem);
  line-height: .9;
}

.template-hero p {
  max-width: 680px;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.75;
}

.template-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.template-kicker::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.template-back {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--green);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
}

.template-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.template-hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--green) 18%, transparent);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .62);
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
}

.template-hero-mark {
  position: relative;
  justify-self: center;
  width: min(300px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(23, 23, 23, .055);
  opacity: .78;
  background:
    linear-gradient(78deg, transparent 0 34%, rgba(23, 23, 23, .22) 34.4% 34.9%, transparent 35.2%),
    linear-gradient(128deg, transparent 0 42%, rgba(23, 23, 23, .18) 42.3% 42.8%, transparent 43%),
    linear-gradient(28deg, transparent 0 51%, rgba(23, 23, 23, .16) 51.3% 51.8%, transparent 52%),
    radial-gradient(circle at 50% 50%, rgba(23, 23, 23, .28) 0 3px, transparent 4px),
    radial-gradient(circle, transparent 0 63%, rgba(23, 23, 23, .055) 64%, transparent 65%);
}

.template-hero-mark::before,
.template-hero-mark::after {
  content: "";
  position: absolute;
  inset: 18% 10%;
  border: 1px solid rgba(23, 23, 23, .18);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.template-hero-mark::after {
  inset: 34% 34% 32%;
  opacity: .72;
  transform: rotate(26deg);
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 780px);
  gap: clamp(28px, 4vw, 58px);
  align-items: start;
}

.section-nav {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
}

.section-nav-title {
  margin: 0 0 18px;
  color: color-mix(in srgb, var(--ink) 48%, transparent);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.section-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 7px 0;
  border-radius: 0;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.section-nav a:hover,
.section-nav a.active {
  color: var(--green);
  transform: translateX(4px);
}

.section-nav span {
  min-width: 34px;
  color: currentColor;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
}

.template-content {
  min-width: 0;
}

.template-section {
  padding: 0 0 72px;
  scroll-margin-top: 96px;
}

.template-section p {
  max-width: var(--reading);
  margin-bottom: 26px;
  font-size: 1.08rem;
  line-height: 1.86;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 1.65rem;
  padding-top: 3.75rem;
  border-top: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  color: var(--green);
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  font-weight: 700;
  line-height: 1.1;
}

.section-heading code,
.section-heading .section-heading-prefix {
  color: var(--deep-blue);
  font-family: var(--font-mono);
  font-size: inherit;
}

.section-heading::after {
  content: "";
  width: 56px;
  height: 1px;
  background: color-mix(in srgb, var(--green) 42%, transparent);
  transform: translateY(.1em);
}

.terminal-window {
  margin: 32px 0 38px;
  border: 1px solid color-mix(in srgb, var(--deep-blue) 20%, var(--line));
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.terminal-window__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--deep-blue) 18%, var(--line));
  background: rgba(255, 255, 255, .68);
}

.terminal-window__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.terminal-window__dot--red { background: var(--terminal-red); }
.terminal-window__dot--yellow { background: var(--terminal-yellow); }
.terminal-window__dot--green { background: var(--terminal-green); }

.terminal-window__title {
  margin-left: 8px;
  color: rgba(23, 23, 23, .56);
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.terminal-window pre {
  margin: 0;
  padding: 26px;
  background: rgba(255, 255, 255, .82);
  color: #38539f;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 1.62;
  white-space: pre-wrap;
}

.terminal-window code {
  color: inherit;
  font: inherit;
}

.data-table-wrap {
  width: 100%;
  margin: 30px 0 38px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .48);
}

.data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

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

.data-table th {
  color: var(--green);
  background: var(--table-head);
  font-family: var(--font-editorial);
  font-size: 1.05rem;
  font-weight: 600;
}

.data-table td + td,
.data-table th + th {
  border-left: 1px solid var(--line);
}

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

.note,
.reference-group,
.checklist p,
.workflow-step {
  margin: 28px 0 34px;
  padding: 22px 24px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--inset-highlight);
}

.note p,
.reference-group p,
.checklist p,
.workflow-step p {
  margin: 0;
}

.note strong,
.reference-group h3 {
  color: var(--green);
}

.reference-group {
  display: grid;
  gap: 10px;
}

.reference-group h3 {
  margin: 0 0 4px;
  font-family: var(--font-editorial);
  font-size: 1.3rem;
}

.reference-group a {
  color: var(--ink);
  text-decoration: none;
}

.reference-group a:hover {
  color: var(--green);
}

.workflow-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--sidebar-active);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 800;
}

.workflow-step h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.05rem;
}

.checklist {
  display: grid;
  gap: 10px;
}

.checklist p {
  margin: 0;
}

/* 12. Editorial Article Template */
.editorial-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px var(--page-x) 120px;
}

.editorial-hero {
  max-width: var(--reading);
  margin: clamp(48px, 8vw, 96px) auto 48px;
}

.editorial-back {
  display: inline-flex;
  margin-bottom: 36px;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.editorial-kicker {
  margin: 0 0 18px;
  color: color-mix(in srgb, var(--ink) 56%, transparent);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.editorial-hero h1 {
  max-width: none;
  margin: 0 0 18px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--type-editorial-title);
  font-weight: 800;
  line-height: 1.04;
}

.editorial-dek {
  max-width: 680px;
  margin: 0 0 24px;
  color: color-mix(in srgb, var(--ink) 68%, transparent);
  font-size: var(--type-editorial-dek);
  font-weight: 400;
  line-height: 1.45;
}

.editorial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: color-mix(in srgb, var(--ink) 52%, transparent);
  font-size: .88rem;
}

.editorial-meta span + span::before {
  content: ".";
  margin: 0 8px;
  color: color-mix(in srgb, var(--ink) 34%, transparent);
}

.editorial-article {
  max-width: var(--reading);
  margin: 0 auto;
  padding-bottom: 96px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 2vw, 1.32rem);
  line-height: 1.72;
}

.editorial-section {
  margin: 0 0 48px;
  scroll-margin-top: 40px;
}

.editorial-section h2 {
  margin: 72px 0 22px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.18;
}

.editorial-section:first-child h2 {
  display: none;
}

.editorial-section p,
.editorial-section ul,
.editorial-section ol {
  margin: 0 0 28px;
}

.editorial-section p {
  color: color-mix(in srgb, var(--ink) 90%, transparent);
}

.editorial-section strong {
  color: var(--ink);
  font-weight: 700;
}

.editorial-section ul,
.editorial-section ol {
  padding-left: 1.35em;
}

.editorial-section li {
  margin-bottom: 12px;
}

.editorial-quote {
  margin: 48px 0;
  padding: 0 0 0 24px;
  border-left: 2px solid color-mix(in srgb, var(--green) 38%, var(--line));
  color: var(--green);
  font-family: var(--font-editorial);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-style: italic;
  line-height: 1.08;
}

.editorial-divider {
  width: 72px;
  height: 1px;
  margin: 56px auto;
  background: var(--line);
}

.editorial-footer {
  max-width: var(--reading);
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: .95rem;
}

.editorial-footer a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

/* 13. Brief Pages */
.brief-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px var(--page-x) 120px;
}

.brief-hero {
  max-width: 880px;
  margin: clamp(48px, 8vw, 92px) 0 72px;
}

.brief-hero h1 {
  margin-right: 0;
  margin-left: 0;
  font-size: clamp(3.4rem, 6.8vw, 6rem);
}

.brief-hero p {
  max-width: 760px;
  font-size: var(--type-body-large);
  line-height: 1.82;
}

.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.brief-main {
  min-width: 0;
}

.brief-block {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.brief-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.brief-block h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.brief-block p {
  max-width: var(--reading);
  font-size: 1.04rem;
  line-height: 1.82;
}

.brief-list {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.brief-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.brief-list span {
  color: var(--deep-blue);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 800;
}

.brief-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.brief-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.brief-panel {
  padding: 24px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--shadow-soft);
}

.brief-panel h3 {
  margin-bottom: 14px;
  color: var(--green);
}

.brief-panel p,
.brief-panel li {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
}

.brief-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.1em;
}

.brief-next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* 13. Responsive */
@media (max-width: 980px) {
  .site-header {
    position: static;
    display: grid;
    justify-items: start;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .editorial-split,
  .overview-section,
  .newsletter-layout,
  .template-hero,
  .template-layout,
  .grid.four,
  .grid.three,
  .grid.two,
  .soft-grid,
  .about-block {
    grid-template-columns: 1fr;
  }

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

  .brief-aside {
    position: static;
  }

  .fan-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: auto;
  }

  .fan-card,
  .fan-card-blue,
  .fan-card-deep,
  .fan-card-orange,
  .fan-card-green,
  .fan-card-gold {
    width: auto;
    min-height: 210px;
    margin: 0;
    transform: none;
  }

  .about-block img {
    max-width: 180px;
  }

  .section-nav {
    position: relative;
    top: auto;
  }
}

@media (max-width: 560px) {
  html {
    font-size: 16px;
  }

  .site-nav {
    gap: 12px;
    font-size: .62rem;
  }

  h1 {
    font-size: clamp(3rem, 13vw, 4.4rem);
  }

  h2 {
    font-size: clamp(2.4rem, 11vw, 3.8rem);
  }

  .hero-home h1,
  .page-hero h1 {
    font-size: clamp(3.2rem, 14vw, 4.8rem);
  }

  .fan-nav {
    grid-template-columns: 1fr;
  }

  .card,
  .wide-card,
  .feature-card,
  .about-block,
  .template-hero {
    padding: 24px;
    border-radius: var(--radius-md);
  }

  .newsletter-layout {
    padding: 26px;
  }

  .newsletter-meta {
    margin-top: 18px;
  }

  .overview-intro {
    position: static;
  }

  .overview-item {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
  }

  .email-chapters a {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .email-chapters strong {
    text-align: left;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-heading::after {
    width: 56px;
  }

  .editorial-page {
    padding-top: 32px;
  }

  .editorial-hero {
    margin-top: 42px;
    margin-bottom: 36px;
  }

  .editorial-back {
    margin-bottom: 28px;
  }

  .editorial-article {
    font-size: 1.12rem;
    line-height: 1.68;
  }

  .editorial-section h2 {
    margin-top: 56px;
  }

  .brief-page {
    padding-top: 32px;
  }

  .brief-hero {
    margin-bottom: 48px;
  }
}
