/* ================================================================
   Vaultria — Layout CSS
   Three-zone workstation: Left Panel | Center Canvas | Right Panel
   ================================================================ */

/* ── App shell ───────────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

/* ── Environment canvas (full-bleed background) ──────────────────── */
.env-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: background var(--t-env);
}

/* ── Left Panel ──────────────────────────────────────────────────── */
.left-panel {
  position: relative;
  z-index: var(--z-panel);
  width: var(--left-panel-width);
  min-width: var(--left-panel-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border-right: 1px solid var(--border-subtle);
  transition:
    width var(--t-base),
    min-width var(--t-base),
    background var(--t-env);
  overflow: hidden;
}

.left-panel.collapsed {
  width: var(--panel-collapsed-w);
  min-width: var(--panel-collapsed-w);
}

/* ── Center Canvas ───────────────────────────────────────────────── */
.center-canvas {
  position: relative;
  z-index: var(--z-base);
  flex: 1 1 auto;
  min-width: var(--canvas-min-width);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ── Right Panel ─────────────────────────────────────────────────── */
.right-panel {
  position: relative;
  z-index: var(--z-panel);
  width: var(--right-panel-width);
  min-width: var(--right-panel-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border-left: 1px solid var(--border-subtle);
  transition:
    width var(--t-base),
    min-width var(--t-base),
    background var(--t-env);
  overflow: hidden;
}

.right-panel.collapsed {
  width: var(--panel-collapsed-w);
  min-width: var(--panel-collapsed-w);
}

/* ── Panel header ────────────────────────────────────────────────── */
.panel-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-lg) var(--sp-md);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 60px;
  flex-shrink: 0;
}

.panel-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
}

.panel-collapse-btn {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.panel-collapse-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ── Nav items ───────────────────────────────────────────────────── */
.panel-nav {
  flex: 1;
  padding: var(--sp-sm) var(--sp-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 10px var(--sp-sm);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    color var(--t-fast),
    background var(--t-fast);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-item.active {
  color: var(--accent-primary);
  background: var(--accent-dim);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 var(--r-full) var(--r-full) 0;
  background: var(--accent-primary);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--t-base), width var(--t-base);
}

.left-panel.collapsed .nav-item-label,
.right-panel.collapsed .nav-item-label {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

.left-panel.collapsed .panel-logo {
  opacity: 0;
  width: 0;
}

/* ── Nav section divider ─────────────────────────────────────────── */
.nav-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--sp-sm) var(--sp-sm);
}

.nav-section-label {
  padding: var(--sp-xs) var(--sp-sm);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
}

.left-panel.collapsed .nav-section-label { opacity: 0; }

/* ── Panel footer ────────────────────────────────────────────────── */
.panel-footer {
  padding: var(--sp-md);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* ── Center canvas sections ──────────────────────────────────────── */
.canvas-content {
  position: relative;
  z-index: var(--z-base);
  min-height: 100vh;
  padding: var(--sp-xl) var(--sp-xl);
  max-width: 860px;
  margin: 0 auto;
}

/* ── Toast notifications ─────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: var(--sp-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--sp-sm);
  pointer-events: none;
  align-items: center;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-normal);
  border-radius: var(--r-lg);
  padding: var(--sp-sm) var(--sp-lg);
  font-size: 0.875rem;
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  animation: toastIn 0.25s var(--t-base) forwards;
  max-width: 380px;
  text-align: center;
}

.toast.toast-success { border-color: rgba(74,222,128,0.3); color: var(--success); }
.toast.toast-error   { border-color: rgba(248,113,113,0.3); color: var(--error); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Modal overlay ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-normal);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ════════════════════════════════════════════════════════════════════
   Auth: "Floating Terminal" layout
   Shards fill the whole void; panel is an absolute floating slab
   centered at ~70% of screen width — not edge-anchored.
   ════════════════════════════════════════════════════════════════════ */

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  animation: fadeIn 0.55s ease;
}

/* Showcase is the full-screen void shards float in */
.auth-showcase {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ── Floating glassmorphic slab ─────────────────────────────────── */
.auth-panel {
  position: absolute;
  right: 20%;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 20;

  background: rgba(7, 4, 14, 0.86);
  backdrop-filter: blur(44px);
  -webkit-backdrop-filter: blur(44px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);

  padding: 2.8rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;

  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);

  transition:
    box-shadow 0.5s ease,
    border-color 0.5s ease;

  --auth-accent: #e8a0b8;
}

/* Rim light — left edge catches glow from the nearest shard */
.auth-panel.rim-jp {
  border-left-color: rgba(232, 160, 184, 0.45);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.65),
    -22px 0 55px rgba(232, 160, 184, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.auth-panel.rim-kr {
  border-left-color: rgba(77, 184, 255, 0.45);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.65),
    -22px 0 55px rgba(77, 184, 255, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.auth-panel.rim-es {
  border-left-color: rgba(232, 164, 74, 0.45);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.65),
    -22px 0 55px rgba(232, 164, 74, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Panel header */
.auth-panel-header { margin-bottom: 2rem; }

.auth-panel-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.55rem;
  font-weight: 300;
  letter-spacing: 0.42em;
  color: var(--text-primary);
}

.auth-panel-subtitle {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.26);
  margin-top: 7px;
  text-transform: uppercase;
}

/* Mode tabs */
.auth-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0 0 var(--sp-sm) 0;
  cursor: pointer;
  transition: color var(--t-fast);
  position: relative;
  font-family: inherit;
}
.auth-tab.active { color: var(--text-primary); }
.auth-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0; right: 0; height: 1px;
  background: var(--auth-accent);
  transition: background 0.4s ease;
}

