/* ===================================================================
   AI SEMINARS — Swiss Typography + Paula Scher Energy
   Default: LIGHT theme. Toggle via [data-theme="dark"]
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* === DESIGN TOKENS === */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --primary: #4338ca;
  --primary-light: #6366f1;
  --accent: #e11d48;
  --success: #059669;
  --warning: #d97706;
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-hover: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-strong: #d1d5db;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 12px;
  --code-bg: #f1f5f9;
}

[data-theme="dark"] {
  --primary: #818cf8;
  --primary-light: #a5b4fc;
  --accent: #fb7185;
  --success: #34d399;
  --warning: #fbbf24;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #334155;
  --border-strong: #475569;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --code-bg: #1e293b;
}

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

/* === BASE TYPOGRAPHY (Swiss Grid + Paula Scher boldness) === */
html { font-size: 17px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text-primary); line-height: 1.65; -webkit-font-smoothing: antialiased; transition: background 0.3s, color 0.3s; }

h1 { font-size: 2.2rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1.15; }
h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
h4 { font-size: 1.05rem; font-weight: 700; }

a { color: var(--primary); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; text-decoration: underline; }

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem 2rem; min-height: 100vh; display: flex; flex-direction: column; }

/* === HEADER === */
header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 3px solid var(--text-primary); margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 44px; height: 44px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1rem; border-radius: 8px; }
.logo-text h1 { font-size: 1.3rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; }
.logo-text span { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); }

/* === HEADER CONTROLS === */
.header-controls { display: flex; align-items: center; gap: 8px; }
.theme-toggle { background: none; border: 2px solid var(--border-strong); border-radius: 8px; cursor: pointer; font-size: 1.2rem; padding: 6px 10px; transition: all 0.2s; color: var(--text-primary); }
.theme-toggle:hover { background: var(--bg-hover); }

/* === NAV TABS === */
.nav-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.nav-tab { background: transparent; border: none; padding: 8px 10px; cursor: pointer; font-family: var(--font); font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 3px solid transparent; transition: all 0.2s; }
.nav-tab:first-child { padding-left: 0; }
.nav-tab:last-child { padding-right: 0; }
.nav-tab:hover { color: var(--text-primary); }
.nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* === TAB CONTENT === */
.tab-content { display: none; animation: fadeIn 0.25s ease; }
.tab-content.active { display: block; }
.tab-header { margin-bottom: 1.5rem; }
.tab-header h2 { margin-bottom: 0.4rem; }
.tab-header p { color: var(--text-secondary); font-size: 0.95rem; max-width: 800px; }

/* === TIMELINE === */
.tl-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; transition: box-shadow 0.2s; overflow: hidden; }
.tl-item:hover { box-shadow: var(--shadow-sm); }
.tl-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.tl-time { font-size: 0.85rem; font-weight: 800; color: var(--primary); min-width: 80px; font-variant-numeric: tabular-nums; }
.tl-title { flex: 1; font-weight: 700; font-size: 1.05rem; }
.tl-badge { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; padding: 3px 10px; border-radius: 20px; color: #fff; }
.tl-chevron { font-size: 0.7rem; color: var(--text-muted); transition: transform 0.3s; }
.tl-item.open .tl-chevron { transform: rotate(180deg); }
.tl-body { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.3s; padding: 0 20px; }
.tl-item.open .tl-body { max-height: 5000px; padding: 0 20px 20px; }
.tl-body p { margin-bottom: 0.5rem; font-size: 0.95rem; color: var(--text-secondary); }
.tl-body h4 { margin: 1rem 0 0.5rem; font-size: 1rem; }

/* === SEMINAR TABLES (full-width) === */
.sem-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
.sem-table th { background: var(--bg-hover); color: var(--text-primary); padding: 10px 14px; text-align: left; font-weight: 700; border-bottom: 2px solid var(--border-strong); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.sem-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-color); color: var(--text-secondary); vertical-align: top; }
.sem-table tr:hover td { background: var(--bg-hover); }
.sem-table a { color: var(--primary); font-weight: 600; }

