:root {
  /* Premium Light Theme */
  --bg-color: #FAF9F6;
  --panel-bg: #FFFFFF;
  --text-color: #1A1915;
  --text-muted: #7E786C;
  --border-color: #E2DDD4;
  
  --primary-color: #1F6B72;
  --primary-hover: #164F54;
  --primary-pale: #E6F3F4;
  
  --accent-gold: #C8912F;
  --accent-gold-pale: #F7EDDA;
  --accent-gold-hover: #B07C24;
  
  --accent-rust: #B34830;
  --accent-rust-pale: #FDF0EC;
  
  --accent-green: #2D7A35;
  --accent-green-pale: #EDF7EE;
  --accent-green-border: #A8D5B0;
  
  --accent-blue: #1A5A9A;
  --accent-blue-pale: #E8F0FA;
  --accent-blue-border: #90BDE8;
  
  --accent-purple: #5A2A9A;
  --accent-purple-pale: #F0EBFC;
  --accent-purple-border: #B39DDB;
  
  --accent-orange: #B06018;
  --accent-orange-pale: #FDF3E8;
  --accent-orange-border: #FFB74D;
  
  --card-bg: #FFFFFF;
  --nav-bg: rgba(250, 249, 246, 0.9);
  --code-bg: #141310;
  --code-text: #E5DFD5;
  --code-inline-bg: #F2EDE3;
  --code-inline-text: #1A1915;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.05);
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Legacy Variable Mapping for compatibility */
  --border: var(--border-color);
  --cream: var(--code-inline-bg);
  --gold: var(--accent-gold);
  --gold-pale: var(--accent-gold-pale);
  --teal: var(--primary-color);
  --teel: var(--primary-color);
  --teal-pale: var(--primary-pale);
  --teel-pale: var(--primary-pale);
  --rust: var(--accent-rust);
  --rust-pale: var(--accent-rust-pale);
  --slate: var(--text-color);
  --muted: var(--text-muted);
  --white: var(--panel-bg);
  --paper: var(--bg-color);
  --ink: var(--text-color);
}

[data-theme="dark"] {
  /* Premium Dark Theme */
  --bg-color: #0E0D0B;
  --panel-bg: #151411;
  --text-color: #E6E4DF;
  --text-muted: #9E998E;
  --border-color: #2D2A24;
  
  --primary-color: #3DB0BB;
  --primary-hover: #52C4CF;
  --primary-pale: #142C2F;
  
  --accent-gold: #E2AB4C;
  --accent-gold-pale: #262118;
  --accent-gold-hover: #F0BD63;
  
  --accent-rust: #D8644B;
  --accent-rust-pale: #2E1915;
  
  --accent-green: #4CAF50;
  --accent-green-pale: #132415;
  --accent-green-border: #2E4C31;
  
  --accent-blue: #3A8EE6;
  --accent-blue-pale: #112033;
  --accent-blue-border: #1B3B5E;
  
  --accent-purple: #9E74E6;
  --accent-purple-pale: #211633;
  --accent-purple-border: #3A225E;
  
  --accent-orange: #E68A3A;
  --accent-orange-pale: #331D11;
  --accent-orange-border: #5E321B;
  
  --card-bg: #151411;
  --nav-bg: rgba(14, 13, 11, 0.9);
  --code-bg: #070605;
  --code-text: #ECEAE6;
  --code-inline-bg: #211F1B;
  --code-inline-text: #ECEAE6;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);

  /* Legacy Variable Mapping for compatibility */
  --border: var(--border-color);
  --cream: var(--code-inline-bg);
  --gold: var(--accent-gold);
  --gold-pale: var(--accent-gold-pale);
  --teal: var(--primary-color);
  --teel: var(--primary-color);
  --teal-pale: var(--primary-pale);
  --teel-pale: var(--primary-pale);
  --rust: var(--accent-rust);
  --rust-pale: var(--accent-rust-pale);
  --slate: var(--text-color);
  --muted: var(--text-muted);
  --white: var(--panel-bg);
  --paper: var(--bg-color);
  --ink: var(--text-color);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.8;
  font-size: 17px;
}

