/* SYNAPSE     */
:root {
  --paper: #fbfaf7;
  --card: #ffffff;
  --ink: #141419;
  --ink-2: #35353f;
  --muted: #5e5e6a;
  --line: #e7e4dd;
  --line-2: #f0ede6;
  --accent: #4f3df5;
  --accent-2: #a855f7;
  --accent-soft: #eeecff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 25, .05), 0 8px 24px rgba(20, 20, 25, .06);
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

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

/* ----------  ---------- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 250, 247, .88);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-in { display: flex; align-items: center; gap: 28px; height: 62px; }

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.brand-name {
  font: 700 19px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
}
.brand-name span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 8px 12px; border-radius: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.nav-item > a:hover, .nav-item > a.on { background: var(--accent-soft); color: var(--accent); }

.menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px; display: none; z-index: 50;
}
.nav-item:hover .menu, .nav-item:focus-within .menu { display: block; }
.menu a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.menu a:hover { background: var(--paper); color: var(--accent); }
.menu .menu-head {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 6px 10px 2px;
}

.hdr-right { display: flex; align-items: center; gap: 10px; flex: none; }
.lang {
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em;
  border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; color: var(--muted);
}
.lang:hover { border-color: var(--accent); color: var(--accent); }

/* ----------  ---------- */
main { padding: 34px 0 60px; }

.lead { display: grid; grid-template-columns: 1.55fr 1fr; gap: 34px; align-items: start; }

.lead-main { display: block; }
.lead-main .shot {
  border-radius: var(--radius); overflow: hidden; background: var(--line-2);
  aspect-ratio: 16 / 9;
}
.lead-main .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.lead-main:hover .shot img { transform: scale(1.02); }
.lead-main h1 {
  font: 400 clamp(28px, 3.4vw, 42px)/1.12 var(--serif);
  letter-spacing: -.01em; margin: 18px 0 10px;
}
.lead-main p { color: var(--ink-2); font-size: 17px; margin: 0 0 12px; max-width: 62ch; }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.kicker .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }

.lead-side { display: grid; gap: 14px; border-left: 1px solid var(--line); padding-left: 26px; }
.side-item { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; }
.side-item .shot { border-radius: 10px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--line-2); }
.side-item .shot img { width: 100%; height: 100%; object-fit: cover; }
.side-item h3 { font: 400 16px/1.3 var(--serif); margin: 4px 0 6px; }
.side-item:hover h3 { color: var(--accent); }

/*  */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 46px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.section-head h2 { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.section-head a { font-size: 13px; color: var(--muted); }

.feed { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 28px; }

.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 40px 0 10px; padding-top: 20px; border-top: 1px solid var(--line);
}
.pager .btn {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--line);
  border-radius: 100px; font-size: 14px; color: var(--ink); background: var(--card);
}
.pager .btn:hover { border-color: var(--accent); color: var(--accent); }
.pager .muted { font-size: 13.5px; color: var(--muted); }

.card { display: block; }
.card .shot { border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--line-2); }
.card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .shot img { transform: scale(1.03); }
.card h3 { font: 400 21px/1.25 var(--serif); margin: 13px 0 7px; letter-spacing: -.005em; }
.card:hover h3 { color: var(--accent); }
.card p { margin: 0 0 9px; color: var(--muted); font-size: 14.5px; }

/*   */
.aside-box { border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 30px; }
.aside-box > h3 {
  font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; padding: 5px 11px; border: 1px solid var(--line);
  border-radius: 100px; color: var(--ink-2); background: var(--card);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip b { color: var(--muted); font-weight: 500; margin-left: 4px; }

.ad-slot {
  border: 1px dashed var(--line); border-radius: 12px; min-height: 250px;
  display: grid; place-items: center; color: #b9b5ab; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase;
}

/* ----------  ---------- */
.post-wrap { display: grid; grid-template-columns: minmax(0, 720px) 300px; gap: 60px; align-items: start; }
.post-wrap > * { min-width: 0; }
.post-body pre, .post-body table { max-width: 100%; }
.post h1 {
  font: 400 clamp(30px, 3.8vw, 46px)/1.1 var(--serif); letter-spacing: -.015em;
  margin: 14px 0 14px;
}
.post .dek { font-size: 19px; line-height: 1.5; color: var(--ink-2); margin: 0 0 18px; max-width: 60ch; }
.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 13.5px;
}
.byline b { color: var(--ink); font-weight: 600; }

/* height:auto :  <img>   width/height,    
     720px         . */
