/* ═══════════════════════════════════════════════════════════════════════════
   BayRen Reading — Design System
   The brand's sunrise motif: deep navy water, rising gold sun. Warm paper
   surfaces, Playfair display type, disciplined gold accents. Self-hosted
   fonts, zero inline styles (strict CSP).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, no CDN) ─────────────────────────────────────────── */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('../fonts/inter-v20-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/playfair-display-v40-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/playfair-display-v40-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/playfair-display-v40-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans Bengali'; font-style: normal; font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/noto-sans-bengali-var.woff2') format('woff2');
  unicode-range: U+0980-09FF, U+200C-200D, U+25CC;
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --navy-950: #040f1d;
  --navy-900: #061626;
  --navy-800: #08203a;
  --navy-700: #0d3157;
  --navy:     #0b2a49;           /* the sea */
  --navy-100: #dfe7f0;
  --navy-50:  #eef2f7;
  --gold-700: #b08e30;
  --gold-600: #c6a03c;
  --gold:     #d8b04c;           /* the sun */
  --gold-300: #ecd79a;
  --gold-100: #f7ecce;
  --gold-50:  #fbf6e7;

  /* Semantic */
  --bg:          #f8f7f3;        /* warm paper */
  --surface:     #ffffff;
  --surface-2:   #f2f0ea;
  --ink:         #13233a;
  --text:        #33415a;
  --muted:       #71809b;
  --line:        #e6e2d8;
  --line-strong: #d7d2c4;
  --correct:     #1e9e60;
  --correct-bg:  #e8f7ef;
  --wrong:       #d84848;
  --wrong-bg:    #fdeeee;
  --warn:        #b07a1a;
  --warn-bg:     #fdf4e0;

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif;
  --font-bn: 'Noto Sans Bengali', 'Inter', sans-serif;

  /* Shape */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Depth (navy-tinted, soft and layered) */
  --shadow-xs: 0 1px 2px rgba(11,42,73,.05);
  --shadow-sm: 0 1px 3px rgba(11,42,73,.06), 0 4px 12px rgba(11,42,73,.05);
  --shadow-md: 0 2px 6px rgba(11,42,73,.05), 0 12px 32px rgba(11,42,73,.09);
  --shadow-lg: 0 6px 18px rgba(11,42,73,.08), 0 28px 64px rgba(11,42,73,.14);
  --shadow-gold: 0 8px 28px rgba(198,160,60,.30);
  --glow-gold: 0 0 0 5px rgba(216,176,76,.18);

  /* Motion */
  --ease-out: cubic-bezier(.22,.9,.35,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast: .16s var(--ease-out);
  --t-med: .28s var(--ease-out);
  --t-slow: .55s var(--ease-out);

  /* Layout */
  --container: 1140px;
  --header-h: 64px;
}

/* ── Reset & base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--gold-700); }
::selection { background: var(--gold-300); color: var(--navy-900); }
code {
  font-size: .88em; background: var(--surface-2);
  padding: .12em .4em; border-radius: 6px;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.3rem); font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.22rem; font-weight: 600; }
h4 { font-family: var(--font-body); font-size: .8rem; font-weight: 700;
     text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 .6em; }
p { margin: 0 0 1em; }
.bn { font-family: var(--font-bn); line-height: 1.9; }

:focus-visible {
  outline: none;
  box-shadow: var(--glow-gold), 0 0 0 2px var(--surface);
  border-radius: var(--r-xs);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Layout helpers ──────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 620px; margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(2.6rem, 7vw, 4.6rem) 0; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.spread.wrap, .wrap { flex-wrap: wrap; }
.center { text-align: center; }
.grid { display: grid; gap: 1.2rem; }
@media (min-width: 700px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ── Sunrise band ────────────────────────────────────────────────────────── */
.sunrise {
  position: relative;
  background:
    radial-gradient(58% 46% at 50% 0%, rgba(216,176,76,.32) 0%, rgba(216,176,76,.09) 46%, transparent 72%),
    linear-gradient(178deg, var(--navy-800) 0%, var(--navy) 55%, var(--navy-700) 100%);
  color: #e9eef5;
  overflow: hidden;
}
.sunrise h1, .sunrise h2 { color: #fff; }
.hl { color: var(--gold); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-300);
}
.eyebrow::before, .eyebrow::after {
  content: ''; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-600));
}
.eyebrow::after { background: linear-gradient(90deg, var(--gold-600), transparent); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .74rem 1.55rem;
  border: none; border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast),
              background var(--t-fast), color var(--t-fast);
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-gold {
  background: linear-gradient(180deg, #e3bd5e 0%, var(--gold) 45%, var(--gold-600) 100%);
  color: var(--navy-900);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn-gold:hover {
  color: var(--navy-950);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(198,160,60,.42), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn-navy {
  background: linear-gradient(180deg, var(--navy-700) 0%, var(--navy) 60%, var(--navy-800) 100%);
  color: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-navy:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent; color: var(--navy-700);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn-ghost:hover { color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--gold-600); }
.btn-sm { padding: .46rem 1.05rem; font-size: .85rem; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }

/* ── Cards & chips ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-300);
}
.card-gold-top { position: relative; overflow: hidden; }
.card-gold-top::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-600) 50%, var(--gold-300));
}
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .26rem .8rem;
  border-radius: var(--r-pill);
  font-size: .78rem; font-weight: 600;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line);
}
.chip-navy { background: var(--navy-50); color: var(--navy-700); border-color: var(--navy-100); }
.chip-green { background: var(--correct-bg); color: var(--correct); border-color: #bfe8d2; }

/* ── Site header ─────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(6,22,38,.97), rgba(11,42,73,.94));
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(216,176,76,.35);
}
.site-head .inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.logo-chip {
  width: 42px; height: 42px; border-radius: 12px;
  background: #fff; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(11,42,73,.08), var(--shadow-xs);
  padding: 3px;
}
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem;
  color: #fff; letter-spacing: .01em;
}
.head-nav { display: flex; align-items: center; gap: .4rem; }
.head-link {
  color: rgba(255,255,255,.85); font-size: .92rem; font-weight: 500;
  padding: .45rem .95rem; border-radius: var(--r-pill);
  transition: background var(--t-fast), color var(--t-fast);
}
.head-link:hover { color: #fff; background: rgba(255,255,255,.09); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
  margin-top: 2rem;
  color: var(--muted); font-size: .9rem;
}
.site-foot a { font-weight: 600; }
.foot-tag { font-size: .84rem; color: var(--muted); font-style: italic; }

/* ── Library hero ────────────────────────────────────────────────────────── */
.hero { text-align: center; }
.hero-inner { position: relative; z-index: 2; padding: clamp(3.2rem, 8vw, 5rem) 20px clamp(4.4rem, 9vw, 6.2rem); }
.hero h1 { margin: .9rem auto .8rem; max-width: 18ch; }
.hero .lead {
  font-size: clamp(1rem, 2vw, 1.16rem); font-weight: 300;
  color: #bccadb; max-width: 56ch; margin: 0 auto;
}
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; z-index: 1; }
.hero-wave svg { width: 100%; height: 60px; display: block; }

/* ── Stats band (overlaps the wave) ──────────────────────────────────────── */
.stats-band { position: relative; z-index: 3; margin-top: -2.6rem; }
.stats-strip {
  display: flex; align-items: center; gap: 1.4rem;
  padding: 1.1rem 1.5rem;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.stats-strip[hidden] { display: none; }
.stat { display: flex; align-items: center; gap: .8rem; flex: 1; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 1.4rem; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-value {
  font-family: var(--font-display); font-weight: 700; font-size: 1.28rem;
  color: var(--ink); line-height: 1.2; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stat-label { font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.stat-ring { width: 44px; height: 44px; flex: 0 0 44px; transform: rotate(-90deg); }
.stat-ring-track { fill: none; stroke: var(--line); stroke-width: 5; }
.stat-ring-fill {
  fill: none; stroke: var(--gold-600); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 119.4; stroke-dashoffset: 119.4;
  transition: stroke-dashoffset .9s var(--ease-out);
}
.stats-empty p { margin: 0; color: var(--muted); font-size: .95rem; }
.stats-empty-cta { color: var(--gold-700); font-weight: 600; }
#stat-weak { cursor: pointer; }
#stat-weak:hover { color: var(--gold-700); }

/* ── Skills breakdown (expandable, under the stats strip) ────────────────── */
.skills-wrap { margin-top: .75rem; }
.skills-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  background: none; border: none; padding: .3rem .2rem;
  font-size: .86rem; font-weight: 600; color: var(--navy-700);
  cursor: pointer;
}
.skills-toggle:hover { color: var(--gold-700); }
.skills-caret { font-size: .72rem; transition: transform var(--t-fast); }
.skills-toggle.open .skills-caret { transform: rotate(180deg); }
.skills-panel { margin-top: .55rem; padding: .9rem 1.1rem; display: grid; gap: .4rem; }
.skills-panel[hidden] { display: none; }
.skill-row {
  display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(90px, 220px);
  align-items: center; gap: .85rem;
  background: none; border: none; padding: .34rem .4rem;
  font: inherit; font-size: .88rem; color: var(--ink); text-align: left;
  border-radius: var(--r-xs); cursor: pointer;
  transition: background var(--t-fast);
}
.skill-row:hover { background: var(--gold-50); }
.skill-score { font-weight: 700; color: var(--navy-700); font-variant-numeric: tabular-nums; }
.skill-bar {
  display: block; height: 7px; border-radius: 4px;
  background: var(--surface-2); overflow: hidden;
}
.skill-bar-fill {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-600));
}
@media (max-width: 720px) {
  .skill-row { grid-template-columns: 1fr auto; }
  .skill-bar { grid-column: 1 / -1; }
}

/* ── Filter row ──────────────────────────────────────────────────────────── */
.library-section { padding-top: 2.2rem; }
.filter-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem;
}
.filter-chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip-filter { cursor: pointer; transition: all var(--t-fast); }
.chip-filter:hover { border-color: var(--gold-600); color: var(--navy); }
.chip-filter.active {
  background: var(--navy); color: #fff; border-color: var(--navy);
  box-shadow: var(--shadow-xs);
}
.type-filter select {
  font: inherit; font-size: .88rem; font-weight: 500; color: var(--ink);
  padding: .5rem 2.2rem .5rem 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2371809b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center;
  cursor: pointer;
}

/* ── Passage cards ───────────────────────────────────────────────────────── */
.pgrid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
}
.pcard { display: flex; flex-direction: column; gap: .75rem; padding: 1.45rem 1.45rem 1.25rem; }
.pcard.filtered-out { display: none; }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.diff-dots { display: inline-flex; gap: 4px; }
.diff-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-strong); display: inline-block;
}
.diff-1 i:nth-child(1) { background: var(--gold-600); }
.diff-2 i:nth-child(-n+2) { background: var(--gold-600); }
.diff-3 i { background: var(--gold-600); }
.pcard-title { margin: 0; font-size: 1.32rem; line-height: 1.25; }
.pcard-title a { color: var(--ink); transition: color var(--t-fast); }
.pcard-title a:hover { color: var(--navy-700); }
.pcard-badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.type-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--navy-700); background: var(--navy-50);
  border: 1px solid var(--navy-100); border-radius: 6px;
  padding: .18rem .5rem;
}
.pcard-foot {
  margin-top: auto; padding-top: .8rem; border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
}
.pcard-meta { font-size: .82rem; color: var(--muted); }
.pcard-state { display: inline-flex; align-items: center; gap: .5rem; }
.pcard-best {
  font-size: .8rem; font-weight: 700; color: var(--correct);
  background: var(--correct-bg); border: 1px solid #bfe8d2;
  border-radius: var(--r-pill); padding: .2rem .65rem;
}
.grid-empty { color: var(--muted); text-align: center; padding: 2.5rem 0; }
.noscript-note {
  margin: 1.4rem auto 0; text-align: center; color: var(--muted); font-size: .9rem;
}

