/* ===== Tokens ===== */
:root {
  --bg: #f6f3ec;
  --bg-alt: #ede8dd;
  --surface: #ffffff;
  --ink: #16140f;
  --ink-soft: #57524a;
  --line: #d9d2c3;
  --accent: #d6342b;      /* красная ручка корректора */
  --accent-ink: #ffffff;
  --gold: #b8892f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 20, 15, .06), 0 8px 24px rgba(22, 20, 15, .06);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110e;
    --bg-alt: #1a1915;
    --surface: #201e19;
    --ink: #f2eee5;
    --ink-soft: #a9a296;
    --line: #34312a;
    --accent: #ff5a4e;
    --accent-ink: #12110e;
    --gold: #e0b45a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #12110e;
  --bg-alt: #1a1915;
  --surface: #201e19;
  --ink: #f2eee5;
  --ink-soft: #a9a296;
  --line: #34312a;
  --accent: #ff5a4e;
  --accent-ink: #12110e;
  --gold: #e0b45a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }
.muted { color: var(--ink-soft); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, color .15s ease;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ===== Header & logo ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; flex: none; overflow: visible; }
.logo-ring { fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 13.4 2.4; }
.logo-check {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 0;
}
.logo:hover .logo-check { animation: draw-check .6s ease; }
@keyframes draw-check { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .logo:hover .logo-check { animation: none; } }
.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.nav-links { display: none; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: grid; }
.nav-cta { display: none; }
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
  .nav-cta { display: inline-flex; padding: 10px 18px; }
}
@media (max-width: 380px) { .logo-text { font-size: 19px; } }
.mobile-menu { display: none; border-top: 1px solid var(--line); padding: 12px 16px 20px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 0; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }

/* ===== Hero ===== */
.hero { padding: 64px 0 72px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } .hero { padding: 96px 0 104px; } }
.hero h1 { font-size: clamp(40px, 7vw, 76px); }
.strike {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
}
.fix { color: var(--accent); font-style: italic; }
.hero-lead { font-size: 19px; color: var(--ink-soft); max-width: 620px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 48px; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 34px; line-height: 1; }
.hero-stats span { font-size: 14px; color: var(--ink-soft); }

