/* InHive — design tokens & components for inhive.ru.
   Sourced 1:1 from app/lib/core/theme/app_tokens.dart and web/preview/_shared.css.
   Dark theme is default; light theme via html[data-theme="light"]. */

:root {
  /* Brand */
  --gold: #F2B454;
  --gold-dim: rgba(242, 180, 84, 0.20);
  --gold-glow: rgba(242, 180, 84, 0.40);
  --accent-gold: #F2B454;
  --selected-border: #FF8F00;

  /* Dark surfaces (default) */
  --bg: #121212;
  --surface: #1E1E1E;
  --surface-high: #2A2A2A;
  --border: #333333;
  --hover: rgba(255, 255, 255, 0.04);

  /* Text (dark) */
  --text: rgba(255, 255, 255, 0.87);
  --muted: rgba(255, 255, 255, 0.60);
  --disabled: rgba(255, 255, 255, 0.38);

  /* Status — solid */
  --connected: #4CAF50;
  --warning: #FF9800;
  --error: #E53935;

  /* Status — semantic tokens (use these for banners, pills, alerts).
     Each has fg (text), bg (background tint), border (alpha border). */
  --status-ok-fg:      rgba(34, 197, 94, 1);
  --status-ok-bg:      rgba(34, 197, 94, 0.10);
  --status-ok-border:  rgba(34, 197, 94, 0.25);

  --status-err-fg:     rgba(192, 52, 52, 1);
  --status-err-fg-soft:rgba(220, 90, 90, 1);
  --status-err-bg:     rgba(239, 68, 68, 0.10);
  --status-err-border: rgba(239, 68, 68, 0.25);
  --status-err-border-hover: rgba(239, 68, 68, 0.30);

  --status-warn-fg:    rgba(202, 138, 4, 1);
  --status-warn-bg:    rgba(245, 158, 11, 0.10);
  --status-warn-border:rgba(245, 158, 11, 0.30);

  --status-info-fg:    rgba(14, 116, 144, 1);
  --status-info-bg:    rgba(56, 189, 248, 0.10);
  --status-info-border:rgba(56, 189, 248, 0.30);

  --gold-soft-fg:      rgba(242, 180, 84, 1);
  --gold-soft-bg:      rgba(242, 180, 84, 0.12);
  --gold-soft-border:  rgba(242, 180, 84, 0.30);

  /* Network badges */
  --tcp: #42A5F5;
  --udp: #66BB6A;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Motion */
  --motion-micro: 150ms;
  --motion-sidebar: 200ms;
  --motion-panel: 300ms;
  --motion-logo: 480ms;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadow */
  --shadow-panel: 2px 0 8px rgba(0, 0, 0, 0.30);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25);

  /* Card / panel tokens — used by /account, /support, /privacy, /faq sections */
  --card-bg:           rgba(30, 30, 30, 0.6);
  --card-bg-strong:    rgba(30, 30, 30, 0.8);
  --card-bg-alt:       rgba(20, 20, 20, 0.5);
  --card-bg-alt-hover: rgba(20, 20, 20, 0.65);
  --card-border:       rgba(51, 51, 51, 0.4);
  --card-border-strong:rgba(51, 51, 51, 0.6);
  --card-divider:      rgba(51, 51, 51, 0.3);
  --card-inset-hi:     rgba(255, 255, 255, 0.05);
  --page-bg-base:      linear-gradient(to bottom right, #0a0a0a 0%, #121212 50%, #0a0a0a 100%);
  --page-bg-glow:      radial-gradient(ellipse at top, rgba(242, 180, 84, 0.06), transparent 65%);
  --pop-bg:            #1a1a1f;
  --tooltip-shadow:    0 12px 32px rgba(0, 0, 0, 0.55);
  --gradient-avatar:   linear-gradient(135deg, rgba(242, 180, 84, 0.18), rgba(242, 180, 84, 0.05));
}

