/* ============================================================
   DigiSafe — custom_styles.css  (Premium Overhaul)
   Single source of truth for all visual design.
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Design Tokens (Light Mode) ─────────────────────────── */
:root {
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --color-primary:   #6366F1;   /* indigo         */
  --color-secondary: #8B5CF6;   /* violet         */
  --color-accent:    #F59E0B;   /* amber          */
  --color-cyan:      #06B6D4;   /* cyan           */
  --color-danger:    #EF4444;
  --color-success:   #10B981;
  --color-pink:      #EC4899;

  --bg:           #F0F4FF;
  --bg-card:      #FFFFFF;
  --bg-topbar:    #0A0F1E;
  --bg-navbar:    rgba(255,255,255,0.92);

  --text-main:    #0F172A;
  --text-muted:   #475569;
  --text-light:   #94A3B8;
  --text-on-dark: #E2E8F0;

  --border:       #E2E8F0;
  --border-glow:  rgba(99,102,241,0.3);
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 24px rgba(0,0,0,.1);
  --shadow-lg:    0 12px 48px rgba(0,0,0,.15);
  --shadow-glow:  0 0 40px rgba(99,102,241,0.25);

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  36px;

  --topbar-h:  44px;
  --navbar-h:  70px;

  --gradient-hero:    linear-gradient(135deg, #0A0F1E 0%, #0F172A 40%, #1a1040 100%);
  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --gradient-warm:    linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --gradient-cool:    linear-gradient(135deg, #06B6D4 0%, #6366F1 100%);
  --gradient-glass:   linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
}

/* ── Dark Mode Tokens ──────────────────────────────────── */
.dark {
  --bg:        #070C1A;
  --bg-card:   #0E1628;
  --bg-navbar: rgba(10,15,30,0.94);

  --text-main:  #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #475569;

  --border:     #1E2D47;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.5);
  --shadow-md:  0 4px 24px rgba(0,0,0,.6);
  --shadow-glow: 0 0 60px rgba(99,102,241,0.35);
}

/* Prevent white flash — apply bg colour directly on html element */
html { background: #F0F4FF; }
html.dark { background: #070C1A; }

/* Smooth page-transition fade-in (replaces the flash) */
body { animation: pageIn .18s ease-out both; }
@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Malayalam Language Font Stack ──────────────────── */
/* Applied by JS when user switches to Malayalam (adds body.mal-active) */
body.mal-active {
  font-family: 'Noto Sans Malayalam', 'Manjari', 'Rachana', serif;
  font-size: 0.96em;     /* Slightly smaller than default for better density */
  line-height: 1.85;
  letter-spacing: 0.005em;
  word-break: break-word;
}
body.mal-active h1, body.mal-active h2, body.mal-active h3 {
  font-family: 'Noto Sans Malayalam', serif;
  font-weight: 700;
  line-height: 1.45;
}
body.mal-active strong { font-weight: 700; }

/* Navbar in Malayalam — prevent overflow, shrink font */
body.mal-active .nav-links a {
  font-size: .78rem;
  letter-spacing: 0;
  white-space: nowrap;
  padding: 0.3rem 0.45rem;
}
body.mal-active .nav-links {
  gap: 0.1rem;
}
body.mal-active .btn {
  font-size: .78rem;
  padding: .45rem .85rem;
}

/* Legacy selectors kept for backward compat */
:lang(ml), .lang-ml, [lang="ml"] {
  font-family: 'Noto Sans Malayalam', 'Manjari', 'Rachana', serif;
  line-height: 1.85;
  word-break: break-word;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  transition: background .4s, color .4s;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── TOP BAR ──────────────────────────────────────────────── */
.topbar {
  background: var(--bg-topbar);
  color: var(--text-on-dark);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  font-size: .8rem;
  font-family: var(--font-body);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(99,102,241,0.15);
}

.topbar-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-left .skip-link {
  background: none;
  border: none;
  color: var(--text-on-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  padding: .25rem .5rem;
  border-radius: var(--radius-sm);
  transition: color .2s;
  opacity: 0.7;
}
.topbar-left .skip-link:hover { color: var(--color-accent); opacity: 1; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Dark Mode Toggle */
#darkModeToggle {
  background: none;
  border: none;
  color: var(--text-on-dark);
  cursor: pointer;
  padding: .3rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color .2s, transform .3s;
}
#darkModeToggle:hover { color: var(--color-accent); transform: rotate(20deg); }
.hidden { display: none !important; }

/* Font Resizers */
.font-resizers {
  display: flex;
  align-items: center;
  gap: .5rem;
  border-left: 1px solid rgba(255,255,255,.15);
  padding-left: 1.25rem;
}
.font-resizers button {
  background: none;
  border: none;
  color: var(--text-on-dark);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  transition: color .2s;
  line-height: 1;
  opacity: 0.7;
}
.font-resizers button:nth-child(1) { font-size: 1.1rem; }
.font-resizers button:nth-child(2) { font-size: .95rem; }
.font-resizers button:nth-child(3) { font-size: .75rem; }
.font-resizers button:hover { color: var(--color-accent); opacity: 1; }

/* Language Selector */
.language-dropdown {
  border-left: 1px solid rgba(255,255,255,.15);
  padding-left: 1.25rem;
}
.language-dropdown select {
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  color: var(--text-on-dark);
  padding: .25rem .5rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}
.language-dropdown select:hover { border-color: var(--color-primary); }
.language-dropdown select option { background: #0A0F1E; color: #fff; }

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
  background: var(--bg-navbar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  height: var(--navbar-h);
  border-bottom: 1px solid rgba(99,102,241,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  position: sticky;
  top: var(--topbar-h);
  z-index: 99;
  transition: background .3s, box-shadow .3s;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.dark .logo {
  background: linear-gradient(135deg, #818CF8 0%, #A78BFA 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.logo .accent {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo .logo-icon { font-size: 1.5rem; -webkit-text-fill-color: initial; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-links a {
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s, background .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width .25s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 60%; }
.nav-links a:hover,
.nav-links a.active { color: var(--color-primary); background: rgba(99,102,241,.07); }
.dark .nav-links a:hover,
.dark .nav-links a.active { color: #818CF8; background: rgba(99,102,241,.12); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.btn-login {
  padding: .5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  transition: all .22s;
  background: transparent;
}
.btn-login:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,.35);
  transform: translateY(-1px);
}
.dark .btn-login { color: #818CF8; border-color: #818CF8; }
.dark .btn-login:hover { background: #6366F1; color: #fff; border-color: #6366F1; }

.btn-register {
  padding: .5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 700;
  background: var(--gradient-primary);
  color: #fff;
  transition: all .22s;
  box-shadow: 0 4px 16px rgba(99,102,241,.4);
  border: none;
}
.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,.55);
  filter: brightness(1.1);
}

.btn-logout {
  padding: .5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-danger);
  border: 1.5px solid var(--color-danger);
  transition: all .2s;
  background: transparent;
}
.btn-logout:hover { background: var(--color-danger); color: #fff; transform: translateY(-1px); }

/* Hamburger */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: .3rem;
}

/* ── HERO SECTION ─────────────────────────────────────────── */
.hero {
  position: relative;
  height: 88vh;
  min-height: 600px;
  overflow: hidden;
  background: #060C1A;
}

/* Animated noise grid overlay for the hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(99,102,241,0.18) 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(139,92,246,0.15) 0%, transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(6,182,212,0.12) 0%, transparent 50%);
  z-index: 3;
  pointer-events: none;
  animation: heroAura 8s ease-in-out infinite alternate;
}

@keyframes heroAura {
  0%   { opacity: 0.7; }
  100% { opacity: 1; }
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}
.slide.active { opacity: 1; z-index: 1; }

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 8s ease-out;
}
.slide.active img { transform: scale(1); }

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(6,9,22,0.92) 0%,
    rgba(10,15,30,0.75) 50%,
    rgba(10,15,30,0.35) 100%
  );
  z-index: 2;
}

.slide-content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
  left: 0;
  right: 0;
}

/* Module badge */
.slide-content > span:first-child {
  display: inline-flex !important;
  align-items: center;
  gap: .5rem;
  padding: .35rem 1rem !important;
  border-radius: 100px;
  background: rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  font-size: .78rem !important;
  letter-spacing: 2px !important;
  font-family: var(--font-mono);
  margin-bottom: 1.5rem !important;
  animation: fadeUp .5s ease both;
}

.slide-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.2rem;
  text-shadow: 0 4px 32px rgba(0,0,0,.5);
  animation: fadeUp .6s .08s ease both;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 700px;
}

.slide-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(226,232,240,0.85);
  margin-bottom: 2.5rem;
  max-width: 580px;
  animation: fadeUp .6s .18s ease both;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  animation: fadeUp .6s .3s ease both;
}

/* Slide indicators */
.slide-dots {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  z-index: 10;
  display: flex;
  gap: .5rem;
  align-items: center;
}
.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  border: none;
  cursor: pointer;
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  padding: 0;
}
.slide-dot.active {
  background: var(--color-accent);
  width: 32px;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(245,158,11,.6);
}

/* Slide progress bar */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 20;
  animation: slideProgress 5s linear infinite;
}

@keyframes slideProgress {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}
.btn:hover::after { background: rgba(255,255,255,0.08); }

.btn-primary {
  background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(245,158,11,.45);
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px rgba(245,158,11,.6);
}
.btn-outline-white {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,.4);
  color: #fff;
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.18);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ── CORE CAPABILITIES (UTILITIES) SECTION ────────────────── */
.section-utilities {
  padding: 1rem 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.section-utilities::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* ── STATS SECTION ────────────────────────────────────────── */
.section-stats {
  padding: 6rem 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.section-stats::before {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: .6rem;
  letter-spacing: -0.02em;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity .3s;
}
.stat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 68px; height: 68px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.5rem;
  transition: transform .3s;
}
.stat-card:hover .stat-icon { transform: scale(1.1) rotate(-5deg); }

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: .5rem;
  letter-spacing: -0.02em;
}
.stat-label {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-main);
  margin-bottom: .35rem;
}
.stat-note {
  font-size: .8rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ── MASCOTS SECTION ──────────────────────────────────────── */
.section-mascots {
  padding: 7rem 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.section-mascots::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 50%, rgba(99,102,241,0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 50%, rgba(239,68,68,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.dark .section-mascots {
  background: #070C1A;
}

.mascot-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-bottom: 6rem;
}
.mascot-row:last-child { margin-bottom: 0; }
.mascot-row.reverse { direction: rtl; }
.mascot-row.reverse > * { direction: ltr; }

.mascot-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.mascot-image-wrap::before {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
}

.mascot-row:nth-child(2) .mascot-image-wrap::before {
  background: radial-gradient(circle, rgba(239,68,68,0.15) 0%, transparent 70%);
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.1); opacity: 1; }
}

.mascot-img {
  width: 300px;
  max-width: 100%;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,.3));
  transition: transform .5s cubic-bezier(.34,1.56,.64,1), filter .5s;
  cursor: pointer;
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
.mascot-img.rogue-float { animation: float 7s ease-in-out infinite .5s; }

.mascot-img:hover {
  transform: scale(1.12) rotate(-3deg);
  filter: drop-shadow(0 32px 64px rgba(0,0,0,.45));
}
.mascot-row.reverse .mascot-img:hover { transform: scale(1.12) rotate(3deg); }

.mascot-content {
  position: relative;
}

.mascot-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.mascot-content p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.75rem;
  line-height: 1.8;
}
.mascot-traits { display: flex; flex-direction: column; gap: .75rem; }
.mascot-trait {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-main);
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s;
}
.mascot-trait:hover { transform: translateX(4px); border-color: var(--color-primary); }
.mascot-row.reverse .mascot-trait:hover { transform: translateX(-4px); }

