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

*,*::before,*::after {
  scrollbar-width:none;
  -ms-overflow-style:none
}

*::-webkit-scrollbar {
  display:none
}

:root {
  --vh:100vh;
  --footer-height:0px;
  --topbar-height:44px;
  --header-height:100px;
  --footer-gap:0px;
  --p-bg:#ffffff;
  --p-surface:#ffffff;
  --p-surface-2:#ffffff;
  --p-border:#e2e8f0;
  --p-border-soft:#e2e8f0;
  --p-primary:#3b82f6;
  --p-cyan:#38bdf8;
  --p-success:#22c55e;
  --p-text:#1e293b;
  --p-muted:#64748b;
  --p-dim:#94a3b8;

  /* ── Global Typography Scale ─────────────────────────────────────────
     clamp(min, preferred, max) — fluid across screen sizes & OS DPI.
     rem units respect the user's browser default font size setting.
     Body text = --fs-sm. Titles ≥ --fs-lg.
  ──────────────────────────────────────────────────────────────────── */
  --fs-micro:   clamp(0.60rem, 0.56rem + 0.2vw, 0.68rem);
  --fs-xss:     clamp(0.64rem, 0.60rem + 0.2vw, 0.72rem);
  --fs-xs:      clamp(0.68rem, 0.63rem + 0.25vw, 0.76rem);
  --fs-sm:      clamp(0.7rem, 0.68rem + 0.3vw,  0.82rem);
  --fs-base:    clamp(0.75rem, 0.72rem + 0.3vw,  0.86rem);
  --fs-ui:      clamp(0.80rem, 0.75rem + 0.3vw,  0.90rem);
  --fs-md:      clamp(0.85rem, 0.80rem + 0.3vw,  0.95rem);
  --fs-subhead: clamp(0.90rem, 0.85rem + 0.3vw,  1.00rem);
  --fs-lg:      clamp(0.95rem, 0.88rem + 0.4vw,  1.10rem);
  --fs-xl:      clamp(1.05rem, 0.95rem + 0.5vw,  1.25rem);
  --fs-2xl:     clamp(1.25rem, 1.10rem + 0.7vw,  1.60rem);
  --fs-xxl:     clamp(1.50rem, 1.30rem + 1.0vw,  1.90rem);

  /* ── Line Heights ──────────────────────────────────────────────────── */
  --lh-tight:   1.2;
  --lh-normal:  1.5;
  --lh-relaxed: 1.7;

  /* ── Font Weights ──────────────────────────────────────────────────── */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
}

/* ── High-DPI screens (Retina / Windows 125%+ scaling) ──────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  :root { --lh-normal: 1.45; }
}

/* ── Small laptops ≤ 1280px (13" MacBook, 1024px Windows) ───────────────── */
@media (max-width: 1280px) {
  :root {
    --fs-sm:   0.7rem;
    --fs-base: 0.75rem;
    --fs-ui:   0.80rem;
    --fs-md:   0.85rem;
  }
}

body {
  font-family:"Inter","Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  background:#ffffff;
  color:#1e293b;
  height:var(--vh);
  display:flex;
  flex-direction:column;
  padding-bottom:0;
  font-size:var(--fs-base);
  line-height:var(--lh-normal);
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility
}

.topbar {
  background:#172340;
  border-bottom:1px solid rgba(255,255,255,0.08);
  padding:0 1.1rem;
  height:var(--topbar-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem
}

.menu-bar {
  display:flex;
  align-items:center;
  width:100%;
  gap:0.8rem
}

.topbar-right-actions {
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:0.6rem;
  flex-wrap:nowrap
}

/* ── Notification Bell ─────────────────────────────────────────────────── */
.notif-bell-wrap {
  position:relative;
}

.notif-bell-btn {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:20px;
  border:1px solid rgba(255, 255, 255, 0.25);
  background:rgba(148,163,184,0.1);
  color:#ffffff;
  cursor:pointer;
  transition:background 0.15s, color 0.15s, border-color 0.15s;
  padding:0;
}
.notif-bell-btn:hover {
  background:rgba(148,163,184,0.2);
  color:#f8fafc;
  border-color:rgba(148,163,184,0.45);
}
.notif-bell-icon {
  width:17px;
  height:17px;
  flex-shrink:0;
}

/* Badge */
.notif-badge {
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:17px;
  height:17px;
  padding:0 4px;
  border-radius:99px;
  background:#ef4444;
  color:#fff;
  font-size:var(--fs-xss);
  font-weight:700;
  line-height:17px;
  text-align:center;
  pointer-events:none;
  border:2px solid #0f172a;
}
@keyframes notif-bump {
  0%   { transform:scale(1); }
  40%  { transform:scale(1.35); }
  70%  { transform:scale(0.9); }
  100% { transform:scale(1); }
}
.notif-badge-bump {
  animation:notif-bump 0.45s ease;
}

/* Dropdown */
.notif-dropdown {
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  width:330px;
  background:#feffff;
  border:1px solid rgba(148,163,184,0.18);
  border-radius:12px;
  box-shadow:0 8px 32px rgba(0,0,0,0.45);
  z-index:1000;
  overflow:hidden;
}
.notif-dropdown[hidden] {
  display:none;
}

.notif-dropdown-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px 10px;
  border-bottom:1px solid rgba(148,163,184,0.12);
}
.notif-dropdown-title {
  font-size:var(--fs-xss);
  font-weight:700;
  color:#000000;
  letter-spacing:0.04em;
  text-transform:uppercase;
}

.notif-read-all-btn {
  font-size:var(--fs-sm);
  color:#0451af;
  font-weight: 500;
  background:none;
  border:none;
  cursor:pointer;
  padding:2px 4px;
  border-radius:4px;
}


.notif-read-all-btn:hover {
  font-size:var(--fs-sm);
  color:#00152f;
  padding:2px 4px;
  font-weight: 600;
}


/* List */
.notif-list {
  list-style:none;
  margin:0;
  padding:0;
  max-height:360px;
  overflow-y:auto;
}
.notif-empty {
  padding:24px 16px;
  text-align:center;
  color:#000000;
  font-size:var(--fs-sm);
}

/* Item */
.notif-item {
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:11px 14px;
  cursor:pointer;
  border-bottom:1px solid rgba(148,163,184,0.08);
  position:relative;
  transition:background 0.12s;
}
.notif-item:last-child { border-bottom:none; }
.notif-item:hover { background:rgba(148,163,184,0.07); }
.notif-item.is-read { opacity:0.55; }

.notif-item-icon {
  font-size:var(--fs-subhead);
  line-height:1;
  flex-shrink:0;
  margin-top:1px;
}
.notif-item-body {
  flex:1;
  min-width:0;
}
.notif-item-text {
  margin:0 0 3px;
  font-size:var(--fs-xs);
  color:#000000;
  line-height:var(--lh-normal);
}
.notif-item-text strong { color:#000000; }
.notif-item-text em { font-style:italic; color:#000000; }
.notif-item-snippet {
  margin:0 0 4px;
  font-size:var(--fs-xss);
  color:#000000;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.notif-item-time {
  font-size:var(--fs-xss);
  color:#475569;
}
.notif-unread-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#3b82f6;
  flex-shrink:0;
  margin-top:6px;
}

.menu {
  position:relative
}

.menu-button {
  background:rgba(148,163,184,0.15);
  border:1px solid rgba(148,163,184,0.3);
  color:#f8fafc;
  padding:0.35rem 0.8rem;
  border-radius:8px;
  font-size:var(--fs-xs);
  font-weight:var(--fw-semibold);
  cursor:pointer;
  transition:background 0.15s,border-color 0.15s,color 0.15s
}

.nav-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(148,163,184,0.15);
  border: 1px solid rgba(148,163,184,0.3);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.nav-home-btn:hover {
  background: rgba(148,163,184,0.28);
  border-color: rgba(148,163,184,0.5);
  color: #c4b5fd;
}

.menu-button:hover {
  background:rgba(148,163,184,0.28);
  border-color:rgba(148,163,184,0.5);
  color:#ffffff
}

/* Build Learn topbar button — subtle accent */
.menu-button--build-learn {
  background:rgba(99,102,241,0.18);
  border-color:rgba(99,102,241,0.4);
  color:#c4b5fd
}

.menu-button--build-learn:hover {
  background:rgba(99,102,241,0.3);
  border-color:rgba(99,102,241,0.65);
  color:#ffffff
}

.menu-section {
  display:flex;
  flex-direction:column;
  gap:0.2rem
}

.menu-dropdown {
  position:absolute;
  top:calc(100% + 0.4rem);
  left:0;
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(15,23,42,0.1);
  padding:0.5rem;
  min-width:180px;
  display:none;
  z-index:20
}

.menu-dropdown.open {
  display:block
}

.menu-item {
  display:flex;
  width:100%;
  border:none;
  background:transparent;
  text-align:left;
  padding:0.4rem 0.6rem;
  border-radius:8px;
  font-size:var(--fs-sm);
  cursor:pointer;
  color:#475569;
  transition:background 0.12s,color 0.12s
}

.menu-item:hover {
  background:#f1f5f9;
  color:#0f172a
}

.tab-dirty {
  color:#ffffff;
  font-size:var(--fs-lg);
  line-height:1
}

.menu-item:hover {
  background:#e2e8f0
}

.menu-item.active {
  background:#eff6ff;
  color:#1d4ed8
}

.roadmap-panel {
  display:flex;
  flex-direction:column;
  gap:1rem;
  height:100%;
  background:#ffffff
}

.roadmap-beta-banner {
  display:flex;
  align-items:center;
  gap:0.65rem;
  padding:0.5rem 0.7rem;
  background:linear-gradient(135deg,#fff7ed,#fffbeb);
  border:1px solid #fed7aa;
  border-radius:12px;
  color:#9a3412;
  box-shadow:0 6px 14px rgba(251,146,60,0.06)
}

.roadmap-beta-banner strong {
  font-size:var(--fs-sm);
  line-height:var(--lh-tight)
}

.roadmap-beta-banner p {
  margin-top:0.05rem;
  color:#9a3412;
  line-height:var(--lh-normal);
  font-size:var(--fs-xss)
}

.roadmap-beta-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  padding:0.18rem 0.46rem;
  border-radius:999px;
  background:#f97316;
  color:#fff;
  font-size:var(--fs-xss);
  font-weight:var(--fw-bold);
  letter-spacing:0.04em;
  text-transform:uppercase
}

.roadmap-center-view {
  position:absolute;
  inset:0;
  padding:0.6rem;
  overflow:auto;
  background:#ffffff
}

.roadmap-progress-card,.roadmap-subtopic-card,.roadmap-locked-card,.roadmap-topic-item {
  background:#ffffff;
  border:1px solid #dbe4f0;
  border-radius:16px
}

.roadmap-main,.roadmap-progress {
  min-height:0
}

.roadmap-progress,.roadmap-main {
  display:flex;
  flex-direction:column;
  gap:0.7rem
}

.roadmap-sidebar-header {
  display:flex;
  align-items:center;
  justify-content:space-between
}

.roadmap-filter {
  display:flex;
  flex-direction:column;
  gap:0.35rem;
  font-size:var(--fs-xs);
  font-weight:var(--fw-semibold);
  color:#475569
}

.roadmap-filter-select {
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:0.75rem;
  background:#ffffff;
  color:#0f172a;
  padding:0.7rem 0.85rem;
  font:inherit
}

.roadmap-filter-select:focus {
  outline:none;
  border-color:#60a5fa;
  box-shadow:0 0 0 3px rgba(96,165,250,0.22)
}

.roadmap-count,.roadmap-level-count {
  font-size:var(--fs-xss);
  color:#64748b;
  font-weight:var(--fw-semibold)
}

.roadmap-topic-list,.roadmap-detail {
  display:flex;
  flex-direction:column;
  gap:0.8rem;
  overflow:auto;
  background:#ffffff
}

.roadmap-topic-item {
  display:flex;
  align-items:flex-start;
  gap:0.8rem;
  width:100%;
  padding:0.85rem;
  cursor:pointer;
  text-align:left;
  transition:transform 0.15s ease,box-shadow 0.15s ease,border-color 0.15s ease
}

.roadmap-topic-item:hover {
  transform:translateY(-1px);
  border-color:#93c5fd;
  box-shadow:0 10px 22px rgba(59,130,246,0.08)
}

.roadmap-topic-item.active {
  border-color:#3b82f6;
  box-shadow:0 10px 20px rgba(59,130,246,0.09)
}

.roadmap-topic-order {
  width:2rem;
  height:2rem;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:800;
  flex-shrink:0
}

.roadmap-topic-copy {
  display:flex;
  flex-direction:column;
  gap:0.28rem
}

.roadmap-topic-copy strong {
  font-size:var(--fs-sm);
  line-height:var(--lh-tight);
  color:#0f172a
}

.roadmap-topic-copy small {
  color:#64748b;
  line-height:var(--lh-normal);
  font-size:var(--fs-xss)
}

.roadmap-locked-hint {
  color:#9a3412;
  font-weight:700
}

#left-panel .panel-header {
  position:relative;
  padding:0 1rem;
  border-bottom:1px solid rgba(226,232,240,0.9)
}

#left-panel .panel-header #toggle-left-panel {
  position:absolute;
  left:1rem;
  top:50%;
  transform:translateY(-50%);
  z-index:2
}

.learn-left-tabs {
  display:flex;
  gap:0;
  justify-content:center;
  align-items:center
}

.learn-left-tabs {
  background:#f1f5f9;
  border:1px solid rgba(203,213,225,0.95);
  border-radius:999px;
  width:fit-content;
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  box-shadow:0 10px 24px rgba(2,6,23,0.06);
  z-index:6
}

.learn-right-panel-tip-list {
  margin-left:1.1rem;
  color:#334155;
  line-height:1.5
}

.roadmap-locked-card {
  padding:1rem;
  background:linear-gradient(180deg,#fff7ed,#ffffff);
  border-style:dashed
}

.roadmap-locked-card p {
  color:#7c2d12;
  margin:0.5rem 0 0.9rem;
  line-height:1.45
}

.roadmap-level-locked {
  opacity:0.92
}

.roadmap-locked-level-banner {
  display:flex;
  align-items:center;
  gap:10px;
  background:linear-gradient(135deg,#fefce8 0%,#fef9c3 100%);
  border:1px dashed #fbbf24;
  border-radius:10px;
  padding:12px 16px;
  font-size:var(--fs-sm);
  color:#78350f;
  margin-top:6px
}

.roadmap-lock-icon {
  flex-shrink:0;
  color:#d97706;
  opacity:0.85
}

.roadmap-subtopic-card--locked {
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:10px;
  padding:10px 14px;
  opacity:0.7;
  pointer-events:none
}

.roadmap-subtopic-card--locked .roadmap-subtopic-title {
  display:flex;
  align-items:center;
  gap:7px;
  color:#94a3b8;
  font-size:var(--fs-sm);
  margin:0
}

.roadmap-subtopic-lock {
  flex-shrink:0;
  color:#94a3b8
}

.pricing-plan-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0.9rem;
  align-items:stretch;
  width:100%;
  visibility:visible;
  opacity:1
}

.pricing-plan-card {
  border:2px solid #d4dbe7;
  border-radius:20px;
  background:#ffffff;
  padding:1.1rem 1rem 1rem;
  display:flex;
  flex-direction:column;
  gap:0.7rem;
  box-shadow:none;
  position:relative;
  min-height:100%;
  visibility:visible;
  opacity:1
}

.pricing-plan-card.recommended {
  border:2px solid #3b82f6;
  box-shadow:0 0 0 1px rgba(59,130,246,0.02),0 10px 24px rgba(59,130,246,0.10)
}

.pricing-plan-card--free {
  background:linear-gradient(180deg,#f7f8fb 0%,#ffffff 68%)
}

.pricing-plan-card--basic {
  background:linear-gradient(180deg,#dfeafb 0%,#edf7ff 52%,#ffffff 100%)
}

.pricing-plan-card--pro {
  background:linear-gradient(180deg,#ece8ff 0%,#eef3ff 52%,#ffffff 100%)
}

.pricing-plan-card--elite {
  background:linear-gradient(180deg,#fff0da 0%,#fff4ee 52%,#ffffff 100%)
}

.pricing-plan-card.current {
  background:linear-gradient(180deg,#f8fafc,#ffffff);
  border-color:#0f172a;
  box-shadow:0 10px 24px rgba(15,23,42,0.06)
}

.pricing-plan-top-badge {
  position:absolute;
  top:-14px;
  left:50%;
  transform:translateX(-50%);
  min-width:124px;
  padding:0.45rem 0.95rem;
  border-radius:999px;
  background:#2f67e8;
  color:#ffffff;
  text-align:center;
  font-size:var(--fs-xs);
  font-weight:800;
  line-height:1.15;
  box-shadow:0 8px 18px rgba(47,103,232,0.28)
}

.pricing-plan-card-head {
  display:flex;
  flex-direction:column;
  gap:0.25rem;
  align-items:center;
  text-align:center
}

.plan-name-row {
  display:flex;
  align-items:center;
  gap:0.5rem;
  flex-wrap:wrap;
  justify-content:center
}

.pricing-current-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.26rem 0.64rem;
  border-radius:999px;
  background:#eef1f6;
  color:#374151;
  font-size:var(--fs-xss);
  font-weight:800;
  letter-spacing:0.01em
}

.plan-name-row h3 {
  margin:0;
  font-size:var(--fs-md);
  font-weight:800;
  color:#0f172a
}

.pricing-plan-price {
  display:block;
  margin:0;
  color:#0f172a;
  font-size:var(--fs-base);
  font-weight:900;
  text-align:center;
  letter-spacing:-0.02em
}

.pricing-feature-list {
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:0.55rem;
  color:#334155;
  padding:0;
  margin:0
}

.pricing-feature-list li {
  display:grid;
  grid-template-columns:20px 1fr;
  gap:0.72rem;
  align-items:start
}

.feature-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  line-height:1
}

.feature-icon svg {
  width:18px;
  height:18px
}

.feature-icon-check {
  color:#5b6b86
}

.feature-icon-lock {
  color:#b7a86a
}

.pricing-feature-list li div {
  display:flex;
  flex-direction:column;
  gap:0.08rem
}

.pricing-feature-list strong {
  color:#0f172a;
  font-size:var(--fs-sm);
  line-height:1.2
}

.pricing-feature-list span {
  color:#526072;
  line-height:1.28;
  font-size:var(--fs-xs)
}

.plan-action {
  margin-top:auto;
  padding-top:0.25rem
}

.plan-action .button {
  width:100%;
  min-height:38px;
  border-radius:14px;
  font-size:var(--fs-sm);
  font-weight:800;
  box-shadow:none;
  border:1px solid transparent
}

.plan-action .button:not(.primary) {
  background:#f4f5f7;
  border-color:#f0f2f6;
  color:#1f2937
}

.plan-action .button.primary {
  background:#2f67e8;
  border-color:#2f67e8;
  color:#ffffff;
  box-shadow:0 8px 16px rgba(47,103,232,0.25)
}

.plan-action .button:disabled {
  opacity:1
}

.learn-question-item.is-locked {
  border:1px dashed #fdba74;
  background:linear-gradient(180deg,#fff7ed,#ffffff)
}

.learn-lock-pill {
  background:#fff1f2;
  color:#be123c
}

.learn-lock-icon-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:38px;
  border-radius:999px;
  border:1px solid #d7dce5;
  background:linear-gradient(180deg,#f8fafc,#eef2f7);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.7);
  color:#475467;
  flex-shrink:0
}

.learn-lock-icon-badge svg {
  width:18px;
  height:18px;
  fill:currentColor
}

@media (max-width:900px) {
  .pricing-plan-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }

}

@media (max-width:520px) {
  .pricing-plan-grid {
    grid-template-columns:1fr
  }
  .pricing-plan-card {
    padding-top:2rem
  }

}

.learn-left-tabs .tab-button {
  border:0;
  background:transparent;
  padding:8px 14px;
  border-radius:999px;
  font-weight:700;
  font-size:var(--fs-xs);
  color:#334155
}

.learn-left-tabs .tab-button.active {
  background:#fff;
  color:#0f172a;
  box-shadow:0 10px 22px rgba(2,6,23,0.10)
}

.learn-left-tabs .tab-button:focus {
  outline:2px solid rgba(99,102,241,0.40);
  outline-offset:2px
}

.learn-left-design .learn-design-controls {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:12px;
  padding:10px 12px
}

.learn-design-search {
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  font-size:var(--fs-base);
  color:#334155;
  font-weight:700
}

#learn-question-search {
  padding:8px 12px;
  border:1px solid rgba(148,163,184,0.85);
  border-radius:12px;
  background:rgba(255,255,255,0.95);
  font-size:var(--fs-sm);
  font-weight:500;
  min-width:220px
}

#learn-question-search:focus,#learn-difficulty-filter:focus {
  outline:2px solid rgba(99,102,241,0.28);
  outline-offset:2px;
  border-color:rgba(99,102,241,0.55)
}

.learn-design-filter {
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  font-size:var(--fs-base);
  color:#334155;
  font-weight:700
}

#learn-difficulty-filter {
  padding:8px 12px;
  border:1px solid rgba(148,163,184,0.85);
  border-radius:12px;
  background:rgba(255,255,255,0.95);
  font-size:var(--fs-sm);
  font-weight:600;
  min-width:120px
}

.learn-question-list {
  max-height:calc(100vh - 240px);
  overflow:auto
}

.learn-question-item {
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:12px 12px;
  border:1px solid rgba(226,232,240,0.95);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(255,255,255,0.98) 0%,rgba(241,245,249,0.9) 100%);
  margin-bottom:12px;
  cursor:pointer
}

.learn-question-item[data-difficulty="easy"] {
  border-color:rgba(134,239,172,0.45);
  background:linear-gradient(180deg,rgba(255,255,255,0.99) 0%,rgba(220,252,231,0.40) 100%)
}

.learn-question-item[data-difficulty="medium"] {
  border-color:rgba(253,230,138,0.55);
  background:linear-gradient(180deg,rgba(255,255,255,0.99) 0%,rgba(254,243,199,0.48) 100%)
}

.learn-question-item[data-difficulty="hard"] {
  border-color:rgba(252,165,165,0.55);
  background:linear-gradient(180deg,rgba(255,255,255,0.99) 0%,rgba(254,226,226,0.55) 100%)
}

.learn-question-item:hover {
  border-color:rgba(99,102,241,0.45);
  box-shadow:0 10px 24px rgba(2,6,23,0.08)
}

.learn-question-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px
}

.learn-question-title {
  font-weight:700;
  font-size:var(--fs-sm);
  color:#0f172a
}

.learn-question-meta {
  display:flex;
  gap:8px;
  align-items:center;
  font-size:var(--fs-xs);
  color:#475569
}

.learn-lock-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#64748b
}

.learn-lock-icon svg {
  width:16px;
  height:16px;
  display:block
}

.learn-question-desc {
  font-size:var(--fs-xs);
  line-height:1.4;
  color:#475569
}

#left-panel {
  font-size:var(--fs-base)
}

#left-panel h2,#left-panel .panel-header h2 {
  font-size:var(--fs-md);
  letter-spacing:0.2px
}

.roadmap-empty-state {
  padding:1rem;
  border:1px dashed #bfd1ea;
  border-radius:14px;
  background:rgba(255,255,255,0.7);
  color:#475569
}

.roadmap-empty-state h4,.roadmap-progress-card h4,.roadmap-topic-detail-header h3,.roadmap-subtopic-card h5 {
  font-size:var(--fs-base)
}

.roadmap-empty-state p,.roadmap-progress-card p,.roadmap-level-count,.roadmap-content-block p,.roadmap-content-block ul,.roadmap-notes-list {
  font-size:var(--fs-base)
}

.roadmap-content-block ul {
  margin:0.35rem 0 0.2rem 1.1rem;
  padding-left:0.25rem;
  line-height:1.55
}

.roadmap-content-block li {
  margin:0.2rem 0
}

.roadmap-topic-detail-header,.roadmap-level-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.75rem
}

.roadmap-topic-detail-header h3 {
  margin:0;
  line-height:1.2;
  color:#0f172a
}

.roadmap-topic-level {
  display:inline-flex;
  align-items:center;
  font-size:var(--fs-xss);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:#475569;
  white-space:nowrap;
  padding:3px 10px;
  border-radius:999px;
  background:#e2e8f0
}

.roadmap-topic-level-beginner {
  background:#dcfce7;
  color:#15803d
}

.roadmap-topic-level-intermediate {
  background:#fef9c3;
  color:#a16207
}

.roadmap-topic-level-advanced {
  background:#ede9fe;
  color:#6d28d9
}

.roadmap-level-header {
  justify-content:flex-end
}

.roadmap-level-section {
  display:flex;
  flex-direction:column;
  gap:0.75rem
}

.roadmap-subtopic-list {
  display:flex;
  flex-direction:column;
  gap:0.8rem
}

.roadmap-subtopic-card,.roadmap-locked-card,.roadmap-progress-card {
  padding:0.9rem 0.95rem
}

.roadmap-subtopic-card h5 {
  margin:0;
  line-height:1.2;
  color:#0f172a
}

.roadmap-subtopic-title {
  text-align:center
}

.roadmap-subtopic-actions {
  display:flex;
  justify-content:flex-end;
  margin-top:0.9rem
}

.roadmap-learn-link {
  display:inline-flex;
  align-items:center;
  gap:0.45rem;
  padding:0.5rem 0.8rem;
  border-radius:999px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:var(--fs-sm);
  font-weight:700;
  cursor:pointer;
  transition:background 0.15s ease,border-color 0.15s ease,transform 0.15s ease
}

.roadmap-learn-link:hover {
  background:#dbeafe;
  border-color:#93c5fd;
  transform:translateY(-1px)
}

.roadmap-content-block {
  display:flex;
  flex-direction:column;
  gap:0.25rem;
  margin-top:0.85rem
}

.roadmap-content-block p,.roadmap-locked-card,.roadmap-progress-card p {
  color:#334155;
  line-height:1.55
}

.roadmap-notes-list {
  margin:0.75rem 0 0 1rem;
  color:#334155;
  line-height:1.6
}

.roadmap-notes-list li + li {
  margin-top:0.4rem
}

.roadmap-content-block ul {
  margin-left:1rem;
  color:#334155;
  line-height:1.55
}

.roadmap-content-block li + li {
  margin-top:0.3rem
}

@media (max-width:1280px) {
  .roadmap-center-view {
    padding:0.5rem
  }

}

.pricing-cards {
  margin-top:1rem;
  min-height:220px;
  display:block;
  width:100%;
  visibility:visible;
  opacity:1;
  overflow:visible
}

.pricing-comparison-section {
  margin-top:1.75rem
}

.pricing-comparison-title {
  margin:0 0 0.8rem;
  font-size:var(--fs-md);
  font-weight:800;
  color:#0f172a
}

.pricing-comparison-table {
  width:100%
}

.pricing-compare-scroll {
  width:100%;
  overflow-x:auto;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#ffffff
}

.pricing-compare-table {
  width:100%;
  min-width:760px;
  border-collapse:collapse
}

.pricing-compare-table th,.pricing-compare-table td {
  padding:0.9rem 1rem;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
  vertical-align:middle
}

.pricing-compare-table thead th {
  background:#f8fafc;
  color:#0f172a;
  font-size:var(--fs-base);
  font-weight:800
}

.pricing-compare-table tbody td:first-child {
  font-weight:700;
  color:#0f172a;
  white-space:nowrap
}