html[data-theme="light"] {
  --bg: #F7F4EF;
  --surface: #FFFCF7;
  --surface-high: #F0EDE6;
  --border: #E3DDD3;
  --hover: rgba(0, 0, 0, 0.03);
  --text: #18140F;
  --muted: #44403A;
  --disabled: rgba(24, 20, 15, 0.35);
  --gold: #B98220;
  --gold-dim: rgba(185, 130, 32, 0.16);
  --shadow-panel: 2px 0 8px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);

  /* Card / panel tokens — light overrides */
  --card-bg:           rgba(255, 252, 247, 0.85);
  --card-bg-strong:    rgba(255, 252, 247, 0.95);
  --card-bg-alt:       rgba(247, 244, 239, 0.75);
  --card-bg-alt-hover: rgba(247, 244, 239, 0.90);
  --card-border:       rgba(0, 0, 0, 0.08);
  --card-border-strong:rgba(0, 0, 0, 0.12);
  --card-divider:      rgba(0, 0, 0, 0.06);
  --card-inset-hi:     rgba(255, 255, 255, 0.40);
  --page-bg-base:      linear-gradient(to bottom right, #F7F4EF 0%, #FFFCF7 50%, #F7F4EF 100%);
  --page-bg-glow:      radial-gradient(ellipse at top, rgba(185, 130, 32, 0.08), transparent 65%);
  --pop-bg:            #FFFCF7;
  --tooltip-shadow:    0 12px 32px rgba(0, 0, 0, 0.12);
  --gradient-avatar:   linear-gradient(135deg, rgba(185, 130, 32, 0.20), rgba(185, 130, 32, 0.05));
}

/* Dark theme softens status fg colors for contrast on dark surfaces */
html[data-theme="dark"] {
  --status-ok-fg:      rgba(134, 239, 172, 1);
  --status-err-fg:     rgba(252, 165, 165, 1);
  --status-err-fg-soft:rgba(252, 165, 165, 0.85);
  --status-warn-fg:    rgba(253, 224, 71, 1);
  --status-info-fg:    rgba(125, 211, 252, 1);
}

/* ── Reset ────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'tnum' 1;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Honeycomb pattern background (page-wide, subtle) ────────────────── */

.honeycomb-bg {
  /* Connected pointy-top honeycomb lattice — exact parity with app.inhive.ru SPA.
     Technique: gold solid-color layer + SVG-mask repeat (hex outlines) + radial
     fade mask, composited via intersect. Lets us tune color/opacity at one site. */
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--accent-gold);
  -webkit-mask-image:
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 45 26' width='45' height='26'%3E%3Cg fill='none' stroke='%23000' stroke-width='0.5'%3E%3Cpath d='M7.5 0L22.5 0L30 13L22.5 26L7.5 26L0 13Z'/%3E%3Cpath d='M30 -13L45 -13L52.5 0L45 13L30 13L22.5 0Z'/%3E%3Cpath d='M30 13L45 13L52.5 26L45 39L30 39L22.5 26Z'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image:
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 45 26' width='45' height='26'%3E%3Cg fill='none' stroke='%23000' stroke-width='0.5'%3E%3Cpath d='M7.5 0L22.5 0L30 13L22.5 26L7.5 26L0 13Z'/%3E%3Cpath d='M30 -13L45 -13L52.5 0L45 13L30 13L22.5 0Z'/%3E%3Cpath d='M30 13L45 13L52.5 26L45 39L30 39L22.5 26Z'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-repeat: repeat, no-repeat;
  mask-repeat: repeat, no-repeat;
  -webkit-mask-size: 90px 52px, 100% 100%;
  mask-size: 90px 52px, 100% 100%;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  opacity: 0.22;
  pointer-events: none;
}

/* ── Typography ──────────────────────────────────────────────────────── */

h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 var(--space-sm); color: var(--text); }
h2 { font-size: 1.35rem; font-weight: 600; margin: var(--space-xxl) 0 var(--space-md); color: var(--gold); letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 600; margin: var(--space-xl) 0 var(--space-xs); color: var(--text); }
p  { margin: var(--space-md) 0; color: var(--text); }

.meta    { color: var(--muted); font-size: 0.9rem; margin-bottom: var(--space-xxl); }
.tagline { color: var(--muted); font-size: 1.1rem; margin-bottom: 40px; }

.tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* ── Links ───────────────────────────────────────────────────────────── */

a { color: var(--gold); text-decoration: none; transition: opacity var(--motion-micro) var(--easing); }
a:hover { text-decoration: underline; opacity: 0.85; }

ul, ol { padding-left: var(--space-xl); margin: var(--space-md) 0; }
li { margin: var(--space-xs) 0; }

code {
  background: var(--surface-high);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.875em;
  color: var(--text);
}

