/* ═══════════════════════════════════════
   THEME TOKENS — DINX MODE (default)
═══════════════════════════════════════ */
:root {
  --neon-cyan:       #00D9FF;
  --electric-blue:   #1E90FF;
  --fire-orange:     #FF6B00;
  --deep-purple:     #6B1EFF;
  --matrix-green:    #00FF41;

  --accent:          #00D9FF;
  --accent-dim:      rgba(0,217,255,0.5);
  --accent-glow:     rgba(0,217,255,0.4);
  --accent-trace:    rgba(0,217,255,0.06);
  --accent2:         #FF6B00;
  --accent2-glow:    rgba(255,107,0,0.4);
  --positive:        #00FF41;
  --positive-glow:   rgba(0,255,65,0.3);
  --negative:        #FF6B00;
  --negative-glow:   rgba(255,107,0,0.3);

  --bg-dark:         #0A0E27;
  --bg-card:         #1A1A3E;
  --bg-card-2:       #12122e;
  --bg-nav:          rgba(10,14,39,0.95);
  --bg-header:       linear-gradient(180deg, rgba(10,14,39,1) 0%, rgba(26,26,62,0.65) 100%);
  --bg-thead:        rgba(0,0,0,0.25);
  --bg-input:        rgba(0,0,0,0.35);
  --bg-card-header:  rgba(0,217,255,0.04);

  --text-primary:    #00D9FF;
  --text-secondary:  #FFFFFF;
  --text-muted:      rgba(255,255,255,0.4);
  --text-dim:        rgba(255,255,255,0.25);
  --text-mono:       rgba(255,255,255,0.3);
  --text-cell:       rgba(255,255,255,0.8);
  --text-price:      rgba(255,255,255,0.65);

  --border-glow:     rgba(0,217,255,0.25);
  --border-dim:      rgba(0,217,255,0.08);
  --border-input:    rgba(0,217,255,0.25);
  --border-corner:   #FF6B00;

  --grid-line:       rgba(0,217,255,0.04);
  --scanline:        rgba(0,0,0,0.08);
  --logo-shadow:     0 0 12px rgba(0,217,255,0.4), inset 0 0 20px rgba(0,217,255,0.06);
  --text-glow-accent: 0 0 10px #00D9FF, 0 0 40px rgba(0,217,255,0.4), 0 0 80px rgba(0,217,255,0.15);
  --text-glow-accent2: 0 0 10px #FF6B00, 0 0 40px rgba(255,107,0,0.4);
  --section-title-glow: 0 0 16px rgba(0,217,255,0.4);
  --stat-glow:       0 0 12px rgba(0,217,255,0.4);
  --portfolio-glow:  0 0 20px rgba(0,217,255,0.5);
  --dep-glow:        0 0 12px rgba(0,255,65,0.4);
  --dep-cell-glow:   0 0 5px rgba(0,255,65,0.2);

  --hover-row:       rgba(0,217,255,0.03);
  --card-hover-border: rgba(0,217,255,0.45);
  --card-hover-shadow: 0 0 20px rgba(0,217,255,0.08), inset 0 0 20px rgba(0,217,255,0.03);
}