.post-cover { margin: 26px 0 8px; border-radius: var(--radius); overflow: hidden; background: var(--line-2); }
.post-cover img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
}
.credit { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.post-body { font-size: 17.5px; line-height: 1.72; color: var(--ink-2); margin-top: 26px; }
.post-body > p:first-of-type::first-letter {
  float: left; font: 400 52px/.9 var(--serif); padding: 6px 10px 0 0; color: var(--ink);
}
.post-body h2 { font: 600 25px/1.25 var(--serif); color: var(--ink); margin: 34px 0 12px; letter-spacing: -.01em; }
.post-body h3 { font: 600 19.5px/1.3 var(--sans); color: var(--ink); margin: 26px 0 8px; }
.post-body p { margin: 0 0 16px; }
.post-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin-bottom: 7px; }
.post-body blockquote {
  margin: 22px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent);
  color: var(--ink); font-style: italic;
}
.post-body code {
  font: 14px/1.4 ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--line-2); padding: 2px 6px; border-radius: 5px; color: var(--ink);
}
.post-body pre {
  background: #14141b; color: #ecebff; padding: 16px 18px; border-radius: 12px;
  overflow: auto; font: 13.5px/1.55 ui-monospace, "SF Mono", Consolas, monospace;
}
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body figure { margin: 26px 0; }
.post-body figure img { border-radius: 12px; width: 100%; }
.post-body figure figcaption {
  font: 13.5px/1.5 var(--sans); color: var(--muted); margin-top: 8px; padding-left: 2px;
}
/*    :   ,     */
.post-body .post-fig { margin: 30px 0 26px; }
@media (min-width: 760px) {
  .post-body .post-fig { width: 112%; margin-left: -6%; }
}
.post-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.post-body th, .post-body td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; }
.post-body th { background: var(--line-2); font-weight: 600; }

.post-foot { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }
.src-link {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px;
  color: var(--muted); margin-top: 14px; border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 9px; background: var(--card);
}
.src-link:hover { color: var(--accent); border-color: var(--accent); }

/* ----------  ---------- */
.cat-head { max-width: 720px; margin-bottom: 30px; }
.cat-head h1 { font: 400 clamp(30px, 3.4vw, 44px)/1.1 var(--serif); margin: 8px 0 10px; letter-spacing: -.015em; }
.cat-head p { color: var(--muted); font-size: 17px; margin: 0; }
.cat-count { font-size: 13px; color: var(--muted); }

.empty {
  padding: 60px 0; color: var(--muted); font-size: 16px;
  border-top: 1px solid var(--line); text-align: center;
}

.list { display: grid; gap: 0; }
.row {
  display: grid; grid-template-columns: 1fr 220px; gap: 30px; align-items: start;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row h3 { font: 400 24px/1.22 var(--serif); margin: 4px 0 8px; letter-spacing: -.01em; }
.row:hover h3 { color: var(--accent); }
.row p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.row .shot { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--line-2); }
.row .shot img { width: 100%; height: 100%; object-fit: cover; }

