/* ═══════════════════════════════════════════
   PERP — styles.css
   Pedagogical Effectiveness Review Portal
═══════════════════════════════════════════ */

/* ─── VARIABLES ─────────────────────────── */
:root {
  --bg:         #F7F4EE;
  --bg-2:       #EFEBE2;
  --bg-card:    #FDFAF5;
  --nav-bg:     #0C1A28;
  --nav-hover:  #162436;
  --nav-active: #1D3249;
  --accent:     #C8943A;
  --accent-lt:  #F0E2C8;
  --accent-dk:  #8B6018;
  --text:       #1B2333;
  --text-2:     #4A5568;
  --text-3:     #8B95A5;
  --border:     #DDD8CE;
  --border-2:   #C8C3B8;
  --white:      #FDFAF5;

  --s4:    #1A6B47; --s4-bg: #E8F5EE; --s4-bd: #9BD1B0;
  --s3:    #1D5A8A; --s3-bg: #E8F0FA; --s3-bd: #9BC0E5;
  --s2:    #8B5E1A; --s2-bg: #FDF3E3; --s2-bd: #E5C585;
  --s1:    #8B1E1E; --s1-bg: #FAE8E8; --s1-bd: #E5A5A5;

  --font-d: 'DM Serif Display', Georgia, serif;
  --font-b: 'Outfit', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', 'Courier New', monospace;

  --r:    10px;
  --r-lg: 14px;
  --sh:   0 1px 3px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.04);
  --sh-md:0 2px 8px rgba(0,0,0,.07), 0 8px 28px rgba(0,0,0,.05);
}

/* ─── RESET ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body:has(.landing.active) { overflow-y: auto; }
body:not(:has(.landing.active)) { overflow: hidden; }
body { font-family: var(--font-b); font-size: 15px; color: var(--text); background: var(--bg); line-height: 1.5; }
input, select, textarea, button { font-family: var(--font-b); }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
table { border-collapse: collapse; }

/* ─── LAYOUT ─────────────────────────────── */
.app { display: none; height: 100vh; overflow: hidden; }
.app.active { display: flex; }