pre {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

table { width: 100%; border-collapse: collapse; margin: var(--space-lg) 0; font-size: 0.95rem; }
th, td { text-align: left; padding: var(--space-sm) var(--space-md); border-bottom: 0.5px solid var(--border); }
th { color: var(--muted); font-weight: 600; background: var(--surface); }

::selection { background: var(--gold-dim); color: var(--text); }

button { font-family: inherit; }
button:focus { outline: none; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Layout shell ────────────────────────────────────────────────────── */

.shell {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.shell--narrow { max-width: 560px; }
.shell--wide   { max-width: 1180px; }

.center-col {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
}

/* ── Topbar ──────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  /* PWA standalone на iOS: status-bar-style=black-translucent делает
     status bar полупрозрачным, content начинается с y=0 и время
     iPhone "00:28" overlap'ает с нашим "InHive" текстом. env()
     safe-area-inset-top даёт реальную высоту status bar (~47px на
     iPhone с notch / Dynamic Island). На обычных browser tabs env()
     возвращает 0 — нет лишнего padding. */
  padding: calc(var(--space-md) + env(safe-area-inset-top, 0px)) var(--space-xl) var(--space-md);
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0.5px solid var(--border);
}

html[data-theme="light"] .topbar { background: rgba(247, 244, 239, 0.85); }

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text) !important;
  font-weight: 700;
  font-size: 1.05rem;
}
.topbar__brand span { color: inherit; }
html[data-theme="light"] .topbar__brand,
html[data-theme="light"] .topbar__brand span { color: #18140F !important; }

.topbar__brand img {
  width: 28px;
  height: 28px;
  display: block;
}

.topbar__nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  margin-left: auto;
}

.topbar__nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--motion-micro) var(--easing),
              background var(--motion-micro) var(--easing);
}

.topbar__nav a:hover { color: var(--text); text-decoration: none; background: var(--hover); }
.topbar__nav a.active { color: var(--gold); background: var(--gold-dim); }

/* Language switcher — minimal segmented control matching the gold accent
   palette used across InHive. Sits at the end of the topbar nav. */
.topbar__lang {
  display: inline-flex; align-items: center;
  margin-left: 8px;
  padding: 2px;
  background: var(--card-bg-alt);
  border: 0.5px solid var(--card-border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
html[data-theme="light"] .topbar__lang {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
}
.topbar__lang a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px;
  padding: 4px 9px;
  font-family: inherit;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-radius: 6px;
  text-decoration: none;
  background: transparent;
  transition: color 150ms, background 150ms;
}
.topbar__lang a:hover { color: var(--text); background: rgba(255,255,255,0.04); text-decoration: none; }
.topbar__lang a.active {
  color: var(--gold);
  background: rgba(242,180,84,0.14);
  box-shadow: inset 0 0 0 0.5px rgba(242,180,84,0.35);
}
html[data-theme="light"] .topbar__lang a.active {
  background: rgba(185,130,32,0.10);
  box-shadow: inset 0 0 0 0.5px rgba(185,130,32,0.50);
}

/* ── Theme reveal — canvas overlay with honeycomb wave carve.
   1:1 port from app.inhive.ru SPA v5 (which 1:1 ports Flutter's
   _InvertedCircleClipper). The canvas is positioned above everything. */
.theme-reveal-canvas {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

/* ── Floating theme switcher (Happ-style) ────────────────────────────────── */
.theme-switcher {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 15;
  display: inline-flex;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
  box-shadow: var(--shadow-panel);
}
.theme-switcher button {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--motion-micro) var(--easing),
              background var(--motion-micro) var(--easing);
}
.theme-switcher button:hover { color: var(--text); }
.theme-switcher button.active {
  background: var(--gold-dim);
  color: var(--accent-gold);
}
@media (max-width: 600px) {
  .theme-switcher { bottom: 12px; right: 12px; padding: 2px; }
  .theme-switcher button { padding: 5px 6px; }
}

/* ── Stand-alone lang switcher (used on /privacy /terms /faq /login /reset).
   Same visual as .topbar__lang, but free-positioned (auth pages place it
   fixed; legal page places it inline). ─────────────────────────────────── */
.lang-switcher {
  display: inline-flex; align-items: center;
  padding: 2px;
  background: var(--card-bg-alt);
  border: 0.5px solid var(--card-border);
  border-radius: 8px;
}
html[data-theme="light"] .lang-switcher {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
}
.lang-switcher a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(148,163,184,0.85);
  border-radius: 6px;
  text-decoration: none;
  background: transparent;
  transition: color 150ms, background 150ms;
}
.lang-switcher a:hover { color: var(--text); background: rgba(255,255,255,0.04); text-decoration: none; }
.lang-switcher a.active {
  color: var(--gold);
  background: rgba(242,180,84,0.14);
  box-shadow: inset 0 0 0 0.5px rgba(242,180,84,0.35);
}
html[data-theme="light"] .lang-switcher a:hover { background: rgba(0,0,0,0.04); }
html[data-theme="light"] .lang-switcher a.active {
  color: var(--gold);
  background: rgba(185,130,32,0.10);
  box-shadow: inset 0 0 0 0.5px rgba(185,130,32,0.50);
}

