/* razkazite.com — the public site (from design mockup v1, 21.10.2026). Direction "night magazine".
   Tokens first; every text/background pair below is meant to pass WCAG AA (checked in design/CHECKS.md).
   Themes (increment B): /t/themes.css sets the same tokens under :root[data-theme="<slug>"]; the values here are
   the fallback (the theme "Нощно списание"). Every colour below the token block comes from a token. */
@import url("fonts/faces.css");

:root {
  color-scheme: dark;
  --bg: #120E16;            /* page */
  --bg-2: #17121C;          /* bands */
  --surface: #1D1623;       /* cards */
  --surface-2: #261D2D;     /* raised, inputs */
  --border: #382B40;
  --border-2: #4A3A54;      /* decorative card edges */
  --field-border: #7E6C8A;  /* input edges, >= 3:1 on the page and on cards */
  --text: #F1E8DF;          /* cream, 15.6:1 on --bg */
  --text-2: #D6C8C0;        /* body on cards */
  --muted: #B3A2AE;         /* 7.4:1 on --bg, 6.6:1 on --surface */
  --accent: #EC6F8E;        /* rose: the one primary action; dark text on it */
  --accent-ink: #1A0E14;    /* 6.9:1 on --accent */
  --accent-hover: #F48BA5;
  --accent-text: #F2899F;   /* rose as text on dark, 6.4:1 on --bg */
  --accent-soft: #3A1A28;
  --gold: #DDB077;          /* members / premium marks, 9.0:1 on --bg */
  --gold-soft: #33261A;
  --focus: #F7C9D4;
  --danger: #FF8A80;
  --ok: #7FD8A6;
  /* decorative (no text on them): covers, glows, the gate's veil, shadows, the video frame */
  --cover-bg: #2A1730;
  --cover-ink: rgba(18,14,22,.72);   /* the silhouette on a cover */
  --tint-l: 22%;                     /* the lightness of a category card's tint */
  --glow-rose: #4A1F38;
  --glow-rose-2: #3D1A2E;
  --glow-gold: #3B2A16;
  --overlay: rgba(10,7,12,.86);      /* behind the 18+ gate */
  --shadow-color: #000;
  --media-bg: #0B080D;
  --on-media: #F1E8DF;               /* text on a video or a photo: the same in every theme */

  --font-display: "Cormorant Garamond", "Lora", Georgia, serif;
  --font-read: "Lora", Georgia, "Times New Roman", serif;
  --font-ui: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px; --radius-sm: 10px; --radius-pill: 999px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 40px -28px rgba(0,0,0,.9);
  --ease: cubic-bezier(.22,1,.36,1);
  --wrap: 1200px; --gutter: 16px;
  --read-size: 20px; --read-measure: 66ch;
}
@media (min-width: 720px) { :root { --gutter: 28px; } }

/* reading themes (story page) */

*, *::before, *::after { box-sizing: border-box; font-feature-settings: "locl" 0; } /* standard Cyrillic forms everywhere ("locl" 1 = the Bulgarian forms) */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "locl" 0; /* standard Cyrillic forms; set "locl" 1 for the Bulgarian forms */ overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .2em; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: var(--radius-pill); border: 1px solid var(--border-2); background: transparent; color: var(--text);
  font: 600 15px/1 var(--font-ui); text-decoration: none; cursor: pointer; transition: background .2s var(--ease), border-color .2s, transform .2s var(--ease); }
