/* ==========================================================================
   SanctusTone — Design System
   "AI for Guitar. Tone by Faith."
   A premium, vintage-rock aesthetic: warm antique cream and metallic gold
   on a deep near-black canvas. Refined display serif for headings, clean
   sans for body. Layered on top of Tailwind CDN via /css/theme.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens (CSS Custom Properties)
   -------------------------------------------------------------------------- */
:root {
  /* --- Brand palette --- */
  --ink: #0a0a09;              /* deep near-black canvas */
  --ink-raise: #131210;        /* raised surfaces */
  --ink-panel: #1a1815;        /* cards / panels */
  --ink-elevated: #211e1a;     /* elevated / inputs */
  --cream: #e8e2d0;            /* warm antique off-white (primary text) */
  --cream-dim: #b8b2a2;        /* secondary text */
  --cream-faint: #857f70;      /* muted text */
  --gold: #c9a84c;             /* radiant accent gold */
  --gold-deep: #b89550;        /* antique gold */
  --gold-soft: #d9bf78;        /* light gold for hovers */
  --gold-dark: #8a6f30;        /* darker gold for borders */
  --hairline: rgba(200, 168, 76, 0.18); /* gold hairline borders */
  --hairline-soft: rgba(232, 226, 208, 0.10);

  /* --- Semantic accents --- */
  --pipe-green: #4ea86b;       /* preview / success */
  --pipe-green-bright: #67c489;
  --stained-red: #7a2b2b;
  --stained-red-glow: #e07a7a;
  --info-blue: #6fb3d6;

  /* --- Text roles --- */
  --text-primary: var(--cream);
  --text-secondary: var(--cream-dim);
  --text-muted: var(--cream-faint);
  --text-accent: var(--gold);

  /* --- Legacy compatibility aliases (keep old names resolving) --- */
  --coin-gold: var(--gold);
  --star-yellow: var(--gold-soft);
  --water-blue: var(--info-blue);
  --powerup-pink: var(--gold-soft);
  --mario-red: var(--stained-red-glow);
  --pixel-white: var(--cream);
  --pixel-black: var(--ink);
  --nes-gray: var(--cream-dim);
  --nes-dark-gray: var(--cream-faint);
  --brick-brown: var(--ink-elevated);
  --bg-elevated: var(--ink-panel);

  /* --- Typography --- */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* --- Radius --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 8px 28px rgba(201, 168, 76, 0.18);

  /* --- Transitions --- */
  --transition-fast: 140ms ease;
  --transition-base: 220ms ease;
  --transition-slow: 320ms ease;
}

/* --------------------------------------------------------------------------
   2. Base & Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--ink);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}

/* Ambient radial glow behind content — subtle, premium */
.metallic-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(201, 168, 76, 0.10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 15%, rgba(201, 168, 76, 0.05), transparent 70%);
}

/* Faint film-grain / vignette to keep the dark feeling rich */
.metallic-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 220px rgba(0, 0, 0, 0.7);
}

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