/* Line inputs */
.auth-field { margin-bottom: 1.5rem; }

.auth-line-input {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0;
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 7px 0;
  transition: border-color 0.35s ease;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.auth-line-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.auth-line-input:focus { border-bottom-color: var(--auth-accent); }

/* ── Language shards ─────────────────────────────────────────────── */
.auth-shard {
  position: absolute;
  width: 155px;
  height: 225px;
  border-radius: 14px 22px 12px 20px;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.075) 0%,
    rgba(255, 255, 255, 0.018) 55%,
    rgba(255, 255, 255, 0.042) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top:  1px solid rgba(255, 255, 255, 0.15);
  border-left: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  z-index: 5; /* above back-particles (2), below front-particles (8) */
  transition: box-shadow 0.45s ease, background 0.45s ease;
}

.auth-shard-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.auth-shard-glyph {
  font-size: 4.2rem;
  font-weight: 100;
  line-height: 1;
  font-family: Georgia, serif;
}

.auth-shard-label {
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.32);
  text-transform: uppercase;
  font-family: inherit;
}

/* Japanese — upper left */
.auth-shard--jp {
  left: 8%; top: 8%;
  box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 0 60px rgba(232,160,184,.13), inset 0 1px 0 rgba(255,255,255,.08);
  animation: shardFloat1 6.2s ease-in-out infinite;
}
.auth-shard--jp .auth-shard-glyph {
  color: rgba(232,160,184,.92);
  text-shadow: 0 0 18px rgba(232,160,184,.55), 0 0 55px rgba(232,160,184,.18);
}
.auth-shard--jp:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,.55), 0 0 95px rgba(232,160,184,.3), inset 0 1px 0 rgba(255,255,255,.1);
  background: linear-gradient(140deg, rgba(232,160,184,.1) 0%, rgba(255,255,255,.018) 55%, rgba(232,160,184,.045) 100%);
}

