:root {
  --bg: #0a0e1a;
  --bg2: #0f1424;
  --bg3: #141929;
  --bg4: #1a2035;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #e8eaf0;
  --text2: #8892a4;
  --text3: #5a6478;
  --accent: #4f8ef7;
  --accent2: #7c5cfc;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --teal: #2dd4bf;
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
  --serif: 'Fraunces', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,142,247,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.shell { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.header { margin-bottom: 2.5rem; }
.header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.header h1 { font-family: var(--serif); font-weight: 300; font-size: 2rem; color: var(--text); letter-spacing: -0.02em; line-height: 1.2; }
.header h1 span { color: var(--accent); }
.header-sub { font-size: 13px; color: var(--text3); font-family: var(--mono); margin-top: 4px; }
.header-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.save-status { font-family: var(--mono); font-size: 11px; color: var(--green); display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2); border-radius: 6px; white-space: nowrap; }
.save-status.syncing { color: var(--amber); background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.2); }
.save-status.error { color: var(--red); background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.2); }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.reseed-btn { font-family: var(--mono); font-size: 11px; padding: 6px 12px; border: 1px solid var(--border2); border-radius: 6px; background: transparent; color: var(--text2); cursor: pointer; transition: all 0.15s; }
.reseed-btn:hover { border-color: var(--accent); color: var(--accent); }
.user-email { font-family: var(--mono); font-size: 11px; color: var(--text3); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 2rem; }
.metric { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; position: relative; overflow: hidden; }
.metric::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: 0.6; }
.metric-label { font-size: 11px; color: var(--text3); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.metric-val { font-size: 26px; font-weight: 500; font-family: var(--serif); color: var(--text); }
.metric-sub { font-size: 11px; color: var(--text3); margin-top: 3px; }

.tabs { display: flex; gap: 4px; margin-bottom: 1.75rem; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 4px; width: fit-content; flex-wrap: wrap; }
.tab { padding: 7px 16px; font-size: 13px; font-weight: 400; border-radius: 7px; cursor: pointer; color: var(--text2); transition: all 0.15s; white-space: nowrap; }
.tab:hover { color: var(--text); background: var(--bg4); }
.tab.active { background: var(--bg4); color: var(--text); border: 1px solid var(--border2); font-weight: 500; }

.search-row { display: flex; gap: 10px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.search-row input, .search-row select {
  background: var(--bg3); border: 1px solid var(--border2); border-radius: 8px;
  color: var(--text); font-family: var(--sans); font-size: 13px; padding: 8px 12px;
  outline: none; transition: border-color 0.15s;
}
.search-row input { flex: 1; min-width: 200px; }
.search-row input:focus, .search-row select:focus { border-color: var(--accent); }
.search-row select option { background: var(--bg3); }

.phase-section { margin-bottom: 2rem; }
.phase-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.phase-badge { font-family: var(--mono); font-size: 11px; padding: 3px 10px; border-radius: 999px; }
.phase-sub { font-size: 12px; color: var(--text3); }
.phase-divider { flex: 1; height: 1px; background: var(--border); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.book-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.2rem; transition: border-color 0.15s, transform 0.1s;
  display: flex; flex-direction: column;
}
.book-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.book-card.done { opacity: 0.55; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.card-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.45; flex: 1; }
.book-status {
  font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border2);
  background: var(--bg4); color: var(--text); font-family: var(--mono);
  cursor: pointer; outline: none; flex-shrink: 0;
}
.book-status.notstarted { color: var(--text3); }
.book-status.inprogress { color: var(--amber); border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.08); }
.book-status.complete { color: var(--green); border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.08); }
.book-status.paused { color: var(--text2); }

.card-author { font-size: 12px; color: var(--text3); margin-bottom: 8px; font-family: var(--mono); }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 500; font-family: var(--mono); }
.tag-crit { background: rgba(248,113,113,0.15); color: #fca5a5; border: 1px solid rgba(248,113,113,0.25); }
.tag-high { background: rgba(251,191,36,0.12); color: #fcd34d; border: 1px solid rgba(251,191,36,0.2); }
.tag-med { background: rgba(52,211,153,0.1); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.18); }
.tag-domain { background: var(--bg4); color: var(--text2); border: 1px solid var(--border); }
.tag-free { background: rgba(79,142,247,0.12); color: #93c5fd; border: 1px solid rgba(79,142,247,0.2); }
.card-why { font-size: 12px; color: var(--text2); line-height: 1.55; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.card-weeks { font-size: 11px; color: var(--text3); font-family: var(--mono); }
.card-where { font-size: 11px; color: var(--text3); text-align: right; }
.card-affiliate { display: flex; align-items: center; gap: 10px; }
/* Pill toggle styled to match the buy-link pill: muted outline when off,
   green fill with a check when owned. */
.owned-toggle { font-size: 11px; font-family: var(--mono); color: var(--text3); display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--border2); border-radius: 999px; background: transparent; cursor: pointer; user-select: none; white-space: nowrap; transition: all 0.15s; }
.owned-toggle::before { content: "○"; font-size: 10px; line-height: 1; }
.owned-toggle:hover { border-color: var(--green); color: var(--text2); }
.owned-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.owned-toggle:has(input:checked) { color: var(--green); border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.1); }
.owned-toggle:has(input:checked)::before { content: "✓"; }
.buy-link { font-size: 11px; font-family: var(--mono); color: var(--amber); text-decoration: none; padding: 3px 10px; border: 1px solid rgba(251,191,36,0.3); border-radius: 999px; background: rgba(251,191,36,0.08); white-space: nowrap; transition: all 0.15s; }
.buy-link:hover { border-color: var(--amber); background: rgba(251,191,36,0.16); }
.affiliate-disclosure { margin-top: 28px; padding: 16px 0 8px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text3); font-family: var(--mono); text-align: center; line-height: 1.6; }

