/* ================================================================
 * SubscriptGenerator.online — Fixed & Optimized Stylesheet
 * ================================================================ */

/* =====================================================
   CSS CUSTOM PROPERTIES (ROOT VARIABLES)
   ===================================================== */
:root {
  --bg-primary: #0d0d0f;
  --bg-secondary: #16161a;
  --bg-card: #1e1e24;
  --text-primary: #e8e8f0;
  --text-secondary: #9090a8;
  --text-muted: #5a5a72;
  --accent: #7c6af7;
  --accent-hover: #9d8fff;
  --border: #2a2a38;
  --radius-lg: 20px;
  --bg-input: #121216;
  --accent-glow: rgba(124, 106, 247, 0.22);
  --border-active: #7c6af7;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-glow: 0 0 50px rgba(124, 106, 247, 0.12);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  --transition: 0.2s ease;
  --accent-soft: rgba(124, 106, 247, 0.08);
  --purple: #a855f7;
  --purple-soft: rgba(168, 85, 247, 0.08);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.08);
  --warning-soft: rgba(245, 158, 11, 0.08);
  --pink: #ec4899;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.08);
  --sub-color: #3b82f6;
  --sub-soft: rgba(59, 130, 246, 0.08);
  --sup-color: #f97316;
  --sup-soft: rgba(249, 115, 22, 0.08);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.08);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.08);
  --discord: #5865f2;
  --gaming: #22c55e;
  --gaming-soft: rgba(34, 197, 94, 0.08);
  --insta: #e1306c;
  --tiktok: #fe2c55;
  --twitter: #1d9bf0;
  --twitter-soft: rgba(29, 155, 240, 0.08);
  --orange: #f97316;
  --orange-soft: rgba(249, 115, 22, 0.08);
  --teal: #14b8a6;
  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.08);
  --emerald: #10b981;
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

/* 
  ⚠️ CRITICAL FIX: 
  Original body had flex/center/padding from 404 page 
  bleeding into all pages. Fixed here.
*/
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* REMOVED: display:flex, align-items:center, 
     justify-content:center, padding:20px, text-align:center */
}

/* 404 page body override — only for error page */
body[data-page="404"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1rem;
}

p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

ul,
ol {
  margin: 1rem 0 1rem 2rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

strong {
  color: var(--text-primary);
}

code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
}

/* =====================================================
   LAYOUT
   ===================================================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 52px 0;
}

/* =====================================================
   NAVIGATION — FIXED
   ===================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px; /* FIX: increased from 60px for better desktop presence */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative; /* needed for mobile menu absolute positioning */
}

.nav-logo {
  font-size: 1.2rem; /* FIX: was 1.1rem, too small */
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0; /* FIX: prevent logo from shrinking */
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  align-items: center;
  /* FIX: removed flex-wrap so nav stays on one line */
  flex-wrap: nowrap;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem; /* FIX: slightly larger */
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  display: block;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  text-decoration: none;
}

.nav-links .active-link {
  color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  text-decoration: none;
}

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* =====================================================
   BREADCRUMB
   ===================================================== */
.breadcrumb {
  max-width: 1100px;
  margin: 14px auto 0;
  padding: 0 20px;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb [aria-current] {
  color: var(--text-secondary);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  padding: 52px 0 36px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--violet-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: var(--violet);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0 auto 16px;
}

.hero h1 span {
  color: var(--accent);
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.hero p.sub {
  max-width: 580px;
  margin: 14px auto 32px;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* =====================================================
   TOOL WIDGET — MAIN
   ===================================================== */
.tool-widget {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 860px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-glow);
}

/* Style Tabs */
.style-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.style-tab {
  flex: 1;
  min-width: 120px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  font-family: var(--font-sans);
}

.style-tab:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.style-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.style-tab .preview-char {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 3px;
  font-family: var(--font-mono);
}

/* IO Grid */
.io-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.io-box {
  display: flex;
  flex-direction: column;
}

.io-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.char-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.char-count.warning {
  color: var(--warning);
  font-weight: 700;
}

.char-count.danger {
  color: #ef4444;
  font-weight: 700;
}

textarea {
  width: 100%;
  height: 130px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-sans);
  padding: 14px 16px;
  resize: vertical;
  transition: border-color var(--transition);
  line-height: 1.65;
}

textarea:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea::placeholder {
  color: var(--text-muted);
}

#input-text {
  height: 130px;
}

#output-text {
  background: var(--bg-input);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  word-break: break-all;
  cursor: text;
}

/* Action Bar */
.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font-sans);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  flex: 1;
  min-height: 48px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124, 106, 247, 0.3);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  min-height: 48px;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
}

.btn-success {
  background: var(--success) !important;
  color: #fff !important;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 16px auto;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.trust-badge .icon {
  color: var(--success);
  font-size: 0.85rem;
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 16px auto 8px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.trust-item .ck {
  color: var(--success);
}

/* =====================================================
   MULTI-STYLE PREVIEW PANEL
   ===================================================== */
.multi-preview {
  max-width: 860px;
  margin: 0 auto 40px;
}

.multi-preview-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-align: left;
}

.preview-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.preview-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.preview-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.preview-card-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.preview-card-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
  word-break: break-all;
  min-height: 28px;
}

.preview-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.preview-copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =====================================================
   SECTION HEADER (SHARED)
   ===================================================== */
