/*
  Responsive CSS Template
  - Modern, lightweight, and scalable
  - Mobile-first with fluid type/spacing
  - Utility classes + ready-to-use components (container, grid, card, button, navbar, form)
  - Dark mode support (prefers-color-scheme)

  How to use:
  <link rel="stylesheet" href="/css/styles.css" />
  <div class="container">
    <div class="grid cols-1 sm:cols-2 lg:cols-3 gap-4"> ... </div>
  </div>
*/

/* 1) CSS Reset (Josh Comeau-inspired, minimal) */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* 2) Design Tokens */
:root {
  /* Colors */
  --bg: #0b0c0f;          /* canvas (dark baseline, we invert for light below) */
  --surface: #111318;
  --elev: #161922;
  --text: #e9eef8;
  --muted: #a7b1c2;
  --brand: #22c55e;       /* emerald */
  --brand-600: #16a34a;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --focus: #93c5fd;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --fs-1: clamp(2.2rem, 1.4rem + 2.5vw, 3rem);   /* display */
  --fs-2: clamp(1.6rem, 1.2rem + 1.2vw, 2rem);   /* h1 */
  --fs-3: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem); /* h2 */
  --fs-4: 1.125rem;                                 /* h3 */
  --fs-base: 1rem;                                  /* body */
  --fs-sm: 0.9375rem;

  /* Spacing (fluid scale) */
  --sp-0: 0;        
  --sp-1: clamp(0.25rem, 0.2rem + 0.3vw, 0.5rem);
  --sp-2: clamp(0.5rem, 0.35rem + 0.6vw, 0.75rem);
  --sp-3: clamp(0.75rem, 0.6rem + 0.8vw, 1rem);
  --sp-4: clamp(1rem, 0.9rem + 1vw, 1.25rem);
  --sp-5: clamp(1.5rem, 1.2rem + 1.6vw, 2rem);
  --sp-6: clamp(2rem, 1.6rem + 2vw, 2.5rem);

  /* Radii & Shadows */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.2), 0 4px 10px rgba(0,0,0,.25);
  --shadow-2: 0 6px 24px rgba(0,0,0,.25), 0 12px 48px rgba(0,0,0,.25);

  /* Layout */
  --container: min(1100px, 94vw);
  --grid-gap: var(--sp-3);
}

/* Light scheme */
@media (prefers-color-scheme: light) {
  :root{
    --bg: #f6f7fb;
    --surface: #ffffff;
    --elev: #f2f4f8;
    --text: #0f172a;
    --muted: #5b6473;
    --brand: #16a34a;      /* a bit darker in light */
    --brand-600: #15803d;
    --focus: #1d4ed8;
    --shadow-1: 0 1px 2px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.06);
    --shadow-2: 0 6px 20px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.10);
  }
}

/* 3) Base */
html { color-scheme: light dark; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--fs-base); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-3); }
.section { padding-block: var(--sp-6); }

h1, .h1 { font-size: var(--fs-2); font-weight: 800; letter-spacing: -0.02em; }
h2, .h2 { font-size: var(--fs-3); font-weight: 700; letter-spacing: -0.01em; }
h3, .h3 { font-size: var(--fs-4); font-weight: 700; }
p { color: var(--muted); }
.lead { font-size: 1.125rem; color: var(--muted); }

/* 4) Utilities */
.hidden { display: none !important; }
.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; }

.mt-2{margin-top:var(--sp-2);} .mt-3{margin-top:var(--sp-3);} .mt-4{margin-top:var(--sp-4);} .mt-5{margin-top:var(--sp-5);} .mt-6{margin-top:var(--sp-6);} 
.mb-2{margin-bottom:var(--sp-2);} .mb-3{margin-bottom:var(--sp-3);} .mb-4{margin-bottom:var(--sp-4);} .mb-5{margin-bottom:var(--sp-5);} .mb-6{margin-bottom:var(--sp-6);} 
.p-2{padding:var(--sp-2);} .p-3{padding:var(--sp-3);} .p-4{padding:var(--sp-4);} .p-5{padding:var(--sp-5);} .p-6{padding:var(--sp-6);} 
.py-3{padding-block:var(--sp-3);} .py-4{padding-block:var(--sp-4);} .py-5{padding-block:var(--sp-5);} .py-6{padding-block:var(--sp-6);} 
.px-3{padding-inline:var(--sp-3);} .px-4{padding-inline:var(--sp-4);} .px-5{padding-inline:var(--sp-5);} .px-6{padding-inline:var(--sp-6);} 

