/* Guides: the same light, colorful look as the main site (redesign, November 2026).
   A soft color wash at the top, a floating glass header, Bricolage Grotesque headings, Plus Jakarta Sans text,
   purple pill buttons and pastel cards. */
:root {
  color-scheme: light;
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f6f4fa; --line: #ebe7f1; --line-strong: #d6cfe2;
  --ink: #16121c; --muted: #5a5466; --faint: #857f91;
  --purple: #84299e; --purple-hi: #9636b2; --purple-text: #7a2393; --purple-soft: #f4e9f9;
  --hero-1: #eadcff; --hero-2: #ffe2d4; --hero-3: #d7f4e8; --hero-4: #dbe8ff;
  --t-rose: #ffe3ec; --t-sky: #dcefff; --t-lemon: #fff5c4; --t-mint: #d8f5ea; --t-violet: #ece4ff; --t-peach: #ffe6d6;
  --glass: rgba(255, 255, 255, .82); --glass-line: rgba(22, 18, 28, .08);
  --shadow-soft: 0 1px 2px rgba(22, 18, 28, .05), 0 4px 14px rgba(22, 18, 28, .06);
  --shadow-float: 0 2px 6px rgba(22, 18, 28, .06), 0 30px 70px rgba(22, 18, 28, .18);
  --f-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 17px/1.7 var(--f-body);
  background:
    radial-gradient(70% 480px at 0% 0%, var(--hero-1), transparent 72%),
    radial-gradient(55% 420px at 100% 0%, var(--hero-4), transparent 72%),
    radial-gradient(45% 340px at 72% 280px, var(--hero-2), transparent 72%),
    radial-gradient(40% 300px at 18% 380px, var(--hero-3), transparent 72%),
    var(--bg);
}
::selection { background: var(--purple-soft); }
a { color: var(--purple-text); }
a:hover { color: var(--purple); }
:focus-visible { outline: 3px solid var(--purple-text); outline-offset: 3px; border-radius: 10px; }
.wrap { max-width: 780px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }

/* Floating glass header */
.top { position: sticky; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 5; padding: 0 max(16px, env(safe-area-inset-left, 0px)); margin-top: 10px; }
.top .wrap { max-width: 1100px; display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 8px 0 16px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: inset 0 0 0 1px var(--glass-line), var(--shadow-soft); }
.logo { display: flex; align-items: center; color: var(--ink); text-decoration: none; font: 800 23px/1 var(--f-display); letter-spacing: -.02em; }
.wm { display: inline-flex; align-items: center; gap: .32em; white-space: nowrap; }
.wm-icon { width: 1.2em; height: 1.2em; flex: none; }
.top .back { margin-left: auto; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.top .back:hover { background: var(--purple-soft); color: var(--purple-text); }
/* ☰ menu, the same links as the main site's side menu (no script: a details element) */
.menu > summary { list-style: none; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-content: center; gap: 4px; cursor: pointer; position: relative; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu[open] > summary span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu[open] > summary span:nth-child(2) { opacity: 0; }
.menu[open] > summary span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu[open] > summary::before { content: ""; position: fixed; inset: 0; background: rgba(22, 18, 28, .35); z-index: -1; cursor: default; }   /* tap outside to close */
.menu .side { position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 86vw); background: var(--surface); padding: calc(24px + env(safe-area-inset-top, 0px)) 14px 24px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-float); overflow-y: auto; }
.menu .side-head { margin: 0 10px 10px; font: 800 22px/1.2 var(--f-display); }
.menu .side-label { margin: 16px 10px 4px; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--purple-text); }
.menu .side a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.menu .side a:hover, .menu .side a:focus-visible { background: var(--surface-2); }
.menu .side svg { width: 20px; height: 20px; flex: none; box-sizing: content-box; padding: 7px; border-radius: 11px; color: var(--purple-text); background: var(--purple-soft); }
.menu .side a:nth-of-type(6n+2) svg { background: var(--t-sky); } .menu .side a:nth-of-type(6n+3) svg { background: var(--t-lemon); }
.menu .side a:nth-of-type(6n+4) svg { background: var(--t-mint); } .menu .side a:nth-of-type(6n+5) svg { background: var(--t-rose); } .menu .side a:nth-of-type(6n+6) svg { background: var(--t-peach); }
@media (prefers-reduced-motion: no-preference) { .menu[open] .side { animation: side-in .22s ease-out; } }
@keyframes side-in { from { transform: translateX(100%); } }
@media (max-width: 520px) { .top .back { display: none; } .menu { margin-left: auto; } }

