/* Meduza — meduza-publish.uz
 *
 * Colours, radii and type mirror the app's «Бенто» design system
 * (lib/core/design/): the same three palettes — light, sepia, dark — and the
 * same concentric corners (an inner radius is the outer one minus its inset).
 */

@font-face {
  font-family: "Unbounded";
  src: url("/static/fonts/Unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/Montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/static/fonts/Lora.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/static/fonts/Lora-Italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ─── Tokens ─────────────────────────────────────────────────────────────── */

:root,
:root[data-theme="light"] {
  --canvas: #eeece6;
  --surface: #ffffff;
  --sunken: #e4e1d8;
  --ink: #161616;
  --text: #161616;
  --text-2: #6e6a60;
  --text-3: #9c978b;
  --line: #e2ded4;
  --action: #161616;
  --on-action: #ffffff;
  --emerald: #1f7a64;
  --emerald-deep: #0f3b31;
  --emerald-soft: #d7ede6;
  --gold: #e9ce8e;
  --gold-deep: #9a7a3f;
  --gold-soft: #f6ebd0;
  --coral: #ff7a59;
  --coral-soft: #ffe3da;
  --coral-deep: #b5452c;
  --lilac: #cfc4f2;
  --lilac-deep: #4b3b8f;
  --lilac-ink: #1e1640;
  --sky: #cbe4f4;
  --sky-deep: #1f5f8b;
  --paper: #faf7f0;
  --on-accent: #ffffff;
  --header-bg: rgb(255 255 255 / 0.78);
  --shadow: 0 1px 2px rgb(22 22 22 / 0.04), 0 10px 30px rgb(22 22 22 / 0.07);
  --shadow-lg: 0 2px 6px rgb(22 22 22 / 0.06), 0 30px 60px rgb(22 22 22 / 0.14);
  color-scheme: light;
}

:root[data-theme="sepia"] {
  --canvas: #efe5cf;
  --surface: #fbf5e6;
  --sunken: #e5d8bc;
  --ink: #2e2418;
  --text: #33291c;
  --text-2: #75664e;
  --text-3: #a3937a;
  --line: #ddcdac;
  --action: #33291c;
  --on-action: #fbf5e6;
  --emerald: #2a6e58;
  --emerald-deep: #163b30;
  --emerald-soft: #dce6cf;
  --gold: #e2c07c;
  --gold-deep: #8a6a2f;
  --gold-soft: #f2e1bb;
  --coral: #e8714f;
  --coral-soft: #f6d8c4;
  --coral-deep: #a3432a;
  --lilac: #d8cce6;
  --lilac-deep: #56468a;
  --lilac-ink: #271d45;
  --sky: #d2e1e0;
  --sky-deep: #2b5d73;
  --paper: #f1e7d0;
  --on-accent: #ffffff;
  --header-bg: rgb(251 245 230 / 0.8);
  --shadow: 0 1px 2px rgb(46 36 24 / 0.05), 0 10px 30px rgb(46 36 24 / 0.08);
  --shadow-lg: 0 2px 6px rgb(46 36 24 / 0.08), 0 30px 60px rgb(46 36 24 / 0.16);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --canvas: #0e0f0e;
  --surface: #1a1c1b;
  --sunken: #242725;
  --ink: #262927;
  --text: #f2f0ea;
  --text-2: #a7a398;
  --text-3: #75716a;
  --line: #2e312f;
  --action: #f2f0ea;
  --on-action: #161616;
  --emerald: #3fb894;
  --emerald-deep: #0b2b24;
  --emerald-soft: #17352d;
  --gold: #e9ce8e;
  --gold-deep: #d4af6a;
  --gold-soft: #3a3222;
  --coral: #ff8a6c;
  --coral-soft: #3d241c;
  --coral-deep: #ff9c80;
  --lilac: #3a3066;
  --lilac-deep: #b9acef;
  --lilac-ink: #f0ecff;
  --sky: #1c3444;
  --sky-deep: #8cc4ea;
  --paper: #161616;
  --on-accent: #0e0f0e;
  --header-bg: rgb(26 28 27 / 0.78);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.35), 0 30px 60px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

/* Without JavaScript the theme follows the system. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --canvas: #0e0f0e;
    --surface: #1a1c1b;
    --sunken: #242725;
    --ink: #262927;
    --text: #f2f0ea;
    --text-2: #a7a398;
    --text-3: #75716a;
    --line: #2e312f;
    --action: #f2f0ea;
    --on-action: #161616;
    --emerald: #3fb894;
    --emerald-deep: #0b2b24;
    --emerald-soft: #17352d;
    --gold-deep: #d4af6a;
    --gold-soft: #3a3222;
    --coral: #ff8a6c;
    --coral-soft: #3d241c;
    --coral-deep: #ff9c80;
    --lilac: #3a3066;
    --lilac-deep: #b9acef;
    --lilac-ink: #f0ecff;
    --sky: #1c3444;
    --sky-deep: #8cc4ea;
    --paper: #161616;
    --on-accent: #0e0f0e;
    --header-bg: rgb(26 28 27 / 0.78);
    color-scheme: dark;
  }
}

:root {
  --r-sheet: 32px;
  --r-tile: 28px;
  --r-card: 24px;
  --r-field: 20px;
  --r-plate: 12px;
  --gap: 16px;
  --pad: 32px;
  --page: 1240px;
  --gutter: 16px;
  --display: "Unbounded", system-ui, sans-serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Lora", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 720px) {
  :root { --gutter: 24px; }
}

/* ─── Base ───────────────────────────────────────────────────────────────── */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  background: var(--action);
  color: var(--on-action);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  font: 700 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--ink { background: var(--action); color: var(--on-action); }
.btn--ink:hover { box-shadow: var(--shadow); }
.btn--gold { background: var(--gold); color: #161616; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.store-badge {
  display: inline-block;
  border-radius: 12px;
  transition: transform 0.2s var(--ease);
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { height: 56px; width: auto; }
.store-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
}
.store-soon .icon { width: 20px; height: 20px; color: var(--gold-deep); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
}
.chip .icon { width: 16px; height: 16px; }

.overline {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin-top: 12px;
}
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 10px 0 12px;
  border-radius: 32px;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 4px;
  border-radius: 999px;
  margin-right: auto;
  flex: none;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.brand span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.nav {
  display: none;
  gap: 4px;
}
.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--text-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--text); background: var(--sunken); }
.nav a[aria-current="page"] { color: var(--text); }