.book-prog { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.book-prog-row { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.book-prog-row:hover .book-prog-label { color: var(--text); }
.book-prog-label { font-size: 11px; color: var(--text3); font-family: var(--mono); white-space: nowrap; transition: color 0.15s; }
.book-prog-bar { flex: 1; height: 4px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.book-prog-bar-inner { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.4s; border-radius: 999px; }
.book-prog-pct { font-size: 11px; color: var(--text2); font-family: var(--mono); min-width: 32px; text-align: right; }
.book-prog-toggle { font-size: 11px; color: var(--text3); transition: transform 0.2s; display: inline-block; }
.book-prog-toggle.open { transform: rotate(90deg); color: var(--text2); }

.chapter-list { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); display: none; }
.chapter-list.open { display: block; }
.chapter-item { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 11px; color: var(--text2); cursor: pointer; line-height: 1.4; transition: color 0.12s; }
.chapter-item:hover { color: var(--text); }
.chapter-item.read { color: var(--text3); text-decoration: line-through; }
.chapter-checkbox {
  width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px;
  border: 1.5px solid var(--border2); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; background: transparent;
}
.chapter-checkbox.checked { background: var(--green); border-color: var(--green); }
.chapter-checkbox.checked::after { content: '✓'; color: #0a0e1a; font-size: 10px; font-weight: bold; }
.chapter-loading { font-size: 11px; color: var(--text3); padding: 4px 0; font-family: var(--mono); }

.domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.domain-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem; }
.domain-name { font-size: 13px; font-weight: 500; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.domain-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.prog-wrap { background: var(--bg); border-radius: 999px; height: 4px; margin-bottom: 8px; overflow: hidden; }
.prog-inner { height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.4s; }
.prog-label { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-bottom: 10px; }
.book-row { font-size: 12px; color: var(--text2); padding: 4px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.book-row.done-row { color: var(--text3); text-decoration: line-through; }
.book-row:last-child { border-bottom: none; }

.filter-row { display: flex; gap: 6px; margin-bottom: 1.25rem; flex-wrap: wrap; }
.level-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.level-label { font-size: 11px; font-family: var(--mono); color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 4px; }
.level-caption { font-size: 11px; font-family: var(--mono); color: var(--text3); margin-bottom: 1rem; line-height: 1.5; }
.filter-btn {
  font-size: 12px; padding: 5px 13px; border: 1px solid var(--border2); border-radius: 999px;
  cursor: pointer; background: transparent; color: var(--text2); font-family: var(--sans); transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.co-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem; transition: border-color 0.15s; }
.co-card:hover { border-color: var(--border2); }
.co-name { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.co-role { font-size: 12px; color: var(--text2); margin-bottom: 2px; }
.co-comp { font-size: 12px; font-family: var(--mono); color: var(--green); margin-bottom: 7px; }
.co-comp-lvl { color: var(--text3); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; margin-left: 4px; }
.flat-app-comp { font-size: 11px; font-family: var(--mono); color: var(--green); white-space: nowrap; }
.co-stack { font-size: 11px; color: var(--text3); line-height: 1.55; margin-bottom: 9px; }
.co-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.badge { font-size: 10px; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); }
.badge-remote { background: rgba(52,211,153,0.12); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.2); }
.badge-hybrid { background: rgba(79,142,247,0.12); color: #93c5fd; border: 1px solid rgba(79,142,247,0.2); }
.badge-onsite { background: rgba(251,191,36,0.12); color: #fcd34d; border: 1px solid rgba(251,191,36,0.2); }
.badge-la { background: rgba(124,92,252,0.12); color: #c4b5fd; border: 1px solid rgba(124,92,252,0.2); }
.badge-high { background: rgba(248,113,113,0.1); color: #fca5a5; border: 1px solid rgba(248,113,113,0.2); }

/* View toggle */
.view-toggle { display: inline-flex; gap: 2px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 3px; margin-bottom: 1rem; }
.view-toggle-btn { padding: 6px 14px; font-size: 12px; color: var(--text2); cursor: pointer; border-radius: 6px; transition: all 0.15s; font-family: var(--sans); }
.view-toggle-btn:hover { color: var(--text); }
.view-toggle-btn.active { background: var(--bg4); color: var(--text); }

/* Applications section inside company card */
.apps-section { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.apps-header { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; padding: 4px 0; }
.apps-header:hover .apps-count { color: var(--text); }
.apps-toggle { font-size: 11px; color: var(--text3); transition: transform 0.2s; display: inline-block; }
.apps-toggle.open { transform: rotate(90deg); color: var(--text2); }
.apps-count { font-size: 12px; color: var(--text2); font-family: var(--mono); transition: color 0.15s; }
.apps-active-pill { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(52,211,153,0.15); color: #6ee7b7; font-family: var(--mono); margin-left: auto; }

.apps-list { display: none; margin-top: 8px; }
.apps-list.open { display: block; }

/* Individual application row */
.app-row {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px; transition: border-color 0.15s;
}
.app-row:hover { border-color: var(--border2); }
.app-row.terminal { opacity: 0.7; }
.app-row-top { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.app-role {
  flex: 1; background: transparent; border: none; border-bottom: 1px solid transparent;
  color: var(--text); font-family: var(--sans); font-size: 13px; font-weight: 500;
  padding: 4px 2px; outline: none; min-width: 0;
}
.app-role:hover { border-bottom-color: var(--border2); }
.app-role:focus { border-bottom-color: var(--accent); }
.app-status-select {
  font-size: 11px; background: var(--bg4); border: 1px solid var(--border2); border-radius: 5px;
  color: var(--text); font-family: var(--mono); padding: 3px 6px; outline: none; cursor: pointer;
}
.app-status-select.st-offer { color: #6ee7b7; border-color: rgba(52,211,153,0.4); }
.app-status-select.st-onsite,
.app-status-select.st-systemdesign,
.app-status-select.st-technicalscreen { color: #fcd34d; border-color: rgba(251,191,36,0.3); }
.app-status-select.st-rejected,
.app-status-select.st-withdrawn { color: #fca5a5; border-color: rgba(248,113,113,0.3); }
.app-delete {
  width: 22px; height: 22px; flex-shrink: 0; border: 1px solid var(--border2);
  border-radius: 5px; background: transparent; color: var(--text3); cursor: pointer;
  font-size: 14px; padding: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.app-delete:hover { border-color: var(--red); color: var(--red); }

.app-row-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.app-meta-input {
  background: transparent; border: 1px solid var(--border); border-radius: 5px;
  color: var(--text2); font-family: var(--sans); font-size: 11px; padding: 5px 7px;
  outline: none; transition: all 0.15s; width: 100%;
}
.app-meta-input:hover { border-color: var(--border2); }
.app-meta-input:focus { border-color: var(--accent); color: var(--text); }
.app-meta-input::placeholder { color: var(--text3); }
.app-meta-input[type="date"] { color: var(--text3); font-family: var(--mono); }
.app-meta-input[type="date"]:focus { color: var(--text); }
.app-url-input { margin-bottom: 6px; font-family: var(--mono); font-size: 10px; }
.app-notes {
  width: 100%; background: transparent; border: 1px solid var(--border); border-radius: 5px;
  color: var(--text2); font-family: var(--sans); font-size: 11px; padding: 6px 8px;
  outline: none; resize: vertical; min-height: 36px; margin-top: 6px;
  transition: border-color 0.15s; line-height: 1.5;
}
.app-notes:hover { border-color: var(--border2); }
.app-notes:focus { border-color: var(--accent); }
.app-notes::placeholder { color: var(--text3); }

.app-outcome {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
}
.app-outcome-notes { margin-top: 6px; }

/* Add application button + form */
.add-app-btn {
  width: 100%; padding: 7px; border: 1px dashed var(--border2); border-radius: 6px;
  background: transparent; color: var(--text3); font-family: var(--sans); font-size: 12px;
  cursor: pointer; transition: all 0.15s; margin-top: 4px;
}
.add-app-btn:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }
.add-app-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; border-style: solid; flex: 1; }
.add-app-btn.primary:hover { opacity: 0.9; color: #fff; }
.new-app-form {
  background: var(--bg); border: 1px solid var(--border2); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px;
}
.new-app-form .app-meta-input { margin-bottom: 8px; font-size: 12px; padding: 7px 9px; }
.new-app-buttons { display: flex; gap: 6px; }
.new-app-buttons .add-app-btn { margin-top: 0; }

/* Flat application list view */
.status-section { margin-bottom: 1.5rem; }
.status-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.status-pill {
  font-size: 11px; padding: 3px 10px; border-radius: 999px; font-family: var(--mono);
  font-weight: 500;
}
.status-pill.st-offer { background: rgba(52,211,153,0.15); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.3); }
.status-pill.st-onsite,
.status-pill.st-systemdesign,
.status-pill.st-technicalscreen,
.status-pill.st-hiringmanager,
.status-pill.st-phonescreen { background: rgba(251,191,36,0.12); color: #fcd34d; border: 1px solid rgba(251,191,36,0.3); }
.status-pill.st-applied { background: rgba(79,142,247,0.12); color: #93c5fd; border: 1px solid rgba(79,142,247,0.3); }
.status-pill.st-research { background: var(--bg4); color: var(--text2); border: 1px solid var(--border); }
.status-pill.st-rejected,
.status-pill.st-withdrawn { background: rgba(248,113,113,0.1); color: #fca5a5; border: 1px solid rgba(248,113,113,0.3); }
.status-count { font-size: 11px; color: var(--text3); font-family: var(--mono); }
.status-divider { flex: 1; height: 1px; background: var(--border); }

.flat-app-list { display: flex; flex-direction: column; gap: 4px; }
.flat-app-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; cursor: pointer; transition: all 0.15s;
}
.flat-app-row:hover { border-color: var(--accent); transform: translateX(2px); }
.flat-app-main { flex: 1; min-width: 0; }
.flat-app-co { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.flat-app-role { font-size: 11px; color: var(--text2); }
.flat-app-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.flat-app-date { font-size: 11px; color: var(--text3); font-family: var(--mono); min-width: 80px; text-align: right; }

@media(max-width: 600px) {
  .app-row-meta { grid-template-columns: 1fr 1fr; }
  .flat-app-meta { flex-direction: column; align-items: flex-end; gap: 4px; }
}

.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 10px; }
.skill-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem; }
.skill-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.skill-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.skill-name { font-size: 13px; font-weight: 500; }
.skill-item { font-size: 12px; color: var(--text2); padding: 4px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; cursor: pointer; transition: color 0.12s; }
.skill-item:hover { color: var(--text); }
.skill-item:last-of-type { border-bottom: none; }
.skill-bullet { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.skill-item.learned { color: var(--text3); text-decoration: line-through; }
.skill-item.learned .skill-bullet { background: var(--green) !important; }

.log-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media(max-width: 700px) { .log-wrap { grid-template-columns: 1fr; } }
.log-section { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; }
.log-section h3 { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.log-textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text2); font-family: var(--sans); font-size: 13px; padding: 10px 12px;
  resize: vertical; min-height: 140px; outline: none; line-height: 1.6; transition: border-color 0.15s;
}
.log-textarea:focus { border-color: var(--accent); }

.empty { text-align: center; padding: 3rem; color: var(--text3); font-size: 13px; }
.loading { text-align: center; padding: 3rem; color: var(--text3); font-size: 13px; font-family: var(--mono); }

::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: var(--bg); } ::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

@media(max-width: 600px) {
  .header h1 { font-size: 1.5rem; }
  .tabs { width: 100%; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Plans tab (catalog) ──────────────────────────────────────────────── */
.plans-intro { margin-bottom: 1.5rem; }
.plans-title { font-family: var(--serif); font-weight: 300; font-size: 1.5rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.plans-subtitle { font-size: 13px; color: var(--text2); line-height: 1.6; max-width: 720px; }

.plan-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }

.plan-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.1rem 1.25rem; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.plan-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--plan-color, var(--accent));
  opacity: 0.3; transition: opacity 0.2s;
}
.plan-card.enrolled::before { opacity: 1; width: 4px; }
.plan-card.enrolled { border-color: var(--border2); }
.plan-card:hover { transform: translateY(-1px); border-color: var(--border2); }

.plan-card-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.plan-card-color { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.plan-card-title-block { flex: 1; min-width: 0; }
.plan-card-name { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-overview-badge { font-size: 9px; padding: 1px 7px; border-radius: 999px; background: rgba(79,142,247,0.15); color: #93c5fd; font-family: var(--mono); border: 1px solid rgba(79,142,247,0.25); font-weight: 400; }
.plan-card-tagline { font-size: 12px; color: var(--text2); line-height: 1.4; }

.plan-enroll-toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; cursor: pointer; }
.plan-enroll-toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg4); border: 1px solid var(--border2);
  border-radius: 999px; transition: all 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text3); transition: all 0.2s;
}
.plan-enroll-toggle input:checked + .toggle-slider { background: var(--plan-color, var(--accent)); border-color: var(--plan-color, var(--accent)); }
.plan-enroll-toggle input:checked + .toggle-slider::before { left: 18px; background: white; }

.plan-card-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.plan-meta-item { font-size: 11px; color: var(--text3); font-family: var(--mono); display: flex; align-items: center; gap: 4px; }
.plan-meta-item i { font-style: normal; }

.plan-card-prog { margin-bottom: 12px; }
.plan-card-prog-bar { background: var(--bg); border-radius: 999px; height: 4px; margin-bottom: 5px; overflow: hidden; }
.plan-card-prog-inner { height: 100%; border-radius: 999px; transition: width 0.4s; }
.plan-card-prog-text { font-size: 11px; color: var(--text3); font-family: var(--mono); }

.plan-card-outcomes { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.plan-outcomes-label { font-size: 11px; color: var(--text3); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.plan-outcome { font-size: 12px; color: var(--text2); line-height: 1.55; padding: 2px 0; }

.plan-card-toggle { font-size: 11px; color: var(--text3); cursor: pointer; padding: 4px 0; display: flex; align-items: center; gap: 6px; user-select: none; transition: color 0.15s; font-family: var(--mono); }
.plan-card-toggle:hover { color: var(--text); }
.plan-card-toggle-icon { transition: transform 0.2s; display: inline-block; }
.plan-card-toggle-icon.open { transform: rotate(90deg); }

.plan-card-sections { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.plan-card-section { margin-bottom: 10px; }
.plan-card-section:last-child { margin-bottom: 0; }
.plan-card-section-label { font-size: 11px; color: var(--text2); font-family: var(--mono); margin-bottom: 4px; font-weight: 500; }
.plan-card-book { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; color: var(--text2); }
.plan-card-book.done { opacity: 0.55; text-decoration: line-through; }
.plan-book-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); flex-shrink: 0; }
.plan-book-status-dot.st-complete { background: var(--green); }
.plan-book-status-dot.st-inprogress { background: var(--amber); }
.plan-book-title { flex: 1; min-width: 0; }
.plan-book-chs { font-size: 10px; color: var(--text3); font-family: var(--mono); flex-shrink: 0; }

/* ─── Roadmap — plan sections ──────────────────────────────────────────── */
.plan-section { margin-bottom: 2.5rem; }
.plan-header { margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border2); display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.plan-header-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-badge { font-family: var(--mono); font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 500; }
.plan-tagline { font-size: 12px; color: var(--text3); }
.plan-header-prog { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 200px; }
.plan-prog-text { font-size: 11px; color: var(--text3); font-family: var(--mono); }
.plan-prog-bar { width: 100%; height: 3px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.plan-prog-bar-inner { height: 100%; border-radius: 999px; transition: width 0.4s; }

.section-block { margin-bottom: 1.5rem; }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 0.75rem; }
.section-label { font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.section-divider { flex: 1; height: 1px; background: var(--border); }

/* ─── Empty state ──────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text2); }
.empty-state-icon { font-size: 48px; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-family: var(--serif); font-weight: 300; font-size: 1.5rem; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { font-size: 13px; line-height: 1.6; max-width: 400px; margin: 0 auto; }
.empty-state a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.empty-state a:hover { color: var(--text); }

/* ─── Roadmap plan filter chips ────────────────────────────────────────── */
.plan-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.plan-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg3);
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text3);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  white-space: nowrap;
}
.plan-filter-chip:hover { color: var(--text); border-color: var(--border2); }
.plan-filter-chip.active { color: var(--text); }
.plan-filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.plan-filter-all {
  background: var(--bg4);
}
.plan-filter-all.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ─── Typed plan items (Roadmap card grid) ─────────────────────────────────── */
.item-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s, transform 0.1s; text-decoration: none;
}
.item-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.item-card-top { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.item-icon { font-size: 13px; }
.item-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.45; flex: 1; }
.res-card { cursor: pointer; }
.res-kind {
  font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); border: 1px solid rgba(79,142,247,0.3); border-radius: 999px; padding: 2px 7px;
}
.res-url { font-family: var(--mono); font-size: 11px; color: var(--text3); word-break: break-all; }
.mile-card { flex-direction: row; align-items: flex-start; gap: 10px; }
.mile-card.done { opacity: 0.6; }
.mile-card.done .item-title { text-decoration: line-through; }
.item-body { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.item-kind-tag {
  font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em;
  border-radius: 999px; padding: 2px 7px; flex-shrink: 0;
}
.kt-project { color: var(--amber); border: 1px solid rgba(251,191,36,0.3); }
.kt-milestone { color: var(--teal); border: 1px solid rgba(45,212,191,0.3); }
.item-brief { font-size: 12px; color: var(--text2); line-height: 1.5; }
.item-link { font-family: var(--mono); font-size: 11px; color: var(--accent); text-decoration: none; }
.item-link:hover { text-decoration: underline; }
/* Custom check for project/milestone completion */
.item-check { position: relative; display: inline-flex; cursor: pointer; padding-top: 2px; flex-shrink: 0; }
.item-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.item-check-box {
  width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border2);
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.item-check-box::after { content: "✓"; font-size: 12px; color: #06210f; opacity: 0; transition: opacity 0.15s; }
.item-check input:checked + .item-check-box { background: var(--green); border-color: var(--green); }
.item-check input:checked + .item-check-box::after { opacity: 1; }

/* ─── Plan card: domain/tier/level badges ──────────────────────────────────── */
.plan-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.plan-domain-badge {
  font-size: 11px; font-family: var(--mono); color: var(--text2); cursor: pointer;
  border: 1px solid var(--border2); border-radius: 999px; padding: 2px 9px; transition: all 0.15s;
}
.plan-domain-badge:hover { border-color: var(--accent); color: var(--accent); }
.plan-tier-badge {
  font-size: 10px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.05em;
  border-radius: 999px; padding: 2px 9px; color: var(--accent2); border: 1px solid rgba(124,92,252,0.35);
}
.plan-tier-badge.tier-expert, .plan-tier-badge.tier-staff, .plan-tier-badge.tier-principal {
  color: var(--amber); border-color: rgba(251,191,36,0.35);
}
.plan-level-badge {
  font-size: 10px; font-family: var(--mono); color: var(--text3);
  border-radius: 999px; padding: 2px 8px; background: var(--bg4);
}
/* Typed reading-list rows */
.plan-card-res { text-decoration: none; }
.plan-card-res:hover .plan-book-title { color: var(--accent); }
.plan-book-status-dot.res-dot { background: transparent; font-size: 10px; line-height: 1; width: auto; }
.plan-card-step { cursor: pointer; user-select: none; }
.plan-step-check { width: 14px; height: 14px; accent-color: var(--green); cursor: pointer; flex-shrink: 0; }
.plan-step-tag {
  font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text3); margin-left: auto; border: 1px solid var(--border); border-radius: 999px; padding: 1px 6px;
}

/* ─── Plans: company recommendation banner ─────────────────────────────────── */
.rec-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: rgba(79,142,247,0.08); border: 1px solid rgba(79,142,247,0.25); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 1.25rem; font-size: 13px; color: var(--text);
}
.rec-clear {
  font-family: var(--mono); font-size: 11px; padding: 5px 11px; border-radius: 6px;
  border: 1px solid var(--border2); background: transparent; color: var(--text2); cursor: pointer;
}
.rec-clear:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Domains landing page ─────────────────────────────────────────────────── */
.domain-card-link { cursor: pointer; transition: border-color 0.15s, transform 0.1s; border-left: 3px solid var(--dom-color, var(--accent)); }
.domain-card-link:hover { border-color: var(--border2); transform: translateY(-2px); }
.domain-icon { font-size: 16px; margin-right: 7px; }
.domain-name { display: flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.domain-blurb { font-size: 12px; color: var(--text2); line-height: 1.55; margin-bottom: 10px; }
.domain-tiers { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.domain-tier-chip {
  font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text3); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px;
}
.domain-enter { font-family: var(--mono); font-size: 11px; color: var(--dom-color, var(--accent)); margin-top: 4px; }

/* ─── Company: prep-plans button ───────────────────────────────────────────── */
.prep-btn {
  width: 100%; margin: 4px 0 12px; padding: 8px 12px; font-family: var(--mono); font-size: 12px;
  color: var(--accent); background: rgba(79,142,247,0.07); border: 1px solid rgba(79,142,247,0.25);
  border-radius: 8px; cursor: pointer; text-align: left; transition: all 0.15s;
}
.prep-btn:hover { background: rgba(79,142,247,0.14); border-color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════════════
   Rework: shell, nav, dashboard, books/projects/library
   ════════════════════════════════════════════════════════════════════════ */

/* Header / brand */
.header { margin-bottom: 1.25rem; }
.header-top { margin-bottom: 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg3); border: 1px solid var(--border2); flex-shrink: 0; }

/* Primary nav */
.nav {
  display: flex; gap: 3px; margin-bottom: 2rem; padding: 5px;
  border: 1px solid var(--border); border-radius: 12px;
  flex-wrap: wrap; position: sticky; top: 10px; z-index: 5;
  backdrop-filter: blur(8px); background: rgba(20,25,41,0.85);
}
.nav-item {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px;
  font-size: 13px; border-radius: 8px; cursor: pointer; color: var(--text2);
  transition: all 0.15s; white-space: nowrap; user-select: none;
}
.nav-item:hover { color: var(--text); background: var(--bg4); }
.nav-item.active { background: var(--bg4); color: var(--text); border: 1px solid var(--border2); font-weight: 500; }
.nav-ico { font-size: 14px; line-height: 1; }

/* Section intros (Books/Projects/Library/Tracks) */
.section-intro { margin-bottom: 1.5rem; }
.page-title { font-family: var(--serif); font-weight: 300; font-size: 1.7rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.page-sub { font-size: 13px; color: var(--text2); line-height: 1.6; max-width: 760px; }

/* ── Dashboard ──────────────────────────────────────────────────────────── */
.dash { display: flex; flex-direction: column; gap: 1.5rem; }

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c, var(--accent)) 14%, transparent) 0%, transparent 55%),
    var(--bg3);
  border: 1px solid var(--border2); border-radius: 18px; padding: 1.6rem 1.7rem;
}
.hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--accent)); }
.hero-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c, var(--accent)); margin-bottom: 6px; }
.hero-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-title { font-family: var(--serif); font-weight: 500; font-size: 1.85rem; letter-spacing: -0.01em; color: var(--text); }
.hero-switch { font-family: var(--mono); font-size: 11px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border2); background: transparent; color: var(--text2); cursor: pointer; transition: all 0.15s; }
.hero-switch:hover { border-color: var(--c, var(--accent)); color: var(--text); }
.hero-tagline { font-size: 13px; color: var(--text2); margin-top: 4px; }