.btn:hover { border-color: var(--text-2); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { border-color: transparent; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- chips and marks ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-2); font: 600 12px/1.4 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.chip-gold { background: var(--gold-soft); color: var(--gold); }
.chip-rose { background: var(--accent-soft); color: var(--accent-text); }
.lock { width: 13px; height: 13px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 14px; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { display: grid; line-height: 1; min-width: 0; }
.brand-name b { font: 600 italic 23px/1 var(--font-display); letter-spacing: .005em; white-space: nowrap; }
.brand-name small { margin-top: 3px; font: 600 10.5px/1.2 var(--font-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.nav { display: none; gap: 4px; margin-left: 18px; }
.nav a { padding: 8px 12px; border-radius: var(--radius-pill); color: var(--text-2); font-weight: 500; font-size: 15px; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.head-login { display: none; }
@media (min-width: 980px) { .nav { display: flex; } .head-login { display: inline-flex; } .menu-btn { display: none; } }
@media (max-width: 520px) { .brand-name small { display: none; } .brand-name b { font-size: 21px; } .head-join { display: none; } }

/* ---------- hero (featured story) ---------- */
.hero { padding: 36px 0 56px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 64px 0 88px; } .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.kicker { font: 600 12px/1.4 var(--font-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.hero h1 { margin: 14px 0 18px; font: 600 clamp(40px, 6.4vw, 76px)/1.02 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.hero h1 em { font-style: italic; color: var(--accent-text); }
.hero .lead { margin: 0 0 22px; max-width: 54ch; font: 400 19px/1.65 var(--font-read); color: var(--text-2); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- abstract covers (no photos in the mockup: safe, and every story gets its own) ---------- */
.cover { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--cover-bg);
  isolation: isolate; box-shadow: var(--shadow); }
.cover::before, .cover::after { content: ""; position: absolute; border-radius: 50%; filter: blur(28px); z-index: -1; }
.cover::before { width: 75%; height: 85%; left: -12%; top: 18%; background: radial-gradient(circle at 40% 40%, hsl(var(--h, 340) 70% 58% / .95), transparent 65%); }
.cover::after { width: 70%; height: 70%; right: -14%; top: -12%; background: radial-gradient(circle, hsl(calc(var(--h, 340) + 40) 65% 52% / .8), transparent 66%); }
.cover .grain { position: absolute; inset: 0; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.cover .silhouette { position: absolute; inset: auto 0 0 0; height: 78%; color: var(--cover-ink); }
.cover .silhouette svg { width: 100%; height: 100%; }
.cover-tall { aspect-ratio: 4 / 5; }
.cover-wide { aspect-ratio: 16 / 9; }
.cover .badge { position: absolute; left: 14px; top: 14px; }
.cover.is-locked .silhouette, .cover.is-locked::before { filter: blur(30px) saturate(.9); }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font: 600 clamp(30px, 4vw, 42px)/1.1 var(--font-display); }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.link-more { color: var(--text-2); font-weight: 600; font-size: 15px; white-space: nowrap; }

/* categories */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cat { position: relative; display: grid; align-content: end; gap: 4px; min-height: 132px; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(160deg, hsl(var(--h) 40% var(--tint-l)), var(--surface) 70%); border: 1px solid var(--border);
  text-decoration: none; overflow: hidden; transition: transform .25s var(--ease), border-color .25s; }
.cat:hover { transform: translateY(-3px); border-color: var(--border-2); color: var(--text); }
.cat b { font: 600 22px/1.1 var(--font-display); }
.cat span { color: var(--muted); font-size: 13px; }
.cat .chip { position: absolute; top: 12px; right: 12px; }

/* story cards */
.grid { display: grid; gap: 28px 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: grid; gap: 14px; text-decoration: none; color: var(--text); }
.card:hover { color: var(--text); }
.card:hover .cover { transform: translateY(-3px); }
.card .cover { transition: transform .35s var(--ease); }
.card h3 { margin: 0; font: 600 26px/1.15 var(--font-display); text-wrap: balance; }
.card:hover h3 { color: var(--accent-text); }
.card p { margin: 0; color: var(--text-2); font: 400 16px/1.6 var(--font-read);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* two-column: newest + most read */
.split { display: grid; gap: 48px; }
@media (min-width: 1060px) { .split { grid-template-columns: minmax(0, 1fr) 340px; } }
.toplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: top; }
.toplist li a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 12px; border-radius: var(--radius-sm); text-decoration: none; }
.toplist li a:hover { background: var(--surface); color: var(--text); }
.toplist li a::before { counter-increment: top; content: counter(top, decimal-leading-zero); font: 600 italic 30px/1 var(--font-display); color: var(--gold); }
.toplist b { display: block; font: 600 20px/1.2 var(--font-display); }
.toplist .meta { margin-top: 4px; font-size: 13px; }
.aside-box { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.aside-box h2 { margin: 0 0 8px; font: 600 28px/1.1 var(--font-display); }

/* members band */
.members { position: relative; overflow: hidden; border-radius: 24px; padding: 40px 24px; border: 1px solid var(--border-2);
  background: radial-gradient(120% 140% at 100% 0%, var(--glow-rose) 0%, transparent 55%), radial-gradient(90% 120% at 0% 100%, var(--glow-gold) 0%, transparent 55%), var(--surface); }
@media (min-width: 900px) { .members { padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; } }
.members h2 { margin: 12px 0 14px; font: 600 clamp(34px, 4.6vw, 52px)/1.05 var(--font-display); text-wrap: balance; }
.members p { margin: 0; color: var(--text-2); font: 400 18px/1.6 var(--font-read); max-width: 46ch; }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.ticks svg { color: var(--gold); margin-top: 3px; }
.price-card { margin-top: 28px; padding: 28px; border-radius: 20px; background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid var(--border-2); text-align: center; }
@media (min-width: 900px) { .price-card { margin-top: 0; } }
.price { font: 600 72px/1 var(--font-display); letter-spacing: -.02em; }
.price small { font: 500 18px/1 var(--font-ui); color: var(--muted); letter-spacing: 0; }
.price-note { margin: 8px 0 22px; color: var(--gold); font-weight: 600; }
.fine { margin-top: 14px; color: var(--muted); font-size: 13px; }

/* submit band */
.submit-band { display: grid; gap: 20px; padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (min-width: 900px) { .submit-band { grid-template-columns: 1fr auto; align-items: center; } }
.submit-band h2 { margin: 0 0 6px; font: 600 italic clamp(32px, 4vw, 46px)/1.1 var(--font-display); }
.submit-band p { margin: 0; color: var(--text-2); max-width: 60ch; }

/* footer */
.site-foot { padding: 48px 0 40px; color: var(--muted); font-size: 14px; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-foot h3 { margin: 0 0 10px; color: var(--text); font: 600 13px/1.4 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.adult-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--accent-text); color: var(--accent-text); font: 700 13px/1 var(--font-ui); }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* ---------- age gate ---------- */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(80% 60% at 50% 30%, color-mix(in srgb, var(--glow-rose) 55%, transparent), transparent), var(--overlay);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.gate[hidden] { display: none; }
.gate-card { width: min(480px, 100%); padding: 34px 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border-2);
  text-align: center; box-shadow: 0 40px 80px -30px var(--shadow-color); }
.gate-card .brand-mark { width: 56px; height: 56px; margin: 0 auto 18px; }
.gate-card h2 { margin: 0 0 10px; font: 600 34px/1.1 var(--font-display); }
.gate-card p { margin: 0 0 24px; color: var(--text-2); }
.gate-actions { display: grid; gap: 10px; }

/* ---------- story page ---------- */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 40; background: linear-gradient(90deg, var(--gold), var(--accent)); }
.story-head { padding: 40px 0 28px; text-align: center; }
.story-head .wrap { max-width: 860px; }
.crumbs { display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: 14px; }
.story-head h1 { margin: 18px 0 16px; font: 600 clamp(40px, 6vw, 68px)/1.04 var(--font-display); text-wrap: balance; }
.story-head .dek { margin: 0 auto 20px; max-width: 46ch; font: 400 italic 21px/1.5 var(--font-read); color: var(--text-2); }
.story-head .meta { justify-content: center; }
.author { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font: 700 14px/1 var(--font-ui); }
.story-cover { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.read-tools { position: sticky; top: 72px; z-index: 20; display: flex; justify-content: center; padding: 14px 0; }
.read-tools .bar { display: inline-flex; align-items: center; gap: 4px; padding: 5px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.read-tools button { min-width: 40px; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-2); font: 600 14px/1 var(--font-ui); cursor: pointer; }
.read-tools button:hover { background: var(--surface-2); color: var(--text); }
.read-tools button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.read-tools .sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.swatch { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid var(--border-2); vertical-align: middle; }

.reader { color: var(--text); }
.prose { max-width: var(--read-measure); margin: 0 auto; padding: 24px var(--gutter) 8px; font: 400 var(--read-size)/1.75 var(--font-read); }
.prose p { margin: 0 0 1.15em; }
.prose > p.lead-p::first-letter { float: left; font: 600 4.1em/.82 var(--font-display); margin: .06em .1em 0 0; color: var(--accent-text); }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 3px solid var(--gold); font: 400 italic 1.15em/1.55 var(--font-read); color: var(--text-2); }
.prose figure { margin: 1.8em 0; }
.prose figcaption { margin-top: 10px; color: var(--muted); font: 400 14px/1.5 var(--font-ui); text-align: center; }

/* paywall */
.paywall { position: relative; }
.paywall .prose { padding-top: 0; }
.paywall .faded { position: relative; max-height: 9.5em; overflow: hidden; }
.paywall .faded::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, var(--bg) 92%); }
.pay-card { position: relative; max-width: 620px; margin: 0 auto 24px; padding: 30px 26px; border-radius: 22px; text-align: center;
  border: 1px solid var(--border-2); background: radial-gradient(100% 120% at 50% 0%, var(--glow-rose-2) 0%, transparent 60%), var(--surface); }
.pay-card h2 { margin: 12px 0 8px; font: 600 34px/1.1 var(--font-display); }
.pay-card p { margin: 0 auto 20px; max-width: 44ch; color: var(--text-2); }
.pay-card .price { font-size: 56px; }
.pay-actions { display: grid; gap: 10px; max-width: 360px; margin: 18px auto 0; }
.member-only[hidden], .guest-only[hidden] { display: none; }

/* video block (streamed from the separate video server) */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--media-bg); border: 1px solid var(--border); }
.video .cover { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.video .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--on-media) 92%, transparent); color: #120E16; cursor: pointer; box-shadow: 0 14px 40px -10px var(--shadow-color); }
.video .vlabel { position: absolute; left: 14px; bottom: 12px; right: 14px; display: flex; justify-content: space-between; color: var(--on-media); font-size: 13px; font-weight: 600; text-shadow: 0 1px 8px #000; }

/* reactions + share */
.reactions { max-width: var(--read-measure); margin: 8px auto 0; padding: 22px var(--gutter); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; border-top: 1px solid var(--border); }
.reactions .group { display: flex; gap: 8px; flex-wrap: wrap; }
/* D71: an old ad's last line; D70: the notice link under a story */
.prose .ad-expired { margin: 1.6em 0 0; padding: 12px 16px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); font: 600 15px/1.5 var(--font-ui); }
.report-line { max-width: var(--read-measure); margin: 4px auto 0; padding: 0 var(--gutter); font: 13px/1.5 var(--font-ui); }
.report-line a { color: var(--muted); }
.form-card { max-width: 640px; }
.form-card select { width: 100%; }

/* comments */
.comments { max-width: 760px; margin: 0 auto; padding: 48px var(--gutter); }
.comments h2 { margin: 0 0 6px; font: 600 36px/1.1 var(--font-display); }
.comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 20px 0; border-top: 1px solid var(--border); }
.comment .who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.comment .who b { font-weight: 700; }
.comment .who time { color: var(--muted); font-size: 13px; }
.comment p { margin: 6px 0 0; color: var(--text-2); }
.comment .reply { margin-top: 8px; display: flex; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 600; }
.comment .reply a { text-decoration: none; }
.comment.is-reply { margin-left: 54px; }
.badge-author { padding: 2px 8px; border-radius: var(--radius-pill); background: var(--gold-soft); color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.comment-lock { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 18px 0 8px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--border-2); color: var(--text-2); }
.comment-form { margin: 18px 0 8px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
textarea, input[type="text"], input[type="email"], input[type="search"], input[type="url"], select { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--field-border);
  background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font-ui); }