/* ─── SIDEBAR ────────────────────────────── */
.sidebar {
  width: 252px;
  min-width: 252px;
  background: var(--nav-bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(255,255,255,.05);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  min-width: 34px;
  background: var(--accent);
  color: #1C1000;
  font-family: var(--font-d);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.brand-name { color: #EDE9E2; font-size: 14.5px; font-weight: 600; letter-spacing: .03em; display: block; }
.brand-full  { color: #3F5268; font-size: 9.5px; line-height: 1.4; display: block; margin-top: 1px; }

.nav-section { padding: 18px 10px 6px; }

.nav-section-label {
  color: #2E4256;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 5px;
}

.nav-list { display: flex; flex-direction: column; gap: 2px; }

.nav-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #7A8EA0;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.nav-btn:hover  { background: var(--nav-hover); color: #B8C8D8; }
.nav-btn.active { background: var(--nav-active); color: #E5EDF3; font-weight: 500; }

.nav-icon { width: 15px; height: 15px; flex-shrink: 0; opacity: .55; }
.nav-btn.active .nav-icon { opacity: .85; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.05);
  flex-shrink: 0;
}

.version-pill {
  display: inline-block;
  background: rgba(200,148,58,.14);
  color: var(--accent);
  font-size: 9.5px;
  font-family: var(--font-m);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 7px;
  letter-spacing: .04em;
}

.sidebar-disclaimer { color: #2E4256; font-size: 9.5px; line-height: 1.55; }

/* ─── MAIN + VIEWS ───────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  scroll-behavior: smooth;
}

.view { display: none; padding: 32px 36px 48px; min-height: 100%; }
.view.active { display: block; animation: fadeIn .22s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── PAGE HEADER ────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-d);
  font-size: 27px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}

.page-subtitle { color: var(--text-3); font-size: 13px; }

/* ─── BUTTONS ────────────────────────────── */
.btn-primary {
  background: var(--text);
  color: #F5F2EC;
  border: none;
  padding: 9px 18px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}

.btn-primary:hover { background: var(--accent-dk); }

.btn-ghost {
  background: none;
  color: var(--text-2);
  border: 1px solid var(--border-2);
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}

.btn-ghost:hover { border-color: var(--text-3); color: var(--text); }

/* ─── CARDS ──────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--sh);
  margin-bottom: 20px;
}

.card.compact { padding: 16px; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-d);
  font-size: 16.5px;
  font-weight: 400;
  color: var(--text);
}

.card-desc { color: var(--text-2); font-size: 13px; margin-top: 4px; line-height: 1.55; }
.card-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ─── STATS GRID ─────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--sh);
}

.stat-card.highlight { border-color: rgba(200,148,58,.45); background: linear-gradient(135deg,#FFF9F0,var(--bg-card)); }

.stat-value {
  font-family: var(--font-m);
  font-size: 30px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 7px; }
.stat-note   { font-size: 11.5px; }
.stat-note.pos { color: var(--s4); }
.stat-note.neu { color: var(--text-3); }

/* ─── DATA TABLE ─────────────────────────── */
.data-table { width: 100%; font-size: 13px; }

.data-table th {
  text-align: left;
  padding: 6px 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 11px;
  border-bottom: 1px solid var(--bg-2);
  vertical-align: middle;
}

.data-table tr.row-link { cursor: pointer; transition: background .1s; }
.data-table tr.row-link:hover td { background: #F3EFE5; }

.product-name { font-weight: 500; font-size: 13px; color: var(--text); }
.product-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; font-family: var(--font-m); }

.type-badge { font-family: var(--font-m); font-size: 10px; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.type-badge.a { background: var(--s3-bg); color: var(--s3); }
.type-badge.b { background: var(--s4-bg); color: var(--s4); }
.type-badge.c { background: var(--s2-bg); color: var(--s2); }

.status-badge { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 20px; letter-spacing: .04em; white-space: nowrap; }
.status-badge.cert   { background: var(--s4-bg); color: var(--s4); }
.status-badge.review { background: var(--s3-bg); color: var(--s3); }
.status-badge.ret    { background: var(--s1-bg); color: var(--s1); }

.score-chip { font-family: var(--font-m); font-size: 12.5px; font-weight: 500; padding: 2px 8px; border-radius: 5px; border: 1px solid; }
.score-chip.s4   { background: var(--s4-bg); color: var(--s4); border-color: var(--s4-bd); }
.score-chip.s3   { background: var(--s3-bg); color: var(--s3); border-color: var(--s3-bd); }
.score-chip.s2   { background: var(--s2-bg); color: var(--s2); border-color: var(--s2-bd); }
.score-chip.s1   { background: var(--s1-bg); color: var(--s1); border-color: var(--s1-bd); }
.score-chip.pend { background: var(--bg-2); color: var(--text-3); border-color: var(--border); }

.link-arrow { color: var(--text-3); font-size: 15px; }

/* ─── SELECT ─────────────────────────────── */
.select-sm {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  outline: none;
}

/* ─── TWO-COL ────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.two-col > .card { margin-bottom: 0; }

/* ─── DASHBOARD DIM BARS ─────────────────── */
.dim-score-list { display: flex; flex-direction: column; gap: 11px; }

.dim-bar-row   { display: flex; align-items: center; gap: 10px; }
.dim-bar-name  { font-size: 12px; color: var(--text-2); width: 170px; flex-shrink: 0; }
.dim-bar-track { flex: 1; height: 5px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.dim-bar-fill  { height: 100%; border-radius: 3px; width: 0; transition: width 1.1s cubic-bezier(.22,.61,.36,1); }
.dim-bar-val   { font-family: var(--font-m); font-size: 11.5px; color: var(--text-2); width: 26px; text-align: right; flex-shrink: 0; }

/* ─── TIER LIST ──────────────────────────── */
.tier-list { display: flex; flex-direction: column; gap: 16px; }
.tier-item { display: flex; flex-direction: column; gap: 3px; }

.tier-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  width: fit-content;
  letter-spacing: .02em;
}

.tier-badge.dq { background: var(--s3-bg); color: var(--s3); }
.tier-badge.ei { background: var(--s4-bg); color: var(--s4); }
.tier-badge.ed { background: var(--accent-lt); color: var(--accent-dk); }

.tier-count { font-family: var(--font-m); font-size: 11px; color: var(--text-3); }
.tier-req   { font-size: 11px; color: var(--text-3); line-height: 1.4; }

/* ─── STEP INDICATOR ─────────────────────── */
.step-indicator { display: flex; align-items: center; margin-bottom: 26px; }

.step { display: flex; align-items: center; gap: 9px; }

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  transition: all .2s;
  flex-shrink: 0;
}

.step.active    .step-dot { background: var(--text); border-color: var(--text); color: #F5F2EC; }
.step.completed .step-dot { background: var(--s4); border-color: var(--s4); color: #fff; }

.step-label { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.step.active    .step-label { color: var(--text); font-weight: 500; }
.step.completed .step-label { color: var(--s4); }

.step-line { flex: 1; height: 1px; background: var(--border); margin: 0 10px; min-width: 30px; }

/* ─── FORM STEPS ─────────────────────────── */
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn .2s ease; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

.form-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.req { color: var(--s1); }

.form-input, .form-select, .form-textarea {
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,148,58,.1);
}

.form-input.sm { width: 88px; flex-shrink: 0; }
.range-inputs  { display: flex; align-items: center; gap: 7px; }
.range-sep     { color: var(--text-3); font-size: 14px; }
.form-textarea { resize: vertical; line-height: 1.6; }

.radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.radio-card {
  display: flex;
  gap: 9px;
  padding: 13px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  align-items: flex-start;
}

.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-lt); }
.radio-card input { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.radio-title { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.radio-desc  { font-size: 11px; color: var(--text-3); line-height: 1.45; }

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ─── AI HELP BUTTONS & CHAT ─────────────── */

.ai-field-actions { display: inline-flex; gap: 6px; margin-left: auto; }

.ai-help-btn, .ai-suggest-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500; font-family: var(--font-b);
  padding: 3px 9px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--accent-dk); cursor: pointer;
  transition: all .15s; white-space: nowrap; line-height: 1.4;
}
.ai-help-btn:hover { border-color: var(--accent); background: var(--accent-lt); }
.ai-suggest-btn { color: var(--s3); border-color: var(--s3-bd); }
.ai-suggest-btn:hover { background: var(--s3-bg); border-color: var(--s3); }
.ai-suggest-btn:disabled { opacity: .6; cursor: wait; }

.ai-type-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-2);
  background: var(--bg); color: var(--accent-dk); font-size: 10px; font-weight: 700;
  cursor: pointer; margin-left: 4px; transition: all .15s; padding: 0;
  font-family: var(--font-b); line-height: 1; vertical-align: middle;
}
.ai-type-help:hover { background: var(--accent-lt); border-color: var(--accent); color: var(--accent); }

/* AI Chat Popup */
.ai-chat-popup {
  position: fixed; bottom: 20px; right: 20px; width: 400px; max-height: 520px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15); display: flex; flex-direction: column;
  z-index: 9999; opacity: 0; transform: translateY(20px) scale(.96);
  transition: opacity .2s, transform .2s; pointer-events: none;
  overflow: hidden;
}
.ai-chat-popup.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }

.ai-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--nav-bg); color: #fff; border-radius: 12px 12px 0 0;
}
.ai-chat-header-info { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ai-chat-close {
  background: none; border: none; color: rgba(255,255,255,.7); font-size: 20px;
  cursor: pointer; padding: 0 4px; line-height: 1; transition: color .15s;
}
.ai-chat-close:hover { color: #fff; }

.ai-chat-messages {
  flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column;
  gap: 12px; min-height: 200px; max-height: 340px;
}

.ai-chat-msg { display: flex; flex-direction: column; gap: 3px; }
.ai-chat-msg-ai { align-items: flex-start; }
.ai-chat-msg-user { align-items: flex-end; }

.ai-chat-msg-label { font-size: 10px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }

.ai-chat-msg-text {
  font-size: 13px; line-height: 1.55; padding: 10px 14px; border-radius: 10px;
  max-width: 92%; word-wrap: break-word;
}
.ai-chat-msg-ai .ai-chat-msg-text { background: var(--bg-2); color: var(--text); border-bottom-left-radius: 3px; }
.ai-chat-msg-user .ai-chat-msg-text { background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }

.ai-chat-msg-text code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.ai-chat-msg-text strong { font-weight: 600; }

.ai-chat-input-area {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--border); background: var(--bg);
}
.ai-chat-input {
  flex: 1; resize: none; border: 1px solid var(--border-2); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; font-family: var(--font-b);
  background: var(--bg-card); color: var(--text); outline: none;
  transition: border-color .15s; line-height: 1.5; max-height: 80px;
}
.ai-chat-input:focus { border-color: var(--accent); }
.ai-chat-input:disabled { opacity: .6; }

.ai-chat-send {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 8px 10px; cursor: pointer; transition: background .15s;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ai-chat-send:hover { background: var(--accent-dk); }

/* Typing animation for AI chat */
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots span {
  animation: typingBounce .6s infinite; font-weight: 700; font-size: 16px;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Suggestion Overlay */
.suggestion-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-card); border: 1.5px solid var(--s3-bd); border-radius: var(--r);
  padding: 14px; z-index: 10; box-shadow: 0 4px 16px rgba(0,0,0,.1);
  animation: fadeIn .2s ease;
}
.suggestion-overlay-header {
  font-size: 11px; font-weight: 600; color: var(--s3); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 8px;
}
.suggestion-overlay-content {
  font-size: 12.5px; line-height: 1.6; color: var(--text-2); max-height: 120px;
  overflow-y: auto; margin-bottom: 12px; padding-right: 4px;
}
.suggestion-overlay-actions { display: flex; gap: 8px; justify-content: flex-end; }
.suggestion-btn-replace, .suggestion-btn-append, .suggestion-btn-dismiss {
  font-size: 11.5px; font-weight: 500; padding: 5px 14px; border-radius: 6px;
  border: 1px solid var(--border); cursor: pointer; transition: all .15s;
  font-family: var(--font-b);
}
.suggestion-btn-replace { background: var(--s3); color: #fff; border-color: var(--s3); }
.suggestion-btn-replace:hover { background: #165078; }
.suggestion-btn-append { background: var(--bg); color: var(--s3); border-color: var(--s3-bd); }
.suggestion-btn-append:hover { background: var(--s3-bg); }
.suggestion-btn-dismiss { background: var(--bg); color: var(--text-3); }
.suggestion-btn-dismiss:hover { background: var(--bg-2); }

@media (max-width: 768px) {
  .ai-chat-popup { left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 70vh; }
  .ai-field-actions { margin-left: 0; margin-top: 4px; }
}

/* ─── UPLOAD ─────────────────────────────── */
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }

.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  text-align: center;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}

.upload-zone:hover { border-color: var(--accent); background: #FDF8F0; }

.upload-icon  { margin-bottom: 10px; color: var(--text-3); }
.upload-title { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.upload-hint  { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-bottom: 14px; }

.btn-upload {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-2);
  transition: all .15s;
}

.btn-upload:hover { background: var(--accent-lt); border-color: var(--accent); color: var(--text); }

.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.file-item { font-size: 11.5px; color: var(--s4); font-family: var(--font-m); }

.data-requirements { background: var(--bg-2); border-radius: var(--r); padding: 14px 16px; margin-bottom: 22px; }
.req-title { font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 9px; }
.req-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.req-item  { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.req-item.met { color: var(--s4); }
.req-icon  { width: 16px; flex-shrink: 0; font-size: 11px; }

/* ─── INTERVIEW INTRO ────────────────────── */
.interview-intro { background: var(--bg-2); border-radius: var(--r); padding: 18px; margin-bottom: 22px; }

.interview-meta-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 14px; }

.meta-label { font-size: 10.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px; }
.meta-value { font-size: 13.5px; color: var(--text); font-weight: 500; }

.interview-domains { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.domain-chip { background: var(--bg-card); border: 1px solid var(--border); padding: 3px 9px; border-radius: 20px; font-size: 11.5px; color: var(--text-2); }

.interview-notice { font-size: 12px; color: var(--text-3); line-height: 1.6; padding: 9px 13px; background: var(--bg-card); border-radius: 7px; border-left: 3px solid var(--accent); }

/* ─── INTERVIEW VIEW ─────────────────────── */
.interview-progress-header { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.progress-label { font-size: 12px; font-family: var(--font-m); color: var(--text-3); white-space: nowrap; }
.progress-bar   { width: 130px; height: 5px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.progress-fill  { height: 100%; background: var(--accent); border-radius: 3px; transition: width .5s ease; }

.interview-layout { display: grid; grid-template-columns: 1fr 268px; gap: 18px; align-items: start; }
.interview-main  { display: flex; flex-direction: column; gap: 14px; }

.interview-messages {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  min-height: 280px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.message { max-width: 92%; }
.message-ai   { align-self: flex-start; }
.message-user { align-self: flex-end; }

.msg-role {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.65;
}

.message-ai   .msg-bubble { background: var(--bg-2); color: var(--text); border-radius: 2px 10px 10px 10px; }
.message-user .msg-bubble { background: #1C2333; color: #EDE9E1; border-radius: 10px 2px 10px 10px; }

.interview-question-banner {
  background: var(--accent-lt);
  border: 1px solid rgba(200,148,58,.4);
  border-radius: var(--r);
  padding: 14px 16px;
}

.question-label { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-dk); margin-bottom: 5px; }
.question-text  { font-size: 14px; color: var(--text); line-height: 1.5; font-weight: 500; }

.interview-input-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
}

.interview-input {
  width: 100%;
  border: none;
  background: transparent;
  resize: none;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
  outline: none;
}

.interview-input-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border); }
.input-hint { font-size: 11px; color: var(--text-3); }

.sidebar-section-title { font-family: var(--font-d); font-size: 14px; margin-bottom: 11px; color: var(--text); }

.domain-progress-list { display: flex; flex-direction: column; gap: 8px; }
.domain-progress-item { display: flex; flex-direction: column; gap: 3px; }
.dp-header  { display: flex; justify-content: space-between; align-items: center; }
.dp-name    { font-size: 11.5px; color: var(--text-2); }
.dp-count   { font-size: 10.5px; font-family: var(--font-m); color: var(--text-3); }
.dp-bar     { height: 4px; background: var(--bg-2); border-radius: 2px; overflow: hidden; }
.dp-fill    { height: 100%; border-radius: 2px; background: var(--accent); }
.dp-fill.done { background: var(--s4); }

.flags-list { display: flex; flex-direction: column; gap: 9px; }
.flag-item  { display: flex; align-items: flex-start; gap: 7px; }
.flag-dot   { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.flag-dot.amber { background: var(--s2); }
.flag-dot.red   { background: var(--s1); }
.flag-dot.green { background: var(--s4); }
.flag-text  { font-size: 11.5px; color: var(--text-2); line-height: 1.5; }

/* ─── REPORT ─────────────────────────────── */
.report-product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.product-header-left { flex: 1; min-width: 0; }

.report-product-name { font-family: var(--font-d); font-size: 22px; font-weight: 400; color: var(--text); margin-bottom: 6px; }

.product-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-3); margin-bottom: 18px; }
.sep { color: var(--border-2); }

.product-header-stats { display: flex; gap: 28px; }
.header-stat-val   { font-family: var(--font-m); font-size: 20px; font-weight: 500; color: var(--text); }
.header-stat-label { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }

.cert-badge-block { text-align: center; flex-shrink: 0; }

.cert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 22px;
  border-radius: var(--r-lg);
  gap: 5px;
}

.cert-badge.dq { background: var(--s3-bg); border: 2px solid var(--s3-bd); color: var(--s3); }
.cert-badge.ei { background: var(--s4-bg); border: 2px solid var(--s4-bd); color: var(--s4); }
.cert-badge.ed { background: var(--accent-lt); border: 2px solid var(--accent); color: var(--accent-dk); }

.cert-icon  { font-size: 20px; }
.cert-label { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.4; text-transform: uppercase; letter-spacing: .07em; }
.cert-expires { font-size: 10.5px; color: var(--text-3); margin-top: 6px; }

.report-overview {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}

.report-radar-card { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.report-radar-card canvas { display: block; }

.radar-legend { display: flex; gap: 14px; }
.legend-item  { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); }
.legend-dot   { width: 9px; height: 9px; border-radius: 50%; }
.score-color     { background: rgba(200,148,58,.85); }
.threshold-color { background: rgba(90,105,120,.4); }

.score-list { display: flex; flex-direction: column; gap: 13px; }

.score-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.score-dim-name   { font-size: 13px; font-weight: 500; color: var(--text); }

.score-chip-sm { font-family: var(--font-m); font-size: 12px; font-weight: 500; padding: 2px 7px; border-radius: 4px; }
.score-chip-sm.s4 { background: var(--s4-bg); color: var(--s4); }
.score-chip-sm.s3 { background: var(--s3-bg); color: var(--s3); }
.score-chip-sm.s2 { background: var(--s2-bg); color: var(--s2); }
.score-chip-sm.s1 { background: var(--s1-bg); color: var(--s1); }

.score-bar-track { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.score-bar-fill  { height: 100%; border-radius: 3px; width: 0; transition: width 1.3s cubic-bezier(.22,.61,.36,1); }
.score-level-label { font-size: 10.5px; color: var(--text-3); }

.section-heading { font-family: var(--font-d); font-size: 19px; font-weight: 400; color: var(--text); margin-bottom: 14px; }

.dimension-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }

.dim-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh);
}