.hero-progress { display: flex; align-items: center; gap: 18px; margin: 1.2rem 0 0.4rem; }
.ring { flex-shrink: 0; }
.hero-progress-pct { font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1; color: var(--text); }
.hero-progress-pct span { font-size: 1rem; color: var(--text3); margin-left: 1px; }
.hero-progress-sub { font-size: 13px; color: var(--text); margin-top: 5px; }
.hero-progress-sub2 { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }

.hero-steps { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.hero-step-section { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin: 12px 0 5px; }
.hero-step-section:first-child { margin-top: 0; }
.hero-step { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; transition: background 0.15s; }
.hero-step[onclick] { cursor: pointer; }
.hero-step[onclick]:hover { background: var(--bg4); }
.hero-step-dot {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--border2); display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: #07120b; background: var(--bg);
}
.hero-step.st-active .hero-step-dot { color: var(--c, var(--accent)); background: var(--bg); }
.hero-step.st-resource .hero-step-dot { border-style: dashed; background: transparent; }
.hero-step-title { flex: 1; font-size: 13px; color: var(--text2); min-width: 0; }
.hero-step.st-done .hero-step-title { color: var(--text3); text-decoration: line-through; }
.hero-step.st-active .hero-step-title, .hero-step.current .hero-step-title { color: var(--text); font-weight: 500; }
.hero-step.current { background: color-mix(in srgb, var(--c, var(--accent)) 9%, transparent); }
.hero-step-prog { font-family: var(--mono); font-size: 11px; color: var(--text3); flex-shrink: 0; }
.hero-step-tag { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; flex-shrink: 0; }