/* ═══════════════════════════════════════
   THEME TOKENS — DARK MODE
═══════════════════════════════════════ */
[data-theme="dark"] {
  --accent:          #7EB8D4;
  --accent-dim:      rgba(126,184,212,0.5);
  --accent-glow:     rgba(126,184,212,0.2);
  --accent-trace:    rgba(126,184,212,0.04);
  --accent2:         #C07A4F;
  --accent2-glow:    rgba(192,122,79,0.3);
  --positive:        #5EC98A;
  --positive-glow:   rgba(94,201,138,0.25);
  --negative:        #C87060;
  --negative-glow:   rgba(200,112,96,0.25);

  --bg-dark:         #111318;
  --bg-card:         #1C1F26;
  --bg-card-2:       #161820;
  --bg-nav:          rgba(17,19,24,0.97);
  --bg-header:       linear-gradient(180deg, #111318 0%, #1C1F26 100%);
  --bg-thead:        rgba(0,0,0,0.3);
  --bg-input:        rgba(0,0,0,0.4);
  --bg-card-header:  rgba(255,255,255,0.02);

  --text-primary:    #7EB8D4;
  --text-secondary:  #E2E6EF;
  --text-muted:      rgba(226,230,239,0.4);
  --text-dim:        rgba(226,230,239,0.22);
  --text-mono:       rgba(226,230,239,0.3);
  --text-cell:       rgba(226,230,239,0.75);
  --text-price:      rgba(226,230,239,0.6);

  --border-glow:     rgba(126,184,212,0.18);
  --border-dim:      rgba(126,184,212,0.07);
  --border-input:    rgba(126,184,212,0.18);
  --border-corner:   #C07A4F;

  --grid-line:       rgba(255,255,255,0.02);
  --scanline:        rgba(0,0,0,0.06);
  --logo-shadow:     0 0 10px rgba(126,184,212,0.25), inset 0 0 16px rgba(126,184,212,0.04);
  --text-glow-accent: none;
  --text-glow-accent2: none;
  --section-title-glow: none;
  --stat-glow:       none;
  --portfolio-glow:  none;
  --dep-glow:        none;
  --dep-cell-glow:   none;

  --hover-row:       rgba(255,255,255,0.02);
  --card-hover-border: rgba(126,184,212,0.3);
  --card-hover-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ═══════════════════════════════════════
   THEME TOKENS — LIGHT MODE (warm grey)
═══════════════════════════════════════ */
[data-theme="light"] {
  --accent:          #1D5C78;
  --accent-dim:      rgba(29,92,120,0.7);
  --accent-glow:     rgba(29,92,120,0.2);
  --accent-trace:    rgba(29,92,120,0.07);
  --accent2:         #A84800;
  --accent2-glow:    rgba(168,72,0,0.25);
  --positive:        #1A6635;
  --positive-glow:   rgba(26,102,53,0.2);
  --negative:        #9C3520;
  --negative-glow:   rgba(156,53,32,0.2);

  --bg-dark:         #C8CDD6;
  --bg-card:         #D8DCE4;
  --bg-card-2:       #CDD1DA;
  --bg-nav:          rgba(200,205,214,0.97);
  --bg-header:       linear-gradient(180deg, #BEC4CE 0%, #C8CDD6 100%);
  --bg-thead:        rgba(0,0,0,0.08);
  --bg-input:        rgba(255,255,255,0.55);
  --bg-card-header:  rgba(29,92,120,0.06);

  --text-primary:    #1D5C78;
  --text-secondary:  #0E1420;
  --text-muted:      rgba(14,20,32,0.55);
  --text-dim:        rgba(14,20,32,0.4);
  --text-mono:       rgba(14,20,32,0.5);
  --text-cell:       rgba(14,20,32,0.85);
  --text-price:      rgba(14,20,32,0.65);

  --border-glow:     rgba(29,92,120,0.3);
  --border-dim:      rgba(29,92,120,0.15);
  --border-input:    rgba(29,92,120,0.35);
  --border-corner:   #A84800;

  --grid-line:       rgba(29,92,120,0.07);
  --scanline:        rgba(0,0,0,0.02);
  --logo-shadow:     0 0 8px rgba(29,92,120,0.2), inset 0 0 12px rgba(29,92,120,0.05);
  --text-glow-accent:  none;
  --text-glow-accent2: none;
  --section-title-glow: none;
  --stat-glow:       none;
  --portfolio-glow:  none;
  --dep-glow:        none;
  --dep-cell-glow:   none;

  --hover-row:       rgba(29,92,120,0.05);
  --card-hover-border: rgba(29,92,120,0.45);
  --card-hover-shadow: 0 4px 16px rgba(0,0,0,0.12);
}


/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Exo 2', sans-serif;
  background: var(--bg-dark);
  color: var(--text-secondary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,217,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,217,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
header {
  position: relative;
  z-index: 10;
  padding: 0;
  border-bottom: 1px solid var(--border-glow);
  background: linear-gradient(180deg, rgba(10,14,39,1) 0%, rgba(26,26,62,0.6) 100%);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 48px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
}

/* Logo frame — mimicking the logo's framing style */
.logo-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 32px;
  border: 1px solid var(--neon-cyan);
  box-shadow:
    0 0 12px rgba(0,217,255,0.4),
    inset 0 0 20px rgba(0,217,255,0.06);
}

/* Corner accents on logo frame */
.logo-frame::before, .logo-frame::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--fire-orange);
  border-style: solid;
}
.logo-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.logo-frame::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.logo-wordmark {
  font-family: 'Orbitron', monospace;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--neon-cyan);
  text-shadow:
    0 0 10px var(--neon-cyan),
    0 0 40px rgba(0,217,255,0.4),
    0 0 80px rgba(0,217,255,0.15);
  text-transform: uppercase;
}