textarea { min-height: 110px; resize: vertical; }
textarea::placeholder, input::placeholder { color: var(--muted); }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* membership page */
.page-hero { padding: 56px 0 24px; text-align: center; }
.page-hero h1 { margin: 14px auto 14px; max-width: 18ch; font: 600 clamp(42px, 6vw, 72px)/1.04 var(--font-display); text-wrap: balance; }
.page-hero p { margin: 0 auto; max-width: 56ch; color: var(--text-2); font: 400 19px/1.6 var(--font-read); }
.plan-wrap { display: grid; gap: 24px; max-width: 980px; margin: 40px auto 0; }
@media (min-width: 900px) { .plan-wrap { grid-template-columns: 1fr 1fr; } }
.plan { padding: 32px 28px; border-radius: 24px; border: 1px solid var(--border-2); background: radial-gradient(100% 90% at 100% 0%, var(--glow-rose-2), transparent 60%), var(--surface); }
.plan h2 { margin: 0; font: 600 30px/1.1 var(--font-display); }
.compare { padding: 28px; border-radius: 24px; border: 1px solid var(--border); background: var(--bg-2); }
.compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 12px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; width: 88px; }
.compare thead th { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.yes { color: var(--ok); } .no { color: var(--muted); }
.steps { display: grid; gap: 16px; counter-reset: st; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font: 600 italic 22px/1 var(--font-display); }
.step h3 { margin: 0 0 6px; font: 600 22px/1.2 var(--font-display); }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--border); padding: 18px 4px; }
.faq summary { cursor: pointer; font: 600 22px/1.3 var(--font-display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--gold); font: 500 26px/1 var(--font-ui); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--text-2); }

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