/* === SUB-TIMELINE (inside expandable items) === */
.sub-timeline { display: flex; flex-direction: column; gap: 12px; margin-top: 0.75rem; }
.sub-item { background: var(--bg-hover); border: 1px solid var(--border-color); border-radius: 10px; padding: 16px 20px; }
.sub-item.track-a { border-left: 4px solid var(--success); }
.sub-item.track-b { border-left: 4px solid var(--primary); }
.sub-item.track-c { border-left: 4px solid var(--warning); }
.sub-time { font-size: 0.72rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; }
.sub-item strong { display: block; margin: 4px 0 8px; font-size: 1rem; }
.sub-item p { font-size: 0.92rem; margin-bottom: 6px; }
.sub-item ol, .sub-item ul { padding-left: 22px; margin: 8px 0; }
.sub-item li { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 5px; }
.sub-item a { color: var(--primary); font-weight: 600; }

/* === GENERAL LISTS IN CONTENT === */
.method-body ul, .method-body ol,
.uni-content ul, .uni-content ol,
.tl-body ul, .tl-body ol {
  padding-left: 24px;
  margin: 10px 0;
}
.method-body li, .uni-content li, .tl-body li {
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* === NESTED DETAILS (deeper expandables) === */
details.nested { margin: 10px 0; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
details.nested summary { padding: 10px 16px; cursor: pointer; font-weight: 700; font-size: 0.9rem; color: var(--primary); list-style: none; display: flex; align-items: center; gap: 8px; }
details.nested summary::before { content: '▸'; transition: transform 0.2s; display: inline-block; }
details.nested[open] summary::before { transform: rotate(90deg); }
details.nested .nested-body { padding: 0 16px 14px; font-size: 0.9rem; color: var(--text-secondary); }

/* === BLOCKQUOTES === */
blockquote { border-left: 4px solid var(--primary); background: var(--bg-hover); padding: 12px 20px; margin: 12px 0; border-radius: 0 8px 8px 0; font-style: italic; font-size: 0.95rem; color: var(--text-primary); }

/* === SVG DIAGRAMS — FULL WIDTH === */
.diagram { margin: 16px 0; width: 100%; }
.svg-diagram { width: 100%; height: auto; background: var(--bg-hover); border-radius: var(--radius); padding: 16px; border: 1px solid var(--border-color); }
.svg-label { fill: var(--text-primary); }
.svg-muted { fill: var(--text-muted); }

/* === PARADIGM CARDS === */
.paradigm-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 1.5rem; }
.p-card { background: var(--bg-card); border: 2px solid var(--border-color); border-radius: var(--radius); padding: 16px; cursor: pointer; transition: all 0.2s; }
.p-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.p-card.active { border-color: var(--primary); background: var(--bg-hover); }
.p-num { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; color: var(--primary); }
.p-title { font-size: 0.95rem; font-weight: 800; margin: 4px 0; }
.p-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* === PARADIGM DETAILS — NO HEIGHT LIMIT === */
.paradigm-detail { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 24px; }
.paradigm-schema { margin: 1rem 0; width: 100%; }
.detail-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); align-items: start; }
.detail-label { font-weight: 700; font-size: 0.9rem; color: var(--text-muted); }
.detail-value { font-size: 0.95rem; }
.accent-color { color: var(--primary); }
.warn-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 12px 16px; color: #991b1b; font-size: 0.9rem; margin: 12px 0; }
[data-theme="dark"] .warn-box { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #fca5a5; }

/* === PROMPT BOX === */
.prompt-box { background: var(--code-bg); border: 1px solid var(--border-color); border-radius: var(--radius); margin: 12px 0; overflow: hidden; }
[data-theme="dark"] .prompt-box { background: #0f172a; }
.prompt-hdr { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: var(--bg-hover); border-bottom: 1px solid var(--border-color); }
.prompt-hdr span { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }
.btn-copy { background: var(--primary); color: #fff; border: none; padding: 5px 14px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; cursor: pointer; font-family: var(--font); transition: opacity 0.2s; }
.btn-copy:hover { opacity: 0.85; }
.prompt-body { padding: 14px 18px; font-size: 0.88rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; font-family: var(--font); color: var(--text-secondary); }

/* === TOOL CARDS === */
.tool-filter { display: flex; gap: 6px; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-btn { background: var(--bg-card); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; cursor: pointer; font-family: var(--font); color: var(--text-secondary); transition: all 0.2s; }
.filter-btn:hover { border-color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tool-grid { display: flex; flex-direction: column; gap: 8px; }
.tool-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: box-shadow 0.2s; }
.tool-card:hover { box-shadow: var(--shadow-sm); }
.tool-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.tool-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.tool-info { flex: 1; }
.tool-info strong { font-size: 1rem; }
.tool-company { font-size: 0.8rem; color: var(--text-muted); margin-left: 6px; }
.tool-badges { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tbadge { font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.tbadge.green { background: rgba(5,150,105,0.12); color: var(--success); }
.tbadge.red { background: rgba(225,29,72,0.1); color: var(--accent); }
.tbadge.yellow { background: rgba(217,119,6,0.1); color: var(--warning); }
.tbadge.blue { background: rgba(99,102,241,0.1); color: var(--primary); }
.tool-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s; padding: 0 20px; }
.tool-card.open .tool-body { max-height: 2000px; padding: 0 20px 20px; }
.tool-strength { font-weight: 600; color: var(--primary); margin-bottom: 8px; font-size: 0.95rem; }
.tool-body h4 { margin: 12px 0 6px; font-size: 0.95rem; color: var(--text-primary); }
.tool-body ol, .tool-body ul { padding-left: 22px; margin: 8px 0; }
.tool-body li { font-size: 0.9rem; margin-bottom: 4px; color: var(--text-secondary); }
.tool-link { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 0.9rem; color: var(--primary); }

.tool-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  background: var(--bg-hover);
  padding: 12px 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
}
.tool-specs div {
  color: var(--text-secondary);
}
.tool-specs strong {
  color: var(--text-primary);
}
.tool-features {
  margin: 12px 0;
}
.tool-features ul {
  list-style-type: square;
  padding-left: 22px;
}

.tbadge.gray { background: rgba(100,116,139,0.1); color: var(--text-muted); }
.tbadge.purple { background: rgba(168,85,247,0.1); color: #a855f7; }
[data-theme="dark"] .tbadge.purple { color: #c084fc; }

/* === TRACKS === */
.track-selector { display: flex; gap: 8px; margin-bottom: 1.5rem; }
.track-btn { flex: 1; background: var(--bg-card); border: 2px solid var(--border-color); border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: center; font-family: var(--font); transition: all 0.2s; }
.track-btn:hover { border-color: var(--primary-light); }
.track-btn.active { border-color: var(--primary); background: var(--bg-hover); }
.track-btn strong { display: block; font-size: 1rem; }
.track-btn span { font-size: 0.8rem; color: var(--text-muted); }
.track-detail { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 24px; }
.track-detail h3 { margin-bottom: 8px; }
.track-meta { font-size: 0.9rem; margin-bottom: 12px; }
.task-block { margin-top: 16px; }
.task-block h4 { margin-bottom: 8px; }

/* === METHODS === */
.methods-grid { display: flex; flex-direction: column; gap: 10px; }
.method-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; }
.method-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; transition: background 0.2s; }
.method-head:hover { background: var(--bg-hover); }
.method-icon { font-size: 1.4rem; }
.method-head h3 { flex: 1; font-size: 1.05rem; }
.method-sub { font-size: 0.8rem; color: var(--text-muted); }
.method-body { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.3s; padding: 0 20px; }
.method-card.open .method-body { max-height: 8000px; padding: 0 20px 20px; }
.method-summary { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 12px; }
.key-facts h4, .techniques h4, .checklist-box h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 16px 0 8px; }
.key-facts ul { padding-left: 20px; }
.key-facts li { font-size: 0.9rem; margin-bottom: 4px; color: var(--text-secondary); }
.technique { margin-bottom: 16px; }
.technique h5 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.technique p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 8px; }
.checklist li { font-size: 0.9rem; list-style: '✓  '; color: var(--text-secondary); margin-bottom: 4px; }

/* === AXES === */
.axis-row { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 10px; }
.axis-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.axis-name { font-weight: 800; font-size: 1rem; }
.axis-stage { font-size: 0.88rem; color: var(--primary); font-weight: 600; }
.axis-slider { width: 100%; height: 6px; -webkit-appearance: none; background: var(--border-color); border-radius: 3px; outline: none; margin: 8px 0; }
.axis-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: var(--primary); border-radius: 50%; cursor: pointer; }
.slider-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.axis-warn { font-size: 0.82rem; color: var(--warning); margin-top: 6px; font-style: italic; }

/* === RESOURCES === */
.res-section { margin-bottom: 2rem; }
.res-section h3 { margin-bottom: 1rem; font-size: 1.15rem; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.res-card { display: flex; flex-direction: column; gap: 4px; background: var(--bg-card); border: 1px solid var(--border-color); padding: 16px; border-radius: var(--radius); transition: box-shadow 0.2s; text-decoration: none; color: var(--text-primary); }
.res-card:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.res-card strong { font-size: 1rem; }
.res-card span { font-size: 0.85rem; color: var(--text-secondary); }
.res-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 8px; }
.res-item strong { font-size: 0.95rem; }
.res-item p { font-size: 0.88rem; margin: 6px 0; color: var(--text-secondary); }

/* === VIZ CARDS === */
.viz-card { min-height: 200px; }
.viz-card:hover { border-left-color: var(--accent) !important; }

/* === FAQ === */
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); cursor: pointer; overflow: hidden; transition: box-shadow 0.2s; }
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; gap: 12px; }
.faq-q span:first-child { font-weight: 700; font-size: 0.98rem; }
.faq-item .tl-chevron { transition: transform 0.3s; }
.faq-item.open .tl-chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s; padding: 0 20px; }
.faq-item.open .faq-a { max-height: 500px; padding: 0 20px 16px; }
.faq-a p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }

