/* ============================================================
   CCNA Hub — Aurelien Gerault — MTU Cisco Networking Academy
   ============================================================ */

:root {
  --bg:        #0f0f10;
  --surface:   #1a1a1d;
  --surface-2: #222226;
  --border:    #2e2e35;
  --text:      #e8e8ed;
  --text-2:    #98989f;
  --text-3:    #636369;
  --blue:      #4da3ff;   --blue-dim:   #1a3a5c;
  --green:     #32d74b;   --green-dim:  #0d2e17;
  --yellow:    #ffd60a;   --yellow-dim: #2e2600;
  --red:       #ff453a;   --red-dim:    #2e0d0a;
  --orange:    #ff9f0a;   --orange-dim: #2e1e00;
  --purple:    #bf5af2;   --purple-dim: #200d2e;
  --teal:      #5ac8fa;   --teal-dim:   #0d2530;
  --pink:      #ff6fb0;   --pink-dim:   #2e0d1e;
  --gray-dim:  #1e1e22;
  --font-mono: "SF Mono", "JetBrains Mono", "Menlo", "Monaco", monospace;
  --nav-h:     52px;
  --radius:    10px;
  --code-text: #a5f3a5;
}

[data-theme="light"] {
  --bg:        #f5f5f7;
  --surface:   #ffffff;
  --surface-2: #f0f0f3;
  --border:    #d1d1d6;
  --text:      #1d1d1f;
  --text-2:    #6e6e73;
  --text-3:    #aeaeb2;
  --blue-dim:  #d6e8ff;
  --green-dim: #d4f5dc;
  --yellow-dim:#fff9cc;
  --red-dim:   #ffe5e3;
  --orange-dim:#fff0d6;
  --purple-dim:#f3e5ff;
  --teal-dim:  #d6f1ff;
  --pink-dim:  #ffe0ee;
  --gray-dim:  #e8e8ed;
  --code-text: #1a7a1a;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
  font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* === NAV === */
.topnav {
  position: sticky; top: 0; z-index: 100;
  min-height: var(--nav-h);
  background: rgba(15,15,16,.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; flex-wrap: wrap;
  padding: 8px 28px; gap: 4px;
}
[data-theme="light"] .topnav { background: rgba(245,245,247,.88); }

.nav-brand {
  font-size: 14px; font-weight: 700;
  color: var(--text); letter-spacing: -.01em;
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; flex-shrink: 0; margin-right: 8px;
}
.nav-brand:hover { text-decoration: none; color: var(--text); }

.nav-links { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }

.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500; color: var(--text-2);
  text-decoration: none;
  transition: background .12s, color .12s;
  white-space: nowrap; background: none; border: none; cursor: pointer;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--blue-dim); color: var(--blue); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nav-badge {
  font-size: 10px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-3); padding: 3px 8px; border-radius: 20px;
  font-family: var(--font-mono);
}

.theme-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); width: 30px; height: 30px; border-radius: 8px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.theme-btn:hover { background: var(--border); }

/* === MAIN / LAYOUT === */
.main { max-width: 1080px; margin: 0 auto; padding: 36px 28px 80px; }
.main.wide { max-width: 1280px; }
.container { max-width: 1080px; margin: 0 auto; padding: 32px 28px; }

/* === HERO === */
.hero { text-align: center; padding: 40px 0 32px; }
.hero-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
}
.hero h1 { font-size: 34px; font-weight: 700; margin: 0 0 8px; letter-spacing: -.02em; }
.hero-sub { color: var(--text-2); font-size: 14px; margin-bottom: 6px; }
.hero-period { color: var(--text-3); font-size: 12px; font-family: var(--font-mono); }
.hero p { color: var(--text-2); font-size: .95rem; line-height: 1.7; max-width: 520px; margin: 0 auto; }