/* Footer TG pills */
.footer-tg {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  background: rgba(34,158,217,0.08);
  border: 0.5px solid rgba(34,158,217,0.25);
  border-radius: 9999px;
  color: rgba(125,211,252,0.95) !important;
  font-size: 0.82rem; font-weight: 500;
  text-decoration: none;
  transition: background 150ms, border-color 150ms;
}
.footer-tg:hover {
  background: rgba(34,158,217,0.14);
  border-color: rgba(34,158,217,0.40);
  text-decoration: none;
}

@media (max-width: 600px) {
  /* Keep env(safe-area-inset-top) compensation на mobile — иначе iOS PWA
     status bar (~47px) накладывается на "InHive" текст. Этот media
     перебивает базовое .topbar правило выше, поэтому safe-area
     включается ЯВНО ещё раз. */
  .topbar {
    padding: calc(var(--space-sm) + env(safe-area-inset-top, 0px)) var(--space-md) var(--space-sm);
    gap: var(--space-sm);
  }
  .topbar__nav { gap: var(--space-xs); }
  .topbar__nav a { padding: 4px 6px; font-size: 0.85rem; }
  .topbar__lang a { min-width: 24px; padding: 2px 6px; font-size: 10px; }
}

/* ── Mobile bottom nav (iOS-style glass tab bar) ─────────────────────────
   Hidden on desktop; visible only when viewport < 768px.
   Shown on all pages including auth-shell so anon users can still reach
   Support / Menu without authing first. */
.bottom-nav { display: none; }

@media (max-width: 767px) {
  /* Hide desktop topbar nav on mobile — bottom nav replaces it */
  .topbar__nav { display: none !important; }
  .topbar { justify-content: flex-start; }

  /* Auth-shell wrap (login/signup/reset/check_email/legal) — long forms
     would extend BEHIND the bottom nav pill and clip the submit-button
     drop shadow. Switch to top-aligned scroll on mobile and reserve room
     below for nav (~130px) + 16px breathing space so the gold pill's
     shadow renders cleanly. */
  .auth-wrap {
    align-items: flex-start !important;
    min-height: auto !important;
    padding-bottom: calc(146px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Hide global footer on mobile — its content (TG channel, support, faq,
     privacy, terms) is in /menu now and would overlap the bottom nav. */
  body > footer { display: none !important; }

  /* Make room for bottom nav so it doesn't overlap content.
     Nav is ~60px tall (44px button + 8px*2 padding) + 14px bottom offset,
     plus iPhone home indicator safe-area. 130px = breathing room above the
     pill so the last item doesn't ghost through the glass blur. */
  body { padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }
  /* Smooth anchor scrolls (#invites, #achievements links in /menu) should
     also respect the bottom nav padding so target ends up above the bar. */
  html { scroll-padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }

  /* Hide floating theme switcher on mobile — would clash with bottom nav.
     Theme + lang access via desktop topbar (when in landscape) or future "More" sheet. */
  .theme-switcher { display: none; }

  .bottom-nav {
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(20, 20, 20, 0.70);
    border: 0.5px solid rgba(242, 180, 84, 0.18);
    border-radius: 9999px;
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
  }

  html[data-theme="light"] .bottom-nav {
    background: rgba(255, 252, 247, 0.78);
    border-color: rgba(185, 130, 32, 0.18);
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.10),
      inset 0 1px 0 rgba(255, 255, 255, 0.50);
  }

  /* All 3 tabs share the same 44px circle. Inactive — muted icon, no bg.
     Active — soft elevated circle with subtle gold tint icon, no FAB lift,
     no oversized glow — mirrors the Geodema reference exactly. */
  .bn-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 50%;
    transition: color 150ms var(--easing), background 200ms var(--easing), box-shadow 220ms var(--easing), transform 100ms;
    -webkit-tap-highlight-color: transparent;
  }
  .bn-tab svg { width: 22px; height: 22px; }
  .bn-tab:hover, .bn-tab:focus-visible { color: var(--text); outline: none; }
  .bn-tab:active { transform: scale(0.92); }
  .bn-tab.active {
    color: var(--gold);
    background: radial-gradient(circle at 50% 50%,
      rgba(242, 180, 84, 0.14) 0%,
      rgba(242, 180, 84, 0.04) 70%,
      transparent 100%);
    box-shadow:
      inset 0 0 0 0.5px rgba(242, 180, 84, 0.35),
      0 2px 10px rgba(242, 180, 84, 0.10);
  }
  .bn-tab.active svg { stroke-width: 2.1; }

  html[data-theme="light"] .bn-tab.active {
    background: radial-gradient(circle at 50% 50%,
      rgba(185, 130, 32, 0.16) 0%,
      rgba(185, 130, 32, 0.05) 70%,
      transparent 100%);
    box-shadow:
      inset 0 0 0 0.5px rgba(185, 130, 32, 0.40),
      0 2px 10px rgba(185, 130, 32, 0.10);
  }
}