/* ----------  ---------- */
.bot { border-top: 1px solid var(--line); padding: 40px 0 30px; margin-top: 20px; background: var(--card); }
.bot-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.bot h4 {
  font: 600 11px/1 var(--sans); letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px;
}
.bot p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.bot a { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 7px; }
.bot a:hover { color: var(--accent); }
.bot .brand-name { font-size: 16px; }
.copy { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- 404 ---------- */
.nf { padding: 90px 0; text-align: center; }
.nf h1 { font: 400 clamp(56px, 10vw, 110px)/1 var(--serif); margin: 0; letter-spacing: -.03em; }
.nf p { color: var(--muted); font-size: 17px; }

/* ----------   ---------- */
.about { max-width: 720px; }
.about h1 { font: 400 clamp(30px, 3.4vw, 44px)/1.1 var(--serif); letter-spacing: -.015em; margin: 8px 0 18px; }
.about-body p { font-size: 17.5px; line-height: 1.72; color: var(--ink-2); margin: 0 0 16px; }

/* ----------  ---------- */
@media (max-width: 1000px) {
  .lead { grid-template-columns: 1fr; gap: 24px; }
  .lead-side { border-left: 0; padding-left: 0; grid-template-columns: repeat(2, 1fr); }
  .feed { grid-template-columns: 1fr; }
  .post-wrap { grid-template-columns: 1fr; gap: 36px; }
  .bot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .hdr-in {
    height: auto; min-height: 56px; gap: 10px;
    flex-wrap: wrap; padding: 10px 0 0; align-content: center;
  }
  .brand { order: 1; }
  .hdr-right { order: 2; margin-left: auto; }
  .nav {
    order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none;
    gap: 2px; margin: 0 -4px; padding-bottom: 8px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item > a { padding: 6px 9px; font-size: 13.5px; }
  .brand-name { font-size: 16px; }
  main { padding: 22px 0 40px; }
  .menu { display: none !important; }
  .grid { grid-template-columns: 1fr; }
  .lead-side { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .row .shot { order: -1; }
  .post-body { font-size: 16.5px; }
  .bot-in { grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 28px); }
}

.side-item.noimg { grid-template-columns: 1fr; }
.lead-main.noimg h1 { margin-top: 4px; }



@media (max-width: 720px) { .feed { gap: 30px; } aside > .aside-box:last-child { margin-bottom: 0; } .aside-box { margin-bottom: 24px; } }


.row.noimg { grid-template-columns: 1fr; }



/* ---    --- */
.post-body { max-width: 65ch; }
.row p { max-width: 68ch; text-wrap: pretty; }
.card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ad-slot { color: var(--muted); }
.nav-item::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px;
}
@media (max-width: 1000px) {
  .lead-side { border-top: 1px solid var(--line); padding-top: 20px; }
}
@media (max-width: 720px) {
  .post-body pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .nav-item > a { padding: 11px 10px; }
  .lang { padding: 10px 12px; }
}

/* ================= audit-2: grid, cards, a11y ================= */
.lead { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
.lead-side { align-content: start; gap: 16px; }

.card { display: flex; flex-direction: column; height: 100%; }
.card h3, .card p { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 { -webkit-line-clamp: 3; line-clamp: 3; }
.card p { -webkit-line-clamp: 3; line-clamp: 3; }
.card .meta { margin-top: auto; padding-top: 8px; }
.grid > .card:last-child:nth-child(odd) { grid-column: auto; }

.row { grid-template-columns: minmax(0, 68ch) 220px; justify-content: space-between; }
@media (min-width: 1001px) { .pager { max-width: calc(100% - 344px); } }

a:focus-visible, button:focus-visible, .btn:focus-visible, .chip:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.chip { min-height: 44px; display: inline-flex; align-items: center; }
.lang, .pager .btn { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 720px) {
  .hdr { position: static; }
  .bot-in { grid-template-columns: 1fr 1fr; }
  .bot > div:first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* drop cap only when the first letter is a letter, not a digit */
.post-body > p:first-of-type::first-letter { float: none; font: inherit; padding: 0; color: inherit; }
.post-body > p.lede::first-letter {
  float: left; font: 400 52px/.9 var(--serif); padding: 6px 10px 0 0; color: var(--ink);
}

.breadcrumbs { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--line); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* a11y: hierarchy + tap targets */
.side-item h2 { font: 400 16px/1.3 var(--serif); margin: 4px 0 6px; }
.side-item:hover h2 { color: var(--accent); }
.row h2 { font: 400 24px/1.22 var(--serif); margin: 4px 0 8px; letter-spacing: -.01em; }
.row:hover h2 { color: var(--accent); }
.bot h2 { font: 600 11px/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.bot a { padding: 4px 0; }
.section-head a { padding: 8px 0; }
.bot .brand { min-height: 40px; }

/* ================= engagement: quiz, test, vs, calc, promo, hubs ================= */
.promo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0 0; }
.promo { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.promo b { font: 400 20px/1.25 var(--serif); }
.promo > span:last-child { color: var(--muted); font-size: 14px; }
.promo:hover { border-color: var(--accent); }

.quiz-wrap { max-width: 760px; }
.quiz-wrap h1 { font: 400 clamp(28px, 3.4vw, 40px)/1.15 var(--serif); margin: 10px 0 12px; }
.quiz-wrap h2 { font: 600 22px/1.3 var(--serif); margin: 30px 0 14px; }
.quiz-wrap .dek { font-size: 18px; color: var(--ink-2); margin: 0 0 14px; }
.quiz-src { color: var(--muted); font-size: 14px; }
.quiz-form { display: grid; gap: 22px; margin: 26px 0; }
.quiz-q { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--card); }
.quiz-q legend { font: 600 17px/1.35 var(--sans); padding: 0 6px; }
.quiz-q .num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; align-items: center; justify-content: center; margin-right: 8px; }
.quiz-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.quiz-opt:hover { background: var(--paper); }
.quiz-opt input { margin-top: 4px; }
.quiz-res { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--card); }
.quiz-res .score { font: 400 44px/1 var(--serif); }
.quiz-res .score span { font-size: 22px; color: var(--muted); }
.quiz-review { padding-left: 0; list-style: none; display: grid; gap: 14px; }
.quiz-review li { border-left: 3px solid var(--line); padding: 6px 0 6px 14px; }
.quiz-review li.ok { border-color: #1f9d63; }
.quiz-review li.bad { border-color: #d94b4b; }
.quiz-review .q { font-weight: 600; margin: 0 0 4px; }
.quiz-review .ans { margin: 0 0 4px; color: var(--muted); }
blockquote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--accent-soft); color: var(--muted); }

.sub-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 24px 0; }
.sub-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.sub-form input[type=email] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; min-width: 260px; background: var(--card); }

