/* =========================================================
   Ulomarveto — site styles
   Light mode is default; dark mode via html[data-theme="dark"]
   ========================================================= */
:root {
  --bg: #FAF7F2;
  --bg-2: #F3EEE5;
  --surface: #FFFFFF;
  --surface-2: #FBF9F5;
  --ink: #16131F;
  --ink-2: #2D2838;
  --muted: #625C6E;
  --line: #E6DFD3;
  --line-2: #EFE9DF;
  --accent: #F2542D;
  --accent-ink: #FFFFFF;
  --accent-2: #5B3DF5;
  --accent-3: #0FA37F;
  --shadow: 0 1px 2px rgba(22,19,31,.04), 0 8px 24px -8px rgba(22,19,31,.10);
  --shadow-lg: 0 2px 4px rgba(22,19,31,.04), 0 24px 48px -16px rgba(22,19,31,.18);
  --dot: rgba(22,19,31,.07);
  --orb-1: rgba(242,84,45,.16);
  --orb-2: rgba(91,61,245,.13);
  --orb-3: rgba(15,163,127,.10);
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0E0C14;
  --bg-2: #15121D;
  --surface: #17141F;
  --surface-2: #1C1826;
  --ink: #F3EFE8;
  --ink-2: #DDD7E6;
  --muted: #A59EB2;
  --line: #2B2638;
  --line-2: #231F2E;
  --accent: #FF6B47;
  --accent-ink: #160B07;
  --accent-2: #8B74FF;
  --accent-3: #2CC79C;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px -16px rgba(0,0,0,.6);
  --dot: rgba(243,239,232,.06);
  --orb-1: rgba(255,107,71,.14);
  --orb-2: rgba(139,116,255,.16);
  --orb-3: rgba(44,199,156,.08);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.ico { flex: none; }
:focus-visible { outline: 2.5px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 12px; }

.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.bg-orbs span { position: absolute; border-radius: 50%; filter: blur(80px); }
.bg-orbs span:nth-child(1) { width: 560px; height: 560px; background: var(--orb-1); top: -180px; right: -120px; }
.bg-orbs span:nth-child(2) { width: 520px; height: 520px; background: var(--orb-2); top: 40%; left: -220px; }
.bg-orbs span:nth-child(3) { width: 420px; height: 420px; background: var(--orb-3); bottom: -160px; right: 20%; }

.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.wrap-mid { width: min(1080px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 15px;
  border: 1.5px solid var(--ink); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .02em; text-decoration: none; color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
}
html[data-theme="dark"] .chip { color: color-mix(in srgb, var(--c) 65%, white); }
.mini-chip { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
html[data-theme="dark"] .mini-chip { color: color-mix(in srgb, var(--c) 60%, white); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.nav-row { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .drop-btn {
  padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2);
  background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s;
}
.main-nav > a:hover, .drop-btn:hover, .main-nav > a.is-active, .drop-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.has-drop { position: relative; }
.drop {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px); min-width: 300px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transition: all .2s ease;
}
.has-drop:hover .drop, .has-drop.open .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.has-drop::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.drop a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; font-size: 14.5px; font-weight: 600; }
.drop a:hover { background: var(--bg-2); }
.dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); flex: none; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: none; border: 1px solid transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface); border-color: var(--line); }
.menu-btn { display: none; }

/* Theme toggle */
.theme-toggle { background: none; border: 0; padding: 4px; cursor: pointer; }
.tt-track { display: block; width: 58px; height: 32px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); position: relative; transition: background .3s; }
.tt-thumb {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface);
  box-shadow: 0 2px 6px rgba(0,0,0,.18); display: grid; place-items: center; color: #E8A317; transition: transform .35s cubic-bezier(.5,1.6,.4,.9), background .3s;
}
.tt-thumb > span { position: absolute; display: grid; place-items: center; transition: opacity .25s, transform .35s; }
.tt-moon { opacity: 0; transform: rotate(-60deg); color: var(--accent-2); }
html[data-theme="dark"] .tt-thumb { transform: translateX(26px); background: #2B2638; }
html[data-theme="dark"] .tt-sun { opacity: 0; transform: rotate(60deg); }
html[data-theme="dark"] .tt-moon { opacity: 1; transform: none; }

.search-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); }
.search-bar[hidden] { display: none; }
.search-bar input { flex: 1; border: 0; background: none; font: inherit; color: var(--ink); outline: none; min-width: 0; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 0; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; margin: 0 0 22px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 0 0 var(--accent-3); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-3) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(42px, 6.4vw, 78px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 22px; }
.hero h1 em { font-style: italic; color: var(--accent); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 2%; right: 4%; bottom: .04em; height: .12em; background: var(--accent-2); opacity: .22; border-radius: 4px; z-index: -1; }
.lede { font-size: 19px; color: var(--muted); max-width: 600px; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 36px; margin: 40px 0 0; padding: 0; }
.hero-stats div { margin: 0; }
.hero-stats dt { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1; }
.hero-stats dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }

.hero-art { position: relative; height: 460px; }
.float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 4px; animation: float 7s ease-in-out infinite;
}
.fc-label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.float-card strong { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.fc-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.fc-1 { top: 10px; left: 0; width: 290px; animation-delay: 0s; }
.fc-1 .spark { color: var(--accent-3); width: 100%; height: 56px; margin-top: 6px; }
.fc-up { font-size: 13px; font-weight: 800; color: var(--accent-3); }
.fc-2 { top: 60px; right: 0; width: 230px; animation-delay: -2s; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fc-2 .fc-label, .fc-2 .fc-sub { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.fc-3 { top: 250px; left: 30px; flex-direction: row; align-items: center; gap: 14px; animation-delay: -4s; }
.fc-3 strong { font-size: 22px; color: var(--accent-3); }
.fc-3 > div { display: flex; flex-direction: column; gap: 2px; }
.fc-avatar { width: 46px; height: 46px; border-radius: 14px; background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent)); }
.fc-4 { bottom: 10px; right: 10px; width: 300px; animation-delay: -1s; }
.mix { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin: 8px 0 6px; gap: 3px; }
.mix i { width: var(--w); background: var(--c); border-radius: 99px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .float-card, .ticker-track, .pulse { animation: none !important; } html { scroll-behavior: auto; } }

.ticker { margin-top: 56px; border-block: 1px solid var(--line); background: var(--surface); overflow: hidden; padding: 16px 0; }
.ticker-track { display: flex; gap: 28px; width: max-content; animation: tick 40s linear infinite; font-family: var(--serif); font-size: 22px; font-weight: 500; font-style: italic; }
.ticker-track b { color: var(--accent); font-style: normal; font-size: 16px; align-self: center; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 72px 0 0; }
.section-tight { padding: 8px 0 24px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 42px); font-weight: 600; letter-spacing: -.025em; margin: 0; line-height: 1.1; }
.section-head p { margin: 0; color: var(--muted); max-width: 420px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--accent); }
.link-more:hover { gap: 10px; }

/* Featured */
.feature-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.feature-media { display: block; aspect-ratio: 16/9; overflow: hidden; }
.feature-media img, .card-media img, .side-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.feature:hover .feature-media img, .card:hover .card-media img, .side-item:hover img { transform: scale(1.04); }
.feature-body { padding: 26px 28px 28px; }
.feature-body h3 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -.02em; font-weight: 600; margin: 14px 0 10px; }
.feature-body h3 a, .card-title a, .side-item h3 a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .3s; }
.feature-body h3 a:hover, .card-title a:hover, .side-item h3 a:hover { background-size: 100% 1.5px; }
.feature-body p { color: var(--muted); margin: 0 0 14px; }
.side-list { display: flex; flex-direction: column; gap: 16px; }
.side-item { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); flex: 1; }
.side-thumb { display: block; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; }
.side-item h3 { font-family: var(--serif); font-size: 18.5px; line-height: 1.25; font-weight: 600; margin: 4px 0 0; letter-spacing: -.01em; }

