/*
Theme Name: SNT Design v1
Theme URI: https://snt.expert/
Author: Cepbiu (via Claude Design)
Author URI: https://snt.expert/
Description: Авторский газетный дизайн для snt.expert — юридический блог по 217-ФЗ. Серифные заголовки (EB Garamond), sans-serif body (IBM Plex Sans), палитра «Газетный» (бордовый акцент на молочно-белом). Создано через Claude Design 2026-05-15.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: Private
Text Domain: snt-design
*/

:root {
  /* === ЦВЕТ === */
  --ink:        #0a0a0a;   /* основной текст */
  --paper:     #fafaf7;   /* фон страницы (тёплый молочно-белый) */
  --accent:    #5c1f1f;   /* акцент (CTA, важные ссылки) — настраивается в Tweaks */
  --card:      #f0eee9;   /* вторичный фон карточек/выделений */
  --rule:      #dcd8d0;   /* линии-разделители */
  --muted:     #6b6760;   /* приглушённый серый текст */
  --body-ink:  #2a2a2a;   /* текст body в статье (чуть мягче) */

  /* === ТИПОГРАФИКА === */
  --serif: 'EB Garamond', 'Times New Roman', Times, serif;   /* настраивается в Tweaks */
  --sans:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  /* === МАСШТАБ === */
  --hero-size:   72px;    /* настраивается в Tweaks (48–80) */
  --btn-radius:  2px;     /* настраивается в Tweaks (0–8) */
  --article-w:   680px;   /* настраивается в Tweaks (600–760) */

  /* === ОТСТУПЫ === */
  --gutter: 32px;
  --max-w:  1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .dot { color: var(--accent); }

.nav {
  display: flex;
  gap: 36px;
  font-size: 15px;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .12s ease;
}
.nav a:hover { border-bottom-color: var(--accent); }

.burger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .2s, opacity .2s;
}
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* === LAYOUT BASE === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--rule); }

.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px 0;
}

h2.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 48px 0;
  color: var(--ink);
}

/* === HERO === */
.hero {
  padding: 120px 0 96px;
  border-top: 0;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--hero-size);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 32px 0;
  max-width: 16ch;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 .em { color: var(--accent); font-style: italic; font-weight: 500; }
.hero .lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 48px 0;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 16px 28px;
  border-radius: var(--btn-radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  background: var(--accent);
  color: #fff;
}
.btn:hover { background: #4a1818; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.link-arrow {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity .15s ease;
}
.link-arrow:hover { opacity: 0.7; }
.link-arrow::after { content: ' →'; }

/* === TRUST STRIP === */
.trust {
  padding: 56px 0;
  background: var(--card);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.trust .row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.trust .cell {
  padding: 8px 32px;
  border-left: 1px solid var(--rule);
}
.trust .cell:first-child { border-left: 0; padding-left: 0; }
.trust .num {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
}
.trust .label {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  max-width: 22ch;
}

/* === СВЕЖИЕ РАЗБОРЫ === */
.posts .head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}
.posts .head h2 { margin: 0; }
.posts .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.post {
  display: flex;
  flex-direction: column;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.post .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 0 0 14px 0;
  flex-wrap: wrap;
}
.post .meta .cat {
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11.5px;
}
.post .meta .sep { color: var(--rule); }
.post h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 14px 0;
  color: var(--ink);
}
.post h3 a {
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size .25s ease;
}
.post h3 a:hover { background-size: 100% 1px; }
.post p.preview {
  font-size: 15px;
  line-height: 1.55;
  color: var(--body-ink);
  margin: 0;
  text-wrap: pretty;
}

