/* ReStar blog — dark (brand) and light (reading) themes in the site's style */
@font-face { font-family: "Onest"; src: url("/fonts/Onest-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/Onest-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/Onest-SemiBold.woff") format("woff"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Ruberoid"; src: url("/fonts/Ruberoid-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

/* ---------- theme tokens: dark is the default, light is set by data-theme on <html> ---------- */
:root {
  --bg: #0b0b0b;
  --bg-2: #101010;
  --card: #151515;
  --card-2: #1b1b1b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #ffffff;
  --text: #ffffff;
  --soft: #dcdcdc;
  --muted: #a3a3a3;
  --orange: #ff6b00;
  --orange-2: #ff8a33;
  --orange-soft: rgba(255, 107, 0, 0.12);
  --green: #25d366;
  --radius: 22px;
  --head: "Ruberoid", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --glow: rgba(255, 107, 0, 0.14);
  --link-hover: #ffb070;
  --header-bg: rgba(11, 11, 11, 0.82);
  --nav-bg: #0b0b0b;
  --chip-c: #ffb27a;
  --chip-hover-c: #fff;
  --chip-bd: rgba(255, 138, 51, 0.45);
  --accent-bd: rgba(255, 138, 51, 0.4);
  --accent-glow: rgba(255, 107, 0, 0.16);
  --card-bg: linear-gradient(180deg, #171717, #111);
  --card-shadow: none;
  --card-hover-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --img-bg: #111;
  --code-bg: #1f1f1f;
  --code-c: #ffcf9e;
  --pre-bg: #141414;
  --th-bg: #1a1a1a;
  --row-hover: rgba(255, 255, 255, 0.02);
  --tip-c: #6fe39b;
  --warn-c: #ffc65c;
  --warn-bg: #1a1610;
  --stat-bg: linear-gradient(180deg, #181818, #121212);
  --stat-c: #ff6b00;
  --cta-bg: radial-gradient(520px 260px at 100% 0, rgba(255, 107, 0, 0.24), transparent 70%), linear-gradient(180deg, #1a1612, #121212);
  --msg-bg: #1d1d1d;
  --msg-hover-bg: #242424;
  --msg-hover-bd: rgba(255, 255, 255, 0.3);
  --sticky-bg: rgba(20, 18, 16, 0.94);
  --float-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  --modal-bg: #141414;
  --modal-shade: rgba(0, 0, 0, 0.7);
  --modal-x: #222;
  --toast-bg: #fff;
  --toast-c: #111;
  --footer-bg: #080808;
  --draft-bg: #5a4200;
  --draft-c: #ffe08a;
  --draft-chip: #ffd25c;
  --good: #3ddc84;
  --good-soft: rgba(61, 220, 132, 0.12);
  --bar-gray: #8c8781;
  --gray-soft: rgba(255, 255, 255, 0.06);
  --bar-track: rgba(255, 255, 255, 0.07);
  --verdict-bg: radial-gradient(560px 280px at 0 0, rgba(255, 107, 0, 0.2), transparent 70%), linear-gradient(180deg, #1b1612, #121212);
  color-scheme: dark;
}

:root[data-theme="light"], [data-theme="light"].b-lens {
  --bg: #f7f5f1;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #f1ede7;
  --line: rgba(24, 18, 12, 0.09);
  --line-2: rgba(24, 18, 12, 0.16);
  --ink: #15110e;
  --text: #15110e;
  --soft: #2e2924;
  --muted: #6b635b;
  --orange-2: #b84600;
  --orange-soft: rgba(255, 107, 0, 0.09);

  --glow: rgba(255, 140, 60, 0.16);
  --link-hover: #8a3400;
  --header-bg: rgba(247, 245, 241, 0.8);
  --nav-bg: #f7f5f1;
  --chip-c: #a84000;
  --chip-hover-c: #7a2e00;
  --chip-bd: rgba(255, 107, 0, 0.32);
  --accent-bd: rgba(255, 107, 0, 0.28);
  --accent-glow: rgba(255, 140, 60, 0.13);
  --card-bg: #fff;
  --card-shadow: 0 1px 2px rgba(24, 18, 12, 0.04), 0 8px 24px rgba(24, 18, 12, 0.05);
  --card-hover-shadow: 0 2px 4px rgba(24, 18, 12, 0.04), 0 20px 44px rgba(24, 18, 12, 0.11);
  --img-bg: #e9e4dc;
  --code-bg: #f1ece4;
  --code-c: #9a3c00;
  --pre-bg: #fbf9f6;
  --th-bg: #f4f0ea;
  --row-hover: rgba(24, 18, 12, 0.025);
  --tip-c: #137a3a;
  --warn-c: #875800;
  --warn-bg: #fff8ea;
  --stat-bg: #fff;
  --stat-c: #e25a00;
  --cta-bg: radial-gradient(520px 260px at 100% 0, rgba(255, 140, 60, 0.2), transparent 70%), linear-gradient(180deg, #fff8f1, #fff);
  --msg-bg: #fff;
  --msg-hover-bg: #fbf8f4;
  --msg-hover-bd: rgba(24, 18, 12, 0.28);
  --sticky-bg: rgba(255, 255, 255, 0.92);
  --float-shadow: 0 2px 6px rgba(24, 18, 12, 0.05), 0 18px 44px rgba(24, 18, 12, 0.16);
  --modal-bg: #fff;
  --modal-shade: rgba(28, 22, 16, 0.42);
  --modal-x: #f1ede7;
  --toast-bg: #15110e;
  --toast-c: #fff;
  --footer-bg: #efebe4;
  --draft-bg: #fff0c2;
  --draft-c: #6b4d00;
  --draft-chip: #8a6400;
  --good: #128a46;
  --good-soft: rgba(18, 138, 70, 0.09);
  --bar-gray: #b5aca2;
  --gray-soft: rgba(24, 18, 12, 0.05);
  --bar-track: rgba(24, 18, 12, 0.07);
  --verdict-bg: radial-gradient(560px 280px at 0 0, rgba(255, 140, 60, 0.18), transparent 70%), linear-gradient(180deg, #fff6ee, #fff);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--soft);
  background:
    radial-gradient(900px 500px at 85% -120px, var(--glow), transparent 70%),
    var(--bg);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255, 107, 0, 0.28); }
img { max-width: 100%; height: auto; }
a { color: var(--orange-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--orange-2); outline-offset: 3px; border-radius: 6px; }
.b-wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.b-skip { position: absolute; left: -9999px; }
.b-skip:focus { left: 16px; top: 16px; z-index: 100; padding: 10px 16px; background: var(--orange); color: #fff; border-radius: 10px; }

/* one logo per theme */
.b-logo-l { display: none !important; }
[data-theme="light"] .b-logo-d { display: none !important; }
[data-theme="light"] .b-logo-l { display: block !important; }

/* smooth recolouring when the theme is switched without View Transitions */
.b-theming, .b-theming *, .b-theming *::before, .b-theming *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- buttons ---------- */
.b-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 14px; cursor: pointer;
  color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.b-btn--orange { background: linear-gradient(135deg, #ff7a00, #ff5a00); box-shadow: 0 10px 30px rgba(255, 107, 0, 0.28); }
.b-btn--orange:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 36px rgba(255, 107, 0, 0.4); }
[data-theme="light"] .b-btn--orange { box-shadow: 0 8px 22px rgba(255, 107, 0, 0.26); }

/* ---------- header ---------- */
.b-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--header-bg); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
}
.b-header__in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.b-logo { display: flex; flex: none; }
.b-logo img { display: block; width: auto; height: 38px; }
.b-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.b-nav a { color: var(--soft); font-weight: 500; font-size: 15px; text-decoration: none; }
.b-nav a:hover, .b-nav a[aria-current] { color: var(--orange-2); }
.b-header__cta { flex: none; }
.b-burger { display: none; transition: border-color .6s, box-shadow .8s; }

/* theme switch: icon button in the header (desktop) */
.b-theme {
  position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 13px; background: var(--card); color: var(--ink); cursor: pointer;
  transition: border-color .6s, box-shadow .8s, transform .2s;
}
.b-theme:hover { border-color: var(--orange); }
.b-theme:active { transform: scale(.94); }
.b-theme svg { position: absolute; width: 20px; height: 20px; transition: transform .5s cubic-bezier(.2, .9, .25, 1.2), opacity .3s; }
.b-theme .i-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="light"] .b-theme .i-sun { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-theme="light"] .b-theme .i-moon { opacity: 1; transform: none; }

/* theme switch inside the mobile menu */
.b-nav__theme { display: none; }
.b-seg { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.b-seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer;
}
.b-seg button svg { width: 16px; height: 16px; }
.b-seg button[aria-pressed="true"] { background: var(--bg-2); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
[data-theme="dark"] .b-seg button[aria-pressed="true"], :root:not([data-theme]) .b-seg button[aria-pressed="true"] { background: #2a2a2a; }

@media (max-width: 960px) {
  .b-header__in { min-height: 62px; gap: 12px; }
  .b-logo img { height: 32px; }
  .b-header__cta { min-height: 40px; padding: 0 16px; font-size: 14px; }
  .b-header .b-theme { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; }
  .b-burger {
    display: grid; place-content: center; gap: 5px; width: 42px; height: 42px; flex: none;
    border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); cursor: pointer;
  }
  .b-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s; }
  .b-burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .b-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .b-nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 8px 16px 16px; background: var(--nav-bg); border-bottom: 1px solid var(--line);
  }
  .b-nav.is-open { display: flex; }
  .b-nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .b-nav__theme { align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 2px; color: var(--muted); font-size: 15px; }
}
@media (max-width: 420px) {
  .b-header__in { gap: 8px; }
  .b-logo img { height: 28px; }
  .b-header__cta { padding: 0 12px; }
  .b-header .b-theme, .b-burger { width: 38px; height: 38px; }
}
/* the narrowest phones: no room in the header — the switch lives in the menu */
@media (max-width: 359px) {
  .b-header .b-theme { display: none; }
  .b-header__cta { margin-left: auto; }
  .b-nav__theme { display: flex; }
}

/* ---------- common ---------- */
.b-main { padding-bottom: 40px; }
.b-crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 0 0; color: var(--muted); font-size: 14px; }
.b-crumbs a { color: var(--muted); text-decoration: none; }
.b-crumbs a:hover { color: var(--orange-2); }
.b-crumbs i { font-style: normal; opacity: .5; }
.b-crumbs span { color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.b-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--chip-bd); background: var(--orange-soft);
  color: var(--chip-c); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.b-chip:hover { color: var(--chip-hover-c); border-color: var(--orange); }
.b-chip.is-active { background: var(--orange); border-color: var(--orange); color: #fff; }
.b-chip--draft { border-color: #b98a00; background: rgba(255, 200, 0, 0.12); color: var(--draft-chip); }
.b-chip--pin { border-color: var(--orange); background: var(--orange); color: #fff; }
.b-chip--pin::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #fff; display: inline-block; vertical-align: 1px; }
.b-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.b-lead { margin: 14px 0 0; color: var(--soft); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; max-width: 60ch; }
.b-meta { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.b-draftbar { padding: 8px 16px; background: var(--draft-bg); color: var(--draft-c); text-align: center; font-size: 14px; }

/* ---------- blog index ---------- */
.b-blog-head { padding: 26px 0 26px; }
.b-blog-head h1, .b-post__head h1 {
  margin: 0; color: var(--ink); font: 700 clamp(32px, 5.2vw, 56px)/1.08 var(--head); letter-spacing: -0.01em; text-wrap: balance;
}
.b-empty { color: var(--muted); }
.b-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.b-card {
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card-bg); box-shadow: var(--card-shadow);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.b-card:hover { border-color: var(--chip-bd); transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.b-card__img { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--img-bg); }
.b-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.b-card:hover .b-card__img img { transform: scale(1.03); }
.b-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.b-card__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.b-card__title { margin: 14px 0 0; font: 600 20px/1.3 var(--body); }
.b-card__title a { color: var(--ink); text-decoration: none; }
.b-card__title a::after { content: ""; position: absolute; inset: 0; }
.b-card { position: relative; }
.b-card__chips a { position: relative; z-index: 1; }
.b-card__lead { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b-card__meta { margin: auto 0 0; padding-top: 16px; color: var(--muted); font-size: 13px; }
.b-card--big { display: grid; grid-template-columns: 1.25fr 1fr; margin-bottom: 22px; }
.b-card--big .b-card__img { aspect-ratio: auto; min-height: 100%; }
.b-card--big .b-card__body { justify-content: center; padding: 34px; }
.b-card--big .b-card__title { font: 700 clamp(24px, 2.6vw, 32px)/1.15 var(--head); }
.b-card--big .b-card__lead { font-size: 16px; -webkit-line-clamp: 4; }
.b-card--big .b-card__meta { margin-top: 0; }
.b-pager { display: flex; gap: 8px; justify-content: center; margin: 34px 0 0; }
.b-pager a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.b-pager a[aria-current] { background: var(--orange); border-color: var(--orange); color: #fff; }
@media (max-width: 1000px) { .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .b-card--big { grid-template-columns: 1fr; }
  .b-card--big .b-card__img { aspect-ratio: 1200 / 630; }
  .b-card--big .b-card__body { padding: 20px 22px 22px; }
}
@media (max-width: 620px) { .b-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- article ---------- */
.b-post__top { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 26px 0 0; }
.b-post__head .b-chip { margin-bottom: 18px; }
.b-post__head h1 { font-size: clamp(30px, 4.2vw, 50px); }
.b-cover { margin: 0; }
.b-cover img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
[data-theme="light"] .b-cover img { border-color: transparent; box-shadow: 0 2px 6px rgba(24, 18, 12, 0.06), 0 24px 60px rgba(24, 18, 12, 0.16); }
.b-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; margin-top: 40px; }
.b-content { grid-column: 1; grid-row: 1; min-width: 0; }
.b-aside { grid-column: 2; grid-row: 1; position: sticky; top: 96px; display: grid; gap: 16px; }
.b-toc details { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--card-shadow); }
.b-toc summary { padding: 16px 18px; color: var(--ink); font-weight: 600; cursor: pointer; list-style: none; }
.b-toc summary::-webkit-details-marker { display: none; }
.b-toc summary::after { content: "⌄"; float: right; color: var(--muted); transition: transform .2s; }
.b-toc details[open] summary::after { transform: rotate(180deg); }
.b-toc ol { margin: 0; padding: 0 18px 16px 36px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.b-toc li { margin: 8px 0; padding-left: 2px; }
.b-toc a { color: var(--muted); text-decoration: none; }
.b-toc a:hover, .b-toc a.is-active { color: var(--orange-2); }
.b-aside__cta { padding: 18px; border-radius: 18px; border: 1px solid var(--accent-bd); box-shadow: var(--card-shadow);
  background: radial-gradient(260px 160px at 100% 0, var(--accent-glow), transparent 70%), var(--card); }
.b-aside__cta p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.b-aside__cta b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }
.b-aside__cta .b-btn { width: 100%; }

.b-content > :first-child { margin-top: 0; }
.b-content p, .b-content li { font-size: 18px; line-height: 1.72; }
.b-content p { margin: 0 0 1.1em; }
.b-content h2 { margin: 2.1em 0 .7em; color: var(--ink); font: 700 clamp(25px, 3.2vw, 32px)/1.2 var(--head); text-wrap: balance; }
.b-content h3 { margin: 1.7em 0 .5em; color: var(--ink); font: 600 21px/1.35 var(--body); }
.b-content h4 { margin: 1.4em 0 .4em; color: var(--ink); font: 600 18px/1.4 var(--body); }
.b-content strong { color: var(--ink); font-weight: 600; }
.b-content ul, .b-content ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.b-content li { margin: .35em 0; }
.b-content li::marker { color: var(--orange); }
.b-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--orange); color: var(--ink); }
.b-content blockquote p { font-size: 19px; }
.b-content hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
.b-content code { padding: 2px 6px; border-radius: 6px; background: var(--code-bg); color: var(--code-c); font-size: .9em; }
.b-content pre { overflow: auto; padding: 16px; border-radius: 14px; background: var(--pre-bg); border: 1px solid var(--line); }
.b-figure { margin: 1.8em 0; }
.b-figure img { display: block; border-radius: 16px; border: 1px solid var(--line); }
.b-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; text-align: center; }

.b-table { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); box-shadow: var(--card-shadow); }
.b-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.b-table th { padding: 14px 16px; background: var(--th-bg); color: var(--ink); font-weight: 600; text-align: left; vertical-align: bottom; }
.b-table td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.b-table tr:hover td { background: var(--row-hover); }
.b-table .is-right { text-align: right; }
.b-table .is-center { text-align: center; }
@media (max-width: 620px) {
  .b-table { overflow: visible; border: 0; background: none; box-shadow: none; }
  .b-table table { min-width: 0; }
  .b-table thead { display: none; }
  .b-table table, .b-table tbody, .b-table tr, .b-table td { display: block; }
  .b-table tr { margin: 0 0 12px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); box-shadow: var(--card-shadow); }
  .b-table td { padding: 9px 0; border-top: 1px solid var(--line); text-align: left !important; }
  .b-table td:first-child { border-top: 0; color: var(--ink); font-weight: 600; font-size: 16px; }
  .b-table td:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
  .b-table tr:hover td { background: none; }
}

.b-summary {
  margin: 0 0 2em; padding: 22px 24px 8px; border-radius: 20px;
  border: 1px solid var(--accent-bd); box-shadow: var(--card-shadow);
  background: radial-gradient(420px 220px at 100% 0, var(--accent-glow), transparent 70%), var(--card);
}
.b-summary__title, .b-callout__title { margin: 0 0 10px !important; color: var(--ink); font: 700 15px/1.3 var(--body) !important; text-transform: uppercase; letter-spacing: .06em; }
.b-summary__title { color: var(--orange-2); }
.b-summary li, .b-callout li, .b-summary p, .b-callout p { font-size: 17px; }

.b-callout { margin: 1.8em 0; padding: 18px 22px 6px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--card); box-shadow: var(--card-shadow); }
.b-callout--tip { border-left: 4px solid var(--green); }
.b-callout--tip .b-callout__title { color: var(--tip-c); }
.b-callout--note { border-left: 4px solid var(--orange); }
.b-callout--note .b-callout__title { color: var(--orange-2); }
.b-callout--warning { border-left: 4px solid #ffb020; background: var(--warn-bg); }
.b-callout--warning .b-callout__title { color: var(--warn-c); }

.b-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 1.8em 0; }
.b-stat { padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--stat-bg); box-shadow: var(--card-shadow); }
.b-stat b { display: block; color: var(--stat-c); font: 700 clamp(28px, 3.4vw, 38px)/1.05 var(--head); }
.b-stats.is-fit .b-stat b { white-space: nowrap; }
.b-stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- infographics: bars, limit meter, calculation cards, verdict ---------- */
.b-viz { margin: 2em 0; padding: 24px 26px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--card-shadow); }
.b-viz__title { margin: 0 0 20px; color: var(--ink); font: 700 17px/1.35 var(--body); }
.b-viz__foot p { margin: 16px 0 0 !important; color: var(--muted); font-size: 14px !important; line-height: 1.5 !important; }

.b-bar + .b-bar { margin-top: 20px; }
.b-bar__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.b-bar__label { color: var(--soft); font-weight: 600; font-size: 16px; line-height: 1.3; }
.b-bar__val { flex: none; color: var(--ink); font: 700 clamp(17px, 2.2vw, 20px)/1.1 var(--head); white-space: nowrap; font-variant-numeric: tabular-nums; }
.b-bar__track { height: 14px; border-radius: 99px; background: var(--bar-track); overflow: hidden; }
.b-bar__track i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--bar-c, linear-gradient(90deg, #ff9a4d, #ff6b00)); transform-origin: left; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.b-bar:nth-of-type(2) .b-bar__track i { transition-delay: .15s; }
.b-bar:nth-of-type(3) .b-bar__track i { transition-delay: .3s; }
.b-bar:nth-of-type(n+4) .b-bar__track i { transition-delay: .45s; }
.b-bar--green { --bar-c: linear-gradient(90deg, #6ff0a8, var(--good)); }
.b-bar--green .b-bar__val { color: var(--good); }
.b-bar--orange .b-bar__val { color: var(--orange-2); }
.b-bar--gray { --bar-c: var(--bar-gray); }
.b-bar__note { margin: 7px 0 0 !important; color: var(--muted); font-size: 13px !important; line-height: 1.45 !important; }
.b-bars.is-wait .b-bar__track i, .b-meter.is-wait .b-meter__track i { transform: scaleX(0); transition: none; }

.b-meter__nums { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 18px; flex-wrap: wrap; }
.b-meter__nums span { display: block; color: var(--muted); font: 700 12px/1.3 var(--body); text-transform: uppercase; letter-spacing: .06em; }
.b-meter__nums b { display: block; margin-top: 6px; color: var(--ink); font: 700 clamp(28px, 4.4vw, 42px)/1.05 var(--head); white-space: nowrap; }
.b-meter__max { text-align: right; }
.b-meter__max b { color: var(--orange-2); font-size: clamp(18px, 2.4vw, 23px); }
.b-meter__track { position: relative; height: 16px; margin: 18px 0 9px; border-radius: 99px; background: var(--bar-track); }
.b-meter__track i { position: absolute; top: 0; bottom: 0; left: 0; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--good), #ffc24d 62%, var(--orange)); transform-origin: left; transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.b-meter__track::after { content: ""; position: absolute; right: -2px; top: -6px; bottom: -6px; width: 4px; border-radius: 2px; background: var(--orange); box-shadow: 0 0 0 3px var(--card); }
.b-meter__scale { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { .b-meter__max { text-align: left; } }

.b-plans { display: grid; gap: 14px; margin: 2em 0; }
.b-plan { position: relative; padding: 22px 26px 20px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--card-shadow); overflow: hidden; --plan-c: var(--orange-2); --plan-soft: var(--orange-soft); }
.b-plan::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--plan-c); }
.b-plan--green { --plan-c: var(--good); --plan-soft: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.b-plan--gray { --plan-c: var(--muted); --plan-soft: var(--gray-soft); }
.b-plan__badge { display: inline-block; margin-bottom: 10px; padding: 5px 11px; border-radius: 99px; background: var(--plan-soft); color: var(--plan-c); font: 700 12px/1.3 var(--body); text-transform: uppercase; letter-spacing: .05em; }
.b-content .b-plan__title { margin: 0 0 10px; color: var(--ink); font: 700 clamp(20px, 2.4vw, 24px)/1.25 var(--head); }
.b-plan__rows { margin: 0; }
.b-plan__rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 11px 0; border-top: 1px solid var(--line); }
.b-plan__rows dt { color: var(--muted); font-size: 15px; line-height: 1.4; }
.b-plan__rows dd { flex: 0 1 auto; max-width: 55%; margin: 0; color: var(--ink); font-weight: 700; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.b-plan__total { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 8px; padding: 14px 18px; border-radius: 16px; background: var(--plan-soft); }
.b-plan__total span { color: var(--plan-c); font: 700 13px/1.3 var(--body); text-transform: uppercase; letter-spacing: .06em; }
.b-plan__total b { margin-left: auto; color: var(--plan-c); font: 700 clamp(22px, 3vw, 30px)/1.1 var(--head); text-align: right; }
.b-plan__total b small { display: block; margin-top: 4px; color: var(--muted); font: 500 13px/1.3 var(--body); }
.b-plan__note p { margin: 12px 0 0 !important; color: var(--muted); font-size: 14px !important; line-height: 1.5 !important; }
@media (max-width: 520px) {
  .b-viz, .b-plan { padding: 20px 18px; }
  .b-plan__rows div { flex-direction: column; gap: 2px; }
  .b-plan__rows dd { max-width: none; font-size: 17px; text-align: left; }
}

.b-verdict { margin: 2.2em 0; padding: 24px 26px 8px; border-radius: 24px; border: 1px solid var(--accent-bd); background: var(--verdict-bg); box-shadow: var(--card-shadow); }
.b-verdict__label { margin: 0 0 10px !important; color: var(--orange-2); font: 700 13px/1.3 var(--body) !important; text-transform: uppercase; letter-spacing: .08em; }
.b-verdict__label + p > strong:first-child { display: block; margin-bottom: 8px; color: var(--ink); font: 700 clamp(22px, 2.8vw, 28px)/1.25 var(--head); text-wrap: balance; }
.b-verdict p { color: var(--soft); }

.b-content .b-steps { list-style: none; margin: 1.6em 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.b-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; margin: 0 !important; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--card-shadow); }
.b-step__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--orange-soft); border: 1px solid var(--chip-bd); color: var(--orange-2); font: 700 18px var(--head); }
.b-step__title { display: block; margin-top: 9px; color: var(--ink); font-size: 18px; }
.b-step p { margin: 6px 0 0 !important; font-size: 16px !important; color: var(--soft); }