/* Topics */
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.topic {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 22px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.topic::before { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -60px; top: -60px; background: color-mix(in srgb, var(--c) 12%, transparent); transition: transform .4s; }
.topic:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.topic:hover::before { transform: scale(1.3); }
.topic-wide { grid-column: span 2; }
.topic-ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--c); position: relative; box-shadow: 0 8px 20px -8px var(--c); }
.topic-name { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; position: relative; margin-top: 6px; }
.topic-desc { color: var(--muted); font-size: 14.5px; line-height: 1.55; position: relative; }
.topic-count { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13.5px; color: var(--c); position: relative; }
html[data-theme="dark"] .topic-count { color: color-mix(in srgb, var(--c) 60%, white); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-2); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-body .chip { align-self: flex-start; }
.card-title { font-family: var(--serif); font-size: 21px; line-height: 1.22; font-weight: 600; letter-spacing: -.015em; margin: 12px 0 8px; }
.card-excerpt { color: var(--muted); font-size: 15px; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* Promise */
.promise { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; background: var(--ink); color: var(--bg); border-radius: 28px; padding: 48px; position: relative; overflow: hidden; }
.promise::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(var(--accent), transparent 70%); opacity: .35; }
.promise h2 { font-family: var(--serif); font-size: 36px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 14px; }
.promise p { color: color-mix(in srgb, var(--bg) 75%, transparent); margin: 0 0 24px; }
.promise .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.promise .btn-ghost:hover { border-color: var(--bg); }
.promise-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.promise-list li { padding: 18px 20px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bg) 12%, transparent); color: color-mix(in srgb, var(--bg) 80%, transparent); }
.promise-list strong { color: var(--bg); display: block; }