.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-header h2 {
  margin-bottom: 8px;
}

.section-header p {
  max-width: 560px;
  margin: 8px auto 0;
  font-size: 0.92rem;
}

.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet);
  margin-bottom: 10px;
}

/* =====================================================
   WHAT IS SECTION
   ===================================================== */
.what-is {
  background: var(--bg-secondary);
}

.what-is-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.what-is-content p {
  margin-bottom: 16px;
}

.compat-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.compat-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.compat-list .dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}

.what-is-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.transform-demo {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transform-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.transform-input {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-muted);
  min-width: 70px;
}

.transform-arrow {
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.transform-output {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 600;
}

.transform-label {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Two-column layout (used in multiple pages) */
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: start;
}

/* =====================================================
   HOW TO USE — STEPS
   ===================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  transition: border-color var(--transition);
  position: relative;
}

.step-card:hover {
  border-color: var(--violet);
}

.step-num {
  width: 38px;
  height: 38px;
  background: var(--violet-soft);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--violet);
  margin-bottom: 14px;
}

.step-card h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.98rem;
}

.step-card p {
  font-size: 0.86rem;
  margin: 0;
}

/* Pro Tip */
.pro-tip {
  background: var(--warning-soft);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 26px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.pro-tip-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.pro-tip p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  margin: 0;
}

.pro-tip strong {
  color: var(--warning);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =====================================================
   USE CASES
   ===================================================== */
.use-cases {
  background: var(--bg-secondary);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.use-case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.use-case-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.use-case-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}

.use-case-card h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.use-case-card p {
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.example-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
}

.example-arrow,
.ea {
  color: var(--accent);
}

/* UC variants (spoke pages) */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.uc-card,
.use-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.uc-card:hover,
.use-card:hover {
  border-color: var(--violet);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.uc-icon,
.use-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: block;
}

/* =====================================================
   TOOL DIRECTORY
   ===================================================== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-decoration: none;
  transition: all var(--transition);
  display: block;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}

.tool-card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}

.tool-card h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.tool-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.tool-card-badge {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =====================================================
   CHARACTER MAP TABLE
   ===================================================== */
.char-map {
  background: var(--bg-secondary);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  min-width: 500px; /* FIX: prevents squish on mobile */
}

thead th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-card);
}

tbody td {
  padding: 9px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}

.td-char {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-primary);
}

.td-code,
.td-unicode {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.copy-cell-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.copy-cell-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Generic char table variant */
.char-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.char-table th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.char-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.char-table tr:last-child td {
  border-bottom: none;
}

.char-table tr:hover td {
  background: var(--bg-card);
}

.char-table .mono {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--text-primary);
}

.char-table .code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}

.copy-char {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.copy-char:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.table-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* =====================================================
   FAQ SECTION
   ===================================================== */
.faq {
  background: var(--bg-primary);
}

.faq-list {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover {
  border-color: var(--accent);
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  transition: color var(--transition);
}

.faq-q:hover {
  color: var(--accent);
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  display: none;
  padding: 0 20px 16px;
}

.faq-a p {
  font-size: 0.87rem;
  line-height: 1.72;
  margin: 0;
}

.faq-item.open .faq-a {
  display: block;
}

/* =====================================================
   SPOKE GRID (INTERNAL LINKS)
   ===================================================== */
.spoke-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.spoke-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: block;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
}

.spoke-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.1);
  text-decoration: none;
}

.spoke-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: block;
}

.spoke-card h3 {
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.spoke-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.spoke-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--cyan-soft);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Cross-pillar cards */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: block;
  text-decoration: none;
  transition: all var(--transition);
}

.cp-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.cp-card-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
  display: block;
}

.cp-card h3 {
  color: var(--text-primary);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.cp-card p {
  font-size: 0.79rem;
  color: var(--text-muted);
  margin: 0;
}

/* =====================================================
   RELATED CARDS
   ===================================================== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.related-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-decoration: none;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--transition);
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}

.related-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.related-card h3 {
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.related-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.related-arrow {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
  display: block;
}

/* =====================================================
   ARTICLE CARDS (LEARN PAGE)
   ===================================================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1060px;
  margin: 0 auto;
}

.article-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
  text-decoration: none;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}

.ac-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ac-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
}

.cat-fundamentals { background: rgba(124,106,247,0.15); color: #7c6af7; }
.cat-chemistry    { background: rgba(34,197,94,0.15);   color: #22c55e; }
.cat-social       { background: rgba(225,48,108,0.15);  color: #e1306c; }
.cat-technical    { background: rgba(6,182,212,0.15);   color: #06b6d4; }
.cat-reference    { background: rgba(245,158,11,0.15);  color: #f59e0b; }

.ac-read  { font-size: 0.72rem; color: var(--text-muted); }
.ac-icon  { font-size: 2rem; line-height: 1; }
.ac-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.ac-desc  { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.65; flex: 1; }

.ac-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ac-tag {
  font-size: 0.68rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
}

.ac-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
}

/* Filter Row */
.filter-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* =====================================================
   FOOTER — FIXED
   ===================================================== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px; /* FIX: more padding */
  text-align: left; /* FIX: was center from 404 bleed */
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; /* FIX: was 32px */
  margin-bottom: 36px;
}