.b-faq { margin-top: 2.4em; }
.b-faq__item { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--card-shadow); }
.b-faq__item summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.b-faq__item summary::-webkit-details-marker { display: none; }
.b-faq__item summary::after { content: "+"; margin-left: auto; color: var(--orange-2); font-size: 24px; line-height: 1; transition: transform .2s; }
.b-faq__item[open] summary::after { transform: rotate(45deg); }
.b-faq__item h3 { margin: 0 !important; font-size: 17px !important; }
.b-faq__a { padding: 0 20px 6px; }
.b-faq__a p { font-size: 16px !important; }

/* ---------- CTA ---------- */
.b-cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
  margin: 2.4em 0; padding: 28px; border-radius: 24px; border: 1px solid var(--accent-bd);
  background: var(--cta-bg); box-shadow: var(--card-shadow);
}
.b-cta__title { margin: 0 0 8px !important; color: var(--ink); font: 700 clamp(22px, 2.6vw, 28px)/1.2 var(--head) !important; }
.b-cta__text p { margin: 0 0 16px !important; color: var(--soft); font-size: 16px !important; }
.b-cta__note { margin: 14px 0 0 !important; color: var(--muted); font-size: 13px !important; line-height: 1.5 !important; }
.b-cta__qr { display: none; width: 190px; text-align: center; }
.b-cta__qr span, .b-modal__qr span { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.b-qr { position: relative; display: inline-block; padding: 10px; border-radius: 18px; background: #fff; line-height: 0; }
[data-theme="light"] .b-qr { border: 1px solid var(--line); }
.b-qr img:first-child { width: 150px; height: 150px; }
.b-qr__logo { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 4px; border-radius: 10px; background: #fff; }
@media (min-width: 1000px) and (pointer: fine) { .b-cta__qr { display: block; } }
.b-main > .b-wrap > .b-cta--final { margin-top: 56px; }

.b-msgs { display: flex; flex-wrap: wrap; gap: 10px; }
.b-msg {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 12px;
  border-radius: 16px; border: 1px solid var(--line-2); background: var(--msg-bg); color: var(--ink);
  font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .2s, background .2s, border-color .2s;
}
.b-msg img { width: 28px; height: 28px; border-radius: 8px; }
.b-msg:hover { color: var(--ink); transform: translateY(-1px); border-color: var(--msg-hover-bd); background: var(--msg-hover-bg); }
.b-msg--whatsapp, .b-msg--whatsapp:hover { color: #fff; }
.b-msg--whatsapp { background: linear-gradient(135deg, #22c35e, #11994a); border-color: transparent; padding-right: 26px; box-shadow: 0 10px 28px rgba(37, 211, 102, 0.22); }
.b-msg--whatsapp:hover { background: linear-gradient(135deg, #27d066, #14a651); border-color: transparent; }
.b-msgs--col { flex-direction: column; }
.b-msgs--col .b-msg { width: 100%; }
@media (max-width: 760px) {
  .b-cta { grid-template-columns: 1fr; padding: 22px 18px; }
  .b-msgs .b-msg { flex: 1 1 auto; justify-content: center; }
  .b-msgs .b-msg--whatsapp { flex-basis: 100%; }
}

.b-author { display: flex; gap: 16px; margin: 2.4em 0 0; padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--card-shadow); }
.b-author img { flex: none; align-self: flex-start; width: 56px; height: 56px; border-radius: 16px; }
.b-author p { margin: 0 !important; font-size: 15px !important; line-height: 1.55 !important; color: var(--muted); }
.b-author .b-author__name { color: var(--ink); font-weight: 600; font-size: 17px !important; }
.b-author .b-author__role { margin-bottom: 8px !important; color: var(--orange-2); font-size: 14px !important; }
.b-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.b-share a, .b-share button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--soft); font-size: 14px; text-decoration: none; cursor: pointer; }
.b-share a:hover, .b-share button:hover { border-color: var(--orange); color: var(--ink); }

.b-related { margin-top: 64px; padding: 56px 0 10px; border-top: 1px solid var(--line); }
.b-related h2 { margin: 0 0 24px; color: var(--ink); font: 700 clamp(26px, 3vw, 34px)/1.2 var(--head); }

@media (max-width: 1000px) {
  .b-post__top { grid-template-columns: 1fr; gap: 24px; }
  .b-layout { grid-template-columns: 1fr; gap: 0; margin-top: 26px; }
  .b-aside { grid-column: 1; grid-row: auto; position: static; margin-bottom: 26px; }
  .b-content { grid-row: auto; max-width: none; }
  .b-aside__cta { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .b-content p, .b-content li { font-size: 17px; line-height: 1.68; }
  .b-cover { margin-inline: -4px; }
  .b-cover img { border-radius: 16px; }
  .b-summary { padding: 18px 18px 6px; }
  .b-step { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px 14px; }
  .b-step__n { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; }
  .b-step__title { margin-top: 5px; font-size: 17px; }
  .b-crumbs span { max-width: 22ch; }
}

/* ---------- progress, sticky bar, modal, toast ---------- */
.b-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 50; height: 3px; pointer-events: none; }
.b-progress span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, #ff5a00, #ffa04d); }
.b-sticky {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 18px; border: 1px solid var(--accent-bd);
  background: var(--sticky-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--float-shadow); transform: translateY(140%); transition: transform .35s;
}
.b-sticky.is-on { transform: none; }
.b-sticky p { margin: 0; min-width: 0; font-size: 13px; line-height: 1.3; color: var(--muted); }
.b-sticky b { display: block; color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-sticky .b-btn { margin-left: auto; min-height: 42px; padding: 0 16px; font-size: 14px; }
@media (min-width: 1001px) { .b-sticky { display: none !important; } }

.b-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.b-modal[hidden] { display: none; }
.b-modal__shade { position: absolute; inset: 0; background: var(--modal-shade); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.b-modal__box {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 30px 28px 26px;
  border-radius: 26px; border: 1px solid var(--accent-bd);
  background: radial-gradient(420px 220px at 100% 0, var(--accent-glow), transparent 70%), var(--modal-bg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: b-pop .3s ease;
}
[data-theme="light"] .b-modal__box { box-shadow: 0 30px 80px rgba(24, 18, 12, 0.25); }
@keyframes b-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.b-modal__x { position: absolute; right: 14px; top: 12px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--modal-x); color: var(--ink); font-size: 24px; cursor: pointer; }
.b-modal__title { margin: 0 40px 8px 0; color: var(--ink); font: 700 26px/1.2 var(--head); }
.b-modal__text { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.b-modal__grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
.b-modal__qr { display: none; text-align: center; }
@media (min-width: 700px) and (pointer: fine) {
  .b-modal__box { width: min(680px, 100%); }
  .b-modal__grid { grid-template-columns: minmax(0, 1fr) 190px; }
  .b-modal__qr { display: block; }
}
.b-toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 70; max-width: calc(100% - 32px); padding: 12px 18px;
  border-radius: 14px; background: var(--toast-bg); color: var(--toast-c); font-size: 14px; font-weight: 500;
  transform: translateX(-50%); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* ---------- theme offer ----------
   the card waits in the corner and now and then shines a torch — inside the spot the page is light;
   when it leaves, it turns into a rocket that flies into the theme button */
@property --b-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.b-reader {
  position: fixed; right: 24px; bottom: 24px; z-index: 45; width: 304px; padding: 14px;
  border-radius: 22px; border: 1px solid var(--line-2); background: var(--sticky-bg); color: var(--soft);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: var(--float-shadow); transform-origin: 100% 100%; will-change: transform;
  transition: box-shadow .8s, transform .7s cubic-bezier(.2, .9, .25, 1.15);
}
.b-reader::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #ff7a00 30%, #ffb066 70%, transparent);
}
/* an iridescent ring while the torch is on */
.b-reader::after {
  content: ""; position: absolute; inset: -1.5px; border-radius: 23px; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--b-a), #ff7a00, #ff4fa3, #8b6bff, #3fd0ff, #ffb066, #ff7a00);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  opacity: 0; transition: opacity .8s;
}
.b-reader.is-lit { transform: scale(1.08); box-shadow: 0 34px 100px rgba(0, 0, 0, 0.55), 0 0 80px rgba(255, 107, 0, 0.26); }
.b-reader.is-lit::after { opacity: 1; animation: b-spin 2.6s linear infinite; }
@keyframes b-spin { to { --b-a: 360deg; } }
.b-reader__head { display: flex; align-items: center; gap: 11px; margin: 0 0 12px; }
.b-reader__ico {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(90deg, #f7f5f1 50%, #121212 50%);
  box-shadow: 0 0 0 1.5px var(--orange), 0 0 0 5px var(--orange-soft);
  transform: rotate(-35deg);
}
.b-reader__t { margin: 0; color: var(--ink); font: 600 15px/1.25 var(--body); }
.b-reader__t small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.b-reader__x {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin: -4px -4px 0 auto; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.b-reader__x:hover { background: var(--card-2); color: var(--ink); }
.b-reader__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.b-reader__opt {
  position: relative; display: grid; gap: 7px; padding: 6px 6px 8px; border-radius: 15px;
  border: 1.5px solid var(--line-2); background: transparent; color: var(--ink);
  font-size: 13.5px; font-weight: 600; text-align: center; cursor: pointer;
  transition: border-color .2s, transform .2s, background .2s;
}
.b-reader__opt:hover { border-color: var(--chip-bd); transform: translateY(-2px); }
.b-reader__opt[aria-pressed="true"] { border-color: var(--orange); background: var(--orange-soft); }
.b-reader__opt[aria-pressed="true"]::after {
  content: ""; position: absolute; right: 5px; top: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.3l3 3 6-6.3' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.45);
}
/* a soft pulse invites to try the other theme */
.b-reader .b-reader__opt.is-hint { animation: b-hint 1.8s ease-out 1.6s 2; }
@keyframes b-hint {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.5); }
  100% { box-shadow: 0 0 0 12px rgba(255, 107, 0, 0); }
}
/* mini page previews */
.b-pv { display: grid; align-content: start; gap: 5px; height: 60px; padding: 10px 9px; border-radius: 10px; text-align: left; overflow: hidden; }
.b-pv i { display: block; height: 4px; border-radius: 3px; }
.b-pv i:first-child { width: 64%; height: 7px; margin-bottom: 3px; background: #ff6b00; }
.b-pv i:nth-child(3) { width: 86%; }
.b-pv i:nth-child(4) { width: 70%; }
.b-pv--light { background: #f7f5f1; box-shadow: inset 0 0 0 1px rgba(24, 18, 12, 0.1); }
.b-pv--light i:not(:first-child) { background: #d6cec3; }
.b-pv--dark { background: #121212; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.b-pv--dark i:not(:first-child) { background: #3a3a3a; }
/* "Готово" fills up while the reader settles on a theme; full — the choice is kept */
.b-reader__ok {
  position: relative; overflow: hidden; display: none; align-items: center; justify-content: center; width: 100%;
  min-height: 42px; margin-top: 10px; border: 0; border-radius: 13px; background: linear-gradient(135deg, #ff7a00, #ff5a00);
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 22px rgba(255, 107, 0, 0.28);
}
.b-reader__ok span { position: relative; }
.b-reader__ok::before { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.24); transform: scaleX(0); transform-origin: 0 50%; }
.b-reader.is-settling .b-reader__ok::before { animation: b-settle 7s linear forwards; }
.b-reader.is-hold .b-reader__ok::before { animation-play-state: paused; }
@keyframes b-settle { to { transform: scaleX(1); } }
.b-reader.is-tried .b-reader__ok { display: flex; animation: b-pop .3s ease; }
@media (max-width: 1000px) {
  .b-reader { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: 400px; margin-inline: auto; transform-origin: 50% 100%; }
  .b-reader.is-lit { transform: scale(1.04); }
  /* a slimmer card at the bottom of a phone screen */
  .b-reader .b-reader__t small { display: none; }
  .b-reader .b-reader__head { margin-bottom: 10px; }
  .b-reader .b-pv { height: 42px; padding: 7px 8px; gap: 4px; }
}

/* the torch: a light copy of the page shows through a moving spot */
.b-dim { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: rgba(0, 0, 0, 0.34); }
.b-beam { position: fixed; inset: 0; z-index: 41; pointer-events: none; mix-blend-mode: screen; }
.b-beam svg { display: block; width: 100%; height: 100%; }
.b-lens {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 42; overflow: hidden; pointer-events: none;
  color: var(--soft); background: radial-gradient(900px 500px at 85% -120px, var(--glow), transparent 70%) local, var(--bg);
  font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased;
  -webkit-mask-image: radial-gradient(circle at -999px -999px, #000 0, transparent 1px);
  mask-image: radial-gradient(circle at -999px -999px, #000 0, transparent 1px);
}
@media (max-width: 620px) { .b-lens { font-size: 16px; } }
.b-torch-ring {
  position: fixed; left: 0; top: 0; z-index: 43; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 34px rgba(255, 236, 210, 0.3), 0 0 0 1px rgba(255, 236, 210, 0.22), 0 0 60px 10px rgba(255, 190, 120, 0.2);
}
.b-torch-label {
  position: fixed; left: 0; top: 0; z-index: 43; padding: 5px 12px; border-radius: 99px; pointer-events: none;
  background: rgba(255, 248, 238, 0.94); color: #15110e; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

/* finale: the card turns into a rocket */
.b-rocket { position: fixed; left: 0; top: 0; z-index: 65; width: 0; height: 0; pointer-events: none; will-change: transform; }
.b-rocket__in { position: absolute; left: -30px; top: -15px; width: 60px; height: 30px; filter: drop-shadow(0 6px 14px rgba(255, 107, 0, 0.5)); }
.b-rocket__in svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.b-rocket__flame {
  position: absolute; left: -14px; top: 9px; width: 22px; height: 12px; border-radius: 50%;
  background: radial-gradient(closest-side at 75% 50%, #fffbe0, #ffc04d 40%, rgba(255, 90, 0, 0.75) 70%, transparent);
  transform-origin: 100% 50%; animation: b-flame .08s ease-in-out infinite alternate; transition: width .3s, left .3s;
}
.b-rocket.is-boost .b-rocket__flame { left: -34px; width: 42px; }
@keyframes b-flame { from { transform: scale(.82, .85); } to { transform: scale(1.2, 1.05); } }
.b-spark { position: fixed; left: 0; top: 0; z-index: 64; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; pointer-events: none; }
.b-boom { position: fixed; left: 0; top: 0; z-index: 66; pointer-events: none; }
.b-boom i { position: absolute; left: 0; top: 0; border-radius: 50%; }
.b-theme.is-landed, .b-burger.is-landed {
  border-color: var(--orange); animation: b-land .75s cubic-bezier(.2, .9, .25, 1.3);
  box-shadow: 0 0 0 4px var(--orange-soft), 0 0 28px rgba(255, 107, 0, 0.55);
}
@keyframes b-land { 0% { transform: scale(.55); } 45% { transform: scale(1.3); } 72% { transform: scale(.93); } 100% { transform: none; } }
.b-tip {
  position: fixed; z-index: 66; padding: 9px 13px; border-radius: 12px; pointer-events: none;
  background: var(--toast-bg); color: var(--toast-c); font-size: 13px; font-weight: 600; white-space: nowrap;
  max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.b-tip::before { content: ""; position: absolute; top: -5px; left: var(--ax, 14px); width: 10px; height: 10px; border-radius: 2px; background: inherit; transform: rotate(45deg); }

/* ---------- footer ---------- */
.b-footer { margin-top: 70px; padding: 48px 0 30px; border-top: 1px solid var(--line); background: var(--footer-bg); font-size: 14px; }
.b-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.b-footer__grid > div { display: flex; flex-direction: column; gap: 9px; }
.b-footer__about img { height: 36px; width: auto; }
.b-footer__about p { margin: 6px 0 0; color: var(--muted); max-width: 34ch; }
.b-footer__h { margin: 0 0 4px; color: var(--ink); font-weight: 600; }
.b-footer a { color: var(--muted); text-decoration: none; }
.b-footer a:hover { color: var(--orange-2); }
.b-footer span { color: var(--muted); }
.b-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .b-footer__grid { grid-template-columns: 1fr 1fr; } .b-footer__about { grid-column: 1 / -1; } }
@media (max-width: 1000px) { .b-footer { padding-bottom: 100px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