/* === STAT ROW === */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 28px 0;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px; text-align: center;
}
.stat-num { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-num.blue   { color: var(--blue); }
.stat-num.green  { color: var(--green); }
.stat-num.yellow { color: var(--yellow); }
.stat-num.orange { color: var(--orange); }
.stat-num.purple { color: var(--purple); }
.stat-num.teal   { color: var(--teal); }
.stat-num.red    { color: var(--red); }
.stat-label { font-size: 11px; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }

/* === SECTION TITLE === */
.section-title {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); margin: 32px 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after { content:''; flex:1; height:1px; background:var(--border); }

/* === HUB / GRID CARDS === */
.hub-cards, .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.hub-card, .card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px;
  text-decoration: none; display: block; color: var(--text);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.hub-card:hover, a.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); text-decoration: none; }
.hub-card-blue, .card.blue     { border-top: 3px solid var(--blue); }
.hub-card-green, .card.green   { border-top: 3px solid var(--green); }
.hub-card-yellow, .card.yellow { border-top: 3px solid var(--yellow); }
.hub-card-purple, .card.purple { border-top: 3px solid var(--purple); }
.hub-card-orange, .card.orange { border-top: 3px solid var(--orange); }
.hub-card-teal, .card.teal     { border-top: 3px solid var(--teal); }
.hub-card-red, .card.red       { border-top: 3px solid var(--red); }
.hub-card-pink, .card.pink     { border-top: 3px solid var(--pink); }
.hub-card-icon, .card-icon { font-size: 24px; margin-bottom: 10px; }
.hub-card-title, .card h2 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.hub-card-desc, .card p { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-bottom: 10px; }
.hub-card-arrow, .card .open { font-size: 11px; color: var(--text-3); }

/* === PROGRESS BAR === */
.progress-wrap { margin: 8px 0 4px; }
.progress-bar {
  height: 6px; border-radius: 3px;
  background: var(--surface-2); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: var(--green); transition: width .4s ease;
}
.progress-label { font-size: 11px; color: var(--text-3); margin-top: 4px; font-family: var(--font-mono); }

/* === LIST ITEMS (videos / modules / labs) === */
.item-section { margin-bottom: 28px; }
.item-section-header {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; cursor: pointer;
}
.item-section-header:hover { background: var(--surface-2); }
.section-badge {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 12px; font-family: var(--font-mono);
}
.section-badge.s1 { background: var(--blue-dim); color: var(--blue); }
.section-badge.s2 { background: var(--green-dim); color: var(--green); }
.section-badge.s3 { background: var(--yellow-dim); color: var(--yellow); }
.section-badge.s4 { background: var(--orange-dim); color: var(--orange); }
.section-badge.s5 { background: var(--purple-dim); color: var(--purple); }
.section-badge.s6 { background: var(--red-dim); color: var(--red); }
.section-badge.s7 { background: var(--teal-dim); color: var(--teal); }
.section-badge.s8 { background: var(--gray-dim); color: var(--text-2); }
.section-badge.s9 { background: var(--blue-dim); color: var(--blue); }

.item-list, .video-list { border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.item-row, .video-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.item-row:last-child, .video-item:last-child { border-bottom: none; }
.item-row:hover, .video-item:hover { background: var(--surface-2); }
.item-row.done, .video-item.done { background: var(--green-dim); }
.item-row.done .item-title, .video-item.done .vid-title { color: var(--text-3); text-decoration: line-through; }

.check-box, .vid-check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid var(--border); background: transparent;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; font-size: 11px;
}
.check-box.checked, .vid-check.checked { background: var(--green); border-color: var(--green); color: #000; }
.check-box:hover, .vid-check:hover { border-color: var(--green); }

.item-num, .vid-day { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); flex-shrink: 0; width: 44px; }
.item-title, .vid-title { flex: 1; font-size: 13.5px; color: var(--text); }
.item-link, .vid-link {
  font-size: 11px; color: var(--text-3); flex-shrink: 0;
  padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border);
  transition: all .12s;
}
.item-link:hover, .vid-link:hover { background: var(--blue-dim); color: var(--blue); border-color: var(--blue); text-decoration: none; }

