/* ═══════════════════════════════════════
   QDINX BRAND TOKENS
═══════════════════════════════════════ */
:root {
  --neon-cyan:     #00D9FF;
  --electric-blue: #1E90FF;
  --fire-orange:   #FF6B00;
  --deep-purple:   #6B1EFF;
  --matrix-green:  #00FF41;
  --bg-dark:       #0A0E27;
  --bg-card:       #1A1A3E;
  --bg-card-2:     #12122e;
  --text-primary:  #00D9FF;
  --text-secondary:#FFFFFF;
  --border-glow:   rgba(0,217,255,0.25);
  --border-dim:    rgba(0,217,255,0.08);
}

/* ═══════════════════════════════════════
   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;
}

/* ═══════════════════════════════════════
   FOOTER
   (merged from footer.css)
═══════════════════════════════════════ */
footer {
  position: relative;
  z-index: 10;
  margin-top: 80px;
  padding: 32px 48px;
  border-top: 1px solid var(--border-glow);
  background: linear-gradient(0deg, rgba(10,14,39,1) 0%, rgba(26,26,62,0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 100%;
}

footer a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0,217,255,0.45);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

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

footer .footer-copy::before {
  content: '// ';
  color: var(--fire-orange);
  opacity: 0.7;
}

.footer-image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--border-glow);
  border-radius: 2px;
  opacity: 0.7;
  transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.footer-image:hover {
  opacity: 1;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0,217,255,0.3);
}

@media (max-width: 768px) {
  footer {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ═══════════════════════════════════════
   NAVBAR (template component)
═══════════════════════════════════════ */
.navbar {
  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);
  padding: 0 48px;
}

.navbar-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.nav-item > 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;
  display: block;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

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

/* ── Page wrapper ── */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Hero / logo centred layout ── */
.hero {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  gap: 32px;
}

.logo {
  max-width: 600px;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 24px rgba(0,217,255,0.3));
  transition: filter 0.3s;
}

.logo:hover {
  filter: drop-shadow(0 0 40px rgba(0,217,255,0.55));
}

@media (max-width: 768px) {
  .navbar { padding: 0 12px; overflow-x: auto; }
  .page-wrapper { padding: 0 20px; }
  .logo { max-width: 90vw; }
}

/* ═══════════════════════════════════════
   CHARACTER / CONTENT PROFILE PAGE
═══════════════════════════════════════ */

/* ── Outer container ── */
.profile-container {
  max-width: 900px;
  margin: 48px auto 0;
  background: rgba(26,26,62,0.7);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(0,217,255,0.3);
  border-radius: 2px;
  padding: 48px;
  box-shadow: 0 8px 40px rgba(107,30,255,0.25);
  position: relative;
  z-index: 5;
}

/* Corner accent framing — consistent with brand language */
.profile-container::before,
.profile-container::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--fire-orange);
  border-style: solid;
  opacity: 0.7;
}
.profile-container::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.profile-container::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ── Profile header ── */
.profile-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(0,217,255,0.2);
}

.profile-codename {
  font-family: 'Orbitron', monospace;
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-shadow:
    0 0 12px var(--neon-cyan),
    0 0 40px rgba(0,217,255,0.3);
  margin-bottom: 12px;
}

.profile-tagline {
  font-family: 'Exo 2', sans-serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.1em;
  color: var(--electric-blue);
  letter-spacing: 0.05em;
  margin-top: 12px;
  opacity: 0.9;
}

/* ── Pull quote ── */
.profile-quote {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.15em;
  font-style: italic;
  font-weight: 300;
  line-height: 1.8;
  text-align: center;
  padding: 28px 40px;
  margin: 32px 0;
  background: linear-gradient(135deg, rgba(0,217,255,0.06), rgba(107,30,255,0.08));
  border: 1px solid rgba(0,217,255,0.12);
  border-radius: 2px;
  color: var(--electric-blue);
  position: relative;
}

.profile-quote::before {
  content: '\201C';
  position: absolute;
  top: -12px;
  left: 20px;
  font-size: 5em;
  line-height: 1;
  color: rgba(0,217,255,0.15);
  font-family: Georgia, serif;
}

