/* =====================================================================
   YourCloudBlog — design system
   Brand: YourCloudGroup indigo (#667eea) → violet (#764ba2), cyan signal.
   Light + dark themes; system preference by default, user toggle wins.
   ===================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #f6f7fc;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3fb;
  --border: #e2e6f3;
  --border-strong: #cbd2ea;
  --text: #0e1530;
  --text-2: #2c3654;
  --muted: #5b6784;
  --accent: #4f5bd5;
  --accent-ink: #ffffff;
  --violet: #764ba2;
  --cyan: #0e8fb0;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #c02646;
  --grid: rgba(79, 91, 213, 0.06);
  --glow-1: rgba(102, 126, 234, 0.20);
  --glow-2: rgba(118, 75, 162, 0.14);
  --grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --grad-text: linear-gradient(100deg, #4f5bd5 0%, #764ba2 55%, #0e8fb0 100%);
  --shadow: 0 1px 2px rgba(14, 21, 48, .05), 0 8px 28px rgba(14, 21, 48, .07);
  --shadow-lg: 0 2px 4px rgba(14, 21, 48, .06), 0 24px 60px rgba(14, 21, 48, .12);
  --code-bg: #0d1224;
  --code-text: #e6ebff;
  --radius: 14px;
  --radius-sm: 9px;
  --read: 720px;
  --wide: 1180px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060a17; --bg-2: #0a1022; --surface: rgba(255,255,255,.035); --surface-2: rgba(255,255,255,.06);
    --border: rgba(148,163,255,.13); --border-strong: rgba(148,163,255,.24);
    --text: #e9ecff; --text-2: #c9d0ee; --muted: #93a0c4;
    --accent: #8b99ff; --accent-ink: #0a0f22; --violet: #b48cf0; --cyan: #3ad7f2;
    --ok: #4ade80; --warn: #fbbf24; --bad: #fb7185;
    --grid: rgba(139,153,255,.055); --glow-1: rgba(102,126,234,.22); --glow-2: rgba(118,75,162,.20);
    --grad-text: linear-gradient(100deg, #9aa7ff 0%, #c39bff 50%, #5ee3f7 100%);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 30px 80px rgba(0,0,0,.5);
    --code-bg: #0b1020;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060a17; --bg-2: #0a1022; --surface: rgba(255,255,255,.035); --surface-2: rgba(255,255,255,.06);
  --border: rgba(148,163,255,.13); --border-strong: rgba(148,163,255,.24);
  --text: #e9ecff; --text-2: #c9d0ee; --muted: #93a0c4;
  --accent: #8b99ff; --accent-ink: #0a0f22; --violet: #b48cf0; --cyan: #3ad7f2;
  --ok: #4ade80; --warn: #fbbf24; --bad: #fb7185;
  --grid: rgba(139,153,255,.055); --glow-1: rgba(102,126,234,.22); --glow-2: rgba(118,75,162,.20);
  --grad-text: linear-gradient(100deg, #9aa7ff 0%, #c39bff 50%, #5ee3f7 100%);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 30px 80px rgba(0,0,0,.5);
  --code-bg: #0b1020;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 85% -120px, var(--glow-1), transparent 70%),
    radial-gradient(700px 420px at -10% 10%, var(--glow-2), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-attachment: scroll;
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--violet); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.muted { color: var(--muted); }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- header */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px var(--glow-1); }
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 750; letter-spacing: -.02em; font-size: 18px; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 550; padding: 8px 12px; border-radius: 9px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; margin-left: auto; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch;
         padding: 12px 16px 18px; background: var(--bg-2); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* ---------------------------------------------------------------- buttons, chips */
.btn { display: inline-flex; align-items: center; gap: 9px; font: 600 15px/1 var(--font); padding: 13px 20px; border-radius: 11px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 22px rgba(102,126,234,.35); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(102,126,234,.45); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); text-decoration: none; border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.chip:hover { color: var(--violet); border-color: var(--violet); }
.tag { display: inline-block; font-size: 13.5px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); text-decoration: none; border: 1px solid var(--border); }
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag::before { content: "#"; color: var(--muted); margin-right: 1px; }