.pricing-compare-table tbody tr:last-child td {
  border-bottom:none
}

.pricing-table-value {
  color:#475569;
  font-size:var(--fs-base);
  line-height:1.4
}

.pricing-beta-note {
  margin:0.5rem auto 0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.45rem 0.9rem;
  border-radius:999px;
  border:1px solid rgba(37,99,235,0.18);
  background:linear-gradient(135deg,rgba(37,99,235,0.12),rgba(59,130,246,0.2));
  color:#1d4ed8;
  font-size:var(--fs-sm);
  font-weight:800;
  letter-spacing:0.08em;
  text-transform:uppercase;
  box-shadow:0 10px 30px rgba(37,99,235,0.12)
}

.pricing-plan-empty {
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:0.5rem;
  min-height:220px;
  border:1px dashed #cbd5e1;
  border-radius:18px;
  background:#f8fafc;
  color:#475569;
  text-align:center;
  padding:1.25rem
}

.pricing-footer {
  margin-top:1rem;
  gap:0.55rem
}

.pricing-beta-notice {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:1rem 0 0;
  padding:12px 16px;
  background:rgba(99,102,241,0.08);
  border:1px solid rgba(99,102,241,0.25);
  border-radius:10px;
  color:#3730a3;
  font-size:var(--fs-sm);
  line-height:1.5
}

.pricing-beta-notice svg {
  flex-shrink:0;
  margin-top:2px;
  color:#6366f1
}

.pricing-beta-notice strong {
  color:#3730a3
}

.pricing-plan-card .plan-action button:disabled {
  opacity:0.45;
  cursor:not-allowed;
  pointer-events:none
}

.pricing-footer .modal-helper {
  color:#64748b
}

#pricing-current-plan {
  display:block;
  font-size:var(--fs-md);
  color:#0f172a;
  font-weight:700;
  text-transform:uppercase
}

#pricing-current-plan strong {
  font-weight:900;
  letter-spacing:0.04em
}

#pricing-trial-note {
  display:none
}

#usage-widget {
  margin-top:0.35rem
}

.pricing-plan-empty h3 {
  color:#0f172a;
  font-size:var(--fs-md)
}

.pricing-compare {
  display:table;
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border-radius:18px;
  overflow:hidden;
  background:#ffffff;
  box-shadow:0 4px 24px rgba(15,23,42,0.09);
  border:1px solid #e2e8f0
}

.pricing-compare-head,.pricing-compare-body {
  display:table-row-group
}

.pricing-compare-row {
  display:table-row
}

.pricing-compare-cell {
  display:table-cell;
  vertical-align:middle;
  padding:11px 18px;
  border-bottom:1px solid #e9eef6;
  font-size:var(--fs-base);
  color:#0f172a
}

.pricing-compare-cell:first-child {
  width:42%
}

.pricing-compare-cell:nth-child(2) {
  width:19%
}

.pricing-compare-cell:nth-child(3) {
  width:19%
}

.pricing-compare-cell:nth-child(4) {
  width:20%
}

.pricing-compare-header .pricing-compare-cell {
  background:#f8fafc;
  border-bottom:2px solid #e2e8f0;
  padding:14px 18px
}

.pricing-compare-header .feature-col {
  font-size:var(--fs-sm);
  text-transform:uppercase;
  letter-spacing:0.08em;
  font-weight:700;
  color:#64748b
}

.plan-head {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  text-align:center
}

.plan-name {
  font-size:var(--fs-lg);
  font-weight:800;
  color:#0f172a;
  letter-spacing:-0.01em
}

.pricing-compare-cell.col-pro {
  background:rgba(29,78,216,0.04)
}

.pricing-compare-header .col-pro {
  background:rgba(29,78,216,0.08);
  border-bottom:2px solid rgba(29,78,216,0.3)
}

.pricing-compare-header .col-pro .plan-name {
  color:#1d4ed8
}

.pricing-compare-cell.feature-col {
  font-weight:600;
  color:#1e293b;
  font-size:var(--fs-base)
}

.pricing-compare-body .pricing-compare-cell:not(.feature-col) {
  text-align:center
}

.pricing-compare-body .pricing-compare-row:nth-child(even) .pricing-compare-cell {
  background:rgba(241,245,249,0.5)
}

.pricing-compare-body .pricing-compare-row:nth-child(even) .pricing-compare-cell.col-pro {
  background:rgba(29,78,216,0.05)
}

.tick {
  display:inline-flex;
  width:28px;
  height:28px;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  font-weight:900;
  font-size:var(--fs-base);
  line-height:1;
  border:1.5px solid transparent
}

.tick.on {
  color:#16a34a;
  background:rgba(22,163,74,0.10);
  border-color:rgba(22,163,74,0.30)
}

.tick.off {
  color:#cbd5e1;
  background:rgba(148,163,184,0.08);
  border-color:rgba(148,163,184,0.20)
}

.pricing-compare-actions .pricing-compare-cell {
  background:#f8fafc;
  border-top:2px solid #e2e8f0;
  border-bottom:none;
  padding:16px 18px
}

.pricing-compare-actions .col-pro {
  background:rgba(29,78,216,0.06);
  border-top:2px solid rgba(29,78,216,0.3)
}

.plan-action {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  text-align:center
}

.plan-price {
  font-size:var(--fs-sm);
  color:#334155;
  font-weight:700
}

.plan-action .button {
  width:100%;
  padding:9px 10px;
  border-radius:14px;
  font-size:var(--fs-base);
  font-weight:700
}

.plan-action .button.primary {
  box-shadow:0 6px 16px rgba(29,78,216,0.28)
}

.pricing-footer {
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:4px
}

@media (max-width:680px) {
  .pricing-compare-cell {
    padding:10px 10px
  }
  .pricing-compare-cell.feature-col {
    font-size:var(--fs-sm)
  }

}

@media (max-width:760px) {
  .pricing-cards {
    grid-template-columns:1fr
  }

}

@media (max-width:980px) {
  .pricing-cards {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }

}

.pricing-card {
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#ffffff;
  padding:14px;
  box-shadow:0 12px 26px rgba(15,23,42,0.08);
  display:flex;
  flex-direction:column;
  gap:10px
}

.pricing-card.featured {
  border-color:rgba(29,78,216,0.35);
  background:linear-gradient(180deg,rgba(29,78,216,0.06),#ffffff 40%)
}

.pricing-card-top h3 {
  font-size:var(--fs-md);
  margin-bottom:4px
}

.pricing-price {
  font-weight:800;
  color:#0f172a
}

.pricing-tag {
  color:#475569;
  font-size:var(--fs-sm)
}

.pricing-features {
  list-style:none;
  padding-left:0;
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#0f172a
}

.pricing-features li {
  position:relative;
  padding-left:18px;
  line-height:1.35
}

.pricing-features li::before {
  content:"✓";
  position:absolute;
  left:0;
  top:0;
  color:#16a34a;
  font-weight:800
}

.pricing-features li.feature-on::before {
  content:"✓";
  color:#16a34a
}

.pricing-features li.feature-off {
  color:#64748b
}

.pricing-features li.feature-off::before {
  content:"✓";
  color:#94a3b8
}

.pricing-footer {
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:4px
}

.menu-divider {
  height:1px;
  background:#e2e8f0;
  margin:0.35rem 0.4rem
}

.menu-section {
  display:flex;
  flex-direction:column;
  gap:0.2rem
}

.menu-title {
  font-size:var(--fs-micro);
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:#64748b;
  padding:0.2rem 0.6rem 0.1rem
}

.header {
  padding:0 1.4rem;
  height:var(--header-height);
  background:linear-gradient(135deg,#0f182b,#0f182b 60%);
  border-bottom:1px solid rgba(148,163,184,0.2);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem
}

.brand {
  display:flex;
  align-items:center;
  gap:0.6rem
}

.brand-logo {
  width:38px;
  height:38px;
  object-fit:contain
}

.header h1 {
  font-size:var(--fs-xl);
  font-weight:800;
  letter-spacing:0.04em;
  margin-bottom:0.1rem;
  color:#f8fafc
}

.header p {
  color:#94a3b8;
  font-size:var(--fs-xss);
  line-height:1.3
}

.header-actions {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:0.35rem
}

.auth-controls {
  display:flex;
  align-items:center;
  gap:0.5rem;
  margin-left:auto
}

.user-chip {
  display:inline-flex;
  align-items:center;
  position:relative
}

.user-avatar {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  width:36px;
  height:36px;
  border-radius:50%;
  border:1px solid #334155;
  background:rgba(89,132,232,0.6);
  color:#f8fafc;
  font-weight:700;
  font-size:var(--fs-base);
  cursor:pointer;
  transition:border-color 0.2s ease,box-shadow 0.2s ease
}

.user-avatar-image {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}

.user-avatar:hover {
  border-color:#60a5fa;
  box-shadow:0 0 0 2px rgba(96,165,250,0.25)
}

.profile-dropdown {
  right:0;
  left:auto;
  min-width:200px
}

.mode-toggle {
  display:inline-flex;
  background:#1f2937;
  border-radius:999px;
  padding:4px;
  border:1px solid #334155;
  gap:4px
}

.mode-button {
  border:none;
  background:transparent;
  color:#cbd5f5;
  font-size:var(--fs-base);
  font-weight:600;
  padding:0.35rem 0.9rem;
  border-radius:10px;
  cursor:pointer;
  transition:all 0.2s ease;
  width:140px
}

.mode-button.active {
  background:#f8fafc;
  color:#3b6eb9
}

.preset-picker select {
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  background-color:#326aee;
  color:#f8fafc;
  border-radius:30px;
  border:1px solid #334155;
  padding:0.35rem 2.1rem 0.35rem 0.9rem;
  font-size:var(--fs-base);
  min-width:240px;
  line-height:1.25rem;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:12px 12px
}

.preset-picker select option,.stage-picker select option {
  background:#ffffff;
  color:#0f172a
}

.preset-picker select:focus {
  outline:2px solid #93c5fd;
  outline-offset:2px
}

.learn-controls {
  display:inline-flex;
  align-items:center;
  gap:0.5rem
}

.learn-controls .mode-button {
  background:#0f172a;
  color:#e2e8f0;
  border:1px solid #334155;
  border-radius:30px
}

.learn-controls .mode-button.active,.learn-controls .mode-button[aria-pressed="true"] {
  background:#38bdf8;
  color:#0f172a
}

.stage-picker select {
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  background-color:#0f172a;
  color:#f8fafc;
  border-radius:30px;
  border:1px solid #334155;
  padding:0.35rem 2.1rem 0.35rem 0.9rem;
  font-size:var(--fs-base);
  min-width:250px;
  line-height:1.25rem;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:12px 12px
}

select::-ms-expand {
  display:none
}

.preset-picker select:focus,.stage-picker select:focus {
  outline:2px solid #93c5fd;
  outline-offset:2px
}

@media (forced-colors:active) {
  .preset-picker select,.stage-picker select {
    background-color:Canvas;
    color:CanvasText;
    border-color:CanvasText;
    background-image:none
  }

}

.hidden {
  display:none!important
}

.badge {
  background:#f97316;
  color:#ffffff;
  border:none;
  padding:0.25rem 0.65rem;
  border-radius:999px;
  font-size:var(--fs-micro);
  font-weight:700;
  letter-spacing:0.06em;
  text-transform:uppercase
}

.layout {
  --left-panel-w:clamp(199px,16.7vw,293px);
  --right-panel-w:clamp(209px,17.1vw,285px);
  display:grid;
  grid-template-columns:var(--left-panel-w) 1fr var(--right-panel-w);
  grid-template-rows:1fr;
  grid-auto-rows:1fr;
  gap:clamp(0.5rem,1.2vw,1.5rem);
  padding:clamp(0.5rem,0.8vw,1.1rem) clamp(0.5rem,1vw,1.5rem) clamp(0.8rem,1vw,1.5rem);
  flex:1;
  position:relative;
  height:calc(var(--vh) - var(--header-height) - var(--topbar-height) - var(--wab-height, 0px) - var(--footer-height));
  max-height:calc(var(--vh) - var(--header-height) - var(--topbar-height) - var(--wab-height, 0px) - var(--footer-height));
  align-items:stretch;
  align-content:stretch;
  overflow:hidden;
  contain:layout style
}

.layout.left-collapsed {
  grid-template-columns:0 1fr var(--right-panel-w)
}

.layout.right-collapsed {
  grid-template-columns:var(--left-panel-w) 1fr 0
}

.layout.left-collapsed.right-collapsed {
  grid-template-columns:0 1fr 0
}

#left-resize-handle {
  position:absolute;
  right:0;
  top:0;
  bottom:0;
  width:6px;
  cursor:col-resize;
  z-index:10;
  background:transparent;
  transition:background 0.15s
}

#left-resize-handle:hover,#left-resize-handle.dragging {
  background:rgba(99,102,241,0.25)
}

#right-resize-handle {
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:6px;
  cursor:col-resize;
  z-index:10;
  background:transparent;
  transition:background 0.15s
}

#right-resize-handle:hover,#right-resize-handle.dragging {
  background:rgba(99,102,241,0.25)
}

#left-panel {
  position:relative;
  transition:all 0.25s ease;
  background:#ffffff
}

#right-panel {
  /* position:relative; */
  transition:all 0.25s ease;
  gap:0;
  height:100%;
  max-height:100%;
  overflow:visible;
  display:flex;
  flex-direction:column;
  background:#ffffff;
  font-size:var(--fs-md)
}

/* (#right-panel .panel-header h2 rule merged into canonical block — see ~line 9966) */

#right-panel .output {
  font-size:var(--fs-base);
  color:#ffffff;
  flex:1;
  min-height:0;
  overflow:auto;
  scrollbar-width:none
}

#right-panel .output::-webkit-scrollbar {
  width:0;
  height:0
}

#right-panel .result-block {
  background:#ffffff;
  border:1px solid #e2e8f0;
  box-shadow:0 6px 12px rgba(15,23,42,0.06)
}

#right-panel .result-block h4 {
  font-size:var(--fs-sm)
}

.pw-checklist {
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
  max-width:360px;
  font-size:var(--fs-base);
  color:#5b6270
}

.pw-checklist .pw-rule {
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 8px;
  border-radius:8px;
  background:transparent;
  transition:all 220ms ease
}

.pw-checklist .pw-rule::before {
  content:'\2716';
  display:inline-block;
  width:18px;
  height:18px;
  line-height:18px;
  text-align:center;
  border-radius:50%;
  background:#f1f5f9;
  color:#334155;
  font-size:var(--fs-xs)
}

.pw-checklist .pw-rule.met {
  color:#065f46;
  opacity:0.85
}

.pw-checklist .pw-rule.met::before {
  content:'\2714';
  background:#bbf7d0;
  color:#065f46
}

.pw-checklist .pw-rule.removed {
  opacity:0;
  transform:translateX(8px) scale(0.98)
}

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

#simulate-view {
  display:flex;
  flex-direction:column;
  min-height:0;
  flex:1;
  gap:0
}

#simulate-view .simulation-panel {
  flex:1;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column
}

#practice-content {
  flex:1 1 0;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:0;
  margin-top:10px;
}

.learn-sticky-header {
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  gap:0;
  padding-bottom:10px;
  position:relative;
  z-index:2;
  overflow:visible
}

/* practice mode: preset selector moved to WAB — sticky header is empty, hide it */
body.practice-mode #learn-sticky-header {
  display:none !important
}

.practice-header-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 10px;
  border-bottom:1px solid rgba(226,232,240,0.9)
}

.practice-header-title {
  margin:0;
  font-size:var(--fs-base);
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:#0f172a
}

.stage-theory {
  flex:1 1 0;
  min-height:0;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:10px 10px 0 10px;
  border-top:1px solid #e6eefc
}

.stage-theory.hidden {
  display:none
}

#simulation-content {
  flex:1;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden
}

.simulation-panel {
  display:flex;
  flex-direction:column;
  gap:12px;
  flex:1;
  min-height:0;
  overflow:hidden;
}

.practice-setup {
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:6px 0 8px 0
}

.practice-setup.hidden {
  display:none
}

.learn-right-panel-tip {
  margin:10px 10px 0 10px;
  padding:14px 14px;
  border-radius:16px;
  border:1px solid rgba(203,213,225,0.7);
  background:#ffffff;
  box-shadow:0 14px 30px rgba(2,6,23,0.06)
}

.learn-right-panel-tip.hidden {
  display:none
}

.learn-right-panel-tip h4 {
  font-size:var(--fs-base);
  font-weight:800;
  color:#0f172a;
  margin-bottom:6px
}

.learn-right-panel-tip p {
  color:#475569;
  line-height:1.45;
  font-size:var(--fs-base)
}

.practice-setup label {
  font-size:var(--fs-xss);
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:#64748b;
  margin-bottom:6px;
  display:block
}

.practice-setup select {
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  background:rgba(148,163,184,0.15);
  border:1px solid rgba(148,163,184,0.3);
  color:#0f172a;
  padding:0.45rem 2.1rem 0.45rem 0.8rem;
  border-radius:10px;
  font-size:var(--fs-base);
  font-weight:600;
  cursor:pointer;
  min-width:240px;
  max-width:420px;
  line-height:1.25rem;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:12px 12px
}

.practice-setup select:focus {
  outline:2px solid rgba(147,197,253,0.9);
  outline-offset:2px
}

.practice-setup select:disabled {
  opacity:0.6
}

/* ── Hide native select, keep it in DOM for JS ── */
.pcs-native-hidden {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
  overflow:hidden;
  clip:rect(0,0,0,0)
}

/* ── Custom preset dropdown wrapper ── */
.preset-custom-select {
  position:relative;
  width:100%
}

/* ── Trigger button (closed state) ── */
.pcs-trigger {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:0.6rem 0.9rem;
  background: transparent;
  border:1.5px solid #e2e8f0;
  border-radius:12px;
  font-size:var(--fs-sm);
  font-weight:500;
  color:#1e293b;
  cursor:pointer;
  text-align:left;
  gap:8px;
  box-shadow:0 1px 4px rgba(15,23,42,0.06);
  transition:border-color 0.15s,box-shadow 0.15s;
  font-family:inherit
}

.pcs-trigger:hover {
  border-color:#93c5fd;
  box-shadow:0 2px 8px rgba(59,130,246,0.12);
  background:transparent;
}

.preset-custom-select.open .pcs-trigger {
  border-color:#3b82f6;
  box-shadow:0 0 0 3px rgba(59,130,246,0.15),0 2px 8px rgba(59,130,246,0.1)
}

.pcs-trigger-text {
  flex:1 1 0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:var(--fs-xs);
}

.pcs-chevron {
  flex-shrink:0;
  width:16px;
  height:16px;
  color:#64748b;
  transition:transform 0.2s ease
}

.preset-custom-select.open .pcs-chevron {
  transform:rotate(180deg)
}

/* ── Dropdown list ── */
.pcs-list {
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:99999;
  background:#ffffff;
  border:1.5px solid #e2e8f0;
  border-radius:14px;
  box-shadow:0 8px 32px rgba(15,23,42,0.13),0 2px 8px rgba(15,23,42,0.06);
  padding:6px;
  max-height:450px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  width:100%;
  min-width:280px;
  /* hidden by default */
  opacity:0;
  transform:translateY(-6px) scale(0.98);
  pointer-events:none;
  transition:opacity 0.15s ease,transform 0.15s ease;
  transform-origin:top center
}

/* ── Search box inside dropdown ── */
.pcs-search-wrap {
  padding:4px 4px 6px;
  flex-shrink:0
}
.pcs-items-wrap {
  overflow-y:auto;
  flex:1;
  min-height:0
}
.pcs-search-input {
  width:100%;
  box-sizing:border-box;
  padding:7px 10px;
  border:1.5px solid #e2e8f0;
  border-radius:8px;
  font-size:var(--fs-sm);
  font-family:inherit;
  background:#f8fafc;
  color:#1e293b;
  outline:none;
  transition:border-color 0.15s
}
.pcs-search-input:focus {
  border-color:#3b82f6;
  background:#fff;
  box-shadow:0 0 0 3px rgba(59,130,246,0.12)
}


.preset-custom-select.open .pcs-list {
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto
}

/* ── Each option item ── */
.pcs-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  border-radius:9px;
  font-size:var(--fs-sm);
  font-weight:450;
  color:#1e293b;
  cursor:pointer;
  transition:background 0.1s
}

.pcs-item-left {
  display:flex;
  align-items:center;
  gap:8px;
  flex:1;
  min-width:0;
  overflow:hidden;
}

.pcs-item-left span:last-child {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* ── Difficulty pills ── */
.pcs-diff-pill {
  font-size:var(--fs-micro);
  font-weight:700;
  letter-spacing:0.02em;
  padding:2px 7px;
  border-radius:999px;
  flex-shrink:0;
  text-transform:uppercase;
}
.pcs-diff-easy   { background:rgba(34,197,94,0.13); color:#15803d; }
.pcs-diff-med    { background:rgba(251,191,36,0.18); color:#b45309; }
.pcs-diff-hard   { background:rgba(239,68,68,0.13); color:#b91c1c; }

.pcs-item:hover {
  background:#f1f5f9
}

.pcs-item.selected {
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:600
}

.pcs-item-check {
  flex-shrink:0;
  width:16px;
  height:16px;
  color:#3b82f6;
  opacity:0;
  transition:opacity 0.1s
}

.pcs-item.selected .pcs-item-check {
  opacity:1
}

.pcs-item-check svg {
  width:16px;
  height:16px;
  display:block
}

/* Native select is hidden via .pcs-native-hidden — styles no longer needed */

.learn-stage-picker {
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px 0 4px 0;
  border-top:none;
  margin-top:0
}

.learn-sticky-header .practice-setup {
  padding-bottom:2px
}

.learn-sticky-header .practice-setup label.hidden {
  display:none
}

.learn-stage-picker label {
  font-size:var(--fs-xss);
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:#64748b;
  margin-bottom:6px;
  display:block
}

/* Native select hidden — custom dropdown handles display */
.learn-stage-picker select {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
  overflow:hidden;
  clip:rect(0,0,0,0)
}

/* (#right-panel .panel-header orphan rule merged into canonical block — see ~line 6430) */

.learn-stage-hint {
  font-size:var(--fs-sm);
  color:#64748b;
  margin:0;
  line-height:1.4
}

.learn-problem-title {
  position:absolute;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  z-index:5;
  max-width:min(720px,calc(100% - 180px));
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(203,213,225,0.85);
  background:rgba(226,232,240,0.75);
  box-shadow:0 10px 24px rgba(2,6,23,0.06);
  font-weight:800;
  font-size:var(--fs-base);
  letter-spacing:0.02em;
  color:#0f172a;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

.preset-info-card {
  background:#ffffff;
  border-radius:10px;
  color:#0f172a;
  padding:10px;
  border : 1px solid #e2e8f0;
  margin-top: 10px;
  flex-shrink:0;
}

.preset-info-card h4 {
  margin:0 0 6px 0;
  font-size:var(--fs-sm);
  line-height:1.15;
  font-weight:700
}

.preset-info-card .meta {
  color:#475569;
  font-size:var(--fs-sm);
  margin-bottom:2px
}

.preset-info-card .checklist {
  display:flex;
  flex-direction:column;
  gap:6px
}

.preset-info-card .checklist li {
  list-style:none;
  padding-left:0
}

.preset-info-card .difficulty {
  display:block;
  margin-top:8px
}

.difficulty-graph {
  display:inline-flex;
  gap:4px;
  align-items:center
}

.difficulty-graph .seg {
  width:26px;
  height:8px;
  border-radius:6px;
  background:#eef4ff;
  box-shadow:inset 0 -1px 0 rgba(15,23,42,0.02)
}

.difficulty-graph[data-level="1"] .seg:nth-child(-n+1),.difficulty-graph[data-level="2"] .seg:nth-child(-n+2),.difficulty-graph[data-level="3"] .seg:nth-child(-n+3) {
  background:linear-gradient(90deg,#60a5fa,#3b82f6)
}

.difficulty-label {
  font-size:var(--fs-micro);
  color:#0f172a;
  font-weight:700;
  padding-left:8px
}

.practice-tasks {
  display:flex;
  flex-direction:column;
  gap:0;
  padding:0px 12px;
}

#practice-tasks-panel {
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.practice-task-card {
  background:transparent;
  border:none;
  border-bottom:1px solid #f1f5f9;
  border-radius:0;
  padding:9px 4px;
  box-shadow:none;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  overflow:hidden;
  max-height:300px;
  opacity:1;
  transform:translateY(0) scale(1);
  transition:max-height 0.35s ease,opacity 0.25s ease,transform 0.25s ease,margin-bottom 0.35s ease,padding 0.35s ease,background 0.15s ease
}

.practice-task-card:hover {
  background:rgba(59,130,246,0.04);
  border-radius:6px;
  border-bottom-color:transparent;
  margin: 0 -4px;
  padding-left: 8px;
  padding-right: 8px;
}

.practice-task-card:last-child {
  border-bottom:none
}

.practice-task-card.completing {
  max-height:0;
  opacity:0;
  transform:translateY(-6px) scale(0.97);
  margin-bottom:0!important;
  padding-top:0;
  padding-bottom:0;
  pointer-events:none
}

.practice-task-card .question,.practice-task-card .task-question {
  margin:0;
  font-size:var(--fs-xs);
  color:#334155;
  line-height:1.4;
  flex:1 1 auto;
  word-break:break-word
}

.practice-task-card .question strong,.practice-task-card .task-question strong {
  color:#0b1220
}

.practice-task-card .task-actions {
  margin-left:12px;
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto
}

.practice-task-card .task-actions .task-done {
  width:18px;
  height:18px;
  appearance:none;
  border-radius:50%;
  border:2px solid #cfe0ff;
  background:#ffffff;
  cursor:pointer;
  box-shadow:0 1px 0 rgba(15,23,42,0.02)
}

.practice-task-card .task-actions .task-done:checked {
  background:linear-gradient(90deg,#60a5fa,#3b82f6);
  border-color:#60a5fa
}

.task-hint-wrap {
  position:relative;
  display:flex;
  align-items:center
}

.task-hint-icon {
  width:18px;
  height:18px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0.55;
  transition:opacity 0.15s ease,transform 0.15s ease;
  user-select:none;
  flex-shrink:0
}

.task-hint-icon svg {
  width:15px;
  height:15px;
  display:block
}

.task-hint-wrap:hover .task-hint-icon {
  opacity:1;
  transform:scale(1.15)
}

#task-hint-floating-tooltip {
  position:fixed;
  z-index:9999;
  width:230px;
  background:#0f172a;
  color:#e2e8f0;
  font-size:var(--fs-xs)!important;
  line-height:1.5;
  padding:9px 11px;
  border-radius:10px;
  box-shadow:0 8px 24px rgba(15,23,42,0.28);
  pointer-events:none;
  white-space:normal;
  word-break:break-word;
  opacity:0;
  transform:translateY(4px);
  transition:opacity 0.15s ease, transform 0.15s ease
}

#task-hint-floating-tooltip.visible {
  opacity:1;
  transform:translateY(0)
}

#task-hint-floating-tooltip::after {
  content:'';
  position:absolute;
  top:100%;
  right:10%;
  border:6px solid transparent;
  border-top-color:#0f172a
}

.practice-tasks-header {
  font-size:var(--fs-xs);
  font-weight:700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom:2px;
  padding:10px 4px 7px;
  color:#1a2635;
  position:sticky;
  top:0;
  z-index:2;
  background:#ffffff;
}

.practice-tasks-empty-note {
  color:#667085;
  font-size:var(--fs-sm);
  padding:8px 4px
}

/* ── Practice tasks skeleton loader ─────────────────────────────────── */
.practice-tasks-skeleton { display:flex; flex-direction:column; gap:6px; padding:4px 0 8px; }
.pts-line {
  height: 36px; border-radius: 8px;
  background: linear-gradient(90deg,#f1f5f9 25%,#e2e8f0 50%,#f1f5f9 75%);
  background-size: 200% 100%;
  animation: pts-shimmer 1.2s ease-in-out infinite;
}
.pts-line--lg { height: 42px; }
.pts-line--sm { height: 28px; width: 60%; }
@keyframes pts-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── All tasks done banner ───────────────────────────────────────────── */
.practice-all-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 8px;
  padding: 5px 10px 5px 6px;
  border-radius: 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #15803d;
  width: fit-content;
}

.practice-all-done .pad-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: var(--fs-micro);
  flex-shrink: 0;
}

.preset-tasks-panel {
  margin-top:4px;
  background:#ffffff;
  border-radius:12px;
  border: 1px solid #e2e8f0;
  background:#ffffff;
  flex:1 1 0;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden
}

.simulation-panel>#output {
  flex:0 0 auto
}

.panel-tabs {
  justify-content:center;
  align-items:center;
  display:inline-flex;
  background:linear-gradient(135deg,rgba(15,23,42,0.12),rgba(99,102,241,0.25));
  border:1px solid rgba(148,163,184,0.35);
  border-radius:999px;
  width:max-content;
  align-self:center;
  margin:0;
  box-shadow:0 10px 20px rgba(15,23,42,0.08);
  backdrop-filter:blur(6px)
}

.tab-button {
  border:none;
  background:transparent;
  color:#1f2937;
  font-weight:700;
  font-size:var(--fs-sm);
  padding:10px;
  border-radius:999px;
  cursor:pointer;
  transition:all 0.2s ease
}

.tab-button.active {
  background:#f8fafc;
  color:#0f172a;
  box-shadow:0 10px 18px rgba(15,23,42,0.2)
}

.panel-view {
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:stretch;
  gap:0.8rem;
  flex:1;
  min-height:0;
  overflow:hidden
}

/* .hidden is defined at line 1967 with lower cascade order than .panel-view.
   This two-class rule has higher specificity than either alone, so it always wins. */
.panel-view.hidden { display: none !important; }

#evaluate-view {
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  flex:1 1 auto;
  min-height:0;
  scrollbar-width:none
}

#evaluate-view::-webkit-scrollbar {
  display:none
}

