/* Salyt — white & red theme */
:root {
  --red: #c8102e;
  --red-dark: #9b0c23;
  --red-deep: #6e0818;
  --red-light: #e8394f;
  --red-50: #fff5f6;
  --red-100: #fde6e9;
  --red-200: #f7c4cb;
  --ink: #1d1416;
  --text: #2e2628;
  --muted: #6f6466;
  --line: #f0e4e6;
  --bg: #ffffff;
  --radius: 18px;
  --shadow: 0 14px 34px -18px rgba(155, 12, 35, .28);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.75 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red-light); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; color: var(--red); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); }

/* ---------- Top bar ---------- */
.topbar { background: var(--red); color: #fff; font-size: 14px; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.topbar__date { display: inline-flex; align-items: center; gap: 8px; opacity: .95; }

.lang { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.lang a {
  color: #fff; text-decoration: none; font: 600 13px/1.4 var(--sans); letter-spacing: .08em;
  padding: 5px 13px; border-radius: 999px; transition: background .2s, color .2s;
}
.lang a:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.lang a.is-active { background: #fff; color: var(--red); }
.lang--light { background: #fff; border: 1px solid var(--red-200); }
.lang--light a { color: var(--red-dark); }
.lang--light a:hover { background: var(--red-100); color: var(--red-dark); }
.lang--light a.is-active { background: var(--red); color: #fff; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.header__in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; }

.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo__mark {
  flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-light), var(--red-dark)); color: #fff;
  font: 700 25px/1 var(--serif); box-shadow: 0 8px 18px -8px rgba(200, 16, 46, .7);
}
.logo__text { display: flex; flex-direction: column; font: 700 23px/1.1 var(--serif); }
.logo__text small { font: 500 12px/1.4 var(--sans); color: var(--muted); letter-spacing: .02em; margin-top: 2px; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav a {
  display: block; padding: 9px 14px; border-radius: 10px; color: var(--ink); text-decoration: none;
  font-weight: 500; font-size: 15px; line-height: 1.4; transition: background .2s, color .2s;
}
.nav a:hover { background: var(--red-50); color: var(--red); }
.nav a[aria-current="page"] { background: var(--red-100); color: var(--red-dark); font-weight: 600; }

.menu-btn {
  display: none; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--red-200);
  border-radius: 12px; background: #fff; color: var(--red-dark); font: 600 15px/1 var(--sans); cursor: pointer;
}
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -6px; }
.menu-btn__bars::after { top: 6px; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 56px;
  align-items: start; padding-top: 40px; padding-bottom: 80px;
}
.post { min-width: 0; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--red-200); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }

.kicker {
  display: inline-block; font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); background: var(--red-50); border: 1px solid var(--red-100); padding: 7px 11px; border-radius: 999px;
}
.kicker--sm { font-size: 11px; padding: 6px 9px; }

.post h1 {
  font: 700 clamp(29px, 4vw, 46px)/1.17 var(--serif); color: var(--ink);
  margin: 16px 0 18px; letter-spacing: -.01em; overflow-wrap: break-word;
}
.meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px;
  padding-bottom: 22px; margin-bottom: 30px; border-bottom: 1px solid var(--line);
}
.meta span { display: inline-flex; align-items: center; gap: 7px; }
.meta svg { color: var(--red); flex: none; }

/* Framed images: fixed 16:9 ratio, cover + centered, never stretched */
.figure {
  margin: 34px 0; padding: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.figure img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center;
  border-radius: 12px; background: var(--red-50);
}
.figure--hero { margin-top: 0; }

/* Article typography */
.post__body { overflow-wrap: break-word; }
.post__body h2 {
  font: 700 clamp(23px, 2.7vw, 31px)/1.28 var(--serif); color: var(--ink);
  margin: 46px 0 16px; padding-left: 16px; border-left: 4px solid var(--red);
}
.post__body p { margin: 0 0 18px; }
.post__body .lead { font-size: 19px; line-height: 1.75; color: var(--ink); }
.post__body strong { color: var(--ink); }