.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); padding: 11px 18px; border-radius: 100px; display: inline-flex; align-items: center; min-height: 44px; }
.btn-primary:hover { color: #fff; background: #3f2fe0; border-color: #3f2fe0; }

.quiz-teaser { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 26px 0; background: var(--card); }
.quiz-teaser p { margin: 4px 0 0; color: var(--muted); }

.next-step { margin: 40px 0 10px; }
.next-step h2 { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.calc-form { display: grid; gap: 14px; max-width: 420px; margin: 24px 0; }
.calc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.calc-form input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; background: var(--card); }
.calc-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.calc-out div { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--card); }
.calc-out span { display: block; font: 400 26px/1.1 var(--serif); }
.calc-out small { color: var(--muted); }

.vs-box { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--card); margin-bottom: 14px; cursor: pointer; }
.vs-box.static { cursor: default; }
.vs-box .tag { font: 600 12px/1 var(--sans); color: var(--accent); background: var(--accent-soft); padding: 6px 9px; border-radius: 8px; height: fit-content; }
.vs-box p { margin: 0; }

.chips-big .chip { font-size: 15px; padding: 8px 14px; }

@media (max-width: 1000px) { .promo-row { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } .calc-out { grid-template-columns: 1fr; } .quiz-teaser { flex-direction: column; align-items: flex-start; } }

.quiz-form .btn-primary { justify-self: start; }

.promo-row { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* teaser ?????: ? ????? ????? ? ?????? ???????, ??? ?????? ? ??????-?????? */
.quiz-teaser {
  display: block; border: 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; padding: 18px 0; margin: 28px 0;
}
.quiz-teaser p { margin: 8px 0 6px; color: var(--ink-2); font-size: 16px; max-width: 60ch; }
.quiz-link { font-size: 14px; color: var(--accent); border-bottom: 1px solid transparent; }
.quiz-link:hover { border-bottom-color: var(--accent); }
@media (max-width: 720px) { .quiz-teaser { margin: 22px 0; } }

/* ????: ??????? ??? ???????? ? ????? ?????, ????????? ????? */
.quiz-q { border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 16px; background: var(--card); }
.quiz-q__title { font: 600 17px/1.4 var(--sans); margin: 0 0 14px; display: flex; gap: 9px; align-items: flex-start; }
.quiz-q__title .num { flex: none; display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; align-items: center; justify-content: center; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt { position: relative; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--card); transition: border-color .15s, background .15s; }
.quiz-opt:hover { border-color: var(--accent); }
.quiz-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quiz-opt span { display: flex; align-items: center; gap: 10px; font-size: 15.5px; }
.quiz-opt span::before { content: ""; width: 18px; height: 18px; border: 1.5px solid #b9b5ab; border-radius: 50%; flex: none; }
.quiz-opt input:checked + span::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 4.5px, transparent 5px); }
.quiz-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.quiz-res { border-left: 3px solid var(--accent); }

.quiz-src { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.quiz-src a { color: var(--muted); border-bottom: 1px solid var(--line); }
.quiz-src a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.quiz-stats { margin: 0 0 18px; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.next-list { display: grid; gap: 18px; }
.next-item { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: start; }
.next-item .shot { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--line-2); }
.next-item .shot img { width: 100%; height: 100%; object-fit: cover; }
.next-item h3 { font: 400 18px/1.3 var(--serif); margin: 4px 0 0; }
.next-item:hover h3 { color: var(--accent); }
@media (max-width: 720px) { .next-item { grid-template-columns: 96px 1fr; } }

/* ========== inline figures: 16:9, same width as cover ========== */
/* Обложка шире строки, а фото в тексте растягивалось */
.post-body { max-width: none; }
.post-body > * { max-width: 65ch; }
.post-body > figure,
.post-body > table,
.post-body > pre { max-width: none; }
.post-body .post-fig { width: 100%; margin: 34px 0 30px; }
.post-body .post-fig img,
.post-body figure img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius);
  background: var(--line-2);
}
.post-body .post-fig figcaption { margin-top: 10px; }
@media (max-width: 720px) {
  .post-body .post-fig { margin: 26px 0 24px; }
}