/* === TIMELINE (university steps / calendar) === */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; margin-bottom: 20px; }
.tl-dot {
  position: absolute; left: -24px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg);
  transition: all .2s;
}
.tl-item.done .tl-dot { background: var(--green); border-color: var(--green); }
.tl-item.current .tl-dot { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-dim); }
.tl-item.break .tl-dot { background: var(--gray-dim); border-color: var(--text-3); }
.tl-item.exam .tl-dot { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 4px var(--red-dim); }
.tl-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.tl-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.tl-meta { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); margin-top: 4px; }

/* === JOB CARDS === */
.job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.job-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.job-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.job-title { font-size: 15px; font-weight: 600; }
.job-level {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  padding: 3px 8px; border-radius: 10px; flex-shrink: 0;
}
.job-level.entry { background: var(--green-dim); color: var(--green); }
.job-level.mid   { background: var(--yellow-dim); color: var(--yellow); }
.job-level.senior{ background: var(--orange-dim); color: var(--orange); }
.job-team { font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.job-section-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 12px 0 6px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag {
  font-size: 11px; padding: 3px 8px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.tag.highlight { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }
.tag.warn { background: var(--orange-dim); border-color: var(--orange); color: var(--orange); }
.job-diff {
  font-size: 12.5px; color: var(--text-2); line-height: 1.6; padding: 10px 12px;
  background: var(--surface-2); border-radius: 8px; border-left: 3px solid var(--blue);
  margin-top: 8px;
}

/* === INTERVIEW / FAQ ACCORDION === */
.qa-list { display: flex; flex-direction: column; gap: 12px; }
.qa-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.qa-q {
  padding: 12px 16px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  transition: background .12s;
}
.qa-q:hover { background: var(--surface-2); }
.qa-q::after { content: '›'; font-size: 16px; color: var(--text-3); transform: rotate(90deg); transition: transform .2s; }
.qa-item.open .qa-q::after { transform: rotate(270deg); }
.qa-a {
  padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s;
  font-size: 13px; color: var(--text-2); line-height: 1.7;
}
.qa-item.open .qa-a { max-height: 2000px; padding: 12px 16px; border-top: 1px solid var(--border); }

/* === TABLES === */
.table, table.data-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}
.table-card { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table-card .table, .table-card table { border: none; border-radius: 0; }
.table th, .table td, table.data-table th, table.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px; text-align: left; vertical-align: middle;
}
.table th, table.data-table th {
  color: var(--purple); background: var(--purple-dim);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.table tr:last-child td { border-bottom: none; }

/* === CODE / COMMAND BLOCKS === */
pre, code {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--code-text); font-family: var(--font-mono);
}
pre {
  padding: 16px 18px; border-radius: var(--radius); overflow-x: auto;
  line-height: 1.65; font-size: 13px; white-space: pre-wrap; word-break: break-word;
}
code { padding: 2px 6px; border-radius: 5px; font-size: 12.5px; }
pre code { padding: 0; border: none; background: none; }

/* === NOTES / INFO BOXES === */
.note {
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--yellow-dim); border: 1px solid var(--yellow);
  color: var(--text); font-size: 13.5px; line-height: 1.6;
}
.info-box {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--blue); border-radius: var(--radius);
  padding: 14px 16px; font-size: 13px; color: var(--text-2); line-height: 1.65;
  margin: 16px 0;
}
.warn-box {
  background: var(--red-dim); border: 1px solid var(--red);
  border-radius: var(--radius); padding: 14px 16px; font-size: 13px; color: var(--text); line-height: 1.6;
}