/* Korean — center, closest to the panel (magnetic connection) */
.auth-shard--kr {
  left: 36%; top: 36%;
  box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 0 60px rgba(77,184,255,.13), inset 0 1px 0 rgba(255,255,255,.08);
  animation: shardFloat2 7.4s ease-in-out 0.9s infinite;
}
.auth-shard--kr .auth-shard-glyph {
  color: rgba(77,184,255,.92);
  text-shadow: 0 0 18px rgba(77,184,255,.55), 0 0 55px rgba(77,184,255,.18);
}
.auth-shard--kr:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,.55), 0 0 95px rgba(77,184,255,.3), inset 0 1px 0 rgba(255,255,255,.1);
  background: linear-gradient(140deg, rgba(77,184,255,.1) 0%, rgba(255,255,255,.018) 55%, rgba(77,184,255,.045) 100%);
}

/* Spanish — lower left */
.auth-shard--es {
  left: 18%; top: 63%;
  box-shadow: 0 8px 32px rgba(0,0,0,.55), 0 0 60px rgba(232,164,74,.13), inset 0 1px 0 rgba(255,255,255,.08);
  animation: shardFloat3 5.7s ease-in-out 1.8s infinite;
}
.auth-shard--es .auth-shard-glyph {
  color: rgba(232,164,74,.92);
  text-shadow: 0 0 18px rgba(232,164,74,.55), 0 0 55px rgba(232,164,74,.18);
}
.auth-shard--es:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,.55), 0 0 95px rgba(232,164,74,.3), inset 0 1px 0 rgba(255,255,255,.1);
  background: linear-gradient(140deg, rgba(232,164,74,.1) 0%, rgba(255,255,255,.018) 55%, rgba(232,164,74,.045) 100%);
}

/* Shard floats */
@keyframes shardFloat1 {
  0%, 100% { transform: rotate(-10deg) translateY(0px);   }
  50%       { transform: rotate(-10deg) translateY(-13px); }
}
@keyframes shardFloat2 {
  0%, 100% { transform: rotate(7deg)  translateY(0px);   }
  50%       { transform: rotate(7deg)  translateY(-11px); }
}
@keyframes shardFloat3 {
  0%, 100% { transform: rotate(-4deg) translateY(0px);   }
  50%       { transform: rotate(-4deg) translateY(-10px); }
}

/* ── Depth particles — two z-index layers create 3-D parallax ────── */
.auth-particles { position: absolute; inset: 0; pointer-events: none; }

.auth-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 1);
  animation: particleDrift linear infinite;
}
.auth-particle--back  { z-index: 2; opacity: 0.25; } /* behind shards  */
.auth-particle--front { z-index: 8; opacity: 0.45; } /* in front of shards, behind panel */

@keyframes particleDrift {
  0%   { transform: translateY(0px)    translateX(0px);  opacity: 0;    }
  12%  { opacity: var(--po, 0.4); }
  88%  { opacity: var(--po, 0.4); }
  100% { transform: translateY(-110px) translateX(var(--px, 15px)); opacity: 0; }
}

/* ── Entry transition: "Enter Vault" dissolve ───────────────────── */
.auth-panel--departing {
  animation: panelDissolve 0.65s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}
@keyframes panelDissolve {
  0%   { opacity: 1; transform: translateY(-50%) scale(1);    filter: blur(0px);  }
  25%  { opacity: 1; transform: translateY(-50%) scale(1.01); filter: blur(0px);  }
  100% { opacity: 0; transform: translateY(-50%) scale(0.96); filter: blur(12px); }
}

.auth-shard--jp.auth-shard--departing {
  animation: shardDepartJP 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}
.auth-shard--kr.auth-shard--departing {
  animation: shardDepartKR 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards !important;
}
.auth-shard--es.auth-shard--departing {
  animation: shardDepartES 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.16s forwards !important;
}