/* Hero empty state */
.hero-empty { display: flex; gap: 20px; align-items: center; }
.hero-empty-mark { font-size: 44px; opacity: 0.7; flex-shrink: 0; }
.hero-empty-body h2 { font-family: var(--serif); font-weight: 300; font-size: 1.5rem; margin-bottom: 6px; }
.hero-empty-body p { font-size: 13px; color: var(--text2); line-height: 1.6; max-width: 560px; }
.hero-empty-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.hero-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-suggest-chip { font-size: 12px; padding: 7px 13px; border-radius: 999px; cursor: pointer; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); transition: all 0.15s; }
.hero-suggest-chip:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }

/* Stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-tile { position: relative; overflow: hidden; background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.2rem; }
.stat-tile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--c, linear-gradient(90deg, var(--accent), var(--accent2))); opacity: 0.7; }
.stat-val { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; color: var(--text); line-height: 1; }
.stat-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text2); margin-top: 8px; }
.stat-sub { font-size: 11px; color: var(--text3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dashboard two-column panels */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 820px) { .dash-cols { grid-template-columns: 1fr; } }
.dash-panel { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.3rem; }
.dash-panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.dash-panel-head h3 { font-size: 13px; font-weight: 500; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); }
.dash-panel-link { font-family: var(--mono); font-size: 11px; color: var(--text3); text-decoration: none; }
.dash-panel-link:hover { color: var(--accent); }
.dash-empty { font-size: 12px; color: var(--text3); line-height: 1.6; padding: 10px 0; }
.dash-empty a { color: var(--accent); text-decoration: none; }