/* ========== cards-row-wide: last odd card becomes a wide row ========== */
/* широкая последняя карточка убрана: сетка всегда чётная */

/* ========== photo credit under inline figure ========== */
.post-body .post-fig figcaption {
  font: 12.5px/1.5 var(--sans); color: var(--muted);
  margin-top: 9px; letter-spacing: .02em;
}

/* ========== topic hub cards ========== */
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.topic {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 12px;
}
.topic h2 { font: 400 22px/1.25 var(--serif); margin: 0; }
.topic h2 a:hover { color: var(--accent); }
.topic .n { font: 600 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.topic ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.topic ol a { font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.topic ol a:hover { color: var(--accent); }
.topic .more { margin-top: auto; font-size: 13.5px; color: var(--accent); }

/* ========== tool pages: content + rail ========== */
.tool { display: grid; grid-template-columns: minmax(0, 760px) 300px; gap: 60px; align-items: start; }
.tool > * { min-width: 0; }
.tool .quiz-wrap { max-width: none; }
@media (max-width: 1000px) {
  .tool { grid-template-columns: 1fr; gap: 34px; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topic-grid { grid-template-columns: 1fr; }

}

/* ========== calculators and forms ========== */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 22px; }
.calc-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: none; align-items: start; margin: 0; }
.calc-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }
.calc-form input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 17px; background: var(--paper); }
.calc-form button { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 720px) { .calc-form { grid-template-columns: 1fr; } }

/* ========== VS hub cards ========== */
.vs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.vs-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.vs-card .round { font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.vs-card h2 { font: 400 19px/1.3 var(--serif); margin: 0; }
.vs-card:hover h2 { color: var(--accent); }
.vs-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1000px) { .vs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .vs-grid { grid-template-columns: 1fr; } }

/* ========== right rail for tool pages ========== */
.rail-links { display: grid; }
.rail-links a {
  padding: 9px 0; font-size: 14.5px; line-height: 1.35; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
}
.rail-links a:last-child { border-bottom: 0; }
.rail-links a:hover { color: var(--accent); }
.rail-note { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0 0 10px; }
.rail-more { font-size: 14px; color: var(--accent); }

/* card text wrapper: keeps meta at the bottom, wide card in one row */
.card-txt { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }

/* topic catalogue: text + last tile */
.topic p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.topic-cta { background: var(--paper); border-style: dashed; }
.topic-cta h2 a { color: var(--accent); }

/* ================= mobile-fix: late base rules must not win on narrow screens ================= */
@media (max-width: 1000px) {
  .lead { grid-template-columns: 1fr; gap: 24px; }
  .feed { grid-template-columns: 1fr; }
  .post-wrap { grid-template-columns: 1fr; gap: 36px; }
  .row { grid-template-columns: 1fr; }
  .tool { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .lead-side { grid-template-columns: 1fr; }
}

/* ================= VS: letter chip beside the paragraph ================= */
.vs-form { display: grid; gap: 14px; margin: 22px 0 0; }
.vs-box {
  display: grid; grid-template-columns: 20px 28px minmax(0, 1fr);
  gap: 12px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 0; background: var(--card); cursor: pointer;
}
.vs-box:hover { border-color: var(--accent); }
.vs-box input { margin: 5px 0 0; accent-color: var(--accent); }
.vs-box .tag {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  font: 600 13px/1 var(--sans); padding: 0; height: 26px;
}
.vs-box p { margin: 0; font-size: 16.5px; line-height: 1.58; color: var(--ink-2); }
.vs-box.static { cursor: default; grid-template-columns: 28px minmax(0, 1fr); }
.vs-box.static:hover { border-color: var(--line); }
.vs-box.pick-ok { border-color: #1f9d63; background: #f6fbf8; }
.vs-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 0; }
.vs-form .btn { justify-self: start; }

/* lone-card: РѕРґРЅР° РєР°СЂС‚РѕС‡РєР° РІ РїРѕСЃР»РµРґРЅРµРј СЂСЏРґСѓ */
.grid:not(.grid-3) > .card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: calc(50% - 14px);
  justify-self: center;
}
@media (max-width: 720px) {
  .grid:not(.grid-3) > .card:last-child:nth-child(odd) { width: 100%; }
}
