/* =====================================================
   PromptlyLiz — TECHY THEME (Dark/Blue)
   Global stylesheet for nav, hero, library, FX, responsive
   ===================================================== */

:root {
  --bg:#0a0f1a;
  --card:#0f1625;
  --soft:#0c1423;
  --ink:#e5e7eb;
  --muted:#94a3b8;
  --border:#0b2a55;
  --radius:22px;
  --shadow:0 10px 30px rgba(2,6,23,.45);

  /* CTA + accent blues */
  --cta:#3b82f6;
  --cta-shadow:#1e40af;
  --cta-grad-start:#2563eb; /* bright edge */
  --cta-grad-end:#1e40af;   /* darker base */

  /* Techy FX palette */
  --chip-bg:rgba(30,58,138,.25);
  --chip-ink:#e2e8f0;
  --fx-blue:#60a5fa;
  --fx-blue-soft:#3b82f6;
  --fx-grid-stroke:rgba(96,165,250,.35);
  --fx-trace-grad-1:#93c5fd;
  --fx-trace-grad-2:#3b82f6;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box }
html,body{ height:100%; margin:0; overflow-x:hidden }
body{
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  background:var(--bg); color:var(--ink);
}
.container{ max-width:1120px; margin:0 auto; padding:20px 20px 64px; position:relative; z-index:2 }

/* =====================================================
   NAV
   - Desktop: single line (links left, actions right)
   - Mobile: wraps cleanly into two lines (no overflow)
   ===================================================== */
header{ position:sticky; top:0; z-index:10; backdrop-filter:saturate(120%) blur(6px) }
.nav{
  display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:nowrap;
  padding:10px 12px; border-radius:0; background:rgba(10,15,26,.8);
  border:1px solid var(--border); box-shadow:var(--shadow)
}
.nav > nav{
  display:flex; align-items:center; gap:8px;
  overflow-x:auto; white-space:nowrap; -webkit-overflow-scrolling:touch; scrollbar-width:none
}
.nav > nav::-webkit-scrollbar{ display:none }
.nav a{
  color:var(--ink); font-weight:700; text-decoration:none;
  padding:6px 10px; border-radius:8px
}
.nav a:hover{ color:var(--cta); background:rgba(59,130,246,.15) }
.nav a.active{ color:var(--cta) }
.nav-actions{ display:flex; align-items:center; gap:10px; margin-left:auto }
.sub-btn,.login-btn,.logout-btn{
  background:var(--cta); color:#fff; border:1px solid var(--cta-shadow);
  box-shadow:0 3px 0 var(--cta-shadow); border-radius:10px; cursor:pointer
}
.sub-btn{ padding:8px 12px; font-weight:700 }
.login-btn,.logout-btn{ padding:6px 12px; font-weight:700; display:none }
#plan-badge,.user-email{
  display:none; padding:4px 10px; border-radius:999px; background:var(--chip-bg); color:var(--chip-ink);
  border:1px solid var(--border); font-size:11px; font-weight:600; white-space:nowrap; max-width:160px; overflow:hidden; text-overflow:ellipsis
}

/* =====================================================
   HERO (two approaches)
   1) Existing .hero/.hero-art (kept)
   2) Reusable hero-figure + page-level overrides (recommended)
   ===================================================== */

/* 1) Your current hero grid */
.hero{
  display:grid; grid-template-columns:minmax(0,1fr) 420px; gap:24px; align-items:start; margin-top:28px
}
.hero-left h1{ font-size:clamp(32px,6vw,48px); margin:0 0 12px }
.hero-left p,.hero-left li{ color:var(--muted) }
.hero-art{
  display:flex; align-items:center; justify-content:center; padding:16px; background:var(--card);
  border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow)
}
/* FIX: scale images properly */
.hero-art img{ max-width:100%; height:auto; border-radius:var(--radius); display:block }

/* 2) New reusable hero-figure (use with <body class="library-page">, etc.) */
.hero-figure{
  --img-w:260px;         /* mobile width */
  --img-w-lg:360px;      /* desktop width */
  --img-pad:12px;
  --img-radius:22px;
  --img-rotate:0deg;
  --img-shadow:0 12px 32px rgba(0,0,0,.3);
  --img-bg:none;         /* color | gradient | url(...) */

  display:inline-block; padding:var(--img-pad);
  border-radius:var(--img-radius); background:var(--img-bg); box-shadow:var(--img-shadow)
}
.hero-img{
  width:var(--img-w); height:auto; display:block;
  transform:rotate(var(--img-rotate));
  border-radius:calc(var(--img-radius) - 6px)
}
@media (min-width:900px){
  .hero-img{ width:var(--img-w-lg) }
}

/* Page-specific overrides (set on <body>) */
.home-page .hero-figure{
  --img-w:260px; --img-w-lg:360px;
  --img-bg:linear-gradient(135deg, rgba(59,130,246,.18), rgba(14,165,233,.12));
  --img-rotate:0deg;
}
.practice-page .hero-figure{
  --img-w:280px; --img-w-lg:400px;
  --img-bg:linear-gradient(135deg, rgba(59,130,246,.22), rgba(14,165,163,.16));
  --img-rotate:0deg;
}
.library-page .hero-figure{
  --img-w:240px; --img-w-lg:330px;
  --img-bg:radial-gradient(120% 120% at 20% 10%, #1a2b4a 0%, #0f1a2e 60%, transparent 100%);
  --img-rotate:-2deg;
}
.play-page .hero-figure{
  --img-w:220px; --img-w-lg:300px;
  --img-bg:url("/img/pattern-grid.svg") center/cover no-repeat;
  --img-rotate:2deg;
}
.resources-page .hero-figure {
  --img-w:250px;
  --img-w-lg:340px;
  --img-bg:none; /* removed blue background */
  --img-rotate:0deg;
}


/* =====================================================
   Controls (Library)
   ===================================================== */
#controls{
  display:grid; grid-template-columns:1.2fr .6fr .8fr; gap:10px; margin:24px 0
}
#controls input,#controls select{
  width:100%; background:#0c1423; color:var(--ink);
  border:1px solid var(--border); border-radius:14px; padding:12px; font-size:16px; outline:none
}
#controls input::placeholder{ color:#64748b }