.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.shadow { box-shadow: var(--shadow-1); }
.shadow-lg { box-shadow: var(--shadow-2); }

.flex { display:flex; }
.inline-flex { display:inline-flex; }
.items-center { align-items:center; }
.justify-center { justify-content:center; }
.justify-between { justify-content:space-between; }
.gap-2{gap:var(--sp-2);} .gap-3{gap:var(--sp-3);} .gap-4{gap:var(--sp-4);} .gap-5{gap:var(--sp-5);} 

.text-center { text-align:center; }
.text-muted { color: var(--muted); }
.max-w-prose { max-width: 65ch; }

/* 5) Responsive Grid System */
.grid { display: grid; gap: var(--grid-gap); }
.cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Breakpoints */
@media (min-width: 480px) { /* sm */
  .sm\:cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 768px) { /* md */
  .md\:cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { /* lg */
  .lg\:cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 6) Components */
/* Buttons */
.btn { 
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px; 
  padding: .625rem 1rem; font-weight: 700; line-height: 1; text-decoration: none; 
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease; 
  box-shadow: 0 6px 14px rgba(34, 197, 94, .25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid color-mix(in hsl, var(--text) 22%, transparent); box-shadow: none; }
.btn--danger { background: var(--danger); box-shadow: 0 6px 14px rgba(239, 68, 68, .25); }
/* Button size variants */
.btn--sm { padding: .45rem .75rem; font-size: .875rem; }
.btn--lg { padding: .85rem 1.25rem; font-size: 1.0625rem; }

/* Full-width button */
.btn--block { display: flex; width: 100%; }

/* Outline style (brand) */
.btn--outline { background: transparent; color: var(--brand); border: 2px solid var(--brand); box-shadow: none; }
.btn--outline:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }

/* Icon button (square) */
.btn--icon { padding: .6rem; aspect-ratio: 1 / 1; border-radius: 12px; }

/* Loading state */
.btn[aria-busy="true"] { position: relative; pointer-events: none; opacity: .75; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; right: .6rem; width: 1em; height: 1em;
  border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Card */
.card { background: var(--surface); border: 1px solid color-mix(in hsl, var(--text) 8%, transparent); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: clip; }
.card__media { aspect-ratio: 16/9; background: var(--elev); }
.card__body { padding: var(--sp-4); }
.card__title { font-weight: 800; font-size: 1.125rem; }
.card__text { color: var(--muted); margin-top: .375rem; }

/* Navbar (CSS-only collapse) */
.navbar { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid color-mix(in hsl, var(--text) 8%, transparent); }
.navbar__inner { display:flex; align-items:center; justify-content:space-between; gap: var(--sp-3); height: 64px; }
.navbar a { color: inherit; text-decoration: none; font-weight: 700; }

/* Checkbox hack for mobile menu */
.nav-toggle { display:none; }
.nav-menu { display:flex; gap: var(--sp-3); }
.navbar .btn { padding: .5rem .875rem; }

@media (max-width: 768px){
  .nav-menu { display:none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); padding: var(--sp-3); border-bottom: 1px solid color-mix(in hsl, var(--text) 8%, transparent); }
  .nav-toggle:checked ~ .nav-menu { display:flex; flex-direction:column; }
}

/* Forms */
.input, .select, .textarea {
  width: 100%; padding: .65rem .8rem; border-radius: var(--radius-sm);
  border: 1px solid color-mix(in hsl, var(--text) 14%, transparent);
  background: var(--surface); color: var(--text);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--info); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info) 25%, transparent); }
.label { display:block; font-weight: 700; margin-bottom: .35rem; }
.help { font-size: var(--fs-sm); color: var(--muted); }

/* Hero */
.hero { padding-block: var(--sp-6); background: linear-gradient(180deg, color-mix(in hsl, var(--brand) 14%, transparent), transparent 50%); border-bottom: 1px solid color-mix(in hsl, var(--text) 8%, transparent); }
.hero .title { font-size: var(--fs-1); }
.hero .subtitle { color: var(--muted); margin-top: .5rem; font-size: 1.125rem; }

/* Footer */
.footer { padding-block: var(--sp-5); border-top: 1px solid color-mix(in hsl, var(--text) 8%, transparent); color: var(--muted); }

/* 7) Helper layout blocks */
.stack > * + * { margin-top: var(--sp-3); }
.row { display:flex; gap: var(--sp-3); flex-wrap: wrap; }
.row > * { flex: 1 1 260px; }

/* 8) Animations */
.fade-in { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: translateY(0) } }