.logo-wordmark span {
  color: var(--fire-orange);
  text-shadow:
    0 0 10px var(--fire-orange),
    0 0 40px rgba(255,107,0,0.4);
}

.header-right {
  text-align: right;
}

.header-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(0,217,255,0.5);
  margin-bottom: 8px;
}

.header-title {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.header-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 6px;
  letter-spacing: 0.1em;
}

.tagline {
  font-family: 'Exo 2', sans-serif;
  font-style: italic;
  font-size: 13px;
  color: var(--fire-orange);
  letter-spacing: 0.08em;
  margin-top: 16px;
  opacity: 0.9;
}

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,39,0.95);
  border-bottom: 1px solid var(--border-glow);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  gap: 0;
  align-items: center;
}

.nav-prefix {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: rgba(0,217,255,0.3);
  letter-spacing: 0.15em;
  padding-right: 20px;
  border-right: 1px solid var(--border-glow);
  margin-right: 4px;
  white-space: nowrap;
}

nav a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  padding: 16px 18px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
}

nav a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
}

nav a.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
}

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
main {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 96px;
}

section {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border-dim);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards;
}
section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* Section header — framed like the logo */
.section-header {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  position: relative;
}

.section-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--fire-orange);
  letter-spacing: 0.2em;
}

.section-title {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(0,217,255,0.4);
  text-transform: uppercase;
  position: relative;
}

/* Framed underline — echoes logo border style */
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-cyan), transparent);
}

/* ═══════════════════════════════════════
   CARD — core container
═══════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 2px;
  position: relative;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  border-color: rgba(0,217,255,0.45);
  box-shadow: 0 0 20px rgba(0,217,255,0.08), inset 0 0 20px rgba(0,217,255,0.03);
}

/* Corner accents on cards */
.card::before, .card::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--fire-orange);
  border-style: solid;
  opacity: 0.6;
}
.card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.card::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ═══════════════════════════════════════
   VOICE & TONE
═══════════════════════════════════════ */
.tone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.tone-card {
  padding: 28px 28px 24px;
}

.tone-card h3 {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0,217,255,0.5);
  margin-bottom: 12px;
}

.tone-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  font-weight: 300;
}

.do-dont {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.do-box, .dont-box {
  padding: 24px 24px 20px;
  border-radius: 2px;
}

.do-box {
  background: rgba(0,255,65,0.05);
  border: 1px solid rgba(0,255,65,0.25);
  position: relative;
}

.dont-box {
  background: rgba(255,107,0,0.05);
  border: 1px solid rgba(255,107,0,0.25);
  position: relative;
}

.do-box h4 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--matrix-green);
  text-shadow: 0 0 6px var(--matrix-green);
  margin-bottom: 16px;
}

.dont-box h4 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fire-orange);
  text-shadow: 0 0 6px var(--fire-orange);
  margin-bottom: 16px;
}