/* === УСЛУГИ === */
.services .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.service {
  padding: 40px 40px 36px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  transition: background .2s ease;
}
.service:hover { background: var(--card); }
.service h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 14px 0;
  color: var(--ink);
}
.service p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--body-ink);
  margin: 0 0 28px 0;
  max-width: 44ch;
  flex-grow: 1;
}
.service .price {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
}
.service .price small {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-right: 6px;
  vertical-align: 0.18em;
}
.service .more {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  align-self: flex-start;
  transition: text-decoration-color .15s ease;
}
.service .more:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* === О ПРАКТИКЕ === */
.about .row {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 80px;
  align-items: flex-start;
}
.portrait {
  width: 400px;
  height: 500px;
  background: var(--card);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.portrait .label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.about h2 { margin-bottom: 28px; }
.about p.bio {
  font-size: 17px;
  line-height: 1.65;
  color: var(--body-ink);
  margin: 0 0 24px 0;
  max-width: 56ch;
}
.about ul.skills {
  list-style: none;
  padding: 0;
  margin: 0 0 36px 0;
  border-top: 1px solid var(--rule);
}
.about ul.skills li {
  font-size: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: baseline;
  gap: 16px;
  color: var(--body-ink);
}
.about ul.skills li::before {
  content: '—';
  color: var(--accent);
  font-family: var(--serif);
}

/* === FOOTER === */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--rule);
  padding: 72px 0 40px;
  margin-top: 0;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.site-footer .col h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 18px 0;
}
.site-footer .col p,
.site-footer .col a {
  font-size: 15px;
  color: var(--body-ink);
  line-height: 1.7;
  text-decoration: none;
  display: block;
  margin: 0;
}
.site-footer .col a:hover { color: var(--accent); }
.site-footer .desc {
  max-width: 36ch;
  margin-top: 14px !important;
  font-size: 14px !important;
  color: var(--muted) !important;
  line-height: 1.6 !important;
}
.site-footer .legal {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer .legal a { color: var(--muted); }
.site-footer .legal a:hover { color: var(--accent); }

/* ===========================================================
   ARTICLE PAGE (#article)
   =========================================================== */
.article-page {
  padding: 80px 0 120px;
}
.article-page .wrap {
  display: grid;
  grid-template-columns: 1fr var(--article-w) 1fr;
  gap: 56px;
  align-items: start;
}
.article-page .toc-col { padding-top: 8px; }
.article-page .body-col {
  width: 100%;
  max-width: var(--article-w);
}
.article-page .toc {
  position: sticky;
  top: 96px;
  font-family: var(--sans);
  border-left: 1px solid var(--rule);
  padding-left: 20px;
}
.article-page .toc h5 {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px 0;
}
.article-page .toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.article-page .toc li {
  counter-increment: toc;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px 0;
  padding-left: 28px;
  position: relative;
}
.article-page .toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 13px;
}
.article-page .toc a {
  text-decoration: none;
  color: var(--body-ink);
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.article-page .toc a:hover { color: var(--accent); border-color: var(--accent); }

.article-page .crumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 32px 0;
  letter-spacing: 0.02em;
}
.article-page .crumbs a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.article-page .crumbs span { margin: 0 10px; color: var(--rule); }

.article-page h1.title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 28px 0;
  color: var(--ink);
  text-wrap: balance;
}
.article-page .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 56px 0;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.article-page .meta .cat {
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.article-page .body {
  font-size: 18px;
  line-height: 1.72;
  color: var(--body-ink);
}
.article-page .body > * + * { margin-top: 1.4em; }
.article-page .body p { margin: 0; }
.article-page .body h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  scroll-margin-top: 96px;
}
.article-page .body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ink);
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}
.article-page .body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article-page .body strong { color: var(--ink); font-weight: 600; }
.article-page .body ul {
  padding-left: 22px;
  margin: 1.4em 0;
}
.article-page .body ul li {
  margin: 0 0 10px 0;
  padding-left: 6px;
}
.article-page .body ul li::marker { color: var(--accent); }
.article-page .body blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 28px;
  border-left: 2px solid var(--accent);
  font-style: italic;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
}
.article-page .body .ref {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 32px;
  padding: 16px 20px;
  background: var(--card);
  border-left: 2px solid var(--rule);
}
.article-page .body .ref strong { color: var(--ink); }

.article-page .talkme-wrap {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.article-page .talkme-wrap .talkme-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px 0;
}
.article-page .talkme-wrap h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 24px 0;
  color: var(--ink);
}
/* Placeholder background for empty TalkMe slot — на проде div будет заполнен виджетом */
#TalkMe-container {
  background: var(--card);
  border: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--sans);
}

/* === SECTION SWITCHING (legacy single-file SPA design — в WP не нужно) ===
   В WordPress каждая страница приходит отдельно, поэтому скрытие/показ
   через .is-active не требуется. Оставляем правила пустыми чтобы не
   конфликтовать с body_class("page"), который WP добавляет к Page-постам. */
.snt-page { display: block; }
.snt-page.is-active { display: block; }

/* === DESIGN TOKENS TABLE === */
.tokens-section {
  padding: 96px 0 120px;
  background: var(--card);
  border-top: 1px solid var(--rule);
}
.tokens-section h2 { margin-bottom: 14px; }
.tokens-section .lede {
  font-size: 16px;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 48px 0;
}
.tokens-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.token-block h3 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 18px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.token-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
}
.token-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.token-table td.swatch { width: 44px; }
.token-table td.swatch span {
  display: block;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
}
.token-table td.name {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--ink);
  width: 220px;
}
.token-table td.val {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--muted);
  width: 120px;
}
.token-table td.use {
  color: var(--body-ink);
  font-size: 13.5px;
}