/* Reveal-on-scroll (library cards) */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.shown {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}

/* ── Error pages ─────────────────────────────────────────────────────────── */
.error-card { padding: 3rem 2rem; }
.error-logo { margin: 0 auto 1rem; }

@media (max-width: 720px) {
  .stats-strip { flex-direction: column; align-items: stretch; gap: .9rem; padding: 1.1rem 1.2rem; }
  .stat + .stat { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: .9rem; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .type-filter select { width: 100%; }
}

/* ═══ Landing page ══════════════════════════════════════════════════════════ */
.btn-lg { padding: .92rem 1.9rem; font-size: 1.02rem; }
.btn-xs { padding: .32rem .72rem; font-size: .76rem; }
.btn-block { width: 100%; }
.btn-ghost-light {
  background: rgba(255,255,255,.06); color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4);
}
.btn-ghost-light:hover { color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1.5px var(--gold); }

.landing-hero .hero-inner { padding-bottom: clamp(5rem, 10vw, 7rem); }
.hero-cta {
  display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap;
  margin: 1.7rem 0 1rem;
}
.hero-note { font-size: .86rem; color: #9fb0c6; letter-spacing: .02em; margin: 0; }

.eyebrow-ink { color: var(--gold-700); }
.eyebrow-ink::before { background: linear-gradient(90deg, transparent, var(--gold-600)); }

.feature-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.feature { text-align: left; }
.feature h3 { margin: .7rem 0 .35rem; font-size: 1.12rem; }
.feature p { margin: 0; color: var(--text); font-size: .95rem; }
.feature-ic {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--gold-50); border: 1px solid var(--gold-300);
  font-size: 1.35rem;
}