/* Responsive Tables & Code Blocks */
.tbl, .osi-table, .qa-body table, table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tbl th, .osi-table th, .qa-body th, th {
  text-align: left;
}
pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  word-wrap: normal;
}

/* Progress indicator */
#progress, #bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-gold) 50%, var(--accent-rust) 100%);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
  border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 60px;
  transition: var(--transition);
}
.nav-brand {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 19px;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}
.nav-brand:hover {
  color: var(--primary-color);
}
.nav-center {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: var(--font-mono);
}
.nav-btn {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  color: var(--text-color);
  font-family: var(--font-sans);
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-btn:hover {
  background: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
  transform: translateY(-1px);
}

/* Section strip sticky menu */
.sec-strip {
  position: sticky;
  top: 60px;
  z-index: 100;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 24px;
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  gap: 8px;
  align-items: center;
  scrollbar-width: none;
  transition: var(--transition);
}
.sec-strip::-webkit-scrollbar {
  display: none;
}
.ss-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 6px;
  flex-shrink: 0;
}
.ss-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.ss-btn:hover {
  background: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
  transform: scale(1.03);
}

/* TOC Drawer */
#overlay, #ov {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#drawer {
  position: fixed;
  right: -360px;
  top: 0;
  bottom: 0;
  width: 340px;
  background: var(--panel-bg);
  z-index: 400;
  padding: 28px 24px;
  overflow-y: auto;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  border-left: 1px solid var(--border-color);
}
#drawer.open {
  right: 0;
}
.drawer-close, .dr-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}
.drawer-close:hover, .dr-close:hover {
  color: var(--text-color);
  transform: rotate(90deg);
}
.drawer-head, .dr-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 12px 0 24px;
  color: var(--text-color);
}
.toc-group, .tg {
  margin-bottom: 24px;
}
.toc-group-label, .tg-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  display: block;
  font-family: var(--font-mono);
}
.toc-group a, .tg a {
  display: block;
  font-size: 14px;
  color: var(--text-color);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: var(--transition);
  margin-bottom: 2px;
}
.toc-group a:hover, .tg a:hover, .toc-group a.active, .tg a.active {
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  background: var(--primary-pale);
  padding-left: 16px;
}

/* Hero */
.hero {
  background: #0E0D0B;
  color: #FAF9F6;
  padding: 96px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 65% 55% at 20% 75%, rgba(200, 145, 47, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 80% 25%, rgba(61, 176, 187, 0.08) 0%, transparent 65%);
  pointer-events: none;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 145, 47, 0.15);
  border: 1px solid rgba(200, 145, 47, 0.3);
  color: var(--accent-gold);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-gold);
  background: linear-gradient(120deg, var(--accent-gold) 0%, #F5CE7F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 18px;
  color: rgba(250, 249, 246, 0.75);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  font-size: 13.5px;
  color: rgba(250, 249, 246, 0.48);
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Main */
.main {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

/* Quick nav pills */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 40px;
}
.pill {
  font-size: 12.5px;
  font-family: var(--font-mono);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.pill:hover {
  background: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Section headings */
.sec-head {
  margin: 80px 0 32px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border-color);
}
.sec-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 600;
}
.sec-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-color);
}

/* Prose and typography */
p {
  margin-bottom: 20px;
  color: var(--text-color);
  opacity: 0.92;
}
strong {
  color: var(--text-color);
  font-weight: 600;
}
ul, ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
li {
  margin-bottom: 6px;
}
.lead {
  font-size: 19.5px;
  line-height: 1.85;
  color: var(--text-color);
  font-weight: 400;
  opacity: 0.95;
  margin-bottom: 28px;
}