.trait-dot {
  width: 24px; height: 24px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.dot-green  { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); color: #059669; }
.dot-red    { background: linear-gradient(135deg, #FEE2E2, #FECACA); color: #DC2626; }

/* ── DASHBOARD CARD (used in utilities) ───────────────────── */
.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s, border-color .3s;
}
.dashboard-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-glow);
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-topbar);
  color: var(--text-on-dark);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand .logo {
  background: linear-gradient(135deg, #818CF8, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  display: inline-block;
}
.footer-brand p { color: #64748B; font-size: .875rem; line-height: 1.75; }
.footer-col h4 { font-weight: 600; margin-bottom: 1.25rem; font-size: .85rem; color: #94A3B8; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a {
  display: block;
  color: #475569;
  font-size: .875rem;
  margin-bottom: .65rem;
  transition: color .2s, transform .2s;
  transform: translateX(0);
}
.footer-col a:hover { color: var(--color-accent); transform: translateX(4px); }
.footer-bottom {
  border-top: 1px solid #0F172A;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
  color: #334155;
}

/* ── AUTH PAGES ───────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #06091A 0%, #0F172A 50%, #1a0f3a 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.auth-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(99,102,241,0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139,92,246,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.auth-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  padding: 2.75rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  position: relative;
  z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo .logo {
  justify-content: center;
  font-size: 1.7rem;
  background: linear-gradient(135deg, #818CF8, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-card h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #F1F5F9;
  text-align: center;
  margin-bottom: .4rem;
  letter-spacing: -0.02em;
}
.auth-card .subtitle {
  text-align: center;
  color: #64748B;
  font-size: .9rem;
  margin-bottom: 2rem;
}

.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: .83rem;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05);
  color: #F1F5F9;
  font-size: .95rem;
  font-family: var(--font-body);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.2);
  background: rgba(99,102,241,.06);
}
.form-group input::placeholder { color: #475569; }
.dark .form-group input,
.dark .form-group select { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.06); }

.age-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.btn-auth {
  width: 100%;
  padding: .9rem;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: .75rem;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 4px 20px rgba(99,102,241,.45);
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99,102,241,.6); filter: brightness(1.1); }

.auth-alt {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: #475569;
}
.auth-alt a { color: #818CF8; font-weight: 600; transition: color .2s; }
.auth-alt a:hover { color: #A78BFA; }

.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 1rem;
  display: none;
}
.alert-error   { background: rgba(239,68,68,.12); color: #FCA5A5; border: 1px solid rgba(239,68,68,.2); }
.alert-success { background: rgba(16,185,129,.12); color: #6EE7B7; border: 1px solid rgba(16,185,129,.2); }
.alert.show    { display: block; }

/* ── DASHBOARD ────────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - var(--topbar-h) - var(--navbar-h));
}

.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: calc(var(--topbar-h) + var(--navbar-h));
  height: calc(100vh - var(--topbar-h) - var(--navbar-h));
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-light);
  padding: .75rem 1.5rem .4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.5rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover { color: var(--color-primary); background: rgba(99,102,241,.06); border-left-color: var(--color-primary); }
.sidebar-link.active { color: var(--color-primary); background: rgba(99,102,241,.08); border-left-color: var(--color-primary); font-weight: 600; }
.dark .sidebar-link:hover,
.dark .sidebar-link.active { color: #818CF8; background: rgba(99,102,241,.1); border-left-color: #818CF8; }
.sidebar-link span { font-size: 1.1rem; }

.main-content { padding: 2rem; background: var(--bg); }

.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.dashboard-header p { color: var(--text-muted); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.card-icon { font-size: 2rem; margin-bottom: .75rem; }
.card-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
}
.card-label { font-size: .85rem; color: var(--text-muted); margin-top: .2rem; }

/* Hygiene Meter */
.meter-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.meter-svg { transform: rotate(-90deg); }
.meter-text { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; fill: var(--text-main); }

/* ── UTILITY PAGES (About, FAQ, etc.) ─────────────────────── */
.page-hero {
  background: var(--gradient-hero);
  color: #fff;
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(99,102,241,0.25) 0%, transparent 55%),
    radial-gradient(circle at 70% 50%, rgba(139,92,246,0.2) 0%, transparent 55%);
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 700;
  margin-bottom: .75rem;
  letter-spacing: -0.02em;
  position: relative;
}
.page-hero p { font-size: 1.1rem; color: rgba(255,255,255,.75); max-width: 600px; margin: 0 auto; position: relative; }

.page-body { padding: 4rem 0; }
.page-body h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2rem 0 .75rem;
}
.page-body p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.8; }
.page-body ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.page-body ul li { color: var(--text-muted); margin-bottom: .4rem; list-style: disc; }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: .75rem;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item:hover { border-color: var(--border-glow); }
.faq-question {
  width: 100%;
  background: var(--bg-card);
  border: none;
  padding: 1.2rem 1.5rem;
  text-align: left;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .2s;
}
.faq-question:hover { background: rgba(99,102,241,.04); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  background: var(--bg-card);
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.75;
}
.faq-answer.open { max-height: 300px; padding: .75rem 1.5rem 1.25rem; }
.faq-arrow { transition: transform .3s; }
.faq-arrow.open { transform: rotate(180deg); }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-16px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

.fade-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ───────────────────────────────────────────── */

/* ── 1100px: compact navbar ─────────────── */
@media (max-width: 1100px) {
  .navbar-container { gap: .75rem; }
  .nav-links a { padding: .45rem .65rem; font-size: .82rem; }
  .font-resizers { display: none; }
}

/* ── 1024px: switch to hamburger ─────────── */
@media (max-width: 1024px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(99,102,241,.08);
    border: 1px solid rgba(99,102,241,.15);
    transition: background .2s;
  }
  .mobile-menu-toggle:hover { background: rgba(99,102,241,.18); }

  /* ── Mobile drawer ── */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: calc(var(--topbar-h, 36px) + var(--navbar-h, 64px));
    left: 0; right: 0;
    background: rgba(8,12,28,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(99,102,241,.18);
    padding: .75rem 1.25rem;
    gap: .2rem;
    z-index: 999;
    animation: drawerSlide .22s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
  }
  .nav-actions.open {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .5rem 0 .25rem;
    margin-top: .35rem;
    border-top: 1px solid rgba(99,102,241,.2);
  }
  .nav-links.open a {
    padding: .75rem 1rem;
    border-radius: 10px;
    font-size: .95rem;
    color: rgba(241,245,249,.85);
    border-left: 2px solid transparent;
    transition: background .15s, border-color .15s;
  }
  .nav-links.open a:hover,
  .nav-links.open a.active {
    background: rgba(99,102,241,.12);
    border-left-color: #818CF8;
    color: #818CF8;
  }
  .nav-actions.open .btn-login,
  .nav-actions.open .btn-logout {
    width: 100%; text-align: center;
    padding: .75rem; border-radius: 10px;
  }
  .nav-actions.open .btn-register {
    width: 100%; text-align: center;
    padding: .8rem; border-radius: 10px;
    display: block;
  }

  /* overlay backdrop — must be BELOW the drawer (drawer teleports to body at z-index:999) */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 80;
    animation: fadeIn .2s ease;
  }

  @keyframes drawerSlide {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
  }

  .topbar-left .skip-link span { display: none; }
  .hero { height: 75vh; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .slide-content { padding: 0 1.5rem; }
  .auth-card { padding: 2rem; }
  .slide-dots { left: 1.5rem; }
}

/* ── 900px: content layout ───────────────── */
@media (max-width: 900px) {
  .mascot-row { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .mascot-row.reverse { direction: ltr; }
  .mascot-trait { justify-content: center; }
  .mascot-row .mascot-image-wrap { order: -1; }
}

/* ── 680px: small phone tweaks ───────────── */
@media (max-width: 680px) {
  .language-dropdown select { font-size: .72rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .topbar { height: 38px; }
  .topbar-container { padding: 0 1rem; gap: .5rem; }
  .topbar-right { gap: .6rem; }
  .topbar-left .skip-link span { display: none; }
}

/* ── 480px: hide topbar on small phones ─── */
@media (max-width: 480px) {
  .topbar { display: none; }
  .navbar { top: 0; position: sticky; }
}

/* ── Back-to-Top Button ──────────────────── */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 24px rgba(99,102,241,.45);
  z-index: 500;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(99,102,241,.6);
}

/* ══════════════════════════════════════════════════════════════
   COMPREHENSIVE DARK MODE FIXES — Landing Page
   Fixes all cases where text or backgrounds were hardcoded to
   light values and disappeared when dark mode was activated.
══════════════════════════════════════════════════════════════ */

/* Stat icon — hardcoded #EFF6FF becomes invisible blue tint in dark */
.dark .stat-icon {
  background: rgba(99,102,241,0.15) !important;
}

/* Mascot section section-header headings */
.dark .section-mascots .section-header h2,
.dark .section-header h2 {
  color: var(--text-main);
}
.dark .section-mascots .section-header p,
.dark .section-header p {
  color: var(--text-muted);
}

/* Mascot card headings — h2 inside dashboard-card on mascots section */
.dark .section-mascots .dashboard-card h2,
.dark .section-mascots .mascot-content h2 {
  color: var(--text-main) !important;
}

/* Mascot description paragraph */
.dark .section-mascots .mascot-content p {
  color: var(--text-muted) !important;
}

/* Trait list items */
.dark .section-mascots .mascot-trait {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: var(--text-main);
}
.dark .section-mascots .mascot-trait span {
  color: var(--text-main);
}

/* Mascot image wrap — Ray's light blue tint */
.dark .section-mascots .mascot-image-wrap {
  background: rgba(99,102,241,0.08) !important;
  border-color: rgba(99,102,241,0.15) !important;
}

/* Hero section big headings */
.dark .hero-title,
.dark .slide-title,
.dark .hero h1,
.dark .slide-content h1,
.dark .slide-content h2 {
  color: #F1F5F9 !important;
}
.dark .hero-subtitle,
.dark .slide-content p {
  color: #94A3B8 !important;
}

/* Stat card hardcoded bg overrides */
.dark .stat-card {
  background: var(--bg-card);
  border-color: var(--border);
}
.dark .stat-value { color: inherit; }
.dark .stat-label { color: var(--text-main); }
.dark .stat-note  { color: var(--text-muted); }

/* Section header used outside mascots section too */
.dark .section-header h2 { color: var(--text-main); }
.dark .section-header p  { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY PANEL  (Ctrl+F2)
═══════════════════════════════════════════════════════════ */

/* Floating trigger button */
#a11y-trigger {
  position: fixed;
  bottom: 5.2rem;        /* just above Back-to-Top */
  right: 1.25rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 800;
  box-shadow: 0 4px 18px rgba(99,102,241,.45);
  transition: transform .2s, box-shadow .2s;
}
#a11y-trigger:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(99,102,241,.6); }

/* Overlay */
#a11y-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1100;
  backdrop-filter: blur(2px);
}
#a11y-overlay.open { display: block; }

