/* ============================================================
   SHARED THEME — Single source of truth for all apps

   HOW TO CHANGE COLOURS:
   Edit the values below under :root[data-theme="dark"] and
   :root[data-theme="light"]. Every app that uses this file
   will automatically pick up the changes.

   HOW TO USE:
   1. Add this line in your HTML <head>:
      <link rel="stylesheet" href="shared-theme.css">

   2. Set the default theme on <html>:
      <html lang="en" data-theme="dark">

   3. Include the theme toggle button in your header:
      <button class="pill" onclick="toggleTheme()">🌓 Theme</button>

   4. Include this JavaScript in every app:
      function toggleTheme() {
        const h = document.documentElement;
        h.dataset.theme = h.dataset.theme === "dark" ? "light" : "dark";
      }

   HOW THE TOGGLE WORKS:
   This CSS has TWO complete colour palettes:
   - :root[data-theme="dark"]  — dark backgrounds, light text
   - :root[data-theme="light"] — light backgrounds, dark text
   The toggleTheme() function swaps the data-theme attribute on <html>.
   Every var(--...) colour updates instantly — backgrounds, text,
   borders, accents, cards, badges, everything. No extra code needed.

   NOTE: If you draw on <canvas> (e.g. radar chart), re-read the
   CSS variables after toggle and redraw the canvas.
   ============================================================ */

/* ============================================================
   1. FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   2. COLOUR TOKENS — CHANGE THESE TO RESTYLE ALL APPS

   To change your brand colours, edit the values below.
   All apps will update automatically.
   ============================================================ */
:root[data-theme="dark"] {
  /* Backgrounds */
  --bg:         #010409;                    /* Main page background */
  --bg-alt:     #081121;                    /* Secondary background */
  --bg-card:    rgba(255,255,255,0.03);     /* Card background */
  --bg-card-h:  rgba(255,255,255,0.06);     /* Card background on hover */

  /* Text */
  --tx:   #F8FAFC;                          /* Primary text */
  --tx2:  #94A3B8;                          /* Secondary text */
  --tx3:  #64748B;                          /* Muted text */

  /* Borders */
  --brd:  rgba(255,255,255,0.08);           /* Border colour */

  /* Brand colours */
  --teal:       #2DD4BF;                    /* PRIMARY ACCENT — used for active states, highlights */
  --teal-g:     rgba(45,212,191,0.15);      /* Teal glow/background */
  --amber:      #F59E0B;                    /* WARNING — used for caution, in-progress */
  --amber-g:    rgba(245,158,11,0.12);
  --red:        #F43F5E;                    /* DANGER — used for errors, critical items */
  --red-g:      rgba(244,63,94,0.12);
  --indigo:     #818CF8;                    /* INFO — used for informational items */
  --indigo-g:   rgba(129,140,248,0.12);
  --green:      #34D399;                    /* SUCCESS — used for completed, positive */
  --green-g:    rgba(52,211,153,0.12);
  --pink:       #F472B6;
  --blue:       #60A5FA;
  --purple:     #A78BFA;
}

:root[data-theme="light"] {
  /* Backgrounds */
  --bg:         #F1F5F9;
  --bg-alt:     #E2E8F0;
  --bg-card:    rgba(255,255,255,0.8);
  --bg-card-h:  rgba(255,255,255,0.95);

  /* Text */
  --tx:   #0F172A;
  --tx2:  #475569;
  --tx3:  #64748B;

  /* Borders */
  --brd:  rgba(15,23,42,0.1);

  /* Brand colours (slightly adjusted for light backgrounds) */
  --teal:       #0D9488;
  --teal-g:     rgba(13,148,136,0.1);
  --amber:      #B45309;
  --amber-g:    rgba(180,83,9,0.08);
  --red:        #BE123C;
  --red-g:      rgba(190,18,60,0.08);
  --indigo:     #6366F1;
  --indigo-g:   rgba(99,102,241,0.08);
  --green:      #059669;
  --green-g:    rgba(5,150,105,0.08);
  --pink:       #DB2777;
  --blue:       #2563EB;
  --purple:     #7C3AED;
}