/* Callout Boxes */
.why, .info, .warn, .crit, .sample, .formula {
  border-radius: 8px;
  padding: 20px 24px;
  margin: 28px 0;
  border-left: 4px solid var(--border-color);
  background: var(--panel-bg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.why:hover, .info:hover, .warn:hover, .crit:hover, .sample:hover {
  transform: translateX(4px);
}

.why-label, .warn-label, .warn-l, .f-label, .sample-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

/* Why/Gold Box */
.why {
  border-left-color: var(--accent-gold);
  background: var(--accent-gold-pale);
}
.why-label {
  color: var(--accent-gold-hover);
}
.why p {
  color: var(--text-color);
}

/* Info/Teal Box */
.info {
  border-left-color: var(--primary-color);
  background: var(--primary-pale);
}
.info-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
.info p {
  color: var(--text-color);
}

/* Warn/Rust Box */
.warn {
  border-left-color: var(--accent-rust);
  background: var(--accent-rust-pale);
}
.warn-label, .warn-l {
  color: var(--accent-rust);
}
.warn p {
  color: var(--text-color);
}

/* Critical Box */
.crit {
  border-left-color: var(--accent-rust);
  background: var(--accent-rust-pale);
}
.crit-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-rust);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
.crit p {
  color: var(--text-color);
}

/* Sample Box */
.sample {
  border-left-color: var(--accent-green);
  background: var(--accent-green-pale);
}
.sample-label {
  color: var(--accent-green);
}
.sample p {
  font-style: italic;
  color: var(--text-color);
}

/* Formula Box */
.formula {
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
}
.f-label {
  color: var(--text-muted);
}
.f-body, .formula-body {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-color);
}

/* Framework Cards Grid */
.fw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.fw-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.fw-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}
.fw-letter {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 900;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 12px;
}
.fw-card h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}
.fw-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* Tables */
.tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14.5px;
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.tbl th {
  background: var(--text-color);
  color: var(--bg-color);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 500;
  text-transform: uppercase;
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
  line-height: 1.6;
  background: var(--panel-bg);
  color: var(--text-color);
}
.tbl tr:nth-child(even) td {
  background: var(--bg-color);
}
.tbl td strong {
  color: var(--text-color);
}

/* Code elements */
code {
  font-family: var(--font-mono);
  background: var(--code-inline-bg);
  color: var(--code-inline-text);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 20px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.8;
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
}
pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* Q&A Accordion Panel */
.qa-wrap {
  margin: 28px 0;
}
.qa-cat {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-color);
  padding: 18px 0 10px;
  border-top: 1px solid var(--border-color);
  margin-top: 32px;
  display: block;
  font-weight: 600;
}
.qa-item {
  border-bottom: 1px solid var(--border-color);
}
.qa-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  transition: var(--transition);
}
.qa-btn:hover {
  color: var(--primary-color);
}
.qa-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-gold);
  font-weight: 600;
  min-width: 32px;
  padding-top: 3px;
  flex-shrink: 0;
}
.qa-icon {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  padding-top: 6px;
}
.qa-btn.open .qa-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}
.qa-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 46px;
}
.qa-body.open {
  max-height: 4000px;
  padding-bottom: 24px;
}
.qa-body p, .qa-body li {
  font-size: 15.5px;
  color: var(--text-color);
  opacity: 0.9;
}
.qa-body ul {
  padding-left: 22px;
  margin: 12px 0;
}

/* Inline notes within Q&A */
.qa-body .tip, .qa-body .note, .qa-body .crit {
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 14.5px;
  border-radius: 0 6px 6px 0;
  box-shadow: none;
}
.qa-body .tip {
  background: var(--primary-pale);
  border-left: 3px solid var(--primary-color);
  color: var(--text-color);
}
.qa-body .note {
  background: var(--accent-gold-pale);
  border-left: 3px solid var(--accent-gold);
  color: var(--text-color);
}
.qa-body .crit {
  background: var(--accent-rust-pale);
  border-left: 3px solid var(--accent-rust);
  color: var(--text-color);
}

/* Expand control buttons */
.xp {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.xp-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  background: var(--panel-bg);
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}
.xp-btn:hover {
  background: var(--primary-pale);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

/* Complexity Badges */
.o1, .ologn, .on, .on2, .onlogn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  margin: 2px 0;
}
.o1 {
  background: var(--accent-green-pale);
  color: var(--accent-green);
  border-color: var(--accent-green-border);
}
.ologn {
  background: var(--accent-blue-pale);
  color: var(--accent-blue);
  border-color: var(--accent-blue-border);
}
.on {
  background: var(--accent-orange-pale);
  color: var(--accent-orange);
  border-color: var(--accent-orange-border);
}
.onlogn {
  background: var(--accent-purple-pale);
  color: var(--accent-purple);
  border-color: var(--accent-purple-border);
}
.on2 {
  background: var(--accent-rust-pale);
  color: var(--accent-rust);
  border-color: var(--border-color);
}