.do-box li, .dont-box li {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 9px;
  list-style: none;
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.do-box li::before {
  content: '▸';
  color: var(--matrix-green);
  position: absolute; left: 0;
  text-shadow: 0 0 6px var(--matrix-green);
}

.dont-box li::before {
  content: '✕';
  color: var(--fire-orange);
  position: absolute; left: 0;
  font-size: 10px;
  top: 2px;
}

/* ═══════════════════════════════════════
   COLORS
═══════════════════════════════════════ */
.colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.color-swatch {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}

.color-swatch:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.swatch-block {
  height: 90px;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  position: relative;
}

.copy-hex {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 3px 6px;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}

.color-swatch:hover .copy-hex { opacity: 1; }

.swatch-label {
  padding: 10px 12px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-dim);
}

.swatch-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.swatch-hex {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--neon-cyan);
}

.add-color-btn {
  min-height: 137px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(0,217,255,0.2);
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(0,217,255,0.4);
  text-transform: uppercase;
  transition: all 0.2s;
}

.add-color-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0,217,255,0.04);
  box-shadow: 0 0 12px rgba(0,217,255,0.1);
}

.color-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
}

.color-input-row input[type="text"] {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  padding: 9px 14px;
  border: 1px solid var(--border-glow);
  background: rgba(0,0,0,0.3);
  color: var(--neon-cyan);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.08em;
  width: 200px;
}

.color-input-row input[type="text"]:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0,217,255,0.2);
}

/* ═══════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════ */
.type-specimen {
  margin-bottom: 20px;
  padding: 28px 32px;
  position: relative;
}

.type-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,217,255,0.5);
  margin-bottom: 16px;
  display: flex;
  gap: 24px;
}

.font-display {
  font-family: 'Orbitron', monospace;
  font-size: clamp(28px,4vw,52px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0,217,255,0.35);
  line-height: 1.1;
}

.font-body {
  font-family: 'Exo 2', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255,255,255,0.85);
  font-weight: 300;
}

.font-mono {
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  line-height: 1.7;
  color: var(--matrix-green);
  text-shadow: 0 0 6px rgba(0,255,65,0.3);
}

.type-scale {
  display: grid;
  gap: 0;
  border: 1px solid var(--border-glow);
  overflow: hidden;
  border-radius: 2px;
}

.type-scale-item {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-dim);
  transition: background 0.15s;
}

.type-scale-item:last-child { border-bottom: none; }
.type-scale-item:hover { background: rgba(0,217,255,0.03); }

.type-scale-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,217,255,0.4);
  min-width: 72px;
}

/* ═══════════════════════════════════════
   GRAMMAR RULES
═══════════════════════════════════════ */
.rule-list {
  display: grid;
  gap: 1px;
  background: var(--border-dim);
  border: 1px solid var(--border-glow);
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 20px;
}

.rule-item {
  background: var(--bg-card);
  display: grid;
  grid-template-columns: 160px 1fr 36px;
  align-items: center;
  transition: background 0.15s;
}

.rule-item:hover { background: rgba(0,217,255,0.04); }

.rule-category {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fire-orange);
  padding: 16px 18px;
  border-right: 1px solid var(--border-dim);
  height: 100%;
  display: flex;
  align-items: center;
}

.rule-text {
  font-size: 13px;
  padding: 16px 20px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  outline: none;
}

.rule-text:focus {
  background: rgba(0,217,255,0.04);
  color: white;
}

.delete-rule {
  background: none;
  border: none;
  color: rgba(255,107,0,0.2);
  font-size: 16px;
  cursor: pointer;
  padding: 16px 10px;
  transition: color 0.15s, text-shadow 0.15s;
  line-height: 1;
}

.delete-rule:hover {
  color: var(--fire-orange);
  text-shadow: 0 0 8px var(--fire-orange);
}

.add-rule-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--bg-card-2);
  border: 1px dashed rgba(0,217,255,0.15);
}

.add-rule-form select,
.add-rule-form input {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  padding: 9px 12px;
  border: 1px solid var(--border-glow);
  border-radius: 2px;
  background: rgba(0,0,0,0.4);
  color: var(--neon-cyan);
  outline: none;
  letter-spacing: 0.06em;
}

.add-rule-form select option { background: var(--bg-dark); }
.add-rule-form input { flex: 1; min-width: 200px; }