/* ── Content section ── */
.profile-section {
  margin: 28px 0;
  padding: 28px;
  background: rgba(255,255,255,0.02);
  border-left: 3px solid var(--neon-cyan);
  border-radius: 0 2px 2px 0;
}

.profile-section h2 {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0,217,255,0.4);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-section h2::before {
  content: '◆';
  color: var(--deep-purple);
  text-shadow: 0 0 6px rgba(107,30,255,0.6);
  font-size: 10px;
}

/* ── Stat grid ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat {
  background: rgba(0,217,255,0.07);
  padding: 16px;
  border: 1px solid rgba(0,217,255,0.2);
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s;
}

.stat:hover {
  background: rgba(0,217,255,0.11);
  border-color: rgba(0,217,255,0.35);
}

.stat-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'Exo 2', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Ability list ── */
.ability-list {
  list-style: none;
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.ability-list li {
  padding: 14px 18px;
  background: rgba(107,30,255,0.08);
  border-left: 3px solid var(--deep-purple);
  border-radius: 0 2px 2px 0;
  font-family: 'Exo 2', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
  transition: background 0.2s, transform 0.2s;
}

.ability-list li:hover {
  background: rgba(107,30,255,0.16);
  transform: translateX(4px);
}

.ability-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--electric-blue);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── Flaw / warning box ── */
.flaw {
  margin-top: 16px;
  padding: 16px 18px;
  background: rgba(255,107,0,0.07);
  border-left: 3px solid var(--fire-orange);
  border-radius: 0 2px 2px 0;
  font-family: 'Exo 2', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--fire-orange);
  line-height: 1.6;
}

.flaw strong {
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── Paradox / highlight box ── */
.paradox-box {
  margin-top: 16px;
  padding: 20px;
  background: rgba(107,30,255,0.12);
  border: 1px dashed rgba(107,30,255,0.35);
  border-radius: 2px;
  font-family: 'Exo 2', sans-serif;
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
}

.paradox-box strong {
  font-style: normal;
  font-weight: 600;
  color: var(--deep-purple);
  text-shadow: 0 0 6px rgba(107,30,255,0.5);
}

/* ── Body text helpers ── */
.profile-body-text {
  font-family: 'Exo 2', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,0.78);
  line-height: 1.75;
  margin-bottom: 14px;
}

.profile-body-text--accent {
  font-style: italic;
  color: var(--electric-blue);
  opacity: 0.9;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .profile-container {
    margin: 20px;
    padding: 24px 20px;
  }
  .profile-quote {
    padding: 20px 24px;
  }
  .profile-section {
    padding: 20px 16px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════
   IMAGE PLACEHOLDERS
═══════════════════════════════════════ */
.img-placeholder {
  border: 1px dashed rgba(0,217,255,0.2);
  border-radius: 2px;
  background: rgba(0,217,255,0.03);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
  position: relative;
}

.img-placeholder:hover {
  border-color: rgba(0,217,255,0.4);
  background: rgba(0,217,255,0.06);
}

.img-placeholder__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 16px;
}

.img-placeholder__icon {
  font-size: 28px;
  opacity: 0.15;
  display: block;
}

.img-placeholder__label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,217,255,0.5);
}

.img-placeholder__hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(0,217,255,0.25);
}

/* ═══════════════════════════════════════
   CONTACT FORM
═══════════════════════════════════════ */
.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form__label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fire-orange);
}

.contact-form__input {
  font-family: 'Exo 2', sans-serif;
  font-size: 14px;
  font-weight: 300;
  padding: 12px 16px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(0,217,255,0.2);
  border-radius: 2px;
  color: var(--text-secondary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.contact-form__input::placeholder {
  color: rgba(255,255,255,0.2);
  font-style: italic;
}

.contact-form__input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0,217,255,0.15);
}

.contact-form__textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.contact-form__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-form__submit {
  min-width: 160px;
}

.contact-form__status {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
}

@media (max-width: 768px) {
  .contact-form__row {
    grid-template-columns: 1fr;
  }
}

/* ── Image grid (4-up) ── */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

/* ── Inline code snippet ── */
.inline-code {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--matrix-green);
}