#evaluate-view {
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  flex:1 1 auto;
  min-height:0;
  scrollbar-width:none
}

#evaluate-view::-webkit-scrollbar {
  display:none
}

.evaluation-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.8rem
}

.evaluation-timer {
  background:#4272e4;
  color:#f8fafc;
  border-radius:8px;
  padding:0.3rem 0.65rem;
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  gap:0.35rem;
  font-size:var(--fs-micro);
  text-transform:uppercase;
  letter-spacing:0.06em;
  transition:background 0.4s ease,color 0.4s ease;
  font-weight:600;
  line-height:1
}

.evaluation-timer.timer-warning {
  background:#f59e0b;
  color:#111827
}

.evaluation-timer.timer-danger {
  background:#dc2626;
  color:#fff7ed
}

.evaluation-timer strong {
  font-size:var(--fs-base);
  font-weight:700;
  letter-spacing:0.05em
}

.eval-timer-btn-wrap {
  position:relative;
  display:inline-flex;
  flex-direction:column
}

.evaluation-timer {
  background:#4272e4;
  color:#f8fafc;
  border:none;
  border-radius:8px;
  padding:0.3rem 0.65rem;
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  gap:0.35rem;
  font-size:var(--fs-micro);
  text-transform:uppercase;
  letter-spacing:0.06em;
  transition:background 0.4s ease,color 0.4s ease;
  font-weight:600;
  line-height:1;
  cursor:default
}

.eval-timer-btn-wrap.pickable .evaluation-timer {
  cursor:pointer
}

.eval-timer-btn-wrap.pickable .evaluation-timer:hover {
  filter:brightness(1.1)
}

.evaluation-timer.timer-warning {
  background:#f59e0b;
  color:#111827
}

.evaluation-timer.timer-danger {
  background:#dc2626;
  color:#fff7ed
}

.evaluation-timer strong {
  font-size:var(--fs-base);
  font-weight:700;
  letter-spacing:0.05em
}

.eval-timer-caret {
  font-size:var(--fs-micro);
  opacity:0.8;
  transition:transform 0.2s ease;
  margin-left:2px
}

.eval-timer-btn-wrap.open .eval-timer-caret {
  transform:rotate(180deg)
}

.eval-dur-dropdown {
  display:none;
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  background:#1e293b;
  border-radius:10px;
  box-shadow:0 8px 24px rgba(15,23,42,0.28);
  overflow:hidden;
  z-index:200;
  min-width:100%;
  flex-direction:column
}

.eval-timer-btn-wrap.open .eval-dur-dropdown {
  display:flex
}

.eval-dur-opt {
  background:transparent;
  border:none;
  color:#cbd5e1;
  font-size:var(--fs-xs);
  font-weight:600;
  font-family:inherit;
  text-transform:uppercase;
  letter-spacing:0.06em;
  padding:0.5rem 1rem;
  cursor:pointer;
  text-align:left;
  transition:background 0.12s ease,color 0.12s ease;
  white-space:nowrap
}

.eval-dur-opt:hover {
  background:rgba(255,255,255,0.1);
  color:#f8fafc
}

.eval-dur-opt--active {
  color:#f8fafc;
  background:rgba(66,114,228,0.35)
}

#eval-dur-wrap,#evaluation-duration-select {
  display:none!important
}

body.evaluation-questions-only #left-panel,body.evaluation-questions-only .canvas-wrapper {
  display:none!important
}

body.evaluation-questions-only .layout {
  grid-template-columns:0 1fr var(--right-panel-w)!important
}

/* Lock #evaluate-view scroll so the carousel + nav row always fit without scrolling */
body.eval-interview-active #evaluate-view {
  overflow:hidden;
  display:flex;
  flex-direction:column
}

/* Hide the static heading/text in the questions section during interview mode */
body.eval-interview-active #evaluation-question-section h3,
body.eval-interview-active #evaluation-question-section > p {
  display:none
}

#evaluation-timer {
  margin-top:0
}

#evaluation-timer.timer-warning,#evaluation-timer.timer-danger {
  background:transparent;
  color:inherit
}

#evaluation-reset.button.ghost,#evaluation-start.button.primary,#evaluation-finish.button.primary {
  margin-left:0;
  padding:0.5rem;
  border-radius:12px!important
}

#evaluation-next.next-inactive,#evaluation-finish.next-inactive {
  background:linear-gradient(135deg,#1e3a5f,#1e40af)!important;
  border-color:rgba(255,255,255,0.12)!important;
  color:#bfdbfe!important;
  box-shadow:0 4px 14px rgba(0,0,0,0.18)!important;
  cursor:not-allowed;
  opacity:0.9
}

#evaluation-next.next-active,#evaluation-finish.next-active {
  background:#2563eb!important;
  border-color:#1d4ed8!important;
  color:#ffffff!important
}

#evaluation-reset.button.ghost {
  background:rgba(148,163,184,0.2);
  border-color:rgba(148,163,184,0.6);
  color:#1f2a44
}

.evaluation-controls {
  display:flex;
  flex-wrap:wrap;
  text-align:left;
  padding-top:0.8rem;
  gap:0.6rem
}

.evaluation-error {
  grid-column:1 / -1;
  font-size:var(--fs-xs);
  color:#b91c1c;
  min-height:0
}

.evaluation-controls label {
  display:flex;
  flex-direction:column;
  gap:0.3rem;
  font-size:var(--fs-sm);
  font-weight:600;
  color:#1f2a44;
  width:100%
}

.evaluation-controls select {
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  width:100%;
  border:1px solid #d1d9f0;
  border-radius:10px;
  padding:0.5rem 2.2rem 0.5rem 0.75rem;
  font-size:var(--fs-sm);
  font-family:inherit;
  font-weight:500;
  color:#1f2a44;
  background-color:#f8fafc;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%2364748b'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:18px 18px;
  box-shadow:0 1px 3px rgba(15,23,42,0.06);
  cursor:pointer;
  transition:border-color 0.15s ease,box-shadow 0.15s ease;
  line-height:1.4
}

.evaluation-controls select:hover {
  border-color:#93aef8
}

.evaluation-controls select:focus {
  outline:none;
  border-color:#4272e4;
  box-shadow:0 0 0 3px rgba(66,114,228,0.15)
}

.evaluation-controls select option {
  color:#1f2a44;
  background:#ffffff
}

.evaluation-question {
  background:transparent;
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  overflow:hidden
}

.evaluation-active-problem {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  background:linear-gradient(135deg,#eef2ff 0%,#f0f9ff 100%);
  border:1px solid #c7d7fd;
  border-radius:12px;
  padding:10px 14px;
  margin-bottom:10px
}

.active-problem-label {
  font-size:var(--fs-sm);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.07em;
  color:#6366f1
}

.active-problem-name {
  font-size:var(--fs-base);
  font-weight:700;
  color:#1e293b;
  flex:1;
  text-align:center
}

.active-problem-diff {
  font-size:var(--fs-sm);
  font-weight:700;
  padding:2px 10px;
  border-radius:20px;
  background:#1d4ed8;
  color:#ffffff;
  text-transform:capitalize;
  white-space:nowrap
}

.evaluation-problem-summary {
  width:100%;
  font-size:var(--fs-xs);
  line-height:1.4;
  color:#475569;
  margin-top:4px
}

.evaluation-preview {
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:14px 16px;
  margin-top:4px;
  margin-bottom:10px;
  overflow-y:auto;
  max-height:420px
}

.eval-preview-title {
  margin:0 0 6px;
  font-size:var(--fs-base);
  font-weight:700;
  color:#1e293b
}

.eval-preview-summary {
  margin:0;
  font-size:var(--fs-xs);
  line-height:1.5;
  color:#475569
}

.eval-preview-keypoints {
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:2px;
  padding:10px
}

.eval-preview-points {
  margin:0;
  padding-left:18px;
  display:flex;
  flex-direction:column;
  gap:5px
}

.eval-preview-points li {
  font-size:var(--fs-xss);
  line-height:1.45;
  color:#334155
}

.eval-preview-points li::marker {
  color:#6366f1
}

.eval-preview-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
  user-select:none;
  gap:8px
}

.eval-preview-header .eval-preview-title {
  margin:0;
  flex:1
}

.eval-preview-toggle {
  font-size:var(--fs-base);
  color:#94a3b8;
  transition:transform 0.25s ease;
  flex-shrink:0
}

.evaluation-preview.collapsed .eval-preview-toggle {
  transform:rotate(-90deg)
}

.eval-preview-body {
  transition:max-height 0.3s ease,opacity 0.25s ease;
  overflow:hidden
}

.evaluation-preview.collapsed .eval-preview-body {
  max-height:0;
  opacity:0;
  margin:0;
  padding:0
}

.eval-preview-components {
  display:flex;
  flex-direction:column;
  gap:6px
}

.eval-preview-label {
  font-size:var(--fs-micro);
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:#6366f1
}

.eval-preview-chips {
  display:flex;
  flex-wrap:wrap;
  gap:6px
}

.eval-preview-chip {
  font-size:var(--fs-sm);
  font-weight:600;
  padding:3px 10px;
  border-radius:20px;
  background:#eef2ff;
  color:#4338ca;
  border:1px solid #c7d2fe;
  text-align:center
}

.evaluation-reqs {
  background:#ffffff;
  padding:0.85rem;
  display:flex;
  flex-direction:column;
  gap:0.6rem
}

.evaluation-reqs h3 {
  font-size:var(--fs-base);
  color:#0f172a
}

.evaluation-reqs textarea {
  height:160px;
  min-height:100px;
  max-height:160px;
  resize:none;
  overflow:auto;
  width:100%;
  border:1px solid #cbd5f5;
  border-radius:8px;
  padding:0.5rem 0.6rem;
  font-size:var(--fs-sm);
  color:#0f172a;
  background:#ffffff;
  box-sizing:border-box
}

.evaluation-reqs {
  margin-bottom:12px
}

.evaluation-actions {
  position:sticky;
  bottom:0;
  background:#ffffff;
  padding-bottom:0.35rem;
  padding-top:0.5rem
}

.evaluation-actions .button.primary {
  border-radius:12px!important;
  box-shadow:0 2px 6px rgba(66,114,228,0.20),0 1px 2px rgba(66,114,228,0.12)!important
}

.evaluation-actions .button.primary:hover:not(:disabled) {
  box-shadow:0 3px 10px rgba(66,114,228,0.28),0 1px 3px rgba(66,114,228,0.16)!important;
  transform:translateY(-1px)
}

.evaluation-actions .button.primary:active:not(:disabled) {
  box-shadow:none!important;
  transform:scale(0.97)!important
}

.evaluation-question h3 {
  font-size:var(--fs-base);
  color:#0f172a
}

.evaluation-question p {
  font-size:var(--fs-base);
  color:#475569
}

.evaluation-tradeoff-box {
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px
}

.evaluation-tradeoff-sub strong {
  color:#0f172a
}

.evaluation-tradeoff-box,.evaluation-tradeoff-box * {
  color:inherit
}

.evaluation-tradeoff-sub {
  font-size:var(--fs-sm);
  font-size:var(--fs-sm);
  color:#64748b;
  padding:10px
}

.evaluation-tradeoff-box .evaluation-tradeoff-sub:first-child {
  margin-top:0;
  font-size:var(--fs-base);
  font-weight:700;
  font-size:var(--fs-base);
  font-weight:700;
  color:#0f172a;
  padding:10px
}

.evaluation-feedback {
  font-size:var(--fs-sm);
  font-size:var(--fs-sm);
  color:#0f172a;
  min-height:1rem
}

.evaluation-score {
  font-size:var(--fs-sm);
  font-size:var(--fs-sm);
  color:#475569
}

/* footer-tabs removed */

.modal {
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1.5rem;
  z-index:2000
}

.modal-content {
  background:#ffffff;
  border-radius:12px;
  padding:1.75rem;
  width:min(420px,92vw);
  box-shadow:0 12px 30px rgba(2,6,23,0.12);
  position:relative;
  display:flex;
  flex-direction:column;
  gap:1rem;
  color:#1e293b
}

#auth-modal .modal-content {
  max-height:min(92vh,700px);
  overflow-y:auto;
  gap:0.65rem;
  padding:1.4rem 1.6rem 1.6rem
}

#auth-modal .modal-header {
  margin-bottom:0
}

#auth-modal .modal-header h2 {
  font-size:var(--fs-subhead)
}

#auth-modal .modal-message {
  font-size:var(--fs-sm);
  margin-top:0.2rem
}

#auth-modal .modal-form {
  gap:0.55rem
}

#auth-modal .modal-form label {
  gap:0.2rem;
  font-size:var(--fs-xs)
}

#auth-modal .modal-form input {
  padding:0.42rem 0.6rem;
  font-size:var(--fs-sm)
}

#auth-modal .modal-tabs {
  margin-top:0
}

#auth-modal .pw-checklist {
  gap:2px;
  margin-top:0
}

#auth-modal .pw-checklist .pw-rule {
  font-size:var(--fs-xss);
  padding:1px 0
}

.modal-close {
  position:absolute;
  top:12px;
  right:12px;
  border:none;
  background:transparent;
  font-size:var(--fs-subhead);
  cursor:pointer;
  color:#64748b
}

.modal-header h2 {
  font-size:var(--fs-xl);
  color:#0f172a
}

.modal-message {
  color:#475569;
  font-size:var(--fs-base);
  margin-top:0.35rem
}

.modal-helper {
  font-size:var(--fs-xs);
  color:#64748b;
  margin-top:0.6rem
}

.modal-tabs {
  display:inline-flex;
  gap:0.5rem;
  background:#e2e8f0;
  border-radius:999px;
  padding:0.35rem;
  align-self:flex-start;
  justify-content:center;
  align-self:center
}

.modal-form {
  display:flex;
  flex-direction:column;
  gap:0.8rem
}

.modal-form label {
  display:flex;
  flex-direction:column;
  gap:0.3rem;
  font-size:var(--fs-sm);
  color:#1f2a44;
  font-weight:600
}

.modal-form input {
  border:1px solid #cbd5f5;
  border-radius:8px;
  padding:0.5rem 0.6rem;
  font-size:var(--fs-base);
  background:#ffffff;
  color:#1e293b
}

.modal-form textarea {
  border:1px solid #cbd5f5;
  border-radius:8px;
  padding:0.5rem 0.6rem;
  font-size:var(--fs-base);
  min-height:120px;
  resize:vertical;
  background:#ffffff;
  color:#1e293b
}

.modal-form select {
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  border:1px solid #cbd5f5;
  border-radius:8px;
  padding:0.5rem 2rem 0.5rem 0.6rem;
  font-size:var(--fs-base);
  background:#ffffff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%2362748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:14px 14px;
  color:#1e293b
}

.modal-form input:focus,.modal-form textarea:focus,.modal-form select:focus {
  outline:2px solid #93c5fd;
  outline-offset:2px;
  border-color:#93c5fd
}

#feedback-modal .modal-content {
  width:min(640px,94vw)
}

#feedback-modal {
  align-items:center;
  justify-content:center;
  padding:20px 0
}

#feedback-modal .feedback-modal-card {
  width:min(640px,94vw);
  max-height:min(88vh,820px);
  padding:1.2rem 1.25rem;
  gap:0.75rem;
  overflow:hidden
}

#feedback-modal .feedback-form-scroll {
  overflow-y:auto;
  padding-right:0.35rem;
  max-height:calc(min(88vh,820px) - 190px)
}

#feedback-modal .feedback-form-scroll::-webkit-scrollbar {
  width:8px
}

#feedback-modal .feedback-form-scroll::-webkit-scrollbar-thumb {
  background:#cbd5e1;
  border-radius:999px
}

#feedback-modal .modal-header h2 {
  font-size:var(--fs-lg)
}

#feedback-modal .modal-message {
  color:#475569;
  font-size:var(--fs-base)
}

#feedback-modal .modal-form label {
  font-size:var(--fs-sm);
  gap:0.22rem
}

#feedback-modal .modal-form {
  gap:0.62rem
}

#feedback-modal .modal-form input,#feedback-modal .modal-form select,#feedback-modal .modal-form textarea {
  font-size:var(--fs-base);
  padding:0.48rem 0.58rem
}

#feedback-modal .modal-form textarea {
  min-height:84px
}

#feedback-modal .modal-actions {
  display:flex;
  flex-direction:column;
  gap:0.5rem
}

#feedback-modal .modal-actions .button-row {
  display:flex;
  flex-direction:row;
  gap:0.6rem
}

#feedback-modal .modal-actions .button-row .button {
  flex:1
}

.feedback-inline-error {
  color:#dc2626;
  font-size:var(--fs-sm);
  font-weight:500;
  margin:0;
  padding:0.4rem 0.5rem;
  background:#fef2f2;
  border:1px solid #fecaca;
  border-radius:8px;
  width:100%;
  box-sizing:border-box
}

.feedback-inline-error.hidden {
  display:none
}

.feedback-rating-label {
  display:flex;
  flex-direction:column;
  gap:10px;
  font-weight:600;
  font-size:var(--fs-base);
  color:#334155;
  margin-bottom:4px
}

.feedback-stars {
  display:flex;
  gap:6px
}

.star-btn {
  background:none;
  border:none;
  cursor:pointer;
  font-size:var(--fs-xxl);
  color:#cbd5e1;
  padding:0 2px;
  line-height:1;
  transition:color 0.12s,transform 0.1s;
  outline:none
}

.star-btn:hover,.star-btn.hover-fill {
  color:#f59e0b;
  transform:scale(1.15)
}

.star-btn.selected {
  color:#f59e0b
}

.feedback-rating-hint {
  font-size:var(--fs-sm);
  color:#64748b;
  font-weight:400;
  min-height:1.2em
}

.adash-rating-stars {
  color:#f59e0b;
  font-size:var(--fs-md);
  letter-spacing:1px
}

@media (max-height:820px) {
  #feedback-modal .feedback-modal-card {
    max-height:86vh
  }
  #feedback-modal .feedback-form-scroll {
    max-height:calc(86vh - 180px)
  }

}

.admin-dashboard-page {
  padding:30px 50px;
  flex:1;
  background:radial-gradient(circle at top left,rgba(59,130,246,0.08),transparent 28%),linear-gradient(180deg,#f7f9ff 0%,#eef4ff 100%);
  width:100%
}

.admin-dashboard-shell {
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:22px;
  min-height:0
}

.admin-dashboard-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px
}

.analytics-card-panel {
  min-height:0
}

.analytics-summary-grid {
  align-items:stretch
}

.analytics-card {
  display:flex;
  flex-direction:column;
  min-height:340px;
  max-height:460px
}

.analytics-panel-body,.analytics-feedback-card {
  min-height:0
}

.analytics-panel-body {
  flex:1;
  display:flex;
  flex-direction:column
}

.analytics-feedback-card {
  min-height:0;
  max-height:none;
  display:flex;
  flex-direction:column
}

.feedback-table-wrap {
  flex:1;
  min-height:0;
  overflow:auto
}

.analytics-scroll-region {
  flex:1;
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px
}

.analytics-scroll-region--stacked {
  gap:16px
}

.analytics-stat-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px
}

.analytics-stat-card {
  background:#f8fbff;
  border:1px solid #dbe7ff;
  border-radius:14px;
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:4px
}

.analytics-stat-label {
  font-size:var(--fs-xss);
  font-weight:700;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:0.04em
}

.analytics-stat-value {
  font-size:var(--fs-subhead);
  color:#0f172a
}

.analytics-section-title {
  margin:0 0 8px;
  font-size:var(--fs-sm);
  color:#334155
}

.analytics-mini-grid {
  display:grid;
  gap:8px
}

.analytics-mini-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#334155
}

.analytics-bottleneck-list {
  display:grid;
  gap:10px
}

.analytics-bottleneck {
  border-radius:14px;
  padding:12px 14px;
  border:1px solid #e2e8f0;
  background:#f8fafc
}

.analytics-bottleneck strong {
  display:block;
  margin-bottom:4px;
  color:#0f172a
}

.analytics-bottleneck p {
  margin:0;
  color:#475569;
  line-height:1.4
}

.analytics-bottleneck--high {
  border-color:#fecaca;
  background:#fff1f2
}

.analytics-bottleneck--medium {
  border-color:#fde68a;
  background:#fffbeb
}

.analytics-bottleneck--low {
  border-color:#bfdbfe;
  background:#eff6ff
}

.admin-dashboard-title {
  margin:0 0 6px;
  font-size:var(--fs-2xl);
  color:#0f172a
}

.admin-dashboard-subtitle {
  margin:0;
  color:#475569;
  font-size:var(--fs-base)
}

.admin-toolbar {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end
}

.admin-toolbar-field {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#475569;
  font-weight:600;
  font-size:var(--fs-base)
}

.admin-toolbar-field input,.admin-toolbar-field select {
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:0.5rem 0.7rem;
  background:#ffffff;
  color:#0f172a;
  box-shadow:inset 0 1px 2px rgba(15,23,42,0.03)
}

.admin-toolbar-presets {
  display:inline-flex;
  gap:8px
}

.admin-card {
  background:rgba(255,255,255,0.92);
  border:1px solid #dbe7ff;
  border-radius:18px;
  padding:18px;
  box-shadow:0 18px 44px rgba(15,23,42,0.07);
  backdrop-filter:blur(8px)
}

.admin-card-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px
}

.admin-card-header h3 {
  margin:0;
  font-size:var(--fs-md);
  color:#0f172a
}

.admin-chip {
  display:inline-flex;
  align-items:center;
  padding:0.26rem 0.65rem;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:var(--fs-xs);
  font-weight:700
}

.analytics-summary-grid {
  display:grid;
  grid-template-columns:minmax(0,7fr) minmax(280px,3fr);
  gap:20px;
  align-items:stretch
}

.analytics-summary-grid--thirds {
  grid-template-columns:repeat(3,minmax(0,1fr))
}

.analytics-card-wide {
  min-width:0
}

.analytics-card-side {
  min-width:0;
  align-self:stretch
}

.analytics-card {
  height:100%
}

.analytics-panel-body {
  min-height:220px
}

.analytics-bars {
  display:flex;
  flex-direction:column;
  gap:14px
}

.analytics-bar-row {
  display:flex;
  flex-direction:column;
  gap:6px
}

.analytics-bar-meta {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-size:var(--fs-base)
}

.analytics-bar-label {
  color:#334155;
  font-weight:600
}

.analytics-bar-value {
  color:#0f172a;
  font-weight:700
}

.analytics-bar-track {
  width:100%;
  height:10px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden
}

.analytics-bar-fill {
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#2563eb 0%,#60a5fa 100%)
}

.analytics-rank-list {
  display:flex;
  flex-direction:column;
  gap:10px
}

.analytics-rank-row {
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fbff;
  border:1px solid #e2e8f0
}

.analytics-rank-index {
  color:#2563eb;
  font-weight:700;
  font-size:var(--fs-sm)
}

.analytics-rank-name {
  color:#0f172a;
  font-weight:600;
  word-break:break-word
}

.analytics-rank-value {
  color:#475569;
  font-weight:700
}

.analytics-raw-list {
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:420px;
  overflow:auto;
  padding-right:6px
}

.analytics-row {
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #e2e8f0;
  background:#fbfdff
}

.analytics-row-title {
  color:#0f172a;
  font-weight:700;
  margin-bottom:4px
}

.analytics-row-meta {
  color:#64748b;
  font-size:var(--fs-sm)
}

.analytics-empty-state {
  min-height:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#64748b;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  background:#f8fbff;
  padding:20px
}

.analytics-empty-state--error {
  color:#b91c1c;
  background:#fff7f7;
  border-color:#fecaca
}

.feedback-card {
  padding:0;
  overflow:hidden
}

.analytics-feedback-card {
  margin-top:20px;
  width:100%;
  padding:30px
}

.feedback-status {
  padding:16px 0px;
  color:#475569;
  font-weight:600
}

.feedback-table-wrap {
  overflow:auto;
  padding:12px 18px 18px
}

.feedback-table {
  width:100%;
  min-width:940px;
  border-collapse:separate;
  border-spacing:0
}

.feedback-table thead th {
  text-align:left;
  padding:12px;
  color:#475569;
  font-size:var(--fs-sm);
  text-transform:uppercase;
  letter-spacing:0.04em;
  border-bottom:1px solid #e2e8f0;
  background:#f8fbff;
  position:sticky;
  top:0
}

.feedback-table tbody td {
  padding:14px 12px;
  vertical-align:top;
  color:#0f172a;
  border-bottom:1px solid #eef2ff
}

.feedback-table tbody tr:hover {
  background:#f8fbff
}

.feedback-empty-cell {
  padding:20px 12px;
  color:#64748b
}

@media (max-width:960px) {
  .analytics-summary-grid,.analytics-summary-grid--thirds {
    grid-template-columns:1fr
  }

}

.adash-page-title-row {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap
}

.adash-load-indicator {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#64748b;
  font-size:var(--fs-sm);
  font-weight:600
}

.adash-load-indicator.hidden {
  display:none
}