/* === PILLS / BADGES === */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.pill.green  { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.pill.blue   { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }
.pill.yellow { background: var(--yellow-dim); border-color: var(--yellow); color: var(--yellow); }
.pill.orange { background: var(--orange-dim); border-color: var(--orange); color: var(--orange); }
.pill.red    { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.pill.gray   { background: var(--gray-dim); border-color: var(--border); color: var(--text-2); }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--border); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #3b8eea; }
.btn.danger { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.btn.small { padding: 5px 11px; font-size: 11px; }

.back-button {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px;
  padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-2); font-size: 13px; font-weight: 600;
  background: var(--surface); transition: color .15s, background .15s;
}
.back-button:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

/* === MATERIALS LIBRARY === */
.materials-cat { margin-bottom: 32px; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; transition: background .1s;
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--surface-2); }
.file-icon { font-size: 16px; flex-shrink: 0; }
.file-name { flex: 1; color: var(--text); }
.file-size { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.file-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }

/* === CALENDAR === */
.cal-phase { margin-bottom: 36px; }
.cal-week {
  display: grid; grid-template-columns: 110px 1fr 90px; gap: 12px;
  align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cal-week:last-child { border-bottom: none; }
.cal-week.break { color: var(--text-3); font-style: italic; }
.cal-week.exam { background: var(--red-dim); }
.cal-week-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.cal-week-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }

/* === MODULE PAGE === */
.module-nav { display: flex; justify-content: space-between; gap: 12px; margin: 32px 0; }
.module-section { margin-bottom: 26px; }
.module-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; letter-spacing: -.01em; }
.module-section p { color: var(--text-2); font-size: 13.5px; line-height: 1.75; margin-bottom: 10px; white-space: pre-line; }
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 10px; }
.term-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.term-card b { color: var(--blue); font-size: 12.5px; }
.term-card div { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }

/* === DIAGRAMS === */
.diagram-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0 28px; }
.diagram-grid.inline { grid-template-columns: repeat(auto-fit, minmax(280px, 440px)); justify-content: center; margin: 14px 0 6px; }
.diagram-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; cursor: zoom-in; transition: border-color .12s, transform .12s; }
.diagram-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.diagram-card svg { width: 100%; height: auto; display: block; pointer-events: none; }
.diagram-card .diagram-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-top: 12px; text-align: center; }

.lightbox-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.75);
  z-index: 1000; align-items: center; justify-content: center; padding: 32px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-content {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; max-width: 920px; width: 100%; max-height: 88vh; overflow: auto; position: relative;
}
.lightbox-content svg { width: 100%; height: auto; display: block; }
.lightbox-close {
  position: absolute; top: 10px; right: 14px; background: var(--surface-2); border: 1px solid var(--border);
  width: 32px; height: 32px; border-radius: 8px; font-size: 18px; color: var(--text-2); cursor: pointer; line-height: 1;
}
.lightbox-close:hover { background: var(--border); }

/* === QUIZ ENGINE === */
.quiz-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.quiz-q { font-size: 15.5px; font-weight: 600; margin-bottom: 18px; line-height: 1.5; }
.quiz-choice {
  display: block; width: 100%; text-align: left; padding: 12px 16px; margin-bottom: 8px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 13.5px; cursor: pointer; transition: all .12s;
}
.quiz-choice:hover { border-color: var(--blue); }
.quiz-choice.correct { background: var(--green-dim); border-color: var(--green); color: var(--green); }
.quiz-choice.incorrect { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.quiz-choice.disabled { pointer-events: none; opacity: .85; }
.quiz-explain { margin-top: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.quiz-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); font-family: var(--font-mono); margin-bottom: 14px; }