.post__body ul, .post__body ol { margin: 6px 0 24px; padding: 0; list-style: none; }
.post__body li { position: relative; padding: 11px 0 11px 38px; border-bottom: 1px dashed var(--line); }
.post__body li:last-child { border-bottom: 0; }
.post__body ul > li::before {
  content: ""; position: absolute; left: 8px; top: 22px; width: 10px; height: 10px;
  border-radius: 3px; background: var(--red); transform: rotate(45deg);
}
.post__body ol { counter-reset: item; }
.post__body ol > li { counter-increment: item; }
.post__body ol > li::before {
  content: counter(item); position: absolute; left: 0; top: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--red); color: #fff; font: 700 13px/26px var(--sans); text-align: center;
}

.post__body blockquote {
  margin: 30px 0; padding: 24px 28px; background: var(--red-50); border: 1px solid var(--red-100);
  border-left: 5px solid var(--red); border-radius: 16px;
  font: italic 500 clamp(18px, 2vw, 21px)/1.6 var(--serif); color: var(--red-deep);
}
.post__body blockquote p { margin: 0; }

/* ---------- Sidebar: 4 vertical article blocks ---------- */
.sidebar { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.sidebar__title {
  margin: 0; padding-bottom: 12px; border-bottom: 2px solid var(--red);
  font: 700 21px/1.3 var(--serif); color: var(--ink);
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(155, 12, 35, .4); }
.card__media { display: block; padding: 8px 8px 0; }
.card__media img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--red-50);
}
.card__body { padding: 16px 18px 20px; }
.card h3 { margin: 11px 0 8px; font: 700 18px/1.35 var(--serif); }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--red); }
.card p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.more { display: inline-flex; gap: 6px; font-weight: 600; font-size: 14px; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { border-top: 4px solid var(--red); }
.footer-top { background: var(--red-50); border-bottom: 1px solid var(--red-100); }
.footer-top__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-top: 28px; padding-bottom: 28px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.footer-nav a:hover { color: var(--red); }

.footer-bottom { background: var(--red-deep); color: rgba(255, 255, 255, .86); font-size: 14.5px; line-height: 1.7; padding: 34px 0 30px; }
.footer-bottom p { margin: 0 0 12px; max-width: 900px; }
.footer-bottom__legal { display: flex; align-items: flex-start; gap: 12px; color: rgba(255, 255, 255, .75); font-size: 13.5px; }
.badge18 { flex: none; display: inline-grid; place-items: center; width: 38px; height: 26px; border: 1.5px solid #fff; border-radius: 8px; font-weight: 700; font-size: 12.5px; color: #fff; margin-top: 1px; }
.footer-bottom__copy { margin-top: 20px !important; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 13.5px; color: rgba(255, 255, 255, .65); max-width: none !important; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 0 110px; }
.notfound h1 { font: 700 clamp(64px, 12vw, 120px)/1 var(--serif); color: var(--red); margin: 0 0 12px; }
.notfound p { color: var(--muted); }
.notfound ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.notfound a { display: inline-block; padding: 10px 18px; border-radius: 12px; background: var(--red); color: #fff; text-decoration: none; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -20px rgba(155, 12, 35, .35);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .nav a { padding: 12px 14px; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar__title { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .container { padding: 0 16px; }
  .topbar__date { font-size: 13px; }
  .lang a { padding: 5px 10px; }
  .header__in { min-height: 68px; }
  .logo__mark { width: 40px; height: 40px; font-size: 22px; }
  .logo__text { font-size: 20px; }
  .logo__text small { display: none; }
  .layout { padding-top: 26px; padding-bottom: 56px; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .figure { padding: 5px; border-radius: 14px; margin: 26px 0; }
  .figure img { border-radius: 10px; }
  .post__body .lead { font-size: 17.5px; }
  .post__body blockquote { padding: 18px 18px; }
  .footer-top__in { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