.controls {
  display: none;
  align-items: center;
  gap: 6px;
}

.seg {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  background: var(--sunken);
}
.seg button,
.seg a {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: 700 12px/1 var(--sans);
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.seg .icon { width: 18px; height: 18px; }
.seg button:hover,
.seg a:hover { color: var(--text); }
.seg [aria-pressed="true"],
.seg [aria-current="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: var(--sunken);
  color: var(--text);
  cursor: pointer;
}
.menu-toggle .icon-x { display: none; }
.menu-open .menu-toggle .icon-menu { display: none; }
.menu-open .menu-toggle .icon-x { display: block; }

.mobile-menu {
  display: none;
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--r-sheet);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
}
.menu-open .mobile-menu { display: grid; gap: 12px; }
.mobile-menu nav { display: grid; }
.mobile-menu nav a {
  padding: 14px 16px;
  border-radius: var(--r-field);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}
.mobile-menu nav a:hover { background: var(--sunken); }
.mobile-menu .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 4px;
}

@media (min-width: 1180px) {
  .nav, .controls { display: flex; }
  .menu-toggle, .mobile-menu, .menu-open .mobile-menu { display: none; }
}

.lang-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 60;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 32px);
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
  background: var(--action);
  color: var(--on-action);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 14px;
}
.lang-banner[hidden] { display: none; }
.lang-banner > .icon { display: none; }
@media (max-width: 480px) {
  .lang-banner { padding-left: 14px; }
  .lang-banner > span { display: none; }
  .lang-banner > .icon { display: block; }
}
.lang-banner a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #161616;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.lang-banner button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* ─── Bento ──────────────────────────────────────────────────────────────── */

.bento {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.tile {
  position: relative;
  grid-column: span 12;
  padding: 24px;
  border-radius: var(--r-tile);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 720px) {
  .tile { padding: var(--pad); }
}
.tile h3 {
  font-size: 22px;
  line-height: 1.2;
}
.tile p { color: var(--text-2); }
.tile .tile-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.tile-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  flex: none;
}