/* === STAT NUMBER (progress page legacy) === */
.stat-number {
  font-size: 48px; font-weight: 900; letter-spacing: -.04em; margin: 10px 0;
  background: linear-gradient(135deg, var(--text) 40%, var(--pink) 130%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-caption { color: var(--text-2); font-size: 13px; line-height: 1.5; margin-top: 12px; }
.action-card {
  padding: 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: border-color .2s, background .2s, transform .15s;
  text-align: left; width: 100%;
}
.action-card span { display: block; margin-top: 8px; color: var(--purple); font-size: 13px; font-weight: 500; }
.action-card:hover { transform: translateY(-2px); border-color: var(--text-3); background: var(--surface-2); }
.action-card.danger { border-color: var(--red); }
.action-card.danger span { color: var(--red); }

select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-size: 13px;
}
input[type="range"] { width: 70%; accent-color: var(--purple); }
input[type="date"], input[type="text"], input[type="password"] {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; font-size: 13px;
}
.confidence-value { margin-left: 10px; color: var(--purple); font-weight: 700; font-size: 13px; }

#syncBar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); padding: 10px 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 680px) { .two-col { grid-template-columns: 1fr; } }

footer {
  text-align: center; padding: 40px 20px;
  font-size: 11px; color: var(--text-3); border-top: 1px solid var(--border);
}

/* === NOTES FEATURE === */
.note-date { width: auto; min-width: 84px; white-space: nowrap; }
.note-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.note-editor-panel { max-width: 900px; width: 92vw; max-height: 88vh; padding-top: 52px; }
.note-editor-panel .lightbox-close { top: 14px; }
.editor-status { font-size: 12.5px; font-weight: 600; }
.editor-status.success { color: var(--green); }
.editor-status.error { color: var(--red); }
.note-title-input {
  width: 100%; font-size: 20px; font-weight: 700; background: transparent; color: var(--text);
  border: none; border-bottom: 1px solid var(--border); padding: 8px 0; margin-bottom: 16px;
}
.note-title-input:focus { outline: none; border-bottom-color: var(--blue); }
.note-link-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.note-link-pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; min-height: 0; }
.note-link-pill .pill-remove {
  background: none; border: none; color: inherit; cursor: pointer; font-size: 13px; line-height: 1;
  padding: 0 0 0 2px; opacity: .7;
}
.note-link-pill .pill-remove:hover { opacity: 1; }

#editor-container { margin: 8px 0 4px; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--border) !important; }
.ql-toolbar.ql-snow { background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.ql-container.ql-snow { background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); min-height: 260px; font-size: 14px; }
.ql-editor { color: var(--text); min-height: 260px; }
.ql-editor.ql-blank::before { color: var(--text-3); }
.ql-snow .ql-stroke { stroke: var(--text-2); }
.ql-snow .ql-fill { fill: var(--text-2); }
.ql-snow .ql-picker { color: var(--text-2); }
.ql-snow .ql-picker-options { background: var(--surface); border-color: var(--border) !important; }
.ql-snow .ql-tooltip { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.ql-snow .ql-tooltip input[type=text] { background: var(--surface-2); color: var(--text); border-color: var(--border); }

.ql-editor-preview { padding: 8px 2px; }
.ql-editor-preview h1, .ql-editor-preview h2, .ql-editor-preview h3 { margin: 16px 0 8px; }
.ql-editor-preview p { margin: 0 0 10px; line-height: 1.7; }
.ql-editor-preview ul, .ql-editor-preview ol { margin: 0 0 10px 22px; }
.ql-editor-preview blockquote { border-left: 3px solid var(--border); padding-left: 12px; color: var(--text-2); margin: 0 0 10px; }
.ql-editor-preview img { max-width: 100%; border-radius: var(--radius); }

.ql-editor pre.ql-syntax, .ql-editor-preview pre.ql-syntax {
  background: #0d1117; color: var(--code-text); font-family: var(--font-mono);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 13px;
  white-space: pre-wrap; word-break: break-word;
}

.export-dropdown { position: relative; display: inline-block; }
.export-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 10;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 160px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.export-menu.open { display: block; }
.export-menu a { display: block; padding: 9px 14px; font-size: 13px; color: var(--text); }
.export-menu a:hover { background: var(--surface-2); text-decoration: none; }

.suggestions-panel, #suggestions-panel:not(:empty) {
  margin-top: 16px; display: flex; flex-direction: column; gap: 10px;
}
.suggestion-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px;
}
.suggestion-text { font-size: 13px; color: var(--text); line-height: 1.5; }
.suggestion-text s { color: var(--text-3); }
.suggestion-caption { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.suggestion-actions { display: flex; gap: 6px; flex-shrink: 0; }

.note-print-view { display: none; }
@media print {
  #nav-root, footer, .note-toolbar-row, .note-link-picker, .note-link-pill-row, #suggestions-panel { display: none !important; }
  .note-print-view { display: block; max-width: 720px; margin: 0 auto; }
}

#note-overlay.fullpage {
  position: static; inset: auto; background: none; padding: 0; display: block; z-index: auto;
}
#note-overlay.fullpage .note-editor-panel {
  max-width: 1100px; width: 100%; margin: 0 auto; max-height: none; height: auto;
  border-radius: 0; border: none; box-shadow: none; padding: 32px 0;
}
body.note-fullpage .main { max-width: 1160px; }
body.note-fullpage #fullpage-btn { display: none; }