.adash-spinner {
  display:inline-block;
  width:16px;
  height:16px;
  border:2px solid #cbd5e1;
  border-top-color:#2563eb;
  border-radius:50%;
  animation:adash-spin 0.75s linear infinite
}

@keyframes adash-spin {
  to {
    transform:rotate(360deg)
  }

}

.adash-metric-row {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:14px
}

.adash-metric-card {
  background:#ffffff;
  border:1px solid #dbe7ff;
  border-radius:16px;
  padding:16px 16px 14px;
  display:flex;
  flex-direction:column;
  gap:4px;
  box-shadow:0 4px 18px rgba(15,23,42,0.05);
  transition:box-shadow 0.15s,transform 0.15s
}

.adash-metric-card:hover {
  box-shadow:0 8px 28px rgba(15,23,42,0.10);
  transform:translateY(-1px)
}

.adash-metric-card--blue {
  border-color:#bfdbfe;
  background:#eff6ff
}

.adash-metric-card--purple {
  border-color:#ddd6fe;
  background:#f5f3ff
}

.adash-metric-card--green {
  border-color:#bbf7d0;
  background:#f0fdf4
}

.adash-metric-label {
  font-size:var(--fs-xss);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:#64748b
}

.adash-metric-value {
  font-size:var(--fs-xl);
  font-weight:800;
  color:#0f172a;
  line-height:1.1;
  letter-spacing:-0.02em
}

.adash-metric-sub {
  font-size:var(--fs-xss);
  color:#94a3b8
}

.adash-chart-body {
  flex:1;
  min-height:220px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding-top:8px
}

.adash-scroll-body {
  flex:1;
  min-height:180px;
  overflow-y:auto;
  display:flex;
  flex-direction:column
}

.adash-bar-chart {
  display:flex;
  align-items:flex-end;
  gap:6px;
  height:200px;
  padding-bottom:28px;
  width:100%;
  overflow-x:auto
}

.adash-bar-col {
  display:flex;
  flex-direction:column;
  align-items:center;
  flex:1 0 22px;
  min-width:22px;
  max-width:56px;
  height:100%;
  position:relative;
  cursor:default
}

.adash-bar-count {
  font-size:var(--fs-micro);
  font-weight:700;
  color:#475569;
  margin-bottom:3px;
  white-space:nowrap
}

.adash-bar-track {
  flex:1;
  width:100%;
  background:#e2e8f0;
  border-radius:6px 6px 0 0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:flex-end
}

.adash-bar-fill {
  width:100%;
  background:linear-gradient(180deg,#3b82f6 0%,#1d4ed8 100%);
  border-radius:6px 6px 0 0;
  transition:height 0.35s ease
}

.adash-bar-col:hover .adash-bar-fill {
  background:linear-gradient(180deg,#60a5fa 0%,#2563eb 100%)
}

.adash-bar-label {
  position:absolute;
  bottom:0;
  font-size:var(--fs-micro);
  color:#94a3b8;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  width:100%
}

.adash-rank-list {
  display:flex;
  flex-direction:column;
  gap:8px
}

.adash-rank-row {
  display:grid;
  grid-template-columns:28px 1fr;
  gap:10px;
  align-items:start;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fbff;
  border:1px solid #e2e8f0;
  transition:background 0.12s
}

.adash-rank-row:hover {
  background:#eff6ff
}

.adash-rank-index {
  font-size:var(--fs-xs);
  font-weight:800;
  color:#2563eb;
  padding-top:2px;
  text-align:center
}

.adash-rank-body {
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0
}

.adash-rank-name-row {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:8px
}

.adash-rank-name {
  font-size:var(--fs-sm);
  font-weight:600;
  color:#0f172a;
  word-break:break-all;
  flex:1
}

.adash-rank-value {
  font-size:var(--fs-sm);
  font-weight:700;
  color:#0f172a;
  white-space:nowrap
}

.adash-rank-bar-track {
  width:100%;
  height:5px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden
}

.adash-rank-bar-fill {
  height:100%;
  border-radius:999px;
  transition:width 0.35s ease
}

.adash-rank-pct {
  font-size:var(--fs-xss);
  color:#94a3b8
}

.adash-secondary-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px
}

.adash-mini-bar-list {
  display:flex;
  flex-direction:column;
  gap:10px
}

.adash-mini-bar-row {
  display:grid;
  grid-template-columns:160px 1fr 52px;
  align-items:center;
  gap:10px
}

.adash-mini-label {
  font-size:var(--fs-sm);
  font-weight:600;
  color:#334155;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.adash-mini-track {
  height:8px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden
}

.adash-mini-fill {
  height:100%;
  border-radius:999px;
  min-width:4px;
  transition:width 0.35s ease
}

.adash-mini-value {
  font-size:var(--fs-sm);
  font-weight:700;
  color:#0f172a;
  text-align:right
}

.adash-skeleton-bars {
  display:flex;
  align-items:flex-end;
  gap:8px;
  height:140px;
  width:100%;
  padding:0 4px
}

.adash-skel-bar {
  flex:1;
  background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%);
  background-size:200% 100%;
  animation:adash-shimmer 1.4s infinite;
  border-radius:6px 6px 0 0
}

.adash-skeleton-list {
  display:flex;
  flex-direction:column;
  gap:8px
}

.adash-skel-row {
  height:40px;
  border-radius:12px;
  background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%);
  background-size:200% 100%;
  animation:adash-shimmer 1.4s infinite
}

@keyframes adash-shimmer {
  0% {
    background-position:200% 0
  }
  100% {
    background-position:-200% 0
  }

}

.adash-feedback-pagination {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:14px 18px;
  border-top:1px solid #e2e8f0
}

.adash-page-info {
  font-size:var(--fs-sm);
  color:#64748b;
  font-weight:600
}

.adash-plan-badge {
  display:inline-flex;
  align-items:center;
  padding:2px 10px;
  border-radius:999px;
  font-size:var(--fs-xss);
  font-weight:700;
  background:#f1f5f9;
  color:#334155
}

.adash-plan-badge--free {
  background:#f1f5f9;
  color:#475569
}

.adash-plan-badge--basic {
  background:#eff6ff;
  color:#1d4ed8
}

.adash-plan-badge--pro {
  background:#f0fdf4;
  color:#166534
}

.adash-plan-badge--elite {
  background:#f5f3ff;
  color:#6d28d9
}

.adash-topbar-field {
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:#94a3b8;
  font-size:var(--fs-xs);
  font-weight:600
}

.adash-topbar-input {
  background:rgba(30,45,69,0.8);
  border:1px solid rgba(148,163,184,0.3);
  color:#f8fafc;
  border-radius:8px;
  padding:0.28rem 0.5rem;
  font-size:var(--fs-xs)
}

.adash-topbar-input::-webkit-calendar-picker-indicator {
  filter:invert(1);
  opacity:0.65;
  cursor:pointer
}

.topbar .admin-toolbar-field input[type="date"],.topbar .admin-toolbar-field select {
  background:#1e2d45;
  border-color:rgba(148,163,184,0.35);
  color:#f8fafc
}

.topbar .admin-toolbar-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter:invert(1);
  opacity:0.7
}

.adash-health-list {
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:4px 0
}

.adash-health-section-title {
  font-size:var(--fs-xss);
  font-weight:700;
  color:#94a3b8;
  text-transform:uppercase;
  letter-spacing:0.06em;
  padding:4px 0 2px;
  border-bottom:1px solid #f1f5f9
}

.adash-health-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:5px 0
}

.adash-health-label {
  font-size:var(--fs-sm);
  color:#334155;
  font-weight:600;
  flex:0 0 auto;
  min-width:110px
}

.adash-health-counts {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap
}

.adash-health-success {
  font-size:var(--fs-sm);
  font-weight:700;
  color:#166534;
  background:#dcfce7;
  padding:1px 7px;
  border-radius:4px
}

.adash-health-fail {
  font-size:var(--fs-sm);
  font-weight:700;
  color:#b91c1c;
  background:#fee2e2;
  padding:1px 7px;
  border-radius:4px
}

.adash-health-ok {
  font-size:var(--fs-sm);
  color:#64748b
}

.adash-health-rate {
  font-size:var(--fs-xs);
  font-weight:700;
  padding:2px 7px;
  border-radius:10px
}

.adash-chart-legend {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:var(--fs-xs);
  color:#64748b;
  margin-bottom:8px;
  flex-wrap:wrap
}

.adash-legend-dot {
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  flex-shrink:0
}

.adash-chart-note {
  margin:8px 0 0;
  font-size:var(--fs-xss);
  color:#94a3b8;
  font-style:italic
}

.adash-me-legend {
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  margin-bottom:10px;
  font-size:var(--fs-xs);
  color:#475569
}

.adash-me-legend-item {
  display:flex;
  align-items:center;
  gap:5px
}

.adash-me-svg-wrap {
  width:100%;
  overflow-x:auto
}

.adash-me-svg {
  width:100%;
  min-width:280px;
  height:auto;
  display:block
}

.adash-panel-note {
  margin:10px 0 0;
  font-size:var(--fs-xs);
  color:#64748b
}

.adash-alert {
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 14px;
  border-radius:8px;
  border:1px solid transparent
}

.adash-alert--ok {
  background:#f0fdf4;
  border-color:#86efac;
  color:#166534
}

.adash-alert-icon {
  font-size:var(--fs-md);
  flex-shrink:0;
  margin-top:1px
}

.adash-alert-badge {
  display:inline-block;
  border-radius:4px
}

.adash-rank-row--warn {
  background:#fff8f8;
  border-radius:6px;
  border-left:3px solid #fca5a5;
  padding-left:6px
}

@media (max-width:900px) {
  .adash-secondary-grid {
    grid-template-columns:1fr
  }
  .adash-metric-row {
    grid-template-columns:repeat(auto-fit,minmax(110px,1fr))
  }
  .adash-mini-bar-row {
    grid-template-columns:110px 1fr 44px
  }

}

@media (max-width:600px) {
  .adash-metric-row {
    grid-template-columns:1fr 1fr
  }

}

.open-modal {
  width:min(520px,92vw)
}

.black-box-modal {
  width:min(620px,94vw)
}

.evaluation-instructions {
  display:flex;
  flex-direction:column;
  gap:0.8rem;
  font-size:var(--fs-base);
  color:#1f2937
}

.evaluation-instructions h3 {
  font-size:var(--fs-base);
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:#64748b;
  margin-top:0.35rem
}

.evaluation-instructions ul {
  margin-left:0;
  padding:0.8rem 0.9rem;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  display:flex;
  flex-direction:column;
  gap:0.35rem;
  list-style:none
}

.evaluation-instructions li {
  position:relative;
  padding-left:1.3rem;
  line-height:1.35
}

.evaluation-instructions li::before {
  content:"•";
  position:absolute;
  left:0;
  top:0;
  color:#2563eb;
  font-weight:700
}

.evaluation-goodluck {
  font-weight:600;
  color:#0f172a;
  text-align:center;
  padding-top:0.25rem
}

.modal-actions {
  margin-top:1rem;
  display:flex;
  justify-content:flex-end;
  gap:0.5rem
}

.ui-confirm-card {
  width:min(560px,92vw);
  border-radius:16px;
  padding:1.85rem 1.85rem 1.55rem;
  box-shadow:0 22px 60px rgba(2,6,23,0.18),0 2px 10px rgba(2,6,23,0.06);
  border:1px solid rgba(148,163,184,0.35);
  overflow:hidden
}

.ui-confirm-card .ui-confirm-accent {
  position:absolute;
  inset:0 0 auto 0;
  height:6px;
  background:linear-gradient(90deg,#2563eb 0%,#06b6d4 50%,#a78bfa 100%)
}

.ui-confirm-card .modal-header h2 {
  font-size:var(--fs-xxl);
  letter-spacing:-0.03em;
  line-height:1.05
}

.ui-confirm-card .modal-message {
  font-size:var(--fs-md);
  line-height:1.55;
  margin-top:0.65rem;
  color:#334155
}

.ui-confirm-card .modal-actions {
  margin-top:1.35rem;
  gap:0.8rem
}

.ui-confirm-card .modal-actions .button {
  min-width:140px;
  padding:0.65rem 1.1rem;
  border-radius:12px;
  font-weight:700
}

.ui-confirm-card .modal-actions .button:not(.primary) {
  background:#e2e8f0;
  border-color:#e2e8f0;
  color:#0f172a
}

.ui-confirm-card .modal-actions .button:not(.primary):hover {
  background:#dbe6f5
}

.modal-actions .button + .button {
  margin-left:0.25rem
}

.black-box-flow {
  display:flex;
  flex-direction:column;
  gap:0.6rem;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:0.9rem
}

.flow-step {
  display:flex;
  align-items:center;
  gap:0.6rem;
  font-size:var(--fs-sm);
  color:#0f172a
}

.flow-label {
  background:#e2e8f0;
  color:#1f2937;
  font-size:var(--fs-micro);
  font-weight:700;
  border-radius:999px;
  padding:0.15rem 0.55rem;
  text-transform:uppercase;
  letter-spacing:0.08em
}

.flow-arrow {
  text-align:center;
  color:#64748b;
  font-size:var(--fs-md)
}

.black-box-note {
  font-size:var(--fs-base);
  color:#475569
}

.open-list {
  display:flex;
  flex-direction:column;
  gap:0.8rem;
  max-height:340px;
  overflow:auto
}

.open-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.8rem;
  padding:0.6rem 0.8rem;
  border-radius:10px;
  border:1px solid #e2e8f0;
  background:#f8fafc
}

.open-modal {
  width:min(572px,92vw)
}

.black-box-modal {
  width:min(682px,94vw)
}

.evaluation-modal {
  width:min(704px,94vw)
}

.modal-content.open-modal {
  background:#ffffff;
  color:#0f172a!important;
  box-shadow:0 12px 30px rgba(2,6,23,0.12)!important
}

#assessment-modal {
  padding:20px
}

#assessment-modal .eval-modal-card {
  background:#ffffff!important;
  color:#0f172a!important;
  border-radius:16px;
  width:min(680px,96vw);
  max-height:min(86vh,720px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 24px 64px rgba(0,0,0,0.18),0 4px 16px rgba(0,0,0,0.08)
}

.eval-mc-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  padding:22px 24px 16px;
  border-bottom:1px solid #f1f5f9;
  background:#ffffff!important;
  flex-shrink:0
}

.eval-mc-title {
  font-size:var(--fs-subhead)!important;
  font-weight:700!important;
  color:#0f172a!important;
  margin:0 0 3px!important;
  line-height:1.3
}

.eval-mc-subtitle {
  font-size:var(--fs-xs)!important;
  color:#94a3b8!important;
  margin:0!important
}

.eval-mc-close {
  width:32px;
  height:32px;
  border-radius:8px;
  border:1px solid #e2e8f0!important;
  background:#ffffff!important;
  color:#64748b!important;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink:0;
  transition:background 0.15s,color 0.15s
}

.eval-mc-close:hover {
  background:#f8fafc!important;
  color:#0f172a!important
}

.eval-mc-quota-bar {
  display:flex;
  align-items:center;
  gap:14px;
  padding:9px 24px;
  background:#f8fafc!important;
  border-bottom:1px solid #f1f5f9;
  flex-shrink:0
}

.eval-mc-quota-text {
  font-size:var(--fs-xs)!important;
  color:#64748b!important;
  white-space:nowrap;
  min-width:160px
}

.eval-mc-quota-track {
  flex:1;
  height:4px;
  background:#e2e8f0!important;
  border-radius:4px;
  overflow:hidden
}

.eval-mc-quota-fill {
  height:100%;
  background:#2563eb!important;
  border-radius:4px;
  transition:width 0.4s ease
}

.eval-mc-list {
  overflow-y:auto;
  flex:1;
  background:#ffffff!important
}

.eval-mc-list::-webkit-scrollbar {
  width:4px
}

.eval-mc-list::-webkit-scrollbar-track {
  background:#f8fafc
}

.eval-mc-list::-webkit-scrollbar-thumb {
  background:#e2e8f0;
  border-radius:4px
}

.eval-mc-empty {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:48px 24px;
  color:#94a3b8!important;
  font-size:var(--fs-xs)
}

.eval-mc-row {
  padding:18px 24px;
  border-bottom:1px solid #f1f5f9;
  background:#ffffff!important;
  transition:background 0.15s
}

.eval-mc-row:hover {
  background:#fafbfd!important
}

.eval-mc-row:last-child {
  border-bottom:none
}

.eval-mc-row-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px
}

.eval-mc-row-left {
  flex:1;
  min-width:0
}

.eval-mc-row-title {
  font-size:var(--fs-sm)!important;
  font-weight:600!important;
  color:#0f172a!important;
  margin:0 0 4px!important;
  line-height:1.4
}

.eval-mc-row-date {
  font-size:var(--fs-xss)!important;
  color:#94a3b8!important
}

.eval-mc-row-right {
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0
}

.eval-mc-status {
  font-size:var(--fs-micro)!important;
  font-weight:700!important;
  letter-spacing:0.05em;
  text-transform:uppercase;
  padding:3px 10px;
  border-radius:20px;
  white-space:nowrap
}

.eval-mc-status.completed {
  background:rgba(34,197,94,0.10)!important;
  color:#16a34a!important
}

.eval-mc-status.cancelled {
  background:rgba(239,68,68,0.08)!important;
  color:#dc2626!important
}

.eval-mc-status.in-progress {
  background:rgba(37,99,235,0.08)!important;
  color:#2563eb!important
}

.eval-mc-status.not-completed {
  background:rgba(245,158,11,0.10)!important;
  color:#d97706!important
}

.eval-mc-view-btn {
  font-size:var(--fs-xs)!important;
  font-weight:600!important;
  color:#ffffff!important;
  background:#2563eb!important;
  border:none!important;
  border-radius:8px;
  padding:5px 14px;
  cursor:pointer;
  transition:background 0.15s;
  white-space:nowrap
}

.eval-mc-view-btn:hover {
  background:#1d4ed8!important
}

.eval-mc-scores {
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:12px
}

.eval-mc-score-pill {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:#f1f5f9!important;
  border:1px solid #e2e8f0!important;
  border-radius:10px;
  padding:7px 14px;
  min-width:56px;
  flex-shrink:0
}

.eval-mc-score-num {
  font-size:var(--fs-lg)!important;
  font-weight:800!important;
  color:#0f172a!important;
  line-height:1
}

.eval-mc-score-label {
  font-size:var(--fs-micro)!important;
  color:#94a3b8!important;
  margin-top:2px;
  text-transform:uppercase;
  letter-spacing:0.05em
}

.eval-mc-progress-group {
  flex:1;
  min-width:0
}

.eval-mc-progress-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:5px
}

.eval-mc-progress-label {
  font-size:var(--fs-xss)!important;
  color:#64748b!important;
  font-weight:500!important
}

.eval-mc-progress-pct {
  font-size:var(--fs-xss)!important;
  color:#94a3b8!important
}

.eval-mc-progress-track {
  height:5px;
  background:#e2e8f0!important;
  border-radius:4px;
  overflow:hidden
}

.eval-mc-progress-fill {
  height:100%;
  background:#2563eb!important;
  border-radius:4px;
  transition:width 0.4s ease
}

.eval-mc-missing {
  margin-top:4px
}

.eval-mc-missing-toggle {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
  border-radius:8px;
  padding:7px 12px;
  cursor:pointer;
  transition:background 0.15s
}

.eval-mc-missing-toggle:hover {
  background:#f1f5f9!important
}

.eval-mc-missing-label {
  font-size:var(--fs-xs)!important;
  color:#64748b!important;
  font-weight:500!important;
  display:flex;
  align-items:center;
  gap:7px
}

.eval-mc-missing-count {
  background:#fee2e2!important;
  color:#dc2626!important;
  font-size:var(--fs-micro)!important;
  font-weight:700!important;
  padding:1px 7px;
  border-radius:10px
}

.eval-mc-chevron {
  color:#94a3b8!important;
  transition:transform 0.2s ease;
  flex-shrink:0
}

.eval-mc-tags {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:10px 0 2px
}

.eval-mc-tag {
  font-size:var(--fs-xss)!important;
  color:#475569!important;
  background:#f1f5f9!important;
  border:1px solid #e2e8f0!important;
  border-radius:6px;
  padding:3px 10px;
  font-weight:500!important
}

.modal-content.open-modal .modal-message {
  color:#475569!important
}

.open-name {
  font-size:var(--fs-base);
  font-weight:600;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

.open-tag {
  font-size:var(--fs-micro);
  padding:0.2rem 0.45rem;
  border-radius:999px;
  background:#e2e8f0;
  color:#1f2a44;
  font-weight:600
}

.open-actions {
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  flex-shrink:0
}

.open-button,.open-delete {
  border:none;
  font-size:var(--fs-sm);
  font-weight:600;
  padding:0.35rem 0.8rem;
  border-radius:10px;
  cursor:pointer
}

.open-button {
  background:#2563eb;
  color:#f8fafc
}

.open-button:hover {
  background:#1d4ed8
}

.open-delete {
  background:#dc2626;
  color:#fff7f7;
  padding:0.35rem 0.6rem
}

.open-delete:hover {
  background:#b91c1c
}

.open-empty {
  font-size:var(--fs-base);
  color:#64748b
}

.toast-container {
  position:fixed;
  top:1.5rem;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  gap:0.5rem;
  z-index:50
}

.toast {
  min-width:220px;
  padding:0.6rem 0.9rem;
  border-radius:12px;
  font-size:var(--fs-base);
  font-weight:600;
  color:#0f172a;
  background:#f1f5f9;
  border:1px solid #cbd5f5;
  box-shadow:0 12px 24px rgba(15,23,42,0.15)
}

.toast.success {
  background:#dcfce7;
  border-color:#86efac;
  color:#14532d
}

.toast.error {
  background:#fee2e2;
  border-color:#fca5a5;
  color:#7f1d1d
}

.view-only .palette,.view-only #canvas-content,.view-only #connections {
  pointer-events:none
}

.view-only .palette {
  opacity:0.6
}

.view-only #inspector input,.view-only #inspector select,.view-only #inspector textarea,.view-only #inspector button {
  pointer-events:none;
  opacity:0.6
}

body.evaluation-locked .topbar,body.evaluation-locked .header {
  pointer-events:auto;
  cursor:not-allowed
}

body.evaluation-locked .topbar *,body.evaluation-locked .header * {
  pointer-events:none
}

.right-panel.evaluation-time-expired {
  position:relative;
  pointer-events:none;
  user-select:none
}

.right-panel.evaluation-time-expired::after {
  content:"⏱️ Time's up — submitting…";
  position:absolute;
  inset:0;
  z-index:200;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:var(--fs-subhead);
  font-weight:700;
  color:#991b1b;
  background:rgba(255,255,255,0.82);
  backdrop-filter:blur(3px);
  border-radius:inherit;
  pointer-events:all
}

body.eval-time-expired #left-panel,body.eval-time-expired .canvas-wrapper {
  position:relative;
  pointer-events:none;
  user-select:none
}

body.eval-time-expired #left-panel::after,body.eval-time-expired .canvas-wrapper::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:300;
  background:rgba(255,255,255);
  backdrop-filter:blur(2px);
  pointer-events:all;
  cursor:not-allowed
}

.modal-error {
  min-height:1rem;
  font-size:var(--fs-sm);
  color:#b91c1c
}

#auth-modal.auth-loading-active .modal-form,#auth-modal.auth-loading-active .sso-buttons,#auth-modal.auth-loading-active .modal-tabs,#auth-modal.auth-loading-active .modal-close {
  opacity:0.65;
  pointer-events:none
}

#auth-modal.auth-loading-active .auth-loading {
  opacity:1;
  pointer-events:auto
}

.auth-loading {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  color:#334155;
  font-size:var(--fs-base);
  font-weight:600;
  margin-top:6px
}

.auth-loading-spinner,.btn-spinner {
  width:16px;
  height:16px;
  border-radius:999px;
  border:2px solid rgba(37,99,235,0.25);
  border-top-color:rgba(37,99,235,0.95);
  animation:spin 0.8s linear infinite
}

.btn-spinner {
  display:none;
  margin-left:8px
}

button.is-loading .btn-spinner {
  display:inline-block
}

button.is-loading .btn-label {
  opacity:0.9
}

@keyframes spin {
  from {
    transform:rotate(0deg)
  }
  to {
    transform:rotate(360deg)
  }

}

.sso-buttons {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:0
}

.sso-btn {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 12px;
  border-radius:10px;
  font-size:var(--fs-sm);
  font-weight:600;
  text-decoration:none;
  border:1px solid transparent;
  cursor:pointer;
  transition:background 0.15s,border-color 0.15s,box-shadow 0.15s;
  white-space:nowrap
}

.sso-github {
  background:#0f172a;
  color:#fff;
  border-color:#0f172a
}

.sso-github:hover {
  background:#1e293b;
  box-shadow:0 2px 8px rgba(15,23,42,0.18)
}

.sso-google {
  background:#fff;
  color:#1e293b;
  border-color:#e2e8f0
}

.sso-google:hover {
  background:#f8fafc;
  border-color:#cbd5e1;
  box-shadow:0 2px 8px rgba(0,0,0,0.07)
}

.sso-divider {
  display:flex;
  align-items:center;
  gap:10px;
  margin:4px 0 2px;
  color:#94a3b8;
  font-size:var(--fs-sm)
}

.sso-divider::before,.sso-divider::after {
  content:"";
  flex:1;
  height:1px;
  background:#e2e8f0
}

.validation-panel {
  margin-top:0.8rem;
  background:#fff1f2;
  border:1px solid #fecdd3;
  color:#9f1239;
  border-radius:10px;
  padding:0.8rem;
  font-size:var(--fs-base)
}

.validation-panel ul {
  margin:0.25rem 0 0 1rem
}

.validation-hint {
  margin-top:0.5rem;
  margin-bottom:0.5rem;
  padding:0.6rem 0.7rem;
  border-radius:10px;
  background:rgba(59,130,246,0.12);
  border:1px solid rgba(59,130,246,0.25);
  color:#0f172a;
  font-size:var(--fs-base);
  line-height:1.45;
  font-weight:500
}

.validation-hint div + div {
  margin-top:0.25rem
}

.layer-flow-list {
  margin:0.4rem 0 0 1.1rem;
  display:flex;
  flex-direction:column;
  gap:0.8rem;
  font-size:var(--fs-base);
  color:#1f2937
}

.layer-flow-list li {
  line-height:1.5
}

.layer-desc {
  display:block;
  font-size:var(--fs-xs);
  color:#6b7280;
  margin-top:0.1rem
}

.layer-hint {
  margin-top:1rem;
  font-size:var(--fs-lg);
  color:#6b7280;
  border-top:1px solid #e5e7eb;
  padding:1rem
}

.result-block-blackbox h4 {
  display:flex;
  align-items:center;
  gap:0.4rem;
  font-size:var(--fs-micro)
}

.faq-content {
  flex:1;
  min-height:0;
  overflow:auto;
  padding-top:0.25rem;
  font-size:var(--fs-base);
  color:#475569;
  scrollbar-width:none
}

.faq-content::-webkit-scrollbar {
  width:0;
  height:0
}

.guide-content {
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding-top:0.25rem;
  font-size:var(--fs-sm);
  color:#475569;
  scrollbar-width:none;
  display:flex;
  flex-direction:column;
  gap:10px
}

.guide-content::-webkit-scrollbar {
  width:0;
  height:0
}

.guide-empty {
  color:#94a3b8;
  font-size:var(--fs-sm);
  text-align:center;
  padding:1.5rem 0.5rem
}