img {
  max-width: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   3. Typography Helpers
   -------------------------------------------------------------------------- */
.font-display {
  font-family: var(--font-display);
  font-weight: 600;
}

.font-ui {
  font-family: var(--font-ui);
}

.text-chrome,
.text-glow-gold {
  color: var(--gold);
}

.text-glow-cyan {
  color: var(--info-blue);
}

.text-glow-pink {
  color: var(--gold-soft);
}

/* --------------------------------------------------------------------------
   4. App Header
   -------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(10, 10, 9, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.app-header__logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.app-header__logo-icon {
  width: 2.4rem;
  height: 2.4rem;
  object-fit: contain;
  transition: transform var(--transition-base);
}

.app-header__logo:hover .app-header__logo-icon {
  transform: scale(1.06);
}

.app-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--cream);
}

.app-header__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0 auto;
}

.app-header__link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cream-dim);
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}

.app-header__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition-base);
}

.app-header__link:hover {
  color: var(--cream);
}

.app-header__link:hover::after {
  width: 100%;
}

@media (max-width: 820px) {
  .app-header__nav {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 9vw, 6.5rem) 1.25rem clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}

.hero__inner {
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__mark {
  width: clamp(72px, 14vw, 104px);
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 6px 22px rgba(201, 168, 76, 0.28));
}

.hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.01em;
  font-size: clamp(2.75rem, 9vw, 5.25rem);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.hero__title-line--cream {
  color: var(--cream);
}

.hero__title-line--gold {
  color: var(--gold);
  text-shadow: 0 0 40px rgba(201, 168, 76, 0.25);
}

.hero__lead {
  margin: 1.5rem 0 0;
  max-width: 38rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--cream-dim);
}

.hero__actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform var(--transition-fast), box-shadow var(--transition-base), filter var(--transition-fast);
}

.btn-solid:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 34px rgba(201, 168, 76, 0.28);
}

.btn-solid:active {
  transform: translateY(0);
}

.btn-solid:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 3px;
}

.btn-neon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--ink-elevated);
  color: var(--cream);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
}

.btn-neon:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  color: var(--gold-soft);
}

.btn-neon:active {
  transform: translateY(0);
}

.btn-neon:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 3px;
}

.btn-neon--gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  color: var(--ink);
  border-color: var(--gold-dark);
  font-weight: 600;
}

.btn-neon--gold:hover {
  color: var(--ink);
  filter: brightness(1.06);
  border-color: var(--gold-dark);
}

.btn-neon--green {
  background: rgba(78, 168, 107, 0.14);
  border-color: rgba(78, 168, 107, 0.5);
  color: var(--pipe-green-bright);
}

.btn-neon--green:hover {
  border-color: var(--pipe-green-bright);
  color: var(--pipe-green-bright);
  background: rgba(78, 168, 107, 0.22);
}

.btn-neon--pink {
  background: var(--ink-elevated);
  color: var(--gold-soft);
}

/* --------------------------------------------------------------------------
   7. Cards & Panels
   -------------------------------------------------------------------------- */
.card-rack {
  position: relative;
  background: linear-gradient(180deg, var(--ink-panel), var(--ink-raise));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  box-shadow: var(--shadow-md);
}

.card-rack__kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.card-rack__heading {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 0.5rem;
  color: var(--cream);
}

.card-rack__subheading {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  color: var(--cream);
}

.section-subtitle {
  color: var(--cream-dim);
  font-size: 0.98rem;
  margin: 0 0 1.5rem;
  max-width: 44rem;
}

/* --------------------------------------------------------------------------
   8. Form Controls
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 0.55rem;
}

.input-metal,
.select-metal {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--cream);
  background: var(--ink-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.input-metal::placeholder {
  color: var(--cream-faint);
}

.input-metal:focus,
.select-metal:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.input-metal:focus-visible,
.select-metal:focus-visible {
  outline: none;
}

.select-metal {
  appearance: none;
  padding-right: 2.75rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23c9a84c' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.select-metal option {
  background: var(--ink-panel);
  color: var(--cream);
}

/* Range slider */
.range-metal {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--ink-elevated);
  border: 1px solid var(--hairline);
  outline: none;
  cursor: pointer;
}

.range-metal::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm), 0 0 0 3px rgba(201, 168, 76, 0.18);
  cursor: grab;
  transition: transform var(--transition-fast);
}

.range-metal::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.range-metal::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  border: 2px solid var(--ink);
  cursor: grab;
}

.range-metal:focus-visible {
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.35);
}

.range-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--cream-faint);
  margin-top: 0.4rem;
}

.char-counter {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--cream-faint);
}

.accent-value {
  color: var(--gold);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   9. How It Works — Steps
   -------------------------------------------------------------------------- */
.steps {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.1rem;
  background: var(--ink-raise);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-md);
}

.step__num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
}

.step__title {
  margin: 0 0 0.15rem;
  font-weight: 600;
  color: var(--cream);
}

.step__body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--cream-dim);
}

/* --------------------------------------------------------------------------
   10. Example Buttons
   -------------------------------------------------------------------------- */
.example-btn {
  text-align: left;
  background: var(--ink-raise);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--cream);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-base), color var(--transition-base), background var(--transition-base);
}