/* === METHODS ILLUSTRATION === */
.methods-illustration { width: 100%; max-width: 600px; margin: 0 auto 1.5rem; display: block; border-radius: var(--radius); }


/* === UNIVERSITY PRACTICES (sub-tabs) === */
.uni-tabs { display: flex; gap: 4px; margin-bottom: 1rem; border-bottom: 2px solid var(--border-color); }
.uni-tab { background: none; border: none; padding: 10px 16px; cursor: pointer; font-family: var(--font); font-size: 0.85rem; font-weight: 700; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.uni-tab:hover { color: var(--text-primary); }
.uni-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.uni-content { display: none; }
.uni-content.active { display: block; }

/* === LINKS === */
.sem-links { font-size: 0.88rem; margin-top: 8px; }
.sem-links a { font-weight: 600; margin-right: 6px; }
.tool-link-inline a { font-weight: 700; }

/* === TOAST === */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--success); color: #fff; padding: 10px 24px; border-radius: 8px; font-weight: 700; font-size: 0.9rem; opacity: 0; transition: all 0.3s; z-index: 999; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === HERO BANNER === */
.hero-banner {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 3 / 1;
  max-height: 280px;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(67,56,202,0.85) 0%, rgba(99,102,241,0.7) 50%, rgba(139,92,246,0.6) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}