.add-rule-form select:focus,
.add-rule-form input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0,217,255,0.15);
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.btn-primary {
  background: rgba(0,217,255,0.1);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.btn-primary:hover {
  background: var(--neon-cyan);
  color: var(--bg-dark);
  box-shadow: 0 0 16px rgba(0,217,255,0.5);
}

.btn-orange {
  background: rgba(255,107,0,0.1);
  color: var(--fire-orange);
  border-color: var(--fire-orange);
}

.btn-orange:hover {
  background: var(--fire-orange);
  color: var(--bg-dark);
  box-shadow: 0 0 16px rgba(255,107,0,0.4);
}

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.1);
}

.btn-ghost:hover {
  color: white;
  border-color: rgba(255,255,255,0.3);
}

/* ═══════════════════════════════════════
   CODE STYLE
═══════════════════════════════════════ */
.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.code-card {
  border-radius: 2px;
  overflow: hidden;
  background: #060810;
  border: 1px solid var(--border-glow);
}

.code-card-header {
  padding: 10px 18px;
  background: rgba(0,217,255,0.06);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-card-header.good { color: var(--matrix-green); border-bottom-color: rgba(0,255,65,0.15); }
.code-card-header.bad  { color: var(--fire-orange);  border-bottom-color: rgba(255,107,0,0.15); }

.code-card pre {
  padding: 20px 18px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12.5px;
  line-height: 1.85;
  overflow-x: auto;
  color: rgba(255,255,255,0.75);
}

.kw  { color: #7aabe8; }
.fn  { color: var(--matrix-green); text-shadow: 0 0 4px rgba(0,255,65,0.3); }
.str { color: #e8c97a; }
.cm  { color: rgba(255,255,255,0.25); font-style: italic; }
.vr  { color: #c792ea; }
.op  { color: rgba(255,255,255,0.5); }
.cy  { color: var(--neon-cyan); }

.naming-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 32px;
  border: 1px solid var(--border-glow);
  overflow: hidden;
  border-radius: 2px;
}

.naming-table thead {
  background: rgba(0,217,255,0.06);
}

.naming-table th {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,217,255,0.6);
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-glow);
}

.naming-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-dim);
  color: rgba(255,255,255,0.8);
}

.naming-table tr:last-child td { border-bottom: none; }
.naming-table tr:hover td { background: rgba(0,217,255,0.04); }

.code-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  background: rgba(0,255,65,0.1);
  color: var(--matrix-green);
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid rgba(0,255,65,0.2);
}

/* ═══════════════════════════════════════
   CHECKLIST
═══════════════════════════════════════ */
.checklist-group-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fire-orange);
  margin: 28px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,107,0,0.2);
}

.checklist { display: grid; gap: 6px; }

.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  border-radius: 2px;
  position: relative;
}

.check-item:hover {
  border-color: rgba(0,217,255,0.3);
  background: rgba(0,217,255,0.03);
}

.check-item.checked {
  background: rgba(0,255,65,0.04);
  border-color: rgba(0,255,65,0.25);
}

.check-item.checked .check-text {
  text-decoration: line-through;
  color: rgba(255,255,255,0.3);
}

.checkbox {
  width: 18px; height: 18px;
  border: 1px solid rgba(0,217,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  transition: all 0.15s;
}

.check-item.checked .checkbox {
  background: var(--matrix-green);
  border-color: var(--matrix-green);
  color: var(--bg-dark);
  box-shadow: 0 0 8px rgba(0,255,65,0.4);
  font-weight: bold;
}

.check-text {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  transition: color 0.15s;
}

/* ═══════════════════════════════════════
   EDITABLE HINT
═══════════════════════════════════════ */
.edit-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,217,255,0.4);
  border: 1px solid rgba(0,217,255,0.15);
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 32px;
}

[contenteditable] {
  outline: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s, background 0.2s;
  padding: 1px 3px;
  border-radius: 1px;
  cursor: text;
}