/* ── Hero — mirrors SPA hero composition ─────────────────────────────── */

.hero {
  position: relative;
  text-align: center;
  padding: 56px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
}

.hero__logo {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: var(--space-xl);
  transition: filter var(--motion-panel) var(--easing);
}

.hero__logo:hover { filter: drop-shadow(0 0 12px var(--gold-glow)); }

.hero__ring,
.hero__bee {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__bee {
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
}

.hero__title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-md);
  color: var(--text);
}

.hero__tagline {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  line-height: 1.55;
}

.hero__cta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

@media (max-width: 600px) {
  .hero { padding: 32px 16px 32px; }
  .hero__logo { width: 140px; height: 140px; }
  .hero__title { font-size: 2.25rem; }
  .hero__tagline { font-size: 0.95rem; }
}

/* ── Buttons — flat, mirror app's "no ripple" character ─────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 0.5px solid transparent;
  background: transparent;
  color: var(--text);
  transition: background var(--motion-micro) var(--easing),
              border-color var(--motion-micro) var(--easing),
              color var(--motion-micro) var(--easing);
}

.btn:hover { text-decoration: none; }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

.btn--primary {
  background: var(--accent-gold);
  color: #18140F;
  border-color: var(--accent-gold);
}
.btn--primary:hover {
  background: transparent;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.btn--ghost {
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--text);
}

.btn--block { width: 100%; }
.btn--lg { padding: 14px 26px; font-size: 1rem; }
.btn--sm { padding: 6px 14px; font-size: 0.85rem; }

/* ── Cards ───────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.card--bordered { border-width: 0.5px; }
.card--padless  { padding: 0; }

.card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-md);
  color: var(--text);
}

.card__hint {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Tile / list row — for plans, identities, devices */
.tile {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--motion-micro) var(--easing),
              background var(--motion-micro) var(--easing);
}

.tile:hover { background: var(--surface-high); border-color: var(--text); }
.tile.active { border-color: var(--gold); background: var(--gold-dim); }

.tile__body { flex: 1; min-width: 0; }
.tile__title { font-weight: 600; font-size: 1rem; color: var(--text); }
.tile__sub   { font-size: 0.88rem; color: var(--muted); margin-top: 2px; }
.tile__cta   { flex: 0 0 auto; }

/* Info banner — frosted, matches app's home subscription banner */
.banner {
  background: rgba(242, 180, 84, 0.06);
  border: 0.5px solid var(--gold-dim);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.banner strong { color: var(--gold); }

.banner--warning { border-color: rgba(255, 152, 0, 0.35); background: rgba(255, 152, 0, 0.06); }
.banner--error   { border-color: rgba(229, 57, 53, 0.35); background: rgba(229, 57, 53, 0.06); }
.banner--success { border-color: rgba(76, 175, 80, 0.35); background: rgba(76, 175, 80, 0.06); }

/* ── Forms ───────────────────────────────────────────────────────────── */

.form { display: flex; flex-direction: column; gap: var(--space-md); }

.field { display: flex; flex-direction: column; gap: var(--space-xs); }
.field__label { font-size: 0.88rem; font-weight: 500; color: var(--muted); }
.field__hint  { font-size: 0.82rem; color: var(--muted); }
.field__error { font-size: 0.82rem; color: var(--error); }

.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--motion-micro) var(--easing),
              background var(--motion-micro) var(--easing);
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface-high);
}

.input::placeholder { color: var(--disabled); }

/* ── Plan card (pricing) ─────────────────────────────────────────────── */

.plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: border-color var(--motion-micro) var(--easing),
              transform var(--motion-micro) var(--easing);
}

.plan:hover { border-color: var(--gold); transform: translateY(-2px); }
.plan--featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-dim); }