.guide-stage-header {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  align-content:center;
  gap:8px;
  margin-bottom:2px
}

.guide-stage-pill {
  background:#10469c;
  color:#fff;
  font-size:var(--fs-micro);
  font-weight:700;
  border-radius:999px;
  padding:7px 9px;
  letter-spacing:0.04em;
  white-space:nowrap;
  text-align:center;
  width:fit-content;
  align-items:center;
  align-self:center
}

.guide-stage-title {
  font-size:var(--fs-sm);
  font-weight:700;
  color:#0f172a;
  line-height:1.2
}

.guide-goal {
  background:#eff6ff;
  border-left:3px solid #3b82f6;
  border-radius:0 8px 8px 0;
  padding:7px 10px;
  font-size:var(--fs-sm);
  color:#1d4ed8;
  font-style:italic;
  line-height:1.4
}

.guide-section-label {
  font-size:var(--fs-sm);
  font-weight:700;
  letter-spacing:0.02em;
  text-transform:uppercase;
  color:#64748b;
  margin:5px 0px
}

.guide-components {
  display:flex;
  flex-direction:column;
  gap:10px
}

.guide-component-row {
  display:flex;
  align-items:flex-start;
  gap:25px;
  background:#ffffff;
  border:1px solid #e6eefc;
  border-radius:8px;
  padding:5px
}

.guide-component-badge {
  flex:0 0 auto;
  font-size:var(--fs-sm);
  font-weight:600;
  border-radius:6px;
  padding:2px 7px;
  margin-top:1px;
  white-space:nowrap;
  letter-spacing:0.03em;
  text-align:center
}

.guide-badge-user {
  background:#e0f2fe;
  color:#0369a1
}

.guide-badge-server {
  background:#fef3c7;
  color:#92400e
}

.guide-badge-database {
  background:#fce7f3;
  color:#9d174d
}

.guide-badge-cache {
  background:#d1fae5;
  color:#065f46
}

.guide-badge-loadbalancer {
  background:#ede9fe;
  color:#5b21b6
}

.guide-badge-queue {
  background:#fef9c3;
  color:#713f12
}

.guide-badge-worker {
  background:#fef9c3;
  color:#713f12
}

.guide-badge-cdn {
  background:#dbeafe;
  color:#1d4ed8
}

.guide-badge-ratelimiter {
  background:#fee2e2;
  color:#991b1b
}

.guide-badge-apigateway {
  background:#e0f2fe;
  color:#0369a1
}

.guide-badge-edge {
  background:#f0fdf4;
  color:#166534
}

.guide-badge-monolith {
  background:#f1f5f9;
  color:#334155
}

.guide-badge-searchindex {
  background:#fdf4ff;
  color:#7e22ce
}

.guide-badge-blobstorage {
  background:#fff7ed;
  color:#c2410c
}

.guide-badge-default {
  background:#f1f5f9;
  color:#334155
}

.guide-component-info {
  flex:1 1 auto;
  min-width:0
}

.guide-component-name {
  font-size:var(--fs-sm);
  font-weight:700;
  color:#0f172a;
  line-height:1.2
}

.guide-component-desc {
  font-size:var(--fs-sm);
  color:#64748b;
  margin-top:2px;
  line-height:1.4
}

.guide-section-sublabel {
  font-size:var(--fs-sm);
  font-weight:600;
  color:#94a3b8;
  text-transform:uppercase;
  letter-spacing:0.06em
}

.guide-component-card {
  background:#ffffff;
  border:1px solid #e6eefc;
  border-radius:10px;
  overflow:hidden
}

.guide-component-card[open] {
  border-color:#93c5fd
}

.guide-new-card {
  border-color:#bfdbfe;
  background:linear-gradient(135deg,#f0f7ff 0%,#ffffff 100%)
}

.guide-new-card[open] {
  border-color:#3b82f6
}

.guide-component-card-header {
  display:flex;
  align-items:center;
  gap:6px;
  padding:10px;
  cursor:pointer;
  list-style:none;
  user-select:none;
  font-size:var(--fs-sm);
  overflow:hidden
}

.guide-card-comp-name {
  font-size:var(--fs-sm);
  font-weight:600;
  color:#0f172a;
  flex:1 1 auto;
  overflow:hidden;
  text-align:center;
  width:fit-content;
  text-overflow:ellipsis;
  white-space:nowrap
}

.guide-component-card-header::-webkit-details-marker {
  display:none
}

.guide-component-card-header::marker {
  display:none
}

.guide-component-card:hover .guide-component-card-header {
  background:#f0f7ff
}

.guide-card-chevron {
  margin-left:auto;
  font-size:var(--fs-sm);
  color:#94a3b8;
  transition:transform 0.2s ease;
  flex:0 0 auto
}

.guide-component-card[open] .guide-card-chevron {
  transform:rotate(90deg);
  color:#3b82f6
}

.guide-card-body {
  display:flex;
  flex-direction:column;
  gap:15px;
  padding:10px;
  border-top:1px solid #e6eefc
}

.guide-component-card[open] .guide-card-body {
  border-top-color:#bfdbfe
}

.guide-kb-row {
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:10px;
  border-radius:10px;
  background:#f8fafc;
  border-left:3px solid #e2e8f0
}

.guide-kb-label {
  font-size:var(--fs-sm);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.02rem
}

.guide-kb-label.why {
  color:#1d4ed8;
  border-color:#93c5fd
}

.guide-kb-label.role {
  color:#065f46;
  border-color:#6ee7b7
}

.guide-kb-label.helps {
  color:#5b21b6;
  border-color:#c4b5fd
}

.guide-kb-label.alts {
  color:#92400e;
  border-color:#fcd34d
}

.guide-kb-row:has(.guide-kb-label.why) {
  border-left-color:#93c5fd
}

.guide-kb-row:has(.guide-kb-label.role) {
  border-left-color:#6ee7b7
}

.guide-kb-row:has(.guide-kb-label.helps) {
  border-left-color:#c4b5fd
}

.guide-kb-row:has(.guide-kb-label.alts) {
  border-left-color:#fcd34d
}

.guide-kb-value {
  font-size:var(--fs-sm);
  color:#334155;
  line-height:1.5
}

.guide-connections {
  display:flex;
  flex-direction:column;
  gap:5px
}

.guide-connection-row {
  display:flex;
  align-items:flex-start;
  gap:6px;
  padding:5px 9px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:7px
}

.guide-conn-arrow {
  font-size:var(--fs-sm);
  color:#3b82f6;
  flex:0 0 auto;
  margin-top:1px
}

.guide-conn-text {
  font-size:var(--fs-xs);
  color:#1e293b;
  line-height:1.4
}

.guide-conn-text strong {
  color:#0f172a
}

.guide-new-badge {
  display:inline-block;
  background:#dcfce7;
  color:#15803d;
  font-size:var(--fs-micro);
  font-weight:600;
  border-radius:999px;
  padding:1px 7px;
  letter-spacing:0.03em;
  vertical-align:middle;
  margin-left:5px
}

.guide-new-row {
  border-left:3px solid #22c55e!important;
  background:#f0fdf4!important
}

.guide-breakdown {
  display:flex;
  flex-direction:column;
  gap:5px
}

.guide-breakdown-card {
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:8px;
  padding:7px 10px
}

.guide-breakdown-label {
  font-size:var(--fs-xs);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.07em;
  margin-bottom:3px
}

.guide-breakdown-label.added {
  color:#16a34a
}

.guide-breakdown-label.risk {
  color:#dc2626
}

.guide-breakdown-label.trade {
  color:#d97706
}

.guide-breakdown-label.scale {
  color:#2563eb
}

.guide-breakdown-label.missing {
  color:#92400e
}

.guide-breakdown-label.perf {
  color:#5b21b6
}

.guide-breakdown-label.rely {
  color:#065f46
}

.guide-breakdown-label.fault {
  color:#991b1b
}

.guide-breakdown-value {
  font-size:var(--fs-sm);
  color:#334155;
  line-height:1.45
}

.faq-item {
  background:#ffffff;
  border-radius:10px;
  border:1px solid #e2e8f0;
  padding:0.6rem;
  margin-bottom:0.5rem
}

.faq-item h4 {
  font-size:var(--fs-base);
  margin-bottom:0.25rem;
  color:#0f172a
}

.faq-topics {
  display:flex;
  flex-wrap:wrap;
  gap:0.35rem;
  margin-top:0.4rem
}

.faq-topic {
  background:#e2e8f0;
  color:#1f2937;
  border-radius:999px;
  padding:0.1rem 0.5rem;
  font-size:var(--fs-micro);
  font-weight:600
}

.layout.left-collapsed #left-panel {
  opacity:0;
  pointer-events:none;
  transform:translateX(-12px)
}

.layout.right-collapsed #right-panel {
  opacity:0;
  pointer-events:none;
  transform:translateX(12px)
}

.panel-header {
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  position:relative;
  box-sizing:border-box;
  height:3.5rem;
  min-height:3.5rem;
}

.panel-header h2 {
  flex:1 1 auto;
  text-align:center;
  margin:0;
  font-size: var(--fs-sm);
}

.panel-header .icon-button {
  position:absolute;
  left:1rem;
  top:50%;
  transform:translateY(-50%)
}

#left-panel .panel-header {
  border-bottom:1px solid rgba(226,232,240,0.9);  
  font-size: var(--fs-sm);

}

body.learn-mode #left-panel .panel-header {
  border-bottom:none
}

#right-panel .panel-header {
  position:relative;
  align-items:center;
  padding:0 1rem;
  border-bottom:1px solid rgba(226,232,240,0.9);
  overflow:hidden
}

#right-panel .panel-header #toggle-right-panel {
  position:absolute;
  left:auto;
  right:0rem;
  top:50%;
  transform:translateY(-50%);
  z-index:2
}

.icon-button {
  width:32px;
  height:32px;
  border-radius:8px;
  border:1px solid #94a3b8;
  background:#cbd5e1;
  cursor:pointer;
  font-size:var(--fs-md);
  font-weight:700;
  color:#0f172a;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease
}

.icon-button:hover {
  background:#2b4067
}

.panel {
  background:#ffffff;
  border-radius:12px;
  display:flex;
  flex-direction:column;
  border:1px solid #e2e8f0;
  height:100%;
  max-height:100%;
  overflow:hidden
}

.panel section {
  display:flex;
  flex-direction:column;
  gap:0.8rem
}

.assessment-table {
  width:100%;
  border-collapse:collapse;
  font-size:var(--fs-base)
}

.assessment-table th,.assessment-table td {
  text-align:left;
  padding:0.6rem 0.5rem;
  border-bottom:1px solid #e2e8f0;
  color:#1f2937
}

.assessment-table th {
  font-size:var(--fs-sm);
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:#64748b
}

.assessment-table tr:last-child td {
  border-bottom:none
}

#left-panel {
  gap:0;
  height:100%;
  min-height:0;
  overflow:hidden
}

#left-panel section {
  font-size:var(--fs-base)
}

#left-panel .panel-header h2,#left-panel h2 {
  font-size:var(--fs-base);
  letter-spacing:0.06em
}

#left-panel .panel-section {
  flex:1 1 0;
  min-height:120px;
  overflow:hidden;
  background:#ffffff
}

#left-panel .components-section {
  flex:0 0 auto;
  min-height:0;
  border:none;
  padding:0.5rem 0 0 0;
  border-radius:0;
  overflow:hidden
}

#left-panel .components-section .section-body {
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  min-height:0
}

#left-panel .components-section .palette {
  flex-wrap:wrap;
  align-content:flex-start;
  justify-content:center;
  overflow:visible
}

body.evaluation-mode #left-panel .components-section {
  flex:0 0 30%!important;
  min-height:0px
}

body.evaluation-mode #left-panel .inspector-section {
  flex:1 1 0!important;
  min-height:0;
  overflow:hidden
}

body.evaluation-mode #left-panel .inspector-section>h2 {
  display:none
}

body.evaluation-mode .palette {
  max-height:none
}

#left-panel .inspector-section {
  flex:1 1 0;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  font-size:var(--fs-sm);
  padding: 15px;
}

#left-panel .actions-section {
  flex:0 0 auto;
  min-height:0
}

#left-panel .section-body {
  display:flex;
  flex-direction:column;
  gap:0.5rem;
  overflow:hidden;
  /* padding-right:0.25rem; */
  flex:1;
  min-height:0;
  height:auto;
  scrollbar-width:none
}

#left-panel .inspector-section .section-body {
  flex:1 1 0;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  display:flex;
  flex-direction:column
}

#left-panel .section-body::-webkit-scrollbar {
  width:0;
  height:0
}

.action-footer {
  margin-top:auto;
  display:grid;
  gap:0.5rem
}

.inspector-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0.7rem;
  font-size:var(--fs-sm)
}

.inspector-fields .field-description {
  grid-column:1 / -1
}

.panel h2 {
  font-size:var(--fs-sm);
  color:#0f172a;
  text-transform:uppercase;
  letter-spacing:0.08em;
  font-weight:700
}

.panel section + section {
  padding-top:0.5rem;
  border-top:1px solid #e2e8f0
}

#left-panel .inspector-section {
  padding-top:0.75rem;
  border-top:1px solid #e2e8f0;
  min-height:0;
  flex:1 1 0;
  overflow:hidden;
  display:flex;
  flex-direction:column
}

#left-panel #roadmap-left-view {
  padding-top:0;
  border-top:none;
  background:#ffffff
}

#left-panel #roadmap-left-view .roadmap-topic-list {
  padding:0
}

.palette {
  display:flex;
  flex-wrap:wrap;
  gap:0.65rem;
  max-height:350px;
  overflow-y:auto;
  overflow-x:visible;
  height:100%;
  scrollbar-width:none;
  align-content:flex-start;
  align-items:center;
  justify-content:center;
  padding:10px 0px
}

#left-panel .components-section .palette {
  gap:0.5rem
}

@media (max-width:1100px) {
  #left-panel .components-section .palette {
    gap:0.65rem
  }

}

#left-panel .components-section .palette {
  gap:0.5rem
}

@media (max-width:1100px) {
  #left-panel .components-section .palette {
    gap:0.65rem
  }

}

.palette::-webkit-scrollbar {
  width:0;
  height:0
}

.canvas-reset {
  position:absolute;
  top:10px;
  right:10px;
  width:35px;
  height:35px;
  border-radius:10px;
  border:1px solid #cbd5e1;
  background:#ffffff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:var(--fs-subhead);
  cursor:pointer;
  box-shadow:0 10px 18px rgba(15,23,42,0.1);
  z-index:6;
  transition:all 0.2s ease
}

.canvas-toolbar {
  position:absolute;
  top:10px;
  left:56px;
  right:56px;
  display:flex;
  gap:0.8rem;
  align-items:center;
  justify-content:flex-start;
  background:transparent;
  border:none;
  border-radius:0;
  padding:0 8px;
  box-shadow:none;
  backdrop-filter:none;
  z-index:8
}

.canvas-toolbar>* {
  display:inline-flex;
  align-items:center;
  height:36px;
  min-height:36px
}

.canvas-toolbar .preset-picker select,.canvas-toolbar .stage-picker select {
  background:linear-gradient(135deg,#111827,#1f2937);
  color:#f8fafc;
  border:1px solid #475569;
  box-shadow:0 8px 16px rgba(15,23,42,0.14);
  width:180px;
  overflow:hidden;
  justify-content:center;
  text-align:center;
  align-items:center
}

.canvas-toolbar .preset-picker select:focus,.canvas-toolbar .stage-picker select:focus {
  outline:2px solid rgba(59,130,246,0.5);
  outline-offset:2px;
  width:180px;
  text-align:center;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:36px
}

.canvas-toolbar .learn-controls .mode-button {
  background:linear-gradient(135deg,#1e3a8a,#2563eb);
  color:#f8fafc;
  border:1px solid rgba(59,130,246,0.6);
  box-shadow:0 8px 16px rgba(37,99,235,0.22);
  height:36px;
  padding:0 12px;
  min-height:36px
}

.canvas-toolbar .learn-controls .mode-button.active,.canvas-toolbar .learn-controls .mode-button[aria-pressed="true"] {
  background:linear-gradient(135deg,#0f172a,#1f2937);
  color:#e2e8f0;
  border-color:rgba(100,116,139,0.7)
}

.canvas-reset:hover {
  border-color:#94a3b8;
  transform:translateY(-1px)
}

/* ── Floating canvas toolbar ───────────────────────────── */
.canvas-float-toolbar {
  position:absolute;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  z-index:20;
  display:flex;
  align-items:center;
  gap:2px;
  padding:5px 8px;
  background:#ffffff;
  border-radius:14px;
  box-shadow:0 2px 12px rgba(0,0,0,0.10),0 0 0 1px rgba(0,0,0,0.06);
  pointer-events:all;
  user-select:none
}

.cfb-btn {
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:none;
  background:transparent;
  color:#64748b;
  border-radius:8px;
  cursor:pointer;
  transition:background 0.15s,color 0.15s;
  flex-shrink:0
}

.cfb-btn svg {
  width:16px;
  height:16px;
  pointer-events:none
}

.cfb-btn:hover {
  background:#f1f5f9;
  color:#0f172a
}

.cfb-btn:disabled {
  opacity:0.35;
  cursor:not-allowed
}

.cfb-btn:disabled:hover {
  background:transparent;
  color:#64748b
}

.cfb-btn--danger:hover {
  background:#fee2e2;
  color:#dc2626
}

.cfb-sep {
  width:1px;
  height:18px;
  background:#e2e8f0;
  margin:0 4px;
  flex-shrink:0
}

.cfb-zoom-label {
  font-size:var(--fs-xs);
  font-weight:600;
  color:#475569;
  min-width:40px;
  text-align:center;
  cursor:default;
  line-height:32px
}

body.evaluation-locked .canvas-float-toolbar,
body.eval-time-expired .canvas-float-toolbar {
  display:none
}
/* ──────────────────────────────────────────────────────── */

#right-panel section {
  display:flex;
  flex-direction:column;
  gap:0.8rem;
  flex:1;
  min-height:0
}

.panel-actions {
  display:flex;
  justify-content:center;
  gap:0.8rem;
  padding-top:0.5rem;
  flex:0 0 auto
}

#simulate-panel-actions {
  min-height:0;
  flex-shrink:0;
  align-items:center
}

body.evaluation-mode #simulate-panel-actions {
  min-height:0;
  padding-top:0;
  margin-top:0;
  display:none
}

.evaluate-selection-screen {
  position:fixed;
  top:calc(var(--header-height) + var(--topbar-height));
  bottom:var(--footer-height);
  left:0;
  right:0;
  background:#f0f2f7;
  color:#1e293b;
  display:flex;
  flex-direction:column;
  z-index:15;
  overflow:hidden;
  font-family:inherit
}

.evaluate-selection-screen.hidden {
  display:none!important
}

body.ess-open .layout {
  padding:revert;
  gap:revert
}

.ess-body {
  display:flex;
  flex:1;
  min-height:0;
  overflow:hidden
}

.ess-left {
  width:38%;
  flex-shrink:0;
  display:flex;
  align-items:stretch;
  overflow-y:auto;
  overflow-x:hidden;
  background:linear-gradient(160deg, #172340 0%, #172340 35%, #172340 100%);
  border-right:1px solid rgba(255,255,255,0.12);
  position:relative
}

.ess-left-inner {
  display:flex;
  flex-direction:column;
  gap:0;
  width:100%;
  padding:36px 40px 36px 40px;
  position:relative;
  z-index:1
}

.ess-accent-blob {
  position:absolute;
  top:-60px;
  right:-60px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,0.08) 0%,rgba(96,165,250,0.05) 50%,transparent 70%);
  pointer-events:none;
  z-index:0;
  overflow:hidden
}

/* ── ESS left-panel SVG floaters ────────────────────────────────────────── */
.ess-floater {
  position:absolute;
  pointer-events:none;
  z-index:0
}
.ess-floater--1 {
  width:340px;
  height:340px;
  top:-80px;
  right:-90px;
  opacity:1;
  animation:ess-spin 80s linear infinite
}
.ess-floater--2 {
  width:220px;
  height:220px;
  bottom:8%;
  left:-60px;
  opacity:1;
  animation:ess-float 11s ease-in-out infinite
}
.ess-floater--3 {
  width:150px;
  height:150px;
  top:44%;
  right:4%;
  opacity:1;
  animation:ess-float 14s ease-in-out infinite reverse
}
.ess-floater--4 {
  width:110px;
  height:110px;
  top:22%;
  left:6%;
  opacity:1;
  animation:ess-pulse 8s ease-in-out infinite
}
@keyframes ess-spin  { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes ess-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }
@keyframes ess-pulse { 0%,100%{opacity:0.45;transform:scale(1)} 50%{opacity:0.65;transform:scale(1.07)} }

/* ── ESS right-panel SVG floaters (light theme) ─────────────────────────── */
.ess-r-floater {
  position:absolute;
  pointer-events:none;
  z-index:0
}
.ess-r-floater--1 {
  width:380px;
  height:380px;
  top:-120px;
  right:-100px;
  opacity:1;
  animation:ess-spin 100s linear infinite
}
.ess-r-floater--2 {
  width:200px;
  height:200px;
  bottom:6%;
  left:-50px;
  opacity:1;
  animation:ess-float 12s ease-in-out infinite
}
.ess-r-floater--3 {
  width:140px;
  height:140px;
  top:50%;
  right:2%;
  opacity:1;
  animation:ess-float 15s ease-in-out infinite reverse
}

.ess-eyebrow {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.25);
  border-radius:20px;
  padding:5px 14px 5px 10px;
  font-size:var(--fs-xss);
  letter-spacing:0.1em;
  font-weight:700;
  color:#93c5fd;
  width:fit-content
}

.ess-headline {
  margin:20px 0 0 0;
  color:#ffffff;
  font-size:var(--fs-xxl);
  font-weight:800;
  line-height:1.15;
  letter-spacing:-0.5px
}

.ess-subhead {
  margin:14px 0 0 0;
  color:#bfdbfe;
  font-size:var(--fs-base);
  line-height:1.65
}

.ess-left-inner .ess-stepper {
  margin-top:32px
}

.ess-stepper {
  display:flex;
  flex-direction:column;
  padding-left:0;
  list-style:none
}

.ess-step {
  display:flex;
  gap:0;
  align-items:flex-start
}

.ess-step-left {
  display:flex;
  flex-direction:column;
  align-items:center;
  flex-shrink:0;
  width:36px;
  margin-right:14px
}

.ess-step-dot {
  width:36px;
  height:36px;
  border-radius:10px;
  background:rgba(255,255,255,0.15);
  border:1px solid rgba(255,255,255,0.25);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  position:relative;
  z-index:1;
  box-shadow:0 4px 12px rgba(0,0,0,0.2)
}

.ess-step-dot svg {
  width:16px;
  height:16px;
  color:#fff;
  stroke:#fff
}

.ess-step-line {
  width:2px;
  flex:1;
  min-height:20px;
  background:rgba(255,255,255,0.2);
  margin:4px 0
}

.ess-step-body {
  padding-bottom:22px;
  padding-top:6px
}

.ess-step--last .ess-step-body {
  padding-bottom:6px
}

.ess-step-title {
  color:#ffffff;
  font-size:var(--fs-base);
  font-weight:700;
  line-height:1.3
}

.ess-step-desc {
  color:#93c5fd;
  font-size:var(--fs-xs);
  line-height:1.55;
  margin-top:3px
}

.ess-terminal-node {
  padding-left:50px;
  margin-top:2px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px
}

.ess-terminal-arrow {
  margin-left:6px;
  opacity:0.5
}

.ess-terminal-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:rgba(255,255,255,0.15);
  border:1px solid rgba(255,255,255,0.3);
  color:#fff;
  font-size:var(--fs-xs);
  font-weight:700;
  padding:6px 14px;
  border-radius:20px;
  box-shadow:0 4px 14px rgba(0,0,0,0.2);
  letter-spacing:0.02em
}

.ess-social-proof {
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:36px;
  padding:14px 16px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.15);
  border-radius:12px
}

.ess-avatars {
  display:flex;
  flex-shrink:0
}

.ess-avatar {
  width:30px;
  height:30px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:var(--fs-xss);
  font-weight:700;
  color:#fff;
  border:2px solid rgba(255,255,255,0.4);
  margin-left:-8px;
  flex-shrink:0;
  box-shadow:0 2px 6px rgba(0,0,0,0.2)
}

.ess-avatars .ess-avatar:first-child {
  margin-left:0
}

.ess-social-text {
  color:#bfdbfe;
  font-size:var(--fs-xs);
  line-height:1.45;
  font-weight:500
}

.ess-right {
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
  color:#1e293b;
  border-left:1px solid rgba(59,130,246,0.15);
  position:relative;
  overflow:hidden
}

.ess-right-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:24px 32px 20px 32px;
  flex-shrink:0;
  gap:16px;
  flex-wrap:wrap;
  background:rgba(255,255,255,0.7);
  backdrop-filter:blur(4px);
  border-bottom:1px solid rgba(59,130,246,0.12);
  position:relative;
  z-index:1
}

.ess-right-header-left {
  display:flex;
  flex-direction:column;
  gap:4px
}

.ess-right-title {
  color:#0f172a;
  font-size:var(--fs-lg);
  font-weight:800;
  line-height:1.2;
  letter-spacing:-0.01em
}

.ess-right-subtitle {
  color:#2563eb;
  font-size:var(--fs-xs);
  font-weight:500
}

.ess-filters {
  display:flex;
  gap:6px;
  flex-wrap:wrap
}

.ess-filter-pill {
  background:#fff;
  border:1px solid #e2e8f0;
  color:#64748b;
  border-radius:20px;
  padding:6px 16px;
  font-size:var(--fs-xs);
  font-weight:500;
  cursor:pointer;
  transition:background 0.15s ease,border-color 0.15s ease,color 0.15s ease;
  white-space:nowrap
}

.ess-filter-pill:hover {
  color:#475569;
  border-color:#94a3b8;
  background:#f8fafc
}

.ess-filter-pill--active[data-filter="all"] {
  background:rgba(37,99,235,0.1);
  border-color:#2563eb;
  color:#1d4ed8
}

.ess-filter-pill--active[data-filter="easy"] {
  background:rgba(34,197,94,0.1);
  border-color:#16a34a;
  color:#15803d
}

.ess-filter-pill--active[data-filter="medium"] {
  background:rgba(245,158,11,0.1);
  border-color:#d97706;
  color:#b45309
}

.ess-filter-pill--active[data-filter="hard"] {
  background:rgba(239,68,68,0.1);
  border-color:#dc2626;
  color:#b91c1c
}

.ess-cards-wrap {
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:20px 28px 8px 28px;
  scrollbar-width:thin;
  scrollbar-color:#cbd5e1 transparent;
  position:relative;
  z-index:1
}

.ess-cards-wrap::-webkit-scrollbar {
  width:4px
}

.ess-cards-wrap::-webkit-scrollbar-thumb {
  background:#cbd5e1;
  border-radius:4px
}

.ess-card-grid {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px
}