/* Page hero / lists */
.page-hero { padding: 48px 0 30px; }
.page-hero h1 { font-family: var(--serif); font-size: clamp(38px, 5vw, 60px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; margin: 14px 0 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill { padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px; background: var(--surface); border: 1px solid var(--line); transition: all .2s; }
.pill:hover { border-color: var(--c, var(--ink)); }
.pill.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat-ico { margin-top: 18px; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 12px 28px -10px var(--c); }
.pager { display: flex; justify-content: center; gap: 8px; margin: 40px 0 0; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; text-decoration: none; font-weight: 700; background: var(--surface); border: 1px solid var(--line); }
.pager .is-current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.empty { padding: 40px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.search-big { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: var(--shadow); margin: 10px 0 16px; max-width: 720px; }
.search-big input { flex: 1; border: 0; background: none; font: inherit; font-size: 18px; color: var(--ink); outline: none; min-width: 0; }
.notfound { text-align: center; padding: 80px 0; }
.notfound .lede { margin-inline: auto; }
.notfound .hero-cta { justify-content: center; }
.big-404 { font-family: var(--serif); font-size: 140px; line-height: 1; margin: 0; font-weight: 700; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.article-head { padding: 44px 0 30px; }
.article-head .chip { margin-top: 22px; }
.article-head h1 { font-family: var(--serif); font-size: clamp(34px, 4.8vw, 54px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; margin: 16px 0 16px; }
.article-dek { font-size: 20px; color: var(--muted); margin: 0 0 26px; line-height: 1.55; }
.byline { display: flex; align-items: center; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.byline strong { display: block; font-size: 15.5px; }
.byline > div > span { font-size: 14px; color: var(--muted); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.by-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 20px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.by-avatar.lg { width: 60px; height: 60px; font-size: 26px; }
.article-figure { margin-top: 0; margin-bottom: 44px; }
.article-figure img { width: 100%; border-radius: 24px; box-shadow: var(--shadow-lg); aspect-ratio: 16/9; object-fit: cover; }
.article-figure figcaption, .prose figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }
.article-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc-wrap { position: sticky; top: 100px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); max-height: calc(100vh - 130px); overflow: auto; }
.toc-title { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: grid; grid-template-columns: 24px 1fr; padding: 7px 0; font-size: 14px; line-height: 1.4; text-decoration: none; color: var(--muted); font-weight: 600; border-left: 2px solid transparent; transition: color .2s; }
.toc a::before { content: counter(t, decimal-leading-zero); font-size: 11.5px; font-weight: 800; color: var(--line); padding-top: 2px; }
.toc a:hover, .toc a.is-active { color: var(--ink); }
.toc a.is-active::before { color: var(--accent); }

.prose { font-size: 18.5px; line-height: 1.75; color: var(--ink-2); max-width: 720px; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { font-family: var(--serif); font-size: 32px; line-height: 1.18; letter-spacing: -.02em; font-weight: 600; color: var(--ink); margin: 1.9em 0 .6em; }
.prose h3 { font-family: var(--sans); font-size: 21px; font-weight: 800; color: var(--ink); margin: 1.6em 0 .5em; letter-spacing: -.01em; }
.prose a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.prose li { margin: .45em 0; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--accent); font-family: var(--serif); font-size: 23px; line-height: 1.45; color: var(--ink); font-style: italic; }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: 18px; width: 100%; }
.prose img { border-radius: 14px; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6em 0; font-size: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.prose th { background: var(--bg-2); font-weight: 800; color: var(--ink); font-size: 14.5px; }
.prose tr:last-child td { border-bottom: 0; }
.prose .callout, .prose .key-takeaways { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent-2); border-radius: 14px; padding: 20px 24px; margin: 1.8em 0; font-size: 17px; }
.prose .key-takeaways { border-left-color: var(--accent-3); }
.prose .key-takeaways > :last-child, .prose .callout > :last-child { margin-bottom: 0; }
.prose .key-takeaways h2, .prose .key-takeaways h3, .prose .callout h3 { margin-top: 0; font-family: var(--sans); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.prose code { background: var(--bg-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.note-box { margin: 2.6em 0 1.6em; padding: 18px 22px; border-radius: 14px; background: var(--bg-2); font-size: 15px; line-height: 1.6; color: var(--muted); }
.author-box { display: flex; gap: 18px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 15.5px; color: var(--muted); }
.author-box p { margin: 0; }
.ab-name { font-weight: 800; color: var(--ink); font-size: 17px; margin-bottom: 4px !important; }
.related { padding-top: 80px; }

/* Static pages */
.page-prose { padding-bottom: 40px; }
.lead-p { font-size: 21px; line-height: 1.6; color: var(--ink); }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; margin-top: 10px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 2px solid var(--accent-2); border-color: transparent; }
.contact-form .btn { align-self: flex-start; }
.contact-form .small { margin: 0; }
.contact-side h3 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 4px; color: var(--ink); }
.contact-side p { margin: 0 0 22px; font-size: 16px; }
.hp { position: absolute !important; left: -9999px !important; }
.alert { padding: 14px 18px; border-radius: 12px; font-weight: 600; margin-bottom: 20px; font-size: 16px; }
.alert-ok { background: color-mix(in srgb, var(--accent-3) 14%, transparent); color: var(--accent-3); }
.alert-err { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 100px; background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1.2fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); font-size: 15px; max-width: 360px; margin: 16px 0 0; }
.site-footer h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 10px; }
.site-footer li a { text-decoration: none; font-size: 15px; font-weight: 600; }
.site-footer li a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.footer-base p { margin: 0; }

/* Cookie banner */
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 70; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow-lg); font-size: 14.5px; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0 0 12px; color: var(--muted); }
.cookie a { color: var(--accent); }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .toc-wrap { position: static; margin-bottom: 32px; }
  .prose { max-width: none; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { height: 400px; max-width: 560px; width: 100%; margin: 0 auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .promise { grid-template-columns: 1fr; padding: 36px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .menu-btn { display: grid; }
  .nav-tools { margin-left: auto; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 20px 22px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); display: none; max-height: calc(100vh - 72px); overflow: auto;
  }
  .main-nav.open { display: flex; }
  .main-nav > a, .drop-btn { padding: 12px 14px; font-size: 17px; justify-content: space-between; width: 100%; }
  .drop { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0 0 0 8px; display: none; min-width: 0; background: transparent; }
  .has-drop.open .drop { display: block; transform: none; }
  .has-drop:hover .drop { transform: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap, .wrap-mid, .wrap-narrow { width: calc(100% - 32px); }
  .nav-row { height: 64px; gap: 10px; }
  .main-nav { inset: 64px 0 auto 0; }
  .brand-name { font-size: 21px; }
  .hero { padding-top: 40px; }
  .hero-stats { gap: 22px; }
  .hero-stats dt { font-size: 28px; }
  .hero-art { height: 360px; }
  .fc-1 { width: 240px; } .fc-2 { width: 190px; top: 120px; } .fc-3 { top: 220px; left: 0; } .fc-4 { width: 250px; right: 0; }
  .float-card strong { font-size: 24px; }
  .card-grid, .topic-grid { grid-template-columns: 1fr; }
  .topic-wide { grid-column: auto; }
  .side-item { grid-template-columns: 110px 1fr; }
  .side-item h3 { font-size: 16.5px; }
  .section { padding-top: 56px; }
  .prose { font-size: 17.5px; }
  .prose h2 { font-size: 27px; }
  .article-dek { font-size: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .search-big .btn { padding: 10px 16px; }
}