.example-btn:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  color: var(--gold-soft);
  background: rgba(201, 168, 76, 0.06);
}

.example-btn:active {
  transform: translateY(0);
}

.example-btn:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   11. Alerts, Loading, Preview
   -------------------------------------------------------------------------- */
.alert-error {
  background: rgba(122, 43, 43, 0.2);
  border: 1px solid rgba(224, 122, 122, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.alert-error__text {
  color: var(--stained-red-glow);
  font-size: 0.95rem;
  margin: 0;
}

.alert-error__dismiss {
  color: var(--stained-red-glow);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.alert-error__dismiss:hover {
  opacity: 0.7;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.loading-spinner__icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gold);
}

.loading-spinner__text {
  color: var(--cream-dim);
  font-size: 0.95rem;
}

.preview-card {
  background: var(--ink-raise);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}

.preview-card__badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pipe-green-bright);
  border: 1px solid rgba(78, 168, 107, 0.4);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.preview-card audio {
  width: 100%;
  height: 2.5rem;
}

/* --------------------------------------------------------------------------
   12. Debug Panel
   -------------------------------------------------------------------------- */
.debug-panel {
  background: var(--ink-raise);
  border: 1px solid rgba(78, 168, 107, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.debug-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.debug-panel__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pipe-green-bright);
}

.debug-panel__clear {
  font-size: 0.85rem;
  color: var(--cream-dim);
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.debug-panel__clear:hover {
  color: var(--cream);
  border-color: var(--gold);
}

.debug-panel__fallback {
  background: rgba(122, 43, 43, 0.2);
  border: 1px solid rgba(224, 122, 122, 0.4);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.debug-panel__code {
  background: var(--ink);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.debug-panel__code--green { color: var(--pipe-green-bright); }
.debug-panel__code--blue { color: var(--info-blue); }
.debug-panel__code--default { color: var(--cream-dim); }

.debug-panel__section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-faint);
  margin: 0 0 0.5rem;
}

.debug-panel summary {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-faint);
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.debug-panel summary:hover {
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.app-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
  padding: 2.5rem 1.25rem;
}

.app-footer__inner {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.app-footer__logo {
  width: clamp(140px, 30vw, 200px);
  height: auto;
  opacity: 0.9;
}

.app-footer__tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0;
}

.app-footer__legal {
  font-size: 0.8rem;
  color: var(--cream-faint);
  margin: 0;
}

/* --------------------------------------------------------------------------
   14. Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-elevated);
  border: 3px solid var(--ink);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--ink-elevated) var(--ink);
}

/* --------------------------------------------------------------------------
   15. Animations
   -------------------------------------------------------------------------- */
@keyframes fade-in-up {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in-up {
  animation: fade-in-up 0.5s ease both;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* --------------------------------------------------------------------------
   16. Layout Utilities (used directly in markup)
   -------------------------------------------------------------------------- */
.hidden { display: none !important; }
.opacity-50 { opacity: 0.5; }
.cursor-not-allowed { cursor: not-allowed; }

.container {
  width: 100%;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  position: relative;
  z-index: 1;
}

.container--narrow { max-width: 40rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .sm-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.w-full { width: 100%; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.rounded-full { border-radius: 9999px; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.pt-2 { padding-top: 0.5rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.text-left { text-align: left; }

.text-white { color: var(--cream); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-gray-300 { color: var(--cream-dim); }
.text-gray-400 { color: var(--cream-faint); }

.bg-indigo-600 { background-color: var(--gold-deep); }
.hover\:text-white:hover { color: var(--cream); }
.transition-colors { transition: color var(--transition-fast); }
.space-x-3 > * + * { margin-left: 0.75rem; }

.resize-none { resize: none; }
.select-none { user-select: none; }
.overflow-y-auto { overflow-y: auto; }
.max-h-64 { max-height: 16rem; }
.flex-shrink-0 { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   17. Accessibility
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 2px;
}

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

@media (forced-colors: active) {
  .btn-solid,
  .btn-neon {
    border: 2px solid ButtonText;
  }
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.6rem 1.1rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: 0.75rem;
}