/* ============================================================
   3. RESET & BASE STYLES
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--tx);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.5s, color 0.5s;
}

a {
  color: var(--teal);
  text-decoration: none;
}

/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.25rem;
  font-weight: 500;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
}

h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Muted body text */
.dim {
  color: var(--tx2);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* Uppercase section labels */
.label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.label.teal   { color: var(--teal); }
.label.amber  { color: var(--amber); }
.label.red    { color: var(--red); }
.label.indigo { color: var(--indigo); }
.label.green  { color: var(--green); }

/* ============================================================
   5. LAYOUT
   ============================================================ */

/* Page container — centres content, adds padding */
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* App header bar */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 12px;
}
.hdr-l { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hdr-r { display: flex; gap: 8px; }

/* App name/logo */
.logo {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  font-weight: 700;
}

/* ============================================================
   6. GRID SYSTEM
   ============================================================ */
.g2  { display: grid; grid-template-columns: 1fr 1fr;     gap: 20px; }
.g23 { display: grid; grid-template-columns: 1fr 1.5fr;   gap: 24px; }
.g32 { display: grid; grid-template-columns: 1.5fr 1fr;   gap: 24px; }
.g3  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Vertical stack */
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ============================================================
   7. COMPONENTS
   ============================================================ */

/* --- Pill Buttons & Nav Items --- */
.pill {
  padding: 7px 15px;
  border-radius: 100px;
  font-size: 0.73rem;
  border: 1px solid var(--brd);
  background: var(--bg-card);
  color: var(--tx2);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s;
  white-space: nowrap;
  text-decoration: none;
}
.pill:hover  { border-color: var(--teal); color: var(--tx); }
.pill.on     { border-color: var(--teal); color: var(--teal); background: var(--teal-g); }
.pill.amber  { border-color: var(--amber); color: var(--amber); }
.pill.red    { border-color: var(--red); color: var(--red); }
.pill.red:hover { background: var(--red-g); }
button.pill  { line-height: 1; }

/* --- Cards --- */
.c {
  background: var(--bg-card);
  border: 1px solid var(--brd);
  border-radius: 22px;
  padding: 24px;
  backdrop-filter: blur(16px);
  transition: all 0.35s;
}
.c:hover { background: var(--bg-card-h); }
.c.flush { padding: 0; overflow: hidden; }

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge.teal  { background: var(--teal-g);  color: var(--teal);  border: 1px solid rgba(45,212,191,0.2); }
.badge.amber { background: var(--amber-g); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
.badge.red   { background: var(--red-g);   color: var(--red);   border: 1px solid rgba(244,63,94,0.2); }
.badge.green { background: var(--green-g); color: var(--green); border: 1px solid rgba(52,211,153,0.2); }

/* --- Banners (alert messages) --- */
.banner {
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.55;
}
.banner.amber  { background: var(--amber-g);  border: 1px solid rgba(245,158,11,0.2); }
.banner.red    { background: var(--red-g);    border: 1px solid rgba(244,63,94,0.2); }
.banner.green  { background: var(--green-g);  border: 1px solid rgba(52,211,153,0.2); }
.banner.indigo { background: var(--indigo-g); border: 1px solid rgba(129,140,248,0.2); }
.banner-icon   { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.banner-body strong { color: var(--tx); }

/* --- Tiles (info blocks) --- */
.tile {
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--brd);
  background: var(--bg-card);
}
.tile-icon  { font-size: 1.4rem; margin-bottom: 8px; }
.tile-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 6px; }
.tile-body  { font-size: 0.8rem; color: var(--tx2); line-height: 1.55; }
.tile-hint  { font-size: 0.72rem; color: var(--teal); margin-top: 10px; font-weight: 600; }

/* --- Progress Bars --- */
.prog-track {
  height: 5px;
  background: var(--brd);
  border-radius: 100px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1.2s ease;
}

/* --- Phase Stepper --- */
.phase-bar  { display: flex; gap: 4px; margin: 16px 0 8px; }
.phase-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.phase-dot  { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brd); background: var(--bg); transition: all 0.5s; }
.phase-dot.done    { background: var(--teal); border-color: var(--teal); }
.phase-dot.current { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 12px var(--teal); }
.phase-dot.next    { border-color: var(--teal); border-style: dashed; }
.phase-line        { position: absolute; top: 6px; left: calc(50% + 9px); width: calc(100% - 18px); height: 2px; background: var(--brd); }
.phase-line.done   { background: var(--teal); }
.phase-name        { font-size: 0.62rem; color: var(--tx3); text-align: center; }
.phase-step.current .phase-name { color: var(--teal); font-weight: 600; }