.footer-brand p {
  font-size: 0.83rem;
  margin-top: 12px;
  max-width: 260px;
  line-height: 1.65;
}

.footer-col h4 {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.84rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* =====================================================
   TOAST NOTIFICATION
   ===================================================== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--success);
  color: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.87rem;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* =====================================================
   BOOKMARK BANNER
   ===================================================== */
.bookmark-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: none;
  justify-content: center;
  align-items: center;
  gap: 16px;
  z-index: 90;
  flex-wrap: wrap;
}

.bookmark-banner p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

.bookmark-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  line-height: 1;
}

/* =====================================================
   POPULAR LINKS / 404 PAGE
   ===================================================== */
.error-container {
  max-width: 600px;
  width: 100%;
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(124,106,247,0.3);
}

.popular-links {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}

.popular-links h2 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  display: block;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.link-card .icon  { font-size: 1.5rem; margin-bottom: 0.5rem; display: block; }
.link-card .title { color: var(--text-primary); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; }
.link-card .desc  { color: var(--text-muted); font-size: 0.8rem; line-height: 1.4; }

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.search-box {
  margin: 2rem auto;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s;
  font-family: var(--font-sans);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,106,247,0.15);
}

/* =====================================================
   PLATFORM PREVIEW MOCKUPS
   ===================================================== */

/* Instagram */
.insta-preview {
  max-width: 380px;
  margin: 0 auto 32px;
  background: #000;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #262626;
}

.ip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #262626;
}

.ip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);
  flex-shrink: 0;
}

