@font-face {
  font-family: "Inter";
  src: url("/assets/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/inter-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --paper: #f4f2ed;
  --surface: #fffdf8;
  --surface-2: #ebe7df;
  --ink: #1d1c19;
  --muted: #6d675d;
  --muted-2: #938c80;
  --line: #d9d3c8;
  --accent: #ef6a22;
  --accent-dark: #c94e0d;
  --graphite: #232321;
  --ok: #2e7d4f;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(29, 28, 25, 0.04);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(239, 106, 34, 0.45); outline-offset: 3px; }
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--graphite); color: #fff;
}
.skip:focus { left: 8px; color: #fff; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 66px; display: flex; align-items: center; gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 15px; font-weight: 750; letter-spacing: -0.3px; }
.brand small { margin-top: 2px; font-size: 9px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-nav a { font-size: 12px; font-weight: 600; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px;
  font-size: 12px; font-weight: 700; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 11px; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 48px; align-items: end; }
.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 9px; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent-dark);
}
.hero h1 {
  margin: 0; max-width: 780px;
  font-size: clamp(38px, 5.5vw, 66px); line-height: 0.98; letter-spacing: -3px; font-weight: 780;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-copy > p { max-width: 590px; margin: 20px 0 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-aside {
  padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.hero-aside .eyebrow { margin-bottom: 8px; }
.hero-aside b { display: block; font-size: 30px; line-height: 1; letter-spacing: -1px; }
.hero-aside p { margin: 9px 0 0; font-size: 12px; color: var(--muted); }
.hero-line { height: 1px; margin: 16px 0 12px; background: var(--line); }
.hero-note { font-size: 10px; font-weight: 600; color: var(--muted-2); }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-muted { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.05; letter-spacing: -1.2px; font-weight: 750; }
.section-head .eyebrow { margin-bottom: 7px; }
.section-link { font-size: 11px; font-weight: 700; color: var(--muted); }
.section-link:hover { color: var(--accent-dark); }

/* ---------- Cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.post-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; transition: border-color .15s, transform .15s;
}
.post-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.post-card-link { display: flex; flex-direction: column; min-height: 100%; padding: 18px; }
.post-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.post-card-kind {
  display: inline-flex; padding: 4px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--accent-dark);
  font-size: 9px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase;
}
.post-card-top time { font-size: 10px; color: var(--muted-2); white-space: nowrap; }
.post-card h2 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -0.55px; font-weight: 720; }
.post-card p { margin: 10px 0 18px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.post-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted-2); }
.post-card-foot .arrow { font-weight: 700; color: var(--ink); }
.post-card-featured { margin-bottom: 14px; }
.post-card-featured .post-card-link { padding: 26px; }
.post-card-featured h2 { max-width: 760px; font-size: clamp(28px, 4vw, 46px); line-height: 1.02; letter-spacing: -1.8px; }
.post-card-featured p { max-width: 680px; font-size: 14px; }

/* ---------- Tags ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 10px; font-weight: 650; color: var(--muted);
}
.tag:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- CTA ---------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 30px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--graphite); color: #f7f4ed;
}
.cta-band .eyebrow { color: #ffb489; }
.cta-band h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.05; letter-spacing: -1.2px; }
.cta-band p { margin: 7px 0 0; font-size: 12px; color: #b9b3a8; }
.cta-band .btn-primary { background: var(--accent); }

/* ---------- Article ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 7px; padding: 22px 0 0; font-size: 10px; color: var(--muted-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-dark); }
.post { max-width: 780px; margin: 0 auto; padding: 28px 0 54px; }
.post-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.post-head h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); line-height: 1.02; letter-spacing: -2px; font-weight: 780; }
.post-lead { margin: 16px 0 0; font-size: 17px; line-height: 1.6; color: var(--muted); }
.post-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 18px; font-size: 10px; font-weight: 600; color: var(--muted-2); }
.post-body { padding-top: 26px; font-size: 16px; line-height: 1.78; }
.post-body > *:first-child { margin-top: 0; }
.post-body h2 { margin: 38px 0 12px; font-size: 28px; line-height: 1.15; letter-spacing: -0.9px; }
.post-body h3 { margin: 30px 0 10px; font-size: 21px; line-height: 1.2; letter-spacing: -0.4px; }
.post-body h4 { margin: 24px 0 8px; font-size: 17px; }
.post-body p { margin: 0 0 17px; }
.post-body ul, .post-body ol { margin: 0 0 19px; padding-left: 22px; }
.post-body li { margin: 6px 0; }
.post-body li::marker { color: var(--accent); }
.post-body a { color: var(--accent-dark); text-decoration: underline; text-decoration-color: rgba(201, 78, 13, .35); text-underline-offset: 2px; }
.post-body a:hover { text-decoration-color: var(--accent-dark); }
.post-body strong { font-weight: 700; }
.post-body blockquote {
  margin: 24px 0; padding: 14px 18px; border-left: 3px solid var(--accent);
  background: var(--surface); color: var(--muted);
}
.post-body blockquote p { margin: 0; }
.post-body code {
  padding: 2px 5px; border-radius: 4px; background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em;
}
.post-body pre {
  overflow-x: auto; margin: 20px 0; padding: 16px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--graphite); color: #f4f0e8;
}
.post-body pre code { padding: 0; background: none; color: inherit; }
.post-body hr { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: 10px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.post-body th, .post-body td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.post-body th { background: var(--surface-2); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.post-body tr:last-child td { border-bottom: 0; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-foot .post-tags { margin: 0; }
.tag-head { max-width: 780px; margin: 0 auto; padding: 34px 0 22px; }
.tag-head h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -1.6px; line-height: 1.05; }
.tag-head p { margin: 8px 0 0; color: var(--muted); }

/* ---------- 404 ---------- */
.not-found { max-width: 640px; padding: 80px 0 100px; }
.not-found h1 { margin: 0; font-size: clamp(38px, 6vw, 64px); line-height: 1; letter-spacing: -2.5px; }
.not-found p { margin: 16px 0 24px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--graphite); color: #f4f0e8; }
.footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 34px 0; border-bottom: 1px solid #3b3a36; }
.footer-cta b { font-size: 20px; letter-spacing: -0.5px; }
.footer-cta p { margin: 4px 0 0; font-size: 12px; color: #b9b3a8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding: 30px 0; }
.footer-grid > div { display: flex; flex-direction: column; gap: 7px; }
.footer-grid b { margin-bottom: 3px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8f897d; }
.footer-grid a { font-size: 12px; color: #d9d3c8; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0 26px; border-top: 1px solid #3b3a36; }
.footer-bottom p { max-width: 760px; margin: 0; font-size: 9px; line-height: 1.5; color: #8f897d; }
.footer-bottom span { font-size: 9px; color: #8f897d; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hero-aside { max-width: 420px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { gap: 12px; }
  .site-nav a:nth-child(3), .site-nav a:nth-child(4) { display: none; }
}
@media (max-width: 700px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .header-inner { min-height: 60px; gap: 10px; }
  .site-nav { display: none; }
  .header-inner > .btn { margin-left: auto; }
  .hero { padding: 40px 0 34px; }
  .hero h1 { letter-spacing: -1.8px; }
  .hero-copy > p { font-size: 14px; }
  .section { padding: 36px 0; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-card-featured .post-card-link { padding: 20px; }
  .post-card-featured h2 { letter-spacing: -1.2px; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 22px; }
  .cta-band .btn { width: 100%; }
  .post { padding-top: 20px; }
  .post-body { font-size: 15px; line-height: 1.72; }
  .post-body h2 { font-size: 24px; }
  .post-body h3 { font-size: 19px; }
  .footer-cta { flex-direction: column; align-items: flex-start; }
  .footer-cta .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .post-foot { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .post-card { transition: none; }
  .btn:hover, .post-card:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .hero-actions, .post-foot, .section-muted, .cta-band { display: none !important; }
  body { background: #fff; }
  .post { max-width: none; }
  .post-body a { text-decoration: none; color: inherit; }
}
