/* Aptivra – Style System */
:root {
  --bg: #f8f9fc; --bg2: #ffffff; --bg3: #eef1f6;
  --text: #1a1a2e; --text2: #4a4a6a; --text3: #7a7a9a;
  --primary: #4f46e5; --primary-light: #818cf8; --primary-dark: #3730a3;
  --accent: #06b6d4; --accent2: #f59e0b;
  --success: #10b981; --danger: #ef4444; --warning: #f59e0b;
  --border: #e2e8f0; --shadow: 0 2px 8px rgba(0,0,0,.08);
  --radius: 10px; --radius-sm: 6px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --header-h: 60px;
  --transition: .2s ease;
}
[data-theme="dark"] {
  --bg: #0f0f1a; --bg2: #1a1a2e; --bg3: #25254a;
  --text: #e8e8f0; --text2: #b0b0cc; --text3: #7878a0;
  --border: #2a2a4a; --shadow: 0 2px 8px rgba(0,0,0,.3);
  --primary: #818cf8; --primary-light: #a5b4fc; --primary-dark: #6366f1;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; transition: background var(--transition), color var(--transition); }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
h1,h2,h3,h4 { line-height: 1.3; color: var(--text); }
h1 { font-size: 1.8rem; margin-bottom: .5rem; }
h2 { font-size: 1.4rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 1rem 0 .5rem; }
ul,ol { padding-left: 1.5rem; }
/* Skip link */
.skip-link { position: absolute; top: -100px; left: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 9999; border-radius: 0 0 var(--radius-sm) 0; }
.skip-link:focus { top: 0; }
/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg2); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); height: var(--header-h); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; height: 100%; gap: 1rem; }
.logo { display: flex; align-items: center; font-weight: 700; font-size: 1.3rem; color: var(--primary); text-decoration: none; }
.logo-mark { background: var(--primary); color: #fff; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); margin-right: .4rem; font-size: 1.1rem; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }
.nav-list { display: flex; list-style: none; gap: .25rem; }
.nav-list a { padding: .4rem .7rem; border-radius: var(--radius-sm); color: var(--text2); font-size: .9rem; transition: background var(--transition); }
.nav-list a:hover, .nav-list a.active { background: var(--bg3); color: var(--primary); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; gap: .5rem; }
.header-actions button { width: 2rem; height: 2rem; display: grid; place-items: center; background: var(--bg); color: var(--text); border: 1px solid var(--border); font-size: 1rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; border-radius: var(--radius-sm); }
.header-actions button:hover { background: var(--bg3); border-color: var(--primary-light); color: var(--primary); }
/* Container / Pages */
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }
.page { display: none; scroll-margin-top: calc(var(--header-h) + 1rem); animation: fadeIn .25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.subtitle { color: var(--text2); font-size: 1.1rem; margin-bottom: 1rem; }
/* Disclaimers / evidence */
.disclaimer { background: var(--bg3); border-left: 4px solid var(--warning); padding: 1rem; border-radius: var(--radius-sm); margin: 1rem 0; font-size: .9rem; color: var(--text2); }
.scam-warning { background: color-mix(in srgb, var(--danger) 8%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); padding: .85rem 1rem; border-radius: var(--radius-sm); margin: 1rem 0; color: var(--text2); font-size: .9rem; }
.entity-note { background: color-mix(in srgb, var(--accent) 8%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); padding: .85rem 1rem; border-radius: var(--radius-sm); margin: 1rem 0; color: var(--text2); }
.track-picker { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(190px, .7fr); gap: .8rem 1.25rem; align-items: end; margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg2); box-shadow: var(--shadow); }
.track-picker h2 { margin: 0 0 .25rem; }
.track-picker p { color: var(--text2); }
.track-picker label { display: flex; flex-direction: column; gap: .3rem; font-size: .84rem; font-weight: 600; }
.track-picker select { padding: .55rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
.track-guidance { grid-column: 1 / -1; padding: .75rem; border-left: 3px solid var(--primary); background: var(--bg3); border-radius: var(--radius-sm); color: var(--text2); }
.evidence { display: inline-flex; align-items: center; width: fit-content; padding: .12rem .45rem; margin-right: .25rem; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.evidence.official { color: #047857; background: #d1fae5; }
.evidence.observed { color: #92400e; background: #fef3c7; }
.evidence.role { color: #3730a3; background: #e0e7ff; }
[data-theme="dark"] .evidence.official { color: #6ee7b7; background: #064e3b; }
[data-theme="dark"] .evidence.observed { color: #fcd34d; background: #78350f; }
[data-theme="dark"] .evidence.role { color: #c7d2fe; background: #312e81; }
.source-list li { margin-bottom: .55rem; }
/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; text-align: center; box-shadow: var(--shadow); }
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .8rem; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
/* Buttons */
.btn { display: inline-block; padding: .6rem 1.2rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.btn:disabled { cursor: not-allowed; opacity: .5; }
.btn-primary { background: var(--primary); color: #fff; } .btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); } .btn-secondary:hover { background: var(--border); text-decoration: none; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }
.btn-danger { background: var(--danger); color: #fff; }
.quick-links { display: flex; flex-wrap: wrap; gap: .75rem; }
/* Roadmap */
.roadmap-timeline { position: relative; padding-left: 2.5rem; margin: 1.5rem 0; }
.roadmap-step { position: relative; padding: 1rem 0 1.5rem; border-left: 2px solid var(--border); padding-left: 1.5rem; }
.roadmap-step:last-child { border-left-color: transparent; }
.step-num { position: absolute; left: -1rem; top: 1rem; width: 2rem; height: 2rem; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.role-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.pattern-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.pattern-card h3 { margin-top: .65rem; }
.pattern-card p { color: var(--text2); font-size: .9rem; margin-top: .5rem; }
/* Practice */
.practice-controls { background: var(--bg2); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 1rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .5rem; }
.filter-row label { font-size: .85rem; color: var(--text2); display: flex; align-items: center; gap: .3rem; }
.filter-row select, .filter-row input[type="search"] { padding: .35rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-size: .85rem; }
.filter-row input[type="search"] { min-width: 180px; }
.q-count { font-size: .8rem; color: var(--text3); margin-left: auto; }
/* Question cards */
.questions-list { display: flex; flex-direction: column; gap: .75rem; }
.q-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); transition: border-color var(--transition); }
.q-card:hover { border-color: var(--primary-light); }
.q-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.q-cat { font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; background: var(--bg3); padding: .15rem .5rem; border-radius: 3px; color: var(--text3); }
.q-diff { font-size: .7rem; font-weight: 600; }
.q-diff.easy { color: var(--success); } .q-diff.medium { color: var(--warning); } .q-diff.hard { color: var(--danger); }
.q-text { font-size: .95rem; margin-bottom: .75rem; }
.q-options { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.q-options li { width: 100%; }
.q-option { width: 100%; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem; text-align: left; color: var(--text); background: var(--bg2); transition: all var(--transition); }
.q-option:disabled { cursor: default; opacity: 1; }
.q-option:not(:disabled):hover { border-color: var(--primary-light); background: var(--bg3); }
.q-option.selected { border-color: var(--primary); background: rgba(79,70,229,.08); }
.q-option.correct { border-color: var(--success); background: rgba(16,185,129,.1); }
.q-option.wrong { border-color: var(--danger); background: rgba(239,68,68,.08); }
.q-explanation { margin-top: .75rem; padding: .75rem; background: var(--bg3); border-radius: var(--radius-sm); font-size: .85rem; color: var(--text2); display: none; }
.q-explanation.show { display: block; }
.q-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.q-actions button { background: none; border: none; cursor: pointer; font-size: .85rem; color: var(--text3); padding: .2rem .4rem; border-radius: 3px; }
.q-actions button:hover { background: var(--bg3); color: var(--primary); }
.q-actions button.bookmarked { color: var(--accent2); }
.confidence-label { margin-left: auto; color: var(--text3); font-size: .78rem; }
.q-actions .confidence-btn { letter-spacing: 1px; color: var(--text3); }
.q-actions .confidence-btn.active { background: var(--bg3); color: var(--primary); font-weight: 700; }
/* Mock test */
.mock-config { background: var(--bg2); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.mock-options { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.mock-options label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.mock-options select, .mock-options input { padding: .4rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
.mock-header { display: flex; justify-content: space-between; align-items: center; padding: .75rem; background: var(--bg2); border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 1rem; position: sticky; top: var(--header-h); z-index: 10; }
.timer { font-weight: 700; font-size: 1.2rem; color: var(--danger); font-family: var(--mono); }
.mock-question { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; min-height: 200px; }
.mock-nav { display: flex; justify-content: center; gap: 1rem; margin: 1rem 0; }
.mock-palette { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 1rem; }
.mock-palette button { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; font-size: .75rem; font-weight: 600; }
.mock-palette button.answered { background: var(--success); color: #fff; border-color: var(--success); }
.mock-palette button.flagged { background: var(--warning); color: #fff; border-color: var(--warning); }
.mock-palette button.current { outline: 2px solid var(--primary); }
.mock-score { background: var(--bg2); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); text-align: center; margin-bottom: 1rem; }
.mock-score .score-big { font-size: 3rem; font-weight: 700; color: var(--primary); }
/* Flashcard */
.flash-controls { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.flashcard-container { display: flex; flex-direction: column; align-items: center; }
.flashcard { width: 100%; max-width: 500px; min-height: 250px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .3s; perspective: 1000px; font-size: 1.05rem; }
.flashcard:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.flashcard.flipped .flash-front { display: none; }
.flashcard.flipped .flash-back { display: block; }
.flash-back { display: none; color: var(--success); font-weight: 500; }
.flash-nav { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
/* Tools tabs */
.tools-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; border-bottom: 2px solid var(--border); padding-bottom: .5rem; }
.tab-btn { background: none; border: none; padding: .5rem .8rem; cursor: pointer; font-size: .85rem; color: var(--text2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: all var(--transition); }
.tab-btn:hover { background: var(--bg3); }
.tab-btn.active { color: var(--primary); border-bottom: 2px solid var(--primary); font-weight: 600; }
.tab-content { display: none; } .tab-content.active { display: block; }
/* STAR form */
.star-form label { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .75rem; font-size: .85rem; font-weight: 500; }
.star-form input, .star-form textarea { padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-family: var(--font); resize: vertical; }
.star-actions { display: flex; gap: .75rem; }
.star-list { display: flex; flex-direction: column; gap: .5rem; }
.star-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem; }
.star-item h4 { margin-bottom: .3rem; }
/* Case frameworks */
.framework-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin: 1rem 0; }
.fw-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
/* Code editor */
.code-editor { width: 100%; padding: .75rem; font-family: var(--mono); font-size: .85rem; background: var(--bg2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); resize: vertical; }
.code-output { background: #1a1a2e; color: #a5f3fc; padding: .75rem; border-radius: var(--radius-sm); font-family: var(--mono); font-size: .8rem; min-height: 60px; max-height: 200px; overflow: auto; margin-top: .5rem; white-space: pre-wrap; }
#sql-challenge { display: block; width: min(100%, 420px); margin: .35rem 0 .75rem; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg2); color: var(--text); }
.practice-prompt { padding: .75rem; border-left: 3px solid var(--accent); background: var(--bg3); border-radius: var(--radius-sm); }
#sql-reveal { margin-top: .5rem; }
/* Study plan */
.plan-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.plan-btn { padding: .5rem 1rem; border: 1px solid var(--border); background: var(--bg2); border-radius: var(--radius-sm); cursor: pointer; font-size: .85rem; color: var(--text2); }
.plan-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.plan-content { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.plan-day { margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.plan-day:last-child { border-bottom: none; }
.plan-day h4 { color: var(--primary); margin-bottom: .3rem; }
/* Analytics */
.analytics-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: .75rem; }
.analytics-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem; }
.analytics-card.weak-area { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 7%, var(--bg2)); }
.analytics-card .bar { height: 6px; background: var(--bg3); border-radius: 3px; margin-top: .3rem; }
.analytics-card .bar-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }
.mock-history { display: flex; flex-wrap: wrap; gap: .75rem; }
.mock-history-item { min-width: 150px; display: flex; align-items: baseline; gap: .55rem; padding: .65rem .8rem; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mock-history-item strong { color: var(--primary); font-size: 1.25rem; }
.mock-history-item span, .mock-history p { color: var(--text2); font-size: .82rem; }
/* Checklist */
.checklist li { margin-bottom: .4rem; }
/* Shortcuts dialog */
dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; background: var(--bg2); color: var(--text); max-width: 400px; }
dialog::backdrop { background: rgba(0,0,0,.5); }
.shortcuts-table { width: 100%; margin: 1rem 0; }
.shortcuts-table td { padding: .3rem .5rem; }
kbd { background: var(--bg3); padding: .1rem .4rem; border-radius: 3px; font-family: var(--mono); font-size: .8rem; border: 1px solid var(--border); }
/* Footer */
.site-footer { text-align: center; padding: 1.5rem 1rem; font-size: .8rem; color: var(--text3); border-top: 1px solid var(--border); margin-top: 2rem; }
/* Print */
@media print { .no-print, .site-header, .site-footer, .nav-toggle, .header-actions { display: none !important; } .page { display: none !important; } #tools, #tab-cheatsheet { display: block !important; } body { background: #fff; color: #000; } .tools-tabs, #tools > h1, #tab-star, #tab-case, #tab-code, #tab-sql, #tab-resume, #tab-gd { display: none !important; } .print-friendly { break-inside: avoid; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
/* Mobile */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-list { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg2); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav-list.open { display: flex; }
  .nav-list a { padding: .6rem 1rem; }
  h1 { font-size: 1.4rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .mock-options { flex-direction: column; }
  .tools-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-row input[type="search"] { min-width: auto; }
  .track-picker { grid-template-columns: 1fr; }
  .track-guidance { grid-column: 1; }
}