/* === TWEAKS PANEL === */
#tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: 320px;
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: 0 24px 56px -16px rgba(10, 10, 10, 0.18), 0 4px 12px -2px rgba(10, 10, 10, 0.08);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  display: none; /* shown via host activate message OR fallback toggle */
}
#tweaks.visible { display: block; }
#tweaks.collapsed .tw-body { display: none; }
#tweaks .tw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  user-select: none;
}
#tweaks .tw-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
#tweaks .tw-controls {
  display: flex;
  gap: 6px;
}
#tweaks .tw-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1;
}
#tweaks .tw-btn:hover { color: var(--accent); }
#tweaks .tw-body {
  padding: 8px 16px 18px;
  max-height: 70vh;
  overflow-y: auto;
}
#tweaks .tw-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
#tweaks .tw-row:last-child { border-bottom: 0; }
#tweaks .tw-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}
#tweaks .tw-value {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--ink);
  font-weight: 400;
}
#tweaks input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--rule);
  outline: none;
}
#tweaks input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--accent);
}
#tweaks input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--accent);
}
#tweaks input[type="color"] {
  width: 36px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
}
#tweaks .tw-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
#tweaks .tw-color-row .swatches {
  display: flex;
  gap: 6px;
}
#tweaks .tw-color-row .swatches button {
  width: 22px;
  height: 22px;
  border: 1px solid var(--rule);
  cursor: pointer;
  padding: 0;
  border-radius: 2px;
}
#tweaks .tw-color-row .swatches button.active {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
#tweaks .tw-radio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
#tweaks .tw-radio label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
  font-size: 13px;
}
#tweaks .tw-radio label:has(input:checked) {
  border-color: var(--accent);
  background: var(--card);
}
#tweaks .tw-radio input { accent-color: var(--accent); }
#tweaks .tw-radio .preview-sample {
  font-size: 20px;
  margin-left: auto;
  color: var(--ink);
}

#tweaks-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 12px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: none;
  box-shadow: 0 6px 14px -4px rgba(10,10,10,0.3);
}
#tweaks-fab.visible { display: block; }
#tweaks-fab:hover { background: var(--accent); }

/* === RESPONSIVE === */
@media (max-width: 1280px) {
  :root { --gutter: 28px; }
  .hero h1 { font-size: calc(var(--hero-size) * 0.85); }
  .trust .num { font-size: 48px; }
  h2.section-title { font-size: 40px; }
  .article-page .wrap {
    grid-template-columns: 220px var(--article-w) 1fr;
    gap: 40px;
  }
}

@media (max-width: 1024px) {
  .nav { gap: 24px; font-size: 14px; }
  .posts .grid { grid-template-columns: repeat(2, 1fr); gap: 32px 28px; }
  .trust .row { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
  .trust .cell:nth-child(3) { border-left: 0; padding-left: 0; }
  .about .row { grid-template-columns: 1fr; gap: 48px; }
  .portrait { width: 100%; max-width: 400px; height: 420px; }
  .article-page .wrap { grid-template-columns: 1fr; gap: 0; }
  .article-page .toc-col { display: none; }
  .article-page .body-col { margin: 0 auto; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 48px 56px; }
  .site-footer .cols .col:first-child { grid-column: 1 / -1; }
  section { padding: 80px 0; }
  .hero { padding: 88px 0 72px; }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
    --hero-size: 40px;
  }
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 12px var(--gutter) 20px;
  }
  .nav.open a { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav.open a:last-child { border-bottom: 0; }
  .burger { display: block; }
  .site-header .inner { padding: 14px var(--gutter); position: relative; }

  .hero { padding: 56px 0 56px; }
  .hero h1 {
    font-size: var(--hero-size);
    max-width: none;
  }
  .hero .lede { font-size: 17px; margin-bottom: 36px; }
  .hero-actions { gap: 18px; }
  .btn { padding: 14px 22px; font-size: 14.5px; width: 100%; }
  .link-arrow { width: 100%; text-align: left; }

  .trust { padding: 40px 0; }
  .trust .row { grid-template-columns: 1fr; gap: 24px; }
  .trust .cell { border-left: 0; padding-left: 0; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
  .trust .cell:last-child { border-bottom: 0; padding-bottom: 0; }
  .trust .num { font-size: 44px; }

  .posts .head { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 40px; }
  .posts .grid { grid-template-columns: 1fr; gap: 32px; }
  .post h3 { font-size: 22px; }

  h2.section-title { font-size: 32px; margin-bottom: 32px; }

  .services .grid { grid-template-columns: 1fr; }
  .service { padding: 32px 24px 28px; }
  .service h3 { font-size: 24px; }
  .service .price { font-size: 28px; }

  .article-page { padding: 48px 0 80px; }
  .article-page h1.title { font-size: 32px; }
  .article-page .meta { gap: 10px 14px; font-size: 12.5px; }
  .article-page .body { font-size: 16.5px; }
  .article-page .body h2 { font-size: 26px; }
  .article-page .body h3 { font-size: 21px; }
  .article-page .body blockquote { font-size: 19px; padding-left: 18px; }

  .site-footer { padding: 48px 0 32px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
  .site-footer .legal { flex-direction: column; gap: 8px; padding-top: 24px; }

  .tokens-section { padding: 64px 0 80px; }
  .tokens-grid { grid-template-columns: 1fr; gap: 36px; }

  #tweaks { width: calc(100vw - 32px); right: 16px; bottom: 16px; }
  #tweaks-fab { right: 16px; bottom: 16px; }
}