.section {
  padding-block: 72px 0;
}
.section-head {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 32px;
}
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 48px);
}
.section-head p {
  font-size: 18px;
  color: var(--text-2);
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero { padding-top: 24px; }

.t-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  padding: 32px 24px;
}
.t-intro h1 {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.t-intro h1 em {
  font-style: normal;
  color: var(--emerald);
}
.t-intro .lead {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 40ch;
}
.t-intro .chip { align-self: flex-start; }
.t-intro .note {
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
}

.t-phone {
  min-height: 560px;
  padding: 40px 24px 0;
  background: linear-gradient(160deg, var(--emerald) 0%, var(--emerald-deep) 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
:root[data-theme="dark"] .t-phone { background: linear-gradient(160deg, #1f7a64 0%, #0b2b24 100%); }
.t-phone::before {
  content: "";
  position: absolute;
  inset: auto -30% -40% auto;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.07);
  z-index: -1;
}
.t-phone::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -25%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.05);
  z-index: -1;
}

.t-pearls {
  background: linear-gradient(150deg, var(--gold-soft) 0%, var(--gold) 100%);
  color: #161616;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-height: 220px;
}
:root[data-theme="dark"] .t-pearls { background: linear-gradient(150deg, #4a3f28 0%, #8a6d36 100%); color: #f6ebd0; }
.t-pearls p { color: inherit; opacity: 0.75; }
.t-pearls .pearl { position: absolute; top: 24px; left: 24px; }
@media (min-width: 720px) { .t-pearls .pearl { top: var(--pad); left: var(--pad); } }

.pearl {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6dc 0%, #e9ce8e 45%, #b48d45 100%);
  box-shadow: inset 0 -3px 6px rgb(90 60 10 / 0.25), 0 6px 14px rgb(120 90 30 / 0.3);
  color: #6b4d18;
}
.pearl .icon { width: 26px; height: 26px; }

.t-mascot {
  background: var(--lilac);
  color: var(--lilac-ink);
  min-height: 220px;
  display: flex;
  align-items: flex-end;
}
.t-mascot blockquote {
  margin: 0;
  max-width: 54%;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.3;
  position: relative;
  z-index: 1;
}
.t-mascot img {
  position: absolute;
  right: -4%;
  bottom: -30%;
  width: 44%;
  max-width: 240px;
  transform: rotate(4deg);
  transition: transform 0.6s var(--ease);
}
.t-mascot:hover img { transform: rotate(0deg) translateY(-8px); }

@media (min-width: 720px) {
  .t-pearls { grid-column: span 5; }
  .t-mascot { grid-column: span 7; }
}
@media (min-width: 1000px) {
  .hero .bento { grid-template-rows: auto auto auto; }
  .t-intro { grid-column: 1 / span 7; grid-row: 1 / span 2; padding: 56px; }
  .t-phone { grid-column: 8 / span 5; grid-row: 1 / span 3; min-height: 0; padding-top: 56px; }
  .phone { width: min(360px, 84%); }
  .t-pearls { grid-column: 1 / span 3; grid-row: 3; }
  .t-mascot { grid-column: 4 / span 4; grid-row: 3; }
}

/* ─── Phone mockup (the app's home screen, drawn in HTML) ───────────────── */

.phone {
  width: min(340px, 86%);
  aspect-ratio: 390 / 800;
  padding: 10px 10px 0;
  border-radius: 54px 54px 0 0;
  background: #0b0b0b;
  box-shadow: 0 40px 80px rgb(0 0 0 / 0.35), inset 0 0 0 2px #2a2a2a;
  position: relative;
  align-self: flex-end;
  flex: none;
}
.phone-screen {
  container-type: inline-size;
  height: 100%;
  border-radius: 44px 44px 0 0;
  overflow: hidden;
  background: var(--canvas);
}
.app {
  --u: calc(100cqw / 390);
  position: relative;
  height: 100%;
  padding: calc(var(--u) * 58) calc(var(--u) * 16) 0;
  font-size: calc(var(--u) * 15);
  line-height: 1.3;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 12);
}
.app-status {
  position: absolute;
  top: calc(var(--u) * 18);
  left: calc(var(--u) * 34);
  right: calc(var(--u) * 30);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: calc(var(--u) * 16);
}
.app-status::after {
  content: "";
  width: calc(var(--u) * 26);
  height: calc(var(--u) * 12);
  border-radius: calc(var(--u) * 4);
  background: var(--text);
}
.app-island {
  position: absolute;
  top: calc(var(--u) * 12);
  left: 50%;
  translate: -50% 0;
  width: calc(var(--u) * 110);
  height: calc(var(--u) * 32);
  border-radius: 999px;
  background: #000;
}
.app-top {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 12);
}
.app-avatar {
  display: grid;
  place-items: center;
  width: calc(var(--u) * 48);
  height: calc(var(--u) * 48);
  border-radius: 50%;
  background: linear-gradient(145deg, #7fc4e8, #2f6fa8);
  box-shadow: 0 0 0 calc(var(--u) * 3) var(--gold);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: calc(var(--u) * 18);
  flex: none;
}
.app-hello { flex: 1; min-width: 0; }
.app-hello small {
  display: block;
  color: var(--text-2);
  font-size: calc(var(--u) * 13);
}
.app-hello b {
  display: block;
  font-family: var(--display);
  font-size: calc(var(--u) * 20);
  line-height: 1.1;
}
.app-chip {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 6);
  padding: calc(var(--u) * 8) calc(var(--u) * 12);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--display);
  font-weight: 700;
  font-size: calc(var(--u) * 15);
}
.app-chip .icon { width: calc(var(--u) * 16); height: calc(var(--u) * 16); color: var(--gold-deep); }
.app-search {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 10);
  height: calc(var(--u) * 48);
  padding: 0 calc(var(--u) * 16);
  border-radius: calc(var(--u) * 24);
  background: var(--surface);
  color: var(--text-3);
  font-size: calc(var(--u) * 14);
}
.app-search .icon { width: calc(var(--u) * 18); height: calc(var(--u) * 18); color: var(--text-2); }
.app-continue {
  position: relative;
  display: grid;
  grid-template-columns: 1fr calc(var(--u) * 96);
  gap: calc(var(--u) * 12);
  padding: calc(var(--u) * 18);
  border-radius: calc(var(--u) * 28);
  background: linear-gradient(160deg, var(--emerald), var(--emerald-deep));
  color: #fff;
  overflow: hidden;
}
:root[data-theme="dark"] .app-continue { background: linear-gradient(160deg, #1f7a64, #0b2b24); }
.app-continue .ov {
  font-size: calc(var(--u) * 10);
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.75;
}
.app-continue h4 {
  margin: calc(var(--u) * 8) 0 calc(var(--u) * 2);
  font-family: var(--serif);
  font-weight: 600;
  font-size: calc(var(--u) * 20);
  line-height: 1.15;
}
.app-continue .by { font-size: calc(var(--u) * 12); opacity: 0.8; }
.app-bar {
  height: calc(var(--u) * 6);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.2);
  margin: calc(var(--u) * 12) 0 calc(var(--u) * 6);
  overflow: hidden;
}
.app-bar i { display: block; height: 100%; width: 42%; background: var(--gold); border-radius: inherit; }
.app-continue .meta { font-size: calc(var(--u) * 11); opacity: 0.8; }
.app-continue img {
  width: 100%;
  border-radius: calc(var(--u) * 8);
  box-shadow: 0 calc(var(--u) * 8) calc(var(--u) * 20) rgb(0 0 0 / 0.3);
}
.app-read {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 8);
  height: calc(var(--u) * 44);
  border-radius: 999px;
  background: #fff;
  color: #161616;
  font-weight: 700;
  font-size: calc(var(--u) * 15);
}
.app-read .icon { width: calc(var(--u) * 18); height: calc(var(--u) * 18); }
.app-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--u) * 12);
}
.app-duo > div {
  padding: calc(var(--u) * 16);
  border-radius: calc(var(--u) * 24);
  min-height: calc(var(--u) * 170);
  display: flex;
  flex-direction: column;
}
.app-streak { background: var(--coral); color: #fff; }
.app-streak .lbl { display: flex; align-items: center; gap: calc(var(--u) * 6); font-size: calc(var(--u) * 13); opacity: 0.9; }
.app-streak .lbl .icon { width: calc(var(--u) * 16); height: calc(var(--u) * 16); }
.app-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: calc(var(--u) * 44);
  line-height: 1;
  margin-top: calc(var(--u) * 8);
}
.app-small { font-size: calc(var(--u) * 12); opacity: 0.85; }
.app-dots {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}
.app-dots i {
  width: calc(var(--u) * 12);
  height: calc(var(--u) * 12);
  border-radius: 50%;
  border: calc(var(--u) * 1.5) solid rgb(255 255 255 / 0.85);
}
.app-dots i.on { background: #fff; }
.app-pearls { background: var(--surface); }
.app-pearls .pearl { width: calc(var(--u) * 34); height: calc(var(--u) * 34); }
.app-pearls .pearl .icon { width: calc(var(--u) * 16); height: calc(var(--u) * 16); }
.app-pearls .app-small { color: var(--text-2); opacity: 1; }
.app-pearls .link {
  margin-top: auto;
  color: var(--emerald);
  font-weight: 700;
  font-size: calc(var(--u) * 14);
}
.app-tabs {
  position: absolute;
  left: calc(var(--u) * 16);
  right: calc(var(--u) * 16);
  bottom: calc(var(--u) * 16);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: calc(var(--u) * 6);
  border-radius: calc(var(--u) * 32);
  background: #161616;
  color: rgb(255 255 255 / 0.62);
  box-shadow: 0 calc(var(--u) * 10) calc(var(--u) * 30) rgb(0 0 0 / 0.3);
}
.app-tabs span {
  display: grid;
  justify-items: center;
  gap: calc(var(--u) * 3);
  padding: calc(var(--u) * 8) 0;
  border-radius: calc(var(--u) * 26);
  font-size: calc(var(--u) * 10);
  font-weight: 600;
  white-space: nowrap;
}
.app-tabs span.on { background: var(--gold); color: #161616; }
.app-tabs .icon { width: calc(var(--u) * 20); height: calc(var(--u) * 20); }

/* ─── Shelf (covers marquee) ─────────────────────────────────────────────── */

.shelf {
  padding-top: 72px;
}
.shelf-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--text-2);
}
.shelf-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 70s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(calc(-50% - 8px)); }
}
.cover {
  width: 150px;
  flex: none;
  margin: 0;
}
.cover img {
  width: 150px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: var(--sunken);
}
.cover figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.35;
}
.cover figcaption b {
  display: block;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cover figcaption span { color: var(--text-2); }

/* ─── Features ───────────────────────────────────────────────────────────── */

.f-reader { display: grid; gap: 24px; }
.f-reader .copy { display: grid; gap: 12px; align-content: start; }
.page-preview {
  --pp-bg: #faf7f0;
  --pp-fg: #2b2620;
  --pp-mute: #8a8274;
  padding: 28px 28px 22px;
  border-radius: var(--r-card);
  background: var(--pp-bg);
  color: var(--pp-fg);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.page-preview[data-reader="sepia"] { --pp-bg: #f1e7d0; --pp-fg: #4a3b26; --pp-mute: #8f7d5d; }
.page-preview[data-reader="dark"] { --pp-bg: #161616; --pp-fg: #e8e4da; --pp-mute: #8b877d; box-shadow: none; }
.page-preview .ch {
  color: var(--pp-mute);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.page-preview .text {
  color: var(--pp-fg);
  margin: 14px 0 18px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
}
.page-preview .text mark {
  background: rgb(233 206 142 / 0.55);
  color: inherit;
  border-radius: 4px;
  padding: 0 2px;
}
.page-preview[data-reader="dark"] .text mark { background: rgb(233 206 142 / 0.25); }
.page-preview .foot {
  display: flex;
  justify-content: space-between;
  color: var(--pp-mute);
  font-size: 12px;
  font-weight: 600;
}
.reader-switch { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reader-switch .lbl { color: var(--text-2); font-size: 14px; font-weight: 600; }
.reader-switch .seg button { padding: 0 14px; gap: 8px; display: inline-flex; align-items: center; font-size: 13px; letter-spacing: 0; }
.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15);
}

.f-audio { background: var(--sky); color: var(--text); }
.f-audio h3, .f-audio .tile-head { color: var(--sky-deep); }
.f-audio p { color: var(--text-2); }
:root[data-theme="dark"] .f-audio h3 { color: var(--sky-deep); }
.player {
  margin-top: 20px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.player-top { display: flex; gap: 14px; align-items: center; }
.player-top img { width: 56px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; }
.player-top .t small { display: block; color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.player-top .t b { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.2; margin: 4px 0 2px; }
.player-top .t span { color: var(--text-2); font-size: 13px; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; margin-left: auto; align-self: flex-start; }
.eq i { width: 3px; height: 30%; border-radius: 2px; background: var(--sky-deep); }
.playing .eq i { animation: eq 0.9s ease-in-out infinite; }
.playing .eq i:nth-child(2) { animation-delay: -0.3s; }
.playing .eq i:nth-child(3) { animation-delay: -0.6s; }
.playing .eq i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.player-bar { margin: 16px 0 6px; height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.player-bar i { display: block; height: 100%; width: 38%; border-radius: inherit; background: var(--sky-deep); transition: width 0.5s linear; }
.player-times { display: flex; justify-content: space-between; color: var(--text-3); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.player-ctrls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 10px; }
.player-ctrls .ghost {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--text-2);
}
.play {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: var(--action);
  color: var(--on-action);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.play:active { transform: scale(0.94); }
.play .icon { width: 24px; height: 24px; }
.play .icon-pause { display: none; }
.playing .play .icon-play { display: none; }
.playing .play .icon-pause { display: block; }
.player-chips { display: flex; justify-content: space-between; margin-top: 10px; }
.mini-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: var(--sunken);
  font-size: 12px; font-weight: 700; color: var(--text-2);
}
.mini-chip .icon { width: 14px; height: 14px; }

.f-quiz { background: var(--lilac); color: var(--lilac-ink); display: flex; flex-direction: column; }
.f-quiz .quiz-note { margin-top: auto; padding-top: 12px; }
.f-quiz p { color: var(--lilac-ink); opacity: 0.75; }
.f-quiz .overline { color: var(--lilac-deep); }
.quiz-q {
  margin: 18px 0 14px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 600;
}
.quiz-a { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quiz-a button {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: rgb(255 255 255 / 0.6);
  color: var(--lilac-ink);
  font: 700 16px/1 var(--display);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--ease), color 0.2s;
}
:root[data-theme="dark"] .quiz-a button { background: rgb(255 255 255 / 0.08); }
.quiz-a button:hover { transform: translateY(-2px); }
.quiz-a button.right { background: var(--emerald); color: #fff; }
.quiz-a button.wrong { background: var(--coral); color: #fff; animation: shake 0.35s; }
@keyframes shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }
.quiz-out {
  min-height: 24px;
  margin-top: 12px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiz-out .pearl { width: 24px; height: 24px; }
.quiz-out .pearl .icon { width: 12px; height: 12px; }

.f-pearls {
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: #161616;
}
:root[data-theme="dark"] .f-pearls { background: linear-gradient(160deg, #3a3222, #6d5628); color: #f6ebd0; }
.f-pearls p { color: inherit; opacity: 0.78; }
.f-pearls .pearl { margin-bottom: 20px; width: 64px; height: 64px; }
.f-pearls .pearl .icon { width: 30px; height: 30px; }
.f-pearls { display: flex; flex-direction: column; }
.packs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.packs span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.55);
  font-weight: 700;
  font-size: 13px;
}
:root[data-theme="dark"] .packs span { background: rgb(0 0 0 / 0.25); }

.f-friends { background: var(--coral-soft); }
.f-friends h3 { color: var(--coral-deep); }
.feed { display: grid; gap: 8px; margin-top: 18px; }
.feed div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.3;
}
.feed b { font-weight: 700; }
.ava {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}
.ava.a1 { background: #1f7a64; }
.ava.a2 { background: #4b3b8f; }
.ava.a3 { background: #b5452c; }

.f-library { background: var(--emerald-soft); }
.f-library h3 { color: var(--emerald); }
.lib-row { display: flex; align-items: flex-end; gap: 16px; margin-top: 20px; }
.lib-covers { display: flex; }
.lib-covers img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.18);
  margin-right: -14px;
  border: 2px solid var(--emerald-soft);
}
.goal { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ring {
  --p: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(var(--emerald) calc(var(--p) * 1%), rgb(0 0 0 / 0.08) 0);
  display: grid;
  place-items: center;
}
:root[data-theme="dark"] .ring { background: conic-gradient(var(--emerald) calc(var(--p) * 1%), rgb(255 255 255 / 0.1) 0); }
.ring::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--emerald-soft);
  grid-area: 1 / 1;
}
.ring .icon { grid-area: 1 / 1; width: 18px; height: 18px; color: var(--emerald); }
.goal small { display: block; color: var(--text-2); font-size: 12px; font-weight: 600; }
.goal b { font-size: 14px; }

.f-streak { background: var(--coral); color: #fff; }
:root[data-theme="dark"] .f-streak { background: #8a3a26; }
.f-streak p { color: #fff; opacity: 0.85; }
.f-streak .num { font-family: var(--display); font-weight: 800; font-size: 56px; line-height: 1; margin: 6px 0 2px; }
.week { display: flex; justify-content: space-between; margin-top: 16px; max-width: 280px; }
.week span { display: grid; justify-items: center; gap: 6px; font-size: 11px; font-weight: 700; opacity: 0.9; }
.week i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.85); }
.week i.on { background: #fff; }

.f-free .badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--emerald);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 14px;
}
:root[data-theme="dark"] .f-free .badge { color: #0e0f0e; }

.f-langs { background: #161616; color: #f2f0ea; }
:root[data-theme="dark"] .f-langs { background: var(--sunken); }
.f-langs p { color: rgb(242 240 234 / 0.7); }
.f-langs .big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.f-langs .big span { color: var(--gold); }

@media (min-width: 720px) {
  .f-audio, .f-quiz, .f-friends, .f-library { grid-column: span 6; }
  .f-pearls, .f-streak, .f-free, .f-langs { grid-column: span 6; }
}
@media (min-width: 1000px) {
  .f-reader { grid-column: span 7; grid-template-columns: 1fr; }
  .f-audio { grid-column: span 5; }
  .f-quiz { grid-column: span 5; }
  .f-pearls { grid-column: span 3; }
  .f-friends { grid-column: span 4; }
  .f-library { grid-column: span 5; }
  .f-streak { grid-column: span 3; }
  .f-free { grid-column: span 2; }
  .f-langs { grid-column: span 2; }
  .f-free, .f-langs { padding: 24px; }
  .f-free h3, .f-langs h3 { font-size: 18px; }
  .f-langs .big { font-size: 24px; }
}
@media (min-width: 1200px) {
  .f-reader { grid-template-columns: 5fr 6fr; align-items: center; }
}

/* ─── Authors ────────────────────────────────────────────────────────────── */

.authors-grid { align-items: stretch; }
.a-text { display: grid; gap: 20px; align-content: start; }
.a-text h2 { font-size: clamp(30px, 4.4vw, 48px); }
.a-text p { font-size: 18px; }
.names { display: flex; flex-wrap: wrap; gap: 8px; }
.names span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--canvas);
  font-weight: 700;
  font-size: 14px;
}
.names span i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}
.covers-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--sunken);
}
.covers-wall img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease);
}
.covers-wall img:nth-child(3n + 2) { transform: translateY(24px); }
.covers-wall:hover img { transform: translateY(0); }
.a-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--emerald);
  color: #fff;
  min-height: 300px;
}
:root[data-theme="dark"] .a-cta { background: #164f41; }
.a-cta p { color: rgb(255 255 255 / 0.82); max-width: 24ch; }
.a-cta h3 { font-size: 26px; }
.a-cta .btn { margin-top: auto; align-self: flex-start; background: #fff; color: #161616; }
.a-cta img {
  position: absolute;
  right: -8%;
  bottom: -18%;
  width: 55%;
  max-width: 230px;
  z-index: -1;
}
@media (min-width: 720px) {
  .a-text { grid-column: span 12; }
  .covers-wall { grid-column: span 7; }
  .a-cta { grid-column: span 5; }
}
@media (min-width: 1000px) {
  .a-text { grid-column: span 5; }
  .covers-wall { grid-column: span 4; grid-template-columns: repeat(2, 1fr); }
  .covers-wall img:nth-child(3n + 2) { transform: none; }
  .covers-wall img:nth-child(2n) { transform: translateY(24px); }
  .covers-wall img:nth-child(n + 5) { display: none; }
  .a-cta { grid-column: span 3; }
}

/* ─── Premium ────────────────────────────────────────────────────────────── */

.premium {
  display: grid;
  gap: 28px;
  padding: 32px 24px;
  border-radius: var(--r-sheet);
  background: #161616;
  color: #f2f0ea;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
:root[data-theme="dark"] .premium { background: #1f211f; box-shadow: inset 0 0 0 1px var(--line); }
.premium::before {
  content: "";
  position: absolute;
  inset: auto auto -30% -10%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(31 122 100 / 0.55), transparent 70%);
  z-index: -1;
}
.premium .crown {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6dc, #e9ce8e 50%, #b48d45);
  color: #161616;
}
.premium .crown .icon { width: 30px; height: 30px; }
.premium h2 { font-size: clamp(32px, 4.6vw, 52px); margin-top: 20px; }
.premium .lead { color: rgb(242 240 234 / 0.72); font-size: 18px; margin-top: 12px; max-width: 44ch; }
.points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.points li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.points .icon { width: 22px; height: 22px; color: var(--gold); }
.plans { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
@media (min-width: 520px) { .plans { grid-template-columns: 1fr 1fr; gap: 12px; } }
.plan {
  position: relative;
  padding: 18px;
  border-radius: 20px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
}
.plan.best { box-shadow: inset 0 0 0 2px var(--gold); }
.plan b { display: block; font-family: var(--display); font-size: 18px; }
.plan span { color: rgb(242 240 234 / 0.7); font-size: 14px; }
.plan em {
  position: absolute;
  top: -11px;
  right: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold);
  color: #161616;
  font-style: normal;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.premium .fine {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: rgb(242 240 234 / 0.55);
}
.premium .fine a { color: var(--gold); }
.premium-art {
  display: grid;
  place-items: center;
}
.premium-art img {
  width: min(420px, 90%);
  filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.45));
}
@media (min-width: 900px) {
  .premium { grid-template-columns: 1.1fr 0.9fr; padding: 56px; align-items: center; }
}

/* ─── FAQ ────────────────────────────────────────────────────────────────── */

.faq {
  display: grid;
  gap: 8px;
}
.faq details {
  border-radius: var(--r-card);
  background: var(--surface);
  transition: background-color 0.2s;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 17px;
  border-radius: var(--r-card);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon {
  width: 22px;
  height: 22px;
  color: var(--text-2);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p {
  padding: 0 24px 22px;
  color: var(--text-2);
  max-width: 70ch;
}
.faq-more { margin-top: 20px; }
@media (min-width: 1000px) {
  .faq-layout { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: start; }
  .faq-layout .section-head { position: sticky; top: 110px; }
}

/* ─── Final CTA ──────────────────────────────────────────────────────────── */

.cta {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 40px 24px 260px;
  border-radius: var(--r-sheet);
  background: linear-gradient(150deg, var(--gold-soft), var(--gold));
  color: #161616;
  overflow: hidden;
  isolation: isolate;
}
:root[data-theme="dark"] .cta { background: linear-gradient(150deg, #3a3222, #6d5628); color: #f6ebd0; }
.cta h2 { font-size: clamp(32px, 4.8vw, 56px); max-width: 16ch; }
.cta p { font-size: 18px; max-width: 42ch; opacity: 0.78; }
.cta .mascot {
  position: absolute;
  right: 50%;
  translate: 50% 0;
  bottom: -60px;
  width: 280px;
  z-index: -1;
}
.cta .store-soon { box-shadow: inset 0 0 0 1.5px rgb(22 22 22 / 0.18); color: inherit; }
:root[data-theme="dark"] .cta .store-soon { box-shadow: inset 0 0 0 1.5px rgb(246 235 208 / 0.25); }
@media (min-width: 900px) {
  .cta { padding: 64px; min-height: 420px; align-content: center; }
  .cta .mascot { right: 4%; translate: none; bottom: -90px; width: 340px; }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: 72px;
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 1fr;
}
.footer-brand { grid-column: 1 / -1; display: grid; gap: 14px; align-content: start; }
.footer-brand p { color: var(--text-2); max-width: 36ch; }
.footer-col h2 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { text-decoration: none; font-weight: 600; color: var(--text); }
.footer-col a:hover { color: var(--emerald); }
.footer-col .with-icon { display: inline-flex; align-items: center; gap: 8px; }
.footer-col .with-icon .icon { width: 16px; height: 16px; color: var(--text-2); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 14px;
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

/* ─── Legal pages ────────────────────────────────────────────────────────── */

.doc-hero {
  padding: 48px 0 28px;
  display: grid;
  gap: 16px;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .icon { width: 14px; height: 14px; }
.doc-hero h1 {
  font-size: clamp(26px, 7.4vw, 56px);
  max-width: 20ch;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}
.doc-hero .updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: start;
  justify-self: start;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
}
.doc-hero .updated .icon { width: 15px; height: 15px; }

.doc-layout { display: grid; gap: 16px; align-items: start; }
.toc {
  display: none;
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--surface);
}
.toc h2 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 4px 8px 10px;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
}
.toc a:hover { background: var(--sunken); color: var(--text); }
.toc a.active { background: var(--emerald-soft); color: var(--emerald); }
@media (min-width: 1000px) {
  .doc-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 24px; }
  .toc { display: block; position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow: auto; }
}

.prose {
  padding: 28px 22px;
  border-radius: var(--r-tile);
  background: var(--surface);
  font-size: 17px;
  line-height: 1.72;
}
@media (min-width: 720px) {
  .prose { padding: 48px 56px; }
}
.prose > * { max-width: 70ch; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 {
  font-size: 23px;
  line-height: 1.25;
  margin: 2em 0 0.7em;
  scroll-margin-top: 110px;
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 18px;
  margin: 1.6em 0 0.5em;
  scroll-margin-top: 110px;
}
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--emerald); }
.prose a {
  color: var(--emerald);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose strong { font-weight: 700; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.prose blockquote {
  margin: 0 0 1.2em;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--gold-soft);
}
.prose blockquote p:last-child { margin: 0; }

.contacts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}
.contact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.contact:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.contact .tile-icon { background: var(--emerald-soft); color: var(--emerald); }
.contact small { display: block; color: var(--text-2); font-weight: 600; font-size: 13px; }
.contact b { display: block; font-weight: 700; overflow-wrap: anywhere; }

.other-docs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 16px;
}
.other-docs a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s var(--ease);
}
.other-docs a:hover { transform: translateY(-2px); }
.other-docs .icon { color: var(--text-2); }
.other-title {
  margin-top: 48px;
  font-size: 22px;
}

/* ─── 404 ────────────────────────────────────────────────────────────────── */

.nf {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 16px;
  padding: 64px 24px;
  margin-top: 32px;
  border-radius: var(--r-sheet);
  background: var(--surface);
}
.nf img { width: 200px; }
.nf h1 { font-size: clamp(28px, 4vw, 44px); }
.nf p { color: var(--text-2); }
.nf .alt { display: flex; gap: 16px; color: var(--text-3); font-size: 14px; }

/* ─── Motion ─────────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
}