.plan__period { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.plan__price  { font-size: 2rem; font-weight: 800; color: var(--text); }
.plan__price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.plan__features { color: var(--muted); font-size: 0.92rem; line-height: 1.7; margin: var(--space-xs) 0; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

/* ── Identity badge ──────────────────────────────────────────────────── */

.id-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
}

.id-badge--muted { background: var(--surface-high); color: var(--muted); }
.id-badge--verified::before { content: "✓"; opacity: 0.9; }

/* ── Inline status pill ──────────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.pill--ok    { background: rgba(34, 197, 94, 0.12);  color: rgba(34, 140, 80, 1); }
.pill--warn  { background: rgba(242, 180, 84, 0.12); color: var(--gold); }
.pill--error { background: rgba(239, 68, 68, 0.12);  color: rgba(192, 52, 52, 1); }
.pill--info  { background: rgba(56, 189, 248, 0.12); color: rgba(40, 120, 170, 1); }
.pill--muted { background: var(--hover);             color: var(--muted); }
html[data-theme="dark"] .pill--ok    { color: rgba(134, 239, 172, 1); }
html[data-theme="dark"] .pill--error { color: rgba(252, 165, 165, 1); }
html[data-theme="dark"] .pill--info  { color: rgba(125, 211, 252, 1); }

/* ── Spacing utility helpers ─────────────────────────────────────────── */

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-xxl { margin-top: var(--space-xxl); }

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-gold  { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════════════════
   SHARED PAGE COMPONENTS
   Extracted 2026-05-19 from inline <style> blocks in multiple templates.
   Use these instead of re-declaring in per-page <style>.
   ═══════════════════════════════════════════════════════════════════════════ */

/* === Component: auth-shell ===
   Used by: login.html, check_email.html, reset.html
   The gradient backdrop + centered wrapper for all auth-flow pages. */

body:has(.auth-wrap) .honeycomb-bg { display: none; }

.auth-bg-base {
  position: fixed; inset: 0; z-index: -2;
  background: var(--page-bg-base);
}
.auth-bg-glow {
  position: fixed; inset: 0; z-index: -1;
  background: var(--page-bg-glow);
  pointer-events: none;
}
/* .auth-wrap base — mobile overrides in @media (max-width: 767px) above */
.auth-wrap {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.auth-container {
  position: relative;
  width: 100%;
  max-width: 448px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === Component: auth-brand ===
   Used by: login.html, check_email.html, reset.html */

.auth-brand { text-align: center; }
.auth-brand__logo-wrap {
  position: relative;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--card-border-strong);
  background: var(--card-bg-strong);
  box-shadow: var(--shadow-card);
}
.auth-brand__logo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.auth-brand h1 {
  margin: 0;
  font-family: inherit;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* === Component: auth-card ===
   Used by: login.html, check_email.html, reset.html */

.auth-card {
  padding: 24px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: inset 0 1px var(--card-inset-hi);
}

/* === Component: auth-form + auth-submit ===
   Used by: login.html, reset.html */

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .field { display: flex; flex-direction: column; }
.auth-form .label {
  display: block;
  margin-bottom: 8px;
  font-family: inherit;
  font-size: 14px; line-height: 20px;
  font-weight: 500;
  color: var(--text);
}
.auth-form .input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--card-border-strong);
  background: var(--card-bg-alt);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px; line-height: 20px;
  color: var(--text);
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}
.auth-form .input::placeholder { color: var(--disabled); }
.auth-form .input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: var(--card-bg-alt-hover);
  box-shadow: 0 0 0 3px rgba(242, 180, 84, 0.15);
}
.auth-form .hint {
  margin-top: 4px;
  font-family: inherit;
  font-size: 12px; line-height: 16px;
  color: var(--muted);
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-gold);
  color: #18140F;
  font-family: inherit;
  font-size: 14px; line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.10) inset,
    0 8px 18px -6px rgba(0, 0, 0, 0.45),
    0 2px 6px -2px rgba(0, 0, 0, 0.25);
  transition: background 200ms, transform 100ms, box-shadow 200ms, filter 200ms;
}
.auth-submit:hover { filter: brightness(1.05); transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); filter: brightness(0.98); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* === Component: back-pill + top-actions ===
   Used by: legal_page.html, news.html, news_post.html */

.top-actions {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 16px; right: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.top-actions > * { pointer-events: auto; }

.back-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--card-bg);
  border: 0.5px solid var(--card-border);
  border-radius: 9999px;
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.back-pill:hover { color: var(--gold); border-color: rgba(242, 180, 84, 0.30); text-decoration: none; }

/* === Component: news-shell ===
   Used by: news.html, news_post.html */