.proof-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  position: relative;
  transform: rotate(1.2deg);
}
.proof-card::before {
  content: "";
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  z-index: -1;
}
.proof-card .tag { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.proof-title { font-size: 22px; margin: 10px 0 16px; }
.proof-card p { font-size: 15px; line-height: 1.8; margin: 0; }
del { color: var(--ink-soft); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
ins { text-decoration: none; color: var(--accent); font-weight: 700; }
.proof-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  display: flex; gap: 10px;
}
.proof-note b { color: var(--accent); }

/* ===== Marquee ===== */
.marquee { border-block: 1px solid var(--line); background: var(--bg-alt); overflow: hidden; padding: 18px 0; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: scroll 38s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-size: 22px; white-space: nowrap; color: var(--ink-soft); }
.marquee-track span::after { content: "✦"; margin-left: 48px; color: var(--accent); font-size: 14px; vertical-align: middle; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-tight { padding: 24px 0 80px; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 4.5vw, 48px); }

/* About */
.about-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 360px 1fr; align-items: start; } }
.portrait { margin: 0; position: relative; max-width: 400px; }
.portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.portrait picture { display: block; position: relative; z-index: 0; }
.portrait picture::after {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  z-index: -1;
}
.portrait figcaption {
  margin-top: 22px;
  font-size: 14px;
  color: var(--ink-soft);
}
.about-text p { font-size: 18px; }
.about-list { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .about-list { grid-template-columns: 1fr 1fr; } }
.about-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  display: flex; gap: 10px; align-items: flex-start;
}
.about-list li::before { content: "✓"; color: var(--accent); font-weight: 800; }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* Cards */
.cards { display: grid; gap: 20px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .num { font-family: var(--font-display); font-size: 15px; color: var(--accent); font-weight: 700; margin-bottom: 18px; }
.card h3 { font-size: 24px; }
.card p { color: var(--ink-soft); font-size: 15px; }
.card ul { margin: auto 0 0; padding: 16px 0 0; list-style: none; border-top: 1px dashed var(--line); font-size: 14px; }
.card ul li { padding: 4px 0; }
.card ul li::before { content: "— "; color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
}

/* Clients */
.clients {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px;
  grid-template-columns: repeat(2, 1fr);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 760px) { .clients { grid-template-columns: repeat(3, 1fr); } }
.client {
  background: var(--surface);
  padding: 32px 20px;
  min-height: 140px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 6px;
  transition: background .2s;
}
.client:hover { background: var(--bg); }
.client-name { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.01em; }
.client-type { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.clients-more {
  margin: 24px 0 0;
  padding: 18px 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

/* Process */
.steps { display: grid; gap: 0; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.step { padding: 24px 0; border-top: 2px solid var(--ink); counter-increment: step; }
.step::before { content: "0" counter(step); font-family: var(--font-display); font-size: 40px; color: var(--accent); display: block; line-height: 1; margin-bottom: 14px; }
.step h3 { font-size: 20px; }
.step p { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* Before / After */
.ba { display: grid; gap: 20px; }
@media (min-width: 860px) { .ba { grid-template-columns: 1fr 1fr; } }
.ba-col { border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); background: var(--surface); }
.ba-col h3 { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.ba-col.before h3 { color: var(--ink-soft); }
.ba-col.after { border-color: var(--accent); }
.ba-col.after h3 { color: var(--accent); }
.ba-col p { font-size: 16px; margin: 0; }
.ba-col mark { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit; padding: 0 3px; border-radius: 3px; }

/* Pricing */
.price-card { position: relative; }
.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.price-card .badge {
  position: absolute; top: -12px; right: 20px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; letter-spacing: .06em;
}
.price { font-family: var(--font-display); font-size: 40px; line-height: 1; margin: 6px 0 4px; }
.price small { font-family: var(--font-body); font-size: 15px; color: var(--ink-soft); font-weight: 500; }

/* ===== Blog list (одна статья под другой) ===== */
.post-list { display: grid; gap: 0; max-width: 980px; }
.post-row {
  display: grid;
  gap: 20px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.post-row:first-child { padding-top: 0; }
@media (min-width: 720px) {
  .post-row { grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
}
.post-row-img img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: transform .25s ease;
}
.post-row-img:hover img { transform: scale(1.02); }
.post-row h3 { font-size: clamp(22px, 2.6vw, 28px); margin: 6px 0 10px; }
.post-row h3 a { text-decoration: none; }
.post-row h3 a:hover { color: var(--accent); }
.post-row p { color: var(--ink-soft); font-size: 16px; margin-bottom: 12px; }
.post-meta { font-size: 14px; color: var(--ink-soft); display: flex; gap: 6px 14px; flex-wrap: wrap; }
.views::before { content: "👁 "; }
.read-more { font-weight: 700; font-size: 15px; text-decoration: none; }
.read-more::after { content: " →"; color: var(--accent); }
.read-more:hover { color: var(--accent); }
.post-list-more { margin-top: 32px; }

/* Page hero (блог, 404) */
.page-hero { padding: 56px 0 32px; }
.page-hero h1 { font-size: clamp(36px, 6vw, 64px); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.breadcrumbs a { text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { color: var(--accent); }
.notfound { padding: 96px 0; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 21px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 28px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--ink-soft); }

/* Contact */
.contact { background: var(--ink); color: var(--bg); border-radius: 24px; padding: 48px 24px; }
@media (min-width: 720px) { .contact { padding: 64px; } }
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact h2 { font-size: clamp(32px, 5vw, 52px); color: var(--bg); }
.contact .muted { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.contact-links { display: grid; gap: 10px; margin-top: 28px; }
.contact-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 20px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--bg) 20%, transparent);
  text-decoration: none; font-weight: 600;
  transition: background .15s;
}
.contact-links a:hover { background: color-mix(in srgb, var(--bg) 8%, transparent); }
.contact-links a span { color: color-mix(in srgb, var(--bg) 60%, transparent); font-weight: 500; font-size: 14px; overflow-wrap: anywhere; text-align: right; }
.form { display: grid; gap: 14px; }
.form label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--bg) 65%, transparent); display: grid; gap: 6px; }
.form label em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--bg) 20%, transparent);
  background: color-mix(in srgb, var(--bg) 6%, transparent);
  color: var(--bg);
  font: inherit; font-size: 16px; text-transform: none; letter-spacing: 0;
}
.form select option { color: #16140f; }
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form .btn-primary { justify-content: center; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: 15px; min-height: 1.4em; }
.form-status.ok { color: #7bd88f; }
.form-status.err { color: var(--accent); }

/* Footer */
.site-footer { padding: 40px 0; border-top: 1px solid var(--line); margin-top: 80px; font-size: 14px; color: var(--ink-soft); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ===== Post page ===== */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--accent); }

.post-layout {
  display: grid;
  gap: 56px;
  padding-top: 48px;
  max-width: 1240px;
}
@media (min-width: 1080px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; }
}
.post { min-width: 0; }
.post-header h1 { font-size: clamp(34px, 5vw, 56px); }
.post-lead { font-size: 20px; color: var(--ink-soft); margin-bottom: 24px; }
.post-byline { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.byline-ava { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.byline-name { font-weight: 800; text-decoration: none; }
.byline-name:hover { color: var(--accent); }
.post-byline .post-meta { margin-top: 2px; }
.post-cover { margin: 0 0 40px; }
.post-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 1200 / 630; object-fit: cover; }

.post-content p, .post-content li { font-size: 18.5px; line-height: 1.75; }
.post-content h2 { font-size: clamp(26px, 3vw, 32px); margin-top: 52px; }
.post-content h3 { font-size: 22px; margin-top: 32px; }
.post-content a { color: var(--accent); text-underline-offset: 3px; }
.post-content ul, .post-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.post-content li { margin-bottom: 6px; }
.post-content li::marker { color: var(--accent); }
.post-content blockquote {
  margin: 36px 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display); font-size: 24px; font-style: italic; line-height: 1.4;
}
.post-content .callout {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 20px 24px; margin: 28px 0;
}
.post-content .callout p { font-size: 17px; margin: 0; }
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.post-content table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 560px; }
.post-content th, .post-content td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-content tr:last-child td { border-bottom: 0; }
.post-content th { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); background: var(--bg-alt); }