/* ---------- added for the live site (the CSP allows no inline style) ---------- */
.hue-0 { --h: 0; } .hue-1 { --h: 10; } .hue-2 { --h: 20; } .hue-3 { --h: 30; } .hue-4 { --h: 40; } .hue-5 { --h: 50; } .hue-6 { --h: 60; } .hue-7 { --h: 70; } .hue-8 { --h: 80; } .hue-9 { --h: 90; } .hue-10 { --h: 100; } .hue-11 { --h: 110; } .hue-12 { --h: 120; } .hue-13 { --h: 130; } .hue-14 { --h: 140; } .hue-15 { --h: 150; } .hue-16 { --h: 160; } .hue-17 { --h: 170; } .hue-18 { --h: 180; } .hue-19 { --h: 190; } .hue-20 { --h: 200; } .hue-21 { --h: 210; } .hue-22 { --h: 220; } .hue-23 { --h: 230; } .hue-24 { --h: 240; } .hue-25 { --h: 250; } .hue-26 { --h: 260; } .hue-27 { --h: 270; } .hue-28 { --h: 280; } .hue-29 { --h: 290; } .hue-30 { --h: 300; } .hue-31 { --h: 310; } .hue-32 { --h: 320; } .hue-33 { --h: 330; } .hue-34 { --h: 340; } .hue-35 { --h: 350; } 
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.section-tight-top { padding-top: 0; }
.hero-cover { display: block; }
.hero-cover .cover { height: 100%; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gold { color: var(--gold); }
.lock.gold { display: inline; vertical-align: -1px; }
.icon-lg { width: 30px; height: 30px; }
.center { text-align: center; }
.actions-center { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.page-hero-left { text-align: left; padding-bottom: 8px; }
.page-hero-left h1 { margin-left: 0; max-width: 22ch; }
.page-hero-left p { margin-left: 0; }
.foot-about { margin: 16px 0 0; max-width: 40ch; }
.foot-adult { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.plan-price { margin: 22px 0 4px; }
.plan-cta { margin-top: 26px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.filters input[type="search"] { flex: 1 1 260px; min-width: 0; }
.filters select { flex: 0 1 200px; min-width: 0; }
.result-line { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.empty { padding: 40px 0; color: var(--text-2); text-align: center; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 40px; }
.pager a { min-width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: var(--radius-pill); border: 1px solid var(--border-2); text-decoration: none; font-weight: 600; }
.pager a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tags-line { max-width: var(--read-measure); margin: 0 auto; padding: 8px var(--gutter) 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags-line .chip { text-transform: none; letter-spacing: 0; font-size: 13px; }
.prose h2 { margin: 1.6em 0 .6em; font: 600 1.5em/1.2 var(--font-display); }
.prose-page { padding-top: 0; }
.prose-page h2, .prose-page h3 { font: 600 1.4em/1.2 var(--font-display); margin: 1.4em 0 .5em; }
.prose-page ul { padding-left: 1.2em; }
.gallery { list-style: none; margin: 1.6em 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.paywall { position: relative; margin-top: -4.5em; padding-top: 5em; background: linear-gradient(180deg, transparent, var(--bg) 4.5em); }
.comments .meta { margin: 0; }
.comments .more { text-align: center; margin-top: 20px; }
.comment .avatar, .comment-lock .lock { flex: none; }
.nav.is-open { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; padding: 12px 16px 18px; margin: 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.video .play[disabled] { cursor: default; opacity: .9; }
.prose figure img { margin: 0 auto; height: auto; border-radius: var(--radius-sm); }   /* the width and height attributes reserve the space; height: auto keeps the proportions when max-width narrows it */
.prose hr.scene-break { border: 0; margin: 2em auto; text-align: center; color: var(--gold); }
.prose hr.scene-break::after { content: "✦  ✦  ✦"; letter-spacing: .4em; font-size: .8em; }

/* ---------- moving between pages (Turbo, app.js) ---------- */
/* Turbo's loading bar shows when a page takes longer than 200 ms; its own <style> sets the shape, this the colour. */
.turbo-progress-bar { height: 3px; background: var(--accent); }
/* the new page fades in over the old one where the browser supports view transitions */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- the theme switch (increment B; RzTheme, rz_theme_picker) ---------- */
.theme-pick { position: relative; }
.theme-pick > summary { list-style: none; cursor: pointer; }
.theme-pick > summary::-webkit-details-marker { display: none; }
.theme-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: 232px; padding: 8px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-2); box-shadow: 0 24px 48px -24px var(--shadow-color); }
.theme-menu-h { margin: 6px 10px 8px; color: var(--muted); font: 700 12px/1.4 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
.theme-form-menu { display: grid; gap: 2px; }
.theme-form-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0;
  border-radius: var(--radius-sm); background: transparent; color: var(--text); font: 500 15px/1.2 var(--font-ui); text-align: left; cursor: pointer; }
.theme-form-menu button:hover { background: var(--surface-2); }
.theme-form-menu button[aria-pressed="true"] { background: var(--surface-2); font-weight: 700; }
.theme-form-menu button[aria-pressed="true"]::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--accent); }
.theme-form-menu .swatch { width: 24px; height: 24px; }
.theme-inline, .theme-inline .theme-form { display: inline-flex; align-items: center; gap: 4px; }
.read-tools .theme-inline button[aria-pressed="true"] .swatch { outline: 2px solid var(--accent); outline-offset: 2px; }
/* a theme change cross-fades the whole page (view transition), off under reduced motion like the page moves */

/* ---------- the reader app (increment D): saved stories, resume, continue, install ---------- */
.saved-link { position: relative; }
.saved-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink); font: 700 11px/18px var(--font-ui); text-align: center; }
.read-tools .save-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
.read-tools .save-btn .icon { width: 17px; height: 17px; }
.read-tools .save-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.resume { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 2px; margin: 20px auto 0; padding: 4px;
  border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border-2); }
.resume button { min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text);
  font: 600 14px/1.2 var(--font-ui); cursor: pointer; }