.ess-card {
  background:linear-gradient(145deg,#ffffff 0%,#eff6ff 60%,#dbeafe 100%);
  border:1px solid rgba(59,130,246,0.15);
  border-radius:12px;
  padding:18px;
  cursor:pointer;
  transition:background 0.18s ease,border-color 0.18s ease,transform 0.18s ease,box-shadow 0.18s ease;
  display:flex;
  flex-direction:column;
  user-select:none
}

.ess-card:hover {
  background:linear-gradient(145deg,#eff6ff 0%,#dbeafe 60%,#bfdbfe 100%);
  border-color:rgba(59,130,246,0.45);
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(37,99,235,0.12)
}

.ess-card.selected {
  background:linear-gradient(145deg,#dbeafe 0%,#bfdbfe 60%,#93c5fd 100%);
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,0.18)
}

.ess-card-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px
}

.ess-diff-badge {
  display:inline-block;
  border-radius:20px;
  padding:3px 10px;
  font-size:var(--fs-xss);
  font-weight:700;
  white-space:nowrap
}

.ess-diff-badge--easy {
  background:rgba(22,163,74,0.12);
  border:1px solid rgba(22,163,74,0.4);
  color:#15803d
}

.ess-diff-badge--medium {
  background:rgba(217,119,6,0.12);
  border:1px solid rgba(217,119,6,0.4);
  color:#b45309
}

.ess-diff-badge--hard {
  background:rgba(220,38,38,0.12);
  border:1px solid rgba(220,38,38,0.4);
  color:#b91c1c
}

.ess-best-badge {
  background:rgba(22,163,74,0.1);
  border:1px solid #16a34a;
  color:#15803d;
  font-size:var(--fs-xss);
  font-weight:600;
  padding:3px 10px;
  border-radius:20px;
  white-space:nowrap;
  flex-shrink:0
}

.ess-card-title {
  color:#0f172a;
  font-size:var(--fs-base);
  font-weight:700;
  margin-top:10px;
  line-height:1.35
}

.ess-card-desc {
  color:#475569;
  font-size:var(--fs-sm);
  line-height:1.55;
  margin-top:5px;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
  overflow:hidden
}

.ess-card-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(59,130,246,0.1)
}

.ess-card-tag {
  background:rgba(37,99,235,0.1);
  color:#1d4ed8;
  border-radius:4px;
  font-size:var(--fs-xs);
  font-weight:500;
  padding:2px 8px
}

.ess-card-check {
  width:20px;
  height:20px;
  border-radius:50%;
  background:#2563eb;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:var(--fs-xss);
  font-weight:700;
  flex-shrink:0;
  transition:opacity 0.15s
}

.ess-card-diff-selector {
  overflow:hidden;
  max-height:0;
  transition:max-height 0.25s ease
}

.ess-card.selected .ess-card-diff-selector {
  max-height:80px
}

.ess-card-diff-row {
  margin-top:12px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap
}

.ess-card-diff-label {
  color:#64748b;
  font-size:var(--fs-sm);
  white-space:nowrap
}

.ess-card-diff-pill {
  border-radius:20px;
  padding:4px 12px;
  font-size:var(--fs-xs);
  font-weight:600;
  cursor:pointer;
  border:1px solid transparent;
  transition:background 0.15s ease,border-color 0.15s ease,color 0.15s ease
}

.ess-card-diff-pill[data-diff="easy"] {
  background:rgba(22,163,74,0.08);
  border-color:rgba(22,163,74,0.3);
  color:#16a34a
}

.ess-card-diff-pill[data-diff="medium"] {
  background:rgba(217,119,6,0.08);
  border-color:rgba(217,119,6,0.3);
  color:#d97706
}

.ess-card-diff-pill[data-diff="hard"] {
  background:rgba(220,38,38,0.08);
  border-color:rgba(220,38,38,0.3);
  color:#dc2626
}

.ess-card-diff-pill.active[data-diff="easy"] {
  background:rgba(22,163,74,0.2);
  border-color:#16a34a;
  color:#15803d
}

.ess-card-diff-pill.active[data-diff="medium"] {
  background:rgba(217,119,6,0.2);
  border-color:#d97706;
  color:#b45309
}

.ess-card-diff-pill.active[data-diff="hard"] {
  background:rgba(220,38,38,0.2);
  border-color:#dc2626;
  color:#b91c1c
}

.ess-action-bar {
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 28px;
  border-top:1px solid rgba(59,130,246,0.12);
  background:rgba(255,255,255,0.8);
  backdrop-filter:blur(8px);
  gap:12px
}

.ess-selected-label {
  font-size:var(--fs-sm);
  color:#475569;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
  flex:1
}

.ess-selected-label--empty {
  color:#94a3b8
}

.ess-dur-dropdown-wrap {
  position:relative;
  flex-shrink:0
}

.ess-dur-trigger {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#fff;
  border:1px solid #e2e8f0;
  color:#374151;
  border-radius:8px;
  padding:8px 12px;
  font-size:var(--fs-sm);
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  transition:border-color 0.15s,background 0.15s,box-shadow 0.15s
}

.ess-dur-trigger:hover {
  border-color:#2563eb;
  background:#eff6ff;
  box-shadow:0 0 0 3px rgba(37,99,235,0.1)
}

.ess-dur-trigger svg {
  color:#2563eb
}

.ess-dur-caret {
  transition:transform 0.2s ease;
  color:#94a3b8
}

.ess-dur-dropdown-wrap.open .ess-dur-caret {
  transform:rotate(180deg)
}

.ess-dur-menu {
  position:absolute;
  bottom:calc(100% + 6px);
  right:0;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:4px;
  list-style:none;
  margin:0;
  min-width:130px;
  box-shadow:0 8px 24px rgba(0,0,0,0.1);
  opacity:0;
  pointer-events:none;
  transform:translateY(4px);
  transition:opacity 0.15s ease,transform 0.15s ease;
  z-index:10
}

.ess-dur-dropdown-wrap.open .ess-dur-menu {
  opacity:1;
  pointer-events:auto;
  transform:translateY(0)
}

.ess-dur-opt {
  padding:8px 14px;
  border-radius:7px;
  font-size:var(--fs-sm);
  font-weight:500;
  color:#374151;
  cursor:pointer;
  transition:background 0.12s ease,color 0.12s ease
}

.ess-dur-opt:hover {
  background:#eff6ff;
  color:#1d4ed8
}

.ess-dur-opt--active {
  background:rgba(37,99,235,0.1);
  color:#1d4ed8;
  font-weight:700
}

.ess-start-btn {
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:linear-gradient(135deg,#2563eb,#3b82f6);
  color:#fff;
  font-weight:700;
  font-size:var(--fs-base);
  padding:11px 28px;
  border-radius:10px;
  border:none;
  cursor:pointer;
  box-shadow:0 4px 16px rgba(37,99,235,0.35);
  transition:box-shadow 0.2s ease,opacity 0.15s ease,transform 0.15s ease;
  white-space:nowrap
}

.ess-start-btn:hover:not(:disabled) {
  box-shadow:0 6px 22px rgba(37,99,235,0.55);
  transform:translateY(-1px)
}

.ess-start-btn:disabled,.ess-start-btn[aria-disabled="true"] {
  background:#e2e8f0;
  color:#94a3b8;
  cursor:not-allowed;
  box-shadow:none;
  transform:none
}

@media (max-width:1023px) {
  .ess-body {
    flex-direction:column
  }
  .ess-left {
    width:100%;
    overflow-y:visible
  }
  .ess-left-inner {
    padding:24px 20px 16px 20px
  }
  .ess-stepper {
    display:none
  }
  .ess-social-proof {
    display:none
  }
  .ess-accent-blob {
    display:none
  }
  .ess-step-ribbon {
    display:flex!important;
    gap:6px;
    overflow-x:auto;
    padding-bottom:4px;
    margin-top:12px;
    scrollbar-width:none
  }
  .ess-step-ribbon::-webkit-scrollbar {
    display:none
  }
  .ess-step-ribbon-item {
    background:rgba(99,102,241,0.1);
    border:1px solid rgba(99,102,241,0.25);
    border-radius:20px;
    padding:4px 12px;
    font-size:var(--fs-xss);
    color:#6366f1;
    white-space:nowrap;
    flex-shrink:0;
    font-weight:600
  }
  .ess-right {
    border-left:none;
    flex:1;
    min-height:0
  }
  .ess-headline {
    font-size:var(--fs-xl)
  }
  .ess-subhead {
    font-size:var(--fs-sm)
  }
  .ess-right-header {
    padding-top:18px
  }

}

@media (max-width:639px) {
  .ess-card-grid {
    grid-template-columns:1fr
  }
  .ess-cards-wrap {
    padding-left:16px;
    padding-right:16px
  }
  .ess-right-header {
    padding-left:16px;
    padding-right:16px
  }
  .ess-action-bar {
    padding-left:16px;
    padding-right:16px
  }

}

.ess-step-ribbon {
  display:none
}

#right-panel .panel-actions .button {
  padding:0.8rem 1.1rem;
  font-size:var(--fs-base);
  border-radius:12px;
  flex:1;
  width:max-content
}

#right-panel .panel-actions .button.primary {
  padding:0.8rem 1.4rem
}

.palette-item {
  padding:0.4rem 0.3rem;
  border:none;
  border-radius:8px;
  background:transparent;
  cursor:grab;
  text-align:center;
  transition:transform 0.15s ease,opacity 0.15s ease;
  font-size:var(--fs-micro);
  font-weight:600;
  color:#0453d2;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
  position:relative;
  min-width:46px;
  height:auto
}

#left-panel .components-section .palette-item {
  min-width:42px;
  height:auto;
  padding:0.4rem 0.3rem
}

#left-panel .components-section .palette-item .icon {
  width:26px;
  height:26px
}

@media (max-width:1100px) {
  #left-panel .components-section .palette-item {
    min-width:46px;
    height:auto;
    padding:0.4rem 0.3rem
  }
  #left-panel .components-section .palette-item .icon {
    width:28px;
    height:28px
  }

}

.palette-item .icon {
  width:25px;
  height:25px;
  display:inline-block;
  object-fit:contain
}

/* Panel icons — single dark color for all */
#left-panel .palette-item .icon {
  filter:brightness(0) saturate(0) opacity(0.7)
}

#left-panel .palette-item:hover .icon {
  filter:brightness(0) saturate(100%) invert(27%) sepia(80%) saturate(800%) hue-rotate(220deg) brightness(95%);
  opacity:1
}

body.evaluation-mode #left-panel .palette-item:hover .icon {
  filter:brightness(0) saturate(0) opacity(0.7)
}

body.evaluation-mode #left-panel .palette-item:hover {
  background:rgba(99,102,241,0.07)!important;
  transform:none!important;
  box-shadow:none!important;
  cursor:grab
}

.palette-item::after {
  content:attr(data-label);
  position:static;
  transform:none;
  background:none;
  color:#475569;
  padding:0;
  border-radius:0;
  font-size:var(--fs-micro);
  font-weight:500;
  white-space:nowrap;
  display:block!important;
  z-index:auto;
  pointer-events:none
}

body.evaluation-mode .palette-item::after {
  display:none!important
}

body.evaluation-mode .palette-item:hover::after {
  display:none!important
}

body.system-selected .palette-item::after {
  display:none!important
}

body.system-selected .palette-item:hover::after {
  display:block!important;
  font-size:var(--fs-xss)!important;
  background:rgba(0,0,0,0.85)!important;
  color:#ffffff!important;
  padding:0.18rem 0.45rem!important;
  border-radius:6px!important;
  box-shadow:0 6px 14px rgba(15,23,42,0.08)!important;
  white-space:nowrap!important;
  top:50%!important;
  left:50%!important;
  transform:translate(-50%,-50%)!important;
  z-index:60!important;
  pointer-events:none!important
}

body.evaluation-mode #left-panel .actions-section {
  display:none!important
}

body.evaluation-mode #left-panel {
  background:#ffffff;
  border-radius:14px;
  border:1px solid rgba(59,130,246,0.1)
}

body.evaluation-mode #left-panel .panel-section {
  background:#ffffff
}

body.evaluation-mode #left-panel .components-section {
  background:#ffffff;
  border-bottom:1px solid rgba(59,130,246,0.08)
}

body.evaluation-mode #right-panel {
  background:#ffffff;
  border-radius:14px;
  border:1px solid rgba(59,130,246,0.1)
}

body.evaluation-mode .canvas-wrapper {
  background:linear-gradient(160deg,#fafcff 0%,#f5f8ff 100%);
  border:1px solid rgba(59,130,246,0.08);
  border-radius:14px
}

body.practice-mode #left-panel {
  background:#ffffff;
  border-radius:14px;
  border:1px solid rgba(59,130,246,0.1)
}

body.practice-mode #left-panel .panel-section {
  background:#ffffff
}

body.practice-mode #left-panel .components-section {
  background:#ffffff;
  border-bottom:1px solid rgba(59,130,246,0.08)
}

body.practice-mode #right-panel {
  background:#ffffff;
  border-radius:14px;
  border:1px solid rgba(59,130,246,0.1)
}

body.practice-mode .canvas-wrapper {
  background:linear-gradient(160deg,#fafcff 0%,#f5f8ff 100%);
  border:1px solid rgba(59,130,246,0.08);
  border-radius:14px
}

body.learn-mode-active #left-panel {
  background:#ffffff;
  border-radius:14px;
  border:1px solid rgba(59,130,246,0.1)
}

body.learn-mode-active #left-panel .panel-section {
  background:transparent
}

body.learn-mode-active #left-panel .components-section {
  background:transparent;
  border-bottom:1px solid rgba(59,130,246,0.08)
}

/* ── Learn mode: left panel identical to Practice ───────────────────────────
   Hide the Learn/Build toggle and question-list; always show components +
   inspector just like practice mode. JS (applyModeUI) still sets these but
   the !important overrides win so no JS changes are needed.               */
body.learn-mode-active #learn-left-tabs          { display:none !important; }
body.learn-mode-active #learn-left-design        { display:none !important; }
body.learn-mode-active #left-panel-title         { display:block !important; }
body.learn-mode-active #left-panel .components-section,
body.learn-mode-active #left-panel .inspector-section {
  display:flex !important;
}

/* Hide the external panel-actions bar in learn mode — buttons live inside the simulate pane */
body.learn-mode-active #simulate-panel-actions   { display:none !important; }

body.learn-mode-active #right-panel {
  background:#ffffff;
  border-radius:14px;
  border:1px solid rgba(59,130,246,0.1)
}

body.learn-mode-active .canvas-wrapper {
  background:linear-gradient(160deg,#fafcff 0%,#f5f8ff 100%);
  border:1px solid rgba(59,130,246,0.08);
  border-radius:14px
}

.palette-item:hover {
  opacity:0.8;
  transform:scale(1.1)
}

.inspector {
  background:#ffffff;
  border-radius:10px;
  padding:10px;
  border:1px solid #e2e8f0;
  box-shadow:0 1px 4px rgba(15,23,42,0.06);
  display:flex;
  flex-direction:column;
  gap:0.5rem;
  width:100%;
  max-width:none;
  font-size:var(--fs-sm);
  flex:1 1 0;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch
}

.inspector p {
  font-size:var(--fs-sm);
  color:#64748b;
  gap:0.6rem;
  line-height:1.2rem
}

.canvas-wrapper {
  border-radius:12px;
  padding:0;
  position:relative;
  height:100%;
  overflow:hidden;
  box-shadow:0 16px 30px rgba(15,23,42,0.08)
}

body.roadmap-mode .canvas-wrapper {
  background:linear-gradient(180deg,#f8fbff 0%,#eef4ff 100%);
  border:1px solid #dbe4f0;
  border-radius:24px;
  padding:0
}

.floating-toggle {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:28px;
  height:110px;
  border-radius:999px;
  border:1px solid #94a3b8;
  background:#cbd5e1;
  color:#0f172a;
  display:none;
  align-items:center;
  justify-content:center;
  font-size:var(--fs-xl);
  font-weight:600;
  cursor:pointer;
  box-shadow:0 10px 18px rgba(15,23,42,0.12);
  z-index:5
}

.floating-toggle.left {
  left:10px
}

.floating-toggle.right {
  right:10px
}

.floating-toggle:hover {
  background:#b6c2d9;
  border-color:#64748b
}

.canvas-info-button {
  position:absolute;
  top:10px;
  left:10px;
  width:36px;
  height:36px;
  border-radius:50%;
  border:1px solid rgba(99,102,241,0.12);
  background:#ffffff;
  color:#0f172a;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  cursor:default;
  box-shadow:0 6px 18px rgba(15,23,42,0.08);
  z-index:12
}

.canvas-info-button:hover {
  background:#fbfdff
}

.canvas-info-popover {
  position:absolute;
  top:56px;
  left:10px;
  width:360px;
  max-width:calc(100% - 40px);
  background:linear-gradient(180deg,rgba(235,243,255,0.98),rgba(242,247,255,0.98))!important;
  background-color:#f3f8ff!important;
  border-radius:12px;
  border:1px solid rgba(59,130,246,0.18)!important;
  padding:18px;
  box-shadow:0 32px 64px rgba(2,6,23,0.16)!important;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  z-index:60!important;
  pointer-events:none;
  color:#07103a;
  font-size:var(--fs-sm);
  line-height:1.25
}

.canvas-info-popover .popover-title {
  font-weight:800;
  font-size:var(--fs-subhead);
  margin:0 0 12px 0
}

.canvas-info-popover .popover-list {
  margin:0 0 6px 0;
  padding-left:18px
}

.canvas-info-popover .popover-list li {
  margin-bottom:10px
}

.canvas-info-popover.hidden {
  display:none
}

.layout.left-collapsed .floating-toggle.left {
  display:inline-flex
}

.layout.right-collapsed .floating-toggle.right {
  display:inline-flex
}

.canvas {
  position:relative;
  height:100%;
  width:100%;
  border:1px solid #e2e8f0;
  border-radius:12px;
  overflow:hidden;
  padding:0;
  background-color:#f8fafc;
  background-image:linear-gradient(to right,#dde5f0 1px,transparent 1px),linear-gradient(to bottom,#dde5f0 1px,transparent 1px),radial-gradient(circle,#b0bfce 1.2px,transparent 1.2px);
  background-size:48px 48px,48px 48px,24px 24px
}

.canvas-content {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  transform:translate(0,0);
  transform-origin:0 0
}

.connections {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  pointer-events:auto;
  overflow:visible
}

body.connect-mode .connections {
  pointer-events:none
}

.connection-path {
  pointer-events:stroke;
  transition:stroke-width 120ms ease
}

.connection-path:hover {
  stroke-width:5;
  cursor:pointer;
  filter:drop-shadow(0 2px 4px rgba(15,23,42,0.25))
}

.connection-path.selected {
  stroke:#0f172a;
  stroke-width:6
}

.connection-handle {
  fill:#ffffff;
  stroke:#2563eb;
  stroke-width:2;
  cursor:grab;
  filter:drop-shadow(0 4px 8px rgba(37,99,235,0.2))
}

.connection-handle:active {
  cursor:grabbing
}

.node {
  position:absolute;
  padding:0.22rem 0.38rem;
  border-radius:10px;
  color:white;
  font-weight:600;
  font-size:var(--fs-micro);
  cursor:pointer;
  user-select:none;
  background:#334155;
  box-shadow:0 10px 18px rgba(31,42,68,0.18);
  border:1px solid rgba(255,255,255,0.3);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  resize:both;
  overflow:visible;
  min-width:68px;
  min-height:34px
}

.node-ports {
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:3
}

.node-port {
  position:absolute;
  width:13px;
  height:13px;
  border-radius:999px;
  border:2px solid #ffffff;
  background:#1d4ed8;
  box-shadow:0 4px 10px rgba(15,23,42,0.25);
  opacity:0;
  pointer-events:auto;
  transition:transform 0.15s ease,opacity 0.15s ease;
  cursor:crosshair;
  transform:translate(-50%,-50%)
}

.node:hover .node-port,.node.selected .node-port {
  opacity:1
}

.node-port:hover {
  transform:translate(-45%,-55%) scale(1.25)
}

.node-port.port-hover {
  transform:translate(-45%,-55%) scale(1.4);
  background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,0.4);
  opacity:1;
}

.node-port-top {
  top:0;
  left:50%
}

.node-port-right {
  left:100%;
  top:50%
}

.node-port-bottom {
  top:100%;
  left:50%
}

.node-port-left {
  left:0;
  top:50%
}

.node-label {
  padding:0 0.55rem;
  pointer-events:none
}

.node-close {
  position:absolute;
  top:-12px;
  right:-12px;
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.6);
  background:#f8fafc;
  color:#0f172a;
  font-size:var(--fs-sm);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:5;
  opacity:0;
  transition:all 0.15s ease;
  transform:none
}

.node:hover .node-close {
  opacity:1;
  box-shadow:0 6px 12px rgba(15,23,42,0.2)
}

.node-close:hover {
  background:#f1f5f9;
  border-color:rgba(100,116,139,0.9);
  transform:translateY(-2px)
}

.node-close:focus-visible {
  outline:2px solid #0f172a;
  outline-offset:1px
}

.node.selected {
  outline:2px solid #0f172a;
  outline-offset:2px
}

/* .node.bottleneck — semantic marker only; visual highlighting owned by .btk-high / .btk-medium / .btk-low */

/* Tiered bottleneck states — set by applyBottleneckHighlight / applyBottleneckCanvasFilter */
.node {
  transition: opacity 220ms ease, box-shadow 220ms ease, border-color 220ms ease, outline-color 220ms ease;
}

.node.btk-high {
  border: 3px solid #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.28), 0 6px 16px rgba(220,38,38,0.18);
}

.node.btk-medium {
  border: 3px solid #d97706;
  box-shadow: 0 0 0 3px rgba(217,119,6,0.28), 0 6px 16px rgba(217,119,6,0.14);
}

.node.btk-low {
  border: 3px solid #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.24), 0 6px 12px rgba(22,163,74,0.12);
}

/* ── Node hover elevation (non-icon nodes) ─────────────────────────────── */
.node:not(.node-icon-only):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15,23,42,0.24), 0 2px 6px rgba(15,23,42,0.12);
}

/* ── Node selected — blue glow ring ────────────────────────────────────── */
.node.selected:not(.node-icon-only) {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.18), 0 4px 20px rgba(59,130,246,0.14) !important;
  transform: translateY(-1px);
}

/* ── Connection focus: dim unrelated nodes ──────────────────────────────── */
.node.node-dim {
  opacity: 0.28;
  filter: grayscale(0.35);
}

/* ── Edge focus classes ─────────────────────────────────────────────────── */
.connection-path.edge-connected {
  stroke-width: 4 !important;
  filter: drop-shadow(0 0 4px rgba(59,130,246,0.45));
}
.connection-path.edge-dim {
  opacity: 0.18;
}

.node.connect-source {
  box-shadow:0 0 0 3px rgba(37,99,235,0.45)
}

.node-user {
  background:#14b8a6
}

.node-server {
  background:#2563eb
}

.node-database {
  background:#f97316
}

.node-loadbalancer {
  background:#8b5cf6
}

.node-cache {
  background:#22c55e
}

.node-cdn {
  background:#38bdf8;
  color:#ffffff
}

/* icon-only nodes — CDN, User, storage — override bg via .node-icon-only above */
.node-cdn.node-icon-only,.node-user.node-icon-only,
.node-database.node-icon-only,.node-blobstorage.node-icon-only,
.node-searchindex.node-icon-only,.node-cache.node-icon-only {
  background:transparent !important
}

.node-ratelimiter {
  background:#facc15;
  color:#1f2937
}

.node-ratelimiter .node-icon,.node-worker .node-icon {
  filter:brightness(0) saturate(100%) invert(12%) sepia(20%) saturate(600%) hue-rotate(190deg) brightness(80%);
  opacity:1
}

.node-idgenerator {
  background:#f472b6
}

.node-worker {
  background:#a3e635;
  color:#1f2937
}

.node-apigateway,.node-gateway {
  background:#0ea5e9
}

.node-matchingengine,.node-locationservice,.node-tripservice,.node-transactionservice,.node-mlinferenceservice,.node-ruleengine,.node-chatserver,.node-inventoryservice {
  background:#3b82f6
}

.node-notificationservice {
  background:#f59e0b
}

.node-featurestore,.node-messagestore,.node-mediastore,.node-searchindex {
  background:#fb7185
}

.node-blobstorage {
  background:#a78bfa
}

.node-paymentgateway {
  background:#f472b6
}

.node-inventorylocking {
  background:#a855f7
}

.node-eventstream,.node-tokenbucket,.node-distributedsync {
  background:#38bdf8;
  color:#1f2937
}

.node-queue {
  background:#0ea5e9
}

/* ── Icon layout for nodes with background ── */
.node.node-has-icon {
  flex-direction:column;
  gap:3px;
  padding:8px 10px 6px
}

.node-icon {
  width:26px;
  height:26px;
  object-fit:contain;
  flex-shrink:0;
  pointer-events:none;
  filter:brightness(0) invert(1);
  opacity:0.9
}

.node.node-has-icon .node-label {
  padding:0;
  font-size:var(--fs-micro);
  text-align:center;
  line-height:1.2
}

/* ── Icon-only nodes: no background box, just floating icon + label ── */
.node.node-icon-only {
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  border-radius:0 !important;
  padding:0 !important;
  gap:6px;
  min-width:56px;
  min-height:auto
}

.node.node-icon-only .node-icon {
  width:36px;
  height:36px;
  filter:none;
  opacity:1
}

.node.node-icon-only .node-label {
  color:#1e293b;
  font-size:var(--fs-micro);
  font-weight:600;
  text-align:center;
  line-height:1.3;
  padding:0
}

.node.node-icon-only.selected {
  outline:2px solid #6366f1;
  outline-offset:6px;
  border-radius:8px !important
}

.node.node-icon-only .node-close {
  top:-16px;
  right:-16px
}

.decoration-arrow {
  position:absolute;
  font-size:var(--fs-xl);
  cursor:grab;
  user-select:none
}

.inspector label {
  display:flex;
  flex-direction:column;
  gap:0.5rem;
  font-size:var(--fs-sm);
  font-weight:500;
  color:#1e293b;
  padding-bottom:0.15rem
}

.inspector input {
  padding:0.4rem 0.55rem;
  border:1px solid #e2e8f0;
  border-radius:6px;
  font-size:var(--fs-micro);
  color:#0f172a;
  background:#f8fafc;
  transition:border 0.15s,box-shadow 0.15s;
  box-shadow:none;
  outline:none;
  width:100%;
  box-sizing:border-box
}

.inspector input:focus {
  border-color:#93b4f5;
  box-shadow:0 0 0 2.5px rgba(37,99,235,0.10)
}

.inspector textarea {
  padding:0.4rem 0.55rem;
  border:1px solid #e2e8f0;
  border-radius:6px;
  resize:vertical;
  min-height:30px;
  font-family:inherit;
  font-size:var(--fs-micro);
  color:#0f172a;
  line-height:1.5;
  background:#f8fafc;
  transition:border 0.15s,box-shadow 0.15s;
  box-shadow:none;
  outline:none;
  width:100%;
  box-sizing:border-box
}

.inspector textarea:focus {
  border-color:#93b4f5;
  box-shadow:0 0 0 2.5px rgba(37,99,235,0.10)
}

.inspector textarea::placeholder {
  color:#c1c8d4;
  font-style:italic;
  font-weight:400
}

.inspector select {
  padding:0.4rem 0.55rem;
  border:1px solid #e2e8f0;
  border-radius:6px;
  font-size:var(--fs-sm);
  color:#0f172a;
  background:#f8fafc;
  transition:border 0.15s,box-shadow 0.15s;
  box-shadow:none;
  outline:none;
  cursor:pointer;
  width:100%
}

.inspector select:focus {
  border-color:#93b4f5;
  box-shadow:0 0 0 2.5px rgba(37,99,235,0.10)
}

.inspector-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.4rem;
  padding:0.3rem 0.2rem;
  font-size:var(--fs-lg);
  border-bottom:1px solid #e8ecf1
}