/* Tags */
.tag {
  display: inline-block;
  background: var(--code-inline-bg);
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  margin: 2px;
  transition: var(--transition);
}
.tag:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Self Assessment Slider Block */
.assess {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  margin: 40px 0;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.assess h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-color);
}
.assess-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.s-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.s-label {
  min-width: 180px;
  font-size: 14px;
  color: var(--text-color);
  font-weight: 500;
  flex-shrink: 0;
}
.s-slider, .s-range {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  cursor: pointer;
  transition: background 0.3s;
}
.s-slider::-webkit-slider-thumb, .s-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: transform 0.1s;
  box-shadow: var(--shadow-sm);
}
.s-slider::-webkit-slider-thumb:hover, .s-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--primary-hover);
}
.s-val {
  min-width: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
}
.s-total {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.s-score {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}
.s-of {
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.s-msg {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 260px;
  text-align: right;
  line-height: 1.5;
}

/* Next / Continue Section Bar */
.next-bar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  padding: 36px 32px;
  border-radius: 12px;
  margin: 56px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.next-bar h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin-bottom: 8px;
  color: #FFFFFF;
}
.next-bar p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}
.next-btn {
  background: #FFFFFF;
  color: var(--primary-color);
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-sans);
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  background: var(--primary-pale);
}

/* Checklist */
.ck {
  list-style: none;
  margin: 18px 0;
}
.ck li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 15.5px;
  cursor: pointer;
  transition: var(--transition);
}
.ck li::before {
  content: '☐';
  font-size: 19px;
  color: var(--accent-gold);
  flex-shrink: 0;
  line-height: 1;
}
.ck li.done::before {
  content: '☑';
  color: var(--primary-color);
}
.ck li.done span {
  text-decoration: line-through;
  color: var(--text-muted);
}
.ck-group {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin: 24px 0 8px;
  font-family: var(--font-mono);
}

/* Promotion section */
.promo-section {
  margin: 64px 0;
  padding: 40px 32px;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.promo-section h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  margin-bottom: 8px;
  color: var(--text-color);
}
.promo-subtitle {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.promo-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 24px;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}
.promo-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.promo-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
}
.promo-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.promo-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
}
.promo-title {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.promo-body {
  font-size: 14.5px;
  color: var(--text-color);
  opacity: 0.9;
  margin-bottom: 24px;
  line-height: 1.6;
}
.promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  width: 100%;
  text-align: center;
}
.promo-btn-linkedin {
  background: #0077B5;
  color: #FFFFFF;
}
.promo-btn-linkedin:hover {
  background: #005987;
  transform: translateY(-1px);
}
.promo-btn-substack {
  background: #FF6719;
  color: #FFFFFF;
}
.promo-btn-substack:hover {
  background: #E04E00;
  transform: translateY(-1px);
}

/* Dividers */
.div {
  text-align: center;
  margin: 56px 0;
  font-size: 24px;
  color: var(--border-color);
  letter-spacing: 16px;
}

/* Footer styling */
.footer {
  background: #0E0D0B;
  color: #FAF9F6;
  text-align: center;
  padding: 80px 24px 64px;
  border-top: 1px solid var(--border-color);
}
.footer h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  margin-bottom: 16px;
  color: #FAF9F6;
}
.footer p {
  color: rgba(250, 249, 246, 0.65);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-size: 15.5px;
}
.cta {
  display: inline-block;
  background: var(--accent-gold);
  color: #0E0D0B;
  padding: 14px 36px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  font-family: var(--font-sans);
  transition: var(--transition);
}
.cta:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 145, 47, 0.3);
}
.footer-small {
  font-size: 12.5px;
  color: rgba(250, 249, 246, 0.35);
  margin-top: 48px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.footer-links a {
  color: rgba(250, 249, 246, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--accent-gold);
  transform: translateY(-1px);
}

/* Blueprint section links styling */
.blueprint-link {
  font-size: 15px;
  padding: 14px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
  color: var(--text-color);
  transition: var(--transition);
  margin-bottom: 10px;
  font-weight: 500;
}
.blueprint-link:hover {
  background: var(--primary-pale);
  border-color: var(--primary-color);
  transform: translateX(4px);
}
.blueprint-link strong {
  color: var(--primary-color);
}

/* Series complete panel styling */
.series-complete {
  background: var(--panel-bg);
  color: var(--text-color);
  padding: 48px 36px;
  border-radius: 12px;
  margin: 52px 0;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}
.series-complete h2 {
  font-family: var(--font-serif);
  font-size: 34px;
  margin-bottom: 16px;
  color: var(--primary-color);
}
.series-complete p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 24px;
}
.phase-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* Animations */
@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Hub Dashboard Grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.hub-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transition: var(--transition);
}
.hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}
.hub-card:hover::before {
  height: 6px;
}
.hub-card-part1::before { background: var(--accent-gold); }
.hub-card-part1:hover { border-color: var(--accent-gold); }