/* Panel */
#a11y-panel {
  position: fixed;
  bottom: 1rem; right: 1rem;
  width: 360px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  z-index: 1200;
  transform: translateY(20px) scale(.95);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s;
}
#a11y-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Panel header */
.a11y-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 1rem .75rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.a11y-title { font-weight: 700; font-size: .95rem; flex: 1; color: var(--text-main); }
.a11y-shortcut {
  font-size: .7rem;
  background: var(--color-primary);
  color: #fff;
  padding: .15rem .55rem;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: .03em;
}
.a11y-close-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem;
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.a11y-close-btn:hover { background: var(--bg-hover, #f1f5f9); color: var(--text-main); }

/* Grid of buttons */
.a11y-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  padding: .75rem;
}

/* Wide cell (spans full row) */
.a11y-cell-wide {
  grid-column: 1 / -1;
  background: var(--bg-hover, #f8fafc);
  border-radius: 10px;
  padding: .5rem .75rem;
  border: 1px solid var(--border, #e2e8f0);
}
.a11y-row-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
}
.a11y-font-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.a11y-scale-display {
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 40px;
  text-align: center;
}

/* Individual icon buttons */
.a11y-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .65rem .5rem;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--bg-card, #fff);
  cursor: pointer;
  color: var(--text-main);
  font-size: .68rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  min-height: 72px;
}
.a11y-icon-btn:hover { background: var(--bg-hover, #f8fafc); border-color: var(--color-primary); transform: translateY(-1px); }
.a11y-icon-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.a11y-icon-btn.a11y-on {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 3px 12px rgba(99,102,241,.4);
}

/* Font-row sub-buttons */
.a11y-font-row .a11y-icon-btn {
  min-height: auto;
  padding: .4rem .6rem;
  flex-direction: row;
  gap: .4rem;
}
.a11y-font-row .a11y-icon-btn svg { width: 20px; height: 20px; }

/* Footer reset button */
.a11y-footer {
  padding: .75rem;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  justify-content: center;
}
.a11y-reset-btn {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1.4rem;
  border-radius: 30px;
  background: var(--bg-hover, #f1f5f9);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
  justify-content: center;
}
.a11y-reset-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* Dark mode panel */
.dark #a11y-panel {
  background: #1E293B;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.dark .a11y-icon-btn { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: #f1f5f9; }
.dark .a11y-icon-btn:hover { background: rgba(255,255,255,.12); }
.dark .a11y-cell-wide { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.dark .a11y-close-btn:hover { background: rgba(255,255,255,.08); }
.dark .a11y-reset-btn { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #f1f5f9; }
.dark .a11y-reset-btn:hover { background: rgba(220,38,38,.15); color: #fca5a5; border-color: rgba(220,38,38,.3); }

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY FEATURE CLASSES
═══════════════════════════════════════════════════════════ */
.a11y-text-spacing * { letter-spacing: .12em !important; word-spacing: .2em !important; }
.a11y-line-height  * { line-height: 2 !important; }
.a11y-dyslexia, .a11y-dyslexia * {
  font-family: 'Comic Sans MS', 'Comic Sans', 'Chalkboard SE', cursive !important;
  letter-spacing: .05em;
}
.a11y-adhd p, .a11y-adhd li {
  border-left: 3px solid var(--color-primary);
  padding-left: .75rem;
  margin-bottom: 1rem;
}
.a11y-adhd p:hover, .a11y-adhd li:hover {
  background: rgba(99,102,241,.06);
  border-radius: 0 8px 8px 0;
}
.a11y-invert { filter: invert(1) hue-rotate(180deg); }
.a11y-invert img, .a11y-invert video { filter: invert(1) hue-rotate(180deg); }
.a11y-highlight-links a {
  background: rgba(99,102,241,.12) !important;
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px !important;
  border-radius: 3px !important;
  padding: .1em .25em !important;
  text-decoration: underline !important;
}
.a11y-big-cursor, .a11y-big-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='%236366f1' stroke='white' stroke-width='1.5' d='M5 3l14 9-7 1-3 6z'/%3E%3C/svg%3E") 0 0, pointer !important; }
.a11y-pause-anim *, .a11y-pause-anim *::before, .a11y-pause-anim *::after {
  animation-play-state: paused !important;
  transition: none !important;
}
.a11y-hide-images img, .a11y-hide-images video, .a11y-hide-images picture,
.a11y-hide-images [style*="background-image"] { opacity: 0 !important; visibility: hidden !important; }

/* ═══════════════════════════════════════════════════════════
   MOBILE NAV DRAWER — improved spacing & responsiveness
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* Override the existing drawer styles for better spacing */
  .nav-links.open {
    padding: 1.25rem 1rem 1.5rem !important;
    gap: .15rem !important;
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border) !important;
  }

  .nav-links.open a {
    display: block;
    padding: 1rem 1.2rem !important;
    font-size: 1rem !important;
    font-weight: 500;
    border-radius: 10px !important;
    border-left: 3px solid transparent !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border) !important;
    text-align: left !important;
    letter-spacing: 0;
    transition: background .15s, border-color .15s !important;
  }
  .nav-links.open a:last-of-type { border-bottom: none !important; }
  .nav-links.open a:hover {
    background: rgba(99,102,241,.07) !important;
    border-left-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
  }
  .nav-links.open a.active {
    background: rgba(99,102,241,.1) !important;
    border-left-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    font-weight: 600;
  }

  /* Action buttons in drawer */
  .nav-actions.open {
    flex-direction: column !important;
    gap: .65rem !important;
    padding: 1rem 0 .5rem !important;
    margin-top: .5rem !important;
    border-top: 2px solid var(--border) !important;
    width: 100%;
  }
  .nav-actions.open .btn-login,
  .nav-actions.open .btn-logout {
    width: 100% !important;
    text-align: center !important;
    padding: .85rem 1rem !important;
    border-radius: 10px !important;
    display: block;
    font-size: .95rem !important;
    font-weight: 600;
  }
  .nav-actions.open .btn-register {
    width: 100% !important;
    text-align: center !important;
    padding: .9rem 1rem !important;
    border-radius: 10px !important;
    display: block !important;
    font-size: .95rem !important;
    font-weight: 600;
  }

  /* Dark mode: drawer bg */
  .dark .nav-links.open {
    background: rgba(10,14,30,.97) !important;
    border-color: rgba(99,102,241,.15) !important;
  }
  .dark .nav-links.open a {
    color: rgba(241,245,249,.85) !important;
    border-bottom-color: rgba(255,255,255,.06) !important;
  }
  .dark .nav-links.open a:hover,
  .dark .nav-links.open a.active {
    background: rgba(99,102,241,.12) !important;
    color: #818CF8 !important;
    border-left-color: #818CF8 !important;
  }
  .dark .nav-actions.open { border-top-color: rgba(99,102,241,.2) !important; }
}

/* ═══════════════════════════════════════════════════════════
   FONT-RESIZER LAYOUT FIX
   Use CSS var instead of changing html font-size directly,
   so em/rem layout doesn't shift when user adjusts text size.
═══════════════════════════════════════════════════════════ */
:root { --user-font-scale: 1; }
/* The JS now calls body.style.fontSize — clamp it so layout stays intact */
body { font-size: calc(1rem * var(--user-font-scale, 1)); }

/* Ensure navbar never overflows at any font size */
.navbar-container {
  flex-wrap: nowrap !important;
  overflow: visible;
}
.nav-links {
  flex-shrink: 1;
  min-width: 0;
}
.nav-links a {
  white-space: nowrap;
}
.nav-actions {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   PAGE TRANSITION — no white flash in light mode
═══════════════════════════════════════════════════════════ */
/* Light-mode background set immediately via CSS (before JS loads) */
html { background: #F1F5F9; }
html.dark { background: #070C1A; }
/* Smooth fade-in on page load — starts from light-mode bg, not white */
body {
  animation: ds-fadein .18s ease-out both;
}
@keyframes ds-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Skip-to-content scroll fix */
#main-content:focus { outline: 3px solid var(--color-primary); outline-offset: 4px; scroll-margin-top: 100px; }



/* =====================================================================
   DigiSafe Keralam — 2026 responsive design layer
   This final layer intentionally supersedes legacy page patches above.
   ===================================================================== */
:root {
  --ink: #0b1224;
  --ink-soft: #263552;
  --paper: #f6f8fc;
  --card: #ffffff;
  --line: #e4e9f2;
  --brand: #5b5ce2;
  --brand-deep: #4042ba;
  --mint: #16a77a;
  --amber: #f59a23;
  --max-content: 1180px;
  --section-space: clamp(4.5rem, 8vw, 7rem);
}

html { background: var(--paper); }
body { background: var(--paper); color: var(--ink); }
body.mal-active { font-size: 1rem; line-height: 1.78; }
body.mal-active h1, body.mal-active h2, body.mal-active h3,
body.mal-active .logo, body.mal-active .nav-links a,
body.mal-active .btn { line-height: 1.45; }

.container { width: min(100% - 2rem, var(--max-content)); padding: 0; }
.topbar { height: 42px; background: #081022; }
.topbar-container, .navbar-container { width: min(100% - 2rem, var(--max-content)); padding: 0; }
.topbar-container { font-size: .76rem; }
.topbar-right { gap: 1rem; }
.navbar { height: 72px; top: 42px; background: rgba(255,255,255,.92); border-bottom-color: rgba(91,92,226,.12); }
.dark .navbar { background: rgba(9,17,35,.94); }
.navbar-container { gap: 1.25rem; }
.logo { flex: 0 0 auto; font-size: 1.28rem; letter-spacing: -.04em; }
.logo-text { white-space: nowrap; }
.nav-links { flex: 1 1 auto; justify-content: center; gap: .1rem; }
.nav-links a { font-size: .83rem; padding: .52rem .72rem; white-space: nowrap; }
.nav-actions { flex: 0 0 auto; }
.btn-login, .btn-register, .btn-logout { white-space: nowrap; }

.hero.hero-home { height: auto; min-height: clamp(620px, calc(100svh - 114px), 790px); overflow: hidden; display: flex; align-items: stretch; background: #081126; }
.hero.hero-home::before { z-index: 0; opacity: .9; }
.hero.hero-home::after { content: ''; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(transparent, rgba(8,17,38,.35)); z-index: 0; pointer-events: none; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); min-height: inherit; padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(4.5rem, 8vw, 6rem); }
.hero-copy { max-width: 620px; }
.eyebrow, .section-kicker { margin: 0 0 1rem; color: #8da1ff; font-size: .77rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-copy h1 { margin: 0 0 1.35rem; color: #fff; font-family: var(--font-heading); font-size: clamp(3.2rem, 7vw, 6.5rem); line-height: .97; letter-spacing: -.075em; max-width: 680px; }
.hero-lead { max-width: 590px; margin: 0; color: rgba(230,236,250,.78); font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.8; }
.hero-actions { display: flex; align-items: center; justify-content: flex-start; gap: .85rem; flex-wrap: wrap; margin-top: 2.2rem; }
.hero-actions .btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.btn { border-radius: 10px; font-weight: 700; letter-spacing: -.01em; }
.btn-primary { background: linear-gradient(135deg, #f6a122, #ef5f5c); box-shadow: 0 10px 28px rgba(239,95,92,.25); }
.btn-outline-white { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.04); }
.btn-outline-white:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.72); }
.hero-proof { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 2.4rem; color: rgba(222,230,246,.62); font-size: .76rem; }
.hero-proof > span { display: inline-flex; align-items: center; gap: .42rem; }
.hero-proof strong { color: #9daaff; font-family: var(--font-mono); font-size: .68rem; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 460px; isolation: isolate; }
.hero-glow { position: absolute; width: min(90%, 500px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(93,96,225,.36), rgba(28,42,102,.08) 58%, transparent 72%); filter: blur(12px); z-index: -1; }
.hero-home .hero-split-img { width: min(100%, 530px); max-height: 520px; object-fit: contain; filter: drop-shadow(0 30px 50px rgba(0,0,0,.36)); animation: heroFloat 7s ease-in-out infinite; transform: translateY(0); }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-art-card { position: absolute; display: inline-flex; align-items: center; gap: .55rem; padding: .7rem .85rem; color: #dce4ff; background: rgba(16,27,61,.72); border: 1px solid rgba(160,171,255,.2); border-radius: 12px; box-shadow: 0 16px 36px rgba(0,0,0,.18); backdrop-filter: blur(12px); font-size: .72rem; font-weight: 600; }
.hero-art-card--top { top: 12%; right: 0; }
.hero-art-card--bottom { bottom: 13%; left: 2%; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #46d59d; box-shadow: 0 0 0 5px rgba(70,213,157,.12); }
.shield-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #081126; background: #9de7c8; font-weight: 800; }
.hero-scroll-hint { position: absolute; z-index: 2; left: max(1rem, calc((100vw - var(--max-content)) / 2)); bottom: 1.2rem; display: inline-flex; align-items: center; gap: .55rem; color: rgba(224,231,253,.56); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.hero-scroll-hint > span:first-child { display: block; width: 22px; height: 1px; background: #8492ee; }

.trust-strip { background: #fff; border-bottom: 1px solid var(--line); }
.dark .trust-strip { background: var(--bg-card); border-color: var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-top: 1.3rem; padding-bottom: 1.3rem; }
.trust-item { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.trust-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; color: #237d64; background: #e5f7f0; font-weight: 800; }
.trust-item strong, .trust-item div > span { display: block; }
.trust-item strong { color: var(--text-main); font-size: .84rem; }
.trust-item div > span { margin-top: .1rem; color: var(--text-muted); font-size: .74rem; }

.section-video, .section-audience, .section-utilities, .section-mascots { padding: var(--section-space) 0; }
.section-soft { background: #f0f3fa; }
.dark .section-soft { background: #0a1428; }
.split-intro { display: grid; grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.section-header { max-width: 720px; margin: 0 auto 2.8rem; text-align: center; }
.section-header--left { margin: 0; text-align: left; }
.section-header--light h2, .section-header--light p { color: #fff; }
.section-header h2 { color: var(--text-main); font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; letter-spacing: -.055em; }
.section-header p { max-width: 630px; margin: 1rem auto 0; color: var(--text-muted); font-size: 1rem; line-height: 1.75; }
.section-header--left p { margin-left: 0; }
.section-kicker { display: block; margin-bottom: .85rem; color: var(--brand); }
.section-header--light .section-kicker { color: #9ea9ff; }
.video-embed-wrap { max-width: none; margin: 0; }
.video-container { border-radius: 18px; border: 1px solid rgba(91,92,226,.16); box-shadow: 0 24px 60px rgba(33,44,82,.14); }
.video-placeholder { background: linear-gradient(135deg, #101a39, #222a61); }
.video-ph-icon { color: #fff; background: linear-gradient(135deg, #6063e8, #8570e8); border: 0; box-shadow: 0 12px 28px rgba(96,99,232,.3); }

.audience-grid, .utility-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.dashboard-card, .audience-card, .feature-card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 12px 36px rgba(41,56,97,.06); }
.dark .dashboard-card, .dark .audience-card, .dark .feature-card { background: var(--bg-card); border-color: var(--border); }
.audience-card { min-height: 270px; padding: 1.45rem; transition: transform .25s, border-color .25s, box-shadow .25s; }
.audience-card:hover { transform: translateY(-5px); border-color: rgba(91,92,226,.45); box-shadow: 0 18px 42px rgba(59,68,140,.14); }
.audience-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.audience-icon { width: 50px; height: 50px; margin: 0; border-radius: 14px; }
.card-arrow { color: var(--text-light); font-size: 1.3rem; transition: color .2s, transform .2s; }
.audience-card:hover .card-arrow { color: var(--brand); transform: translate(2px, -2px); }
.audience-card h3 { margin: 1.7rem 0 .55rem; color: var(--text-main); font-size: 1.2rem; }
.audience-card p { min-height: 4.3rem; margin: 0; color: var(--text-muted); font-size: .9rem; line-height: 1.7; }
.audience-cta { display: inline-flex; margin-top: 1.4rem; color: var(--brand); font-size: .8rem; font-weight: 800; }

.section-dark { background: #0c1530; }
.section-dark .section-header { margin-bottom: 2.5rem; }
.feature-card { position: relative; overflow: hidden; min-height: 278px; padding: 1.5rem; background: rgba(255,255,255,.055); border-color: rgba(169,179,255,.15); box-shadow: none; }
.feature-card::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 150px; height: 150px; border-radius: 50%; background: rgba(111,115,239,.12); }
.feature-card h3 { margin: 1.45rem 0 .65rem; color: #fff; font-family: var(--font-heading); font-size: 1.2rem; }
.feature-card p { max-width: 270px; color: rgba(227,233,252,.68); font-size: .9rem; line-height: 1.72; }
.feature-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; }
.feature-icon--blue { color: #b9c0ff; background: rgba(105,110,240,.22); }
.feature-icon--orange { color: #ffd08a; background: rgba(244,154,35,.18); }
.feature-icon--green { color: #91e6bf; background: rgba(22,167,122,.18); }
.feature-number { position: absolute; right: 1.4rem; bottom: 1.1rem; color: rgba(205,214,255,.2); font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; }

.section-mascots { background: var(--paper); }
.mascot-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); min-height: 420px; padding: clamp(1.5rem, 4vw, 3.4rem); box-shadow: 0 16px 44px rgba(41,56,97,.07); }
.mascot-row.reverse { grid-template-columns: minmax(280px, .72fr) minmax(0, 1fr); margin-top: 1.2rem; }
.mascot-content { max-width: 560px; }
.mascot-content h2 { margin: .55rem 0 1rem; color: var(--text-main); font-family: var(--font-heading); font-size: clamp(1.9rem, 3vw, 2.7rem); letter-spacing: -.045em; }
.mascot-content p { max-width: 560px; margin-bottom: 1.6rem; color: var(--text-muted); font-size: .98rem; line-height: 1.8; }
.profile-label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.profile-label--green { color: var(--mint); }
.profile-label--red { color: #e45b64; }
.mascot-traits { display: grid; gap: .55rem; }
.mascot-trait { display: flex; align-items: center; gap: .65rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; color: var(--text-muted); font-size: .82rem; }
.dark .mascot-trait { border-color: var(--border); }
.trait-dot { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; font-size: .7rem; font-weight: 900; }
.dot-green { color: #147e5c; background: #d9f5e9; }
.dot-red { color: #bc414b; background: #fde1e3; }
.mascot-image-wrap { min-height: 300px; display: grid; place-items: center; border-radius: 16px; padding: 1.5rem; border: 1px solid var(--line); background: #f5f7ff; }
.mascot-image-wrap--rogue { background: #fff6f4; border-color: #f5dedd; }
.dark .mascot-image-wrap { background: rgba(99,102,241,.08); border-color: var(--border); }
.mascot-img { width: min(100%, 340px); max-height: 360px; object-fit: contain; filter: none; animation: none; transform: none; }

footer { background: #081022; color: rgba(226,232,240,.72); border-top: 1px solid rgba(141,161,255,.13); }
.footer-grid { display: grid; grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(0, 1fr)); gap: 2rem; padding: 4rem 0 3rem; }
.footer-brand .logo { display: inline-flex; color: #fff; }
.footer-brand p { max-width: 250px; margin-top: 1rem; color: rgba(226,232,240,.56); font-size: .84rem; line-height: 1.7; }
.footer-col { display: grid; align-content: start; gap: .6rem; }
.footer-col h4 { margin-bottom: .3rem; color: #fff; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.footer-col a { color: rgba(226,232,240,.62); font-size: .82rem; transition: color .2s; }
.footer-col a:hover { color: #a9b2ff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 0; border-top: 1px solid rgba(226,232,240,.1); color: rgba(226,232,240,.46); font-size: .74rem; }

/* Shared public-page polish */
.page-hero { padding: clamp(5rem, 10vw, 8rem) 0 4.5rem; background: linear-gradient(135deg, #0b1430, #161547); }
.page-hero h1 { max-width: 800px; color: #fff; font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -.06em; }
.page-hero p { max-width: 650px; margin-top: 1.1rem; color: rgba(230,236,250,.74); font-size: 1.05rem; line-height: 1.8; }
.page-body { padding: var(--section-space) 0; }
.page-body h2 { margin-bottom: 1rem; color: var(--text-main); font-family: var(--font-heading); letter-spacing: -.04em; }
.page-body p, .page-body li { color: var(--text-muted); line-height: 1.8; }

@media (max-width: 1024px) {
  .nav-links a { padding-inline: .5rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(290px, .8fr); gap: 2rem; }
  .hero-copy h1 { font-size: clamp(3rem, 7vw, 5rem); }
  .hero-art { min-height: 390px; }
  .hero-home .hero-split-img { max-width: 410px; }
  .split-intro { gap: 2rem; }
}

@media (max-width: 760px) {
  .container, .topbar-container, .navbar-container { width: min(100% - 2rem, var(--max-content)); }
  .navbar { top: 0; }
  .hero.hero-home { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 1rem; min-height: 0; padding-top: 4.25rem; padding-bottom: 4.5rem; }
  .hero-copy { max-width: 640px; }
  .hero-copy h1 { max-width: 560px; font-size: clamp(3.1rem, 15vw, 5.2rem); }
  .hero-lead { max-width: 560px; font-size: 1rem; }
  .hero-proof { gap: .8rem 1.1rem; }
  .hero-art { order: 2; min-height: 310px; margin-top: -.5rem; }
  .hero-home .hero-split-img { width: min(100%, 360px); max-height: 340px; }
  .hero-art-card--top { top: 3%; right: 1%; }
  .hero-art-card--bottom { bottom: 3%; left: 1%; }
  .hero-scroll-hint { display: none; }
  .trust-grid { grid-template-columns: 1fr; gap: .85rem; padding-top: 1.2rem; padding-bottom: 1.2rem; }
  .trust-item { padding: .1rem 0; }
  .split-intro { grid-template-columns: 1fr; }
  .section-header--left { max-width: 580px; }
  .section-header--left p { margin-left: 0; }
  .video-embed-wrap { width: 100%; }
  .audience-grid, .utility-grid { grid-template-columns: 1fr; }
  .audience-card { min-height: 0; }
  .audience-card p { min-height: 0; }
  .feature-card { min-height: 230px; }
  .mascot-row, .mascot-row.reverse { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.25rem; }
  .mascot-row.reverse .mascot-image-wrap { order: -1; }
  .mascot-image-wrap { min-height: 250px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); padding: 3rem 0 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .topbar { display: none; }
  .navbar { height: 68px; }
  .navbar-container { width: min(100% - 1.5rem, var(--max-content)); }
  .logo { font-size: 1.14rem; }
  .mobile-menu-toggle { width: 38px; height: 38px; }
  .hero-grid { width: min(100% - 2rem, var(--max-content)); padding-top: 3.4rem; }
  .eyebrow { max-width: 290px; font-size: .68rem; line-height: 1.55; }
  .hero-copy h1 { font-size: clamp(2.8rem, 15vw, 4.3rem); letter-spacing: -.07em; }
  .hero-lead { font-size: .98rem; line-height: 1.72; }
  .hero-actions { align-items: stretch; flex-direction: column; width: 100%; margin-top: 1.8rem; }
  .hero-actions .btn { width: 100%; }
  .hero-proof { font-size: .7rem; }
  .hero-art { min-height: 270px; }
  .hero-home .hero-split-img { width: min(100%, 300px); max-height: 290px; }
  .hero-art-card { padding: .55rem .65rem; font-size: .63rem; }
  .hero-art-card--top { top: 1%; }
  .hero-art-card--bottom { bottom: 0; }
  .section-video, .section-audience, .section-utilities, .section-mascots { padding: 4.4rem 0; }
  .section-header { margin-bottom: 2rem; }
  .section-header h2 { font-size: 2.05rem; }
  .section-header p { font-size: .92rem; }
  .video-container { border-radius: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.7rem 1rem; }
  .footer-col h4 { font-size: .72rem; }
  .footer-col a { font-size: .78rem; }
  #a11y-trigger { right: .9rem; bottom: 4.5rem; width: 44px; height: 44px; }
}

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

/* Critical hero actions should never depend on scroll timing. */
.hero-home .hero-actions,
.hero-home .hero-proof {
  opacity: 1;
  transform: none;
}

@media (max-width: 760px) {
  .hero-home .hero-actions {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    margin-top: 1.8rem;
  }
  .hero-home .hero-actions .btn { width: 100%; }
}

/* Release 20260814-2: render critical content safely even if JS, animation, or CDN timing is delayed. */
body { animation: none; }
.fade-up,
.fade-up.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
}
.trust-item > div {
  display: grid;
  align-content: center;
  gap: .28rem;
  min-width: 0;
}
.trust-item strong,
.trust-item div > span {
  display: block;
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.hero-copy,
.hero-copy h1,
.hero-copy .hero-lead,
.hero-copy .hero-actions,
.hero-copy .hero-proof,
.hero-copy .eyebrow {
  visibility: visible;
  opacity: 1;
}
.section-header,
.video-embed-wrap,
.audience-card,
.feature-card,
.mascot-row {
  visibility: visible;
}
@media (max-width: 760px) {
  .trust-item { align-items: flex-start; }
  .trust-item > div { gap: .18rem; }
  .trust-item strong { font-size: .86rem; }
  .trust-item div > span { font-size: .76rem; }
}

/* ================================================================
   DigiSafe Keralam — cohesive theme, Malayalam type, and rhythm pass
   ================================================================ */
:root {
  --ds-type-scale: 1;
  --ds-page: #f5f7fc;
  --ds-surface: #ffffff;
  --ds-surface-soft: #edf2fb;
  --ds-ink: #0c1730;
  --ds-ink-muted: #53627d;
  --ds-border: #dfe6f1;
  --ds-section-space: clamp(4.25rem, 7vw, 6.5rem);
  --ds-section-space-mobile: clamp(3.5rem, 10vw, 4.75rem);
  --paper: var(--ds-page);
  --card: var(--ds-surface);
  --line: var(--ds-border);
  --ink: var(--ds-ink);
  --ink-soft: var(--ds-ink-muted);
  --bg: var(--ds-page);
  --bg-card: var(--ds-surface);
  --text-main: var(--ds-ink);
  --text-muted: var(--ds-ink-muted);
  --border: var(--ds-border);
  --section-space: var(--ds-section-space);
}

html {
  font-size: calc(16px * var(--ds-type-scale));
  background: var(--ds-page);
}

html.dark {
  --ds-page: #0b1328;
  --ds-surface: #121e38;
  --ds-surface-soft: #101a31;
  --ds-ink: #f3f6ff;
  --ds-ink-muted: #b6c2da;
  --ds-border: #2a3b5d;
  --paper: var(--ds-page);
  --card: var(--ds-surface);
  --line: var(--ds-border);
  --ink: var(--ds-ink);
  --ink-soft: var(--ds-ink-muted);
  --bg: var(--ds-page);
  --bg-card: var(--ds-surface);
  --text-main: var(--ds-ink);
  --text-muted: var(--ds-ink-muted);
  --border: var(--ds-border);
  background: var(--ds-page);
}

body {
  background: var(--ds-page);
  color: var(--ds-ink);
  font-size: 1rem;
  line-height: 1.65;
}

/* The theme remains legible in dark mode across every public section. */
html.dark .section-soft { background: var(--ds-surface-soft); }
html.dark .section-audience,
html.dark .section-mascots { background: var(--ds-page); }
html.dark .trust-strip { background: var(--ds-surface); border-color: var(--ds-border); }
html.dark .audience-card,
html.dark .dashboard-card,
html.dark .mascot-row { background: var(--ds-surface); border-color: var(--ds-border); }
html.dark .audience-card p,
html.dark .section-header p,
html.dark .mascot-content p { color: var(--ds-ink-muted); }
html.dark .mascot-image-wrap { background: #172642; border-color: var(--ds-border); }

/* Deliberate vertical rhythm: sections breathe without creating unexplained gaps. */
.section-video,
.section-audience,
.section-utilities,
.section-mascots {
  padding-block: var(--ds-section-space);
}
.section-video,
.section-audience,
.section-utilities {
  min-height: clamp(500px, 43vw, 680px);
  display: flex;
  align-items: center;
}
.section-video > .container,
.section-audience > .container,
.section-utilities > .container,
.section-mascots > .container { width: 100%; }
.section-mascots { min-height: 760px; }

/* Malayalam is intentionally more open, never smaller than English by default. */
html[lang="ml"] body,
body.mal-active {
  font-family: 'Noto Sans Malayalam', 'Manjari', 'Rachana', sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: anywhere;
}
html[lang="ml"] .hero-copy h1,
body.mal-active .hero-copy h1 {
  font-family: 'Noto Sans Malayalam', 'Manjari', 'Rachana', sans-serif;
  font-size: clamp(2.8rem, 6.5vw, 5.9rem);
  line-height: 1.2;
  letter-spacing: -.025em;
  margin-bottom: 1.5rem;
}
html[lang="ml"] .hero-lead,
body.mal-active .hero-lead { line-height: 2; }
html[lang="ml"] .section-header h2,
body.mal-active .section-header h2,
html[lang="ml"] .mascot-content h2,
body.mal-active .mascot-content h2 {
  font-family: 'Noto Sans Malayalam', 'Manjari', 'Rachana', sans-serif;
  line-height: 1.35;
  letter-spacing: -.015em;
}
html[lang="ml"] .section-header p,
body.mal-active .section-header p,
html[lang="ml"] .feature-card p,
body.mal-active .feature-card p,
html[lang="ml"] .audience-card p,
body.mal-active .audience-card p { line-height: 1.95; }
html[lang="ml"] .nav-links a,
body.mal-active .nav-links a,
html[lang="ml"] .btn,
body.mal-active .btn {
  font-size: .9rem;
  line-height: 1.55;
  letter-spacing: 0;
}

@media (max-width: 760px) {
  html { font-size: calc(16px * var(--ds-type-scale)); }
  .section-video,
  .section-audience,
  .section-utilities,
  .section-mascots {
    min-height: 0;
    padding-block: var(--ds-section-space-mobile);
  }
  .section-mascots { min-height: 0; }
  html[lang="ml"] .hero-copy h1,
  body.mal-active .hero-copy h1 {
    font-size: clamp(2.45rem, 13vw, 4.25rem);
    line-height: 1.22;
  }
  html[lang="ml"] .hero-lead,
  body.mal-active .hero-lead { line-height: 1.95; }
  html[lang="ml"] .section-header h2,
  body.mal-active .section-header h2 { line-height: 1.4; }
}

/* Final section-height correction: content sections are content-led, not empty viewport panels. */
.section-video,
.section-audience,
.section-utilities,
.section-mascots {
  min-height: 0;
}
.section-video,
.section-audience,
.section-utilities {
  display: block;
}
.section-mascots { display: block; }


/* =====================================================================
   Intro video + partner logo band
   ===================================================================== */
.video-embed-wrap { width: 100%; }
.video-container--native {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #071126;
  border: 1px solid rgba(91,92,226,.24);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(28,42,88,.18);
}
.project-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #071126;
}
.project-video::-webkit-media-controls-panel { background: linear-gradient(transparent, rgba(5,10,28,.8)); }
.video-meta {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
  color: rgba(255,255,255,.84);
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.video-meta-duration { color: rgba(255,255,255,.62); }

.section-partners {
  padding: var(--ds-section-space) 0 clamp(3.5rem, 6vw, 5rem);
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.partners-header { margin-bottom: 2.4rem; }
.partner-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.partner-group {
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(41,56,97,.05);
}
.partner-group--initiator { border-color: rgba(91,92,226,.24); }
.partner-group-label {
  margin-bottom: .9rem;
  color: var(--brand);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.partner-logo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.partner-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  min-height: 72px;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(244,247,253,.9));
}
.partner-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #5b5ce2, #8b73e9);
  font-family: var(--font-heading);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.partner-mark--duk { background: linear-gradient(135deg, #5b5ce2, #ee8351); }
.partner-logo--community .partner-mark { background: linear-gradient(135deg, #16a77a, #5b5ce2); }
.partner-logo--learning .partner-mark { background: linear-gradient(135deg, #f59a23, #ef5f5c); }
.partner-logo--sponsor .partner-mark { background: linear-gradient(135deg, #243455, #5b5ce2); }
.partner-logo-copy { min-width: 0; display: grid; gap: .15rem; }
.partner-logo-copy strong {
  color: var(--ink);
  font-size: .84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.partner-logo-copy small {
  color: var(--ink-soft);
  opacity: .68;
  font-size: .66rem;
  line-height: 1.35;
}
.partner-note {
  max-width: 700px;
  margin: 1.25rem auto 0;
  color: var(--ink-soft);
  font-size: .75rem;
  line-height: 1.7;
  text-align: center;
  opacity: .72;
}
html.dark .section-partners { background: var(--ds-page); border-color: var(--ds-border); }
html.dark .partner-group { background: var(--ds-surface); border-color: var(--ds-border); box-shadow: none; }
html.dark .partner-logo { background: rgba(255,255,255,.035); border-color: var(--ds-border); }
html.dark .partner-logo-copy strong { color: var(--ds-ink); }
html.dark .partner-logo-copy small,
html.dark .partner-note { color: var(--ds-ink-muted); }

html[lang="ml"] .video-meta,
body.mal-active .video-meta { letter-spacing: 0; text-transform: none; }
html[lang="ml"] .partner-group-label,
body.mal-active .partner-group-label { letter-spacing: 0; line-height: 1.5; }
html[lang="ml"] .partner-logo-copy strong,
body.mal-active .partner-logo-copy strong { font-family: 'Noto Sans Malayalam', 'Manjari', 'Rachana', sans-serif; line-height: 1.65; }
html[lang="ml"] .partner-logo-copy small,
body.mal-active .partner-logo-copy small { line-height: 1.7; }

@media (max-width: 900px) {
  .partner-groups { grid-template-columns: 1fr 1fr; }
  .partner-group--initiator { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .video-container--native { border-radius: 16px; }
  .video-meta { left: .75rem; right: .75rem; bottom: 3rem; font-size: .64rem; }
  .section-partners { padding-block: var(--ds-section-space-mobile); }
  .partner-groups { grid-template-columns: 1fr; }
  .partner-group--initiator { grid-column: auto; }
  .partner-logo-row { grid-template-columns: 1fr; }
  .partner-group { padding: 1.1rem; }
}
@media (max-width: 480px) {
  .video-meta { display: none; }
  .partner-logo { min-height: 66px; }
}

/* Partner image-logo cards: fixed visual frame, flexible name block */
.partner-logo--image {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: .75rem;
  min-height: 0;
  padding: .75rem;
  text-align: center;
}
.partner-logo-image-frame {
  display: grid;
  place-items: center;
  width: 100%;
  height: 108px;
  padding: .55rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.partner-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 180px;
  object-fit: contain;
}
.partner-logo--image .partner-logo-copy {
  display: grid;
  justify-items: center;
  gap: .2rem;
  min-height: 3.25rem;
  align-content: start;
}
.partner-logo--image .partner-logo-copy strong {
  display: block;
  max-width: 19ch;
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
}
.partner-logo--image .partner-logo-copy small {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.partner-logo-row--initiators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.dark .partner-logo-image-frame {
  border-color: var(--ds-border);
  background: #fff;
}
html[lang="ml"] .partner-logo--image .partner-logo-copy strong,
body.mal-active .partner-logo--image .partner-logo-copy strong {
  max-width: 22ch;
  line-height: 1.7;
}
html[lang="ml"] .partner-logo--image .partner-logo-copy small,
body.mal-active .partner-logo--image .partner-logo-copy small {
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .partner-logo-row--initiators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .partner-logo-row--initiators { grid-template-columns: 1fr; }
  .partner-logo-image-frame { height: 96px; }
  .partner-logo--image .partner-logo-copy { min-height: 0; }
}


/* Professional logo-only partner marquee — release 20260814-8 */
.partner-groups,
.partner-logo-row,
.partner-logo,
.partner-logo-copy,
.partner-logo-image-frame,
.partner-logo-image { display: none !important; }
.partner-marquee-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: clamp(1.2rem, 2.5vw, 1.8rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.partner-marquee {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: ds-partner-marquee 32s linear infinite;
}
.partner-marquee:hover,
.partner-marquee:focus-within { animation-play-state: paused; }
.partner-marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  flex: 0 0 auto;
  padding-right: clamp(2.5rem, 6vw, 6rem);
}
.partner-logo-mark {
  display: grid;
  place-items: center;
  flex: 0 0 clamp(126px, 14vw, 190px);
  width: clamp(126px, 14vw, 190px);
  height: clamp(58px, 6vw, 82px);
  margin: 0;
  --center-progress: 0;
  filter: grayscale(1);
  opacity: .66;
  transform: none;
  transition: filter .12s linear, opacity .12s linear;
  will-change: filter, opacity;
}
.partner-logo-mark.is-center {
  filter: grayscale(calc(1 - var(--center-progress))) saturate(calc(.82 + var(--center-progress) * .38));
  opacity: calc(.66 + var(--center-progress) * .34);
  transform: none;
}
.partner-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
@keyframes ds-partner-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
html.dark .partner-marquee-shell { border-color: var(--ds-border); background: rgba(255,255,255,.025); }
html.dark .partner-logo-mark { filter: grayscale(1) brightness(0) invert(1); opacity: .64; }
html.dark .partner-logo-mark.is-center {
  filter: grayscale(calc(1 - var(--center-progress))) brightness(calc(.66 + var(--center-progress) * .34)) invert(calc(1 - var(--center-progress)));
  opacity: calc(.64 + var(--center-progress) * .36);
  transform: none;
}
@media (max-width: 760px) {
  .partner-marquee-shell { padding-block: 1rem; }
  .partner-marquee-track { gap: 2rem; padding-right: 2rem; }
  .partner-logo-mark { flex-basis: 112px; width: 112px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .partner-marquee { animation: none; width: 100%; overflow-x: auto; }
  .partner-marquee-track[aria-hidden="true"] { display: none; }
  .partner-marquee-shell { -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 480px) {
  .partner-logo-mark { flex-basis: 96px; width: 96px; height: 48px; }
}

/* Student emergency panel: keep only this red callout list white. */
.page-body .safety-callout--danger .content-list--callout,
.page-body .safety-callout--danger .content-list--callout li,
.page-body .safety-callout--danger .content-list--callout li[data-i18n],
.page-body .safety-callout--danger .content-list--callout li::marker {
  color: #fff !important;
}


/* ============================================================
   AUTH REFRESH — theme-safe login and signup surfaces
   ============================================================ */
.auth-wrapper {
  min-height: calc(100vh - var(--topbar-h) - var(--navbar-h));
  padding: clamp(1.25rem, 4vw, 3.5rem) 1rem;
  background:
    radial-gradient(circle at 15% 15%, rgba(99,102,241,.14), transparent 34%),
    radial-gradient(circle at 88% 82%, rgba(139,92,246,.12), transparent 38%),
    var(--bg);
  overflow: hidden;
}
.auth-wrapper::before { display: none; }
.auth-card,
.auth-card.auth-card-signup {
  width: min(100%, 31rem);
  max-width: none;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg-card) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 1.5rem 4rem rgba(15,23,42,.12), 0 0 0 1px rgba(99,102,241,.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.dark .auth-card,
html.dark .auth-card {
  background: color-mix(in srgb, var(--bg-card) 92%, #101936 8%);
  border-color: rgba(148,163,184,.18);
  box-shadow: 0 1.5rem 4rem rgba(0,0,0,.35), 0 0 0 1px rgba(129,140,248,.08);
}
.auth-logo { margin-bottom: 1.5rem; }
.auth-logo .logo { gap: .65rem; font-size: 1.55rem; }
.auth-logo-mark {
  display: inline-grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: .7rem;
  background: var(--gradient-primary);
  color: #fff;
  font: 700 .78rem/1 var(--font-heading);
  letter-spacing: -.04em;
  -webkit-text-fill-color: #fff;
}
.auth-card h2 {
  margin-bottom: .5rem;
  color: var(--text-main);
  font-size: clamp(1.45rem, 2.7vw, 1.8rem);
  letter-spacing: -.035em;
}
.auth-card .subtitle {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.auth-card .form-group { margin-bottom: 1rem; }
.auth-card .form-group label {
  color: var(--text-muted);
  font-size: .72rem;
  letter-spacing: .08em;
}
.auth-card .form-group input,
.auth-card .form-group select {
  min-height: 3rem;
  width: 100%;
  padding: .78rem .9rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--bg);
  color: var(--text-main);
  color-scheme: light;
  font-size: .95rem;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
html.dark .auth-card .form-group input,
html.dark .auth-card .form-group select,
.dark .auth-card .form-group input,
.dark .auth-card .form-group select {
  background: #111a31;
  border-color: #2b3a5a;
  color: #f8fafc;
  color-scheme: dark;
}
.auth-card .form-group input::placeholder { color: var(--text-light); opacity: .95; }
.auth-card .form-group select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.8rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.2rem) 50%, calc(100% - .85rem) 50%;
  background-size: .42rem .42rem, .42rem .42rem;
  background-repeat: no-repeat;
}
.auth-card .form-group select option {
  background: var(--bg-card);
  color: var(--text-main);
}
html.dark .auth-card .form-group select option,
.dark .auth-card .form-group select option {
  background: #111a31;
  color: #f8fafc;
}
.auth-card .form-group input:focus,
.auth-card .form-group select:focus {
  border-color: var(--color-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 .22rem rgba(99,102,241,.18);
}
.auth-card .age-row { gap: .85rem; }
.btn-auth {
  min-height: 3.15rem;
  margin-top: .5rem;
  border-radius: .75rem;
  box-shadow: 0 .75rem 1.8rem rgba(99,102,241,.24);
}
.auth-alt {
  margin-top: 1.25rem;
  color: var(--text-muted);
}
.auth-alt a { color: var(--color-primary); }
.dark .auth-alt a,
html.dark .auth-alt a { color: #a5b4fc; }
.auth-card .alert-error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.auth-card .alert-success { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
html.dark .auth-card .alert-error,
.dark .auth-card .alert-error { color: #fecaca; background: rgba(127,29,29,.28); border-color: rgba(248,113,113,.35); }
html.dark .auth-card .alert-success,
.dark .auth-card .alert-success { color: #a7f3d0; background: rgba(6,78,59,.28); border-color: rgba(52,211,153,.3); }

@media (max-width: 620px) {
  .auth-wrapper { align-items: flex-start; padding-top: 1.5rem; }
  .auth-card,
  .auth-card.auth-card-signup { padding: 1.35rem; border-radius: 1.15rem; }
  .auth-card .age-row { grid-template-columns: 1fr; gap: 0; }
  .auth-card h2 { font-size: 1.45rem; }
}


/* Mature audience-page presentation — release 20260814-20 */
.page-hero--centered { text-align: center; }
.page-hero--centered .page-hero-inner { max-width: 920px; margin-inline: auto; }
.page-hero-kicker, .content-kicker { display: block; margin-bottom: .85rem; color: #aeb8ff; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.page-hero--centered h1, .page-hero--centered p { margin-left: auto; margin-right: auto; }
.page-hero--centered h1 { max-width: 900px; }
.page-hero--centered p { max-width: 720px; }
.page-content-stack { max-width: 1060px; margin-inline: auto; }
.content-block { padding: clamp(1.35rem, 3vw, 2.25rem); border: 1px solid var(--border, rgba(15,23,42,.1)); border-radius: 20px; background: var(--surface, #fff); box-shadow: 0 12px 35px rgba(30,41,59,.06); }
.content-block h2 { margin-bottom: 1rem; text-align: center; }
.content-block p { max-width: 760px; margin: 0 auto 1rem; text-align: center; }
.content-block--lead { background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(255,255,255,.9)); }
.content-block--accent { border-color: rgba(99,102,241,.22); background: linear-gradient(135deg, rgba(99,102,241,.07), rgba(139,92,246,.05)); }
.content-grid { display: grid; gap: 1.25rem; }
.content-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-list { max-width: 840px; margin: 0 auto; padding-left: 1.35rem; text-align: left; }
.content-list li { margin-bottom: .9rem; padding-left: .25rem; }
.content-list li strong { display: block; margin-bottom: .2rem; color: var(--text-main); font-weight: 750; }
.content-list li span { display: block; }
.content-list--compact li { margin-bottom: .65rem; }
.content-list--columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 2rem; }
.content-list--columns li { margin: 0; }
.content-list--numbered { list-style: decimal; }
.content-list--numbered li strong { display: inline; margin-right: .25rem; }
.content-list--password li strong { display: inline; }
.safety-callout { display: flex; align-items: center; gap: 1.25rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 20px; color: #fff; background: linear-gradient(135deg, #0f766e, #0f4c81); box-shadow: 0 16px 35px rgba(15,76,129,.18); }
.safety-callout--danger { background: linear-gradient(135deg, #b4232c, #7f1d1d); }
.safety-callout h2 { margin: 0 0 .45rem; color: #fff; }
.safety-callout p, .safety-callout li { color: rgba(255,255,255,.9); }
.safety-callout p { margin: 0; }
.safety-callout-number { flex: 0 0 auto; font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; }
.safety-callout .content-list { max-width: none; margin: .75rem 0 0; padding-left: 1.1rem; }
.safety-callout .content-list li { margin-bottom: .35rem; }
html.dark .content-block { background: var(--surface, #101a31); border-color: var(--border, rgba(148,163,184,.18)); box-shadow: 0 12px 35px rgba(0,0,0,.18); }
html.dark .content-block--lead, html.dark .content-block--accent { background: linear-gradient(135deg, rgba(99,102,241,.13), rgba(14,22,40,.88)); }
html.dark .content-block li strong { color: var(--text-main); }
@media (max-width: 760px) {
  .page-hero--centered { padding-top: 4.5rem; padding-bottom: 3.5rem; }
  .page-hero-kicker, .content-kicker { letter-spacing: .08em; }
  .content-grid--two, .content-list--columns { grid-template-columns: 1fr; }
  .content-block { border-radius: 16px; }
  .safety-callout { align-items: flex-start; }
  .safety-callout-number { font-size: 2.3rem; }
}
@media (max-width: 480px) {
  .page-hero--centered h1 { font-size: clamp(2.25rem, 12vw, 3.4rem); }
  .content-block { padding: 1.15rem; }
  .safety-callout { flex-direction: column; gap: .8rem; }
}

/* ============================================================
   SIGNUP PASSWORD GUIDE — live, accessible strength feedback
   ============================================================ */
.password-guide {
  margin-top: .75rem;
  padding: 0 .9rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-.35rem);
  border: 1px solid transparent;
  border-radius: .9rem;
  background: color-mix(in srgb, var(--bg) 82%, var(--color-primary) 18%);
  transition: max-height .32s ease, opacity .24s ease, transform .32s ease, padding .32s ease, border-color .32s ease;
}
.password-guide[hidden] { display: none; }
.password-guide.is-open {
  max-height: 22rem;
  padding: .9rem;
  opacity: 1;
  transform: translateY(0);
  border-color: color-mix(in srgb, var(--color-primary) 24%, var(--border));
}
.password-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}
.password-guide-head strong,
.password-guide-head span { display: block; }
.password-guide-head strong {
  color: var(--text-main);
  font-size: .82rem;
  line-height: 1.35;
}
.password-guide-head span {
  margin-top: .18rem;
  color: var(--text-muted);
  font-size: .72rem;
  line-height: 1.45;
}
.password-mascot-wrap {
  flex: 0 0 3.25rem;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: end center;
}
.password-mascot {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  filter: drop-shadow(0 .35rem .5rem rgba(15,23,42,.16));
  transition: opacity .2s ease, transform .2s ease;
}
.password-checklist {
  list-style: none !important;
  margin: .75rem 0 .55rem !important;
  padding: 0 !important;
  display: grid;
  gap: .35rem;
}
.password-checklist li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1.45;
  transition: color .2s ease;
}
.password-check-icon {
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  margin-top: .05rem;
  border: 1px solid color-mix(in srgb, var(--text-muted) 48%, transparent);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 800;
  line-height: 1;
}
.password-checklist li.is-pass { color: #047857; }
.password-checklist li.is-pass .password-check-icon {
  border-color: #10b981;
  background: #d1fae5;
  color: #047857;
}
.password-checklist li.is-fail { color: var(--text-muted); }
.password-checklist li.is-fail .password-check-icon {
  border-color: #f59e0b;
  color: #b45309;
}
.password-feedback {
  margin: 0;
  color: var(--text-muted);
  font-size: .72rem;
  line-height: 1.5;
}
html.dark .password-guide,
.dark .password-guide {
  background: color-mix(in srgb, #111a31 86%, #6366f1 14%);
}
html.dark .password-checklist li.is-pass,
.dark .password-checklist li.is-pass { color: #a7f3d0; }
html.dark .password-checklist li.is-pass .password-check-icon,
.dark .password-checklist li.is-pass .password-check-icon {
  background: rgba(6,78,59,.45);
  color: #a7f3d0;
}
html.dark .password-checklist li.is-fail .password-check-icon,
.dark .password-checklist li.is-fail .password-check-icon {
  color: #fbbf24;
}
@media (max-width: 620px) {
  .password-guide.is-open { max-height: 24rem; }
  .password-guide-head span { max-width: 15rem; }
  .password-mascot-wrap,
  .password-mascot { width: 2.8rem; height: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .password-guide,
  .password-mascot { transition: none; }
}


/* ============================================================
   SIGNUP PASSWORD POPUP + FLOATING CONTROL RAIL — release 20260814-24
   ============================================================ */
.password-form-group { position: relative; }
.password-popup {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + .65rem);
  width: 100%;
  margin-top: 0;
  box-shadow: 0 1rem 2.5rem rgba(15,23,42,.14);
}
.password-popup.is-open { max-height: 25rem; }
.password-strength-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: .8rem 0 .35rem;
  color: var(--text-muted);
  font-size: .7rem;
  letter-spacing: .01em;
}
#passwordScoreValue {
  color: var(--text-main);
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}
.password-strength-meter {
  height: .38rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 16%, transparent);
}
#passwordScoreFill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #f59e0b;
  transition: width .28s ease, background-color .28s ease;
}
.password-popup[data-strength="strong"] #passwordScoreFill { background: #10b981; }
.password-popup[data-strength="start"] #passwordScoreFill { background: #94a3b8; }
.password-popup.is-refreshing .password-mascot {
  animation: password-feedback-pop .36s cubic-bezier(.2,.8,.2,1);
}
.password-popup[data-strength="strong"] .password-feedback { color: #047857; }
.password-popup[data-strength="strong"] .password-mascot { filter: drop-shadow(0 .35rem .6rem rgba(16,185,129,.3)); }
@keyframes password-feedback-pop {
  0% { opacity: .55; transform: translateY(.25rem) scale(.88) rotate(-4deg); }
  70% { opacity: 1; transform: translateY(-.08rem) scale(1.05) rotate(3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

/* Keep Back to Top and Accessibility on one right-aligned vertical rail. */
#backToTop,
#a11y-trigger { right: 1.25rem; width: 48px; height: 48px; }
#backToTop { bottom: 1.25rem; }
#a11y-trigger { bottom: 4.75rem; }

@media (max-width: 620px) {
  .password-popup {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    margin-top: .65rem;
    box-shadow: 0 .75rem 1.75rem rgba(15,23,42,.1);
  }
  #backToTop,
  #a11y-trigger { right: .9rem; width: 44px; height: 44px; }
  #backToTop { bottom: 1rem; }
  #a11y-trigger { bottom: 4.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .password-popup.is-refreshing .password-mascot,
  #passwordScoreFill { animation: none; transition: none; }
}

/* ============================================================
   PASSWORD CHARACTER CHAT BUBBLE + NON-CLIPPING CARD — release 20260814-25
   ============================================================ */
.auth-wrapper,
.auth-card,
.auth-card.auth-card-signup,
.password-form-group { overflow: visible; }
.password-popup {
  position: relative;
  inset: auto;
  width: auto;
  max-height: 0;
  margin-top: .65rem;
  box-shadow: 0 .8rem 2rem rgba(15,23,42,.12);
}
.password-popup.is-open { max-height: 36rem; }
.password-chat {
  position: relative;
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-top: .7rem;
  padding: .6rem .7rem;
  border: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--border));
  border-radius: .85rem;
  background: color-mix(in srgb, var(--bg-card) 90%, var(--color-primary) 10%);
}
.password-chat::before {
  content: "";
  position: absolute;
  top: -.4rem;
  left: 1.45rem;
  width: .7rem;
  height: .7rem;
  border-top: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--border));
  border-left: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--border));
  background: var(--bg-card);
  transform: rotate(45deg);
}
.password-chat-avatar {
  position: relative;
  z-index: 1;
  flex: 0 0 2.45rem;
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  border-radius: .7rem;
  background: color-mix(in srgb, var(--color-primary) 12%, var(--bg-card));
}
.password-chat .password-mascot {
  width: 2.25rem;
  height: 2.25rem;
}
.password-chat .password-feedback {
  position: relative;
  z-index: 1;
  flex: 1;
  font-size: .74rem;
  line-height: 1.4;
}
.password-chat.is-final {
  border-color: rgba(16,185,129,.45);
  background: color-mix(in srgb, #ecfdf5 82%, var(--bg-card) 18%);
}
.password-chat.is-final::before {
  border-color: rgba(16,185,129,.45);
  background: #ecfdf5;
}
.password-chat.is-final .password-feedback { color: #047857; font-weight: 700; }
html.dark .password-chat,
.dark .password-chat {
  background: color-mix(in srgb, #111a31 88%, #6366f1 12%);
}
html.dark .password-chat::before,
.dark .password-chat::before { background: #111a31; }
html.dark .password-chat.is-final,
.dark .password-chat.is-final {
  background: rgba(6,78,59,.34);
  border-color: rgba(52,211,153,.4);
}
html.dark .password-chat.is-final::before,
.dark .password-chat.is-final::before { background: #12352f; border-color: rgba(52,211,153,.4); }
html.dark .password-chat.is-final .password-feedback,
.dark .password-chat.is-final .password-feedback { color: #a7f3d0; }
@media (max-width: 620px) {
  .auth-wrapper { padding-bottom: 3rem; }
  .password-popup { margin-top: .6rem; }
  .password-chat { align-items: flex-start; padding: .55rem .6rem; }
  .password-chat-avatar { flex-basis: 2.2rem; width: 2.2rem; height: 2.2rem; }
  .password-chat .password-mascot { width: 2rem; height: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .password-chat,
  .password-chat .password-mascot { transition: none; animation: none; }
}


/* ═══════════════════════════════════════════════════════════
   COMPACT MOBILE NAVIGATION — LEFT-ALIGNED DRAWER
   Release 20260814-26
   The menu is teleported to <body> by main.js when opened.
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nav-links.open {
    position: fixed !important;
    top: calc(var(--topbar-h) + var(--navbar-h) + .5rem) !important;
    left: max(.75rem, env(safe-area-inset-left)) !important;
    right: auto !important;
    width: min(20rem, calc(100vw - 1.5rem)) !important;
    max-height: calc(100dvh - var(--topbar-h) - var(--navbar-h) - 1.25rem) !important;
    overflow-y: auto !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: .55rem !important;
    gap: .15rem !important;
    background: color-mix(in srgb, var(--bg-card) 96%, transparent) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 44px rgba(15,23,42,.18), 0 4px 12px rgba(15,23,42,.08) !important;
    text-align: left !important;
  }

  .nav-links.open li,
  .nav-links.open a {
    width: 100% !important;
    text-align: left !important;
  }

  .nav-links.open a {
    display: flex !important;
    align-items: center !important;
    min-height: 44px !important;
    padding: .68rem .8rem !important;
    border: 0 !important;
    border-left: 3px solid transparent !important;
    border-radius: 10px !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    color: var(--text-main) !important;
  }

  .nav-links.open a::after { display: none !important; }
  .nav-links.open a:hover,
  .nav-links.open a:focus-visible,
  .nav-links.open a.active {
    background: rgba(99,102,241,.1) !important;
    border-left-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    outline: none;
  }

  .nav-links.open .nav-actions {
    width: 100% !important;
    display: flex !important;
    align-items: stretch !important;
    gap: .45rem !important;
    margin: .35rem 0 0 !important;
    padding: .6rem 0 .1rem !important;
    border-top: 1px solid var(--border) !important;
  }

  .nav-links.open .nav-actions a {
    justify-content: flex-start !important;
    min-height: 42px !important;
    padding: .65rem .8rem !important;
    text-align: left !important;
  }

  .nav-links.open .nav-actions .btn-register {
    justify-content: center !important;
    text-align: center !important;
  }

  .mobile-menu-toggle {
    flex: 0 0 auto;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
  }
}

@media (max-width: 480px) {
  .nav-links.open {
    top: calc(var(--navbar-h) + .5rem) !important;
    left: max(.65rem, env(safe-area-inset-left)) !important;
    width: min(18.5rem, calc(100vw - 1.3rem)) !important;
    max-height: calc(100dvh - var(--navbar-h) - 1.25rem) !important;
    padding: .45rem !important;
    border-radius: 14px !important;
  }

  .nav-links.open a {
    min-height: 42px !important;
    padding: .6rem .7rem !important;
    font-size: .86rem !important;
  }

  .nav-links.open .nav-actions {
    gap: .35rem !important;
    padding-top: .5rem !important;
  }

  .nav-links.open .nav-actions a {
    min-height: 40px !important;
    padding: .58rem .7rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-links.open { animation: none !important; }
}

.dark .nav-links.open {
  background: color-mix(in srgb, #0B1328 96%, transparent) !important;
  border-color: rgba(129,140,248,.22) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.22) !important;
}
.dark .nav-links.open a:hover,
.dark .nav-links.open a:focus-visible,
.dark .nav-links.open a.active {
  background: rgba(129,140,248,.13) !important;
  border-left-color: #A5B4FC !important;
  color: #C7D2FE !important;
}


/* Mobile language selector inside the compact navigation drawer. */
.mobile-language-item { display: none; }

@media (max-width: 1024px) {
  .nav-links.open .mobile-language-item {
    display: block !important;
    width: 100% !important;
    margin: .35rem 0 0 !important;
    padding: .55rem .7rem .25rem !important;
    border-top: 1px solid var(--border) !important;
    text-align: left !important;
  }

  .nav-links.open .mobile-language-item label {
    display: block !important;
    margin-bottom: .35rem !important;
    color: var(--text-muted) !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    line-height: 1.2 !important;
    text-align: left !important;
    text-transform: uppercase !important;
  }

  .nav-links.open .mobile-language-item .language-select {
    display: block !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: .6rem 2rem .6rem .7rem !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    background: var(--bg-page) !important;
    color: var(--text-main) !important;
    font: inherit !important;
    font-size: .86rem !important;
    text-align: left !important;
  }
}

@media (max-width: 480px) {
  .nav-links.open .mobile-language-item {
    padding: .45rem .6rem .2rem !important;
  }

  .nav-links.open .mobile-language-item .language-select {
    min-height: 40px !important;
    font-size: .82rem !important;
  }
}

.dark .nav-links.open .mobile-language-item .language-select {
  background: #111B34 !important;
  border-color: rgba(129,140,248,.25) !important;
  color: #E5E7EB !important;
}


/* ═══════════════════════════════════════════════════════════
   EVENTS / BLOG / COMMUNITY — RELEASE 20260814-28
   Mature editorial pages with shared responsive cards.
═══════════════════════════════════════════════════════════ */
.ds-feature-hero {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3.25rem, 7vw, 5.5rem);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(99,102,241,.14), transparent 52%),
    var(--bg-page);
}
.ds-feature-hero .container { max-width: 860px; margin-inline: auto; }
.ds-feature-hero h1 {
  max-width: 760px;
  color: var(--text-main);
  margin: .65rem auto 1rem;
  text-wrap: balance;
}
.ds-feature-hero > .container > p:last-child {
  max-width: 680px;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.75;
}
.ds-content-section { padding: clamp(3.25rem, 7vw, 6rem) 0; }
.ds-content-section > .container { max-width: 1180px; margin-inline: auto; }
.ds-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.ds-intro-grid h2,
.ds-section-heading h2,
.ds-callout h2,
.ds-community-actions h2,
.ds-reading-note h2 {
  margin: .35rem 0 0;
  text-wrap: balance;
}
.ds-intro-grid > p { margin: 0; color: var(--text-muted); line-height: 1.8; }
.ds-eyebrow {
  margin: 0;
  color: var(--color-primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.ds-status-card,
.ds-info-card,
.ds-article-card,
.ds-social-card,
.ds-reading-note,
.ds-community-feature,
.ds-community-actions,
.ds-callout {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: 0 12px 32px rgba(15,23,42,.06);
}
.ds-status-card {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: 1.2rem 1.25rem;
}
.ds-status-card strong { display: block; color: var(--text-main); font-size: .95rem; }
.ds-status-card p { margin: .35rem 0 0; color: var(--text-muted); font-size: .88rem; line-height: 1.55; }
.ds-status-dot {
  flex: 0 0 .65rem;
  width: .65rem;
  height: .65rem;
  margin-top: .3rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,.12);
}
.ds-section-heading { margin: 0 0 1.4rem; text-align: left; }
.ds-card-grid { display: grid; gap: 1rem; }
.ds-card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-info-card,
.ds-article-card { position: relative; padding: clamp(1.25rem, 2.5vw, 1.75rem); }
.ds-card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  background: rgba(99,102,241,.1);
  color: var(--color-primary);
  font-size: .75rem;
  font-weight: 800;
}
.ds-info-card h3,
.ds-article-card h3,
.ds-social-card h3 { margin: 0 0 .65rem; color: var(--text-main); font-size: 1.1rem; line-height: 1.35; }
.ds-info-card p,
.ds-article-card p,
.ds-social-card p { margin: 0; color: var(--text-muted); line-height: 1.7; }
.ds-callout,
.ds-community-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(2.25rem, 5vw, 4rem);
  padding: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(236,72,153,.06)), var(--bg-card);
}
.ds-primary-link,
.ds-secondary-link,
.ds-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .65rem 1rem;
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.ds-primary-link { background: var(--color-primary); color: #fff; }
.ds-secondary-link { border: 1px solid var(--border); background: var(--bg-card); color: var(--text-main); }
.ds-text-link { min-height: auto; padding: .75rem 0 0; color: var(--color-primary); }
.ds-primary-link:hover,
.ds-secondary-link:hover,
.ds-text-link:hover { transform: translateY(-1px); }
.ds-primary-link:focus-visible,
.ds-secondary-link:focus-visible,
.ds-text-link:focus-visible,
.ds-social-card:focus-visible { outline: 3px solid rgba(99,102,241,.35); outline-offset: 3px; }
.ds-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.ds-article-meta span:first-child { color: var(--color-primary); }
.ds-reading-note { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 1.25rem; align-items: center; margin-top: 1rem; padding: 1.25rem 1.4rem; }
.ds-reading-note p { margin: .35rem 0 0; color: var(--text-muted); line-height: 1.65; }
.ds-reading-note-mark {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  font-size: .75rem;
  font-weight: 900;
}
.ds-community-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .75fr); gap: 1rem; padding: clamp(1.4rem, 4vw, 2.5rem); margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.ds-community-feature-copy { padding: clamp(.25rem, 1vw, 1rem); }
.ds-community-feature-copy h2 { max-width: 620px; margin: .4rem 0 .75rem; text-wrap: balance; }
.ds-community-feature-copy p { max-width: 620px; margin: 0 0 1.2rem; color: var(--text-muted); line-height: 1.8; }
.ds-video-placeholder { display: grid; min-height: 220px; place-items: center; align-content: center; gap: .8rem; border-radius: 16px; background: linear-gradient(145deg, #111827, #312e81); color: #fff; text-align: center; }
.ds-play-mark { display: grid; width: 3.8rem; height: 3.8rem; place-items: center; padding-left: .2rem; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 1.25rem; }
.ds-video-placeholder span { max-width: 220px; font-size: .85rem; font-weight: 700; line-height: 1.45; }
.ds-social-card { position: relative; display: block; min-height: 200px; padding: 1.4rem; color: inherit; text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.ds-social-card:hover { transform: translateY(-3px); border-color: rgba(99,102,241,.45); box-shadow: 0 16px 32px rgba(15,23,42,.1); }
.ds-social-label { display: inline-block; margin-bottom: 2.2rem; color: var(--color-primary); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ds-card-arrow { position: absolute; right: 1.4rem; bottom: 1.25rem; color: var(--color-primary); font-size: 1.2rem; }
.ds-action-stack { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
html.dark .ds-feature-hero { background: radial-gradient(circle at 50% 0%, rgba(129,140,248,.16), transparent 52%), var(--bg-page); }
html.dark .ds-feature-hero h1 { color: #fff; }
html.dark .ds-status-card,
html.dark .ds-info-card,
html.dark .ds-article-card,
html.dark .ds-social-card,
html.dark .ds-reading-note,
html.dark .ds-community-feature,
html.dark .ds-community-actions,
html.dark .ds-callout { box-shadow: 0 14px 34px rgba(0,0,0,.18); }
@media (max-width: 820px) {
  .ds-card-grid-3,
  .ds-community-feature { grid-template-columns: 1fr; }
  .ds-intro-grid { grid-template-columns: 1fr; gap: 1rem; align-items: start; }
  .ds-community-feature { padding: 1rem; }
  .ds-video-placeholder { min-height: 180px; }
}
@media (max-width: 620px) {
  .ds-feature-hero { padding: 3.5rem 0 3rem; }
  .ds-content-section { padding: 2.75rem 0; }
  .ds-callout,
  .ds-community-actions,
  .ds-reading-note { grid-template-columns: 1fr; display: grid; align-items: start; }
  .ds-action-stack { justify-content: flex-start; }
  .ds-primary-link, .ds-secondary-link { width: 100%; }
  .ds-reading-note-mark { width: 2.5rem; height: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-primary-link, .ds-secondary-link, .ds-text-link, .ds-social-card { transition: none; }
}
.dark .ds-social-card:hover { border-color: rgba(165,180,252,.5); box-shadow: 0 16px 34px rgba(0,0,0,.28); }
.dark .ds-video-placeholder { background: linear-gradient(145deg, #0b1328, #312e81); }
.dark .ds-callout,
.dark .ds-community-actions { background: linear-gradient(135deg, rgba(129,140,248,.14), rgba(236,72,153,.1)), var(--bg-card); }