body:has(.news-wrap) .honeycomb-bg { display: none; }
.news-bg-base { position: fixed; inset: 0; z-index: -2; background: var(--page-bg-base); }
.news-bg-glow { position: fixed; inset: 0; z-index: -1; background: var(--page-bg-glow); pointer-events: none; }
.news-wrap {
  position: relative;
  min-height: 100dvh;
  padding: 32px 16px 64px;
  padding-top: calc(32px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
.news-container {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 64px auto 0;
  display: flex; flex-direction: column;
  gap: 20px;
}

/* === Component: acct-header ===
   Used by: account.html (subscription_account.html externalised to subscription.css) */

.acct-header {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 22px 24px;
  margin-bottom: var(--space-xl);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: inset 0 1px var(--card-inset-hi);
}
.acct-avatar {
  width: 56px; height: 56px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--gradient-avatar);
  border: 1px solid rgba(242, 180, 84, 0.30);
  color: var(--gold);
  font-size: 1.5rem; font-weight: 700;
  text-transform: uppercase;
}
.acct-header__main { flex: 1; min-width: 0; }
.acct-header__name {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0;
  font-size: 1.4rem; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.acct-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: rgba(242, 180, 84, 0.12);
  color: var(--gold);
  border: 1px solid rgba(242, 180, 84, 0.25);
  border-radius: 9999px;
  font-size: 0.78rem; font-weight: 600;
}
.acct-ids { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.acct-id {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: var(--hover);
  border: 0.5px solid var(--card-border);
  border-radius: 9999px;
  color: var(--text);
  font-size: 0.78rem;
}
.acct-id--verified { background: rgba(34, 197, 94, 0.10); border-color: rgba(34, 197, 94, 0.30); color: rgba(34, 140, 80, 1); }
html[data-theme="dark"] .acct-id--verified { color: rgba(134, 239, 172, 1); }
.acct-id--muted { color: var(--muted); }
.acct-inviter {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.acct-inviter strong { color: var(--gold); font-weight: 600; }

/* === Component: acct-link-banner ===
   Used by: account.html */

.acct-link-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--card-bg);
  border: 1px solid rgba(242, 180, 84, 0.25);
  border-radius: 14px;
  box-shadow: inset 0 1px var(--card-inset-hi);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms, background 150ms, transform 100ms;
  -webkit-tap-highlight-color: transparent;
  /* Button element reset — раньше banner был только <a>/<form>, после
     добавления PWA install + push enable banners как <button> нужно
     явно zeroing default button browser styling: text-align center,
     font inherit, width auto. На desktop без этого Chrome/Safari
     рендерили button-text по центру и с system font, breaking layout. */
  font: inherit;
  text-align: left;
  width: 100%;
  appearance: none;
}
.acct-link-banner:hover { border-color: rgba(242, 180, 84, 0.45); background: var(--card-bg-strong); text-decoration: none; }
.acct-link-banner:active { transform: scale(0.99); }
.acct-link-banner--form { padding-right: 6px; }

/* Expandable banner — <details> element. summary remains обычный banner,
   при open показывается inline form внизу. CTA "Привязать" заменяется
   на знак ⌄ rotated при expand. */
.acct-link-banner--expandable { display: block; padding: 0; cursor: default; }
.acct-link-banner--expandable > summary {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.acct-link-banner--expandable > summary::-webkit-details-marker { display: none; }
.acct-link-banner--expandable[open] > summary .acct-link-banner__cta {
  opacity: 0.6;
}
.acct-link-banner__expanded {
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(242,180,84,0.18);
  margin-top: 4px;
  display: flex; flex-direction: column; gap: 4px;
}
.acct-link-banner__icon {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(242, 180, 84, 0.12);
  color: var(--gold);
}
.acct-link-banner__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acct-link-banner__body strong { color: var(--text); font-size: 0.94rem; font-weight: 600; }
.acct-link-banner__sub { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.acct-link-banner__cta {
  padding: 8px 14px;
  background: var(--accent-gold); color: #18140F;
  border: 0; border-radius: 9999px;
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; flex: 0 0 auto;
  text-decoration: none;
}
.acct-link-banner__cta:hover { filter: brightness(1.08); }

/* === Component: acct-stats + stat-card ===
   Used by: account.html, subscription_account.html (via subscription.css which can reference these) */

.acct-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: var(--space-xl);
}
.stat-card {
  padding: 18px 20px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: inset 0 1px var(--card-inset-hi);
  text-align: center;
}
.stat-card__val { font-size: 1.7rem; font-weight: 800; color: var(--gold); line-height: 1.1; }
.stat-card__label { margin-top: 6px; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card--link { text-decoration: none; display: block; cursor: pointer; transition: border-color 150ms, transform 100ms; }
.stat-card--link:hover { border-color: rgba(242, 180, 84, 0.30); text-decoration: none; }
.stat-card--link:active { transform: scale(0.98); }

/* === Component: acct-section ===
   Used by: account.html */

.acct-section {
  margin-bottom: var(--space-xl);
  padding: 22px 24px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: inset 0 1px var(--card-inset-hi);
}
@media (max-width: 600px) { .acct-section { padding: 18px 16px; } }
.acct-section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px; flex-wrap: wrap;
}
.acct-section__title {
  margin: 0;
  font-size: 1.05rem; font-weight: 700;
  color: var(--gold);
}
.acct-section__sub {
  margin: 0;
  font-size: 0.88rem; color: var(--muted);
}

/* === Component: row-tile ===
   Used by: account.html, subscription_account.html (via subscription.css) */

.row-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 0.5px solid var(--card-border-strong);
  background: var(--card-bg-alt);
  border-radius: 12px;
  transition: border-color 150ms, background 150ms;
}
.row-tile + .row-tile { margin-top: 8px; }
.row-tile:hover { border-color: rgba(242, 180, 84, 0.30); background: var(--card-bg-alt-hover); }
.row-tile__body { flex: 1; min-width: 0; }
.row-tile__title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.95rem; font-weight: 600;
  color: var(--text);
}
.row-tile__sub {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}
.row-tile__cta { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 600px) {
  .row-tile { flex-wrap: wrap; }
  .row-tile__cta { width: 100%; margin-top: 8px; }
  .row-tile__cta .btn { flex: 1; }
}