.dim-card.s4 { border-top-color: var(--s4); }
.dim-card.s3 { border-top-color: var(--s3); }
.dim-card.s2 { border-top-color: var(--s2); }
.dim-card.s1 { border-top-color: var(--s1); }

.dim-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.dim-card-num    { font-size: 10px; color: var(--text-3); font-family: var(--font-m); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.dim-card-title  { font-size: 13px; font-weight: 600; color: var(--text); max-width: 200px; line-height: 1.3; }

.dim-score-badge { font-family: var(--font-m); font-size: 21px; font-weight: 500; padding: 5px 11px; border-radius: 7px; }
.dim-score-badge.s4 { background: var(--s4-bg); color: var(--s4); }
.dim-score-badge.s3 { background: var(--s3-bg); color: var(--s3); }
.dim-score-badge.s2 { background: var(--s2-bg); color: var(--s2); }
.dim-score-badge.s1 { background: var(--s1-bg); color: var(--s1); }

.dim-level { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 9px; }
.dim-level.s4 { color: var(--s4); }
.dim-level.s3 { color: var(--s3); }
.dim-level.s2 { color: var(--s2); }
.dim-level.s1 { color: var(--s1); }

.dim-evidence { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }

.dim-ev-item {
  font-size: 11.5px;
  color: var(--text-2);
  padding-left: 11px;
  position: relative;
  line-height: 1.45;
}

.dim-ev-item::before { content: '·'; position: absolute; left: 2px; color: var(--text-3); }

.dim-flag { font-size: 11.5px; padding: 7px 10px; border-radius: 6px; line-height: 1.45; }
.dim-flag.warn { background: var(--s2-bg); color: var(--s2); border: 1px solid var(--s2-bd); }
.dim-flag.ok   { background: var(--s4-bg); color: var(--s4); border: 1px solid var(--s4-bd); }

.flag-list-report { display: flex; flex-direction: column; gap: 12px; }

.flag-report-item { padding: 13px; border-radius: var(--r); border-left: 3px solid; }
.flag-report-item.amber { background: var(--s2-bg); border-left-color: var(--s2); }
.flag-report-item.green { background: var(--s4-bg); border-left-color: var(--s4); }

.flag-report-dim  { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }
.flag-report-item.amber .flag-report-dim { color: var(--s2); }
.flag-report-item.green .flag-report-dim { color: var(--s4); }
.flag-report-text { font-size: 12.5px; line-height: 1.6; color: var(--text-2); }

.rec-list { padding-left: 17px; display: flex; flex-direction: column; gap: 10px; }
.rec-list li { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.rec-list strong { color: var(--text); }

/* ─── RUBRIC VIEW ────────────────────────── */
.rubric-dim-list { display: flex; flex-direction: column; gap: 14px; }

.rubric-dim-row {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.rubric-dim-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--bg-2);
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}

.rubric-dim-header:hover { background: var(--bg); }

.rubric-dim-num    { font-family: var(--font-m); font-size: 10.5px; color: var(--text-3); width: 20px; flex-shrink: 0; }
.rubric-dim-name   { font-size: 14px; font-weight: 500; color: var(--text); flex: 1; }
.rubric-dim-toggle { font-size: 12px; color: var(--text-3); }

.rubric-dim-body { display: none; padding: 14px 16px; background: var(--bg-card); }
.rubric-dim-body.open { display: block; }

.rubric-score-row  { display: grid; grid-template-columns: 80px 1fr; gap: 8px; margin-bottom: 7px; font-size: 12.5px; }
.rubric-score-key  { font-family: var(--font-m); font-weight: 500; }
.rubric-score-key.s4 { color: var(--s4); }
.rubric-score-key.s3 { color: var(--s3); }
.rubric-score-key.s2 { color: var(--s2); }
.rubric-score-key.s1 { color: var(--s1); }
.rubric-score-val { color: var(--text-2); line-height: 1.5; }

/* ─── REGISTRY VIEW ──────────────────────── */
.registry-tier-badge { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 5px; }
.registry-tier-badge.dq { background: var(--s3-bg); color: var(--s3); }
.registry-tier-badge.ei { background: var(--s4-bg); color: var(--s4); }
.registry-tier-badge.ed { background: var(--accent-lt); color: var(--accent-dk); }

/* ─── SCROLLBAR ──────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ═══════════════════════════════════════════
   NEW — Auth, Profile, Loading, Toasts
═══════════════════════════════════════════ */

/* ─── AUTH SCREEN — LIGHT THEME (matches app) ── */
.auth-screen { display:none; min-height:100vh; background:var(--bg); align-items:center; justify-content:center; position:relative; overflow:hidden; }
.auth-screen.active { display:flex; }

.auth-container { position:relative; z-index:1; }

.auth-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--r-lg); padding:40px; width:420px; max-width:95vw; box-shadow:var(--sh-md); }