.resume .resume-go { background: var(--accent); color: var(--accent-ink); }
.resume .resume-x { min-width: 40px; padding: 0; font-size: 20px; color: var(--muted); }
.continue-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.continue-card { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; transition: border-color .2s; }
.continue-card:hover { border-color: var(--border-2); color: var(--text); }
.continue-card b { font: 600 20px/1.2 var(--font-display); }
.continue-card small { color: var(--muted); font-size: 13px; }
.read-bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.read-bar i { display: block; height: 100%; background: var(--accent); }
.card .read-bar { margin-top: 10px; }
.saved-item { position: relative; display: grid; }
.saved-item.is-missing .card { opacity: .72; }
.saved-remove { justify-self: start; margin-top: 6px; }
.saved-empty { color: var(--muted); }
.install-card { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; margin-top: 40px; padding: 24px;
  border-radius: 20px; border: 1px solid var(--border-2); background: radial-gradient(100% 120% at 100% 0%, var(--glow-rose-2) 0%, transparent 60%), var(--surface); }
.install-card h2 { margin: 0 0 6px; font: 600 28px/1.1 var(--font-display); }
.install-card p { margin: 0; max-width: 52ch; color: var(--text-2); }
.save-btn[hidden], .saved-n[hidden], .resume[hidden], .continue[hidden], .install-card[hidden], .install-card [hidden], .saved-empty[hidden] { display: none; }