/* 9) Example responsive helpers (hide/show) */
@media (max-width: 480px) { .hide-sm { display:none !important; } }
@media (min-width: 1024px) { .show-lg { display:block !important; } }

/* 10) Prose (optional) */
.prose { color: var(--text); }
.prose p + p { margin-top: var(--sp-3); }
.prose a { color: var(--info); text-decoration: underline; text-underline-offset: 2px; }

/* =========================================================
   SITE THEME: Maliciously Accused Dad (SPA)
   - Header, nav, home, story, auth, dashboard
   - Uses the existing tokens: --bg, --surface, --elev, --brand, --text, etc.
   ========================================================= */

/* 1. App shell & global layout */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.15), transparent 60%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.18), transparent 55%),
    var(--bg);
  color: var(--text);
}

.main-content {
  flex: 1;
  padding-block: var(--sp-5);
}

/* 2. Header / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in hsl, var(--surface) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in hsl, var(--surface) 70%, #000 30%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  cursor: pointer;
  text-decoration: none;
}

.logo-main {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-tagline {
  font-size: 0.78rem;
  opacity: 0.75;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.9rem;
}

.main-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding-block: 0.15rem;
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.18s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

/* 3. Buttons (aliases for your markup) */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.35);
}
.btn-primary:hover {
  background: var(--brand-600);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid color-mix(in hsl, var(--muted) 70%, transparent);
}
.btn-secondary:hover {
  background: color-mix(in hsl, var(--surface) 80%, transparent);
  border-color: color-mix(in hsl, var(--brand) 50%, var(--muted) 50%);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px dashed color-mix(in hsl, var(--muted) 70%, transparent);
}
.btn-ghost:hover {
  border-style: solid;
  border-color: var(--muted);
  background: color-mix(in hsl, var(--surface) 75%, transparent);
}

.btn-lg {
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
}
.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

/* 4. Home page */