.ip-username { font-size: 0.88rem; font-weight: 600; color: #fff; }
.ip-label    { font-size: 0.7rem; color: #8e8e8e; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.ip-bio      { font-family: var(--font-mono); font-size: 0.86rem; color: #fff; line-height: 1.5; margin-bottom: 8px; word-break: break-word; white-space: pre-wrap; }

/* Discord */
.discord-preview {
  max-width: 820px;
  margin: 0 auto 32px;
  background: #36393f;
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid #202225;
}

.dp-label    { font-size: 0.72rem; font-weight: 700; color: #72767d; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.dp-message  { display: flex; gap: 14px; margin-bottom: 16px; align-items: flex-start; }
.dp-avatar   { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#5865f2,#7289f7); flex-shrink: 0; }
.dp-content  { flex: 1; }
.dp-username { font-size: 0.92rem; font-weight: 600; color: #fff; margin-bottom: 2px; }
.dp-text     { font-family: var(--font-mono); font-size: 0.92rem; color: #dcddde; line-height: 1.5; word-break: break-word; }

/* Twitter */
.twitter-preview {
  max-width: 500px;
  margin: 0 auto 32px;
  background: #15202b;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #38444d;
}

.tp-header  { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.tp-avatar  { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg,#1d9bf0,#4db5f5); flex-shrink: 0; }
.tp-name    { font-size: 0.92rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.tp-handle  { font-size: 0.82rem; color: #8899a6; }
.tp-tweet   { font-family: var(--font-mono); font-size: 0.94rem; color: #fff; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.tp-footer  { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid #38444d; }
.tp-action  { font-size: 0.78rem; color: #8899a6; }
.tp-label   { font-size: 0.68rem; color: #8899a6; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.tp-meta    { flex: 1; }

/* TikTok */
.tiktok-preview {
  max-width: 360px;
  margin: 0 auto 32px;
  background: #000;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #2a2a2a;
}

.ttp-label       { font-size: 0.68rem; color: #555; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.ttp-avatar-row  { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 14px; }
.ttp-avatar      { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg,#fe2c55,#25f4ee); border: 2px solid #fe2c55; }
.ttp-username    { font-size: 1rem; font-weight: 700; color: #fff; text-align: center; }
.ttp-handle      { font-size: 0.82rem; color: #888; text-align: center; margin-top: 2px; }
.ttp-bio         { font-family: var(--font-mono); font-size: 0.86rem; color: #fff; line-height: 1.5; text-align: center; word-break: break-word; margin-bottom: 14px; }
.ttp-stats       { display: flex; justify-content: center; gap: 24px; border-top: 1px solid #2a2a2a; padding-top: 14px; }
.ttp-stat        { text-align: center; }
.ttp-stat-num    { font-size: 0.9rem; font-weight: 700; color: #fff; }
.ttp-stat-label  { font-size: 0.7rem; color: #888; }

/* Platform cards grid */
.platform-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.platform-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition: all var(--transition);
}

.platform-card:hover         { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.platform-card.ig            { border-top: 3px solid #e1306c; }
.platform-card.tt            { border-top: 3px solid #69c9d0; }
.platform-card.dc            { border-top: 3px solid #5865f2; }
.platform-card.tw            { border-top: 3px solid #1da1f2; }
.platform-card.yt            { border-top: 3px solid #ff0000; }
.platform-card.wa            { border-top: 3px solid #25d366; }

.platform-icon  { font-size: 1.8rem; margin-bottom: 10px; }
.platform-name  { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.platform-limit { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 10px; display: block; }
.platform-card p{ font-size: 0.84rem; margin: 0; }

.platform-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-right: 4px; margin-bottom: 4px; }
.badge-yes      { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge-partial  { background: rgba(245,158,11,0.15); color: #f59e0b; }

.pc-icon   { font-size: 1.5rem; flex-shrink: 0; }
.pc-info   { flex: 1; }
.pc-name   { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.pc-status { font-size: 0.76rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; display: inline-block; margin-bottom: 6px; }
.pc-status.yes     { background: rgba(34,197,94,0.15); color: #22c55e; }
.pc-status.partial { background: rgba(245,158,11,0.15); color: #f59e0b; }
.pc-status.no      { background: rgba(239,68,68,0.15); color: #ef4444; }
.pc-note   { font-size: 0.74rem; color: var(--text-muted); line-height: 1.5; }

/* =====================================================
   KEYBOARD / QUICK INSERT COMPONENTS
   ===================================================== */

/* Number Pad */
.number-pad {
  max-width: 820px;
  margin: 0 auto 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.np-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }

.np-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

.np-key {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.np-key:hover { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-2px); }
.np-sub       { font-family: var(--font-mono); font-size: 1.6rem; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.np-std       { font-size: 0.7rem; color: var(--text-muted); }

/* Letter Keyboard */
.letter-keyboard {
  max-width: 820px;
  margin: 0 auto 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.lk-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }

.lk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
  gap: 8px;
}

.lk-key {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 65px;
}

.lk-key:hover             { border-color: var(--purple); background: var(--purple-soft); transform: translateY(-2px); }
.lk-key.unavailable       { opacity: 0.3; cursor: not-allowed; }
.lk-key.unavailable:hover { border-color: var(--border); background: var(--bg-card); transform: none; }
.lk-sub                   { font-family: var(--font-mono); font-size: 1.3rem; color: var(--text-primary); line-height: 1; margin-bottom: 3px; }
.lk-std                   { font-size: 0.68rem; color: var(--text-muted); }

/* Footnote Keyboard */
.fn-keyboard {
  max-width: 520px;
  margin: 0 auto 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.fnk-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }

.fnk-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.fnk-key {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.fnk-key:hover { border-color: var(--purple); background: var(--purple-soft); transform: translateY(-2px); }
.fnk-sub       { font-family: var(--font-mono); font-size: 1.5rem; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.fnk-std       { font-size: 0.68rem; color: var(--text-muted); }

/* Quick Insert (Superscript) */
.quick-insert {
  max-width: 860px;
  margin: 0 auto 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.qi-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

.qi-keys {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qi-key {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 54px;
  text-align: center;
}

.qi-key:hover  { border-color: var(--orange); background: var(--orange-soft); transform: translateY(-2px); }
.qi-super      { font-family: var(--font-mono); font-size: 0.95rem; color: var(--text-primary); line-height: 1; }
.qi-std        { font-size: 0.6rem; color: var(--text-muted); margin-top: 3px; }

/* Quick Grid (Unicode Converter) */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
}

.qc-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.qc-btn:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.qc-char      { font-family: var(--font-mono); font-size: 1.4rem; color: var(--text-primary); display: block; line-height: 1; margin-bottom: 4px; }
.qc-code      { font-size: 0.6rem; color: var(--text-muted); }

/* Symbol Grid */
.sym-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
}

.sym-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sym-btn:hover { border-color: var(--rose); background: var(--rose-soft); transform: translateY(-2px); }
.sym-ch        { font-family: var(--font-mono); font-size: 1.5rem; color: var(--text-primary); line-height: 1; }
.sym-nm        { font-size: 0.6rem; color: var(--text-muted); line-height: 1.2; text-align: center; }

/* Big Symbol Cards */
.sym-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.sym-card:hover  { border-color: var(--teal); transform: translateY(-3px); box-shadow: 0 0 30px rgba(20,184,166,0.15); }
.sym-char        { font-size: 3.5rem; line-height: 1; margin-bottom: 10px; display: block; }
.sym-name        { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.sym-code        { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); }
.sym-copied      { font-size: 0.7rem; color: var(--success); height: 18px; margin-top: 4px; opacity: 0; transition: opacity 0.2s; }
.sym-card.just-copied .sym-copied { opacity: 1; }

/* Sym Search */
.sym-search {
  max-width: 600px;
  margin: 0 auto 28px;
  position: relative;
}

.sym-search input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 14px 20px 14px 44px;
  transition: border-color var(--transition);
  font-family: var(--font-sans);
}

.sym-search input:focus { outline: none; border-color: var(--border-active); box-shadow: 0 0 0 3px var(--accent-glow); }
.sym-search input::placeholder { color: var(--text-muted); }
.sym-search .si { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1rem; }

/* Category Tabs */
.cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.cat-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.cat-tab:hover  { border-color: var(--accent); color: var(--text-primary); }
.cat-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* =====================================================
   CHEMISTRY PAGE COMPONENTS
   ===================================================== */
.common-formulas {
  max-width: 840px;
  margin: 0 auto 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.cf-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

.cf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.cf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.cf-card:hover    { border-color: var(--green); transform: translateY(-2px); }
.cf-formula       { font-family: var(--font-mono); font-size: 1.05rem; color: var(--text-primary); margin-bottom: 3px; }
.cf-name          { font-size: 0.68rem; color: var(--text-muted); }

/* Periodic Table */
.periodic-table {
  max-width: 840px;
  margin: 0 auto 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.pt-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }

.pt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  gap: 6px;
}

.pt-element {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 4px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  min-height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pt-element:hover { border-color: var(--green); background: var(--green-soft); transform: scale(1.05); }
.pt-symbol        { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); line-height: 1; margin-bottom: 2px; }
.pt-number        { font-size: 0.6rem; color: var(--text-muted); }

/* Formula Grid */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
}

.formula-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.formula-card:hover { border-color: var(--green); transform: translateY(-2px); }
.formula-big        { font-family: var(--font-mono); font-size: 1.1rem; color: var(--text-primary); margin-bottom: 4px; }
.formula-name       { font-size: 0.68rem; color: var(--text-muted); }

/* =====================================================
   UNICODE CONVERTER PAGE
   ===================================================== */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  max-width: 900px;
  margin: 0 auto 24px;
}

.style-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.style-card:hover          { border-color: var(--accent); transform: translateY(-2px); }
.style-card.active         { background: var(--accent); border-color: var(--accent); }
.style-card.active .sc-label,
.style-card.active .sc-preview { color: #fff; }
.sc-preview  { font-family: var(--font-mono); font-size: 1.05rem; color: var(--text-primary); margin-bottom: 4px; display: block; line-height: 1.3; }
.sc-label    { font-size: 0.68rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* All Styles Grid */
.all-styles {
  max-width: 900px;
  margin: 0 auto 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.as-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }

.as-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.as-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.as-card:hover       { border-color: var(--accent); transform: translateY(-2px); }
.as-card-label       { font-size: 0.68rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.as-card-text        { font-family: var(--font-mono); font-size: 0.92rem; color: var(--text-primary); word-break: break-all; min-height: 22px; }

.as-copy-btn {
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.as-copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Unicode Blocks info */
.unicode-blocks {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.ub-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 16px; }

.ub-list  { display: flex; flex-direction: column; gap: 8px; }

.ub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  gap: 10px;
  transition: border-color var(--transition);
}

.ub-item:hover { border-color: var(--accent); }
.ub-name       { font-size: 0.82rem; color: var(--text-primary); font-weight: 600; }
.ub-range      { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }

/* =====================================================
   COMPARE PAGE
   ===================================================== */
.compare-hero {
  display: flex;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto 20px;
  flex-wrap: wrap;
}

.compare-box {
  flex: 1;
  min-width: 200px;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
}

.compare-box.sub  { background: var(--sub-soft); border: 2px solid rgba(59,130,246,0.4); }
.compare-box.sup  { background: var(--sup-soft); border: 2px solid rgba(249,115,22,0.4); }
.compare-box:hover{ transform: translateY(-3px); box-shadow: 0 0 30px rgba(124,106,247,0.15); }

.compare-label             { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.compare-box.sub .compare-label { color: var(--sub-color); }
.compare-box.sup .compare-label { color: var(--sup-color); }
.compare-demo              { font-family: var(--font-mono); font-size: 2rem; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.compare-desc              { font-size: 0.8rem; color: var(--text-secondary); }

.split-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.split-card     { border-radius: var(--radius-lg); padding: 28px; transition: all var(--transition); }
.split-card.sub { background: var(--sub-soft); border: 1px solid rgba(59,130,246,0.3); }
.split-card.sup { background: var(--sup-soft); border: 1px solid rgba(249,115,22,0.3); }

.split-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 16px; }
.split-card.sub .split-title { color: var(--sub-color); }
.split-card.sup .split-title { color: var(--sup-color); }

.split-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.split-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.87rem; color: var(--text-secondary); }
.split-list li::before { content: "→"; color: var(--text-muted); flex-shrink: 0; margin-top: 1px; }

.example-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ex-chip     { background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 6px; padding: 4px 12px; font-family: var(--font-mono); font-size: 0.95rem; color: var(--text-primary); }

/* Diff Grid */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 780px;
  margin: 0 auto;
}

.diff-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}

.diff-card:hover  { border-color: var(--teal); }
.diff-sym         { font-size: 2.5rem; margin-bottom: 10px; }

/* =====================================================
   GAMING PAGE
   ===================================================== */
.gaming-preview {
  max-width: 480px;
  margin: 0 auto 32px;
  background: #1a1a2e;
  border: 1px solid #16213e;
  border-radius: var(--radius-md);
  padding: 20px;
}

.gp-label   { font-size: 0.68rem; color: #555; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }

.gp-player {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #16213e;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.gp-avatar   { width: 44px; height: 44px; border-radius: var(--radius-sm); background: linear-gradient(135deg,#22c55e,#4ade80); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.gp-info     { flex: 1; }
.gp-name     { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: #22c55e; margin-bottom: 2px; }
.gp-tag      { font-size: 0.75rem; color: #6b7280; }
.gp-status   { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.gp-dot      { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.gp-online   { font-size: 0.72rem; color: #22c55e; }
.gp-score    { font-family: var(--font-mono); font-size: 0.82rem; color: #9090a8; margin-left: auto; }

.presets-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.preset-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  font-family: var(--font-sans);
}

.preset-btn:hover { border-color: var(--gaming); background: var(--gaming-soft); }
.preset-label     { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.preset-text      { font-family: var(--font-mono); font-size: 0.95rem; color: var(--text-primary); }

/* =====================================================
   TWITTER CHAR LIMIT PAGE
   ===================================================== */
.styles-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }

.style-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all var(--transition);
  cursor: pointer;
}

.style-box:hover  { border-color: var(--twitter); background: var(--twitter-soft); }
.style-header     { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.style-name       { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.style-output     { font-family: var(--font-mono); font-size: 1.05rem; color: var(--text-primary); line-height: 1.6; word-break: break-word; min-height: 1.6em; }

.copy-icon {
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.copy-icon:hover { background: var(--bg-input); color: var(--twitter); }

.limits-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.limit-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color var(--transition);
}

.limit-card:hover { border-color: var(--twitter); }
.lc-field         { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.lc-limit         { font-family: var(--font-mono); font-size: 1.1rem; color: var(--twitter); font-weight: 700; margin-bottom: 4px; }
.lc-note          { font-size: 0.76rem; color: var(--text-muted); }

/* Char limit bar */
.limit-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

.limit-chip {
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.limit-chip:hover { border-color: var(--accent); color: var(--accent); }
.limit-chip.over  { border-color: #ef4444; color: #ef4444; }
.limit-chip.ok    { border-color: var(--success); color: var(--success); }

/* =====================================================
   ARABIC / HINDI PAGES
   ===================================================== */
.ar-input-wrap,
.hi-input-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 860px;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-glow);
}

.ar-textarea {
  width: 100%;
  min-height: 110px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.3rem;
  padding: 14px 16px;
  resize: vertical;
  direction: rtl;
  text-align: right;
  font-family: "Segoe UI","Noto Sans Arabic",sans-serif;
  transition: border-color var(--transition);
  line-height: 2;
}

.hi-textarea {
  width: 100%;
  min-height: 110px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.3rem;
  padding: 14px 16px;
  resize: vertical;
  font-family: "Noto Sans Devanagari","Devanagari MT","Mangal",sans-serif;
  transition: border-color var(--transition);
  line-height: 2;
}

.ar-textarea:focus,
.hi-textarea:focus { outline: none; border-color: var(--border-active); box-shadow: 0 0 0 3px var(--accent-glow); }
.ar-textarea::placeholder { color: var(--text-muted); direction: rtl; }
.hi-textarea::placeholder { color: var(--text-muted); }

.ar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  max-width: 860px;
  margin: 0 auto;
}

.ar-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.ar-btn:hover { border-color: var(--amber); background: var(--amber-soft); transform: translateY(-2px); }
.ar-ch        { font-size: 1.6rem; color: var(--text-primary); display: block; font-family: "Segoe UI","Noto Sans Arabic",sans-serif; direction: rtl; line-height: 1.4; }
.ar-nm        { font-size: 0.58rem; color: var(--text-muted); display: block; margin-top: 2px; line-height: 1.2; }
.ar-cp        { font-family: var(--font-mono); font-size: 0.55rem; color: var(--accent); display: block; }

.hi-section-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.hi-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: 0.2s;
  font-family: inherit;
}

.hi-tab.active,
.hi-tab:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.hi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  max-width: 860px;
  margin: 0 auto;
}

.hi-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.hi-btn:hover { border-color: var(--orange); background: var(--orange-soft); transform: translateY(-2px); }
.hi-ch        { font-size: 1.5rem; color: var(--text-primary); display: block; font-family: "Noto Sans Devanagari","Mangal",sans-serif; line-height: 1.4; }
.hi-rm        { font-size: 0.6rem; color: var(--text-muted); display: block; margin-top: 2px; }
.hi-cp        { font-family: var(--font-mono); font-size: 0.55rem; color: var(--accent); display: block; }

.char-panel        { display: none; }
.char-panel.active { display: block; }

/* =====================================================
   MULTILINGUAL PAGE
   ===================================================== */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  max-width: 1000px;
  margin: 0 auto;
}

.lang-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
}

.lang-card:hover  { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.lang-header      { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lang-name        { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.lang-script      { font-size: 0.7rem; color: var(--text-muted); background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px; }
.lang-sample      { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; word-break: break-all; }
.lang-sample.rtl  { direction: rtl; text-align: right; }
.lang-actions     { display: flex; gap: 8px; }

.lang-copy {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.lang-copy:hover { border-color: var(--emerald); color: var(--emerald); }
.lang-detail     { font-size: 0.68rem; color: var(--text-muted); margin-top: 8px; }

/* =====================================================
   MISC SHARED COMPONENTS
   ===================================================== */

/* Highlight Box */
.highlight-box {
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: var(--radius-md);
}

/* Contact Box */
.contact-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

/* Info Card */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  height: fit-content;
}

.info-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.info-icon       { font-size: 2rem; margin-bottom: 12px; }

.info-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Code rows */
.code-rows { display: flex; flex-direction: column; gap: 8px; }

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.code-row:hover  { border-color: var(--accent); }
.cr-formula      { font-family: var(--font-mono); font-size: 1.05rem; color: var(--text-primary); }
.cr-name         { font-size: 0.75rem; color: var(--text-muted); }
.cr-letter       { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 2px; }

/* Char Reference */
.char-ref {
  max-width: 820px;
  margin: 0 auto 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.cr-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 16px; }

.cr-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.cr-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color var(--transition);
}

.cr-item:hover { border-color: var(--accent); }
.cr-char       { font-family: var(--font-mono); font-size: 1.4rem; color: var(--text-primary); }
.cr-info       { flex: 1; }
.cr-code       { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }

.cr-copy {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.cr-copy:hover { border-color: var(--accent); color: var(--accent); }

/* Examples */
.examples {
  max-width: 820px;
  margin: 0 auto 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.ex-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 16px; }
.ex-list  { display: flex; flex-direction: column; gap: 10px; }

.ex-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color var(--transition);
}

.ex-item:hover { border-color: var(--accent); }
.ex-text       { font-family: var(--font-mono); font-size: 1rem; color: var(--text-primary); }
.ex-desc       { font-size: 0.75rem; color: var(--text-muted); }

/* Code Example */
.code-example {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.ce-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 14px; }
.ce-rows  { display: flex; flex-direction: column; gap: 10px; }

.ce-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  gap: 12px;
  transition: border-color var(--transition);
}

.ce-row:hover { border-color: var(--accent); }
.ce-expr      { font-family: var(--font-mono); font-size: 1.05rem; color: var(--text-primary); }
.ce-desc      { font-size: 0.75rem; color: var(--text-muted); }

.ce-copy {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.ce-copy:hover { border-color: var(--accent); color: var(--accent); }

/* DYK Cards */
.dyk-card {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.dyk-label { font-size: 0.68rem; font-weight: 700; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.dyk-card p{ font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* Alpha Table */
.alpha-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  max-width: 860px;
  margin: 0 auto;
}

.alpha-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.alpha-cell:hover { border-color: var(--violet); background: var(--violet-soft); }
.alpha-std        { font-size: 0.7rem; color: var(--text-muted); }
.alpha-sc         { font-family: var(--font-mono); font-size: 1.1rem; color: var(--text-primary); }
.alpha-code       { font-family: var(--font-mono); font-size: 0.58rem; color: var(--accent); display: block; margin-top: 2px; }

/* Ordinal Grid */
.ordinal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  max-width: 860px;
  margin: 20px auto 0;
}

.ord-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.ord-btn:hover { border-color: var(--purple); background: var(--purple-soft); transform: translateY(-2px); }
.ord-char      { font-family: var(--font-mono); font-size: 1.2rem; color: var(--text-primary); display: block; margin-bottom: 4px; }
.ord-label     { font-size: 0.65rem; color: var(--text-muted); }

/* Tips Grid */
.tips-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.tip-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all var(--transition);
}

.tip-card:hover { border-color: var(--tiktok); transform: translateY(-2px); }
.tip-icon       { font-size: 1.6rem; margin-bottom: 10px; }
.tip-title      { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.tip-desc       { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6; }

/* Method Cards */
.method-list { display: flex; flex-direction: column; gap: 16px; max-width: 780px; margin: 0 auto; }

.method-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}

.method-card:hover { border-color: var(--cyan); }
.method-header     { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }

.method-num {
  width: 36px;
  height: 36px;
  background: var(--cyan-soft);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--cyan);
  flex-shrink: 0;
}

.method-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.method-tag   { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; }

.tag-fastest  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.tag-beginner { background: rgba(6,182,212,0.15);  color: var(--cyan); }
.tag-portable { background: rgba(124,106,247,0.15);color: var(--accent); }
.tag-mobile   { background: rgba(245,158,11,0.15); color: var(--warning); }
.tag-noformat { background: rgba(168,85,247,0.15); color: #a855f7; }

.kbd {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
}

/* Feature List */
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
}

.feature-list .fi {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: var(--accent-soft);
}

/* Inline List */
.inline-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

.inline-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.inline-list .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}

/* Content block */
.content-block p { margin-bottom: 14px; }
.content-block p:last-child { margin-bottom: 0; }

/* Article Body */
.article-body { max-width: 780px; margin: 0 auto; }
.article-body p { margin-bottom: 16px; }

/* Misc text colors */
.text-accent   { color: var(--accent); }
.text-violet   { color: var(--violet); }
.text-cyan     { color: var(--cyan); }
.text-green    { color: var(--green); }
.text-blue     { color: var(--blue); }
.text-amber    { color: var(--amber); }
.text-orange   { color: var(--orange); }
.text-purple   { color: var(--purple); }
.text-pink     { color: var(--pink); }
.text-teal     { color: var(--teal); }
.text-rose     { color: var(--rose); }
.text-emerald  { color: var(--emerald); }
.text-insta    { color: var(--insta); }
.text-tiktok   { color: var(--tiktok); }
.text-twitter  { color: var(--twitter); }
.text-discord  { color: var(--discord); }
.text-gaming   { color: var(--gaming); }

/* Status indicators */
.check { color: #22c55e; }
.cross { color: #ef4444; }

/* Last updated */
.last-updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }

/* UC link */
.uc-link { display: inline-block; margin-top: 12px; font-size: 0.8rem; font-weight: 600; }

/* Spoke badge inline */
.spoke-badge { letter-spacing: 0.06em; }

/* Cross Pillars section */
.cross-pillars { background: var(--bg-secondary); }

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-banner h2 { margin-bottom: 12px; }
.cta-banner p  { margin-bottom: 24px; font-size: 0.95rem; }

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.cta-tool {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
  display: block;
}

.cta-tool:hover      { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.cta-tool-icon       { font-size: 1.4rem; margin-bottom: 6px; }
.cta-tool-name       { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.cta-tool-desc       { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* PP Tabs (Platform Preview) */
.pp-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

.pp-tab {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.pp-tab:hover  { border-color: var(--accent); color: var(--text-primary); }
.pp-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Mockup wrappers */
.mockup-wrapper        { display: none; }
.mockup-wrapper.active { display: block; }

/* Mode Tabs */
.mode-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.mode-tab {
  padding: 9px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.mode-tab:hover  { border-color: var(--accent); color: var(--text-primary); }
.mode-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* QI Groups */
.qi-groups        { display: flex; flex-direction: column; gap: 10px; }
.qi-group         { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qi-group-label   { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; min-width: 60px; }
.qi-sub           { font-family: var(--font-mono); font-size: 1rem; color: var(--text-primary); line-height: 1; }
.qi-section       { margin-bottom: 14px; }
.qi-section:last-child { margin-bottom: 0; }
.qi-section-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; display: block; }
.qi-sup           { font-family: var(--font-mono); font-size: 1rem; color: var(--text-primary); line-height: 1; }

/* Qi tabs */
.qi-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.qi-tab {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.qi-tab:hover  { border-color: var(--accent); color: var(--text-primary); }
.qi-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Style Selector (alternate) */
.style-selector { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }

.style-btn {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  text-align: center;
}

.style-btn:hover  { border-color: var(--accent); color: var(--text-primary); }
.style-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.style-btn .preview { display: block; font-size: 1rem; margin-bottom: 3px; font-family: var(--font-mono); }
.style-btn .label   { display: block; font-size: 0.73rem; }

/* Use Case (spoke variant) */
.use-case-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

/* UC Card (spoke variant) */
.uc-title { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.uc-desc  { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.uc-example { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-primary); word-break: break-word; }

/* Info Box */
.info-box {
  max-width: 820px;
  margin: 0 auto 32px;
  background: var(--purple-soft);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.info-box-title { font-size: 0.82rem; font-weight: 700; color: var(--purple); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.info-box p     { font-size: 0.86rem; margin: 0; color: var(--text-secondary); line-height: 1.65; }

/* SR Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =====================================================
   RESPONSIVE — TABLET (max 900px)
   ===================================================== */
@media (max-width: 900px) {
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cp-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

/* =====================================================
   RESPONSIVE — MOBILE (max 768px)
   ===================================================== */
@media (max-width: 768px) {
  /* Nav */
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    gap: 4px;
    z-index: 99;
  }

  .nav-links.open a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    display: block;
    font-size: 0.9rem;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    padding: 36px 0 24px;
  }

  /* Tool Widget */
  .tool-widget {
    padding: 18px 16px;
  }

  /* IO Grid: single column */
  .io-grid {
    grid-template-columns: 1fr;
  }

  textarea {
    height: 110px;
  }

  /* Preview cards: 2 columns */
  .preview-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* What Is */
  .what-is-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .compat-list {
    grid-template-columns: 1fr;
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
  }

  /* Use Cases */
  .use-cases-grid,
  .uc-grid,
  .use-case-grid {
    grid-template-columns: 1fr;
  }

  /* Platform */
  .platform-grid {
    grid-template-columns: 1fr;
  }

  /* Compare */
  .compare-hero,
  .split-compare,
  .diff-grid {
    grid-template-columns: 1fr;
  }

  /* Related */
  .related-grid {
    grid-template-columns: 1fr;
  }

  /* Info Grid */
  .info-grid {
    grid-template-columns: 1fr;
  }

  /* Style Selector */
  .style-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  }

  .style-selector {
    justify-content: flex-start;
  }

  /* CP Grid */
  .cp-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Presets */
  .presets-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Letter keyboard */
  .lk-grid {
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
  }

  /* Limits */
  .limits-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* CTA */
  .cta-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Articles */
  .articles-grid {
    grid-template-columns: 1fr;
  }

  /* Tips */
  .tips-grid {
    grid-template-columns: 1fr;
  }

  /* Sym grid */
  .sym-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Cf grid */
  .cf-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  }

  /* Periodic */
  .pt-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }

  /* Mode tabs */
  .mode-tabs {
    flex-wrap: wrap;
  }

  /* FNK */
  .fnk-key {
    min-height: 60px;
    padding: 10px;
  }

  /* Error page */
  .error-code {
    font-size: 5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .button-group {
    flex-direction: column;
  }
}

/* =====================================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ===================================================== */
@media (max-width: 480px) {
  /* Container padding */
  .container {
    padding: 0 16px;
  }

  /* Tool widget */
  .tool-widget {
    padding: 14px 12px;
  }

  /* Style tabs: vertical */
  .style-tabs {
    flex-direction: column;
  }

  .style-tab {
    min-width: unset;
  }

  /* Preview cards: 1 column */
  .preview-cards {
    grid-template-columns: 1fr;
  }

  /* Style grid */
  .style-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Footer */
  .footer-grid,
  .presets-grid,
  .cta-grid,
  .limits-grid {
    grid-template-columns: 1fr;
  }

  /* AS Grid */
  .as-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Spoke grid */
  .spoke-grid {
    grid-template-columns: 1fr;
  }

  /* Sym grid */
  .sym-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Use cases */
  .use-cases-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  /* Button group */
  .btn {
    width: 100%;
    justify-content: center;
  }
}