/* =====================================================
   Library grid/cards (rendered by library.js)
   ===================================================== */
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px }
.card{
  background:var(--card); border:1px solid var(--border); border-radius:18px;
  box-shadow:var(--shadow); padding:14px; animation:fadeUp .6s ease-out both
}
.card__head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px }
.pill{
  font-size:12px; padding:4px 8px; border-radius:999px;
  background:rgba(59,130,246,.15); border:1px solid rgba(59,130,246,.35); color:#bfdbfe
}
.pill.level-easy{ background:rgba(34,197,94,.15); border-color:rgba(34,197,94,.35); color:#bbf7d0 }
.pill.level-medium{ background:rgba(59,130,246,.15); border-color:rgba(59,130,246,.35); color:#bfdbfe }
.pill.level-hard{ background:rgba(245,158,11,.15); border-color:rgba(245,158,11,.35); color:#fde68a }
.vars{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 }
.chip{ background:#0c1423; border:1px dashed var(--border); padding:2px 6px; border-radius:8px; color:#cbd5e1 }
textarea.prompt{
  width:100%; min-height:120px; resize:vertical; border:1px solid var(--border);
  background:#0c1423; color:var(--ink); border-radius:12px; padding:10px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace
}
.vars-form{ display:grid; grid-template-columns:1fr; gap:6px; margin:8px 0 }
.vars-form label{ display:grid; grid-template-columns:110px 1fr; align-items:center; gap:8px; font-size:14px }
.vars-form input{ border:1px solid var(--border); background:#0c1423; color:var(--ink); border-radius:10px; padding:8px }
.actions{ display:flex; gap:8px; justify-content:flex-end; margin-top:10px }
.btn{
  cursor:pointer; border:1px solid var(--border); background:#0c1423; color:#cbd5e1; border-radius:12px; padding:10px 12px
}
.btn.copy{ background:var(--cta); color:#fff; border-color:var(--cta-shadow); box-shadow:0 3px 0 var(--cta-shadow) }

/* Level picker (tabs) */
.level-picker{ margin:18px 0; display:flex; flex-wrap:wrap; gap:10px }
.level-btn{
  background:rgba(59,130,246,.15); border:1px solid rgba(59,130,246,.35);
  color:#bfdbfe; padding:10px 14px; border-radius:12px; font-weight:800; cursor:pointer
}
.level-btn[data-level="easy"]{ background:rgba(34,197,94,.15); border-color:rgba(34,197,94,.35); color:#bbf7d0 }
.level-btn[data-level="hard"]{ background:rgba(245,158,11,.15); border-color:rgba(245,158,11,.35); color:#fde68a }
.level-btn.active{ outline:2px solid var(--cta) }


/* When no filter is set, show all (default behavior) */


/* =====================================================
   CTA Box (under hero image)
   ===================================================== */
.hero-cta-box{
  background:var(--soft); border:1px solid var(--border); border-radius:18px;
  padding:20px; margin:20px 0; text-align:center; box-shadow:0 4px 16px rgba(0,0,0,.35)
}
.btn-cta{
  display:inline-block; background:var(--cta); color:#0A1222; font-weight:700;
  padding:12px 22px; border-radius:999px; text-decoration:none; box-shadow:0 6px 16px rgba(0,0,0,.35)
}
.btn-cta:hover{ background:#2563eb }
.cta-sub{ margin-top:10px; color:var(--muted); font-size:.95rem }

/* =====================================================
   Footer
   ===================================================== */
.footer-pill{
  margin:34px auto 0; max-width:840px; background:var(--chip-bg); border:1px solid var(--border);
  border-radius:32px; padding:16px 22px; text-align:center; font-weight:900; box-shadow:var(--shadow); color:var(--chip-ink)
}
footer{ margin-top:18px; color:var(--muted); display:flex; align-items:center; justify-content:space-between }
.foot-links a{ color:inherit; text-decoration:none; margin-right:14px }
.foot-links a:hover{ text-decoration:underline }

/* =====================================================
   Background FX (hex + map + traces)
   ===================================================== */
@keyframes tech-drift{ from{transform:translateX(0)} to{transform:translateX(-2000px)} }
.tech-bg{ pointer-events:none; position:fixed; inset:0; z-index:-1 }
.tech-hex{ position:fixed; right:-40vw; top:0; width:200vw; height:120vh; opacity:.20; animation:tech-drift 120s linear infinite }
.tech-map{ position:fixed; inset:0; opacity:.18 }
.tech-traces{ position:fixed; inset-inline:0; bottom:0; height:55vh }

/* =====================================================
   Animations
   ===================================================== */
@keyframes fadeUp{ from{opacity:0; transform:translateY(20px)} to{opacity:1; transform:translateY(0)} }

/* =====================================================
   Responsive — Mobile Rescue
   ===================================================== */
.container{ padding:14px 14px 56px }

@media (max-width:980px){
  header{ backdrop-filter:none }
  .hero{ grid-template-columns:1fr; gap:16px; margin-top:18px }
  .hero-art{ order:-1; padding:12px }
  #controls{ grid-template-columns:1fr }
}

/* Let nav wrap neatly to two lines on narrow screens */
@media (max-width:640px){
  .nav{ flex-wrap:wrap }
  .level-btn{ flex:1 1 auto }
}

/* Optional: widen nav spacing on large desktops */
@media (min-width:1200px){
  .nav a{ padding:8px 12px }
}
.tech-bg { pointer-events:none; position:fixed; inset:0; z-index:-1 }
.tech-hex { position:fixed; right:-40vw; top:0; width:200vw; height:120vh; opacity:.20; animation:tech-drift 120s linear infinite }
@keyframes tech-drift { from{transform:translateX(0)} to{transform:translateX(-2000px)} }

/* ==== Reveal / Stagger ==== */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
.stagger > * { opacity: 0; transform: translateY(10px); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > * { transition: opacity .55s ease, transform .55s ease; }
.stagger.in > *:nth-child(1){ transition-delay:.05s }
.stagger.in > *:nth-child(2){ transition-delay:.12s }
.stagger.in > *:nth-child(3){ transition-delay:.19s }
.stagger.in > *:nth-child(4){ transition-delay:.26s }

/* ==== Cards: hover lift + glow ==== */
.card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  border-color: #93c5fd; /* lighter blue */
}

/* Sticker wiggle when parent card hovers */
.card:hover .sticker { animation: wiggle .7s ease; }
@keyframes wiggle {
  0% { transform: rotate(0) translateY(0); }
  25% { transform: rotate(-5deg) translateY(-1px); }
  50% { transform: rotate(0) translateY(0); }
  75% { transform: rotate(5deg) translateY(-1px); }
  100% { transform: rotate(0) translateY(0); }
}

/* ==== Buttons: micro-press & focus ring ==== */
a.cta, button.cta, .sub-btn, .login-btn, .logout-btn {
  transition: transform .06s ease, filter .2s ease, box-shadow .2s ease;
}
a.cta:active, button.cta:active, .sub-btn:active,
.login-btn:active, .logout-btn:active { transform: translateY(1px); }
a.cta:focus-visible, button.cta:focus-visible,
.sub-btn:focus-visible, .login-btn:focus-visible, .logout-btn:focus-visible {
  outline: 2px solid #0ea5a3; outline-offset: 2px;
}

/* ==== Header: subtle drop when sticky ==== */
header { transition: box-shadow .25s ease, background .25s ease; }
header.is-stuck .nav { box-shadow: 0 8px 30px rgba(0,0,0,.12); background: rgba(255,255,255,.82); }

.btn-cta {
  display:inline-block;
  background:linear-gradient(135deg, var(--cta-grad-start), var(--cta-grad-end));
  color:#E6F0FF;
  font-weight:700;
  padding:12px 22px;
  border-radius:999px;
  text-decoration:none;
  box-shadow:0 0 12px rgba(59,130,246,0.4);
  transition:all .25s ease;
}
.btn-cta:hover {
  background:linear-gradient(135deg, var(--fx-blue), var(--cta-grad-end));
  box-shadow:0 0 18px rgba(59,130,246,0.6);
  transform:translateY(-2px);
}
/* ===== Fix: primary CTA buttons (real class used in markup) ===== */
/* Primary: remove the crisp strip; use a soft shadow instead */
.btn.btn-primary{
  background: linear-gradient(135deg, var(--cta-grad-start), var(--cta-grad-end));
  color: #E6F0FF;
  border: 1px solid var(--cta-shadow);

  /* replace the solid strip with a blur */
  box-shadow:
    0 8px 18px rgba(0,0,0,.28),      /* soft drop shadow (no hard line) */
    0 0 12px rgba(59,130,246,.35);   /* blue glow */
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}

/* Hover: keep it soft too */
.btn.btn-primary:hover{
  background: linear-gradient(135deg, var(--cta-grad-end), var(--cta-grad-start));
  transform: translateY(-2px);
  box-shadow:
    0 12px 22px rgba(0,0,0,.32),
    0 0 20px rgba(59,130,246,.55),
    0 0 32px rgba(104,181,255,.25) inset;
}

/* Make sure anchor-buttons never underline */
a.btn.btn-primary,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus,
a.btn.btn-primary:active,
a.btn.btn-primary:visited {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;  /* avoids baseline artifacts */
}

.btn.btn-primary:active{ transform: translateY(0); }

/* Optional: ghost buttons for "Coming Soon" etc. */
.btn.btn-ghost{
  background: transparent;
  color: #bfdbfe;
  border: 1px solid rgba(59,130,246,.35);  /* all sides */
  text-decoration: none;                   /* just in case */
}
.btn.btn-ghost[disabled]{
  opacity: .65;
  cursor: default;
}
.pl-btn--outline{
  --ring: var(--fx-blue, #4da6ff);
  --ink:  var(--ink, #e9f1ff);

  border: 2px solid rgba(255,255,255,0.85);
  color: var(--ink);
  background:
    linear-gradient(#ffffff14,#ffffff08);          /* faint frost */
  box-shadow:
    0 0 0 1px #ffffff1f inset,                     /* inner edge */
    0 10px 28px -8px rgba(77,166,255,.35),         /* outer glow */
    0 2px 0 0 rgba(255,255,255,.06) inset;         /* subtle bevel */
  backdrop-filter: saturate(140%) blur(2px);
  -webkit-backdrop-filter: saturate(140%) blur(2px);
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

.pl-btn--outline:hover{
  border-color: var(--ring);
  background: rgba(77,166,255,.18);
  box-shadow:
    0 0 0 2px rgba(77,166,255,.45),
    0 12px 34px -8px rgba(77,166,255,.45);
  color:#fff;
}

.pl-btn--outline:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(13,22,37,.9),
    0 0 0 6px rgba(77,166,255,.55);
}
/* glowing primary button */
.pl-btn--primary{
  background: var(--fx-blue, #4da6ff);
  color: #0b1220;
  font-weight: 600;
  border-radius: 14px;
  padding: 12px 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1) inset,
    0 12px 28px -8px rgba(77,166,255,0.55),    /* outer glow */
    0 4px 10px rgba(0,0,0,0.4);                /* subtle depth */
  transition: all .2s ease;
}

.pl-btn--primary:hover{
  background: #5bb7ff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2) inset,
    0 14px 34px -6px rgba(77,166,255,0.7),
    0 4px 12px rgba(0,0,0,0.45);
  transform: translateY(-1px);
}

.pl-btn--primary:active{
  transform: translateY(0);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2) inset,
    0 8px 18px -6px rgba(77,166,255,0.5),
    0 4px 8px rgba(0,0,0,0.45);
}

/* ===== Fix: keep sticky header dark (remove the white background) ===== */
header.is-stuck .nav{
  background: rgba(10,15,26,.82);             /* dark translucent */
  border-color: var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,.30);
}
header.is-stuck .nav a{ color: var(--ink); }
header.is-stuck .nav a.active{ color: var(--fx-blue); }

/* (Optional) unify focus ring to blue */
a.cta:focus-visible, button.cta:focus-visible,
.sub-btn:focus-visible, .login-btn:focus-visible, .logout-btn:focus-visible,
.btn:focus-visible, .btn.btn-primary:focus-visible{
  outline: 2px solid var(--fx-blue);
  outline-offset: 2px;
}
/* =====================================================
   GLOBAL CARD + PANEL MOTION (Hover & Scroll Reveal)
   ===================================================== */

/* --- Scroll reveal + hover lift --- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }

.stagger > * { opacity: 0; transform: translateY(10px); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > * { transition: opacity .55s ease, transform .55s ease; }
.stagger.in > *:nth-child(1){ transition-delay:.05s }
.stagger.in > *:nth-child(2){ transition-delay:.12s }
.stagger.in > *:nth-child(3){ transition-delay:.19s }
.stagger.in > *:nth-child(4){ transition-delay:.26s }

/* Smooth transforms + hover lift (desktop) */
.card, .panel { transition: transform .18s ease, box-shadow .18s ease; will-change: transform; }
@media (any-hover:hover){
  .card:hover, .panel:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
}

/* Mobile “lift-on-enter” feeling */
@media (any-hover:none){
  .card.reveal.in, .panel.reveal.in {
    animation: lift-on-enter 520ms ease-out both;
  }
  @keyframes lift-on-enter {
    0%   { transform: translateY(10px); box-shadow: var(--shadow, 0 6px 16px rgba(0,0,0,.25)); }
    40%  { transform: translateY(-6px); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
    100% { transform: translateY(0);    box-shadow: var(--shadow, 0 6px 16px rgba(0,0,0,.25)); }
  }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}
/* ===== Legacy BGFX support (Story Forge) ===== */
@keyframes drift { 0%{transform:translateY(0)} 50%{transform:translateY(-6px)} 100%{transform:translateY(0)} }

.bgfx{ position:fixed; inset:0; pointer-events:none; z-index:-1; }
.bgfx .layer{ position:absolute; inset:0; width:100%; height:100%; }
.bgfx .layer.hex{ opacity:.18; animation:drift 12s ease-in-out infinite; }
.bgfx .layer.map{ opacity:.08; animation:drift 22s ease-in-out infinite; }
.bgfx .layer.trace{ opacity:.12; animation:drift 16s ease-in-out infinite; }

/* make sure main content is above */
.container, header, .wrap, .card { position:relative; z-index:2; }
/* ===== Generic row grid helpers (used across pages) ===== */
.row{ display:grid; gap:16px; }

/* default = 1 column on mobile */
.row.cols-2{ grid-template-columns: 1fr; }
.row.cols-3{ grid-template-columns: 1fr; }

/* tablet: 2 cols */
@media (min-width:720px){
  .row.cols-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .row.cols-3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* desktop: 3 cols when requested */
@media (min-width:960px){
  .row.cols-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
/* =====================================================
   GLOBAL FLOAT + FADE BEHAVIOR
   (Applies to all key interactive elements)
   ===================================================== */

/* --- Fade-in on scroll / load --- */
* {
  transition-property: opacity, transform, box-shadow, border-color, background, color;
  transition-duration: .4s;
  transition-timing-function: ease;
}

.reveal, .fade-in, .hover-lift, .card, .panel, .pill, .btn, .cta {
  opacity: 0;
  transform: translateY(10px);
  will-change: transform, opacity;
}
.reveal.in, .fade-in.is-visible, .hover-lift.is-visible,
.card, .panel, .pill, .btn, .cta {
  opacity: 1;
  transform: none;
}

/* --- Hover lift / glow (desktop only) --- */
@media (any-hover:hover) {
  .card:hover,
  .panel:hover,
  .pill:hover,
  .btn:hover,
  .cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
    border-color: #93c5fd; /* subtle blue glow */
  }
}

/* --- Respect reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card, .panel, .pill, .btn, .cta { transform: none !important; opacity: 1 !important; }
}
/* =====================================================
   FORM ELEMENTS — Dark mode selects & textareas
   ===================================================== */
select,
textarea,
input[type="text"],
input[type="number"],
input[type="email"] {
  width: 100%;
  background: #0c1423;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  appearance: none; /* removes native arrow */
}

/* Custom arrow for selects */
select {
  background-image:
    linear-gradient(45deg, transparent 50%, #93c5fd 50%),
    linear-gradient(135deg, #93c5fd 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 3px),
    calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Hover/focus effects */
select:hover,
textarea:hover,
input:hover {
  border-color: #60a5fa;
}
select:focus,
textarea:focus,
input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 6px rgba(96,165,250,.4);
}

/* Option dropdown colors */
option {
  background: #0c1423;
  color: var(--ink);
}
/* =====================================================
   STORY FORGE TAB BUTTONS — bright blue glow & active state
   ===================================================== */
.row.cols-2 .pill {
  flex: 1;
  text-align: center;
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.35);
  color: #bfdbfe;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 0 6px rgba(59,130,246,.25);
}

.row.cols-2 .pill:hover {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #e6f0ff;
  box-shadow: 0 0 14px rgba(59,130,246,.55);
  transform: translateY(-2px);
}

.row.cols-2 .pill.active {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: #fff;
  border-color: #60a5fa;
  box-shadow: 0 0 16px rgba(59,130,246,.55);
}

/* =====================================================
   STORY FORGE TAB BUTTONS (neutral tone, subtle glow)
   ===================================================== */
.tab-pill {
  flex: 1;
  text-align: center;
  background: var(--soft); /* deep navy from your palette */
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 0 6px rgba(0,0,0,.25);
}

.tab-pill:hover {
  background: linear-gradient(135deg, rgba(59,130,246,.1), rgba(14,165,233,.05));
  color: var(--fx-blue);
  border-color: var(--fx-blue);
  box-shadow: 0 0 10px rgba(59,130,246,.25);
  transform: translateY(-2px);
}

.tab-pill.active {
  background: rgba(59,130,246,.08);
  border-color: var(--fx-blue-soft);
  color: var(--fx-blue);
  box-shadow: 0 0 12px rgba(59,130,246,.35);
}
/* ==========================================================
   Home PAGE — page-specific styles moved from inline <style>
   ========================================================== */

/* Layout shell */
.site-shell {
  max-width: 1120px;
  margin-inline: auto;
  padding: 20px 20px 64px;
}
.prose-narrow { max-width: 70ch; }

/* Screenshot cards */
.shot {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius, 22px);
  box-shadow: var(--shadow, 0 10px 30px rgba(2,6,23,.45));
  padding: 10px;
  overflow: hidden;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius, 22px) - 8px);
  object-fit: cover;
  object-position: left center;
  max-height: 520px;
  -webkit-mask-image: linear-gradient(180deg, #000 90%, transparent);
          mask-image: linear-gradient(180deg, #000 90%, transparent);
}
.shot-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
  background: var(--cta);
  color: #fff;
  border: 1px solid var(--cta-shadow);
  box-shadow: 0 3px 0 var(--cta-shadow);
}

/* “Why” info box */
.why-box {
  padding: 16px 20px;
  background: rgba(15,22,37,0.85);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cta);
  border-radius: 14px;
  box-shadow: var(--shadow, 0 10px 30px rgba(2,6,23,.45));
  color: var(--muted);
  line-height: 1.6;
}
.why-box strong { color: var(--cta); font-weight: 800; }

/* Flowing tech background */
.tech-bg { pointer-events: none; position: fixed; inset: 0; z-index: -1; }
.tech-hex { position: fixed; right: -40vw; top: 0; width: 200vw; height: 120vh; opacity: .20; animation: tech-drift 120s linear infinite; }
.tech-map { position: fixed; inset: 0; opacity: .18; }
.tech-traces { position: fixed; inset-inline: 0; bottom: 0; height: 55vh; }
.tech-glow {
  position: fixed; left: 50%; top: 33%;
  transform: translate(-50%, -50%);
  width: 60vmin; height: 60vmin;
  border-radius: 9999px; filter: blur(28px);
  background: radial-gradient(circle at center,
    rgba(59,130,246,.25),
    rgba(59,130,246,.08) 45%,
    transparent 60%);
}
.tech-particles { position: fixed; inset: 0; }

/* Animations */
@keyframes tech-drift { from { transform: translateX(0) } to { transform: translateX(-10%) } }
@keyframes tech-floatY { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@keyframes tech-twinkle { 0%,100% { opacity: .6 } 50% { opacity: 1 } }

@keyframes fadeSlide { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
.fade-slide { opacity: 0; animation: fadeSlide .8s ease forwards; }
.delay-1 { animation-delay: .15s }
.delay-2 { animation-delay: .45s }
.delay-3 { animation-delay: .75s }

/* Typing demo caret */
#typingPrompt { word-break: break-word; }
#typingCaret { width: 6px; height: 1.1em; background: var(--cta); display: inline-block; }

/* a11y */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Responsive tweaks */
@media (max-width:640px){
  h1 { font-size: 1.6rem; line-height: 1.25; }
  .why-box { padding: 12px 14px; border-left-width: 3px; }
  .shot { padding: 8px; }
  .shot img { max-height: 360px; object-position: center top; }
  .shot-badge { bottom: 10px; right: 10px; font-size: 12px; padding: 6px 10px; }
  .site-shell { padding: 14px 14px 56px; }
  .user-email { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .grid.md\:grid-cols-2, .grid.md\:grid-cols-3 { grid-template-columns: 1fr !important; gap: 16px !important; }
  .p-6 { padding: 16px !important; }
  .text-lg { font-size: 1.05rem !important; }
  .text-xl { font-size: 1.15rem !important; }
}
/* ===== Practice hero layout fix (no HTML changes) ===== */

/* Target the first big grid on the page */
.site-shell > section.grid.py-12.md\:py-20.items-start{
  /* make it a single column regardless of Tailwind's md: settings */
  grid-template-columns: 1fr !important;
  align-items: start;
  gap: 24px;
}

/* Larger, tighter headline like the “correct” screenshot */
.site-shell > section.grid.py-12.md\:py-20.items-start h1{
  font-size: clamp(2.2rem, 4.8vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: .25rem;
}

/* Make the typing card feel like a hero card */
.site-shell > section.grid.py-12.md\:py-20.items-start .rounded-2xl{
  border-color: var(--border);
  background: rgba(15,22,37,.90); /* same as other cards */
}

/* “How it works (30s)” block spacing below the typing card */
.site-shell > section.grid.py-12.md\:py-20.items-start > div:nth-child(3){
  margin-top: .5rem;
}

/* Button row below hero (keep it near, not way off to the right) */
.site-shell > section.grid.py-12.md\:py-20.items-start + .flex{
  justify-content: center;
}
/* ==============================
   CHOOSE YOUR PATH SECTION FIX
   ============================== */
#choose-path,
.choose-path {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  max-width: 1200px; /* prevents them from going edge-to-edge on huge monitors */
  margin: 0 auto;
  padding: 2rem 1rem;
}

.choose-path .card,
#choose-path .card {
  flex: 1 1 480px; /* ensures both cards share width equally */
  min-width: 300px;
  max-width: 580px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.choose-path .card:hover,
#choose-path .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(59,130,246,0.25);
}

/* make buttons line up nicely inside */
.choose-path .card .btn,
#choose-path .card .btn {
  margin-top: 1rem;
  display: inline-block;
}
/* =====================================================
   PRACTICE PAGE — scoped overrides & components
   ===================================================== */
.practice-page .site-shell{ max-width:1120px; margin:0 auto; padding:20px 20px 64px; }
.practice-page .prose-narrow{ max-width:70ch; }

/* Intro blurb above the playground */
.practice-page .playground-intro{ text-align:center; margin:40px 0 20px; }
.practice-page .playground-title{
  font-size:1.8rem; font-weight:700; color:var(--fx-blue);
  text-shadow:0 0 10px rgba(77,166,255,.4);
}
.practice-page .playground-sub{ font-size:1rem; color:var(--muted); margin-top:6px; }

/* Workspace layout (left: prompt, right: Mini Vara) */
/* Only the top section (Prompt | Mini Vara) should be a 2-col grid */
#pp-workspace .workspace{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,0.95fr);
  gap:16px;
  margin-top:22px;
}
@media (max-width:860px){
  #pp-workspace .workspace{
    grid-template-columns:1fr;
    gap:12px;
    margin-top:14px;
  }
}


/* Panels are already global (.panel), just tweak inner spacing if needed */
.practice-page .panel header{ padding:14px 18px; background:var(--soft); border-bottom:1px solid var(--border); border-top-left-radius:18px; border-top-right-radius:18px; }
.practice-page .panel .content{ padding:16px; }

/* Prompt input + toolbar */
.practice-page textarea,
.practice-page input[type="text"],
.practice-page select,
.practice-page #prompt{
  width:100%; background:#0c1423; color:var(--ink);
  border:1px solid var(--border); border-radius:14px; padding:12px; font-size:16px; outline:none; resize:vertical;
}
.practice-page #prompt{ min-height:220px; }
.practice-page .toolbar{ display:flex; gap:10px; align-items:center; justify-content:space-between; margin-top:10px; }
.practice-page .toolbar .meta{ color:var(--muted); }

/* Buttons (inherits .btn from global) */
.practice-page .btn.ghost{ background:transparent; color:#cbd5e1; border:1px solid rgba(59,130,246,.4); box-shadow:none; }

/* Mini Vara feedback card */
.practice-page .mv-card{
  background:var(--card); border:1px solid var(--border); border-radius:18px;
  padding:16px; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:14px;
}
.practice-page .mv-head{ display:flex; justify-content:space-between; align-items:center; }
.practice-page .mv-who{ display:flex; align-items:center; gap:10px; }
.practice-page .mv-avatar{ width:48px; height:48px; border-radius:12px; object-fit:cover; }
.practice-page .mv-title{ font-weight:900; color:var(--ink); }
.practice-page .mv-sub{ font-size:.92rem; color:var(--muted); }
.practice-page .mv-score{
  background:rgba(30,58,138,.3); border:1px solid var(--border); color:#c7d2fe;
  padding:6px 10px; border-radius:999px; font-weight:800; min-width:64px; text-align:center;
}
.practice-page .mv-row{ margin-top:8px; }
.practice-page .mv-pill{ display:inline-block; font-size:.85rem; font-weight:800; padding:4px 10px; border-radius:999px; margin-bottom:6px; }
.practice-page .mv-pill-good{ background:var(--good-bg); border:1px solid var(--good-br); color:var(--good-ink); }
.practice-page .mv-pill-warn{ background:var(--warn-bg); border:1px solid var(--warn-br); color:var(--warn-ink); }
.practice-page .mv-pill-accent{ background:var(--accent-bg); border:1px solid var(--accent-br); color:var(--accent-ink); }
.practice-page .mv-checklist{ list-style:disc; padding-left:20px; margin:0; }
.practice-page .mv-checklist li{ margin:4px 0; line-height:1.4; }

/* Rewrite box with copy button */
.practice-page .mv-rewrite{
  position:relative; border-radius:14px; padding:12px 44px 12px 12px;
  background:#0c1423; border:1px solid var(--border);
  max-height:150px; overflow-y:auto;
}
.practice-page .mv-rewrite pre{
  margin:0; white-space:pre-wrap; word-wrap:break-word;
  font-family:ui-sans-serif,system-ui; font-size:.95rem; color:var(--ink);
}
.practice-page .mv-copy{
  position:absolute; right:8px; top:8px; background:var(--cta); border:1px solid var(--cta-shadow);
  color:#fff; font-weight:800; border-radius:10px; padding:4px 8px; box-shadow:0 2px 0 var(--cta-shadow);
  cursor:pointer; font-size:.8rem;
}

/* “Why not just use ChatGPT” / misc boxes use global .box */

/* Ask AI modal (only here) */
.practice-page .askai-backdrop{ display:none; place-items:center; position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:1000; padding:20px; }
.practice-page .askai-backdrop.show{ display:grid; }
.practice-page .askai-card{ width:min(900px,100%); max-width:600px; margin:auto; padding:20px; border-radius:18px; background:var(--card); border:1px solid var(--border); box-shadow:var(--shadow); }
.practice-page .askai-card header{
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 4px 10px; margin:0 4px 10px; background:var(--soft); border-bottom:1px solid var(--border);
  border-top-left-radius:12px; border-top-right-radius:12px;
}
.practice-page .askai-textarea{ min-height:180px; width:100%; background:#0c1423; color:var(--ink); border:1px solid var(--border); border-radius:14px; padding:12px; }
.practice-page .askai-close{ border:1px solid rgba(59,130,246,.4); border-radius:10px; padding:4px 10px; background:transparent; color:#cbd5e1; font-weight:800; cursor:pointer; }
.practice-page .askai-status{ display:none; margin:10px 0; padding:8px 10px; border-radius:10px; font-weight:800; color:#c7d2fe; background:rgba(30,58,138,.3); border:1px solid var(--border); }
.practice-page .askai-output{ display:none; margin-top:8px; padding:12px; border-radius:12px; border:1px solid var(--border); background:var(--soft); white-space:pre-wrap; }

/* Typing demo caret (safe scope) */
.practice-page #typingPrompt{ word-break:break-word; }
.practice-page #typingCaret{ width:6px; height:1.1em; background:var(--cta); display:inline-block; }

/* Hero grid (Tailwind block) forced to 1-col only on this page */
.practice-page .site-shell > section.grid.py-12.md\:py-20.items-start{
  grid-template-columns:1fr !important; align-items:start; gap:24px;
}
.site-shell > section.grid.py-12.md\:py-20.items-start{
  display: grid;
  grid-template-columns: minmax(0,1fr) 420px; /* left grows, right rail ~420px */
  gap: 24px;
  align-items: start;
}

/* Collapse to one column on tablets/phones */
@media (max-width: 1024px){
  .site-shell > section.grid.py-12.md\:py-20.items-start{
    grid-template-columns: 1fr;
  }
}
.practice-page .site-shell > section.grid.py-12.md\:py-20.items-start .rounded-2xl{
  border-color:var(--border); background:rgba(15,22,37,.90);
}
.practice-page .site-shell > section.grid.py-12.md\:py-20.items-start > div:nth-child(3){ margin-top:.5rem; }
.practice-page .site-shell > section.grid.py-12.md\:py-20.items-start + .flex{ justify-content:center; }

/* Mobile rescue for inputs & toolbar */
@media (max-width:640px){
  .practice-page #prompt{ min-height:180px !important; font-size:15px !important; }
  .practice-page .toolbar{ flex-direction:column; align-items:stretch; gap:8px; }
  .practice-page .toolbar .meta{ order:2; text-align:center; }
  .practice-page .toolbar > *{ width:100%; }
  .practice-page .btn{ width:100%; padding:12px 14px; box-shadow:0 3px 0 var(--cta-shadow); }
}
/* PRACTICE — make left-column sections carded like the right rail */
.hero .hero-left .upgrade-callout,
.hero .hero-left .box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

/* spacing between the stacked cards on the left */
.hero .hero-left .upgrade-callout { margin-top: 10px; }
.hero .hero-left .upgrade-callout + .box { margin-top: 16px; }

/* “Weekly Challenge” badge -> pill */
.hero .hero-left .box .challenge-badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background:var(--chip-bg);
  border:1px solid var(--border);
  color:var(--chip-ink);
  font-weight:800;
}

/* Right-rail cards: ensure consistent look */
.hero .hero-right .box,
.hero .hero-right .with-blue-border{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

/* Primary button inside AskAI card */
.hero .hero-left .upgrade-callout .cta button{
  background: linear-gradient(135deg, var(--cta-grad-start), var(--cta-grad-end));
  color:#E6F0FF; font-weight:800;
  padding:8px 14px; border-radius:12px;
  border:1px solid var(--cta-shadow);
  box-shadow:0 3px 0 var(--cta-shadow), 0 0 12px rgba(59,130,246,.35);
  cursor:pointer; transition:transform .12s ease, box-shadow .2s ease;
}
.hero .hero-left .upgrade-callout .cta button:hover{
  transform: translateY(-1px);
  box-shadow:0 4px 0 var(--cta-shadow), 0 0 18px rgba(59,130,246,.5);
}
/* ===== Auth page sizing (smaller card) ===== */
.auth .site-shell{ max-width:420px; margin:24px auto 56px; padding:0 12px; }
.auth .card{ padding:16px; border-radius:18px; }
.auth h1{ font-size:22px; margin:0 0 6px; }
.auth .muted{ font-size:.95rem; }

.auth .row{ gap:8px; }
.auth .btn{ padding:10px 12px; border-radius:12px; }
.auth .btn.btn-primary{ box-shadow:0 3px 0 var(--cta-shadow); }

.auth input, .auth select, .auth textarea{
  padding:10px 10px; font-size:15px; border-radius:12px;
}

/* tighten Google button */
.auth #googleBtn{ padding:10px 12px; border-radius:12px; }

/* even smaller on huge desktops so it doesn’t look oversized */
@media (min-width:1280px){
  .auth .site-shell{ max-width:380px; }
}
/* Consistent control sizing */
.auth {
  --control-h: 52px;    /* tweak to taste (48–56px works well) */
  --control-pad: 12px 14px;
}

.auth #authForm input[type="email"],
.auth #authForm input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--control-h);
  padding: var(--control-pad);
  border-radius: 12px;        /* keeps the rounded corners */
  line-height: 1;             /* avoid extra vertical shrink/expand */
}

/* Match password input height */
.auth #togglePass {
  min-height: 50px;       /* adjust to match your input height */
  padding: 0 16px;        /* keeps spacing nice */
  border-radius: 12px;    /* rounded corners like inputs */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure the row aligns things vertically */
.auth .form-row.two {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}
/* Wrapper positions the button over the input */
.auth .field {
  position: relative;
}

/* Space inside the input so text doesn’t sit under the button */
.auth .has-reveal > input {
  /* match your input height/rounding styles; only adding right padding: */
  padding-right: 84px; /* room for the button (tweak as needed) */
}

/* The floating Show/Hide button */
.auth .reveal-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  height: 40px;                 /* touch-friendly; adjust if your inputs are taller */
  min-width: 64px;
  padding: 0 12px;
  border-radius: 10px;          /* same family as your inputs */
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

/* Focus states (keyboard + a11y) */
.auth .reveal-btn:focus-visible {
  outline: 2px solid var(--fx-blue);
  outline-offset: 2px;
}

/* Optional: subtle hover */
.auth .reveal-btn:hover {
  background: rgba(77,166,255,.08);
}

/* A11y: Auth page link contrast */
.auth-page a {
  color: #fcfcff;                 /* Pa11y-approved contrast */
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.auth-page a:hover,
.auth-page a:focus-visible {
  color: #ffffff;                 /* slightly brighter on hover/focus */
  text-decoration-thickness: 2px;
}

.auth-page a:visited {
  color: #eaeaff;                 /* keeps contrast but differentiates */
}

.auth-page a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}


/* ===== About page (scoped) ===== */
.about-page main{ padding:0 20px 64px }
.about-page .hero{ display:grid; grid-template-columns:1.1fr .9fr; gap:32px; align-items:center; padding:32px 0 12px }
.about-page .hero h1{ font-size:clamp(28px,4vw,44px); line-height:1.12; margin:0 0 12px }
.about-page .hero p{ color:var(--muted); margin:0 0 18px; font-size:clamp(16px,2.2vw,18px) }
.about-page .hero-art{ display:flex; align-items:center; justify-content:center; padding:16px; background:var(--card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow) }
.about-page .hero-art img{ width:100%; height:auto; max-width:260px; border-radius:16px; display:block }

.about-page .section{ padding:36px 0 }
.about-page .grid{ display:grid; gap:18px; grid-template-columns:repeat(3,1fr) }

.about-page .quote{
  background:linear-gradient(180deg,#0f1625,#0b1220);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow);
  display:flex; gap:14px; align-items:flex-start;
}
.about-page .quote img{ width:60px; height:60px; object-fit:contain; border-radius:12px }
.about-page .kicker{ font-weight:900; font-size:13px; letter-spacing:.35px; text-transform:uppercase; color:#93c5fd }

@media (max-width:980px){
  .about-page .grid{ grid-template-columns:1fr }
  .about-page .hero{ grid-template-columns:1fr; padding-top:18px }
  .about-page .hero-art img{ max-width:200px; margin-top:8px }
}
@media (max-width:640px){
  .about-page .actions{ flex-direction:column }
  .about-page .btn, .about-page .cta{ width:100% }
}
/* --------------------------------------------
   A11y Fix: About Page Link Contrast
   Applies to links inside dark cards/sections
   -------------------------------------------- */
.about-page a {
  color: #fcfcff; /* Pa11y recommended for 4.5:1 contrast */
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.about-page a:hover,
.about-page a:focus-visible {
  color: #ffffff; /* stays high contrast but slightly brighter */
  text-decoration-thickness: 2px;
}

.about-page a:visited {
  color: #eaeaff; /* subtle variant, still passes contrast */
}

.about-page a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* =====================================================
   GAMES — Guess That Prompt (scoped by .games-page)
   ===================================================== */
.games-page .hdr{
  display:flex; align-items:center; gap:12px;
  justify-content:space-between; margin-top:18px; flex-wrap:wrap;
}
.games-page .hdr h1{ margin:0; font-size:clamp(26px,4.8vw,40px) }
.games-page .controls{ display:flex; gap:10px; align-items:center; flex-wrap:wrap }

.games-page .select{
  background:var(--soft); color:var(--ink);
  border:1px solid var(--border); border-radius:12px;
  padding:8px 10px; font-weight:800;
}

.games-page .score-pill{
  background:var(--chip-bg); border:1px solid var(--border);
  border-radius:999px; padding:8px 14px;
  font-weight:900; color:#bfdbfe;
}

/* Lock banner */
.games-page .lock-banner{
  display:none; margin-top:10px; background:rgba(59,130,246,.12);
  border:1px dashed var(--border); padding:10px 12px; border-radius:12px;
  align-items:center; justify-content:space-between; gap:10px;
}
.games-page .lock-banner strong{ font-weight:900 }

/* Layout */
.games-page .game{
  display:grid; grid-template-columns:1.1fr 1fr;
  gap:18px; margin-top:18px;
}
@media (max-width:980px){
  .games-page .game{ grid-template-columns:1fr }
}

/* Cards */
.games-page .card{
  background:var(--card); border:1px solid var(--border);
  border-radius:18px; box-shadow:var(--shadow); padding:16px;
}
.games-page .card h3{ margin:0 0 8px }

/* Output area */
.games-page .ai-output{
  background:#0b1322; border:1px solid var(--border);
  border-radius:14px; padding:14px; font-size:1rem;
  line-height:1.5; white-space:pre-wrap; color:#e2e8f0;
}

/* Options */
.games-page .opts{ display:grid; gap:10px; margin-top:10px }
.games-page .opt{
  display:flex; gap:10px; align-items:flex-start; background:var(--soft);
  border:1px solid var(--border); border-radius:14px; padding:12px; cursor:pointer;
  transition:transform .06s ease;
}
.games-page .opt:hover{ transform:translateY(-1px) }
.games-page .opt input{ margin-top:4px }
.games-page .opt.disabled{ opacity:.65; cursor:default }
.games-page .opt.correct{ border-color:#22c55e; background:rgba(34,197,94,.1) }
.games-page .opt.wrong{ border-color:#ef4444; background:rgba(239,68,68,.08) }
.games-page .opt.selected{ outline:2px solid rgba(59,130,246,.6) }

/* Actions/meta */
.games-page .actions{
  display:flex; align-items:center; justify-content:space-between;
  margin-top:12px; gap:10px; flex-wrap:wrap;
}
.games-page .meta{ color:var(--muted); font-size:14px }

/* Explanation reveal */
.games-page .expl{
  margin-top:10px; background:#0b1322; border:1px dashed var(--border);
  padding:12px; border-radius:12px; display:none; color:#dbeafe;
}
.games-page .expl strong{ font-weight:900 }

/* Footer pill reuses global .footer-pill; no extra rules needed */
/* =====================================================
   VARA’S PLAYGROUND PAGE — grid, cards, and badges
   ===================================================== */
.playground-page .hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 22px;
  align-items: center;
  margin-top: 16px;
}
.playground-page .hero-art {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 260px; height: 260px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; justify-self: start;
}
.playground-page .hero-art img {
  max-width: 92%; max-height: 92%; object-fit: contain;
}

/* Grid layout */
.playground-page .play-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}

/* Cards */
.playground-page .play-grid .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.playground-page .play-grid .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(2,6,23,.65);
  border-color: #93c5fd;
}

/* Badge */
.playground-page .play-grid .badge {
  width: 48px; height: 48px;
  border-radius: 9999px;
  display: grid; place-items: center;
  font-size: 24px;
  margin-bottom: 10px;
  background: rgba(59,130,246,.15);
  border: 1px solid var(--border);
}

/* Title + copy */
.playground-page .play-grid h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}
.playground-page .play-grid p {
  margin: 0;
  color: var(--muted);
}

/* CTA arrow */
.playground-page .play-grid .go {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #c7d2fe;
  text-decoration: none;
}
.playground-page .play-grid .go span {
  transition: transform .15s ease;
}
.playground-page .play-grid .card:hover .go span {
  transform: translateX(3px);
}

/* Mobile tweaks */
@media (max-width: 980px) {
  .playground-page .hero { grid-template-columns: 1fr; gap: 14px; }
  .playground-page .hero-art { width: 220px; height: 220px; margin: 0 auto; }
  .playground-page .play-grid { grid-template-columns: 1fr; gap: 16px; }
}
/* =====================================================
   IMPROVEMENT (Prompt Soup) — scoped styles
   ===================================================== */
.improvement-page .slice{ padding:28px 0 }
.improvement-page .slice.alt{ background:rgba(15,22,37,.60) }

/* Panels & tints */
.improvement-page .card,
.improvement-page .panel{
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--shadow);
  padding:18px;
}
.improvement-page .tint-1{ background:#0f1625; }
.improvement-page .tint-2{ background:#0c1423; }

/* Hero */
.improvement-page .hero{
  display:grid; grid-template-columns:1.2fr .8fr; align-items:center; gap:32px; margin:8px 0 16px;
}
.improvement-page .hero-left h1{ font-size:clamp(32px,6vw,52px); margin:0 0 12px; font-weight:900 }
.improvement-page .sub{ color:var(--muted); margin-bottom:8px; font-size:16px }
.improvement-page .subtle{ color:#cbd5e1; opacity:.9 }
.improvement-page .hero-art{ text-align:center }
.improvement-page .hero-art .mini-top{
  width:240px; height:auto; border-radius:18px; background:var(--soft);
  border:1px solid var(--border); box-shadow:var(--shadow);
}
.improvement-page .mini-caption{ margin-top:8px; font-size:14px; color:var(--muted) }

/* Filters / HUD */
.improvement-page .hud{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:16px }
.improvement-page .score,
.improvement-page .round{
  background:var(--soft); border:1px solid var(--border); border-radius:14px; padding:8px 12px;
}
.improvement-page .progress{
  flex:1; background:rgba(59,130,246,.15);
  border-radius:999px; height:10px; position:relative; overflow:hidden; border:1px solid var(--border);
}
.improvement-page .progress .bar{
  position:absolute; inset:0; width:0%;
  background:linear-gradient(90deg,var(--cta),#60a5fa);
}

/* Buttons (reuse global, plus a “secondary” ghost) */
.improvement-page .btn.secondary,
.improvement-page button.secondary{
  background:transparent; color:#cbd5e1;
  border:1px solid rgba(59,130,246,.4); box-shadow:none;
}
.improvement-page .btn.secondary:hover,
.improvement-page button.secondary:hover{
  border-color:#93c5fd; box-shadow:0 0 10px rgba(59,130,246,.25);
}

/* Play grid */
.improvement-page .play-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start;
}
.improvement-page .card.bowl-card{ position:relative; overflow:hidden; height:100% }

/* ==== SOUP BOWL =================================================== */
.improvement-page .soup-wrap{
  display:grid; place-items:center; padding:10px;
}
.improvement-page .drop-zone{
  min-height:140px; background:transparent; border:0;
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px; width:100%;
}
.improvement-page .drop-zone.dragover .broth{ filter:brightness(1.05) }
.improvement-page .drop-zone.dragover .bowl-outer{ transform:translateY(1px) }
.improvement-page .drop-zone.has-ingredients .bubbles span{ opacity:.95 }
.improvement-page .drop-zone.has-ingredients .steam span{ opacity:.9 }

.improvement-page .bowl{
  width:100%; max-width:720px; aspect-ratio:16/9;
  position:relative; display:grid; place-items:center;
}
.improvement-page .bowl-outer{
  position:absolute; bottom:0; width:80%; height:56%;
  background:radial-gradient(ellipse at 50% 20%, #172033 0%, #0f1a2b 55%, #0b1525 80%);
  border:3px solid #1b2c4a; border-bottom-width:10px;
  border-radius:50% / 60%;
  filter:drop-shadow(0 14px 22px rgba(0,0,0,.20));
}
.improvement-page .broth{
  position:absolute; bottom:28%; width:70%; height:26%;
  background:radial-gradient(ellipse at 50% 50%, #10325b 0%, #0e2a4b 80%);
  border:3px solid #1b2c4a; border-radius:50%; overflow:hidden; z-index:1;
}
.improvement-page .rim{
  position:absolute; bottom:28%; width:72%; height:28%; border-radius:50%;
  box-shadow:inset 0 6px 10px rgba(255,255,255,.12), inset 0 -6px 10px rgba(0,0,0,.25);
  pointer-events:none; z-index:2;
}
.improvement-page .prompt-label{
  position:absolute; left:50%; bottom:34%; transform:translateX(-50%);
  width:84%; padding:4px 6px; text-align:center; font-weight:900;
  font-size:clamp(14px,1.9vw,18px); line-height:1.25; color:#bfdbfe;
  text-shadow:0 1px 0 rgba(0,0,0,.6); z-index:3; word-wrap:break-word;
}

/* Steam + bubbles (namespaced animations) */
@keyframes soup-steam { 0%{transform:translate(-50%,0) scale(.6);opacity:.6} 100%{transform:translate(-50%,-100px) scale(1.4);opacity:0} }
@keyframes soup-bub   { 0%{transform:translateY(20px) scale(.4);opacity:0} 30%{opacity:.9} 100%{transform:translateY(-60px) scale(1);opacity:0} }

.improvement-page .steam{ position:absolute; bottom:56%; width:0; height:0; pointer-events:none }
.improvement-page .steam span{
  position:absolute; left:50%; width:10px; height:10px; border-radius:50%;
  background:rgba(96,165,250,.85); filter:blur(7px);
  animation:soup-steam 2.6s linear infinite; opacity:.6;
}
.improvement-page .steam span:nth-child(2){ animation-delay:.6s }
.improvement-page .steam span:nth-child(3){ animation-delay:1.2s }

.improvement-page .bubbles span{
  position:absolute; bottom:8%; left:50%; width:10px; height:10px; border-radius:50%;
  background:#1e3a8a; opacity:0; animation:soup-bub 2.2s ease-in-out infinite;
}
.improvement-page .bubbles span:nth-child(1){ left:46%; animation-delay:.2s }
.improvement-page .bubbles span:nth-child(2){ left:52%; animation-delay:.7s }
.improvement-page .bubbles span:nth-child(3){ left:58%; animation-delay:1.1s }

/* ==== CHIPS / TILES / TABLE ====================================== */
.improvement-page .drop-zone span[data-chip]{
  margin:0 8px 6px 0; padding:6px 10px; border:1px solid var(--border);
  background:#0c1423; border-radius:10px; color:var(--ink);
}
.improvement-page .tiles{ display:flex; gap:12px; flex-wrap:wrap; margin:12px 0 6px }
.improvement-page .tile{
  background:#102038; border:1px solid var(--border); border-radius:16px;
  padding:10px 14px; cursor:grab; user-select:none; display:flex; align-items:center; gap:8px; color:#cbd5e1;
}
.improvement-page .tile[aria-disabled="true"]{ opacity:.45; cursor:not-allowed }

.improvement-page .ingr-table{
  width:100%; border-collapse:separate; border-spacing:0 8px; margin-top:10px;
}
.improvement-page .ingr-table thead th{
  font-size:13px; color:var(--muted); text-align:left; padding:4px 8px;
}
.improvement-page .ingr-table tbody tr{
  background:#0c1423; border:1px solid var(--border); box-shadow:var(--shadow);
}
.improvement-page .ingr-table tbody td{ padding:10px 12px; color:var(--ink) }
.improvement-page .ingr-table .tag{
  display:inline-flex; align-items:center; gap:8px; background:#102038;
  border:1px solid var(--border); border-radius:999px; padding:6px 10px; font-weight:800; color:#e5e7eb;
}
.improvement-page .ingr-table .desc{ color:#cbd5e1 }

/* Feedback / end state */
.improvement-page .vara{ display:flex; gap:12px; align-items:flex-start; margin-top:12px }
.improvement-page .mini{
  width:96px; height:96px; border-radius:12px; background:#0c1423; border:1px solid var(--border);
  display:grid; place-items:center; font-weight:900; object-fit:contain;
}
.improvement-page .bubble{
  background:#0c1423; border:1px solid var(--border); border-radius:16px; padding:12px 14px; box-shadow:var(--shadow);
}
.improvement-page .bubble b{ display:block; margin-bottom:4px }

.improvement-page .rewritten{
  background:rgba(34,197,94,.12); border-left:4px solid #22c55e; padding:12px; border-radius:12px; margin-top:10px; color:#d1fae5;
}
.improvement-page .hint{
  background:rgba(245,158,11,.12); border-left:4px solid #f59e0b; padding:10px; border-radius:12px; margin-top:10px; color:#fde68a;
}
.improvement-page .end{ display:none }

/* Micro-motions */
@keyframes soup-pop { 0%{transform:scale(.9)} 50%{transform:scale(1.05)} 100%{transform:scale(1)} }
@keyframes soup-shake{ 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-4px)} 40%,60%{transform:translateX(4px)} }
.improvement-page .pop{ animation:soup-pop .18s ease-out }
.improvement-page .shake{ animation:soup-shake .35s ease-in-out }

/* ===== Responsive rescue ===== */
@media (max-width:980px){
  .improvement-page header{ backdrop-filter:none }
  .improvement-page .hero{ grid-template-columns:1fr; gap:18px }
  .improvement-page .hero-art .mini-top{ width:180px }
  .improvement-page .play-grid{ grid-template-columns:1fr; gap:24px }
  .improvement-page .prompt-label{ font-size:14px; padding:0 12px; line-height:1.4 }
  .improvement-page .tiles{ justify-content:center; gap:10px }
  .improvement-page .tile{ flex:1 1 40%; min-width:120px; text-align:center }
  .improvement-page .ingr-table{ display:block; overflow-x:auto; font-size:14px }
  .improvement-page .ingr-table th,
  .improvement-page .ingr-table td{ padding:6px 8px }
  .improvement-page .actions{ flex-direction:column }
  .improvement-page .actions .btn,
  .improvement-page .actions button{ width:100%; text-align:center }
}
@media (max-width:500px){
  .improvement-page .prompt-label{ font-size:13px }
  .improvement-page .tile{ min-width:100px; font-size:14px }
  .improvement-page .hero-art .mini-top{ width:72px; height:72px }
  .improvement-page .mini{ width:56px; height:56px }
}
/* ==========================
   Prompt Soup - restore visuals
========================== */
.improvement-page .tile {
  background:#102038;
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px 14px;
  margin:6px;
  cursor:grab;
  color:#e5e7eb;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
  transition:transform .15s ease, box-shadow .2s ease;
}
.improvement-page .tile:hover {
  transform:translateY(-2px);
  box-shadow:0 0 10px rgba(59,130,246,.4);
}
.improvement-page .tile[aria-disabled="true"] {
  opacity:.4;
  cursor:not-allowed;
  filter:grayscale(.5);
}

.improvement-page #dropZone span[data-chip] {
  display:inline-block;
  background:rgba(59,130,246,.15);
  border:1px solid rgba(59,130,246,.45);
  border-radius:12px;
  padding:6px 10px;
  margin:3px;
  color:#e5e7eb;
  font-weight:600;
  transition:background .2s ease, transform .15s ease;
}
.improvement-page #dropZone span[data-chip]:hover {
  background:rgba(59,130,246,.25);
  transform:scale(1.05);
}
/* === Prompt Soup hero: remove nested frames on this page === */
.improvement-page .hero-art{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.improvement-page .hero-art img.mini-top{
  display:block;
  max-width: 260px;
  height:auto;
  border-radius: 18px;   /* soft corners only, no border */
  background: transparent;
  border: 0;
  filter: drop-shadow(0 8px 18px rgba(59,130,246,.25));
}

.improvement-page .mini-caption{
  color: var(--muted);
  text-align:center;
  margin-top: 8px;
}
/* Buttons */
a.pl-btn, button.pl-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  font:600 0.95rem/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  padding:.75rem 1.25rem; border-radius:var(--radius, .75rem);
  border:1px solid transparent; text-decoration:none; cursor:pointer;
  transition:transform .2s, box-shadow .2s, filter .2s, background .2s;
  user-select:none; -webkit-tap-highlight-color:transparent;
}
.pl-btn--primary{ color:#fff; background:linear-gradient(90deg,var(--cta-grad-start,#2563eb),var(--cta-grad-end,#1e40af)); box-shadow:0 8px 18px rgba(2,6,23,.45);}
.pl-btn--primary:hover{ transform:translateY(-1px); filter:saturate(1.05);}
.pl-btn--primary:active{ transform:translateY(0);}
.pl-btn--outline{ color:var(--cta,#3b82f6); background:transparent; border-color:color-mix(in oklab, var(--cta,#3b82f6) 40%, transparent);}
.pl-btn--outline:hover{ background:color-mix(in oklab, var(--cta,#3b82f6) 12%, transparent);}

/* ===== Tailwind-lite shim (only what this page uses) ===== */

/* Layout */
.grid{ display:grid; }
.flex{ display:flex; }
.block{ display:block; }
.items-start{ align-items:flex-start; }
.items-center{ align-items:center; }
.items-end{ align-items:flex-end; }
.justify-center{ justify-content:center; }
.flex-wrap{ flex-wrap:wrap; }
.gap-3{ gap:.75rem; } .gap-4{ gap:1rem; } .gap-6{ gap:1.5rem; } .gap-8{ gap:2rem; }
.mt-2{ margin-top:.5rem; } .mt-3{ margin-top:.75rem; } .mt-4{ margin-top:1rem; }
.mt-6{ margin-top:1.5rem; } .mt-8{ margin-top:2rem; } .mt-10{ margin-top:2.5rem; }
.mb-3{ margin-bottom:.75rem; }
.mx-auto{ margin-left:auto; margin-right:auto; }
.p-4{ padding:1rem; } .p-5{ padding:1.25rem; } .p-6{ padding:1.5rem; }
.px-3{ padding-left:.75rem; padding-right:.75rem; }
.px-4{ padding-left:1rem; padding-right:1rem; }
.px-5{ padding-left:1.25rem; padding-right:1.25rem; }
.px-6{ padding-left:1.5rem; padding-right:1.5rem; }
.py-2{ padding-top:.5rem; padding-bottom:.5rem; }
.py-3{ padding-top:.75rem; padding-bottom:.75rem; }
.py-12{ padding-top:3rem; padding-bottom:3rem; }
.py-16{ padding-top:4rem; padding-bottom:4rem; }
.py-20{ padding-top:5rem; padding-bottom:5rem; }
.text-center{ text-align:center; }
.w-full{ width:100%; }
.max-w-3xl{ max-width:48rem; }

/* Grid columns @ md breakpoint */
@media (min-width: 768px){
  .md\:py-20{ padding-top:5rem; padding-bottom:5rem; }
  .md\:p-6{ padding:1.5rem; }
  .md\:grid-cols-2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .md\:grid-cols-3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* Typography */
.text-xs{ font-size:.75rem; line-height:1rem; }
.text-sm{ font-size:.875rem; line-height:1.25rem; }
.text-base{ font-size:1rem; line-height:1.5rem; }
.text-lg{ font-size:1.125rem; line-height:1.75rem; }
.text-xl{ font-size:1.25rem; line-height:1.75rem; }
.text-2xl{ font-size:1.5rem; line-height:2rem; }
.text-3xl{ font-size:1.875rem; line-height:2.25rem; }
.sm\:text-4xl{ font-size:2.25rem; line-height:2.5rem; }
.font-semibold{ font-weight:600; }
.font-extrabold{ font-weight:800; }
.tracking-tight{ letter-spacing:-0.01em; }

/* Colors (map to your tokens where sensible) */
.text-\[color\:var\(--ink\)\]{ color:var(--ink); }
.text-blue-400{ color:#60a5fa; }
.text-blue-300{ color:#93c5fd; }
.text-blue-200{ color:#bfdbfe; }
.text-slate-200{ color:#e5e7eb; }
.text-slate-300{ color:#cbd5e1; }
.text-slate-400{ color:#94a3b8; }
.text-white{ color:#fff; }

/* Backgrounds */
.bg-transparent{ background:transparent; }
.bg-blue-500{ background:#3b82f6; }
.bg-blue-400{ background:#60a5fa; }
.bg-blue-900{ background:#0b1730; } /* fallback solid */
.bg-blue-900\/40{ background:rgba(11,23,48,.4); } /* translucent tag chips */
.bg-\[\#0f1625\]\/90{ background:rgba(15,22,37,.9); }
.bg-\[\#0f1625\]\/80{ background:rgba(15,22,37,.8); }
.bg-\[\#0f1625\]\/60{ background:rgba(15,22,37,.6); }

/* Borders & radius */
.border{ border:1px solid var(--border, rgba(148,163,184,.2)); }
.border-blue-900{ border-color:#0b1730; }
.border-blue-800\/60{ border-color:rgba(30,58,138,.6); }
.rounded-lg{ border-radius:.5rem; }
.rounded-xl{ border-radius:.75rem; }
.rounded-2xl{ border-radius:1rem; }

/* Shadows */
.shadow-inner{ box-shadow: inset 0 1px 3px rgba(0,0,0,.35); }
.shadow-\[var\(--shadow\)\]{ box-shadow: var(--shadow); }

/* Hovers (only where used) */
.hover\:bg-blue-400:hover{ background:#60a5fa; }
.hover\:bg-blue-500\/10:hover{ background:rgba(59,130,246,.10); }

/* Visibility helpers */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* Utility for spacing rule you wanted for why-box globally */
.why-box{ margin-top:2.5rem; }
/* ===============================
   PROMPTLYLIZ CORE BUTTONS
   =============================== */
a.pl-btn, button.pl-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  font:600 0.95rem/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  padding:.75rem 1.25rem; border-radius:var(--radius, .75rem);
  border:1px solid transparent; text-decoration:none; cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, filter .2s ease, background .2s ease;
  user-select:none; -webkit-tap-highlight-color:transparent;
}
.pl-btn--primary{
  color:#fff;
  background:linear-gradient(90deg,var(--cta-grad-start,#2563eb),var(--cta-grad-end,#1e40af));
  box-shadow:0 8px 18px rgba(2,6,23,.45);
}
.pl-btn--primary:hover{ transform:translateY(-1px); filter:saturate(1.05); }
.pl-btn--primary:active{ transform:translateY(0); }

.pl-btn--outline{
  color:var(--cta,#3b82f6);
  background:transparent;
  border-color:color-mix(in oklab, var(--cta,#3b82f6) 40%, transparent);
}
.pl-btn--outline:hover{ background:color-mix(in oklab, var(--cta,#3b82f6) 12%, transparent); }

.pl-btn[disabled], .pl-btn.is-disabled{ opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }

/* Optional tiny chip for your “FREE / ALL LEVELS” labels */
.pl-chip{ display:inline-flex; align-items:center; gap:.35rem; font-size:.75rem; padding:.25rem .5rem;
  border:1px solid var(--border, rgba(148,163,184,.25)); border-radius:.75rem;
  background:rgba(11,23,48,.40); color:#cbd5e1; }

/* ===============================
   TAILWIND-LITE SHIM (ONLY WHAT YOU USE)
   =============================== */

/* Display & layout */
.grid{display:grid;} .flex{display:flex;} .block{display:block;}
.items-start{align-items:flex-start;} .items-center{align-items:center;} .items-end{align-items:flex-end;}
.justify-center{justify-content:center;} .flex-wrap{flex-wrap:wrap;}
.text-center{text-align:center;} .w-full{width:100%;}
.mx-auto{margin-left:auto;margin-right:auto;}

/* Gaps & spacing */
.gap-3{gap:.75rem;} .gap-4{gap:1rem;} .gap-6{gap:1.5rem;} .gap-8{gap:2rem;}
.mt-2{margin-top:.5rem;} .mt-3{margin-top:.75rem;} .mt-4{margin-top:1rem;}
.mt-6{margin-top:1.5rem;} .mt-8{margin-top:2rem;} .mt-10{margin-top:2.5rem;}
.mb-3{margin-bottom:.75rem;}
.p-4{padding:1rem;} .p-5{padding:1.25rem;} .p-6{padding:1.5rem;}
.px-2{padding-left:.5rem;padding-right:.5rem;}
.px-3{padding-left:.75rem;padding-right:.75rem;}
.px-4{padding-left:1rem;padding-right:1rem;}
.px-5{padding-left:1.25rem;padding-right:1.25rem;}
.px-6{padding-left:1.5rem;padding-right:1.5rem;}
.py-2{padding-top:.5rem;padding-bottom:.5rem;}
.py-3{padding-top:.75rem;padding-bottom:.75rem;}
.py-12{padding-top:3rem;padding-bottom:3rem;}
.py-16{padding-top:4rem;padding-bottom:4rem;}
.py-20{padding-top:5rem;padding-bottom:5rem;}

/* Width limits */
.max-w-3xl{max-width:48rem;}

/* Typography */
.text-xs{font-size:.75rem;line-height:1rem;}
.text-sm{font-size:.875rem;line-height:1.25rem;}
.text-base{font-size:1rem;line-height:1.5rem;}
.text-lg{font-size:1.125rem;line-height:1.75rem;}
.text-xl{font-size:1.25rem;line-height:1.75rem;}
.text-2xl{font-size:1.5rem;line-height:2rem;}
.text-3xl{font-size:1.875rem;line-height:2.25rem;}
.font-medium{font-weight:500;} .font-semibold{font-weight:600;} .font-extrabold{font-weight:800;}
.tracking-tight{letter-spacing:-0.01em;}
.text-\[color\:var\(--ink\)\]{color:var(--ink);}

/* Responsive text & layout (only used ones) */
@media (min-width:640px){ .sm\:text-4xl{font-size:2.25rem;line-height:2.5rem;} }
@media (min-width:768px){
  .md\:py-20{padding-top:5rem;padding-bottom:5rem;}
  .md\:p-6{padding:1.5rem;}
  .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr));}
  .md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr));}
}

/* Colors */
.text-blue-400{color:#60a5fa;} .text-blue-300{color:#93c5fd;} .text-blue-200{color:#bfdbfe;}
.text-slate-200{color:#e5e7eb;} .text-slate-300{color:#cbd5e1;} .text-slate-400{color:#94a3b8;}
.text-white{color:#fff;}

/* Backgrounds (map to your palette) */
.bg-transparent{background:transparent;}
.bg-blue-500{background:#3b82f6;} .bg-blue-400{background:#60a5fa;}
.bg-blue-900{background:#0b1730;}
.bg-blue-900\/40{background:rgba(11,23,48,.4);}
.bg-\[\#0f1625\]\/90{background:rgba(15,22,37,.9);}
.bg-\[\#0f1625\]\/80{background:rgba(15,22,37,.8);}
.bg-\[\#0f1625\]\/60{background:rgba(15,22,37,.6);}

/* Borders & radius */
.border{border:1px solid var(--border, rgba(148,163,184,.22));}
.border-blue-900{border-color:#0b1730;}
.border-blue-800\/60{border-color:rgba(30,58,138,.6);}
.rounded-lg{border-radius:.5rem;}
.rounded-xl{border-radius:.75rem;}
.rounded-2xl{border-radius:1rem;}

/* Shadows */
.shadow-inner{box-shadow: inset 0 1px 3px rgba(0,0,0,.35);}
.shadow-\[var\(--shadow\)\]{box-shadow: var(--shadow);}

/* Hover states */
.hover\:bg-blue-400:hover{background:#60a5fa;}
.hover\:bg-blue-500\/10:hover{background:rgba(59,130,246,.10);}

/* Accessibility helper */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* Your global why-box spacing (keeps original look if you already style .why-box) */
.why-box{ margin-top:2.5rem; }

/* Stacked hero (centered) */
.hero-stack { max-width: 1120px; margin-inline: auto; }
.hero-lede { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
.hero-sub  { color: var(--muted); margin: .6rem 0 0; }
.hero-cta  { margin-top: 1rem; }
.cta-sub   { color: var(--muted); }

/* ensure grid override from old rules doesn't force 2 cols */
.site-shell > section.grid.py-12.md\:py-20.items-start { grid-template-columns: 1fr !important; }
.typing-caption { margin-top: .5rem; }
/* Base pill */
.pill {
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.35rem .7rem;
  font:700 11px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  letter-spacing:.2px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(15,22,37,.75);   /* subtle dark */
  color:#cfe0ff;
  box-shadow:0 6px 18px rgba(2,6,23,.25) inset, 0 0 0 rgba(0,0,0,0);
  transition:transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.pill:hover{ transform:translateY(-1px); box-shadow:0 0 14px rgba(59,130,246,.35); }

/* Color variants */
.pill--blue   { background:rgba(30,58,138,.28); border-color:#1f3b73; color:#c7d2fe; }
.pill--cyan   { background:rgba(14,165,233,.22); border-color:#0e6c8d; color:#d6f1ff; }
.pill--green  { background:rgba(34,197,94,.20);  border-color:#1e7b4d; color:#d4fbe3; }
.pill--amber  { background:rgba(245,158,11,.22); border-color:#9a6a07; color:#ffe9b2; }
.pill--purple { background:rgba(124,58,237,.22); border-color:#5d2ab0; color:#e9d5ff; }

/* Outline/ghost & gradient */
.pill--outline{ background:transparent; color:#bfdbfe; border-color:rgba(59,130,246,.45); }
.pill--grad   {
  background:linear-gradient(135deg, rgba(59,130,246,.32), rgba(99,102,241,.28));
  border-color:#274a9f; color:#e6f0ff;
}

/* Size modifiers */
.pill--xs { padding:.25rem .55rem; font-size:10px; }
.pill--sm { padding:.35rem .7rem;  font-size:11px; }  /* default */
.pill--md { padding:.45rem .85rem; font-size:12px; }

/* Icon alignment */
.pill i, .pill .icon { font-style:normal; opacity:.9; }

/* Optional: clickable pill */
a.pill { text-decoration:none; }
/* Section header: title left, tagline right */
.pg-head {
  display:flex; align-items:flex-end; justify-content:space-between; gap:1rem;
  margin-bottom:1rem;
}
.pg-head h2{
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 800; color: var(--ink); letter-spacing:-.01em;
}
.pg-head .tagline{ color: var(--muted); font-weight:600; }

/* Card look */
.pg-card{
  background: rgba(15,22,37,.88);
  border:1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.pg-card:hover{ transform: translateY(-3px); border-color:#93c5fd; }

/* Icon line above titles */
.pg-icon{ font-size: 24px; display:block; opacity:.95; margin-bottom:.35rem; }

/* Title + sub */
.pg-title{
  margin:0 0 .5rem; color:#cfe0ff;
  font-size: clamp(1.1rem, 2vw, 1.25rem); font-weight: 800;
}
.pg-sub{ color: var(--ink); opacity:.9; }

/* Pills (small, rounded) */
.pg-pill{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.35rem .7rem; font:700 11px/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  border:1px solid rgba(59,130,246,.45); color:#cfe0ff;
  background:rgba(30,58,138,.28); border-radius:999px;
}
.pg-pill + .pg-pill{ margin-left:.4rem; }

/* Link CTA */
.pg-link{
  display:inline-block; margin-top:.75rem;
  color:#9ec5ff; text-decoration: underline; font-weight:600;
}
.pg-link:hover{ color:#cfe0ff; }
.loop-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.loop-title {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-align: right;
}

.loop-sub {
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
  flex-wrap: wrap; /* ensures mobile safety */
}

.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}

.section-sub {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
  text-align: right;
}

@media (max-width: 768px) {
  .section-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
  }
}
/* Tailwind-lite shim: missing utility */
.hidden { display: none !important; }

/* === Sidebar Game Button Enhancements === */
.sidebar .btn.btn-primary {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-size: 0.95rem;
  padding: 10px 0;
  background: linear-gradient(135deg, var(--cta-grad-start), var(--cta-grad-end));
  color: #E6F0FF;
  border: 1px solid var(--cta-shadow);
  border-radius: 12px;
  box-shadow:
    0 3px 0 var(--cta-shadow),
    0 0 10px rgba(59,130,246,.35);
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease;
}

/* Hover + focus: subtle glowing lift */
.sidebar .btn.btn-primary:hover,
.sidebar .btn.btn-primary:focus {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--cta-grad-end), var(--cta-grad-start));
  box-shadow:
    0 4px 0 var(--cta-shadow),
    0 0 20px rgba(59,130,246,.55),
    0 0 28px rgba(104,181,255,.25) inset;
  outline: none;
}

/* Optional: gentle breathing pulse animation */
@keyframes sidebarPulse {
  0%, 100% {
    box-shadow:
      0 3px 0 var(--cta-shadow),
      0 0 12px rgba(59,130,246,.3);
  }
  50% {
    box-shadow:
      0 4px 0 var(--cta-shadow),
      0 0 20px rgba(59,130,246,.55),
      0 0 30px rgba(104,181,255,.25) inset;
  }
}
.sidebar .btn.btn-primary.pulse {
  animation: sidebarPulse 5s ease-in-out infinite;
}
.lb-wrap{ background:var(--card); border:1px solid var(--border); border-radius:18px; padding:16px; }
.lb-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.lb-actions .btn{ padding:8px 12px; border-radius:999px; background:var(--soft); color:var(--ink); border:1px solid var(--border); }
.lb-tabs{ display:flex; gap:8px; margin:8px 0 12px; }
.lb-tabs .tab{ padding:6px 10px; border-radius:999px; border:1px solid var(--border); background:transparent; color:var(--ink); cursor:pointer; }
.lb-tabs .tab.active{ background:rgba(77,166,255,.15); border-color:var(--fx); }
.lb-table{ display:block; }
.lb-headrow, .lb-row{ display:grid; grid-template-columns: 64px 1fr 140px 140px; gap:8px; padding:10px 8px; border-bottom:1px solid var(--border); }
.lb-headrow{ font-weight:600; color:var(--muted); }
.lb-row.lb-you{ outline:2px solid var(--fx); border-radius:10px; }
.lb-you .pill{ display:inline-block; margin-top:12px; padding:6px 10px; border-radius:999px; background:rgba(77,166,255,.15); border:1px solid var(--border); }
.card.center{ background:var(--card); border:1px solid var(--border); border-radius:14px; padding:16px; text-align:center; }
.btn{ cursor:pointer; }
.muted{ color:var(--muted); }
/* New navigation with Hamburger effect 

/* Top bar */
#topbar{position:fixed;inset:0 0 auto 0;z-index:1000;background:rgba(11,18,32,.85);
  border-bottom:1px solid var(--border);backdrop-filter:blur(10px)}
#topbar .bar{max-width:1200px;margin:0 auto;padding:14px 20px;display:flex;justify-content:space-between;align-items:center}
.brand{display:flex;align-items:center;gap:8px;color:var(--ink);text-decoration:none;font-weight:600;font-size:18px}
.brand .dot{width:22px;height:22px;border-radius:6px;background:rgba(77,166,255,.25)}
.actions{display:flex;align-items:center;gap:10px}
.btn{padding:7px 14px;border-radius:8px;border:1px solid var(--border);background:transparent;color:var(--ink);cursor:pointer}
.btn:hover{border-color:var(--accent)}

/* Overlay */
#nav-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;z-index:1050}

/* Drawer */
#side-nav{position:fixed;top:0;left:0;width:260px;height:100vh;background:var(--card);
  border-right:1px solid var(--border);transform:translateX(-100%);transition:transform .24s ease;z-index:1100;
  display:flex;flex-direction:column}
#side-nav .mobile-head{padding:14px 18px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
#side-nav .title{color:var(--ink);font-weight:600}
#side-nav nav{padding:16px;overflow-y:auto}
#side-nav nav a{display:block;padding:10px 12px;border-radius:8px;text-decoration:none;font-size:15px;color:var(--muted);margin-bottom:6px}
#side-nav nav a:hover{background:rgba(77,166,255,.10);color:var(--ink)}

/* Open state (global) */
body.nav-open #side-nav{transform:translateX(0)}
body.nav-open #nav-overlay{display:block}

/* Content offsets */
.site-shell{padding-top:70px}
@media (min-width:1024px){
  /* Optional: don’t dim desktop with overlay */
  body.nav-open #nav-overlay{display:none}
  /* Only push content when nav open */
  body.nav-open .site-shell{padding-left:260px}
}

/* Motion respect */
@media (prefers-reduced-motion: reduce){
  #side-nav{transition:none}
}
.hamburger {
  width: 20px;
  height: 3px;
  background: var(--ink);
  position: relative;
  border-radius: 2px;
}
.hamburger::before,
.hamburger::after {
  content: "";
  width: 20px;
  height: 3px;
  background: var(--ink);
  position: absolute;
  left: 0;
  border-radius: 2px;
}
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }
.brand:hover .hamburger,
.brand:hover .hamburger::before,
.brand:hover .hamburger::after {
  background: var(--accent);
}

/* Techy title treatment  FOR ALL TITLES*/
.techy-title {
  color: var(--fx-blue); /* your signature neon blue */
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-shadow:
    0 0 12px rgba(77,166,255,.35),
    0 0 24px rgba(77,166,255,.20);
}
  #plans .pg-head h2{ color:var(--ink); margin:0 0 4px; }
  #plans .pg-head .tagline{ color:var(--muted); }

  .plan-grid{ display:grid; gap:16px; }
  @media (min-width: 900px){ .plan-grid{ grid-template-columns: 1fr 1fr; } }

  .plan{ position:relative; border:1px solid var(--border); background:var(--card); border-radius:18px; padding:18px; }
  .plan--pro{ outline:2px solid rgba(77,166,255,.25); box-shadow:0 0 0 1px rgba(77,166,255,.25) inset; }

  .plan-head{ display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:8px; }
  .plan-title{ margin:0; color:var(--ink); }
  .plan-price{ display:flex; align-items:baseline; gap:8px; }
  .price-main{ font-size:2rem; font-weight:800; color:var(--ink); }
  .price-sub{ color:var(--muted); font-size:.9rem; }

  .feature-list{ margin:10px 0 14px; padding-left:18px; display:grid; gap:6px; }
  .feature-list li{ color:var(--ink); }

  .plan-cta{ display:grid; gap:8px; align-items:center; }
  .fineprint{ color:var(--muted); }

.qz-panel{ margin:16px 0 28px }
.qz-card{ background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:16px }
.qz-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px }
.qz-status{ font-size:.85rem; padding:4px 8px; border-radius:999px; border:1px solid var(--border); background:var(--soft); color:var(--muted) }
.qz-status--ready{ color:#c7f9ff; border-color:var(--cta) }
.qz-status--passed{ color:#b8f7c3; border-color:#2e7d32 }
.qz-sub{ color:var(--muted); margin:2px 0 10px }
.qz-actions .btn[disabled], .qz-actions .btn[aria-disabled="true"]{ opacity:.6; pointer-events:none }
.quiz-nudge {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  padding: 14px 14px 12px; max-width: 360px; display: grid; gap: 10px;
}
.quiz-nudge h4 { margin: 0; color: var(--ink); font-size: 1rem; }
.quiz-nudge p { margin: 0; color: var(--muted); font-size: .9rem; }
.quiz-nudge .row { display:flex; gap:10px; justify-content:flex-end; align-items:center; }
.quiz-nudge .dismiss { background:transparent; border:0; color: var(--muted); cursor:pointer; }
.quiz-nudge .dismiss:hover { text-decoration: underline; }
/* ==========================================================
   PromptlyLiz — Mobile Essentials (Compact)
   Keep: auth visibility, nav cleanup, spacing, lesson/card fixes
   ========================================================== */

/* 0) Base safety */
html, body { overflow-x: hidden; }
img, video, canvas { max-width: 100%; height: auto; }

/* 1) Auth + nav (mobile vs desktop) */
@media (max-width: 640px) {
  /* Hide header auth; show drawer auth */
  header .actions #btnSignIn,
  header .actions #btnSignOut { display: none !important; }
  #side-nav #menuSignIn,
  #side-nav #menuSignOut { display: block !important; }

  /* Tidy top bar */
  #topbar .bar { min-height: 56px; align-items: center; }
  #topbar #who.user-email { display: none !important; }  /* email pill off on mobile */
  #topbar #upgrade-btn {
    font-size: .85rem !important; padding: 8px 12px !important; border-radius: 14px !important;
  }
  #topbar .actions { gap: 8px; }

  /* Give main content breathing room under fixed header */
  main, .site-shell, .page, .page-hero + .container { padding-top: 72px; }
}
@media (min-width: 641px) {
  /* Desktop: header auth on, drawer auth off */
  header .actions #btnSignIn,
  header .actions #btnSignOut { display: inline-flex !important; }
  #side-nav #menuSignIn,
  #side-nav #menuSignOut { display: none !important; }
}

/* 2) Titles: readable on phones */
@media (max-width: 640px) {
  .techy-title, .hero-lede, .page-title {
    margin-top: 1.25rem; margin-bottom: .75rem;
    font-size: 1.75rem; line-height: 1.2; text-align: center;
    text-shadow: 0 0 18px rgba(80,140,255,.25);
  }
}

/* 3) Lesson layout: prevent clipping; full width cards */
@media (max-width: 640px) {
  .lesson-container, .lesson-card, .course-read, .read-panel {
    width: 100% !important; max-width: 100% !important;
    margin: 0 auto !important; padding: 16px !important; border-radius: 16px;
  }
  .lesson-left-pane, .read-rail, .card-rail {
    overflow: visible !important; box-shadow: none !important;
    mask: none !important; -webkit-mask: none !important;
  }
}

/* 4) General cards + sections (Phases, Leaderboard, Games) */
@media (max-width: 640px) {
  .card, .phase-card, .leaderboard-card, .game-card, .hero-panel {
    width: 100%; margin: 12px 0; padding: 16px; border-radius: 18px;
  }
}

/* 5) Hero/CTA spacing */
@media (max-width: 640px) {
  .page-hero, .hero, .cta-hero { padding-top: 48px; padding-bottom: 20px; }
}

/* 6) Touch targets + common controls */
@media (max-width: 640px) {
  .btn, button, .chip, .tab { min-height: 42px; padding: 10px 14px; }
  .tabs .tab { font-size: .9rem; }
}

/* 7) Progress bars: avoid overflow */
@media (max-width: 640px) {
  .progress, .xp-bar, .meter { width: 100%; max-width: 100%; }
}

/* 8) Body copy and long words */
@media (max-width: 640px) {
  body { font-size: 1rem; line-height: 1.6; }
  .prose p { margin: 0 0 .9rem; }
  .prose, .card, .lesson-card { overflow-wrap: anywhere; }
}

/* 9) Drawer button visual consistency (minimal) */
#side-nav .menu-item {
  display: block; width: 100%; text-align: left; padding: .75rem 1rem;
  border-radius: 12px; font: inherit;
  background: var(--card, #0f1a2b); color: var(--ink, #e7eefc);
  border: 1px solid var(--border, #24304d); cursor: pointer;
  transition: background .2s, border-color .2s;
}
#side-nav .menu-item:hover, #side-nav .menu-item:focus {
  background: var(--soft, #0d1627); border-color: var(--fx, #4da6ff);
}
#side-nav .menu-item.danger {
  background: #1b0f12; border-color: #3b1a1a; color: #ffd2d2;
}
.menu-sep { border: 0; border-top: 1px solid var(--border, #24304d); margin: .75rem 0; }
/* Mini Vara rewrite — nuke the box */
.mv-rewrite pre#mvRewrite{
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  white-space: pre-wrap !important;
  overflow: visible !important;
}

/* Testing Fixes
/* --- A11y contrast fixes (buttons + footer links) --- */

/* Primary buttons (Upgrade, Optimize, Ask AI, Save to Library, etc.) */
.btn.btn-primary,
#upgrade-btn,
#btnRun,
#askAiBtnBasic,
#heroUpgradeBtn,
#geminiBox .saveLib,
#claudeBox .saveLib,
#loginNowBtn {
  background: #000713 !important;   /* darker background boosts contrast */
  color: #FAFAFF !important;         /* bright text */
  border-color: #001833 !important;  /* subtle border against dark bg */
}

/* States */
.btn.btn-primary:hover,
#upgrade-btn:hover,
#btnRun:hover,
#askAiBtnBasic:hover,
#heroUpgradeBtn:hover,
#geminiBox .saveLib:hover,
#claudeBox .saveLib:hover,
#loginNowBtn:hover {
  background: #001129 !important;    /* slightly lighter hover */
}

.btn.btn-primary:focus-visible,
#upgrade-btn:focus-visible,
#btnRun:focus-visible,
#askAiBtnBasic:focus-visible,
#heroUpgradeBtn:focus-visible,
#geminiBox .saveLib:focus-visible,
#claudeBox .saveLib:focus-visible,
#loginNowBtn:focus-visible {
  outline: 2px solid #60a5fa;        /* visible focus ring */
  outline-offset: 2px;
}

/* Footer links (Contact / Privacy) */
footer a {
  color: #FAFAFF !important;         /* boost to ≥4.5:1 on dark footers */
  text-decoration-color: rgba(250,250,255,.7);
}
footer a:hover,
footer a:focus {
  text-decoration-color: #FAFAFF;
}

/*Courses A11y Clean up
/* A11y: Courses page button contrast */
.courses-page #courseGrid .btn {
  /* Pa11y suggestion for AA contrast */
  background: #2b72e6;
  color: #ffffff; /* ensure high contrast text */
  border: 1px solid rgba(255,255,255,0.15);
  text-decoration: none;
}

.courses-page #courseGrid .btn:hover {
  /* Slight lift; still AA with white text */
  background: #2f7cff;
}

.courses-page #courseGrid .btn:active {
  background: #2868d1;
}

.courses-page #courseGrid .btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  /* or use a focus ring token if you have one */
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Background stack never participates in layout */
.tech-bg{
  position:fixed; inset:0; z-index:-1; pointer-events:none;
}
.tech-hex,.tech-map,.tech-traces,.tech-glow,.tech-particles{
  position:absolute; inset:0;
}
/* Make SVGs pure decoration (no intrinsic size jumps) */
.tech-bg svg{ display:block; width:100%; height:100%; }

/* Motion-respect: disable animations for reduced-motion users */
@media (prefers-reduced-motion: reduce){
  .tech-bg animate{ display:none !important; }
}

.tech-particles .tp{
  position:absolute; width:6px; height:6px; border-radius:9999px;
  background: rgba(96,165,250,.65);
  animation: tech-floatY 7s ease-in-out infinite, tech-twinkle 5s ease-in-out infinite;
}

@keyframes tech-floatY{ 0%,100%{transform:translateY(-2px)} 50%{transform:translateY(2px)} }
@keyframes tech-twinkle{ 0%,100%{opacity:.45} 50%{opacity:1} }

/* New Navigation Drawer + Overlay Styles */

#nav-overlay[hidden] { display:none !important; }
#nav-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 999;          /* above page, below drawer */
  pointer-events: auto;  /* must be clickable */
}

#side-nav[hidden] { display:none !important; }
/* Drawer baseline */
#side-nav {
  position: fixed;
  top: 0; right: 0; bottom: 0; width: 300px;
  max-width: 88vw;
  background: var(--card, #0e1628);
  z-index: 1000;
  overflow: auto;
  transform: translateX(0); /* visible state */
}
#side-nav {
  transition: transform 0.25s ease-out;
  transform: translateX(100%);
}
#side-nav:not([hidden]) {
  transform: translateX(0);
}
/* (Optional) slide animation using a class if you want */