.home-page {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* Hero grid */

.home-hero {
  display: grid;
  gap: var(--sp-4);
  align-items: flex-start;
}

@media (min-width: 900px) {
  .home-hero {
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  }
}

.hero-main h1 {
  font-size: var(--fs-2);
  margin-bottom: var(--sp-2);
}

.hero-main p {
  max-width: 40rem;
  font-size: 0.98rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: var(--sp-3);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in hsl, var(--muted) 65%, transparent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.info-card {
  padding: 1.5rem;
  border-radius: 0.9rem;
  background: color-mix(in hsl, var(--surface) 90%, var(--bg) 10%);
  border: 1px solid color-mix(in hsl, var(--surface) 70%, #000 30%);
  box-shadow: var(--shadow-1, 0 16px 40px rgba(0, 0, 0, 0.4));
}

.info-card h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.info-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.info-card li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-block: 0.15rem;
}

/* Home ad/support slot */

.ad-slot {
  padding: 1.2rem 1.4rem;
  border-radius: 0.9rem;
  border: 1px dashed color-mix(in hsl, var(--muted) 55%, transparent);
  background: color-mix(in hsl, var(--elev) 80%, var(--bg) 20%);
  font-size: 0.9rem;
}

.ad-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  opacity: 0.8;
  margin-bottom: 0.35rem;
}

/* Home – how it works */

.container-narrow {
  max-width: 780px;
  margin-inline: auto;
}
/* but on the home page, left-align "How it works" */
.home-page .home-how {
  max-width: 780px;
  margin-inline: 0;
}
/*
  Desktop: pull "How it works" up so it visually sits under the hero copy.
  Mobile: the hero stacks, so a negative margin would overlap the hero-side card.
*/
@media (min-width: 900px) {
  .home-page .home-how {
    margin-top: -15rem;
  }
}
.home-how {
  margin-top: var(--sp-4);
}

.home-how h2 {
  margin-bottom: var(--sp-2);
}

.home-how .steps {
  list-style: decimal;
  padding-left: 1.5rem;
  display: grid;
  gap: var(--sp-2);
}

.home-how .steps li {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Home – criteria cards */

.home-criteria {
  margin-block: var(--sp-5);
  display: grid;
  gap: var(--sp-3);
}

@media (min-width: 900px) {
  .home-criteria {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.criteria-card {
  padding: 1.5rem;
  border-radius: 0.9rem;
  background: color-mix(in hsl, var(--surface) 88%, var(--bg) 12%);
  border: 1px solid color-mix(in hsl, var(--surface) 70%, #000 30%);
}

.criteria-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.criteria-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Home – featured stories */

.home-featured {
  margin-bottom: var(--sp-4);
}

.home-featured .section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.home-featured .link-more {
  font-size: 0.85rem;
  color: var(--info);
  text-decoration: none;
}
.home-featured .link-more:hover {
  text-decoration: underline;
}

.story-list--featured {
  display: grid;
  gap: var(--sp-3);
}

@media (min-width: 900px) {
  .story-list--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.story-card--featured {
  padding: 1.25rem;
  border-radius: 0.9rem;
  background: color-mix(in hsl, var(--elev) 90%, var(--bg) 10%);
  border: 1px solid color-mix(in hsl, var(--surface) 65%, #000 35%);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.45);
}

.story-card--featured h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.story-card--featured .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.status-flag {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

/* Home – CTA strip */

.home-cta-strip {
  margin-block: var(--sp-5);
  padding-block: var(--sp-4);
  border-top: 1px solid color-mix(in hsl, var(--surface) 60%, #000 40%);
  border-bottom: 1px solid color-mix(in hsl, var(--surface) 60%, #000 40%);
  background: linear-gradient(
    135deg,
    color-mix(in hsl, var(--surface) 80%, var(--bg) 20%),
    color-mix(in hsl, var(--bg) 70%, var(--surface) 30%)
  );
}

.cta-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

@media (min-width: 800px) {
  .cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cta-inner h2 {
  margin-bottom: 0.3rem;
}

.cta-inner p {
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* 5. Story page */

.story-page {
  max-width: 1040px;
  margin-inline: auto;
}

.story-layout {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
}

@media (min-width: 900px) {
  .story-layout {
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1.1fr);
  }
}

.story-full {
  background: color-mix(in hsl, var(--elev) 90%, var(--bg) 10%);
  border-radius: 1rem;
  padding: 1.75rem;
  border: 1px solid color-mix(in hsl, var(--surface) 70%, #000 30%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

.story-header {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  margin-bottom: var(--sp-3);
}

.story-photo img {
  display: block;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid color-mix(in hsl, var(--brand) 70%, transparent);
}

.story-header-text h1 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.story-header-text .meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.status-badge {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #bbf7d0;
}

.story-body h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.story-body p {
  font-size: 0.95rem;
  color: var(--text);
}

.story-impact {
  margin-top: 1rem;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
}

.story-footer-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Story side column */

.story-side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.ad-slot-story {
  margin-top: 0;
}

.side-card {
  padding: 1.25rem;
  border-radius: 0.9rem;
  background: color-mix(in hsl, var(--surface) 90%, var(--bg) 10%);
  border: 1px solid color-mix(in hsl, var(--surface) 70%, #000 30%);
  font-size: 0.9rem;
}

.side-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* 6. Auth pages & forms */

.auth-page {
  max-width: 460px;
  margin-inline: auto;
}

.auth-page h1 {
  margin-bottom: var(--sp-3);
}

.form-card {
  background: color-mix(in hsl, var(--elev) 90%, var(--bg) 10%);
  padding: 1.75rem;
  border-radius: 0.9rem;
  border: 1px solid color-mix(in hsl, var(--surface) 70%, #000 30%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
}

.form-card .form-group {
  margin-bottom: var(--sp-3);
}

.form-card label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in hsl, var(--surface) 65%, #000 35%);
  background: color-mix(in hsl, var(--bg) 80%, var(--surface) 20%);
  color: var(--text);
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.form-card .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-card .checkbox input {
  width: auto;
  margin-top: 0.15rem;
}

.form-msg {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-alt {
  margin-top: var(--sp-2);
  font-size: 0.85rem;
  text-align: center;
}

/* 7. Dashboard & "My story" page */

.dashboard {
  max-width: 960px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.dashboard .card {
  background: color-mix(in hsl, var(--elev) 90%, var(--bg) 10%);
}

.my-story-page {
  max-width: 900px;
  margin-inline: auto;
}

.my-story-page h1 {
  margin-bottom: var(--sp-3);
}

.my-story-page .form-card {
  margin-bottom: var(--sp-3);
}

/* 8. Stories list page */

.stories-page {
  max-width: 1040px;
  margin-inline: auto;
}

.stories-page h1 {
  margin-bottom: var(--sp-3);
}

.story-list {
  display: grid;
  gap: var(--sp-3);
}

@media (min-width: 900px) {
  .story-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.story-card {
  padding: 1.4rem;
  border-radius: 0.9rem;
  background: color-mix(in hsl, var(--elev) 90%, var(--bg) 10%);
  border: 1px solid color-mix(in hsl, var(--surface) 70%, #000 30%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.story-card h2 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.story-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
