@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0F172A;
  --bg-card:     #141f33;
  --bg-raised:   #1E293B;
  --text:        #F8FAFC;
  --text-muted:  #94A3B8;
  --text-dim:    #64748B;
  --border:      rgba(248,250,252,0.07);
  --border-md:   rgba(248,250,252,0.13);
  --accent:      #3B82F6;

  --c-auth: #A32D2D;
  --c-demo: #0F6E56;
  --c-affi: #185FA5;
  --c-visi: #534AB7;
  --c-pace: #854F0B;

  --font-h: 'Playfair Display', Georgia, serif;
  --font-b: 'Inter', system-ui, -apple-system, sans-serif;

  --w:    740px;
  --r:    12px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font-b); border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input { font-family: var(--font-b); }
ul, ol { list-style: none; }

/* ── Utilities ─────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.fade-in  { animation: fadeIn  0.45s var(--ease) both; }
.slide-up { animation: slideUp 0.35s var(--ease) both; }

@keyframes fadeIn  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse   { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes spin    { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   INDEX PAGE
═══════════════════════════════════════════════════════════ */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  position: relative;
  z-index: 1;
  background: #0d1f3c;
}

.landing__content {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeUp 0.5s ease-out both;
}

.landing__logo {
  font-family: var(--font-h);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: #c47b1a;
  margin-bottom: 28px;
}

.landing__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243,237,227,0.4);
  margin-bottom: 32px;
}

.eyebrow-line {
  display: block;
  width: 24px;
  height: 1px;
  background: rgba(196,123,26,0.45);
  flex-shrink: 0;
}

.landing__title {
  font-family: var(--font-h);
  font-size: 52px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: #f3ede3;
  margin-bottom: 20px;
}

.meta-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.pill {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.pill--ghost {
  color: rgba(243,237,227,0.55);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

.pill--gold {
  color: rgba(196,123,26,0.75);
  background: rgba(196,123,26,0.1);
  border-color: rgba(196,123,26,0.25);
}

.pill-dot {
  color: rgba(196,123,26,0.4);
  font-size: 14px;
  line-height: 1;
}

.login-card {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}

.form-group label {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243,237,227,0.4);
  margin-bottom: 10px;
  display: block;
}

.form-group input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: #f3ede3;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 15px;
  padding: 14px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
}
.form-group input::placeholder { color: rgba(243,237,227,0.3); }
.form-group input:focus {
  border-color: #c47b1a;
  box-shadow: 0 0 0 3px rgba(196,123,26,0.18);
}
.form-group input.error { border-color: #EF4444; }
.form-group input.error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }

.field-error {
  font-size: 0.78rem;
  color: #EF4444;
  min-height: 1.1em;
  margin-top: 6px;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #c47b1a;
  color: #fff;
  border-radius: 3px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 17px 32px;
  width: 100%;
  margin-top: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: #a8621a; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.landing__footer {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.6875rem;
  color: rgba(243,237,227,0.2);
  letter-spacing: 0.06em;
  margin-top: 20px;
}