.inspector-header-left {
  display:flex;
  align-items:center;
  gap:0.45rem;
  min-width:0;
  font-size:var(--fs-base)
}

.inspector-header-icon {
  width:25px;
  height:25px;
  flex-shrink:0;
  opacity:0.75
}

.inspector-header-text {
  display:flex;
  flex-direction:column;
  min-width:0;
  font-size:var(--fs-sm)
}

.inspector-header-type {
  font-size:var(--fs-base);
  font-weight:700;
  color:#0f172a;
  line-height:1.3;
  letter-spacing:-0.01em
}

.inspector-header-id {
  font-size:var(--fs-micro);
  font-weight:500;
  color:#64748b;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.inspector-toggle {
  display:flex;
  flex-direction:row;
  align-items:center;
  cursor:pointer;
  user-select:none;
  flex-shrink:0;
  margin-bottom:0
}

.inspector-toggle input[type="checkbox"] {
  position:absolute;
  opacity:0;
  width:0;
  height:0;
  pointer-events:none
}

.inspector-toggle-track {
  position:relative;
  width:28px;
  height:16px;
  background:#94a3b8;
  border-radius:999px;
  transition:background 0.2s ease;
  flex-shrink:0
}

.inspector-toggle-thumb {
  position:absolute;
  top:2px;
  left:2px;
  width:12px;
  height:12px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 1px 2px rgba(0,0,0,0.12);
  transition:transform 0.2s ease
}

.inspector-toggle input:checked + .inspector-toggle-track {
  background:#3b82f6
}

.inspector-toggle input:checked + .inspector-toggle-track .inspector-toggle-thumb {
  transform:translateX(12px)
}

.inspector-toggle input:focus-visible + .inspector-toggle-track {
  box-shadow:0 0 0 2px rgba(59,130,246,0.2)
}

.inspector-toggle-text {
  font-size:var(--fs-xss);
  font-weight:500;
  color:#1f2d41;
  white-space:nowrap;
  letter-spacing:0.01em
}

.inspector-fields-wrapper {
  display:flex;
  flex-direction:column;
  gap:0
}

.inspector-meta-fields {
  display:flex;
  flex-direction:column;
  gap:0.6rem;
  padding-bottom:0.6rem;
  font-size:var(--fs-sm)
}

.inspector-params-section {
  padding-top:0.15rem;
  padding-bottom:0.25rem
}

.inspector-field {
  display:flex;
  flex-direction:column;
  gap:0.2rem;
  font-size:var(--fs-sm);
  font-weight:500;
  color:#1e293b;
  margin-bottom:0
}

.inspector-field-name,.inspector-field-desc {
  grid-column:1 / -1
}

.inspector-label {
  display:flex;
  align-items:center;
  gap:0.2rem;
  white-space:nowrap;
  font-size:var(--fs-sm);
  font-weight:600;
  color:#1e293b;
  letter-spacing:0.01em
}

.inspector-unit {
  font-weight:400;
  font-size:var(--fs-micro);
  color:#64748b;
  margin-left:2px
}

/* ── Interview Mode "not scored" badge ────────────────────────────────────── */
.inspector-not-scored {
  display: inline-block;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.5;
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  cursor: help;
  white-space: nowrap;
}
.inspector-not-scored--production_risk {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.inspector-field--not-scored input,
.inspector-field--not-scored select {
  opacity: 0.65;
}
/* ─────────────────────────────────────────────────────────────────────────── */

.inspector-field[title] {
  cursor:help
}

.inspector-section-label {
  font-size:var(--fs-sm);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.03em;
  color:#021c40;
  padding:10px 0px;
  padding-bottom:10px;
  border-bottom:none;
  text-align:center
}

.inspector-section-label--security {
  color:#0e7490
}

.inspector-security-section {
  border-top:1px solid #e0f2fe;
  margin-top:0.2rem;
  padding-top:0.1rem
}

.inspector-sec-fields {
  display:flex;
  flex-direction:column;
  gap:0.45rem
}

.inspector-sec-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.5rem;
  font-size:var(--fs-sm);
  font-weight:500;
  color:#1e293b;
  cursor:pointer;
  user-select:none;
  padding:0.15rem 0;
  min-height:28px
}

.inspector-sec-row:hover .inspector-sec-label {
  color:#0e7490
}

.inspector-sec-label {
  flex:1;
  font-size:var(--fs-sm);
  font-weight:600;
  color:#1e293b;
  letter-spacing:0.01em;
  transition:color 0.15s ease;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

.inspector-sec-toggle {
  position:relative;
  display:flex;
  align-items:center;
  flex-shrink:0
}

.inspector-sec-toggle input[type="checkbox"] {
  position:absolute;
  opacity:0;
  width:0;
  height:0;
  pointer-events:none
}

.inspector-sec-toggle .inspector-toggle-track {
  position:relative;
  width:28px;
  height:16px;
  background:#94a3b8;
  border-radius:999px;
  transition:background 0.2s ease;
  flex-shrink:0
}

.inspector-sec-toggle .inspector-toggle-thumb {
  position:absolute;
  top:2px;
  left:2px;
  width:12px;
  height:12px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 1px 2px rgba(0,0,0,0.12);
  transition:transform 0.2s ease
}

.inspector-sec-toggle input:checked + .inspector-toggle-track {
  background:#0e7490
}

.inspector-sec-toggle input:checked + .inspector-toggle-track .inspector-toggle-thumb {
  transform:translateX(12px)
}

.inspector-sec-field {
  display:flex;
  flex-direction:column;
  gap:0.2rem;
  font-size:var(--fs-sm);
  font-weight:500;
  color:#1e293b;
  margin-bottom:0
}

.helper-text {
  font-size:var(--fs-micro);
  color:#64748b
}

.inspector-extra {
  background:#ffffff;
  display:flex;
  flex-direction:column;
  gap:0.85rem;
  opacity:0;
  transform:translateY(6px);
  max-height:0;
  overflow:hidden;
  transition:opacity 100ms cubic-bezier(.2,.9,.2,1),transform 100ms cubic-bezier(.2,.9,.2,1),max-height 120ms cubic-bezier(.2,.9,.2,1)
}

.inspector-extra.visible {
  opacity:1;
  transform:translateY(0);
  max-height:600px
}

.inspector-system #inspector-system-name {
  display:block;
  font-size:var(--fs-base);
  font-weight:700;
  color:#0f172a;
  line-height:1.1
}

.inspector.hovering .inspector-system #inspector-system-name {
  font-size:var(--fs-base);
  font-weight:800;
  color:#0b1426;
  text-align:center
}

.inspector-extra {
  display:flex;
  flex-direction:column;
  gap:0.85rem;
  opacity:0;
  transform:translateY(6px);
  transition:opacity 220ms cubic-bezier(.2,.9,.2,1),transform 220ms cubic-bezier(.2,.9,.2,1)
}

.inspector-extra.visible {
  opacity:1;
  transform:translateY(0)
}

.inspector-extra-title {
  font-size:var(--fs-sm);
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:#64748b;
  font-weight:600;
  font-size: var(--fs-xss);
  text-align:center;
  position:relative;
  padding-bottom:20px
}

.inspector-extra-title::after {
  content:"";
  position:absolute;
  left:6%;
  right:6%;
  bottom:4px;
  height:6px;
  background:linear-gradient(90deg,rgba(15,23,42,0) 0%,rgba(15,23,42,0.05) 30%,rgba(15,23,42,0.12) 50%,rgba(15,23,42,0.05) 70%,rgba(15,23,42,0) 100%)
}

.inspector-extra-body {
  font-size:var(--fs-sm);
  color:#334155
}

.node-id {
  font-size:var(--fs-sm);
  color:#64748b
}

.button {
  padding:9px 16px;
  border-radius:8px;
  border:1px solid transparent;
  cursor:pointer;
  background:#e2e8f0;
  color:#1f2a44;
  border-color:#cbd5e1;
  font-weight:600;
  transition:transform 0.18s ease,box-shadow 0.18s ease,background 0.18s ease;
  font-size:var(--fs-xs);
  font-family:inherit
}

.button:hover {
  transform:translateY(-1px);
  background:#d1dae8
}

.button:disabled {
  opacity:0.45;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
  pointer-events:auto
}

.button:disabled:hover {
  transform:none;
  box-shadow:none
}

.button.primary {
  background:#3b82f6;
  border-color:#3b82f6;
  color:#fff;
  box-shadow:0 4px 14px rgba(59,130,246,0.35)
}

.button.primary:hover {
  background:#2563eb;
  box-shadow:0 6px 20px rgba(59,130,246,0.45)
}

.button.small {
  padding:0.3rem 0.5rem;
  font-size:var(--fs-micro)
}

.button.ghost {
  background:transparent;
  border:1px solid rgba(148,163,184,0.5);
  color:#e2e8f0
}

.button.ghost:hover {
  background:rgba(255,255,255,0.08);
  border-color:rgba(148,163,184,0.7)
}

.header .button.ghost {
  background:transparent;
  border-color:rgba(255,255,255,0.18);
  color:#e2e8f0
}

.output {
  display:flex;
  flex-direction:column;
  gap:0.8rem
}

.output pre {
  background:#0f172a;
  color:#e2e8f0;
  padding:0.8rem;
  border-radius:8px;
  overflow-x:auto;
  font-size:var(--fs-xs)
}

.result-block,.result-block-blackbox {
  border-radius:10px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  box-shadow:0 10px 20px rgba(15,23,42,0.06);
  transition:box-shadow 0.2s ease,border-color 0.2s ease;
  overflow:hidden;
  padding:10px
}

.result-block:hover,.result-block-blackbox:hover {
  box-shadow:0 18px 30px rgba(15,23,42,0.12);
  border-color:#cbd5f5
}

.result-block-header,.result-block-blackbox-header {
  padding:0.3rem 0.5rem;
  cursor:pointer;
  display:flex;
  align-items:center;
  user-select:none;
  transition:background 0.2s ease
}

.result-block-header:hover,.result-block-blackbox-header:hover {
  background:#f1f5f9;
  border-radius:10px
}

.result-block-header h5,.result-block-blackbox-header h5 {
  margin-bottom:0;
  font-size:var(--fs-base);
  color:#1e293b;
  text-transform:uppercase;
  letter-spacing:0.03em;
  display:flex;
  align-items:center;
  gap:0.6rem;
  flex:1
}

.result-block-toggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  margin-left:auto;
  transition:transform 0.2s ease;
  font-size:var(--fs-sm);
  color:#64748b
}

.result-block.collapsed .result-block-toggle {
  transform:rotate(-90deg)
}

.result-block-content,.result-block-blackbox-content {
  padding:0 0.8rem;
  line-height:1.3rem;
  max-height:5000px;
  overflow:hidden;
  font-size:var(--fs-sm);
  transition:max-height 0.3s ease,padding 0.3s ease
}

.result-block.collapsed .result-block-content,.result-block-blackbox.collapsed .result-block-blackbox-content {
  max-height:0;
  padding:0 0.8rem
}

.result-block h5::before,.result-block-blackbox h5::before {
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  background:#0c71ff;
  box-shadow:0 0 0 4px rgba(7,64,145,0.2)
}

.result-block:nth-of-type(1) h5::before {
  background:#fb923c;
  box-shadow:0 0 0 4px rgba(251,146,60,0.2)
}

.result-block:nth-of-type(2) h5::before {
  background:#6a5ae4;
  box-shadow:0 0 0 4px rgba(94,56,248,0.2)
}

.result-block:nth-of-type(3) h5::before {
  background:#34d399;
  box-shadow:0 0 0 4px rgba(52,211,153,0.2)
}

.result-block:nth-of-type(4) h5::before {
  background:#ed2c2c;
  box-shadow:0 0 0 4px rgba(250,139,139,0.2)
}

.result-block:nth-of-type(5) h5::before {
  background:#8bb7fa;
  box-shadow:0 0 0 4px rgba(167,139,250,0.2)
}

.result-block ul {
  padding-left:1rem;
  color:#475569
}

.result-block li {
  margin-bottom:0.35rem
}

.violation-severity {
  font-size:var(--fs-micro);
  text-transform:uppercase;
  color:#ef4444;
  margin-left:0.35rem
}

.violation-detail {
  font-size:var(--fs-sm);
  color:#475569;
  margin-top:0.2rem
}

.result-section {
  margin-bottom:0.8rem;
  line-height:1.2rem
}

.result-section h3 {
  font-size:var(--fs-lg);
  color:#1e293b;
  margin-bottom:0.35rem
}

.structural-errors {
  padding-left:1.1rem;
  margin:0.4rem 0 0.2rem 0
}

.structural-errors li {
  margin:10px 0 14px 0;
  line-height:1.45
}

.structural-errors .violation-detail {
  margin-top:6px
}

.structural-errors .missing-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
  padding:8px;
  border-radius:10px;
  background:#e9f2ff;
  border:1px solid #cfe0ff
}

.structural-errors .missing-list .chip {
  background:#ffffff;
  border-color:#dbeafe
}

.result-section p {
  font-size:var(--fs-base);
  color:#475569
}

.result-block-blackbox h4::before {
  background:#2479f1
}

.element-intro-overlay {
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:70
}

.element-intro-banner {
  position:absolute;
  pointer-events:auto;
  max-width:300px;
  background:#ffffff;
  border-radius:12px;
  padding:10px 12px;
  color:#0f172a;
  box-shadow:0 14px 36px rgba(2,6,23,0.18);
  border:1px solid #e6eefc;
  font-size:var(--fs-base);
  line-height:1.25
}

.element-intro-banner strong {
  display:block;
  font-weight:700;
  margin-bottom:6px
}

.element-intro-banner .desc {
  color:#475569;
  font-size:var(--fs-sm)
}

@media (max-width:800px) {
  .element-intro-banner {
    max-width:220px;
    font-size:var(--fs-base)
  }

}

@media (max-width:1280px) {
  .layout {
    --left-panel-w:clamp(220px,17.6vw,286px);
    --right-panel-w:clamp(200px,16vw,260px);
    gap:0.8rem;
    padding:0.6rem 0.8rem 0.8rem
  }
  body * {
    font-size:var(--fs-sm)!important
  }

}

@media (max-width:1100px) {
  .layout {
    --left-panel-w:clamp(198px,16.5vw,253px);
    --right-panel-w:clamp(180px,15vw,230px);
    gap:0.5rem;
    padding:0.4rem 0.5rem 0.5rem
  }
  body * {
    font-size:var(--fs-sm)!important
  }
  .topbar {
    padding:0 0.8rem
  }

}