/* Article */
main.wrap { padding-top: 44px; padding-bottom: 56px; }
.crumbs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 500 12px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--purple-text); margin-bottom: 14px; }
.crumbs::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #e5487f, #84299e); }
.crumbs a { color: var(--purple-text); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(36px, 7vw, 60px); line-height: 1.02; letter-spacing: -.04em; margin: 4px 0 14px; font-variation-settings: "opsz" 96; }
h2 { font-size: clamp(24px, 3.4vw, 30px); line-height: 1.15; letter-spacing: -.025em; margin: 44px 0 10px; }
h3 { font-size: 20px; letter-spacing: -.015em; margin: 28px 0 6px; }
.meta { color: var(--faint); font-size: 14px; margin: 0 0 28px; }
.lead { font-size: 20px; color: var(--muted); }
article p, article li { color: #3b3446; }
article ul, article ol { padding-left: 22px; }
article li { margin: 6px 0; }
article li::marker { color: var(--purple); }
.tldr { background: var(--t-violet); border-radius: 24px; padding: 18px 22px; margin: 0 0 30px; }
.tldr p { margin: 0; color: var(--ink); }
.tip { background: var(--t-mint); border-radius: 20px; padding: 14px 18px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--purple-text); font: 500 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; background: var(--surface-2); }

/* Call to action and buttons */
.cta { margin: 52px 0 0; border-radius: 28px; padding: 26px; color: #fff;
  background: radial-gradient(80% 120% at 100% 0%, #6d1f86, transparent 60%), #2a0d39; }
.cta h2 { margin-top: 0; color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.btn:hover { color: var(--purple-text); }
.btn-green { background: var(--purple); color: #fff; box-shadow: 0 10px 22px -12px rgba(132, 41, 158, .8), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-green:hover { background: var(--purple-hi); color: #fff; }
.cta .btn-green { background: #fff; color: #2a0d39; }
.cta .btn-green:hover { background: #f4e9f9; color: #2a0d39; }
.cta .btn:not(.btn-green) { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }

/* Related guides and the guide index: pastel cards that cycle through the category colors */
.more ul, .cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.more li, .cards a { border-radius: 24px; padding: 18px 20px; display: grid; gap: 4px; }
.cards a { text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.more li:nth-child(6n+1), .cards li:nth-child(6n+1) a { background: var(--t-rose); }
.more li:nth-child(6n+2), .cards li:nth-child(6n+2) a { background: var(--t-sky); }
.more li:nth-child(6n+3), .cards li:nth-child(6n+3) a { background: var(--t-lemon); }
.more li:nth-child(6n+4), .cards li:nth-child(6n+4) a { background: var(--t-mint); }
.more li:nth-child(6n+5), .cards li:nth-child(6n+5) a { background: var(--t-violet); }
.more li:nth-child(6n+6), .cards li:nth-child(6n+6) a { background: var(--t-peach); }
.more li span { color: #4f4860; font-size: 15px; }
.cards h2 { margin: 0 0 6px; font-size: 22px; color: var(--ink); }
.cards p { margin: 0 0 8px; color: #4f4860; }

/* Footer: the same color wash as the main site */
footer { margin-top: 24px; color: var(--muted); font-size: 14px; padding: 28px 0 calc(32px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(120deg, var(--hero-1), var(--hero-4) 45%, var(--hero-2) 80%, var(--hero-3)); }
footer p { margin: 6px 0; }
footer a { color: var(--ink); font-weight: 700; }

/* Floating 3D things around the top of the page (the same vibe as the home page).
   Wide screens: in the side margins beside the text column. Phones: a row above the title. */
.page-art { position: absolute; left: 0; right: 0; top: 0; height: 640px; pointer-events: none; z-index: 0; overflow: hidden; }
.page-art img { position: absolute; left: var(--x); top: var(--y); width: clamp(70px, 7vw, 104px); height: auto; filter: drop-shadow(0 14px 18px rgba(22, 18, 28, .16)); transform: translateX(-50%) rotate(var(--r)); }
@media (prefers-reduced-motion: no-preference) {
  .page-art img { animation: art-bob 6s ease-in-out infinite; animation-delay: var(--d); }
  @keyframes art-bob { 0%, 100% { transform: translateX(-50%) translateY(0) rotate(var(--r)); } 50% { transform: translateX(-50%) translateY(-10px) rotate(calc(var(--r) * -1)); } }
}
main.wrap, footer { position: relative; z-index: 1; }
@media (max-width: 1100px) {
  .page-art { position: relative; height: 78px; max-width: 780px; margin: 22px auto -26px; }
  .page-art img { left: var(--sx); top: 8px; width: 58px; }
  .page-art img.wide-only { display: none; }
}

/* Privacy and Terms: the policy on a white card */
.policy > div:first-child { background: #fff; border-radius: 28px; padding: 28px clamp(18px, 4vw, 36px) 20px; box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); }
.policy .eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--purple-text); margin: 0 0 10px; }
.policy .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #e5487f, #84299e); }
.policy h2:first-of-type { font-size: clamp(36px, 7vw, 56px); line-height: 1.02; letter-spacing: -.04em; margin: 0 0 18px; }
.policy p, .policy li { color: #3b3446; }
.policy-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }

/* Page not found and the digest page: Ru on a white card */
.nf { background: #fff; border-radius: 32px; padding: 34px clamp(20px, 5vw, 44px) 30px; box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); text-align: center; display: flex; flex-direction: column; align-items: center; }
.nf-ru { width: 150px; height: auto; margin-bottom: 6px; filter: drop-shadow(0 16px 20px rgba(60, 20, 80, .22)); }
.nf h1 { margin-top: 0; }
.nf .lead { max-width: 30em; }
.nf .cta-row { justify-content: center; margin-top: 18px; }