[contenteditable]:hover { border-bottom-color: rgba(0,217,255,0.3); }
[contenteditable]:focus {
  border-bottom-color: var(--neon-cyan);
  background: rgba(0,217,255,0.05);
}

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--bg-card);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0,217,255,0.25);
  color: var(--neon-cyan);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 12px 20px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s;
  pointer-events: none;
  z-index: 999;
  text-transform: uppercase;
}

.toast.show { opacity: 1; transform: none; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .header-inner { grid-template-columns: 1fr; padding: 32px 20px; }
  .header-right { text-align: left; }
  .nav-inner { padding: 0 12px; overflow-x: auto; }
  main { padding: 0 20px 64px; }
  .tone-grid, .do-dont, .code-grid { grid-template-columns: 1fr; }
  .colors-grid { grid-template-columns: repeat(2, 1fr); }
  .rule-item { grid-template-columns: 1fr; }
  .rule-category { border-right: none; border-bottom: 1px solid var(--border-dim); }
}

/* ═══════════════════════════════════════
   HELPER CLASSES (replacing inline styles)
═══════════════════════════════════════ */

/* Section sub-labels */
.section-sub-label {
  margin-bottom: 16px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,217,255,0.5);
}
.section-sub-label--spaced  { margin: 48px 0 16px; }
.section-sub-label--spaced2 { margin: 40px 0 16px; }
.section-sub-label--spaced3 { margin: 32px 0 16px; }

/* Type scale specimens */
.type-specimen--mt { margin-top: 12px; }

/* Type scale entries */
.ts-display {
  font-family: 'Orbitron', monospace;
  font-size: clamp(28px,4vw,48px);
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(0,217,255,0.4);
  letter-spacing: 0.1em;
}
.ts-h2 {
  font-family: 'Orbitron', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--electric-blue);
  letter-spacing: 0.1em;
}
.ts-h3 {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.12em;
}
.ts-body {
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
}
.ts-small {
  font-family: 'Exo 2', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}
.ts-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fire-orange);
}

/* Color picker input */
.color-picker-input {
  width: 48px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--border-glow);
  background: var(--bg-card);
  cursor: pointer;
  border-radius: 2px;
}

/* Add color plus icon */
.add-color-plus {
  font-size: 22px;
  color: var(--neon-cyan);
}

/* Bad keyword in code block */
.kw-bad { color: var(--fire-orange); }

/* Hidden delete button (fixed code rules) */
.delete-rule--hidden { visibility: hidden; }

/* Checklist footer */
.checklist-footer {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Checklist intro text */
.checklist-intro {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* Checklist progress */
.checklist-progress {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(0,217,255,0.5);
  letter-spacing: 0.1em;
}


/* ═══════════════════════════════════════
   THEME SWITCHER — below logo, left col
═══════════════════════════════════════ */
.theme-switcher {
  position: relative;
  display: inline-block;
  margin-top: 16px;
}

.theme-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-dim);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 2px;
  padding: 9px 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.theme-trigger:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.theme-trigger-icon { font-size: 12px; line-height: 1; }

.theme-trigger-caret {
  font-size: 8px;
  opacity: 0.5;
  transition: transform 0.2s;
}

.theme-switcher.open .theme-trigger-caret { transform: rotate(180deg); }
.theme-switcher.open .theme-trigger {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.theme-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 175px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 2px;
  z-index: 400;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

/* Corner accent — bottom-right */
.theme-dropdown::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-color: var(--border-corner);
  border-style: solid;
  border-width: 0 2px 2px 0;
  opacity: 0.6;
  z-index: 2;
  pointer-events: none;
}

.theme-switcher.open .theme-dropdown { display: block; }

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--border-dim);
  transition: all 0.15s;
}

.theme-option:last-child { border-bottom: none; }

.theme-option:hover {
  background: var(--accent-trace);
  color: var(--text-secondary);
}

.theme-option.active {
  color: var(--accent);
  background: var(--accent-trace);
}

.theme-option.active::after {
  content: '▸';
  margin-left: auto;
  font-size: 10px;
  color: var(--accent);
  border: none;
  width: auto; height: auto;
  position: static;
  opacity: 1;
}

.theme-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