/* ---------------------------------------------------------------- home hero */
.hero { padding: 72px 0 40px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); line-height: 1.04; letter-spacing: -.035em; margin: 14px 0 18px; font-weight: 800; }
.hero h1 .h1-sub { display: block; font-size: .56em; line-height: 1.12; letter-spacing: -.025em; margin-top: .22em; padding-bottom: .06em; }
.hero .lede { font-size: clamp(18px, 2vw, 21px); color: var(--text-2); max-width: 36em; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.motto { margin-top: 26px; font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .08em; }
.motto b { color: var(--text-2); font-weight: 600; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 44px; } }

/* pipeline console */
.console { border-radius: 18px; border: 1px solid var(--border-strong); background: linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 92%, transparent), color-mix(in srgb, var(--bg-2) 70%, transparent)); box-shadow: var(--shadow-lg); overflow: hidden; }
.console-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); font: 500 12px var(--mono); color: var(--muted); }
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); display: inline-block; }
.console-bar i:nth-child(1) { background: #ff5f57; } .console-bar i:nth-child(2) { background: #febc2e; } .console-bar i:nth-child(3) { background: #28c840; }
.console-bar span { margin-left: 8px; }
.pipeline { list-style: none; margin: 0; padding: 18px; display: grid; gap: 10px; counter-reset: step; }
.pipeline li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 15px; }
.pipeline li::before { content: counter(step, decimal-leading-zero); font: 600 12px var(--mono); color: var(--cyan); }
.pipeline li b { font-weight: 650; }
.pipeline li small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.pipeline li em { font-style: normal; font: 600 11px var(--mono); color: var(--ok); letter-spacing: .06em; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .pipeline li { animation: stepglow 10.5s infinite; }
  .pipeline li em { animation: stepok 10.5s infinite; }
  .pipeline li:nth-child(2), .pipeline li:nth-child(2) em { animation-delay: 1.5s; }
  .pipeline li:nth-child(3), .pipeline li:nth-child(3) em { animation-delay: 3s; }
  .pipeline li:nth-child(4), .pipeline li:nth-child(4) em { animation-delay: 4.5s; }
  .pipeline li:nth-child(5), .pipeline li:nth-child(5) em { animation-delay: 6s; }
  .pipeline li:nth-child(6), .pipeline li:nth-child(6) em { animation-delay: 7.5s; }
  .pipeline li:nth-child(7), .pipeline li:nth-child(7) em { animation-delay: 9s; }
}
@media (prefers-reduced-motion: reduce) { .pipeline li em { opacity: 1; } }
/* 7 steps × 1.5 s */
@keyframes stepglow { 0%, 100% { border-color: var(--border); box-shadow: none; } 6%, 14% { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); } 20% { border-color: var(--border); box-shadow: none; } }
@keyframes stepok { 0%, 5% { opacity: 0; } 12%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------------------------------------------------------- sections, cards */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-size: 28px; letter-spacing: -.02em; margin: 6px 0 0; line-height: 1.2; }
.section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; transition: transform .18s ease, border-color .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-lg); }
.card-media { aspect-ratio: 1200 / 630; background: var(--grad); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: -.015em; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.55; }
.card-meta { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font: 500 12.5px var(--mono); color: var(--muted); }
.card-meta .chip { position: relative; z-index: 1; }

.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border-radius: 20px; }
.feature .card-media { aspect-ratio: auto; min-height: 100%; background: #0a0f22; display: grid; place-items: center; }
.feature .card-media img { object-fit: contain; height: auto; }
.feature .card-body { padding: 34px; gap: 14px; justify-content: center; }
.feature h3 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; letter-spacing: -.025em; }
.feature p { font-size: 17px; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature .card-media { aspect-ratio: 1200/630; } .feature .card-body { padding: 22px; } }