.post-footer { margin-top: 56px; }
.share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 20px 0; border-block: 1px solid var(--line);
}
.share-label { font-weight: 800; margin-right: 6px; }
.share-btn {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.author-box {
  display: flex; gap: 20px; align-items: flex-start;
  margin-top: 32px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
@media (max-width: 560px) { .author-box { flex-direction: column; } }
.author-ava { flex: none; width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.author-box p { margin: 0 0 6px; font-size: 15px; color: var(--ink-soft); }
.author-box a { color: var(--accent); }
.author-name { font-family: var(--font-display); font-size: 22px !important; font-weight: 700; color: var(--ink) !important; }

/* Sidebar */
.post-sidebar { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 1080px) { .post-sidebar { align-self: stretch; } }
.sidebar-title {
  font-family: var(--font-body); font-size: 13px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 14px;
}
.related { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.related a {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start;
  padding: 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none;
  transition: background .15s;
}
.related a:hover { background: var(--bg-alt); }
.related img { width: 96px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.related b { display: block; font-size: 14.5px; line-height: 1.35; font-weight: 700; }
.related time { font-size: 12.5px; color: var(--ink-soft); }

/* TOC */
.toc-list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc-list li { counter-increment: toc; }
.toc-list a {
  display: flex; gap: 10px;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--line);
  font-size: 14.5px; line-height: 1.4; text-decoration: none; color: var(--ink-soft);
  transition: color .15s, border-color .15s;
}
.toc-list a:hover { color: var(--ink); }
.toc-list a.active { color: var(--ink); border-left-color: var(--accent); font-weight: 700; }
.toc-side { display: none; }
@media (min-width: 1080px) {
  .toc-side {
    display: block;
    position: sticky; top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto;
    padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  }
}

/* Floating TOC (mobile / tablet) */
.toc-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 55;
  width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toc-fab svg { width: 22px; height: 22px; }
.toc-fab.show { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 1080px) { .toc-fab { display: none; } }
.toc-sheet {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.toc-sheet[hidden] { display: none; }
.toc-sheet-inner {
  width: 100%; max-width: 560px; max-height: 75vh; overflow-y: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 20px 28px;
}
.toc-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 18px; }

/* Icons */
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.btn .icon, .share-btn .icon { width: 16px; height: 16px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; }
.icon-link {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink-soft);
  transition: color .15s, border-color .15s;
}
.icon-link:hover { color: var(--accent); border-color: var(--accent); }
.icon-link .icon { width: 16px; height: 16px; }
.footer-links { align-items: center; }
.author-links { display: flex; gap: 8px; margin-top: 10px !important; }
.cl-name { display: inline-flex; align-items: center; gap: 10px; }
.contact-links a span.cl-name { color: inherit; font-weight: 600; font-size: inherit; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer;
  height: 40px; padding: 0 12px;
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-weight: 700; font-size: 14px;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary .icon { width: 16px; height: 16px; vertical-align: 0; }
.lang-switch ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 80;
  list-style: none; margin: 0; padding: 6px; min-width: 200px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.lang-switch a {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 12px; border-radius: 8px; text-decoration: none; font-size: 15px;
}
.lang-switch a b { width: 26px; font-size: 12px; color: var(--ink-soft); }
.lang-switch a:hover { background: var(--bg-alt); }
.lang-switch a[aria-current] { color: var(--accent); font-weight: 700; }
.lang-switch a[aria-current] b { color: var(--accent); }

/* Cookie bar */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 560px; margin-left: auto;
  background: var(--ink); color: var(--bg);
  border-radius: 16px; padding: 18px 20px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  display: grid; gap: 14px;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.cookie-bar a { color: inherit; text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-bar .btn-ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.cookie-bar .btn-ghost:hover { background: var(--bg); color: var(--ink); }
body.has-cookie-bar .toc-fab { bottom: 150px; }

/* Clients logos */
.client-logo { width: auto; max-width: 180px; height: 48px; object-fit: contain; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .client-logo { filter: brightness(0) invert(1); opacity: .9; } }
:root[data-theme="dark"] .client-logo { filter: brightness(0) invert(1); opacity: .9; }

.container.narrow { max-width: 860px; }
.ba-list { display: grid; gap: 20px; }
.nf-langs { margin-top: 32px; }
.nf-langs .chip { text-decoration: none; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