/* --- Accordion Rows --- */
.dim-row { border-bottom: 1px solid var(--brd); transition: background 0.2s; }
.dim-row:last-child { border-bottom: none; }
.dim-row:hover { background: var(--bg-card-h); }
.dim-header { display: flex; align-items: center; gap: 10px; padding: 10px 8px; cursor: pointer; font-size: 0.82rem; user-select: none; }
.dim-arrow {
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; background: var(--bg-card); border: 1px solid var(--brd);
  font-size: 0.6rem; color: var(--tx3); transition: all 0.3s; flex-shrink: 0;
}
.dim-row.open .dim-arrow { transform: rotate(90deg); background: var(--teal-g); border-color: var(--teal); color: var(--teal); }
.dim-body { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; padding: 0 8px 0 36px; }
.dim-row.open .dim-body { max-height: 200px; padding: 0 8px 14px 36px; }

/* --- Hover Cards --- */
.res-card { transition: all 0.25s ease; border: 1px solid var(--brd); }
.res-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

/* --- Gauge (circular score dial) --- */
.gauge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gauge-label {
  position: absolute;
  text-align: center;
}
.gauge-num {
  font-size: 2.6rem;
  font-weight: 300;
  letter-spacing: -0.04em;
}
.gauge-sub {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--tx2);
  display: block;
  margin-top: 2px;
}

/* --- Radar / Spiderweb Chart --- */
.radar-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.radar-tt {
  position: absolute;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--brd);
  border-radius: 14px;
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  min-width: 220px;
  max-width: 290px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
}

/* --- Archetype Card (special highlight card) --- */
.arch-card {
  border-left: 4px solid var(--indigo);
  background: var(--indigo-g);
}

/* --- Quadrant Chart Container --- */
.quad-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto;
}

/* --- Priority Cards (coloured top border + dimension rows) --- */
.pri-card { border-top: 3px solid var(--teal); }
.pri-card.safety { border-top-color: var(--red); }
.pri-card.exec   { border-top-color: var(--amber); }
.pri-card.value  { border-top-color: var(--green); }
.pri-dim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--brd);
  font-size: 0.84rem;
}
.pri-dim:last-child { border-bottom: none; }
.pri-dim-bar {
  width: 60px;
  height: 4px;
  background: var(--brd);
  border-radius: 4px;
  overflow: hidden;
  margin-left: 12px;
}
.pri-dim-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

/* --- Accordion Extras (expanded content styling) --- */
.dim-def {
  font-size: 0.8rem;
  color: var(--tx2);
  line-height: 1.6;
}
.dim-band {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  margin-top: 8px;
}

/* --- Form Inputs --- */
.input-group { margin-bottom: 24px; }
.input-group .label { margin-bottom: 8px; display: block; }
.input-row { display: flex; gap: 12px; }
.input-field {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--brd);
  padding: 18px;
  border-radius: 14px;
  color: var(--tx);
  font-size: 1.1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.input-field:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(45,212,191,0.1);
}
.input-field::placeholder { color: var(--tx2); opacity: 0.5; }
[data-theme="light"] .input-field { background: var(--bg-card); color: var(--tx); }
[data-theme="light"] .input-field:focus { box-shadow: 0 0 20px rgba(13,148,136,0.1); }

/* --- Option Cards (selectable, radio-style) --- */
.option-card {
  background: var(--bg-card);
  border: 1px solid var(--brd);
  padding: 22px 28px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  width: 100%;
  margin-bottom: 12px;
}
.option-card:hover { border-color: rgba(255,255,255,0.25); background: var(--bg-card-h); }
.option-card.selected {
  border: 1.5px solid var(--teal);
  background: var(--teal-g);
  box-shadow: inset 0 0 20px rgba(45,212,191,0.05);
}
.option-card:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
[data-theme="light"] .option-card:hover { border-color: rgba(0,0,0,0.2); }

/* --- Key Cap (keyboard shortcut indicator) --- */
.key-cap {
  width: 24px;
  height: 24px;
  border: 1px solid var(--brd);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--tx3);
  flex-shrink: 0;
}

/* --- Pill Grid (horizontal pill layout) --- */
.pill-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.pill.selected { border-color: var(--teal); background: var(--teal-g); color: var(--tx); }

/* --- Guidance Cards (coloured left-border info cards) --- */
.guide-card {
  padding: 24px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--brd);
}
.guide-card .label { margin-bottom: 8px; }

/* --- Action Buttons (primary + secondary) --- */
.btn {
  padding: 16px 40px;
  border-radius: 100px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: transform 0.2s;
  font-size: 0.95rem;
  font-family: inherit;
}
.btn:active { transform: scale(0.96); }
.btn-p { background: var(--tx); color: var(--bg); }
.btn-s { background: transparent; color: var(--tx2); border: 1px solid var(--brd); }
.btn-s:hover { border-color: var(--teal); color: var(--tx); }