.hub-card-p1::before { background: #1a6b72; } /* DSA Teal */
.hub-card-p1:hover { border-color: #1a6b72; }

.hub-card-p2::before { background: #5a2d8a; } /* SQL Purple */
.hub-card-p2:hover { border-color: #5a2d8a; }

.hub-card-p3::before { background: #c48a28; } /* OOPs Gold */
.hub-card-p3:hover { border-color: #c48a28; }

.hub-card-p4::before { background: #b44830; } /* DBMS Rust */
.hub-card-p4:hover { border-color: #b44830; }

.hub-card-p5::before { background: #1a5a9a; } /* OS Blue */
.hub-card-p5:hover { border-color: #1a5a9a; }

.hub-card-p6::before { background: #2d7a35; } /* Final Green */
.hub-card-p6:hover { border-color: #2d7a35; }

.hub-card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.hub-card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 12px;
  line-height: 1.25;
  color: var(--text-color);
}
.hub-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}
.hub-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-color);
}
.hub-card-part1 .hub-card-footer { color: var(--accent-gold); }
.hub-card-p1 .hub-card-footer { color: #1a6b72; }
.hub-card-p2 .hub-card-footer { color: #5a2d8a; }
.hub-card-p3 .hub-card-footer { color: #c48a28; }
.hub-card-p4 .hub-card-footer { color: #b44830; }
.hub-card-p5 .hub-card-footer { color: #1a5a9a; }
.hub-card-p6 .hub-card-footer { color: #2d7a35; }

/* Reviews Section */
.reviews-section {
  margin: 64px 0;
}
.reviews-section h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  margin-bottom: 8px;
  text-align: center;
  color: var(--text-color);
}
.reviews-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 40px;
}
.reviews-container {
  overflow: hidden;
  width: 100%;
  position: relative;
  padding: 10px 0;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.reviews-marquee {
  display: flex;
  width: max-content;
  animation: scrollMarquee 45s linear infinite;
}
.reviews-marquee:hover {
  animation-play-state: paused;
}
.review-card {
  flex-shrink: 0;
  width: 340px;
  margin: 0 12px;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}
.review-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}
@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.review-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-pale);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--border-color);
}
.review-meta {
  display: flex;
  flex-direction: column;
}
.review-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-color);
}
.review-role {
  font-size: 11.5px;
  color: var(--text-muted);
}
.founder-message-card {
  grid-column: 1 / -1;
  background: var(--panel-bg);
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.founder-message-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.founder-message-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-color);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .nav {
    padding: 0 16px;
  }
  .nav-center {
    display: none;
  }
  .sec-strip {
    top: 60px;
    padding: 8px 16px;
  }
  .main {
    padding: 24px 16px 64px;
  }
  #drawer {
    width: 100%;
    right: -100%;
  }
  .fw-grid {
    grid-template-columns: 1fr;
  }
  .s-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .s-label {
    min-width: unset;
  }
  .s-msg {
    text-align: left;
    max-width: unset;
    margin-top: 8px;
  }
  .qa-body {
    padding-left: 20px;
  }
  .why, .info, .warn, .crit, .sample, .formula {
    padding: 16px 18px;
    margin: 20px 0;
  }
}