.next-inactive {
  background:linear-gradient(135deg,#1e3a5f,#1e40af);
  color:#bfdbfe;
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:0 4px 14px rgba(0,0,0,0.18);
  cursor:not-allowed;
  opacity:0.9;
  transition:background-color 160ms ease,color 160ms ease,box-shadow 160ms ease
}

.next-active {
  background:linear-gradient(180deg,#2563eb,#1d4ed8);
  color:#ffffff;
  border:1px solid rgba(29,78,216,0.9);
  box-shadow:0 8px 24px rgba(29,78,216,0.18);
  cursor:pointer;
  transition:transform 120ms ease,box-shadow 160ms ease
}

.next-inactive[disabled],.next-active[disabled] {
  opacity:0.95
}

.next-active:hover:not([disabled]) {
  transform:translateY(-1px)
}

.usage-widget {
  margin-top:16px;
  padding:12px 14px;
  background:var(--surface-2,#f8fafc);
  border:1px solid var(--border,#e2e8f0);
  border-radius:8px
}

.usage-widget-header {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom:8px
}

.usage-widget-label {
  font-size:var(--fs-sm);
  color:var(--text-muted,#64748b);
  font-weight:500
}

.usage-widget-fraction {
  font-size:var(--fs-base);
  font-weight:600;
  color:var(--text,#1e293b)
}

.usage-progress-track {
  height:8px;
  background:var(--border,#e2e8f0);
  border-radius:999px;
  overflow:hidden
}

.usage-progress-bar {
  height:100%;
  background:#22c55e;
  border-radius:999px;
  transition:width 400ms ease,background 300ms ease
}

.usage-progress-bar.warn {
  background:#f59e0b
}

.usage-progress-bar.danger {
  background:#ef4444
}

.usage-widget-reset {
  margin-top:6px;
  font-size:var(--fs-sm);
  color:var(--text-muted,#64748b)
}

.theory-open-btn {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:var(--fs-sm);
  font-weight:500;
  border:1px;
  border-radius:8px;
  padding:10px;
  color:var(--text-muted,#000000);
  background:transparent;
  cursor:pointer;
  transition:border-color 150ms,color 150ms,background 150ms;
  background-color:#a4c0ed
}

.theory-open-btn:hover {
  border-color:var(--accent,#3b82f6);
  color:var(--accent,#3b82f6);
  background:rgba(59,130,246,0.05)
}

.theory-open-inline .theory-open-btn {
  width:auto;
  padding:10px;
  font-size:var(--fs-xss);
  border-radius:6px;
  background-color:#dfeeff;
  color:var(--text-default,#07103a)
}

.theory-open-inline {
  display:flex;
  align-items:center;
  margin-left:12px
}

.theory-open-inline .theory-open-btn:hover {
  background-color:#c6dbff
}

.floating-stage-picker {
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  z-index:65;
  display:flex;
  align-items:center;
  gap:8px;
  pointer-events:none
}

.floating-stage-picker::after {
  content:"";
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  width:0;
  height:0;
  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-top:8px solid rgba(2,6,23,0.72);
  opacity:0.9;
  pointer-events:none
}

.floating-stage-picker select {
  pointer-events:auto
}

.floating-stage-picker select {
  min-width:300px;
  max-width:520px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(2,6,23,0.18);
  background:linear-gradient(180deg,rgba(248,250,252,0.96) 0%,rgba(226,232,240,0.94) 100%);
  box-shadow:0 12px 30px rgba(2,6,23,0.10),0 1px 0 rgba(255,255,255,0.55) inset;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font-weight:600;
  font-size:var(--fs-base);
  color:#0f172a;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding-right:42px;
  background-image:linear-gradient(180deg,rgba(248,250,252,0.96) 0%,rgba(226,232,240,0.94) 100%),linear-gradient(90deg,rgba(148,163,184,0.00) 0%,rgba(148,163,184,0.00) 58%,rgba(148,163,184,0.55) 59%,rgba(241,245,249,0.95) 60%,rgba(226,232,240,0.95) 100%),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 6 5-6z' fill='%23011122'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-size:auto,54px 100%,22px 22px;
  background-position:0 0,right 0 center,right 16px center
}

.floating-stage-picker select:hover {
  border-color:rgba(37,99,235,0.35);
  box-shadow:0 14px 36px rgba(2,6,23,0.12),0 1px 0 rgba(255,255,255,0.55) inset
}

.floating-stage-picker select:focus {
  outline:none;
  border-color:rgba(37,99,235,0.55);
  box-shadow:0 16px 40px rgba(2,6,23,0.14),0 0 0 4px rgba(37,99,235,0.16)
}

.floating-stage-picker select option {
  color:#0f172a
}

.floating-theory-button {
  display: none !important;
}

.floating-theory-button .theory-open-btn {
  padding:10px 18px;
  font-size:var(--fs-base);
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb 0%,#4f46e5 100%);
  color:#ffffff;
  box-shadow:0 14px 26px rgba(37,99,235,0.18);
  border:1px solid rgba(255,255,255,0.18);
  letter-spacing:0.01em
}

.floating-theory-button .theory-open-btn:hover {
  filter:brightness(1.02);
  transform:translateY(-1px)
}

.floating-theory-button.hidden {
  display:none!important
}

@media (max-width:900px) {
  .floating-stage-picker select {
    min-width:220px;
    max-width:320px;
    padding:8px 12px;
    padding-right:40px;
    font-size:var(--fs-base);
    background-position:0 0,right 0 center,right 14px center;
    background-size:auto,50px 100%,20px 20px
  }
  .floating-stage-picker::after {
    right:16px;
    border-left-width:5px;
    border-right-width:5px;
    border-top-width:7px
  }
  .floating-theory-button {
    bottom:12px
  }
  .floating-theory-button .theory-open-btn {
    padding:9px 14px;
    font-size:var(--fs-base)
  }

}

.theory-overlay {
  position:fixed;
  inset:0;
  z-index:1000;
  background:rgba(15,23,42,0.55);
  backdrop-filter:blur(3px);
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:24px 16px;
  overflow-y:auto;
  animation:theory-fade-in 180ms ease
}

@keyframes theory-fade-in {
  from {
    opacity:0
  }
  to {
    opacity:1
  }

}

body.theory-overlay-open {
  overflow:hidden
}

.theory-overlay-inner {
  background:var(--surface,#ffffff);
  border-radius:14px;
  width:100%;
  max-width:780px;
  box-shadow:0 24px 64px rgba(0,0,0,0.22);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  animation:theory-slide-up 200ms ease
}

@keyframes theory-slide-up {
  from {
    transform:translateY(18px);
    opacity:0
  }
  to {
    transform:translateY(0);
    opacity:1
  }

}

.theory-overlay-header {
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:24px 28px 18px;
  border-bottom:1px solid var(--border,#e2e8f0);
  background:var(--surface-2,#f8fafc)
}

.theory-overlay-meta {
  flex:1;
  min-width:0
}

.theory-difficulty-badge {
  display:inline-block;
  font-size:var(--fs-micro);
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.06em;
  padding:2px 8px;
  border-radius:999px;
  margin-bottom:6px;
  background:#e2e8f0;
  color:#475569
}

.theory-difficulty-badge.diff-easy {
  background:#dcfce7;
  color:#16a34a
}

.theory-difficulty-badge.diff-intermediate {
  background:#fef9c3;
  color:#ca8a04
}

.theory-difficulty-badge.diff-hard {
  background:#fee2e2;
  color:#dc2626
}

.theory-difficulty-badge.diff-advanced {
  background:#ede9fe;
  color:#7c3aed
}

.theory-overlay-title {
  font-size:var(--fs-lg);
  font-weight:700;
  color:var(--text,#0f172a);
  margin:0 0 6px;
  line-height:1.25
}

.theory-overlay-desc {
  font-size:var(--fs-sm);
  color:var(--text-muted,#64748b);
  line-height:1.55;
  margin:0
}

.theory-close-btn {
  flex-shrink:0;
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid var(--border,#e2e8f0);
  background:var(--surface,#fff);
  color:var(--text-muted,#64748b);
  font-size:var(--fs-base);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background 140ms,color 140ms
}

.theory-close-btn:hover {
  background:#fee2e2;
  color:#dc2626;
  border-color:#fca5a5
}

.theory-overlay-body {
  padding:24px 28px 32px;
  display:flex;
  flex-direction:column;
  gap:28px;
  overflow-y:auto;
  max-height:calc(100vh - 220px)
}

.theory-section {
  display:flex;
  flex-direction:column;
  gap:10px
}

.theory-section-title {
  font-size:var(--fs-md);
  font-weight:700;
  color:var(--text,#0f172a);
  margin:0;
  display:flex;
  align-items:center;
  gap:7px
}

.theory-section-icon {
  font-size:var(--fs-lg)
}

.theory-section-hint {
  font-size:var(--fs-xs);
  color:var(--text-muted,#94a3b8);
  margin:0
}

.theory-req-list {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:6px
}

.theory-req-item.fr-item {
  display:flex;
  align-items:baseline;
  gap:10px;
  padding:10px 14px;
  background:var(--surface-2,#f8fafc);
  border:1px solid var(--border,#e2e8f0);
  border-radius:8px;
  font-size:var(--fs-sm);
  color:var(--text,#1e293b);
  line-height:1.5
}

.req-index {
  flex-shrink:0;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#dbeafe;
  color:#2563eb;
  font-size:var(--fs-xss);
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center
}

.req-text {
  flex:1
}

.theory-req-list.nfr {
  gap:8px
}

.theory-req-item.nfr-item {
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px 14px;
  border-radius:8px;
  border-left:3px solid currentColor;
  background:var(--surface-2,#f8fafc);
  border-top:1px solid var(--border,#e2e8f0);
  border-right:1px solid var(--border,#e2e8f0);
  border-bottom:1px solid var(--border,#e2e8f0)
}

.nfr-icon {
  font-size:var(--fs-subhead);
  flex-shrink:0;
  line-height:1.4
}

.nfr-body {
  flex:1;
  display:flex;
  flex-direction:column;
  gap:2px
}

.nfr-label {
  font-size:var(--fs-xss);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--text-muted,#64748b)
}

.nfr-detail {
  font-size:var(--fs-base);
  color:var(--text,#1e293b);
  line-height:1.5
}

.nfr-item.nfr-green {
  color:#16a34a
}

.nfr-item.nfr-blue {
  color:#2563eb
}

.nfr-item.nfr-purple {
  color:#7c3aed
}

.nfr-item.nfr-orange {
  color:#ea580c
}

.nfr-item.nfr-teal {
  color:#0d9488
}

.nfr-item.nfr-yellow {
  color:#ca8a04
}

.nfr-item.nfr-red {
  color:#dc2626
}

.nfr-item.nfr-gray {
  color:#475569
}

.theory-req-empty {
  font-size:var(--fs-sm);
  color:var(--text-muted,#94a3b8);
  font-style:italic;
  padding:8px 0
}

.theory-arch-dl {
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:0
}

.theory-arch-row {
  display:grid;
  grid-template-columns:180px 1fr;
  gap:12px;
  padding:10px 14px;
  background:var(--surface-2,#f8fafc);
  border:1px solid var(--border,#e2e8f0);
  border-radius:8px;
  font-size:var(--fs-base)
}

.theory-arch-key {
  font-weight:600;
  color:var(--text-muted,#64748b);
  font-size:var(--fs-sm);
  text-transform:capitalize;
  margin:0
}

.theory-arch-val {
  color:var(--text,#1e293b);
  line-height:1.5;
  margin:0
}

.theory-concepts-tags {
  display:flex;
  flex-wrap:wrap;
  gap:8px
}

.theory-concept-chip {
  display:inline-flex;
  align-items:center;
  padding:4px 12px;
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
  border-radius:999px;
  font-size:var(--fs-xs);
  font-weight:500
}

@media (max-width:600px) {
  .theory-overlay {
    padding:0;
    align-items:flex-end
  }
  .theory-overlay-inner {
    border-radius:14px 14px 0 0;
    max-width:100%
  }
  .theory-overlay-header,.theory-overlay-body {
    padding-left:16px;
    padding-right:16px
  }
  .theory-arch-row {
    grid-template-columns:1fr;
    gap:4px
  }

}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
body {
  font-family:"Inter","Segoe UI",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  letter-spacing:-0.01em;
  line-height:1.5
}

.panel-header h2,#left-panel .panel-header h2,#right-panel .panel-header h2,#right-panel h2 {
  font-weight:700;
  letter-spacing:0.07em;
  line-height:1.2
}

#right-panel .panel-header h2,#right-panel h2 {
  font-size:var(--fs-base);
  text-transform:uppercase
}

.menu-title,.practice-header-title {
  font-weight:700;
  letter-spacing:0.1em;
  line-height:1.2
}

.output,#right-panel .output,.result-block,.result-block-blackbox {
  line-height:1.6
}

.topbar {
  background:linear-gradient(180deg,#121e36 0%,#0f182b 100%);
  border-bottom:1px solid rgba(148,163,184,0.18);
  box-shadow:0 2px 12px rgba(0,0,0,0.22)
}

.menu-button {
  transition:background 0.18s ease,border-color 0.18s ease,color 0.18s ease,box-shadow 0.18s ease;
  letter-spacing:0.01em
}

.menu-button:hover {
  box-shadow:0 2px 8px rgba(0,0,0,0.18)
}

.menu-button:focus-visible {
  outline:2px solid rgba(96,165,250,0.7);
  outline-offset:2px
}

.menu-dropdown {
  border-radius:14px;
  box-shadow:0 12px 32px rgba(15,23,42,0.14),0 2px 8px rgba(15,23,42,0.08);
  border:1px solid rgba(226,232,240,0.9);
  animation:dropdownReveal 0.15s ease forwards
}

@keyframes dropdownReveal {
  from {
    opacity:0;
    transform:translateY(-6px) scale(0.98)
  }
  to {
    opacity:1;
    transform:translateY(0) scale(1)
  }

}

.menu-item {
  padding:0.45rem 0.7rem;
  border-radius:8px;
  font-size:var(--fs-sm);
  font-weight:500;
  transition:background 0.13s ease,color 0.13s ease,transform 0.12s ease;
  letter-spacing:0.005em
}

.menu-item:hover {
  background:#f1f5f9;
  color:#0f172a;
  transform:translateX(2px)
}

.menu-item.active {
  font-weight:600
}

.button {
  transition:transform 0.15s ease,box-shadow 0.15s ease,background 0.15s ease,border-color 0.15s ease,filter 0.15s ease;
  letter-spacing:0.01em;
  border-radius:10px
}

.button:hover:not(:disabled) {
  filter:brightness(1.04);
  transform:translateY(-1px)
}

.button:active:not(:disabled) {
  transform:scale(0.97) translateY(0);
  box-shadow:none!important;
  transition-duration:0.08s
}

.button.primary {
  box-shadow:0 2px 6px rgba(59,130,246,0.20),0 1px 2px rgba(59,130,246,0.12)
}

.button.primary:hover:not(:disabled) {
  box-shadow:0 3px 10px rgba(59,130,246,0.28),0 1px 3px rgba(59,130,246,0.16)
}

@keyframes prismSpin {
  to {
    transform:rotate(360deg)
  }

}

#simulate.is-loading {
  pointer-events:none;
  opacity:0.82;
  position:relative;
  color:transparent!important
}

#simulate.is-loading::after {
  content:"";
  position:absolute;
  inset:0;
  margin:auto;
  width:16px;
  height:16px;
  border:2px solid rgba(255,255,255,0.35);
  border-top-color:#ffffff;
  border-radius:50%;
  animation:prismSpin 0.65s linear infinite
}

#canvas-loading-overlay {
  position:absolute;
  inset:0;
  background:rgba(242,246,255,0.48);
  backdrop-filter:blur(1px);
  -webkit-backdrop-filter:blur(1px);
  z-index:50;
  pointer-events:none;
  opacity:0;
  transition:opacity 0.22s ease;
  border-radius:inherit
}

#canvas-loading-overlay.visible {
  opacity:1
}

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

}

.result-block.reveal-anim,.result-block-blackbox.reveal-anim {
  animation:resultFadeUp 0.28s ease forwards
}

.reveal-anim-1 {
  animation-delay:0.0s
}

.reveal-anim-2 {
  animation-delay:0.07s
}

.reveal-anim-3 {
  animation-delay:0.14s
}

.reveal-anim-4 {
  animation-delay:0.21s
}

.reveal-anim-5 {
  animation-delay:0.28s
}

.result-block,.result-block-blackbox {
  box-shadow:0 4px 16px rgba(15,23,42,0.06),0 1px 4px rgba(15,23,42,0.04);
  border-radius:12px;
  transition:box-shadow 0.2s ease,border-color 0.2s ease,transform 0.2s ease
}

.result-block:hover,.result-block-blackbox:hover {
  transform:translateY(-1px);
  box-shadow:0 10px 28px rgba(15,23,42,0.10),0 2px 8px rgba(15,23,42,0.06)
}

@keyframes scoreCountUp {
  from {
    opacity:0;
    transform:scale(0.88);
    filter:blur(2px)
  }
  to {
    opacity:1;
    transform:scale(1);
    filter:blur(0px)
  }

}

@keyframes scoreGlow {
  0% {
    box-shadow:0 0 0 0 rgba(59,130,246,0)
  }
  40% {
    box-shadow:0 0 0 6px rgba(59,130,246,0.22)
  }
  100% {
    box-shadow:0 0 0 0 rgba(59,130,246,0)
  }

}

.evaluation-score.score-revealed {
  animation:scoreCountUp 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards,scoreGlow 1.1s ease 0.35s forwards;
  display:inline-block
}

.score-number {
  display:inline-block;
  transition:transform 0.3s cubic-bezier(0.34,1.56,0.64,1)
}

.panel {
  box-shadow:0 2px 12px rgba(15,23,42,0.07),0 0 0 1px rgba(226,232,240,0.7);
  border-radius:14px;
  transition:box-shadow 0.2s ease
}


/* footer-tabs dark theme removed */

.palette-item {
  transition:transform 0.15s ease,opacity 0.15s ease
}

.palette-item:hover {
  opacity:0.8;
  transform:translateY(-2px) scale(1.1)
}

.palette-item:active {
  transform:scale(0.96)
}

.icon-button {
  transition:background 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease,transform 0.15s ease
}

.icon-button:hover {
  transform:translateY(-1px);
  box-shadow:0 3px 10px rgba(0,0,0,0.15)
}

.icon-button:active {
  transform:scale(0.94)
}

.roadmap-topic-item {
  transition:transform 0.18s ease,box-shadow 0.18s ease,border-color 0.18s ease,background 0.18s ease
}

.roadmap-topic-item:hover {
  transform:translateY(-2px)
}

.learn-question-item {
  transition:border-color 0.16s ease,box-shadow 0.16s ease,transform 0.16s ease,background 0.16s ease
}

.learn-question-item:hover {
  transform:translateY(-1px)
}

html {
  scroll-behavior: smooth;
  /*
   * Fluid root font-size — scales every rem value in the app.
   *
   * Formula:  clamp(floor, 12px + 0.25vw, ceiling)
   *
   * Viewport  →  computed          Target range (per spec)
   * ─────────────────────────────────────────────────────
   * 375px  (phone)    → 12.9  → 14px  (clamped)   14–16px  ✓
   * 768px  (tablet)   → 13.9  → 14px  (clamped)   15–16px  ✓
   * 1280px (13" lpt)  → 15.2px                    15–16px  ✓
   * 1440px (15" lpt)  → 15.6px                    15–16px  ✓
   * 1512px (14" MBP)  → 15.8px                    15–16px  ✓
   * 1920px (21" desk) → 16.8px                    16–18px  ✓
   * 2560px (27" desk) → 18.4  → 18px  (clamped)   16–18px  ✓
   *
   * All rem-based tokens (--fs-*) scale from this single value.
   * No per-component overrides needed.
   */
  font-size: clamp(14px, calc(12px + 0.25vw), 18px);
}

.stage-theory,.roadmap-topic-list,.roadmap-detail,#simulation-content,.learn-question-list {
  scroll-behavior:smooth
}

.modal-content {
  border-radius:16px;
  box-shadow:0 20px 60px rgba(2,6,23,0.22),0 4px 16px rgba(2,6,23,0.10)
}

@keyframes modalReveal {
  from {
    opacity:0;
    transform:translateY(12px) scale(0.97)
  }
  to {
    opacity:1;
    transform:translateY(0) scale(1)
  }

}

.modal:not(.hidden) .modal-content {
  animation:modalReveal 0.22s cubic-bezier(0.34,1.2,0.64,1) forwards
}

.practice-setup select,#practice-preset-select,.learn-stage-picker select,.roadmap-filter-select {
  border-radius:10px;
  transition:border-color 0.15s ease,box-shadow 0.15s ease
}

.button:focus-visible,.menu-button:focus-visible,.icon-button:focus-visible,.practice-setup select:focus-visible,.learn-stage-picker select:focus-visible,.roadmap-filter-select:focus-visible {
  outline:2px solid rgba(96,165,250,0.75);
  outline-offset:2px
}

.canvas-empty-state {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2;
  pointer-events:none;
  padding:2rem;
  opacity:1;
  transition:opacity 220ms ease
}

.canvas-empty-state.ces-hidden {
  opacity:0;
  pointer-events:none
}

.ces-inner {
  pointer-events:auto;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
  max-width:420px;
  text-align:center;
  background:rgba(255,255,255,0.82);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border:1px solid #dbeafe;
  border-radius:22px;
  padding:2rem 1.75rem 1.75rem;
  box-shadow:0 8px 32px rgba(15,23,42,0.08),0 0 0 1px rgba(219,234,254,0.6);
  user-select:none
}

.ces-icon {
  flex-shrink:0
}

.ces-close {
  position:absolute;
  top:-0.25rem;
  right:-0.25rem;
  width:28px;
  height:28px;
  border-radius:50%;
  border:1px solid #e2e8f0;
  background:#ffffff;
  color:#94a3b8;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background 0.15s,color 0.15s,border-color 0.15s;
  box-shadow:0 1px 4px rgba(15,23,42,0.08)
}

.ces-close:hover {
  background:#f1f5f9;
  color:#475569;
  border-color:#cbd5e1
}

.ces-title {
  font-size:var(--fs-subhead);
  font-weight:800;
  color:#0f172a;
  letter-spacing:-0.01em;
  margin:0
}

.ces-subtitle {
  font-size:var(--fs-sm);
  color:#475569;
  line-height:1.55;
  margin:0
}

.ces-subtitle strong {
  color:#1d4ed8;
  font-weight:700
}

.ces-steps {
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:0.65rem;
  width:100%;
  text-align:left
}

.ces-steps li {
  display:flex;
  align-items:flex-start;
  gap:0.7rem;
  padding:0.6rem 0.75rem;
  background:#f8fbff;
  border:1px solid #dbeafe;
  border-radius:12px
}

.ces-step-badge {
  flex-shrink:0;
  width:22px;
  height:22px;
  border-radius:50%;
  background:linear-gradient(180deg,#3b82f6 0%,#2563eb 100%);
  color:#fff;
  font-size:var(--fs-xss);
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 2px 8px rgba(37,99,235,0.28);
  margin-top:1px
}

.ces-steps li div {
  display:flex;
  flex-direction:column;
  gap:0.12rem
}

.ces-steps li strong {
  font-size:var(--fs-sm);
  font-weight:700;
  color:#0f172a
}

.ces-steps li span {
  font-size:var(--fs-sm);
  color:#64748b;
  line-height:1.4
}

.ces-steps li em {
  font-style:normal;
  color:#2563eb;
  font-weight:600
}

.ces-hint {
  display:flex;
  align-items:center;
  gap:0.45rem;
  font-size:var(--fs-xs);
  color:#94a3b8;
  margin:0
}

.ces-hint svg {
  flex-shrink:0
}

.ces-hint strong {
  color:#64748b;
  font-weight:600
}

body.roadmap-mode .canvas-empty-state,body.evaluation-questions-only .canvas-empty-state {
  display:none
}

.qs-step-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:10px;
  background:linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%);
  border:1px solid #bfdbfe;
  font-size:var(--fs-subhead);
  flex-shrink:0;
  margin-right:0.5rem;
  vertical-align:middle
}

.qs-kbd {
  display:inline-block;
  background:#f1f5f9;
  border:1px solid #cbd5e1;
  border-radius:6px;
  padding:0.05rem 0.38rem;
  font-family:ui-monospace,"Cascadia Code",monospace;
  font-size:var(--fs-xs);
  color:#334155;
  font-weight:600;
  letter-spacing:0;
  vertical-align:middle
}

.prism-tour-fallback-card.prism-tour-quickstart .prism-tour-fallback-header {
  background:linear-gradient(90deg,#eff6ff 0%,#f8fbff 100%);
  margin:-0.95rem -1rem 0.6rem;
  padding:0.7rem 1rem;
  border-radius:18px 18px 0 0;
  border-bottom:1px solid #dbeafe
}

.prism-tour-fallback-card.prism-tour-quickstart .prism-tour-fallback-title::before {
  background:linear-gradient(180deg,#22c55e 0%,#16a34a 100%);
  box-shadow:0 0 0 4px rgba(34,197,94,0.14)
}

@keyframes prism-shimmer {
  0% {
    background-position:-600px 0
  }
  100% {
    background-position:600px 0
  }

}

.prism-skeleton-row {
  padding:6px 0
}

.prism-skeleton-line {
  height:14px;
  border-radius:6px;
  background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%);
  background-size:600px 100%;
  animation:prism-shimmer 1.4s infinite linear
}

.prism-skeleton-card {
  height:64px;
  border-radius:10px;
  margin-bottom:8px;
  background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%);
  background-size:600px 100%;
  animation:prism-shimmer 1.4s infinite linear
}

.prism-loading {
  position:relative;
  pointer-events:none;
  opacity:0.75
}

.prism-loading::after {
  content:"";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:inherit;
  background:rgba(255,255,255,0.45)
}

@keyframes prism-spin {
  to {
    transform:rotate(360deg)
  }

}

.prism-btn-spinner {
  display:inline-block;
  width:12px;
  height:12px;
  border:2px solid currentColor;
  border-top-color:transparent;
  border-radius:50%;
  animation:prism-spin 0.7s linear infinite;
  vertical-align:middle;
  margin-left:6px
}

.rm-topic-item {
  contain:layout style
}

#rp-left-scroll,#rp-center-scroll,#roadmap-topic-list {
  scroll-behavior:smooth;
  overscroll-behavior:contain;
  will-change:scroll-position
}

.rm-topic-item {
  contain:layout style paint;
  content-visibility:auto;
  contain-intrinsic-size:0 40px
}

.guide-component-card {
  contain:layout style;
  content-visibility:auto;
  contain-intrinsic-size:0 120px
}

.result-block,.result-block-blackbox {
  contain:layout style;
  content-visibility:auto;
  contain-intrinsic-size:0 80px
}

.canvas-area.canvas-interacting,#canvas.canvas-interacting {
  will-change:transform
}

#practice-content,#simulation-content,#evaluate-view,#roadmap-center-view,#roadmap-right-view {
  transition:opacity 0.18s ease
}

.button:active:not(:disabled),.btn:active:not(:disabled),.primary-btn:active:not(:disabled) {
  transform:scale(0.97);
  transition:transform 0.08s ease
}

/* ===== Inspector panel redesign (visual-only, behavior preserved) ===== */
.inspector {
  background:#ffffff;
  border:1px solid #D8E3ED;
  border-radius:12px;
  padding:16px;
  gap:16px;
  box-shadow:none;
}

.inspector-fields-wrapper {
  gap:24px;
}

.inspector-header {
  padding:10px 12px;
  border:1px solid #D8E3ED;
  border-radius:10px;
  background:#FFFFFF;
  border-bottom:1px solid #D8E3ED;
}

.inspector-header-icon {
  width:22px;
  height:22px;
  opacity:0.92;
}

.inspector-header-type {
  font-size:var(--fs-base);
  font-weight:700;
  color:#1A2B3C;
}

.inspector-header-id {
  font-size:var(--fs-xss);
  color:#7A8FA6;
  font-weight:500;
}

.inspector-meta-fields {
  gap:12px;
  padding-bottom:0;
}

.inspector-field {
  gap:6px;
}

.inspector-label {
  display:flex;
  justify-content:space-between;
  align-items:center;
  width:100%;
  font-size:var(--fs-xs);
  font-weight:600;
  color:#1A2B3C;
  letter-spacing:normal;
}

.inspector-unit {
  margin-left:auto;
  font-size:var(--fs-xss);
  font-weight:500;
  color:#7A8FA6;
}

.inspector input,
.inspector textarea,
.inspector select {
  background:#FFFFFF;
  border:1px solid #D8E3ED;
  border-radius:8px;
  color:#1A2B3C;
  font-size:var(--fs-sm);
  font-weight:400;
  padding:10px 12px;
}

.inspector input:focus,
.inspector textarea:focus,
.inspector select:focus,
.inspector input:focus-visible,
.inspector textarea:focus-visible,
.inspector select:focus-visible {
  border-color:#2A7FA5;
  box-shadow:0 0 0 2px rgba(42,127,165,0.16);
}

.inspector textarea {
  min-height:44px;
  resize:none;
}

.inspector-params-section {
  padding-top:0;
  padding-bottom:0;
}

.inspector-section-label {
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  padding:0 0 10px;
  margin:0 0 12px;
  font-size:var(--fs-xss);
  font-weight:600;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:#7A8FA6;
  border-bottom:1px solid #D8E3ED;
}

.inspector-section-label::before {
  content:"";
  width:4px;
  height:14px;
  border-radius:999px;
  background:#2A7FA5;
  opacity:0.55;
}

.inspector-section-label--security {
  color:#7A8FA6;
}

.inspector-security-section {
  border-top:none;
  margin-top:0;
  padding-top:0;
}

.inspector-advanced-trigger {
  display:block;
  cursor:pointer;
  user-select:none;
}

.inspector-advanced-trigger input[type="checkbox"] {
  position:absolute;
  opacity:0;
  width:0;
  height:0;
  pointer-events:none;
}

.inspector-advanced-trigger-body {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid #D8E3ED;
  border-radius:999px;
  background:#FFFFFF;
  color:#1A2B3C;
  transition:border-color 0.18s ease, background 0.18s ease;
}

.inspector-advanced-label {
  flex:1;
  font-size:var(--fs-xs);
  font-weight:600;
}

.inspector-advanced-state {
  font-size:var(--fs-xss);
  color:#7A8FA6;
  font-weight:600;
}

.inspector-advanced-chevron {
  font-size:var(--fs-xs);
  color:#2A7FA5;
  transition:transform 0.2s ease;
}

.inspector-advanced-trigger input:checked + .inspector-advanced-trigger-body {
  border-color:#2A7FA5;
  background:#F7FBFD;
}

.inspector-advanced-trigger input:checked + .inspector-advanced-trigger-body .inspector-advanced-chevron {
  transform:rotate(90deg);
}

.inspector-sec-fields {
  gap:0;
  border:1px solid #D8E3ED;
  border-radius:10px;
  background:#FFFFFF;
  overflow:hidden;
}

.inspector-sec-row {
  padding:10px 12px;
  min-height:unset;
  border-bottom:1px solid #D8E3ED;
  gap:10px;
}

.inspector-sec-row:last-child {
  border-bottom:none;
}

.inspector-sec-copy {
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
  flex:1;
}

.inspector-sec-label {
  font-size:var(--fs-xs);
  font-weight:600;
  color:#1A2B3C;
  white-space:normal;
}

.inspector-sec-desc {
  font-size:var(--fs-xss);
  color:#7A8FA6;
  line-height:1.35;
}

.inspector-toggle-track,
.inspector-sec-toggle .inspector-toggle-track {
  width:34px;
  height:20px;
  background:#C5D2DC;
}

.inspector-toggle-thumb,
.inspector-sec-toggle .inspector-toggle-thumb {
  width:14px;
  height:14px;
  top:3px;
  left:3px;
}

.inspector-toggle input:checked + .inspector-toggle-track,
.inspector-sec-toggle input:checked + .inspector-toggle-track {
  background:#2A7FA5;
}

.inspector-toggle input:checked + .inspector-toggle-track .inspector-toggle-thumb,
.inspector-sec-toggle input:checked + .inspector-toggle-track .inspector-toggle-thumb {
  transform:translateX(14px);
}

/* ===== Inspector UX polish v2 ===== */
.inspector-fields-wrapper {
  gap:20px;
}

.inspector-params-section {
  background:#FFFFFF;
  border:1px solid #D8E3ED;
  border-radius:12px;
  padding:14px 12px;
}

.inspector .inspector-field {
  gap:8px;
}

.inspector .inspector-label {
  justify-content:flex-start;
  gap:6px;
}

.inspector .inspector-unit {
  margin-left:4px;
  font-size:var(--fs-xss);
  color:#7A8FA6;
}

.inspector-fields {
  gap:12px;
}

.inspector-advanced-trigger-body {
  border-radius:12px;
  min-height:46px;
  padding:11px 14px;
}

.inspector-advanced-chevron {
  font-size:var(--fs-xs);
  font-weight:700;
}

.inspector-advanced-label {
  letter-spacing:0.01em;
}

.inspector-sec-fields {
  margin-top:2px;
}

.inspector-sec-row {
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  column-gap:12px;
  padding:12px;
}

.inspector-sec-copy {
  min-width:0;
}

.inspector-sec-label {
  line-height:1.25;
}

.inspector-sec-desc {
  margin-top:2px;
}

.inspector-sec-toggle {
  justify-self:end;
  align-self:center;
}

.inspector-sec-row:hover {
  background:#F8FBFE;
}

.inspector-advanced-toggle {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  column-gap:12px;
  padding:12px 14px;
  border:1px solid #D8E3ED;
  border-radius:12px;
  background:#FFFFFF;
  cursor:pointer;
  user-select:none;
}

.inspector-advanced-toggle input[type="checkbox"] {
  position:absolute;
  opacity:0;
  width:0;
  height:0;
  pointer-events:none;
}

.inspector-advanced-toggle-label {
  font-size:var(--fs-xs);
  font-weight:600;
  color:#1A2B3C;
}

.inspector-advanced-toggle input:checked ~ .inspector-sec-toggle .inspector-toggle-track {
  background:#2A7FA5;
}

.inspector-advanced-toggle input:checked ~ .inspector-sec-toggle .inspector-toggle-thumb {
  transform:translateX(14px);
}

.inspector-advanced-toggle input:focus-visible ~ .inspector-sec-toggle .inspector-toggle-track {
  box-shadow:0 0 0 2px rgba(42,127,165,0.2);
}

/* ===== Inspector requested alignment fixes ===== */
.inspector h2,
.inspector-header-type,
.inspector-section-label,
.inspector-section-label--security,
.inspector-advanced-toggle-label,
.inspector-label,
.inspector-sec-label {
  color:#000000 !important;
}

.inspector label.inspector-advanced-toggle {
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) auto !important;
  align-items:center !important;
  column-gap:12px;
  padding:12px 14px;
  padding-bottom:12px;
}

.inspector-advanced-toggle-label {
  text-align:left;
}

/* Service Type should read as: label - dropdown (same row) */
.inspector .inspector-field[data-field-key="service_type"] {
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:auto minmax(170px, 1fr);
  align-items:center;
  column-gap:12px;
}

.inspector .inspector-field[data-field-key="service_type"] .inspector-label {
  margin:0;
  white-space:nowrap;
}

.inspector .inspector-field[data-field-key="service_type"] select {
  width:100%;
}

/* Security & Access should not look like a table */
.inspector-sec-fields {
  border:none !important;
  background:transparent !important;
  border-radius:0 !important;
  overflow:visible !important;
  display:grid;
  gap:10px;
  margin-top:4px;
}

.inspector .inspector-field.inspector-sec-field,
.inspector .inspector-sec-row {
  border:1px solid #D8E3ED;
  border-radius:10px;
  background:#FFFFFF;
  border-bottom:1px solid #D8E3ED !important;
}

.inspector .inspector-field.inspector-sec-field {
  display:grid;
  grid-template-columns:auto minmax(140px, 1fr);
  align-items:center;
  column-gap:12px;
  padding:12px;
}

.inspector .inspector-field.inspector-sec-field .inspector-label {
  white-space:nowrap;
}

/* ===== Inspector overflow + flat security rows fix ===== */
.inspector,
.inspector * {
  box-sizing:border-box;
}

.inspector-fields,
.inspector-sec-fields,
.inspector-field,
.inspector-sec-row,
.inspector-sec-copy {
  min-width:0;
}

.inspector select,
.inspector input,
.inspector textarea {
  max-width:100%;
}

.inspector .inspector-field[data-field-key="service_type"] {
  grid-template-columns:auto minmax(0, 1fr);
}

.inspector .inspector-field.inspector-sec-field {
  grid-template-columns:auto minmax(0, 1fr);
}

/* Security should NOT appear as separate boxed blocks */
.inspector-sec-fields {
  border:none !important;
  background:transparent !important;
  border-radius:0 !important;
  overflow:visible !important;
  margin-top:0;
  display:flex;
  flex-direction:column;
  gap:0;
}

.inspector .inspector-field.inspector-sec-field,
.inspector .inspector-sec-row {
  border:none !important;
  border-bottom:1px solid #D8E3ED !important;
  border-radius:0 !important;
  background:transparent !important;
  padding:12px 0 !important;
}

.inspector .inspector-sec-row:last-child,
.inspector .inspector-field.inspector-sec-field:last-child {
  border-bottom:none !important;
}

.inspector .inspector-field.inspector-sec-field select {
  width:100%;
}

/* ===== Inspector details panel background fix ===== */
.inspector-extra {
  background:#F8FBFE !important;
  gap:10px;
}

.inspector-extra-body {
  margin:0;
  font-size:var(--fs-base);
  line-height:1.45;
  color:#4D627A;
}

.inspector-extra-body strong {
  color:#1A2B3C;
  font-weight:700;
}

/* Final color-layer fix: tinted panel bg + white primary boxes */
.inspector {
  background:#FFFFFF !important;
}

.inspector-header,
.inspector-params-section,
.inspector-advanced-toggle,
.inspector-extra,
.inspector .inspector-field.inspector-sec-field,
.inspector .inspector-sec-row {
  background:#FFFFFF !important;
}

/* ===== Inspector final cleanup (advanced + security) ===== */
.inspector .inspector-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.inspector .inspector-field,
.inspector .inspector-sec-row,
.inspector .inspector-field.inspector-sec-field {
  min-width:0;
}

.inspector .inspector-label {
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.25;
}

.inspector .inspector-unit {
  white-space:nowrap;
  flex-shrink:0;
}

.inspector .inspector-field input,
.inspector .inspector-field select,
.inspector .inspector-field textarea,
.inspector .inspector-field.inspector-sec-field select {
  width:100%;
}

.inspector .inspector-security-section .inspector-sec-fields {
  border:1px solid #D8E3ED !important;
  border-radius:10px !important;
  background:#FFFFFF !important;
  overflow:hidden !important;
}

.inspector .inspector-security-section .inspector-sec-row,
.inspector .inspector-security-section .inspector-field.inspector-sec-field {
  border-bottom:1px solid #D8E3ED !important;
  border-radius:0 !important;
  padding:12px !important;
}

.inspector .inspector-security-section .inspector-sec-row:last-child,
.inspector .inspector-security-section .inspector-field.inspector-sec-field:last-child {
  border-bottom:none !important;
}

@media (max-width: 560px) {
  .inspector .inspector-fields {
    grid-template-columns:1fr;
  }
}

/* ── Topbar context switcher — replaces "Mode" dropdown ─────────────────────
   Lives in .menu[data-menu="mode"] as an inline pill group.
   All four mode buttons sit in one row; the active one gets a blue tint.    */
.topbar-mode-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;           /* same rhythm as .menu-bar gap (0.8rem) — slightly tighter to hint grouping */
  background: transparent;
  border: none;
  padding: 0;
  position: static;
}

.tsw-btn {
  background: transparent;
  border: 0px;
  color: #f8fafc;
  padding: 0.35rem 0.8rem;
  font-size: var(--fs-subhead);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.tsw-btn:hover {
  background: rgba(148,163,184,0.28);
  color: #ffffff;
}

.tsw-btn.active {
  color: #e0f2fe;
}

/* On narrow viewports tighten padding */
@media (max-width: 700px) {
  .tsw-btn { padding: 0.3rem 0.55rem; font-size: var(--fs-xs); }
}