/* ---------- instant actions (increment E): the like, share, the search as you type ---------- */
.reactions .btn .icon { width: 18px; height: 18px; }
.like-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.like-btn .icon { fill: none; }                       /* the heart's path has no fill of its own: the button sets it */
.like-btn[aria-pressed="true"] .icon { fill: currentColor; }
.reactions [hidden] { display: none; }
turbo-frame { display: block; }
turbo-frame[busy] .grid, turbo-frame[busy] .empty { opacity: .55; transition: opacity .15s; }

/* the reader's account (increment 6): sign-in, registration, profile; colours only from the theme contract */
.auth-card { max-width: 460px; margin: 8px auto 0; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.auth-card > p { color: var(--text-2); }
.auth-big { margin: 0 0 4px; color: var(--ok); }
.auth-big .icon { width: 40px; height: 40px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font: 600 14px/1.4 var(--font-ui); color: var(--text); }
.field-error { margin: -6px 0 0; color: var(--accent-text); font: 600 14px/1.4 var(--font-ui); }
input[type="password"] { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--field-border); background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font-ui); }
input[type="password"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
[aria-invalid="true"] { border-color: var(--accent-text); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); border-left: 3px solid var(--border-2); font-size: 15px; }
.notice-ok { border-left-color: var(--ok); }
.notice-ok .icon { color: var(--ok); flex: none; }
.notice-bad { border-left-color: var(--accent); }
.muted { color: var(--text-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.account-wrap { display: grid; gap: 18px; max-width: 760px; }
.account-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.account-card h2 { margin: 0 0 10px; font: 600 24px/1.2 var(--font-display); }
.account-card .form-stack { max-width: 420px; }
.member-state { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--text); }
.member-on .icon { color: var(--ok); }
.pay-box { margin-top: 16px; padding: 18px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.pay-box h3 { margin: 0 0 10px; font: 600 18px/1.3 var(--font-ui); }
.pay-data { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 16px; }
.pay-data dt { color: var(--muted); }
.pay-data dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.pay-code { color: var(--gold); font-size: 17px; }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.danger-zone summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
.btn-danger { border-color: var(--accent-text); color: var(--accent-text); }
.link-btn { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.comment-pending { opacity: .85; }
.comment-pending .who .chip { margin-left: 8px; }
.head-me { display: inline-flex; align-items: center; gap: 6px; }
.head-me .icon { width: 18px; height: 18px; }
@media (min-width: 980px) { .nav .nav-small { display: none; } }
.compare td.some { color: var(--text-2); font-size: 13px; line-height: 1.3; }
@media (min-width: 600px) { .compare th:not(:first-child), .compare td:not(:first-child) { width: 120px; } }

/* the cookie notice (NOTES.md step 41): only on the live site with a Google tag; under the 18+ gate (z-index 100) */
.consent { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto;
  padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: 0 20px 50px -12px var(--shadow-color);
  display: grid; gap: 12px; color: var(--text-2); font: 400 14.5px/1.5 var(--font-ui); }
.consent[hidden] { display: none; }
.consent p { margin: 0; }
.consent a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent .btn { min-height: 42px; padding: 0 18px; }
.site-foot .link-btn { text-decoration: none; text-align: left; font-size: inherit; }