.auth-brand { text-align:center; margin-bottom:28px; display:flex; align-items:center; justify-content:center; gap:12px; }
.auth-brand .brand-mark { width:38px; height:38px; min-width:38px; background:var(--accent); color:#1C1000; font-family:var(--font-d); font-size:20px; display:flex; align-items:center; justify-content:center; border-radius:10px; }
.auth-brand-text { text-align:left; }
.auth-brand-text .brand-name { font-family:var(--font-d); font-size:20px; color:var(--text); display:block; }
.auth-brand-text .brand-full { font-size:11px; color:var(--text-3); display:block; }

.auth-tabs { display:flex; gap:0; margin-bottom:24px; border-bottom:2px solid var(--border); }
.auth-tab { flex:1; padding:10px; text-align:center; font-size:13px; font-weight:500; color:var(--text-3); background:none; border:none; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; transition:all .15s; }
.auth-tab.active { color:var(--text); border-bottom-color:var(--accent); }

.auth-screen .auth-heading { font-family:var(--font-d); font-size:20px; color:var(--text); margin-bottom:4px; }
.auth-screen .auth-subheading { font-size:13px; color:var(--text-3); margin-bottom:8px; }

.auth-form { display:none; flex-direction:column; gap:14px; }
.auth-form.active { display:flex; }

.auth-divider { display:flex; align-items:center; gap:12px; color:var(--text-3); font-size:11px; }
.auth-divider::before,.auth-divider::after { content:''; flex:1; height:1px; background:var(--border); }

.btn-google { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:10px; background:var(--bg); border:1px solid var(--border-2); border-radius:var(--r); font-size:13px; color:var(--text); cursor:pointer; transition:all .15s; }
.btn-google:hover { background:var(--bg-2); border-color:var(--text-3); }
.btn-google svg { width:18px; height:18px; }

.auth-screen .auth-options { display:flex; justify-content:space-between; align-items:center; }
.auth-screen .auth-remember { font-size:12px; color:var(--text-2); display:flex; align-items:center; gap:6px; }
.auth-screen .auth-remember input { accent-color:var(--accent); }

.auth-error { background:var(--s1-bg); color:var(--s1); border:1px solid var(--s1-bd); padding:8px 12px; border-radius:var(--r); font-size:12px; display:none; }
.auth-error.show { display:block; }
.auth-success { background:var(--s4-bg); color:var(--s4); border:1px solid var(--s4-bd); padding:8px 12px; border-radius:var(--r); font-size:12px; display:none; }
.auth-success.show { display:block; }

.auth-link { color:var(--accent); cursor:pointer; font-size:12px; text-align:center; background:none; border:none; }
.auth-link:hover { text-decoration:underline; }
.auth-back-landing { display:block; margin-top:16px; text-align:center; font-size:13px; background:none; border:none; color:var(--text-3); }
.auth-back-landing:hover { color:var(--accent); }

.auth-screen .auth-terms { font-size:11px; color:var(--text-3); text-align:center; }
.auth-screen .auth-terms a { color:var(--accent); }
.auth-screen .auth-resend { font-size:12px; color:var(--text-3); text-align:center; }
.auth-screen .auth-icon-block { text-align:center; margin-bottom:8px; }
.auth-screen .auth-icon-block svg { stroke:var(--accent); }

.auth-footer-text { font-size:11px; color:var(--text-3); text-align:center; margin-top:20px; }

.btn-auth { background:var(--accent); color:#1C1000; border:none; padding:11px; border-radius:var(--r); font-size:14px; font-weight:500; cursor:pointer; transition:background .15s; width:100%; }
.btn-auth:hover { background:var(--accent-dk); }
.btn-auth:disabled { opacity:.5; cursor:not-allowed; }

.auth-screen .form-row { display:flex; gap:12px; }
.auth-screen .password-strength { height:3px; border-radius:2px; margin-top:4px; background:var(--border); }

/* ─── VERIFICATION CODE INPUT ────────────── */
.verify-code-inputs { display:flex; gap:8px; justify-content:center; }
.verify-code-inputs input { width:44px; height:52px; text-align:center; font-family:var(--font-m); font-size:22px; border:1.5px solid var(--border-2); border-radius:var(--r); background:var(--bg); color:var(--text); outline:none; }
.verify-code-inputs input:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(200,148,58,.1); }

/* ─── USER PROFILE IN SIDEBAR ────────────── */
.user-profile { display:flex; align-items:center; gap:10px; padding:10px 0; }
.user-avatar { width:32px; height:32px; border-radius:50%; background:var(--accent); color:#1C1000; font-size:13px; font-weight:600; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.user-info { flex:1; min-width:0; }
.user-name { font-size:12px; color:#B8C8D8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-role { font-size:9px; color:var(--accent); font-weight:600; letter-spacing:.04em; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-email { font-size:10px; color:#3F5268; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dashboard-section-label { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--text-3); margin:24px 0 12px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.btn-sm { background:var(--accent); color:#1C1000; border:none; padding:5px 14px; border-radius:var(--r); font-size:12px; font-weight:500; cursor:pointer; transition:background .15s; }
.btn-sm:hover { background:var(--accent-dk); }

/* ─── SETTINGS & PROFILE ────────────────── */
.settings-grid { display:flex; flex-direction:column; gap:20px; }
.settings-list { display:flex; flex-direction:column; }
.settings-row {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 0; border-bottom:1px solid var(--border);
}
.settings-row:last-child { border-bottom:none; }
.settings-label { font-size:13.5px; color:var(--text); }
.settings-hint { font-size:11.5px; color:var(--text-3); margin-top:2px; }
.settings-value { font-size:13.5px; color:var(--text-2); }

/* Toggle switch */
.toggle { position:relative; display:inline-block; width:40px; height:22px; flex-shrink:0; }
.toggle input { opacity:0; width:0; height:0; }
.toggle-slider {
  position:absolute; inset:0; background:var(--border-2); border-radius:22px;
  cursor:pointer; transition:background .2s;
}
.toggle-slider::before {
  content:''; position:absolute; width:16px; height:16px; left:3px; top:3px;
  background:#fff; border-radius:50%; transition:transform .2s; box-shadow:0 1px 3px rgba(0,0,0,.15);
}
.toggle input:checked + .toggle-slider { background:var(--accent); }
.toggle input:checked + .toggle-slider::before { transform:translateX(18px); }
/* ─── USER PROFILE BUTTON & DROPDOWN ───── */
.user-profile { position:relative; }
.user-profile-btn {
  display:flex; align-items:center; gap:10px; width:100%;
  padding:10px 8px; background:none; border:1px solid rgba(255,255,255,.06);
  border-radius:var(--r); cursor:pointer; text-align:left; transition:background .15s;
}
.user-profile-btn:hover { background:rgba(255,255,255,.04); }
.user-chevron { color:#5A6F82; flex-shrink:0; transition:transform .2s; }
.user-profile.open .user-chevron { transform:rotate(180deg); }

.user-menu {
  display:none; position:absolute; bottom:calc(100% + 8px); left:0; right:0;
  background:var(--nav-bg); border:1px solid rgba(255,255,255,.1);
  border-radius:var(--r); padding:6px 0; box-shadow:0 -4px 24px rgba(0,0,0,.3);
  z-index:50;
}
.user-profile.open .user-menu { display:block; }

.user-menu-item {
  display:flex; align-items:center; gap:10px; width:100%;
  padding:8px 14px; background:none; border:none; color:#8A9BB0;
  font-size:12.5px; cursor:pointer; transition:all .12s; text-align:left;
}
.user-menu-item:hover { background:rgba(255,255,255,.05); color:#D4DDE8; }
.user-menu-item.logout { color:#C06060; }
.user-menu-item.logout:hover { background:rgba(192,96,96,.08); color:#E88; }
.user-menu-item svg { flex-shrink:0; color:inherit; }

.user-menu-divider { height:1px; background:rgba(255,255,255,.07); margin:4px 0; }

.btn-logout { background:none; border:1px solid rgba(255,255,255,.1); color:#7A8EA0; padding:4px 10px; border-radius:5px; font-size:10px; cursor:pointer; white-space:nowrap; }
.btn-logout:hover { border-color:rgba(255,255,255,.2); color:#B8C8D8; }

/* ─── LOADING SPINNER ────────────────────── */
.loading-overlay { position:fixed; inset:0; background:rgba(247,244,238,.8); display:flex; align-items:center; justify-content:center; z-index:1000; }
.spinner { width:40px; height:40px; border:3px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ─── TOAST NOTIFICATIONS ────────────────── */
.toast-container { position:fixed; top:20px; right:20px; z-index:2000; display:flex; flex-direction:column; gap:8px; }
.toast { padding:12px 18px; border-radius:var(--r); font-size:13px; box-shadow:var(--sh-md); animation:slideIn .3s ease; max-width:360px; }
.toast.success { background:var(--s4-bg); color:var(--s4); border:1px solid var(--s4-bd); }
.toast.error { background:var(--s1-bg); color:var(--s1); border:1px solid var(--s1-bd); }
.toast.info { background:var(--s3-bg); color:var(--s3); border:1px solid var(--s3-bd); }
@keyframes slideIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }

/* ═══════════════════════════════════════════
   LANDING PAGE — LIGHT THEME (matches app)
═══════════════════════════════════════════ */
.landing {
  display: none; min-height: 100vh; flex-direction: column;
  background: var(--bg); color: var(--text); position: relative;
  overflow-y: auto; overflow-x: hidden;
}
.landing.active { display: flex; }

/* Background glows */
.landing-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.landing-glow {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: .12;
}
.landing-glow-1 { width: 600px; height: 600px; background: var(--accent); top: -200px; right: -100px; }
.landing-glow-2 { width: 500px; height: 500px; background: var(--s3); bottom: -150px; left: -100px; opacity: .08; }

/* Nav */
.landing-nav {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px; max-width: 1200px; width: 100%; margin: 0 auto;
}
.landing-nav-brand { display: flex; align-items: center; gap: 10px; }
.landing-nav-brand .brand-mark { background: var(--accent); color: #1C1000; }
.landing-nav-brand .brand-name { font-family: var(--font-d); font-size: 20px; color: var(--text); }
.landing-nav-signin {
  background: var(--accent); border: none; color: #1C1000;
  padding: 8px 22px; border-radius: var(--r); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.landing-nav-signin:hover { background: var(--accent-dk); }

/* Hero */
.landing-hero {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 64px;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 60px 48px 80px;
}
.landing-hero-content { flex: 1; min-width: 0; }
.landing-hero-visual { flex: 0 0 380px; }

.landing-badge {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-dk); background: var(--accent-lt); border: 1px solid rgba(200,148,58,.2);
  padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
}
.landing-title {
  font-family: var(--font-d); font-size: clamp(32px, 4vw, 50px);
  color: var(--text); line-height: 1.15; margin-bottom: 20px;
}
.landing-subtitle {
  font-size: 16px; line-height: 1.7; color: var(--text-2);
  max-width: 520px; margin-bottom: 32px;
}
.landing-cta-row { display: flex; align-items: center; gap: 16px; }
.landing-cta {
  background: var(--accent); color: #1C1000; border: none;
  padding: 13px 32px; border-radius: var(--r); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .2s; letter-spacing: .01em;
}
.landing-cta:hover { background: var(--accent-dk); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(200,148,58,.25); }
.landing-cta-secondary {
  color: var(--text-2); font-size: 14px; font-weight: 500;
  padding: 13px 8px; transition: color .2s;
}
.landing-cta-secondary:hover { color: var(--text); }

/* Preview card stack */
.landing-card-stack { position: relative; }
.landing-preview-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px 20px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--sh-md);
}
.lpc-bar {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-2);
}
.lpc-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.lpc-dot.s4 { background: var(--s4); }
.lpc-dot.s3 { background: var(--s3); }
.lpc-dot.s2 { background: var(--s2); }
.lpc-dot.s1 { background: var(--s1); }
.lpc-label { flex: 1; }
.lpc-score { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lpc-bar:has(.s4) .lpc-score { color: var(--s4); }
.lpc-bar:has(.s3) .lpc-score { color: var(--s3); }
.lpc-bar:has(.s2) .lpc-score { color: var(--s2); }

/* Features */
.landing-features {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 48px 80px;
}
.landing-features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.landing-feature {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px 24px;
  transition: border-color .2s, box-shadow .2s;
}
.landing-feature:hover { border-color: var(--accent); box-shadow: var(--sh); }
.landing-feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-lt); color: var(--accent-dk);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.landing-feature h3 { font-family: var(--font-d); font-size: 18px; color: var(--text); margin-bottom: 8px; }
.landing-feature p { font-size: 13px; line-height: 1.6; color: var(--text-2); }

/* Why sign in */
.landing-why {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 64px 48px 80px;
  text-align: center;
}
.landing-why-title { font-family: var(--font-d); font-size: 32px; color: var(--text); margin-bottom: 8px; }
.landing-why-subtitle { font-size: 15px; color: var(--text-2); margin-bottom: 40px; }
.landing-why-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  text-align: left; max-width: 720px; margin: 0 auto;
}
.landing-why-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
}
.landing-why-num {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--accent-lt); color: var(--accent-dk);
  font-family: var(--font-d); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.landing-why-item strong { font-size: 14px; color: var(--text); display: block; margin-bottom: 4px; }
.landing-why-item p { font-size: 12.5px; line-height: 1.55; color: var(--text-2); margin: 0; }

/* Manifesto / Position Paper section */
.landing-manifesto {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 48px 80px;
}
.manifesto-inner {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 48px 44px;
  box-shadow: var(--sh);
}
.manifesto-badge {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--s1); background: var(--s1-bg); border: 1px solid var(--s1-bd);
  padding: 4px 12px; border-radius: 16px; margin-bottom: 16px;
}
.manifesto-title { font-family: var(--font-d); font-size: 28px; color: var(--text); margin-bottom: 8px; }
.manifesto-subtitle { font-size: 15px; color: var(--text-2); margin-bottom: 28px; }

.manifesto-quote {
  border-left: 3px solid var(--accent); margin: 0 0 32px 0;
  padding: 16px 24px; background: rgba(200,148,58,.04);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 15px; line-height: 1.7; color: var(--text);
  font-style: italic;
}
.manifesto-quote em { font-style: normal; font-weight: 600; color: var(--accent-dk); }

.manifesto-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.manifesto-col h3 { font-family: var(--font-d); font-size: 16px; color: var(--text); margin-bottom: 8px; }
.manifesto-col p { font-size: 13px; line-height: 1.65; color: var(--text-2); }

.manifesto-table-wrap { overflow-x: auto; margin-bottom: 28px; }
.manifesto-table { width: 100%; font-size: 13px; border: 1px solid var(--border); border-radius: var(--r); }
.manifesto-table th { background: var(--bg-2); font-weight: 600; text-align: left; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.manifesto-table td { padding: 10px 14px; color: var(--text-2); border-bottom: 1px solid var(--border); }
.manifesto-table tr:last-child td { border-bottom: none; }
.manifesto-table td:first-child { font-weight: 500; color: var(--text); }

.manifesto-conclusion {
  font-size: 14px; line-height: 1.7; color: var(--text);
  padding: 16px 0; border-top: 1px solid var(--border); margin-bottom: 20px;
}

/* Reference links */
.manifesto-refs {
  text-align: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}
.manifesto-refs-label {
  display: block; font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 10px; font-weight: 600;
}
.manifesto-ref-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--accent-dk); padding: 6px 14px; margin: 4px;
  border: 1px solid var(--border); border-radius: var(--r); transition: all .2s;
}
.manifesto-ref-link:hover { border-color: var(--accent); background: rgba(200,148,58,.04); }
.manifesto-ref-link svg { flex-shrink: 0; color: var(--accent); }

@media (max-width: 768px) {
  .landing-manifesto { padding-left: 20px; padding-right: 20px; }
  .manifesto-inner { padding: 28px 20px; }
  .manifesto-cols { grid-template-columns: 1fr; }
  .manifesto-ref-link { display: flex; }
}

/* Footer */
.landing-footer {
  position: relative; z-index: 1;
  text-align: center; padding: 24px 48px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-3); margin-top: auto;
}

/* ─── Responsive landing ───────────────── */
@media (max-width: 768px) {
  .landing-nav, .landing-hero, .landing-features, .landing-why { padding-left: 20px; padding-right: 20px; }
  .landing-hero { flex-direction: column; gap: 40px; padding-top: 40px; padding-bottom: 48px; }
  .landing-hero-visual { flex: none; width: 100%; max-width: 360px; }
  .landing-features-grid { grid-template-columns: 1fr; }
  .landing-why-grid { grid-template-columns: 1fr; }
}