/* --- Page Top Progress Bar (fixed at top of viewport) --- */
.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--teal);
  transition: width 0.6s ease;
  box-shadow: 0 0 10px var(--teal);
  z-index: 1000;
}

/* --- Footer Navigation (fixed bottom bar) --- */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  pointer-events: none;
}
.footer-nav * { pointer-events: auto; }

/* --- Text Link Button (small back/rewind style) --- */
.text-link {
  font-size: 0.7rem;
  color: var(--tx2);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.2s;
}
.text-link:hover { color: var(--teal); }

/* --- Status Dot (live indicator in header) --- */
.status-dot {
  width: 10px;
  height: 10px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--teal);
}

/* --- Narrow Shell (for focused/single-column pages like surveys) --- */
.shell-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Centered Gateway (vertically centered content) --- */
.gateway-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

/* --- Disclaimer Text --- */
.disclaimer {
  font-size: 0.7rem;
  color: var(--tx2);
  text-align: center;
  line-height: 1.5;
  padding: 30px 0;
  opacity: 0.8;
}

/* --- Description Text (larger muted text for intros) --- */
.desc {
  color: var(--tx2);
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 32px;
}

/* --- Flip Cards --- */
.flip-card {
  perspective: 800px;
  height: 220px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 22px;
  padding: 24px;
  border: 1px solid var(--brd);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flip-card-back {
  transform: rotateY(180deg);
  background: var(--bg-alt);
}
.flip-card-hint {
  font-size: 0.62rem;
  color: var(--tx3);
  margin-top: auto;
  text-align: right;
}

/* --- Bar Chart --- */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  padding: 0 4px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.bar-fill {
  width: 100%;
  min-width: 20px;
  max-width: 48px;
  border-radius: 6px 6px 0 0;
  transition: height 1s ease;
}
.bar-label {
  font-size: 0.62rem;
  color: var(--tx3);
  text-align: center;
  white-space: nowrap;
}
.bar-value {
  font-size: 0.68rem;
  font-weight: 600;
}

/* --- 2x2 Quadrant --- */
.quadrant {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}
.quadrant-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--tx3);
  text-align: center;
}
.quadrant-cell.tl { background: rgba(52,211,153,0.06); }
.quadrant-cell.tr { background: rgba(245,158,11,0.06); }
.quadrant-cell.bl { background: rgba(244,63,94,0.06); }
.quadrant-cell.br { background: rgba(129,140,248,0.06); }
.quadrant-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(45,212,191,0.4);
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.quadrant-axis-x,
.quadrant-axis-y {
  position: absolute;
  background: var(--brd);
}
.quadrant-axis-x {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}
.quadrant-axis-y {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
}
.quadrant-label {
  position: absolute;
  font-size: 0.6rem;
  color: var(--tx3);
  letter-spacing: 0.05em;
}
.quadrant-label.bottom { bottom: -18px; left: 50%; transform: translateX(-50%); }
.quadrant-label.left { left: -8px; top: 50%; transform: translateY(-50%) rotate(-90deg); }

/* ============================================================
   8. ANIMATED BACKGROUND
   ============================================================ */
.aurora {
  position: fixed;
  inset: -50%;
  z-index: -1;
  background:
    radial-gradient(circle at 80% 20%, rgba(45,212,191,0.2), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(99,102,241,0.12), transparent 40%);
  filter: blur(100px);
  animation: drift 30s infinite alternate;
}
[data-theme="light"] .aurora { opacity: 0.25; }
@keyframes drift {
  from { transform: rotate(0) scale(1); }
  to   { transform: rotate(4deg) scale(1.08); }
}

/* ============================================================
   9. VIEW TRANSITIONS
   ============================================================ */
.view { display: none; flex-direction: column; gap: 28px; }
.view.on { display: flex; animation: fadeUp 0.5s ease forwards; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   10. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 860px) {
  .g23, .g32, .g2 { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .g3 { grid-template-columns: 1fr; }
  .shell { padding: 20px 14px; }
  header { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   11. THEME TOGGLE HELPER (JavaScript)

   Add this script to each app:

   function toggleTheme() {
     const h = document.documentElement;
     h.dataset.theme = h.dataset.theme === "dark" ? "light" : "dark";
   }
   ============================================================ */