/* === Component: legal-shell ===
   Used by: legal_page.html — also shares top-actions / back-pill with news pages */

body:has(.auth-wrap) .honeycomb-bg { display: none; }  /* also covers legal pages that use auth-wrap */
.legal-container {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 64px auto 0;
  display: flex; flex-direction: column;
  gap: 20px;
}
.legal-brand { text-align: center; }
.legal-brand__logo-wrap {
  position: relative; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--card-border-strong);
  background: var(--card-bg-strong);
  box-shadow: var(--shadow-card);
}
.legal-brand__logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.legal-brand h1 {
  margin: 0; font-family: inherit;
  font-size: 28px; line-height: 1.2; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em;
}
.legal-brand__sub { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.legal-card {
  padding: 28px 28px 32px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: inset 0 1px var(--card-inset-hi);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}
.legal-card p { margin: 0 0 14px; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card strong { color: var(--text); font-weight: 700; }
.legal-card h2 { font-size: 1.2rem; font-weight: 700; color: var(--gold); margin: 24px 0 12px; }
.legal-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); margin: 20px 0 10px; }
.legal-card hr { border: 0; height: 1px; background: var(--border); margin: 20px 0; }
.legal-card ul, .legal-card ol { padding-left: 24px; margin: 8px 0 14px; color: var(--text); }
.legal-card li { margin: 6px 0; }
.legal-card a { color: var(--gold); text-decoration: none; }
.legal-card a:hover { text-decoration: underline; }
.legal-card code {
  background: var(--card-bg-alt);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.92em;
  color: var(--text);
}
@media (max-width: 600px) {
  .legal-card { padding: 20px 16px 24px; font-size: 14.5px; }
  .legal-brand h1 { font-size: 22px; }
}

/* === Component: news-card + news-card-body ===
   Used by: news.html (.news-card list items), news_post.html (.news-card-body article) */

.news-card {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: inset 0 1px var(--card-inset-hi);
  color: var(--text);
  text-decoration: none;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.news-card:hover {
  border-color: rgba(242, 180, 84, 0.30);
  transform: translateY(-1px);
  text-decoration: none;
}
.news-card__date {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.news-card__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.news-card__summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.news-card-body {
  padding: 28px 28px 32px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: inset 0 1px var(--card-inset-hi);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
}
.news-card-body p { margin: 0 0 14px; }
.news-card-body p:last-child { margin-bottom: 0; }
.news-card-body strong { color: var(--text); font-weight: 700; }
.news-card-body h1, .news-card-body h2 { font-size: 1.25rem; font-weight: 700; color: var(--gold); margin: 24px 0 12px; }
.news-card-body h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); margin: 20px 0 10px; }
.news-card-body ul, .news-card-body ol { padding-left: 22px; margin: 8px 0 14px; color: var(--text); }
.news-card-body li { margin: 6px 0; }
.news-card-body a { color: var(--gold); text-decoration: none; }
.news-card-body a:hover { text-decoration: underline; }
.news-card-body code {
  background: var(--card-bg-strong);
  border: 0.5px solid var(--card-border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.9em;
}
.news-card-body hr { border: 0; height: 1px; background: var(--border); margin: 24px 0; }

/* === Component: pay-table ===
   Used by: account.html */

.pay-table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.pay-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600; color: var(--muted);
  border-bottom: 0.5px solid var(--card-border-strong);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.pay-table td {
  padding: 12px;
  border-bottom: 0.5px solid var(--card-divider);
  color: var(--text);
}
.pay-table tr:last-child td { border-bottom: 0; }