.cont-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: padding-left 0.15s; }
.cont-row:last-child { border-bottom: none; }
.cont-row:hover { padding-left: 4px; }
.cont-main { flex: 1; min-width: 0; }
.cont-title { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cont-author { font-size: 11px; color: var(--text3); font-family: var(--mono); }
.cont-prog { display: flex; align-items: center; gap: 8px; flex-shrink: 0; width: 130px; }
.cont-bar { flex: 1; height: 4px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.cont-bar-in { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 999px; transition: width 0.4s; }
.cont-pct { font-family: var(--mono); font-size: 10px; color: var(--text3); min-width: 34px; text-align: right; }

/* Sticky-note application wall */
.notes-wall { display: flex; flex-wrap: wrap; gap: 12px; }
.sticky {
  width: calc(50% - 6px); min-width: 130px; box-sizing: border-box;
  background: linear-gradient(160deg, #f6e27a, #f2d44e);
  color: #3a3410; border-radius: 3px; padding: 11px 12px 13px; cursor: pointer;
  transform: rotate(var(--rot, 0deg)); transition: transform 0.15s;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35); position: relative;
}
.sticky:hover { transform: rotate(0deg) translateY(-2px); }
.sticky::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 34px; height: 12px; background: rgba(255,255,255,0.35); border-radius: 2px; }
.sticky-co { font-weight: 700; font-size: 13px; }
.sticky-role { font-size: 11px; margin: 2px 0 6px; opacity: 0.85; line-height: 1.3; }
.sticky-status { display: inline-block; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(58,52,16,0.18); border-radius: 999px; padding: 2px 8px; }

/* Books tab groups */
.book-group { margin-bottom: 1.75rem; }

/* Projects tab */
.proj-group { margin-bottom: 2rem; }
.proj-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 0.9rem; }
.proj-group-count { font-family: var(--mono); font-size: 11px; color: var(--text3); margin-left: auto; }
.active-pill { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--amber); border: 1px solid rgba(251,191,36,0.4); border-radius: 999px; padding: 2px 8px; }

/* Tracks: make-active button + active card emphasis */
.track-active-btn {
  margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text2); border: 1px solid var(--border2); transition: all 0.15s;
}
.track-active-btn:hover { border-color: var(--amber); color: var(--amber); }
.track-active-btn.is-active { background: rgba(251,191,36,0.14); color: var(--amber); border-color: rgba(251,191,36,0.4); }
.plan-card.active { border-color: rgba(251,191,36,0.45); box-shadow: 0 0 0 1px rgba(251,191,36,0.15); }

/* Library preview (pre-animation) */
.lib-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 1.2rem; }
.lib-stat { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 1.3rem 1.2rem; text-align: center; }
.lib-stat-ico { font-size: 28px; margin-bottom: 8px; }
.lib-stat-val { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; color: var(--text); }
.lib-stat-label { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-top: 4px; }
.lib-soon {
  background: var(--bg3); border: 1px dashed var(--border2); border-radius: 14px;
  padding: 1.4rem 1.5rem; font-size: 13px; color: var(--text2); line-height: 1.6; text-align: center;
}