.hero-title {
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* === STATS BAR === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 8px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
}

/* === GLOSSARY === */
.glossary-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.glossary-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.glossary-search:focus {
  border-color: var(--primary);
}
.glossary-search::placeholder {
  color: var(--text-muted);
}
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
.gloss-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 4px solid var(--primary);
  transition: box-shadow 0.2s, transform 0.15s;
}
.gloss-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.gloss-term {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.gloss-aka {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}
.gloss-def {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.gloss-cat {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.glossary-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* === PROMPTING TAB === */
.prom-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem; }
.prom-separator { color: var(--text-muted); font-weight: 300; margin: 0 4px; }
.prompting-grid { display: flex; flex-direction: column; gap: 10px; }
.prom-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: box-shadow 0.2s; }
.prom-card:hover { box-shadow: var(--shadow-sm); }
.prom-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.prom-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.prom-info { flex: 1; }
.prom-info strong { font-size: 1rem; display: block; }
.prom-sub { font-size: 0.8rem; color: var(--text-muted); }
.prom-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.prom-body { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.3s; padding: 0 20px; }
.prom-card.open .prom-body { max-height: 5000px; padding: 0 20px 20px; }
.prom-card.open .tl-chevron { transform: rotate(180deg); }
.prom-summary { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.prom-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.prom-col { border-radius: 10px; overflow: hidden; }
.prom-col-label { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 14px; }
.prom-bad { border: 2px solid #fecaca; }
.prom-bad .prom-col-label { background: #fef2f2; color: #991b1b; }
[data-theme="dark"] .prom-bad { border-color: rgba(239,68,68,0.3); }
[data-theme="dark"] .prom-bad .prom-col-label { background: rgba(239,68,68,0.1); color: #fca5a5; }
.prom-good { border: 2px solid #bbf7d0; }
.prom-good .prom-col-label { background: #f0fdf4; color: #166534; }
[data-theme="dark"] .prom-good { border-color: rgba(16,185,129,0.3); }
[data-theme="dark"] .prom-good .prom-col-label { background: rgba(16,185,129,0.1); color: #6ee7b7; }
.prom-good .prompt-box { margin: 0; border: none; border-radius: 0; }
.prom-example { padding: 14px 18px; font-size: 0.88rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; font-family: var(--font); color: var(--text-muted); background: var(--bg-hover); text-decoration: line-through; text-decoration-color: rgba(239,68,68,0.4); }
.prom-footer { border-top: 1px solid var(--border-color); padding-top: 12px; }
.prom-why { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 6px; line-height: 1.5; }
.prom-source { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

/* === PROMPT CONSTRUCTOR === */
.constructor-box { background: var(--bg-card); border: 2px solid var(--primary); border-radius: var(--radius); padding: 24px; margin-top: 2rem; }
.constructor-box h3 { font-size: 1.2rem; margin-bottom: 4px; }
.constructor-desc { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 16px; }
.constructor-blocks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.constructor-block { display: flex; align-items: center; gap: 8px; background: var(--bg-hover); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px 16px; cursor: pointer; transition: all 0.2s; user-select: none; }
.constructor-block:hover { border-color: var(--primary); }
.constructor-block input[type=checkbox] { accent-color: var(--primary); width: 18px; height: 18px; cursor: pointer; }
.cb-label { font-weight: 700; font-size: 0.9rem; }
.cb-req { font-size: 0.65rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.08em; }
.constructor-block.required { border-color: var(--primary); background: rgba(99,102,241,0.05); }
.constructor-output { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-color); }
.constructor-output .prompt-body { min-height: 120px; }

@media (max-width: 768px) {
  .prom-comparison { grid-template-columns: 1fr; }
  .prom-head { flex-wrap: wrap; }
  .prom-badges { width: 100%; margin-top: 4px; }
  .constructor-blocks { flex-direction: column; }
}

/* === SCROLL TO TOP === */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 998;
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.scroll-top:hover {
  transform: scale(1.1);
}

/* === FOOTER === */
footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 3px solid var(--primary);
}
.footer-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-col strong {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.footer-col span {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-col a {
  color: var(--primary);
  font-weight: 600;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-made {
  font-style: italic;
}

/* === ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .paradigm-cards { grid-template-columns: repeat(3, 1fr); }
  .detail-row { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  html { font-size: 15px; }
  header { flex-direction: column; align-items: stretch; }
  .nav-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0; }
  .nav-tab { padding: 8px 10px; font-size: 0.72rem; }
  .paradigm-cards { grid-template-columns: 1fr 1fr; }
  .track-selector { flex-direction: column; }
  .res-grid { grid-template-columns: 1fr; }
  .tl-head { flex-wrap: wrap; gap: 6px; }
  .tl-time { min-width: auto; }
  .uni-tabs { overflow-x: auto; }
  .hero-title { font-size: 1.3rem; }
  .hero-sub { font-size: 0.75rem; }
  .hero-banner { aspect-ratio: 2 / 1; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .glossary-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 1rem; }
  .footer-bottom { flex-direction: column; gap: 4px; }
  .scroll-top { bottom: 20px; right: 16px; width: 38px; height: 38px; font-size: 1rem; }
}