/* Resume banner (inside .login-card) */
.resume-banner {
  width: 100%;
  background: rgba(196,123,26,0.12);
  border-bottom: 1px solid rgba(196,123,26,0.2);
  padding: 14px 24px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: rgba(243,237,227,0.75);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.resume-banner__left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.resume-banner__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c47b1a;
  flex-shrink: 0;
}
.resume-banner__text { line-height: 1.4; }
.resume-banner__text strong { color: #f3ede3; font-weight: 600; }
.resume-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-resume {
  background: #c47b1a;
  color: #fff;
  border-radius: 3px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 20px;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.btn-resume:hover { background: #a8621a; }
.btn-clear {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(243,237,227,0.45);
  padding: 8px 16px;
  transition: background 0.15s;
  cursor: pointer;
}
.btn-clear:hover { background: rgba(255,255,255,0.06); }

/* ═══════════════════════════════════════════════════════════
   SHARED TOP BAR
═══════════════════════════════════════════════════════════ */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(15,23,42,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.top-bar__brand {
  font-family: var(--font-h);
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.top-bar__right {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.top-bar__link {
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.top-bar__link:hover { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   SIMULATION PAGE
═══════════════════════════════════════════════════════════ */
.progress-row {
  position: fixed;
  top: 56px; left: 0; right: 0;
  z-index: 99;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background: rgba(15,23,42,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
  padding: 0;
  transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
  position: relative;
}
.dot[data-state="done"] {
  background: var(--c-demo);
  cursor: pointer;
}
.dot[data-state="done"]:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(15,110,86,0.25);
}
.dot[data-state="active"] {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.dot[data-state="reviewing"] {
  background: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.35);
  cursor: pointer;
}

.sim-body {
  padding-top: 120px;
  padding-bottom: 72px;
  min-height: 100vh;
}

/* Scenario card */
.scenario-card {
  max-width: var(--w);
  margin: 0 auto;
  padding: 40px 24px 32px;
  animation: fadeIn 0.4s var(--ease) both;
}

.scenario-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-md);
  border-radius: 99px;
  padding: 4px 14px;
  margin-bottom: 24px;
}

.scenario-setting {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.75;
}

.scenario-question {
  font-family: var(--font-h);
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 600;
  margin-bottom: 30px;
  line-height: 1.3;
}

/* Options */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  padding: 16px 18px;
  color: var(--text);
  font-size: 0.91rem;
  line-height: 1.58;
  text-align: left;
  transition: background 0.18s, border-color 0.18s, opacity 0.18s;
}
.option-btn:hover:not(:disabled) {
  background: var(--bg-raised);
  border-color: rgba(248,250,252,0.22);
}
.option-btn:disabled { cursor: default; }
.option-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.option-label {
  flex-shrink: 0;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--border-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  margin-top: 1px;
}

.option-text { flex: 1; }

.option-btn.selected {
  border-color: var(--accent);
  background: rgba(59,130,246,0.06);
}
.option-btn.selected .option-label {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Revealed states — shown after selection */
.option-btn.rev-auth { border-color: var(--c-auth) !important; background: rgba(163,45,45,0.10) !important; }
.option-btn.rev-demo { border-color: var(--c-demo) !important; background: rgba(15,110,86,0.10) !important; }
.option-btn.rev-affi { border-color: var(--c-affi) !important; background: rgba(24,95,165,0.10) !important; }
.option-btn.rev-visi { border-color: var(--c-visi) !important; background: rgba(83,74,183,0.10) !important; }
.option-btn.rev-pace { border-color: var(--c-pace) !important; background: rgba(133,79,11,0.10) !important; }

.option-btn.rev-auth .option-label { background: var(--c-auth); color: #fff; border-color: var(--c-auth); }
.option-btn.rev-demo .option-label { background: var(--c-demo); color: #fff; border-color: var(--c-demo); }
.option-btn.rev-affi .option-label { background: var(--c-affi); color: #fff; border-color: var(--c-affi); }
.option-btn.rev-visi .option-label { background: var(--c-visi); color: #fff; border-color: var(--c-visi); }
.option-btn.rev-pace .option-label { background: var(--c-pace); color: #fff; border-color: var(--c-pace); }

.style-pill {
  flex-shrink: 0;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid currentColor;
  white-space: nowrap;
  align-self: center;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.3s;
}
.style-pill.visible { opacity: 1; }

/* Feedback panel */
.feedback-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  padding: 28px;
  margin-bottom: 24px;
  animation: slideUp 0.38s var(--ease) both;
}

.feedback-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
  animation: pulse 1.8s ease-in-out infinite;
}
.feedback-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border-md);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.feedback-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.feedback-style-name {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 600;
}
.feedback-text {
  font-size: 0.91rem;
  line-height: 1.8;
  color: var(--text-muted);
}
.feedback-text p + p { margin-top: 12px; }
.feedback-score {
  margin-top: 16px;
  font-size: 0.76rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Nav buttons */
.nav-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 12px 22px;
  transition: background 0.2s, border-color 0.2s;
}
.btn-next:hover { background: var(--bg-raised); border-color: rgba(248,250,252,0.25); }
.btn-next:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-finish {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 12px 22px;
  transition: opacity 0.2s;
}
.btn-finish:hover { opacity: 0.88; }
.btn-finish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Review mode */
.review-banner {
  background: var(--bg-raised);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.btn-return {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 0.84rem;
  padding: 10px 18px;
  transition: background 0.2s;
}
.btn-return:hover { background: var(--bg-raised); }

/* ═══════════════════════════════════════════════════════════
   PROFILE PAGE
═══════════════════════════════════════════════════════════ */
.profile-wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding: 80px 24px 88px;
}

.profile-hero {
  text-align: center;
  padding: 56px 0 52px;
}
.profile-hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.profile-hero__style {
  font-family: var(--font-h);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 14px;
}
.profile-hero__sub {
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* Section card */
.profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px;
  margin-bottom: 18px;
}
.profile-section__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 22px;
}

/* Bar chart */
.bar-row { display: flex; flex-direction: column; gap: 16px; }

.bar-item {
  display: grid;
  grid-template-columns: 102px 1fr 48px;
  align-items: center;
  gap: 14px;
}
.bar-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}
.bar-track {
  height: 10px;
  background: var(--bg-raised);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 1.3s cubic-bezier(0.22,1,0.36,1);
}
.bar-pct {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}
.bar-item.dominant .bar-label { color: var(--text); font-weight: 600; }
.bar-item.dominant .bar-pct   { color: var(--text); }

/* Style deep-dive */
.deepdive-name {
  font-family: var(--font-h);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-left: 16px;
  border-left: 3px solid;
}
.deepdive-strengths {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 20px;
}
.deepdive-sublabel {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.deepdive-risks {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.deepdive-bullets {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.deepdive-bullets li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}
.deepdive-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* Blind spot */
.blindspot-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 22px;
}
.blindspot-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.blindspot-name {
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.blindspot-text { font-size: 0.87rem; color: var(--text-muted); line-height: 1.65; }

/* AI Debrief */
.debrief-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
  animation: pulse 1.8s ease-in-out infinite;
  padding: 8px 0;
}
.debrief-content { font-size: 0.93rem; line-height: 1.82; color: var(--text-muted); }
.debrief-content p + p { margin-top: 14px; }
.debrief-meta {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.debrief-meta-row { display: flex; gap: 10px; font-size: 0.86rem; }
.debrief-meta-key { color: var(--text-dim); font-weight: 500; white-space: nowrap; min-width: 110px; }
.debrief-meta-val { color: var(--text-muted); }

/* Share */
.share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.btn-share {
  flex: 1;
  min-width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.87rem;
  font-weight: 500;
  padding: 13px 20px;
  transition: background 0.2s, border-color 0.2s;
}
.btn-share:hover { background: var(--bg-raised); border-color: rgba(248,250,252,0.25); }
#share-canvas { display: none; }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD PAGE
═══════════════════════════════════════════════════════════ */
.password-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.gate-card h1 {
  font-family: var(--font-h);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.gate-card p { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 28px; }
.gate-error { font-size: 0.8rem; color: #EF4444; margin-top: 10px; min-height: 1.2em; }

.dash-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 80px 24px 80px;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.dash-header h1 { font-family: var(--font-h); font-size: 1.6rem; font-weight: 600; }
.dash-header p  { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 18px;
  text-align: center;
}
.stat-card__num {
  font-family: var(--font-h);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Distribution chart */
.dist-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 32px;
  margin-bottom: 20px;
}
.dist-section h2 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.dist-rows { display: flex; flex-direction: column; gap: 14px; }
.dist-row {
  display: grid;
  grid-template-columns: 96px 1fr 44px;
  align-items: center;
  gap: 14px;
}
.dist-label { font-size: 0.82rem; color: var(--text-muted); text-align: right; }
.dist-track { height: 8px; background: var(--bg-raised); border-radius: 99px; overflow: hidden; }
.dist-fill  { height: 100%; border-radius: 99px; transition: width 1s; }
.dist-count { font-size: 0.79rem; font-weight: 600; color: var(--text-muted); text-align: right; }

/* Table section */
.table-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 20px;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.table-toolbar h2 { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 7px 14px;
  transition: background 0.2s;
}
.btn-export:hover { background: var(--bg-raised); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.81rem; }
thead tr { background: var(--bg-raised); }
th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.015); }
td.td-name { color: var(--text); font-weight: 500; }

.style-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
}

.table-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.refresh-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: 10px;
}

/* Notice / offline */
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 13px 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Offline toast */
#offline-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--bg-raised);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--r-sm);
  padding: 12px 20px;
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 400px;
  width: calc(100% - 40px);
  text-align: center;
  animation: slideUp 0.3s var(--ease);
}

/* ═══════════════════════════════════════════════════════════
   NPS FEEDBACK WIDGET
═══════════════════════════════════════════════════════════ */
.nps-card {
  background: var(--bg-raised, #fff);
  border: 1px solid var(--border-sm, #e5e7eb);
  border-radius: 8px;
  padding: 24px;
}
.nps-question {
  font-size: 0.94rem;
  color: var(--text, #1e293b);
  margin-bottom: 16px;
  font-weight: 500;
}
.nps-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.nps-btn {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: 1px solid var(--border-md, #cbd5e1);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.nps-btn:hover {
  background: var(--bg-raised, #f1f5f9);
}
.nps-btn.selected {
  background: #1e3a5f;
  border-color: #1e3a5f;
  color: #fff;
}
.nps-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim, #94a3b8);
  margin-bottom: 16px;
}
.nps-text-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.nps-input {
  flex: 1;
  border: 1px solid var(--border-md, #cbd5e1);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text, #1e293b);
  background: var(--bg, #fff);
  outline: none;
  transition: border-color 0.15s;
}
.nps-input:focus { border-color: #1e3a5f; }
.btn-nps-submit {
  background: #1e3a5f;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-nps-submit:hover { background: #152c48; }
.btn-nps-submit:disabled { opacity: 0.6; cursor: default; }
.nps-thanks {
  font-size: 0.88rem;
  color: #16a34a;
  margin-top: 12px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .scenario-card    { padding: 28px 16px 24px; }
  .profile-section  { padding: 24px 18px; }
  .feedback-panel   { padding: 22px 18px; }
  .top-bar          { padding: 0 16px; }
  .bar-item         { grid-template-columns: 76px 1fr 38px; gap: 10px; }
  .share-buttons    { flex-direction: column; }
  .gate-card        { padding: 36px 24px; }
  .dist-section     { padding: 24px 20px; }
  .dist-row         { grid-template-columns: 76px 1fr 38px; gap: 10px; }
}
@media (max-width: 400px) {
  .landing__title   { font-size: 2.2rem; }
  .landing__logo    { font-size: 44px; }
  .bar-item         { grid-template-columns: 62px 1fr 32px; gap: 8px; }
}