@media (max-width: 600px) {
  .nav { position: static; }
  .hero-title { font-size: 1.4rem; }
  .sticky { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Phase 2: book covers, card heads, detail drawer
   ════════════════════════════════════════════════════════════════════════ */

/* Generated book cover / spine */
.bcover {
  position: relative; flex-shrink: 0; overflow: hidden;
  border-radius: 3px 6px 6px 3px;
  background: linear-gradient(135deg, hsl(var(--h), 52%, 44%), hsl(var(--h), 58%, 26%));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 4px 10px rgba(0,0,0,0.4);
}
.bcover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: rgba(0,0,0,0.3); box-shadow: inset -1px 0 0 rgba(255,255,255,0.12); }
.bcover.read::after { content: '✓'; position: absolute; top: 3px; right: 5px; font-size: 9px; color: hsl(var(--h), 85%, 88%); }
.bcover.sm { width: 42px; height: 58px; }
.bcover.lg { width: 92px; height: 126px; }
.bcover-inner { height: 100%; padding: 9px 9px 9px 13px; display: flex; flex-direction: column; }
.bcover.sm .bcover-inner { display: none; }
.bcover-title { font-family: var(--serif); font-size: 12px; font-weight: 500; color: #fff; line-height: 1.22; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
.bcover-author { margin-top: auto; font-family: var(--mono); font-size: 8px; color: rgba(255,255,255,0.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Book card header with cover */
.card-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 9px; }
.card-cover-wrap { cursor: pointer; transition: transform 0.12s; }
.card-cover-wrap:hover { transform: translateY(-2px); }
.card-head-text { flex: 1; min-width: 0; }
.card-head .card-title { cursor: pointer; margin-bottom: 3px; }
.card-head .card-title:hover { color: var(--accent); }
.card-head .card-author { margin-bottom: 0; }

/* Drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 50; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(480px, 100%);
  background: var(--bg2); border-left: 1px solid var(--border2);
  box-shadow: -24px 0 60px rgba(0,0,0,0.55);
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 51; overflow-y: auto; padding: 1.7rem 1.6rem 3rem;
}
.drawer.open { transform: translateX(0); }
body.drawer-open { overflow: hidden; }

.drawer-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text2); cursor: pointer; font-size: 13px; z-index: 2; transition: all 0.15s; }
.drawer-close:hover { border-color: var(--red); color: var(--red); }

.drawer-head { margin-bottom: 1.2rem; }
.drawer-head.book { display: flex; gap: 16px; align-items: flex-start; padding-right: 28px; }
.drawer-head-meta { flex: 1; min-width: 0; }
.drawer-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-bottom: 5px; }
.drawer-title { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; line-height: 1.22; color: var(--text); letter-spacing: -0.01em; }
.drawer-author { font-size: 12px; color: var(--text3); font-family: var(--mono); margin: 5px 0 9px; }

.drawer-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 1.3rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--border); }
.drawer-controls .book-status { cursor: pointer; }

.drawer-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 1.5rem; }
.dstat { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.3rem; text-align: center; }
.dstat-val { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; color: var(--text); line-height: 1; }
.dstat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); font-family: var(--mono); margin-top: 5px; }

.drawer-section { margin-bottom: 1.5rem; }
.drawer-section h3 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text2); margin-bottom: 9px; }
.drawer-prose { font-size: 13px; color: var(--text2); line-height: 1.65; }

.drawer-track-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-track-chip { font-size: 11px; padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: all 0.15s; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.drawer-track-chip:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }
.drawer-track-chip.active { font-weight: 600; box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }

.drawer-ch-head { display: flex; align-items: baseline; justify-content: space-between; }
.drawer-ch-prog { font-family: var(--mono); font-size: 11px; color: var(--text3); }
.drawer-chapters { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.dch { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; transition: border-color 0.15s; }
.dch:hover { border-color: var(--border2); }
.dch-main { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.dch-title { font-size: 12px; color: var(--text2); flex: 1; line-height: 1.4; }
.dch.read .dch-title { color: var(--text3); text-decoration: line-through; }
.dch-note { width: 100%; margin-top: 7px; background: transparent; border: 1px solid var(--border); border-radius: 5px; color: var(--text2); font-family: var(--sans); font-size: 11px; padding: 5px 8px; outline: none; transition: border-color 0.15s; }
.dch-note:focus { border-color: var(--accent); }
.dch-note::placeholder { color: var(--text3); }

.drawer-done { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 1.4rem; user-select: none; }
.drawer-done input { position: absolute; opacity: 0; width: 0; height: 0; }
.drawer-done .item-check-box { width: 22px; height: 22px; }
.drawer-done input:checked + .item-check-box { background: var(--green); border-color: var(--green); }
.drawer-done input:checked + .item-check-box::after { opacity: 1; }
.drawer-done-label { font-size: 13px; color: var(--text); }
.drawer-done.done .drawer-done-label { color: var(--green); }
.drawer-ref { display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--accent); text-decoration: none; border: 1px solid rgba(79,142,247,0.3); border-radius: 8px; padding: 7px 12px; transition: all 0.15s; }
.drawer-ref:hover { background: rgba(79,142,247,0.1); border-color: var(--accent); }

@media (max-width: 600px) { .drawer { width: 100%; } }

/* ══════════════════════════════════════════════════════════════════════════
   Phase 3: the Library scene
   ════════════════════════════════════════════════════════════════════════ */

.library-scene {
  position: relative; overflow: hidden; border-radius: 18px;
  border: 1px solid #2a1d12;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255,214,150,0.14), transparent 60%),
    linear-gradient(180deg, #241a12 0%, #1c140d 60%, #15100a 100%);
  box-shadow: inset 0 2px 40px rgba(0,0,0,0.45);
  padding: 1.5rem 1.5rem 0;
}
/* warm ceiling light + vignette */
.library-scene::before {
  content: ''; position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 60%; height: 120px; background: radial-gradient(ellipse at center, rgba(255,221,160,0.25), transparent 70%);
  pointer-events: none;
}
.library-scene::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 120px 30px rgba(0,0,0,0.55);
  border-radius: 18px;
}

.lib-wall { position: relative; display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; z-index: 1; }
@media (max-width: 820px) { .lib-wall { grid-template-columns: 1fr; } }

/* ── Shelves ─────────────────────────────────────────────────────────────── */
/* Domains flow as sections; small ones sit side by side on a row (gap between),
   each on its own plank with a clickable tag. */
.shelf-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 12px; }
.shelf-domain { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.shelf-books { display: flex; align-items: flex-end; gap: 3px; padding: 0 6px; min-height: 86px; }
.shelf-plank {
  position: relative; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, #6b4a2e, #4a3220 60%, #38251699);
  box-shadow: 0 6px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,210,150,0.25);
}
.shelf-tag {
  align-self: center; margin-top: 7px; max-width: 100%; cursor: pointer;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.02em;
  color: rgba(255,229,196,0.78); background: rgba(60,40,22,0.55);
  border: 1px solid rgba(255,210,150,0.18); border-radius: 6px; padding: 3px 7px;
  transition: all 0.15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shelf-tag:hover { color: #fff; border-color: rgba(255,210,150,0.5); background: rgba(90,60,30,0.7); }
.shelf-tag.full { color: rgba(150,220,170,0.85); border-color: rgba(120,200,140,0.3); }
.spine {
  position: relative; flex-shrink: 0; border-radius: 2px 2px 0 0; cursor: pointer;
  background: linear-gradient(90deg, hsl(var(--h),45%,22%), hsl(var(--h),48%,34%) 18%, hsl(var(--h),42%,28%) 82%, hsl(var(--h),40%,18%));
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.14), inset -2px 0 4px rgba(0,0,0,0.35), 0 -2px 6px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.spine::before { content: ''; position: absolute; top: 8px; left: 4px; right: 4px; height: 2px; background: hsl(var(--h),60%,70%); opacity: 0.5; }
.spine::after  { content: ''; position: absolute; bottom: 8px; left: 4px; right: 4px; height: 2px; background: hsl(var(--h),60%,70%); opacity: 0.5; }
.spine:hover { transform: translateY(-10px); filter: brightness(1.2); z-index: 3; }
.spine-title {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--serif); font-size: 11px; font-weight: 500; color: rgba(255,248,238,0.92);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 88%;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.shelf-empty, .board-empty, .desk-placeholder {
  font-size: 12px; color: rgba(255,232,200,0.45); line-height: 1.6; padding: 14px;
  font-family: var(--mono);
}
.shelf-empty { border: 1px dashed rgba(255,210,150,0.2); border-radius: 10px; }

/* ── Boards (achievements + applications) ───────────────────────────────── */
.lib-board-col { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 16px; }
.lib-board { border-radius: 12px; padding: 14px 14px 18px; min-height: 130px; display: flex; flex-direction: column; }
.lib-board.achievements {
  background:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.06) 0 1px, transparent 1px) 0 0/9px 9px,
    linear-gradient(160deg, #c39a63, #a87f49);
  box-shadow: inset 0 0 0 8px rgba(120,84,40,0.55), inset 0 0 40px rgba(0,0,0,0.3), 0 8px 20px rgba(0,0,0,0.45);
}
.lib-board.achievements .board-head { color: #4a3211; }
.board-head { font-family: var(--serif); font-size: 15px; margin-bottom: 12px; letter-spacing: 0.01em; }
.board-medals { display: flex; flex-wrap: wrap; gap: 14px 10px; flex: 1; align-content: center; }

/* Applications = a distinct, job-themed slate board with pinned cards */
.lib-board.applications {
  background: linear-gradient(165deg, #1d2433, #141a26);
  border: 1px solid var(--border2);
  box-shadow: inset 0 0 0 6px rgba(255,255,255,0.02), 0 8px 20px rgba(0,0,0,0.4);
}
.lib-board.applications .board-head { color: var(--text); }
.board-apps { display: flex; flex-wrap: wrap; gap: 14px 12px; padding-top: 4px; flex: 1; align-content: center; }
.appcard {
  position: relative; width: calc(50% - 6px); min-width: 120px; box-sizing: border-box;
  background: linear-gradient(160deg, #fcf3d4, #f3e3a8); color: #322a0e;
  border-radius: 4px; padding: 12px 11px 11px; cursor: pointer;
  transform: rotate(var(--rot, 0deg)); transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}
.appcard:hover { transform: rotate(0) translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.appcard-pin { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8e8e, #d83b3b); box-shadow: 0 2px 3px rgba(0,0,0,0.4); }
.appcard-co { font-weight: 700; font-size: 13px; line-height: 1.2; }
.appcard-role { font-size: 11px; opacity: 0.8; margin: 2px 0 8px; line-height: 1.3; }
.appcard .status-pill { font-size: 10px; }

.medal { width: 80px; text-align: center; cursor: pointer; transition: transform 0.15s; }
.medal:hover { transform: translateY(-3px) scale(1.03); }
.medal-disc {
  width: 50px; height: 50px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffeeb0, #f0c24c 52%, #c08a2c);
  color: #6e4a12; font-size: 22px; display: flex; align-items: center; justify-content: center;
  border: 3px solid #e7b948;
  box-shadow: 0 4px 9px rgba(0,0,0,0.45), inset 0 0 0 3px color-mix(in srgb, var(--c) 75%, transparent);
}
.medal-ribbon {
  width: 26px; height: 14px; margin: -4px auto 4px;
  background: var(--c); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
  opacity: 0.92;
}
.medal-name {
  font-size: 9px; line-height: 1.2; color: #3c2906; font-family: var(--mono);
  max-width: 80px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.board-empty { color: rgba(60,40,12,0.6); padding: 4px 0; margin: auto 0; line-height: 1.6; }

/* ── Desk (foreground) ──────────────────────────────────────────────────── */
.lib-desk { position: relative; margin: 12px -1.5rem 0; padding: 0 1.5rem; z-index: 2; }
.desk-surface {
  position: absolute; left: 0; right: 0; bottom: 0; height: 150px; z-index: 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, #6e4a2c 0%, #5a3a22 35%, #432a18 100%);
  box-shadow: inset 0 3px 0 rgba(255,210,150,0.3), 0 -10px 30px rgba(0,0,0,0.4);
}
.desk-items {
  position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; padding: 22px 8px 26px; flex-wrap: wrap;
}
.desk-pile, .desk-open, .desk-computer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.desk-open { flex: 1; }
.desk-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255,232,200,0.6);
}

/* to-read pile (stacked flat books) */
.pile-stack { display: flex; flex-direction: column-reverse; align-items: center; }
.pile-book {
  height: 17px; margin-top: -2px; border-radius: 3px; cursor: pointer; position: relative;
  background: linear-gradient(180deg, hsl(var(--h),46%,40%), hsl(var(--h),48%,28%));
  box-shadow: 0 2px 5px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.18);
  display: flex; align-items: center; padding: 0 8px; transition: transform 0.15s;
}
.pile-book:nth-child(2n) { transform: rotate(-1.5deg); }
.pile-book:nth-child(3n) { transform: rotate(1.2deg); }
.pile-book:hover { transform: translateX(4px) rotate(0); filter: brightness(1.15); z-index: 20; }
.pile-title {
  font-family: var(--mono); font-size: 8px; color: rgba(255,248,238,0.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* open books (in progress) */
.open-row { display: flex; align-items: flex-end; gap: 26px; flex-wrap: wrap; justify-content: center; }
.openbook { width: 104px; cursor: pointer; perspective: 700px; }
.ob-pages {
  position: relative; height: 70px; transform-style: preserve-3d;
  transform: rotateX(48deg); transform-origin: bottom center;
}
.ob-page { position: absolute; bottom: 0; width: 50px; height: 68px; background: linear-gradient(180deg, #fdf6e8, #e9dcc2); }
.ob-left  { left: 2px;  border-radius: 3px 1px 1px 3px; transform: skewX(8deg); box-shadow: inset -6px 0 10px rgba(0,0,0,0.12); }
.ob-right { right: 2px; border-radius: 1px 3px 3px 1px; transform: skewX(-8deg); box-shadow: inset 6px 0 10px rgba(0,0,0,0.12); }
.ob-flip {
  left: 52px; transform-origin: left center; backface-visibility: visible;
  background: linear-gradient(90deg, #fffbf2, #efe3c9);
  box-shadow: 0 0 8px rgba(0,0,0,0.18); border-radius: 1px 3px 3px 1px;
  animation: pageturn 4.5s ease-in-out infinite;
}
.openbook:nth-child(2n) .ob-flip { animation-delay: 1.1s; }
.openbook:nth-child(3n) .ob-flip { animation-delay: 2.2s; }
@keyframes pageturn {
  0%, 12% { transform: skewX(-8deg) rotateY(0deg); }
  50%, 100% { transform: skewX(8deg) rotateY(-165deg); }
}
.ob-cover {
  height: 9px; margin: -3px 8px 0; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, hsl(var(--h),46%,30%), hsl(var(--h),48%,40%));
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.openbook:hover .ob-pages { filter: brightness(1.05); }
.ob-caption {
  margin-top: 8px; text-align: center; font-size: 10px; color: rgba(255,244,228,0.85);
  font-family: var(--mono); line-height: 1.3; max-width: 104px;
}
.ob-caption span { display: block; color: rgba(255,244,228,0.55); }

/* computer monitor (active track) */
.monitor { cursor: pointer; width: 150px; }
.monitor-screen {
  height: 92px; border-radius: 7px; padding: 11px 12px;
  background: linear-gradient(160deg, #0d1626, #0a1120);
  border: 3px solid #20140c; box-shadow: 0 0 18px rgba(79,142,247,0.25), inset 0 0 0 1px rgba(255,255,255,0.04);
  display: flex; flex-direction: column; justify-content: center; gap: 5px; overflow: hidden;
}
.monitor.off .monitor-screen { box-shadow: none; align-items: center; justify-content: center; }
.monitor-zzz { font-family: var(--mono); font-size: 11px; color: var(--text3); }
.monitor-eyebrow { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; color: var(--accent); }
.monitor-title { font-family: var(--serif); font-size: 13px; color: #fff; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.monitor-bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.monitor-bar i { display: block; height: 100%; border-radius: 999px; }
.monitor-pct { font-family: var(--mono); font-size: 9px; color: var(--text2); }
.monitor-neck { width: 16px; height: 12px; margin: 0 auto; background: linear-gradient(180deg, #2a1a10, #1c120a); }
.monitor-foot { width: 54px; height: 6px; margin: 0 auto; border-radius: 3px; background: #1c120a; box-shadow: 0 3px 6px rgba(0,0,0,0.5); }

@media (max-width: 600px) {
  .desk-items { justify-content: center; }
  .library-scene { padding: 1.2rem 1rem 0; }
}

/* Applications board empty state (on dark) + domain preview drawer list */
.board-empty.light { color: rgba(232,234,240,0.6); }
.board-empty.light a { color: var(--accent); text-decoration: none; }

.domain-list { display: flex; flex-direction: column; gap: 7px; }
.domain-book {
  display: flex; align-items: center; gap: 11px; padding: 7px 9px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 9px;
  cursor: pointer; transition: border-color 0.15s, transform 0.12s;
}
.domain-book:hover { border-color: var(--border2); transform: translateX(2px); }
.domain-book .bcover.sm { width: 30px; height: 42px; }
.domain-book-meta { flex: 1; min-width: 0; }
.domain-book-title { font-size: 12px; color: var(--text); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-book-sub { font-size: 10px; color: var(--text3); font-family: var(--mono); }
.domain-book-status {
  flex-shrink: 0; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em;
  border-radius: 999px; padding: 2px 8px; border: 1px solid var(--border2); color: var(--text3);
}
.domain-book-status.dbs-read { color: #6ee7b7; border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.1); }
.domain-book-status.dbs-reading { color: #fcd34d; border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.1); }
.domain-book-status.dbs-owned { color: #93c5fd; border-color: rgba(79,142,247,0.35); background: rgba(79,142,247,0.1); }

/* Library toolbar (show-empty toggle) */
.lib-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.lib-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  font-family: var(--mono); font-size: 11px; color: var(--text2); }
.lib-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.lib-toggle-track { width: 32px; height: 18px; border-radius: 999px; background: var(--bg4);
  border: 1px solid var(--border2); position: relative; transition: all 0.18s; }
.lib-toggle-dot { position: absolute; top: 1px; left: 1px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--text3); transition: all 0.18s; }
.lib-toggle input:checked + .lib-toggle-track { background: rgba(79,142,247,0.3); border-color: var(--accent); }
.lib-toggle input:checked + .lib-toggle-track .lib-toggle-dot { left: 15px; background: var(--accent); }

/* Ghost (empty) shelves */
.spine.ghost {
  background: repeating-linear-gradient(180deg, rgba(255,232,200,0.05) 0 7px, transparent 7px 13px);
  border: 1px dashed rgba(255,225,190,0.16); border-radius: 2px 2px 0 0; box-shadow: none; cursor: default;
}
.spine.ghost::before, .spine.ghost::after { display: none; }
.spine.ghost:hover { transform: none; filter: none; }
.shelf-domain.ghostshelf .shelf-plank { opacity: 0.45; box-shadow: 0 5px 10px rgba(0,0,0,0.35); }
.shelf-tag.ghost { color: rgba(255,229,196,0.45); border-style: dashed; background: rgba(60,40,22,0.3); }
.shelf-tag.ghost:hover { color: rgba(255,240,215,0.85); border-color: rgba(255,210,150,0.4); }

/* ══════════════════════════════════════════════════════════════════════════
   Tracks: My Tracks rail + Browse header
   ════════════════════════════════════════════════════════════════════════ */
#mt-rail { margin-bottom: 1.75rem; }
.mt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.mt-title { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text2); }
.mt-hint { font-family: var(--mono); font-size: 10px; color: var(--text3); }

.mt-list { display: flex; flex-direction: column; gap: 8px; }
.mt-row {
  display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 12px 11px 16px; transition: border-color 0.15s, transform 0.1s;
}
.mt-row:hover { border-color: var(--border2); }
.mt-color { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--accent)); }
.mt-row.active { border-color: rgba(251,191,36,0.45); background: linear-gradient(90deg, rgba(251,191,36,0.07), var(--bg3) 60%); box-shadow: 0 0 0 1px rgba(251,191,36,0.12); }

.mt-body { flex: 1; min-width: 0; }
.mt-name { font-size: 14px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.mt-active-badge { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--amber); border: 1px solid rgba(251,191,36,0.4); border-radius: 999px; padding: 1px 8px; }
.mt-prog { display: flex; align-items: center; gap: 9px; margin-top: 6px; }
.mt-prog-bar { flex: 1; max-width: 260px; height: 4px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.mt-prog-bar i { display: block; height: 100%; border-radius: 999px; transition: width 0.4s; }
.mt-prog-text { font-family: var(--mono); font-size: 10px; color: var(--text3); white-space: nowrap; }

.mt-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.mt-btn {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border2); border-radius: 7px; background: transparent; color: var(--text2);
  cursor: pointer; font-size: 13px; transition: all 0.15s; padding: 0;
}
.mt-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.mt-btn:disabled { opacity: 0.3; cursor: default; }
.mt-btn.mt-star:hover { border-color: var(--amber); color: var(--amber); }
.mt-btn.mt-untrack:hover { border-color: var(--red); color: var(--red); }
.mt-btn.mt-open { width: auto; padding: 0 12px; font-family: var(--mono); font-size: 11px; color: var(--amber); border-color: rgba(251,191,36,0.4); }
.mt-btn.mt-open:hover { background: rgba(251,191,36,0.12); color: var(--amber); }

.mt-empty {
  background: var(--bg3); border: 1px dashed var(--border2); border-radius: 12px;
  padding: 1.2rem 1.3rem; font-size: 13px; color: var(--text2); line-height: 1.6;
}
.mt-empty strong { color: var(--text); }

.browse-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 1rem; flex-wrap: wrap; }
.browse-title { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--text); }
.browse-sub { font-family: var(--mono); font-size: 10px; color: var(--text3); }

@media (max-width: 600px) {
  .mt-prog-bar { max-width: none; }
}

/* Project/milestone guide in the detail drawer */
.guide-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 7px; }
.guide-steps li { font-size: 13px; color: var(--text2); line-height: 1.55; padding-left: 3px; }
.guide-steps li::marker { color: var(--accent); font-family: var(--mono); font-size: 11px; }

.guide-examples { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.guide-examples li { font-size: 13px; color: var(--text2); line-height: 1.5; padding-left: 18px; position: relative; }
.guide-examples li::before { content: '→'; position: absolute; left: 0; color: var(--accent2); }

.guide-resources { display: flex; flex-direction: column; gap: 7px; }
.guide-resource {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg3); text-decoration: none; transition: border-color 0.15s, transform 0.12s;
}
.guide-resource:hover { border-color: var(--accent); transform: translateX(2px); }
.guide-resource-label { font-size: 12px; color: var(--text); font-weight: 500; }
.guide-resource-url { font-family: var(--mono); font-size: 10px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

/* Jobs: prep-plan track toggle + Dashboard prep-plan progress */
.prep-area { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.prep-track-btn {
  align-self: flex-start; font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: all 0.15s;
  background: transparent; color: var(--text2); border: 1px solid var(--border2);
}
.prep-track-btn:hover { border-color: var(--amber); color: var(--amber); }
.prep-track-btn.on { background: rgba(251,191,36,0.14); color: var(--amber); border-color: rgba(251,191,36,0.4); }

/* rec-banner track action */
.rec-actions { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rec-track {
  font-family: var(--mono); font-size: 11px; padding: 5px 11px; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--text2); border: 1px solid var(--border2); transition: all 0.15s;
}
.rec-track:hover { border-color: var(--amber); color: var(--amber); }
.rec-track.on { background: rgba(251,191,36,0.14); color: var(--amber); border-color: rgba(251,191,36,0.4); }

/* Dashboard: prep-plan progress rows */
.dash-prep .prep-row {
  display: flex; align-items: center; gap: 14px; padding: 9px 0;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: padding-left 0.15s;
}
.dash-prep .prep-row:last-child { border-bottom: none; }
.dash-prep .prep-row:hover { padding-left: 4px; }
.prep-row-main { flex: 1; min-width: 0; }
.prep-row-co { font-size: 13px; font-weight: 500; color: var(--text); }
.prep-row-sub { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }
.prep-row-prog { display: flex; align-items: center; gap: 8px; flex-shrink: 0; width: 150px; }
.prep-row-prog .cont-bar { flex: 1; }

/* Jobs: "Open roles" careers link on the company card */
.roles-link {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  font-family: var(--mono); font-size: 11px; text-decoration: none;
  color: var(--accent); border: 1px solid rgba(79,142,247,0.3); border-radius: 7px;
  padding: 5px 11px; margin: 2px 0 10px; transition: all 0.15s;
}
.roles-link:hover { background: rgba(79,142,247,0.1); border-color: var(--accent); }
.roles-search { color: var(--text3); }