/* === BOOK READER === */
.book-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.book-toolbar select {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 10px; border-radius: 8px; font-size: 12.5px; max-width: 220px;
}
.book-theme-swatches { display: flex; gap: 6px; }
.theme-swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
  cursor: pointer; padding: 0;
}
.theme-swatch.active { border-color: var(--blue); }
.swatch-light { background: #ffffff; }
.swatch-sepia { background: #f4ecd8; }
.swatch-dark { background: #1a1a1d; }
#book-status { margin-left: auto; color: var(--text-3); font-size: 12px; }

.book-layout { display: flex; gap: 20px; align-items: flex-start; }
.book-viewer-wrap {
  position: relative; flex: 1; min-width: 0;
  display: flex; align-items: stretch; gap: 6px;
}
.book-viewer {
  flex: 1; min-width: 0; height: calc(100vh - 300px); min-height: 480px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.book-arrow {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  border-radius: 8px; width: 34px; cursor: pointer; font-size: 18px;
  flex-shrink: 0;
}
.book-arrow:hover { background: var(--border); color: var(--text); }

.book-sidebar {
  width: 280px; flex-shrink: 0; max-height: calc(100vh - 300px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px;
}
.book-sidebar.hidden { display: none; }
.book-sidebar h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin: 0 0 8px; }
.book-sidebar h3 + .book-anno-list { margin-bottom: 18px; }
.book-anno-empty { color: var(--text-3); font-size: 12.5px; }
.book-anno-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 8px;
  cursor: pointer; margin-bottom: 4px;
}
.book-anno-item:hover { background: var(--surface-2); }
.book-anno-swatch { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.book-anno-body { flex: 1; min-width: 0; }
.book-anno-text { font-size: 12.5px; color: var(--text); line-height: 1.5; }
.book-anno-note { font-size: 11.5px; color: var(--text-2); margin-top: 4px; font-style: italic; }
.book-anno-del {
  background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 14px;
  flex-shrink: 0; line-height: 1;
}
.book-anno-del:hover { color: var(--red); }

.selection-popup {
  display: none; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 300; width: min(420px, 90vw);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  flex-direction: column; gap: 10px;
}
.selection-popup.open { display: flex; }
.selection-quote {
  font-size: 12.5px; color: var(--text-2); font-style: italic;
  max-height: 60px; overflow-y: auto;
}
.selection-colors { display: flex; gap: 8px; }
.selection-colors button {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
}
.selection-colors button.active { border-color: var(--text); }
.selection-popup textarea {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px; font-size: 12.5px; font-family: inherit; resize: vertical;
}
.selection-actions { display: flex; gap: 8px; justify-content: flex-end; }

@media (max-width: 900px) {
  .book-layout { flex-direction: column; }
  .book-sidebar { width: 100%; max-height: 300px; }
}

/* === RESPONSIVE === */
@media (max-width: 760px) {
  .topnav { padding: 10px 16px; }
  .main, .container { padding: 20px 16px 60px; }
  .hero { padding: 32px 0 24px; }
  .cal-week { grid-template-columns: 1fr; gap: 4px; }
  .stat-number { font-size: 36px; }
}