.topics { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.topic { display: block; padding: 18px 18px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.topic:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.topic b { display: flex; justify-content: space-between; gap: 8px; font-size: 16.5px; }
.topic b span { font: 600 12px var(--mono); color: var(--cyan); }
.topic small { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.topic.empty { opacity: .6; }

.entity { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 28px; border-radius: 20px; border: 1px solid var(--border-strong); background:
  linear-gradient(135deg, color-mix(in srgb, #667eea 14%, transparent), color-mix(in srgb, #764ba2 12%, transparent)), var(--bg-2); }
.entity h2 { margin: 4px 0 8px; font-size: 24px; letter-spacing: -.02em; }
.entity p { margin: 0; color: var(--text-2); }
.entity img { width: 64px; height: 64px; border-radius: 16px; }
@media (max-width: 760px) { .entity { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- listing header */
.page-head { padding: 48px 0 18px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 10px; }
.page-head p { color: var(--text-2); font-size: 19px; max-width: 42em; margin: 0; }
.crumbs { font: 500 13px var(--mono); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-hidden] { opacity: .5; }
.pager { display: flex; justify-content: center; gap: 8px; margin: 36px 0 12px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; text-align: center; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 600; color: var(--text-2); }
.pager [aria-current] { background: var(--grad); color: #fff; border-color: transparent; }
.empty-state { padding: 40px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 16px; color: var(--muted); }

/* ---------------------------------------------------------------- article */
.article-layout { display: grid; grid-template-columns: minmax(0, var(--read)) 250px; gap: 56px; justify-content: center; padding-bottom: 30px; }
.article-layout.no-toc { grid-template-columns: minmax(0, var(--read)); }
@media (max-width: 1100px) { .article-layout { grid-template-columns: minmax(0, var(--read)); } .toc-side { display: none; } }
.article-head { max-width: var(--read); margin: 0 auto; padding: 44px 0 10px; }
.article-head h1 { font-size: clamp(32px, 5.2vw, 50px); line-height: 1.1; letter-spacing: -.032em; margin: 16px 0 16px; font-weight: 800; }
.deck { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-2); margin: 0 0 20px; line-height: 1.55; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14.5px; color: var(--muted); padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.byline b { color: var(--text-2); font-weight: 600; }
.byline .dot::before { content: "·"; margin-right: 16px; opacity: .6; }
.hero-figure { max-width: 980px; margin: 26px auto 8px; }
.hero-figure img { display: block; width: 100%; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--surface-2); }
.notice { border-radius: 12px; padding: 14px 16px; margin: 18px 0; border: 1px solid; font-size: 15.5px; }
.notice.preview { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.notice.archived { background: var(--surface-2); border-color: var(--border-strong); }
.notice.correction { background: color-mix(in srgb, var(--cyan) 9%, transparent); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); }
.answer { position: relative; margin: 26px 0 8px; padding: 20px 22px 20px 24px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, #667eea 11%, transparent), color-mix(in srgb, #764ba2 8%, transparent)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.answer::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--grad); }
.answer .eyebrow { display: block; margin-bottom: 6px; }
.answer p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text); }
.toc-mobile { margin: 20px 0 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.toc-mobile summary { cursor: pointer; padding: 12px 16px; font-weight: 650; }
.toc-mobile ol { margin: 0; padding: 0 16px 14px 34px; }
@media (min-width: 1101px) { .toc-mobile { display: none; } }
.toc-side nav { position: sticky; top: 96px; padding-left: 16px; border-left: 1px solid var(--border); }
.toc-side .eyebrow { margin-bottom: 10px; display: block; }
.toc-side ol, .toc-mobile ol { list-style: none; }
.toc-side ol { margin: 0; padding: 0; display: grid; gap: 2px; }
.toc-side a, .toc-mobile a { display: block; text-decoration: none; color: var(--muted); font-size: 14px; line-height: 1.45; padding: 5px 0; }
.toc-side a:hover, .toc-side a.active { color: var(--text); }
.toc-side a.active { font-weight: 600; }
.toc-side .l3 a, .toc-mobile .l3 a { padding-left: 14px; font-size: 13.5px; }

/* prose */
.prose { font-size: 18px; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.02em; margin: 2em 0 .2em; }
.prose h3 { font-size: 21px; line-height: 1.35; letter-spacing: -.01em; margin: 1.7em 0 .1em; }
.prose h4 { font-size: 18px; margin: 1.5em 0 0; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { font-weight: 550; }
.prose a.ext::after { content: "↗"; font-size: .8em; margin-left: 2px; opacity: .7; }
.prose strong { font-weight: 700; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text-2); font-size: 1.02em; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--border); padding: .12em .38em; border-radius: 6px; }
.prose figure { margin: 2em 0; }
.prose figure img { display: block; margin: 0 auto; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-2); box-shadow: var(--shadow); }
.prose figcaption, .hero-figure figcaption { margin-top: 12px; font-size: 14.5px; line-height: 1.55; color: var(--muted); text-align: center; }
.prose img { border-radius: 10px; }
.prose math[display="block"] { display: block; overflow-x: auto; margin: 1.2em 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 11px 16px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.prose td { white-space: normal; min-width: 7em; }
.prose th { font: 600 12.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose .ta-right { text-align: right; } .prose .ta-center { text-align: center; } .prose .ta-left { text-align: left; }
.publisher-note { font-size: 14.5px; margin-top: 26px; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }

.code-block { position: relative; border-radius: 12px; background: var(--code-bg); border: 1px solid rgba(148,163,255,.18); overflow: hidden; }
.code-lang { position: absolute; right: 12px; top: 8px; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8390bd; }
.code-block pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 14.5px/1.65 var(--mono); color: var(--code-text); tab-size: 4; }
.code-block code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.footnotes { font-size: 15px; color: var(--text-2); }

/* after-article */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--border); }
.share .label { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.share a, .share button { font: 600 14px var(--font); padding: 8px 13px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--accent); color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.cta { margin: 44px 0 10px; padding: 32px; border-radius: 20px; position: relative; overflow: hidden; color: #fff; background: radial-gradient(600px 220px at 100% 0%, rgba(34,211,238,.35), transparent 60%), var(--grad); box-shadow: 0 20px 50px rgba(102,126,234,.35); }
.cta h2 { margin: 6px 0 8px; font-size: 26px; letter-spacing: -.02em; }
.cta p { margin: 0 0 20px; color: rgba(255,255,255,.9); max-width: 38em; }
.cta .eyebrow { color: rgba(255,255,255,.85); }
.cta .btn { background: #fff; color: #3d3aa0; }
.cta .btn:hover { color: #2a2780; transform: translateY(-1px); }
.related { padding: 26px 0 50px; }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: 50px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg-2) 65%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 44px 0 26px; }
.footer-grid h3 { font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid p { color: var(--muted); font-size: 15px; margin: 10px 0 0; max-width: 30em; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 18px 0 30px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.footer-base a { color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* error pages */
.error-page { text-align: center; padding: 90px 0 60px; }
.error-page .code { font: 800 clamp(80px, 16vw, 150px)/1 var(--mono); letter-spacing: -.05em; }
.error-page p { color: var(--text-2); font-size: 19px; }

@media (max-width: 640px) {
  .byline .dot::before { display: none; }
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 24px; }
  .cta { padding: 24px; }
  .prose th, .prose td { padding: 9px 12px; }
}
@media print {
  .site-header, .site-footer, .share, .cta, .related, .toc-side, .toc-mobile, .progress { display: none !important; }
  body { background: #fff; color: #000; }
}