@keyframes shardDepartJP {
  0%   { transform: rotate(-10deg) translateY(0px)   scale(1);    opacity: 1; }
  100% { transform: rotate(-10deg) translateY(-70px) scale(1.2);  opacity: 0; }
}
@keyframes shardDepartKR {
  0%   { transform: rotate(7deg)  translateY(0px)   scale(1);    opacity: 1; }
  100% { transform: rotate(7deg)  translateY(-70px) scale(1.2);  opacity: 0; }
}
@keyframes shardDepartES {
  0%   { transform: rotate(-4deg) translateY(0px)   scale(1);    opacity: 1; }
  100% { transform: rotate(-4deg) translateY(-70px) scale(1.2);  opacity: 0; }
}

/* ── Background: dark void + film grain + reactive tint ─────────── */
#auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #05030c;
  overflow: hidden;
}

#auth-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.042;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 250px 250px;
  pointer-events: none;
  z-index: 1;
}

.auth-tint-layer {
  position: absolute; inset: 0;
  background: transparent;
  transition: background 0.9s ease;
  pointer-events: none; z-index: 2;
}

.auth-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 85% 80% at 35% 50%, transparent 15%, rgba(3, 2, 8, 0.72) 100%);
  pointer-events: none; z-index: 3;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-showcase { display: none; }
  .auth-panel {
    position: fixed;
    inset: 0; right: 0;
    transform: none;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding: var(--sp-xl) var(--sp-lg);
    justify-content: center;
  }
  .auth-panel--departing {
    animation: panelDissolveMobile 0.65s cubic-bezier(0.4,0,1,1) forwards;
  }
  @keyframes panelDissolveMobile {
    0%   { opacity: 1; transform: scale(1);    filter: blur(0px);  }
    100% { opacity: 0; transform: scale(0.96); filter: blur(12px); }
  }
}

/* ── Mobile: hide panels, show canvas only ───────────────────────── */
@media (max-width: 768px) {
  .left-panel, .right-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    transform: translateX(-110%);
    transition: transform var(--t-base);
  }
  .left-panel  { left: 0; }
  .right-panel { right: 0; transform: translateX(110%); }

  .left-panel.open  { transform: translateX(0); }
  .right-panel.open { transform: translateX(0); }

  .center-canvas {
    width: 100%;
    min-width: unset;
  }

  .canvas-content {
    padding: var(--sp-lg) var(--sp-md);
  }
}

/* ── Tutorial: locked nav items ────────────────────────────────────── */
.nav-item.locked-item {
  opacity: 0.38;
  cursor: default;
  pointer-events: none; /* belt-and-suspenders alongside aria-disabled */
}
/* Keep hover inert on locked items */
.nav-item.locked-item:hover {
  color: var(--text-secondary);
  background: transparent;
}

/* ── Tutorial: reveal animation (plays once when a tab becomes unlocked) */
@keyframes nav-reveal {
  0%   { opacity: 0.38; transform: translateX(-6px); }
  60%  { opacity: 1;    transform: translateX(2px);  }
  100% { opacity: 1;    transform: translateX(0);    }
}
.nav-item.nav-item-reveal {
  animation: nav-reveal 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Welcome modal overlay ─────────────────────────────────────────── */
@keyframes welcome-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes welcome-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes welcome-modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  animation: welcome-in 0.25s ease forwards;
}
.welcome-overlay--out {
  animation: welcome-out 0.2s ease forwards;
}
.welcome-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl, 16px);
  padding: var(--sp-2xl, 40px) var(--sp-xl, 32px);
  max-width: 400px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
  animation: welcome-modal-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.welcome-icon {
  margin-bottom: var(--sp-xs);
  opacity: 0.9;
}
.welcome-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin: 0;
}
.welcome-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 300px;
  margin: 0;
}
.welcome-start-btn {
  margin-top: var(--sp-sm);
  width: 100%;
}

/* ── Branch / optional units in the Curriculum Atlas ──────────────── */
.branch-unit-row {
  background: rgba(255, 255, 255, 0.012);
  position: relative;
}
/* Left-edge fork indicator */
.branch-unit-row::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1), transparent);
}

/* Optional-type badge pill */
.branch-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
