:root{
  --bg:#f5f7fb;--surface:#fff;--surface-2:#f9fafc;--ink:#111827;--muted:#6b7280;--line:#e4e7ee;
  --brand:#5b5ce2;--brand-2:#7c6df2;--brand-soft:#eeedff;--success:#15803d;--warning:#b45309;--danger:#b91c1c;
  --shadow:0 12px 34px rgba(28,37,54,.08);--shadow-sm:0 4px 18px rgba(28,37,54,.06);--radius:18px;--sidebar:214px;--topbar:66px;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select,textarea{font:inherit}button,a{color:inherit}button{cursor:pointer}a{text-decoration:none}.app-shell{min-height:100vh}.topbar{height:var(--topbar);position:fixed;inset:0 0 auto 0;z-index:40;background:rgba(255,255,255,.93);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);display:grid;grid-template-columns:var(--sidebar) minmax(300px,620px) 1fr;align-items:center;padding:0 18px}.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-mark{width:34px;height:34px;border-radius:11px;background:linear-gradient(135deg,var(--brand),#8c7cf6);display:grid;place-items:center;position:relative;box-shadow:0 6px 16px rgba(91,92,226,.22)}.brand-mark i{position:absolute;width:5px;height:5px;border-radius:50%;background:#fff}.brand-mark i:nth-child(1){transform:translate(-7px,-3px)}.brand-mark i:nth-child(2){transform:translate(0,5px)}.brand-mark i:nth-child(3){transform:translate(7px,-4px)}.brand strong{display:block;font-size:19px}.brand small{display:block;color:var(--muted);font-size:10px;white-space:nowrap}.global-search{height:40px;border:1px solid var(--line);background:#f8f9fc;border-radius:12px;display:flex;align-items:center;gap:9px;padding:0 12px;color:#7b8496;min-width:0}.global-search span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-search kbd{margin-left:auto;border:1px solid var(--line);background:white;border-radius:7px;padding:2px 6px;font-size:10px;color:#8a93a5}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.icon-btn,.assistant-quick,.avatar-btn{border:1px solid var(--line);background:white;height:38px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.icon-btn{width:38px;position:relative}.assistant-quick{padding:0 13px;font-weight:700}.avatar-btn{width:38px;background:#111827;color:#fff;font-weight:800}.icon-btn i{position:absolute;width:7px;height:7px;border-radius:50%;background:#f59e0b;right:6px;top:5px;display:none}.icon-btn i.show{display:block}
.sidebar{position:fixed;left:0;top:var(--topbar);bottom:0;width:var(--sidebar);background:#fff;border-right:1px solid var(--line);z-index:30;padding:16px 12px;display:flex;flex-direction:column}.side-nav{display:grid;gap:6px}.side-nav a,.sidebar-bottom a{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:12px;color:#596276;font-weight:650}.side-nav a:hover,.sidebar-bottom a:hover,.side-nav a.active,.sidebar-bottom a.active{background:var(--brand-soft);color:#4e46ce}.side-nav a span:first-child,.sidebar-bottom a span:first-child{width:20px;text-align:center}.sidebar-bottom{margin-top:auto;display:grid;gap:10px}.profile-mini{padding:11px;border-radius:12px;background:#f6f7fb}.profile-mini>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:7px}.progress-bar{height:7px;background:#e9ecf2;border-radius:999px;overflow:hidden}.progress-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--brand),#826ff7);border-radius:inherit;width:0}.main{margin-left:var(--sidebar);padding:calc(var(--topbar) + 24px) 28px 54px;min-height:100vh}.page{max-width:1280px;margin:0 auto}.page-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}.page-head h1,.hero h1{margin:2px 0 8px;line-height:1.05}.page-head h1{font-size:32px}.page-head p{max-width:760px;margin:0;color:var(--muted)}.page-actions,.hero-actions,.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.eyebrow{text-transform:uppercase;letter-spacing:.09em;color:#7d869a;font-size:11px;font-weight:800}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}.hover{transition:.18s ease}.hover:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.hero{padding:30px 30px 28px;background:linear-gradient(135deg,#111827,#242656 72%,#46469c);color:#fff;position:relative;overflow:hidden}.hero:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-65px;top:-110px;background:rgba(127,116,242,.24)}.hero h1{font-size:40px}.hero p{color:#c9cee5;max-width:720px;font-size:15px}.hero-actions{margin-top:18px;position:relative;z-index:1}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:11px;padding:10px 13px;font-weight:750;min-height:38px}.btn:hover{border-color:#c8ccda}.btn.brand{background:var(--brand);color:#fff;border-color:var(--brand)}.btn.primary{background:#fff;color:#111827;border-color:#fff}.btn.soft{background:var(--brand-soft);color:#4d46c8;border-color:transparent}.btn.danger{color:var(--danger)}.btn.small{min-height:31px;padding:7px 10px;border-radius:9px;font-size:12px}.btn:disabled{opacity:.45;cursor:not-allowed}.section{margin-top:26px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:12px}.section-title h2{font-size:19px;margin:0}.section-title a{font-weight:750;color:var(--brand);font-size:12px}.grid{display:grid;gap:16px}.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{padding:18px;display:flex;justify-content:space-between;gap:14px}.kpi strong{font-size:28px;display:block}.kpi small{color:var(--muted)}.kpi-icon,.objective-icon,.module-icon{width:40px;height:40px;border-radius:12px;background:var(--brand-soft);display:grid;place-items:center;font-size:18px;flex:0 0 auto}.action-card{padding:16px;display:flex;gap:12px}.action-card h3{margin:0 0 4px;font-size:14px}.action-card p{margin:0;color:var(--muted)}.action-index{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;background:#f1f3f8;font-weight:800}.tag{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:999px;background:#f1f3f7;color:#667085;font-size:10px;font-weight:800}.tag.brand{background:var(--brand-soft);color:#544bd1}.tag.success{background:#e9f8ef;color:var(--success)}.tag.warning{background:#fff4e5;color:var(--warning)}.tag.danger{background:#feecec;color:var(--danger)}.objective-card{padding:17px}.objective-top{display:flex;gap:11px}.objective-top h3{margin:0;font-size:15px}.objective-top p{margin:3px 0 0;color:var(--muted);font-size:12px}.progress-line{display:flex;gap:10px;align-items:center;margin:14px 0 12px}.progress-line .progress-bar{flex:1}.progress-line strong{font-size:12px}.objective-next{background:#f7f8fb;border-radius:10px;padding:10px;margin-bottom:12px;color:#606a7c;font-size:12px}.empty{padding:24px;color:var(--muted);text-align:center}
.module-hero{padding:22px;display:flex;justify-content:space-between;gap:20px;align-items:center}.module-title{display:flex;gap:14px;align-items:center}.module-title h1{margin:0 0 6px}.module-title p{margin:0;color:var(--muted);max-width:700px}.module-icon{width:52px;height:52px;font-size:24px}.module-progress{min-width:190px}.module-progress strong{display:block;text-align:right;margin-bottom:6px}.breadcrumb{display:flex;gap:7px;flex-wrap:wrap;align-items:center;color:#7d8697;font-size:12px;margin:3px 0 15px}.breadcrumb a{color:#5d5edc;font-weight:700}.node-list{display:grid;gap:10px}.node-row{background:white;border:1px solid var(--line);border-radius:14px;padding:13px 14px;display:flex;gap:12px;align-items:center}.node-row:hover{box-shadow:var(--shadow-sm)}.node-dot{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#f1f2ff;color:#5355d7;font-weight:900;flex:0 0 auto}.node-row.done .node-dot{background:#eaf8ef;color:var(--success)}.node-row.locked{opacity:.6}.node-main{min-width:0;flex:1}.node-main strong{display:block}.node-main p{margin:3px 0 0;color:var(--muted);font-size:12px}.node-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}.node-actions{display:flex;gap:7px;align-items:center}.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px}.stack{display:grid;gap:14px}.content-card{padding:18px}.content-card h2,.content-card h3{margin:0 0 10px}.content-card p{color:#5e6778}.bullet-list{display:grid;gap:8px;padding:0;margin:0;list-style:none}.bullet-list li{display:flex;gap:9px;align-items:flex-start}.bullet-list li:before{content:"•";color:var(--brand);font-weight:900}.checklist{display:grid;gap:7px}.check-row{display:flex;gap:10px;align-items:flex-start;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fbfcfe}.check-row input{margin-top:2px}.tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tool-card{border:1px solid var(--line);border-radius:13px;padding:14px;background:#fff}.tool-card h4{margin:0 0 6px}.tool-card p{margin:0 0 11px;color:var(--muted);font-size:12px}.source-list{display:grid;gap:9px}.source-card{border:1px solid var(--line);border-radius:12px;padding:12px}.source-card strong{display:block}.source-card small{color:var(--muted)}.doc-list{display:grid;gap:8px}.doc-row{display:flex;justify-content:space-between;gap:10px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:10px}.doc-row small{display:block;color:var(--muted)}
.graph-stage,.graph-preview{background:linear-gradient(#fbfcff,#f6f8fc);border:1px solid var(--line);border-radius:20px;min-height:520px;position:relative;overflow:hidden}.graph-preview{min-height:340px}.graph-toolbar{position:absolute;top:14px;left:14px;z-index:4;background:white;border:1px solid var(--line);border-radius:11px;padding:4px;display:flex;gap:3px}.graph-toolbar button{border:0;background:transparent;padding:7px 9px;border-radius:8px;color:var(--muted);font-size:11px;font-weight:800}.graph-toolbar button.active{background:var(--brand-soft);color:#4c46ce}.graph-canvas{position:absolute;inset:0}.graph-node{position:absolute;transform:translate(-50%,-50%);z-index:3;min-width:126px;max-width:190px;padding:11px 12px;border:1px solid #dde1eb;border-radius:14px;background:#fff;box-shadow:0 9px 22px rgba(34,42,62,.08);text-align:center}.graph-node:hover{box-shadow:var(--shadow);transform:translate(-50%,-50%) scale(1.02)}.graph-node.user{background:#111827;color:white;border-color:#111827}.graph-node.current{border:2px solid var(--brand);box-shadow:0 0 0 5px rgba(91,92,226,.10),var(--shadow)}.graph-node small{display:block;color:#7b8494;font-size:10px;margin-top:3px}.graph-node.user small{color:#ccd1de}.graph-node .graph-icon{font-size:17px;margin-bottom:3px}.graph-lines{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}.graph-lines line{stroke:#cfd5e1;stroke-width:1.5}.graph-level-label{position:absolute;left:18px;color:#9aa2b1;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.graph-empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field{display:grid;gap:6px}.field label{font-size:12px;font-weight:750;color:#596174}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);background:white;border-radius:10px;padding:10px 11px;color:var(--ink);outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#9b93f6;box-shadow:0 0 0 3px rgba(91,92,226,.10)}.result-box{margin-top:14px;padding:15px;border:1px solid var(--line);background:#f9fafc;border-radius:13px}.big{font-size:27px}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}table{border-collapse:collapse;width:100%;min-width:580px}th,td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left}th{background:#f7f8fb;font-size:11px;color:#626b7c}td{font-size:12px}.quiz-option{display:block;width:100%;text-align:left;border:1px solid var(--line);background:#fff;border-radius:11px;padding:11px 12px;margin:8px 0}.quiz-option:hover{border-color:#b8b8f8}.quiz-option.correct{background:#ebf8ef;border-color:#86d49d}.quiz-option.wrong{background:#fff0f0;border-color:#f1a4a4}.quiz-option:disabled{cursor:default;color:inherit}.quiz-progress{display:flex;justify-content:space-between;gap:10px;margin-bottom:12px;color:var(--muted);font-size:12px}.quiz-timer{font-variant-numeric:tabular-nums;font-weight:800;color:#4647bd}.conversation-card{padding:15px;border-radius:13px;background:#f7f8fb}.conversation-card blockquote{margin:0;font-size:17px;font-weight:750}.conversation-card textarea{margin-top:12px;width:100%;border:1px solid var(--line);border-radius:10px;padding:10px}.timeline{display:grid;gap:10px}.timeline-item{display:grid;grid-template-columns:30px 1fr;gap:10px}.timeline-index{width:30px;height:30px;border-radius:50%;background:var(--brand-soft);display:grid;place-items:center;color:#4c46ce;font-weight:800}.timeline-item h4{margin:0 0 3px}.timeline-item p{margin:0;color:var(--muted);font-size:12px}
.assistant-drawer{position:fixed;right:0;top:0;bottom:0;width:min(420px,94vw);z-index:70;background:white;box-shadow:-18px 0 42px rgba(27,34,49,.14);transform:translateX(105%);transition:.22s ease;display:grid;grid-template-rows:auto auto 1fr auto}.assistant-drawer.open{transform:none}.drawer-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.25);z-index:65;opacity:0;pointer-events:none;transition:.2s}.drawer-backdrop.show{opacity:1;pointer-events:auto}.drawer-head{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid var(--line)}.drawer-title{display:flex;gap:10px;align-items:center}.drawer-title small{display:block;color:var(--muted)}.assistant-orb{width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,var(--brand),#8f7df5);color:white;display:grid;place-items:center}.context-chip{margin:12px 14px 0;background:var(--brand-soft);color:#5048cc;padding:9px 10px;border-radius:10px;font-size:11px}.assistant-thread{padding:14px;overflow:auto;display:grid;gap:10px;align-content:start}.message{padding:10px 12px;border-radius:13px;max-width:88%;white-space:pre-wrap}.message.bot{background:#f1f3f7}.message.user{background:#5b5ce2;color:#fff;margin-left:auto}.assistant-composer{border-top:1px solid var(--line);padding:10px;display:flex;gap:7px;align-items:flex-end}.assistant-composer textarea{flex:1;border:1px solid var(--line);border-radius:11px;padding:10px;resize:none;max-height:120px}.attach-btn,.send-btn{width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:#fff}.send-btn{background:var(--brand);color:white;border-color:var(--brand)}
.notification-panel{position:fixed;right:18px;top:58px;width:min(380px,calc(100vw - 24px));z-index:60;background:white;border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow);padding:10px;display:none}.notification-panel.open{display:block}.notification-item{padding:11px;border-radius:11px}.notification-item:hover{background:#f6f7fb}.notification-item strong{display:block}.notification-item p{margin:3px 0;color:var(--muted);font-size:12px}.modal-layer{position:fixed;inset:0;background:rgba(17,24,39,.33);z-index:80;display:none;padding:7vh 18px;overflow:auto}.modal-layer.open{display:block}.command-modal,.generic-modal{margin:0 auto;background:white;border-radius:16px;box-shadow:var(--shadow);border:1px solid var(--line)}.command-modal{max-width:760px;overflow:hidden}.generic-modal{max-width:780px;padding:20px}.modal-head{display:flex;justify-content:space-between;gap:12px;align-items:start;margin-bottom:14px}.modal-head h2{margin:0}.command-input-wrap{display:flex;gap:10px;align-items:center;padding:14px;border-bottom:1px solid var(--line)}.command-input-wrap input{border:0;outline:0;flex:1;font-size:16px}.command-input-wrap kbd{font-size:10px;color:var(--muted)}.command-results{max-height:65vh;overflow:auto;padding:7px}.command-result{display:flex;gap:10px;align-items:center;padding:10px;border-radius:10px}.command-result:hover{background:#f6f7fb}.command-result small{display:block;color:var(--muted)}.toast-stack{position:fixed;right:18px;bottom:18px;z-index:100;display:grid;gap:8px}.toast{background:#111827;color:white;border-radius:11px;padding:10px 13px;box-shadow:var(--shadow);max-width:340px}.mobile-nav{display:none}
.onboarding{max-width:760px;margin:20px auto}.onboarding-card{padding:24px}.stepper{display:flex;gap:6px;margin-bottom:18px}.stepper i{height:6px;flex:1;border-radius:999px;background:#e8eaf0}.stepper i.active{background:var(--brand)}.choice-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.choice{border:1px solid var(--line);border-radius:12px;padding:13px;background:white;text-align:left}.choice.selected{border-color:#8d84f4;background:var(--brand-soft)}
@media (max-width:1180px){:root{--sidebar:78px}.topbar{grid-template-columns:78px minmax(280px,560px) 1fr}.brand>span:last-child{display:none}.side-nav a,.sidebar-bottom a{justify-content:center}.side-nav a span:last-child,.sidebar-bottom a span:last-child{display:none}.profile-mini{display:none}.content-grid{grid-template-columns:minmax(0,1fr) 300px}.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}.graph-node{min-width:115px;max-width:150px;font-size:12px}}
@media (max-width:900px){:root{--topbar:62px}.topbar{grid-template-columns:42px 1fr auto;padding:0 12px}.brand{width:42px}.brand strong,.brand small{display:none}.global-search{margin-left:8px}.global-search kbd{display:none}.assistant-quick span:last-child{display:none}.assistant-quick{width:38px;padding:0}.sidebar{display:none}.main{margin-left:0;padding:calc(var(--topbar) + 18px) 18px 86px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;height:68px;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-top:1px solid var(--line);z-index:45;display:grid;grid-template-columns:repeat(5,1fr);padding-bottom:env(safe-area-inset-bottom)}.mobile-nav a,.mobile-nav button{border:0;background:transparent;display:grid;place-items:center;align-content:center;gap:2px;color:#6b7385}.mobile-nav .active{color:var(--brand)}.mobile-nav small{font-size:9px}.page-head{align-items:flex-start}.content-grid{grid-template-columns:1fr}.module-hero{align-items:flex-start;flex-direction:column}.module-progress{width:100%;min-width:0}.graph-stage{min-height:580px}.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:620px){.topbar{grid-template-columns:42px minmax(0,1fr) auto}.global-search span:nth-child(2){font-size:12px}.top-actions{gap:5px}.top-actions .icon-btn{display:none}.main{padding-left:12px;padding-right:12px}.page-head{display:block}.page-actions{margin-top:12px}.page-head h1{font-size:27px}.hero{padding:23px 20px}.hero h1{font-size:31px}.cols-4,.cols-3,.cols-2,.form-grid,.choice-grid{grid-template-columns:1fr}.section{margin-top:20px}.node-row{align-items:flex-start}.node-actions{flex-direction:column;align-items:stretch}.node-actions .btn{width:100%}.graph-stage{min-height:650px}.graph-preview{min-height:420px}.graph-node{min-width:104px;max-width:130px;padding:9px;font-size:11px}.graph-toolbar{top:9px;left:9px}.tool-grid{grid-template-columns:1fr}.notification-panel{right:12px}.generic-modal{padding:15px}.modal-layer{padding:4vh 10px}.toast-stack{left:12px;right:12px;bottom:80px}.toast{max-width:none}.assistant-drawer{width:100vw}.brand-mark{width:31px;height:31px}.objective-card{padding:14px}.section-title h2{font-size:17px}.table-wrap{margin-left:-2px;margin-right:-2px}}
@media (max-width:380px){.global-search{padding:0 9px}.global-search span:nth-child(2){max-width:138px}.page-head h1{font-size:25px}.hero h1{font-size:28px}.btn{padding:9px 10px}.graph-node{min-width:98px;max-width:116px;font-size:10px}.mobile-nav small{font-size:8px}}
@media (max-width:620px){#openNotifications{display:inline-flex}.top-actions .avatar-btn{display:none}}

/* =========================
   Horizon V3 — visual & responsive hardening
   ========================= */
:root{
  --shadow-node:0 18px 44px rgba(28,37,54,.13),0 3px 10px rgba(28,37,54,.08);
  --shadow-node-hover:0 24px 56px rgba(28,37,54,.18),0 6px 18px rgba(28,37,54,.10);
  --mobile-nav-h:74px;
}
html,body{max-width:100%;overflow-x:hidden}
img,svg,video,canvas{max-width:100%}
button,input,select,textarea,.btn,.choice,.quiz-option{min-width:0;max-width:100%}
.btn,.choice,.quiz-option,.graph-toolbar button{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  text-align:center;
  line-height:1.2;
}
.inline-actions,.hero-actions,.page-actions,.node-actions{min-width:0;max-width:100%;flex-wrap:wrap}
.card,.action-card,.objective-card,.content-card,.node-row,.tool-card,.doc-row{min-width:0;max-width:100%}
.card *,.node-row *,.tool-card *{min-width:0}
.node-main strong,.node-main p,.objective-top h3,.objective-next,.action-card h3,.action-card p{
  overflow-wrap:anywhere;
}

/* Graph: empty canvas + floating circular nodes, not diagram cards */
.graph-stage,.graph-preview{
  isolation:isolate;
  min-height:590px;
  overflow:hidden;
  border:0;
  border-radius:30px;
  background:
    radial-gradient(circle at 50% 48%,rgba(91,92,226,.055),transparent 25%),
    radial-gradient(circle at 17% 15%,rgba(14,165,233,.028),transparent 18%),
    radial-gradient(circle at 84% 78%,rgba(16,185,129,.026),transparent 20%),
    #fff;
  box-shadow:inset 0 0 0 1px rgba(228,231,238,.86),0 12px 35px rgba(28,37,54,.035);
}
.graph-preview{min-height:390px}
.graph-stage::before,.graph-preview::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
  background-image:radial-gradient(circle,rgba(110,118,137,.16) 1px,transparent 1.2px);
  background-size:28px 28px;
  mask-image:radial-gradient(circle at center,black 0 45%,transparent 80%);
  opacity:.16;
}
.graph-toolbar{
  top:16px;left:16px;right:auto;
  max-width:calc(100% - 32px);
  overflow:auto hidden;
  scrollbar-width:none;
  background:rgba(255,255,255,.84);
  backdrop-filter:blur(16px);
  border:1px solid rgba(226,230,238,.9);
  box-shadow:0 8px 24px rgba(23,31,47,.07);
  border-radius:999px;
  padding:5px;
}
.graph-toolbar::-webkit-scrollbar{display:none}
.graph-toolbar button{flex:0 0 auto;border-radius:999px;padding:8px 12px}
.graph-canvas{position:absolute;inset:0;z-index:1}
.graph-lines{z-index:1;overflow:visible}
.graph-link{
  fill:none;
  stroke:#d6dbe7;
  stroke-width:1.6;
  stroke-linecap:round;
  opacity:.95;
  filter:drop-shadow(0 2px 4px rgba(91,92,226,.06));
}
.graph-link-dot{fill:#b9c1d2;opacity:.75}
.graph-node{
  position:absolute;
  transform:translate(-50%,-50%);
  z-index:3;
  width:144px;
  min-width:0;
  max-width:none;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:9px;
  color:var(--ink);
  transition:transform .2s ease,filter .2s ease;
}
.graph-node:hover{transform:translate(-50%,-50%) translateY(-3px) scale(1.025);box-shadow:none;filter:none}
.graph-bubble{
  position:relative;
  width:78px;height:78px;flex:0 0 78px;
  border-radius:50%;
  display:grid;place-items:center;
  color:var(--node-color,#5b5ce2);
  background:
    radial-gradient(circle at 30% 22%,rgba(255,255,255,.98),rgba(255,255,255,.80) 34%,rgba(248,249,255,.96) 72%),
    #fff;
  border:1px solid color-mix(in srgb,var(--node-color,#5b5ce2) 18%,#e6e9f0);
  box-shadow:var(--shadow-node),inset 0 1px 0 rgba(255,255,255,.95);
}
.graph-bubble::before{
  content:"";position:absolute;inset:5px;border-radius:50%;
  border:1px solid color-mix(in srgb,var(--node-color,#5b5ce2) 15%,transparent);
  pointer-events:none;
}
.graph-bubble::after{
  content:"";position:absolute;width:20px;height:8px;border-radius:50%;left:20px;top:11px;
  background:rgba(255,255,255,.75);filter:blur(2px);transform:rotate(-20deg);pointer-events:none;
}
.graph-icon{font-size:24px;font-weight:900;line-height:1;position:relative;z-index:2}
.graph-node-copy{display:block;width:100%;max-width:144px}
.graph-node-copy strong{display:block;font-size:12px;line-height:1.22;font-weight:800;text-wrap:balance;overflow-wrap:anywhere}
.graph-node-copy small{display:block;margin-top:3px;color:#8a93a5;font-size:10px;line-height:1.2;overflow-wrap:anywhere}
.graph-node--module .graph-bubble{width:84px;height:84px;flex-basis:84px;background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--node-color) 9%,white))}
.graph-node--module .graph-icon{font-size:27px}
.graph-node--user{width:130px;gap:8px}
.graph-node--user .graph-bubble{
  width:92px;height:92px;flex-basis:92px;
  background:linear-gradient(145deg,#26334a,#0f172a);
  color:#fff;border:5px solid #fff;
  box-shadow:0 0 0 1px #dfe4ee,0 22px 48px rgba(15,23,42,.24),inset 0 1px 0 rgba(255,255,255,.18);
}
.graph-node--user .graph-icon{font-size:23px;letter-spacing:.04em}
.graph-node--user .graph-node-copy strong{font-size:13px}
.graph-node--user .graph-node-copy small{color:#7d8697}
.graph-node.current .graph-bubble{
  box-shadow:0 0 0 7px color-mix(in srgb,var(--node-color,#5b5ce2) 12%,transparent),var(--shadow-node-hover),inset 0 1px 0 rgba(255,255,255,.95);
  border-color:color-mix(in srgb,var(--node-color,#5b5ce2) 56%,#fff);
}
.graph-node.current .graph-node-copy strong{color:color-mix(in srgb,var(--node-color,#5b5ce2) 78%,#111827)}
.graph-node.locked{opacity:.62;filter:saturate(.65)}
.graph-lock{position:absolute;right:-2px;bottom:2px;width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#fff;border:1px solid #e4e7ee;box-shadow:0 4px 10px rgba(20,30,50,.12);font-size:11px;color:#6b7280}
.graph-node.level-4 .graph-bubble{width:68px;height:68px;flex-basis:68px}
.graph-node.level-4 .graph-icon{font-size:20px}
.graph-node.level-4{width:132px}
.graph-node.level-2 .graph-bubble{width:82px;height:82px;flex-basis:82px}
.graph-node.level-3 .graph-bubble{width:74px;height:74px;flex-basis:74px}
.graph-empty{font-weight:650}

/* Map page intentionally breathes: graph is the hero */
.map-page .page-head{margin-bottom:14px}
.map-page .page-head h1{font-size:30px}
.map-page .page-head p{max-width:700px}
.map-page>.section{margin-top:22px}

/* More resilient controls/cards */
.node-actions{justify-content:flex-end}
.node-actions .btn{flex:0 1 auto}
.page-actions .btn,.inline-actions .btn,.hero-actions .btn{flex:0 1 auto}
.global-search{overflow:hidden}
.global-search>*{min-width:0}
.command-result{min-width:0}
.command-result>div{min-width:0}
.command-result strong,.command-result small{overflow-wrap:anywhere}
.tool-card .btn{width:auto}

@media (max-width:1180px){
  .graph-stage{min-height:610px}
  .graph-preview{min-height:400px}
  .graph-node{width:132px}
  .graph-node-copy{max-width:132px}
  .graph-bubble{width:72px;height:72px;flex-basis:72px}
  .graph-node--module .graph-bubble{width:78px;height:78px;flex-basis:78px}
  .graph-node--user .graph-bubble{width:86px;height:86px;flex-basis:86px}
}

@media (max-width:900px){
  .main{padding-bottom:calc(var(--mobile-nav-h) + 28px)}
  .mobile-nav{height:var(--mobile-nav-h);padding-top:5px}
  .graph-stage{min-height:690px}
  .graph-preview{min-height:460px}
  .page-actions{justify-content:flex-start}
}

@media (max-width:620px){
  body{font-size:13px}
  .main{padding-left:10px;padding-right:10px;padding-top:calc(var(--topbar) + 12px);padding-bottom:calc(var(--mobile-nav-h) + 34px)}
  .topbar{padding-left:10px;padding-right:10px;gap:6px}
  .global-search{margin-left:4px;height:38px;padding:0 10px}
  .top-actions{gap:4px}
  .assistant-quick{width:36px;height:36px}
  .brand{width:36px}
  .brand-mark{width:30px;height:30px;border-radius:10px}
  .page-head{margin-bottom:14px}
  .page-head h1{font-size:25px;line-height:1.08}
  .page-head p{font-size:13px;line-height:1.45}
  .page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px;margin-top:12px}
  .page-actions .btn{width:100%;padding-inline:8px}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .hero-actions .btn{width:100%;padding-inline:8px}
  .hero-actions .btn:first-child:last-child{grid-column:1/-1}
  .inline-actions{gap:7px}
  .btn{min-height:38px;padding:9px 11px}
  .btn.small{min-height:34px;padding:7px 9px}
  .node-row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;padding:13px}
  .node-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:7px}
  .node-actions .btn{width:100%}
  .graph-stage,.graph-preview{
    min-height:760px;
    border-radius:24px;
    background:
      radial-gradient(circle at 50% 28%,rgba(91,92,226,.05),transparent 20%),
      #fff;
  }
  .graph-preview{min-height:610px}
  .graph-toolbar{top:10px;left:10px;max-width:calc(100% - 20px);padding:4px}
  .graph-toolbar button{padding:7px 10px;font-size:10px}
  .graph-node{width:112px;gap:6px}
  .graph-node-copy{max-width:112px}
  .graph-node-copy strong{font-size:10.5px;line-height:1.18}
  .graph-node-copy small{font-size:9px}
  .graph-bubble{width:60px;height:60px;flex-basis:60px;box-shadow:0 13px 28px rgba(28,37,54,.13),0 2px 7px rgba(28,37,54,.08)}
  .graph-node--module .graph-bubble{width:64px;height:64px;flex-basis:64px}
  .graph-node--user{width:112px}
  .graph-node--user .graph-bubble{width:72px;height:72px;flex-basis:72px;border-width:4px}
  .graph-node--user .graph-icon{font-size:18px}
  .graph-node.level-2 .graph-bubble{width:66px;height:66px;flex-basis:66px}
  .graph-node.level-3 .graph-bubble{width:62px;height:62px;flex-basis:62px}
  .graph-node.level-4{width:108px}
  .graph-node.level-4 .graph-bubble{width:56px;height:56px;flex-basis:56px}
  .graph-icon{font-size:18px}
  .graph-node.current .graph-bubble{box-shadow:0 0 0 5px color-mix(in srgb,var(--node-color,#5b5ce2) 12%,transparent),0 17px 34px rgba(28,37,54,.17)}
  .map-page .page-head p{display:none}
  .map-page .page-head .eyebrow{font-size:9px}
  .map-page .page-head h1{font-size:24px;margin-bottom:4px}
  .map-page .page-actions{grid-template-columns:1fr 1fr}
  .section-title{align-items:flex-start}
  .section-title h2{font-size:17px}
  .mobile-nav a,.mobile-nav button{min-width:0;padding:4px 2px}
  .mobile-nav small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .objective-card .inline-actions{display:grid;grid-template-columns:1fr 1fr}
  .objective-card .inline-actions .btn{width:100%}
  .tool-grid{grid-template-columns:1fr}
}

@media (max-width:390px){
  .global-search span:nth-child(2){font-size:11px;max-width:none}
  .hero-actions{grid-template-columns:1fr}
  .page-actions{grid-template-columns:1fr 1fr}
  .page-actions .btn{font-size:12px}
  .graph-stage{min-height:790px}
  .graph-preview{min-height:640px}
  .graph-node{width:104px}
  .graph-node-copy{max-width:104px}
  .graph-node-copy strong{font-size:10px}
  .graph-node.level-4{width:100px}
  .graph-node.level-4 .graph-bubble{width:54px;height:54px;flex-basis:54px}
  .node-actions{grid-template-columns:1fr 1fr}
}

@media (max-width:350px){
  .global-search span:nth-child(2){display:none}
  .global-search{justify-content:center;padding:0;width:42px;margin-left:auto}
  .global-search span:first-child{font-size:17px}
  .page-actions,.node-actions,.objective-card .inline-actions{grid-template-columns:1fr}
  .graph-node{width:96px}
  .graph-node-copy{max-width:96px}
  .graph-node.level-4{width:94px}
}
/* V3.1 graph hardening */
.graph-node.current{border:0!important;box-shadow:none!important;background:transparent!important}
@media (max-width:620px){
  .graph-stage,.graph-preview{min-height:var(--mobile-graph-height,650px)}
  .graph-path{min-height:var(--mobile-graph-height,610px)}
  .graph-global{min-height:var(--mobile-graph-height,760px)}
  .graph-module{min-height:var(--mobile-graph-height,620px)}
}
@media (min-width:621px) and (max-width:900px){
  .graph-node{width:108px;gap:7px}
  .graph-node-copy{max-width:108px}
  .graph-node-copy strong{font-size:10.5px;line-height:1.16}
  .graph-node-copy small{font-size:9px}
  .graph-bubble{width:64px;height:64px;flex-basis:64px}
  .graph-node--module .graph-bubble{width:70px;height:70px;flex-basis:70px}
  .graph-node--user{width:112px}
  .graph-node--user .graph-bubble{width:78px;height:78px;flex-basis:78px}
  .graph-node.level-2 .graph-bubble{width:70px;height:70px;flex-basis:70px}
  .graph-node.level-3 .graph-bubble{width:64px;height:64px;flex-basis:64px}
  .graph-node.level-4{width:104px}
  .graph-node.level-4 .graph-bubble{width:56px;height:56px;flex-basis:56px}
}

/* ============================================================
   V8 additions — API-contract pages + responsive hardening
   ============================================================ */
.btn,.choice,.quiz-option,.node-row,.command-result,.task-row{max-width:100%;overflow-wrap:anywhere;word-break:normal}
.btn{white-space:normal;text-align:center;line-height:1.2}
.page,.card,.content-card,.module-hero,.node-main,.tool-card,.field,.form-grid>*{min-width:0}
input,select,textarea{max-width:100%;width:100%}
code,pre{overflow-wrap:anywhere;white-space:pre-wrap}
.notification-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border-bottom:1px solid var(--line)}
.notification-item.read{opacity:.62}
.journey-card{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:start}.journey-icon{width:44px;height:44px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(145deg,#fff,#f0efff);box-shadow:0 10px 22px rgba(60,54,150,.12);font-size:21px;border:1px solid #e7e5ff}.journey-card h3{margin:0 0 5px}.journey-card p{margin:0 0 12px;color:var(--muted)}
.journey-path{padding:24px;display:flex;align-items:center;overflow-x:auto;gap:0}.journey-step{display:flex;align-items:center;gap:9px;min-width:150px;max-width:210px}.journey-step>div{min-width:0}.journey-step strong,.journey-step small{display:block}.journey-step small{color:var(--muted);font-size:11px}.journey-step-dot{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#fff;border:2px solid #dfe3ed;box-shadow:0 5px 12px rgba(25,35,60,.08);flex:0 0 auto;font-weight:800}.journey-step.done .journey-step-dot{background:#eaf8ef;border-color:#9ddbb0;color:#15803d}.journey-line{height:2px;min-width:34px;background:linear-gradient(90deg,#d9ddeb,#c7c8fb);margin:0 8px}
.task-list{display:grid;gap:10px}.task-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 16px}.task-check{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);font-weight:800}.task-row strong,.task-row small{display:block}.task-row small{color:var(--muted);margin-top:3px}
.timeline{position:relative;display:grid;gap:0;padding:6px 0}.timeline:before{content:"";position:absolute;left:122px;top:0;bottom:0;width:2px;background:#e0e4ed}.timeline-item{display:grid;grid-template-columns:100px 44px minmax(0,1fr);align-items:center;min-height:74px}.timeline-item time{text-align:right;color:var(--muted);font-size:12px}.timeline-item>span{width:14px;height:14px;border-radius:50%;background:#fff;border:4px solid var(--brand);justify-self:center;z-index:1;box-shadow:0 0 0 5px var(--bg)}.timeline-item>div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;box-shadow:var(--shadow-sm)}.timeline-item strong,.timeline-item small{display:block}.timeline-item small{color:var(--muted);margin-top:3px}
.range-field{display:grid;grid-template-columns:minmax(0,1fr) 48px;align-items:center;gap:8px}.range-field output{text-align:center;font-weight:800;color:var(--brand)}
.sticky-actions{position:sticky;bottom:calc(var(--mobile-nav-h,0px) + 10px);display:flex;justify-content:flex-end;padding:12px 0;z-index:5}.sticky-actions .btn{box-shadow:0 10px 30px rgba(51,47,150,.24)}
.permission-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.permission-row:last-child{border-bottom:0}.permission-row small{display:block;color:var(--muted);margin-top:3px}
.data-chips{display:flex;gap:8px;flex-wrap:wrap}.data-chip{padding:8px 10px;border:1px solid var(--line);border-radius:999px;background:#fafbfe;font-size:12px}.data-chip b{margin-right:5px;color:#4e46ce}
.metric-list{display:grid;gap:7px;margin-top:14px}.metric-list>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid var(--line)}
.agent-chip{display:flex;gap:10px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:13px;background:#fafaff;margin:12px 0}.agent-chip strong,.agent-chip small{display:block}.agent-chip small{color:var(--muted)}.fine-print{color:var(--muted);font-size:11px}
.narrow{max-width:820px}.empty{padding:20px;color:var(--muted)}

@media(max-width:1180px){.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.journey-path{align-items:stretch}.journey-step{min-width:170px}.timeline:before{left:92px}.timeline-item{grid-template-columns:70px 44px minmax(0,1fr)}}
@media(max-width:620px){
  .grid.cols-4,.grid.cols-3,.grid.cols-2{grid-template-columns:1fr}
  .journey-card{grid-template-columns:auto minmax(0,1fr)}
  .journey-path{padding:16px 12px;gap:0}.journey-step{min-width:145px;max-width:170px}.journey-line{min-width:22px;margin:0 5px}
  .task-row{grid-template-columns:auto minmax(0,1fr)}.task-row>.tag{grid-column:2}
  .timeline:before{left:25px}.timeline-item{grid-template-columns:50px minmax(0,1fr);gap:10px;min-height:86px}.timeline-item time{grid-column:2;text-align:left;font-size:10px}.timeline-item>span{grid-column:1;grid-row:1/3}.timeline-item>div{grid-column:2}
  .sticky-actions{bottom:calc(var(--mobile-nav-h) + 8px)}
  .permission-row{align-items:flex-start;flex-direction:column}.permission-row .tag{align-self:flex-start}
  .notification-panel{left:10px;right:10px;top:58px;width:auto;max-height:70vh}
  .generic-modal{width:calc(100vw - 20px);max-height:calc(100vh - 28px);overflow:auto;padding:16px}
  .command-modal{width:calc(100vw - 20px);max-height:calc(100vh - 24px)}
  .form-grid{grid-template-columns:1fr}
  table{min-width:560px}.table-wrap{overflow-x:auto;max-width:100%}
}
@media(max-width:390px){.journey-step{min-width:132px}.journey-step strong{font-size:11px}.journey-step small{font-size:9px}.journey-step-dot{width:30px;height:30px}.data-chip{width:100%;border-radius:11px}}
/* V8.1 visual hardening after screenshot review */
.tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.node-meta{align-items:center}.node-meta .tag{flex:0 0 auto}
.toast-stack{pointer-events:none;max-width:min(420px,calc(100vw - 20px))}.toast{overflow-wrap:anywhere}
@media(max-width:620px){.node-meta{gap:5px}.node-meta .tag{font-size:9px;padding:3px 6px}.toast-stack{left:10px;right:10px;bottom:calc(var(--mobile-nav-h) + 12px)}.toast{width:100%}}
/* V8.2 — mobile action layout after visual QA */
@media (max-width:620px){
  .content-grid .content-card .inline-actions,
  .content-grid aside .inline-actions{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
    gap:8px;
  }
  .content-grid .content-card .inline-actions .btn,
  .content-grid aside .inline-actions .btn{
    width:100%;
    min-width:0;
    flex:none;
  }
}
/* V8.3 — compact boolean controls must not inherit full-width form input rules */
.permission-row input[type="checkbox"],
.permission-row input[type="radio"]{
  width:18px;
  height:18px;
  max-width:18px;
  flex:0 0 18px;
  margin:0;
}

/* ============================================================
   Horizon V9 — clean JSON/API-contract application layer
   ============================================================ */
.skip-link{position:fixed;left:12px;top:-50px;z-index:1000;background:#111827;color:#fff;padding:10px 14px;border-radius:10px}.skip-link:focus{top:10px}
.muted{color:var(--muted)}.lead{font-size:16px;line-height:1.65}.big{font-size:22px}.price{display:block;font-size:30px;margin:14px 0;color:#282a66}.premium{background:#fff5e8!important;color:#a85b00!important}.success{background:#eaf8ef!important;color:#15803d!important}.warning{background:#fff5e8!important;color:#b45309!important}.error{background:#fff0f0!important;color:#a51d1d!important}.span-2{grid-column:1/-1}
.module-card{padding:17px;display:grid;gap:14px}.module-card-top{display:flex;align-items:flex-start;gap:12px}.module-card-top strong,.module-card-top small{display:block}.module-card-top small{margin-top:4px;color:var(--muted);font-size:12px}.module-card-foot{display:flex;justify-content:space-between;color:var(--brand);font-weight:750;border-top:1px solid var(--line);padding-top:10px}.module-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.module-score{display:grid;place-items:center;min-width:86px}.module-score strong{font-size:26px}.module-score small{color:var(--muted)}
.home-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:stretch}.home-layout .graph-preview{min-height:430px}.home-today{padding:18px}.home-today h2{margin:6px 0 14px}.today-item{display:flex;gap:10px;padding:11px 0;border-bottom:1px solid var(--line)}.today-item>span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);font-weight:800;flex:0 0 auto}.today-item strong,.today-item small{display:block}.today-item small{color:var(--muted);font-size:11px;margin-top:3px}.home-today>.btn{width:100%;margin-top:14px}
.node-status-row{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}.content-section{margin-top:24px}.content-section h2{font-size:18px}.compact .node-row{padding:10px 11px}.side-card{margin-bottom:14px}.mini-row,.source-row{display:flex;align-items:flex-start;gap:9px;padding:9px 0;border-bottom:1px solid var(--line)}.mini-row:last-child,.source-row:last-child{border-bottom:0}.mini-row strong,.mini-row small,.source-row strong{display:block}.mini-row small{color:var(--muted);font-size:11px}.source-row span{font-size:9px;border:1px solid var(--line);border-radius:999px;padding:3px 6px;background:#f7f8fb;flex:0 0 auto}.prerequisite-banner{padding:15px 17px;display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px;border-color:#f2d9a6;background:#fffaf0}.prerequisite-banner p{margin:4px 0 0;color:#7f6840}.related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.related-card{padding:11px;border:1px solid var(--line);border-radius:11px;background:#fbfcff}.related-card span,.related-card strong{display:block}.related-card span{font-size:9px;text-transform:uppercase;color:var(--muted);letter-spacing:.06em}.related-card strong{margin-top:3px;font-size:12px}
.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-card{display:flex;text-align:left;align-items:flex-start;gap:11px;width:100%;cursor:pointer}.tool-card:hover{border-color:#c9c8f4;background:#fbfaff}.tool-card>div{min-width:0}.tool-card strong,.tool-card small,.tool-card em{display:block}.tool-card small{margin-top:4px;color:var(--muted);font-size:11px}.tool-card em{margin-top:7px;font-size:9px;font-style:normal;color:#a85b00}.tool-icon{width:34px;height:34px;border-radius:10px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;flex:0 0 auto;font-weight:900}.tool-run{margin-top:14px}.result-box{margin-top:14px;padding:15px;border:1px solid var(--line);border-radius:13px;background:#fafbfe}.paywall{text-align:center;padding:12px}.paywall p{color:var(--muted);max-width:460px;margin:9px auto}.paywall .inline-actions{justify-content:center}.json-preview{background:#121827;color:#d8e0ef;padding:13px;border-radius:12px;max-height:380px;overflow:auto;font-size:11px}
.quiz-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;margin:14px 0}.quiz-question{font-size:19px;line-height:1.4}.quiz-options{display:grid;gap:9px}.quiz-option{display:flex;gap:10px;align-items:center;width:100%;text-align:left;padding:12px;border:1px solid var(--line);background:#fff;border-radius:12px}.quiz-option>span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#f2f3f8;font-weight:800;flex:0 0 auto}.quiz-option.correct{border-color:#9ddbb0;background:#effaf2}.quiz-option.wrong{border-color:#efb4b4;background:#fff3f3}.quiz-feedback{margin-top:12px;padding:13px;border-radius:12px}.quiz-feedback.ok{background:#effaf2}.quiz-feedback.bad{background:#fff4ef}.quiz-feedback p{margin:5px 0 11px}.score-box{display:flex;align-items:center;gap:18px}.score-ring{width:84px;height:84px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--brand) 0 76%,#eceef4 76%);box-shadow:inset 0 0 0 9px #fff;border:1px solid var(--line);font-size:20px;font-weight:900;flex:0 0 auto}.mastery-row{display:grid;grid-template-columns:180px minmax(0,1fr);align-items:center;gap:14px;padding:8px 0}.mastery-row .progress-line{margin:0}
.comparison-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.comparison-picker label,.planner-item{display:flex;align-items:center;gap:8px;padding:10px 11px;border:1px solid var(--line);border-radius:10px}.comparison-table th:first-child{position:sticky;left:0;background:#fff;z-index:1}.doc-audit-list,.planner-list,.record-grid{display:grid;gap:8px;margin:12px 0}.audit-item{display:flex;gap:10px;align-items:center;padding:10px;border:1px solid #f1c6c6;background:#fff8f8;border-radius:10px}.audit-item.ok{border-color:#b8dfc3;background:#f3fbf5}.audit-item>span{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#fff;font-weight:900}.audit-item strong,.audit-item small{display:block}.audit-item small{color:var(--muted)}.record-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.record-card{border:1px solid var(--line);border-radius:12px;background:#fff;padding:12px;text-align:left}.record-card strong,.record-card small{display:block}.record-card small{color:var(--muted);margin-top:4px}.record-detail .btn{margin-top:12px}
.conversation-card blockquote{margin:10px 0 14px;padding:14px;border-left:3px solid var(--brand);background:#f7f7ff;border-radius:0 12px 12px 0;font-size:16px}.conversation-card textarea{width:100%}
.objective-next{min-height:38px}.document-card{padding:16px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center}.document-card p,.document-card .btn{grid-column:1/-1}.document-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#f0f1ff;color:var(--brand)}.document-card strong,.document-card small{display:block}.document-card small{color:var(--muted)}
.service-mini{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.service-mini:last-child{border-bottom:0}.service-mini strong,.service-mini small{display:block}.service-mini small{font-size:10px;color:var(--muted)}.service-card{padding:17px}.service-card h3{margin:12px 0 4px}.service-card p{margin:0 0 13px}.partner-card .tag{margin-bottom:12px}.price-card{padding:20px}.price-card h2{font-size:20px}.price-card ul{padding-left:18px;color:var(--muted);min-height:90px}
.assistant-page{padding:18px}.assistant-thread.embedded{height:auto;max-height:500px}.message small{display:block;margin-top:5px;font-size:9px;opacity:.65}
.auth-page,.onboarding{padding-top:30px}.onboarding-progress{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;margin-bottom:12px}.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:18px 0}.choice{padding:13px;border:1px solid var(--line);border-radius:12px;background:#fff;text-align:left}.choice.selected{border-color:var(--brand);background:var(--brand-soft);color:#423bb5}.onboarding-actions{margin-top:18px;justify-content:space-between}.profile-section{margin-bottom:14px}.compact-select{width:auto;min-width:180px}
.public-page{min-height:100vh;background:linear-gradient(180deg,#fbfcff,#f3f6fb);margin:-90px -28px -54px;padding:110px max(28px,calc((100vw - 1320px)/2)) 70px}.landing-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(420px,.9fr);gap:60px;align-items:center;min-height:660px}.landing-hero h1{font-size:64px;line-height:1.02;margin:14px 0;letter-spacing:-.045em}.landing-hero h1 em{font-style:normal;color:var(--brand)}.landing-hero p{font-size:18px;color:var(--muted);max-width:650px}.landing-orbit{height:520px;position:relative}.landing-user,.landing-node{position:absolute;display:grid;place-items:center;border-radius:50%;background:#fff;box-shadow:0 22px 50px rgba(31,38,64,.13);border:1px solid #e2e6ef}.landing-user{width:120px;height:120px;left:50%;top:50%;transform:translate(-50%,-50%);background:#172033;color:#fff;font-weight:900}.landing-node{width:92px;height:92px;color:var(--c);font-size:25px}.landing-node small{position:absolute;top:100%;margin-top:7px;color:var(--ink);font-size:11px;width:120px;text-align:center;font-weight:700}.landing-node.n0{left:12%;top:15%}.landing-node.n1{right:9%;top:14%}.landing-node.n2{right:2%;top:55%}.landing-node.n3{right:29%;bottom:4%}.landing-node.n4{left:6%;bottom:18%}.landing-node.n5{left:34%;top:2%}.landing-features{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.landing-features article{display:flex;gap:9px;align-items:center;padding:17px;background:#fff;border:1px solid var(--line);border-radius:15px}.landing-features span{color:var(--brand)}
.graph-lines path{fill:none;stroke:#d6dbe7;stroke-width:1.6;stroke-linecap:round;filter:drop-shadow(0 2px 4px rgba(91,92,226,.06))}.graph-check{position:absolute;right:-2px;bottom:1px;width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#eaf8ef;border:1px solid #a9d7b6;color:#15803d;font-size:11px;font-style:normal;font-weight:900}.graph-lock{font-style:normal}.graph-stage,.graph-preview{background:radial-gradient(circle at 15% 15%,rgba(91,92,226,.025) 0 1px,transparent 2px) 0 0/26px 26px,#fbfcff}.graph-canvas{min-height:inherit}.graph-node{will-change:left,top,transform}

@media(max-width:1180px){.home-layout{grid-template-columns:minmax(0,1fr) 260px}.landing-hero{grid-template-columns:1fr 420px;gap:28px}.landing-hero h1{font-size:52px}.landing-features{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.home-layout{grid-template-columns:1fr}.home-today{display:none}.landing-hero{grid-template-columns:1fr}.landing-orbit{height:430px}.landing-hero h1{font-size:48px}.public-page{margin-top:-82px}.content-grid{grid-template-columns:1fr}.side-card{margin-bottom:12px}}
@media(max-width:620px){.public-page{margin:-78px -12px -80px;padding:98px 14px 100px}.landing-hero{min-height:0;gap:20px}.landing-hero h1{font-size:40px}.landing-hero p{font-size:15px}.landing-orbit{height:380px}.landing-user{width:95px;height:95px}.landing-node{width:70px;height:70px;font-size:20px}.landing-node small{width:100px;font-size:9px}.landing-features{grid-template-columns:1fr}.related-grid,.comparison-picker,.record-grid,.tool-grid{grid-template-columns:1fr}.document-card{grid-template-columns:auto minmax(0,1fr)}.document-card>.tag{grid-column:2;justify-self:start}.score-box{align-items:flex-start;flex-direction:column}.mastery-row{grid-template-columns:1fr}.prerequisite-banner{align-items:flex-start;flex-direction:column}.prerequisite-banner .btn{width:100%}.module-actions{display:grid;grid-template-columns:1fr}.module-actions .btn{width:100%}.choice-grid{grid-template-columns:1fr}.onboarding-actions{display:grid;grid-template-columns:1fr 1fr}.page-actions{width:100%}.page-actions .btn,.page-actions select{min-width:0}.price-card ul{min-height:0}.graph-stage,.graph-preview{min-height:var(--mobile-graph-height,680px)}.graph-toolbar{max-width:calc(100% - 18px)} }
@media(max-width:390px){.landing-hero h1{font-size:34px}.landing-orbit{height:350px}.landing-node{width:64px;height:64px}.onboarding-actions{grid-template-columns:1fr}.node-actions{display:grid;grid-template-columns:1fr}.node-actions .btn{width:100%}.document-card{grid-template-columns:1fr}.document-card>.tag{grid-column:1}.document-icon{display:none}.compact-select{width:100%;min-width:0}}
/* V9 final responsive/text hardening */
.tag{white-space:nowrap;overflow:visible;text-overflow:clip;max-width:none;flex:0 0 auto}
.node-meta{display:flex;gap:6px;flex-wrap:wrap;min-width:0}
.choice-grid.compact{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.choice-check{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:12px;min-width:0}
.choice-check input{flex:0 0 auto}
@media(max-width:390px){.tag{font-size:8.5px;padding:3px 5px}.node-meta{gap:4px}}
.node-meta .tag,.node-status-row .tag{width:max-content!important;min-width:max-content!important;max-width:100%!important}

/* ============================================================
   Horizon V10 — visual/interaction corrections after mobile review
   ============================================================ */

/* Generic icon treatment */
.top-actions svg,.assistant-quick svg,.icon-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.assistant-quick svg{fill:currentColor;stroke:none;width:16px;height:16px}

/* Notifications: compact, dismissible, non-blocking */
.notification-backdrop{position:fixed;inset:0;z-index:54;background:rgba(17,24,39,.12);backdrop-filter:blur(1px);opacity:0;pointer-events:none;transition:.18s ease}
.notification-backdrop.open{opacity:1;pointer-events:auto}
.notification-panel{right:18px;top:58px;width:min(410px,calc(100vw - 24px));z-index:61;padding:0;overflow:hidden;border-radius:18px;box-shadow:0 24px 70px rgba(20,27,45,.20);border:1px solid rgba(221,226,236,.95);background:#fff}
.notification-panel.open{display:block;animation:notifIn .16s ease-out}
@keyframes notifIn{from{opacity:0;transform:translateY(-8px) scale(.985)}to{opacity:1;transform:none}}
.notification-head{padding:14px 14px 12px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#fff,#fbfcff)}
.notification-head>div:first-child strong{display:block;font-size:15px}.notification-head>div:first-child small{display:block;margin-top:2px;color:var(--muted);font-size:10px}
.notification-head-actions{display:flex;align-items:center;gap:6px}.notification-head-actions .ghost{background:#f7f8fb}
.notification-close{width:32px;height:32px;min-height:32px;border-radius:9px;font-size:20px;line-height:1}
.notification-list{max-height:min(520px,65vh);overflow:auto;padding:8px}
.notification-item{appearance:none;-webkit-appearance:none;width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) 18px;align-items:center;gap:10px;text-align:left;border:0!important;outline:0;background:transparent!important;padding:11px 9px!important;border-radius:12px!important;box-shadow:none!important;color:var(--ink)}
.notification-item:hover{background:#f7f8fb!important}.notification-item:focus-visible{box-shadow:0 0 0 3px rgba(91,92,226,.16)!important}
.notification-item+.notification-item{border-top:1px solid #f0f2f6!important;border-radius:0!important}.notification-item.read{opacity:.58}.notification-item.read:hover{opacity:.82}
.notification-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#f0efff;color:#534bd1;font-weight:900}.severity-warning .notification-icon{background:#fff3df;color:#a75a00}.severity-success .notification-icon{background:#eaf8ef;color:#15803d}
.notification-copy{min-width:0}.notification-copy strong,.notification-copy small{display:block}.notification-copy strong{font-size:12px}.notification-copy small{font-size:10.5px;color:var(--muted);line-height:1.38;margin-top:3px;overflow-wrap:anywhere}.notification-arrow{font-size:20px;color:#a2a8b5;text-align:center}
.notification-empty{padding:26px 20px;text-align:center;color:var(--muted)}.notification-empty>span{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;margin:0 auto 8px;background:#eaf8ef;color:#15803d;font-weight:900}.notification-empty strong,.notification-empty small{display:block}.notification-empty strong{color:var(--ink);margin-bottom:3px}
.notification-badge{position:absolute;right:-4px;top:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#f59e0b;color:#fff;border:2px solid #fff;font-size:8px;line-height:13px;text-align:center;display:none;font-weight:900}.notification-badge.show{display:block}.icon-btn #notificationDot{display:none!important}
body.notifications-open{overflow-x:hidden}

/* Context/back navigation */
.context-nav,.graph-context-nav{display:flex;align-items:center;gap:12px;min-width:0;margin-bottom:12px}
.context-back,.graph-back{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;min-height:34px;padding:7px 10px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:11px;font-weight:800;color:#4e5668;box-shadow:0 3px 10px rgba(28,37,54,.035)}
.context-back:hover,.graph-back:hover{border-color:#c8ccda;background:#fafbff}
.breadcrumb,.graph-breadcrumb{display:flex;align-items:center;gap:7px;min-width:0;overflow:auto hidden;scrollbar-width:none;color:#838b9b;font-size:10.5px;white-space:nowrap}.breadcrumb::-webkit-scrollbar,.graph-breadcrumb::-webkit-scrollbar{display:none}.breadcrumb a,.graph-breadcrumb a{color:#687185}.breadcrumb a:last-child,.graph-breadcrumb a.current{color:#222b3a;font-weight:800}.breadcrumb span,.graph-breadcrumb span{color:#bcc2ce}

/* Graph: keep all endpoints clearly attached to visible nodes */
.graph-stage,.graph-preview{overflow:hidden}
.graph-lines{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:visible}
.graph-link{fill:none;stroke:#d5dbe7;stroke-width:1.7;stroke-linecap:round;opacity:.95;filter:drop-shadow(0 2px 4px rgba(91,92,226,.06))}
.graph-node{z-index:3}
.graph-node-copy{padding:0 2px}
.graph-node-copy strong{hyphens:auto}
.graph-lock{font-size:10px;overflow:hidden}
.graph-current{margin-top:12px;padding:14px 15px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:13px;box-shadow:none;background:linear-gradient(180deg,#fff,#fbfcff)}
.graph-current-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:color-mix(in srgb,var(--c) 9%,white);border:1px solid color-mix(in srgb,var(--c) 20%,#e4e7ee);color:var(--c);font-weight:900;font-size:17px}.graph-current h2{margin:2px 0 3px;font-size:16px}.graph-current p{margin:0;color:var(--muted);font-size:11px;line-height:1.4}.graph-current-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}

/* Information node layout */
.node-page .context-nav{margin-bottom:14px}
.node-hero{padding:20px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;margin-bottom:14px;background:linear-gradient(135deg,#fff,#fbfbff)}
.node-hero-icon{width:66px;height:66px;border-radius:20px;display:grid;place-items:center;font-size:27px;font-weight:900;color:var(--node-color);background:color-mix(in srgb,var(--node-color) 9%,white);border:1px solid color-mix(in srgb,var(--node-color) 20%,#e6e9f0);box-shadow:0 12px 28px rgba(30,40,62,.08),inset 0 1px 0 #fff}
.node-hero-copy h1{margin:2px 0 6px;font-size:28px;line-height:1.08}.node-hero-copy>p{margin:0;color:var(--muted);max-width:760px}.node-hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;max-width:310px}
.node-overview{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:12px;margin-bottom:14px}.overview-card{padding:14px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:flex-start;box-shadow:none}.overview-primary{background:linear-gradient(135deg,#fbfbff,#f7f8ff)}.overview-icon{width:31px;height:31px;border-radius:10px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);font-weight:900}.overview-card p{margin:3px 0 0;color:#525c70;font-size:12px;line-height:1.5}.overview-card strong,.overview-card small{display:block}.overview-card small{color:var(--muted);font-size:10px;margin-top:3px}.overview-card a:hover strong{color:var(--brand)}
.node-content-main{min-width:0}.content-stack{display:grid;gap:10px}.info-block{padding:16px;display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;box-shadow:none}.info-block-index{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:#f1f2f8;color:#6b7280;font-size:10px;font-weight:900}.info-block h2{margin:1px 0 6px;font-size:16px}.info-block p{margin:0;color:#596276;line-height:1.58}.node-side{min-width:0}.side-actions{display:grid;gap:8px}.side-actions .btn{width:100%}

/* Fix oversized checkboxes/radios caused by global form width */
.choice-check input[type="checkbox"],.choice-check input[type="radio"],input[data-profile-multi],input[data-onboarding-multi],.comparison-picker input[type="checkbox"],.planner-item input[type="checkbox"]{width:18px!important;height:18px!important;max-width:18px!important;min-width:18px!important;flex:0 0 18px!important;margin:0!important;padding:0!important;accent-color:var(--brand)}
.choice-check{grid-template-columns:auto minmax(0,1fr);display:grid!important;align-items:center!important}.choice-check span{min-width:0;overflow-wrap:anywhere}

/* Keep mobile notification icon available; profile already exists in bottom nav */
@media(max-width:620px){
  .top-actions .icon-btn{display:inline-flex!important}
  .top-actions .avatar-btn{display:none}
  .top-actions{gap:5px}
  .notification-backdrop{background:rgba(17,24,39,.20)}
  .notification-panel{top:auto!important;left:8px!important;right:8px!important;bottom:calc(var(--mobile-nav-h) + 8px)!important;width:auto!important;max-height:min(58vh,480px)!important;border-radius:18px!important}
  .notification-list{max-height:calc(min(58vh,480px) - 64px)}
  .notification-head{padding:12px}.notification-item{grid-template-columns:32px minmax(0,1fr) 14px;padding:10px 8px!important}.notification-icon{width:30px;height:30px}.notification-copy strong{font-size:11.5px}.notification-copy small{font-size:10px}
  .context-nav,.graph-context-nav{gap:8px;align-items:center;margin-bottom:9px}.context-back,.graph-back{padding:7px 9px}.context-back span,.graph-back span{display:none}.breadcrumb,.graph-breadcrumb{font-size:9.5px;gap:5px}
  .graph-current{grid-template-columns:auto minmax(0,1fr);padding:12px;gap:10px}.graph-current-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;width:100%}.graph-current-actions .btn{width:100%}.graph-current p{font-size:10px}
  .node-hero{grid-template-columns:auto minmax(0,1fr);padding:14px;gap:11px}.node-hero-icon{width:52px;height:52px;border-radius:16px;font-size:21px}.node-hero-copy h1{font-size:21px}.node-hero-copy>p{font-size:11.5px}.node-hero-actions{grid-column:1/-1;width:100%;max-width:none;display:grid;grid-template-columns:1fr 1fr}.node-hero-actions .btn{width:100%}.node-hero-actions .btn:last-child:nth-child(odd){grid-column:1/-1}
  .node-overview{grid-template-columns:1fr;gap:8px}.overview-card{padding:12px}.info-block{padding:13px;grid-template-columns:28px minmax(0,1fr);gap:9px}.info-block-index{width:27px;height:27px}.info-block h2{font-size:15px}.info-block p{font-size:11.5px}
  .graph-node-copy strong{overflow-wrap:break-word}
}

@media(max-width:390px){
  .notification-head-actions .ghost{font-size:10px;padding:6px 8px}
  .graph-current-actions,.node-hero-actions{grid-template-columns:1fr}
  .node-hero-actions .btn:last-child:nth-child(odd){grid-column:auto}
}
.notification-badge{right:1px!important;top:1px!important;min-width:13px!important;height:13px!important;line-height:11px!important;padding:0 2px!important;font-size:7px!important;border-width:1px!important}
@media(max-width:620px){
  .sticky-actions{position:static!important;display:block!important;padding:14px 0 4px!important}
  .sticky-actions .btn{width:100%!important;box-shadow:none!important}
}