.section-tint { background: var(--surface-2); }
.how-wrap { max-width: 720px; margin: 0 auto; text-align: center; }
.how-wrap h2 { margin: .8rem 0 1.6rem; }
.steps {
  list-style: none; margin: 0 auto 1.8rem; padding: 0;
  display: grid; gap: 1rem; text-align: left; max-width: 560px;
}
.steps li { display: flex; align-items: flex-start; gap: .9rem; }
.step-n {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
}
.step-t { color: var(--text); padding-top: .25rem; }
.step-t strong { color: var(--ink); }
.how-consent { max-width: 520px; margin: 1.3rem auto 0; font-size: .82rem; color: var(--muted); }

/* ═══ Auth / form cards ═════════════════════════════════════════════════════ */
.auth-card { max-width: 480px; margin: 0 auto; padding: 2rem 1.9rem; }
.auth-title { margin: 0 0 .3rem; font-size: 1.7rem; }
.auth-sub { color: var(--muted); font-size: .95rem; margin: 0 0 1.4rem; }
.auth-form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field-label { font-size: .82rem; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.auth-form input, .auth-form select {
  font: inherit; font-size: .96rem; color: var(--ink);
  padding: .7rem .85rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.auth-form input:focus-visible, .auth-form select:focus-visible {
  border-color: var(--gold-600); box-shadow: var(--glow-gold);
}
.auth-form select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2371809b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center;
}
.consent {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .88rem; color: var(--text); line-height: 1.5;
}
.consent input { margin-top: .18rem; width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--gold-600); }
.auth-form .btn-block { margin-top: .3rem; }
.auth-alt { text-align: center; margin: 1.2rem 0 0; font-size: .9rem; color: var(--muted); }
.auth-alt a { font-weight: 600; }
.form-error {
  background: var(--wrong-bg); color: var(--wrong);
  border: 1px solid #f2c9c9; border-radius: var(--r-sm);
  padding: .7rem .95rem; font-size: .9rem; margin-bottom: 1.1rem;
}
.reset-hint { margin: -.2rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.reset-hint b { color: var(--navy-700); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice-mark {
  width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 20px;
  background: var(--gold-50); border: 1px solid var(--gold-300);
  display: grid; place-items: center;
}
.notice-msg { color: var(--text); font-size: 1rem; margin: 0 auto 1.5rem; max-width: 42ch; }

/* ═══ Admin console ═════════════════════════════════════════════════════════ */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.admin-title { margin: 0 0 .2rem; }
.admin-sub { margin: 0; color: var(--muted); font-size: .95rem; }
.admin-stats { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.astat {
  flex: 1; min-width: 110px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-xs);
  padding: .9rem 1.1rem; display: flex; flex-direction: column;
}
.astat-hi { border-color: var(--gold-300); background: var(--gold-50); }
.astat-n { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--ink); line-height: 1.1; }
.astat-l { font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.admin-filter { margin-bottom: 1.2rem; }
.admin-filter .chip-filter { cursor: pointer; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 820px; }
.admin-table th {
  text-align: left; padding: .7rem .9rem;
  background: var(--navy-50); color: var(--navy-800);
  font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
}
.admin-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.cell-name { font-weight: 600; }
.nowrap { white-space: nowrap; }
.status-pill {
  display: inline-block; padding: .18rem .6rem; border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 700; text-transform: capitalize;
}
.status-active { background: var(--correct-bg); color: var(--correct); }
.status-blocked { background: var(--wrong-bg); color: var(--wrong); }
.status-pending { background: var(--warn-bg); color: var(--warn); }
.status-unconfirmed { background: var(--surface-2); color: var(--muted); }
.email-ok { color: var(--correct); font-weight: 700; margin-left: .3rem; }
.email-no { color: var(--muted); font-size: .78rem; margin-left: .3rem; white-space: nowrap; }

/* Privacy / prose page */
.prose { max-width: 640px; margin: 0 auto; }
.prose h3 { margin: 1.4rem 0 .4rem; font-size: 1.08rem; }
.prose p { color: var(--text); line-height: 1.7; margin: 0 0 .8rem; }
.admin-row-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.admin-row-actions form { margin: 0; }

.reset-banner {
  background: var(--gold-50); border: 1px solid var(--gold-300);
  border-radius: var(--r-md); padding: 1rem 1.2rem; margin-bottom: 1.3rem;
  font-size: .95rem; color: var(--ink); line-height: 1.6;
}
.reset-pw {
  display: inline-block; margin: 0 .3rem;
  font-size: 1.05rem; font-weight: 700; letter-spacing: .06em;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-xs); padding: .1rem .55rem; color: var(--navy-800);
}
.reset-note { display: block; margin-top: .3rem; font-size: .8rem; color: var(--muted); }

/* "Keep me signed in" row on the auth forms */
.remember {
  display: flex; align-items: center; gap: .55rem;
  font-size: .9rem; color: var(--text); cursor: pointer;
}
.remember input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--gold-600); }
