/* ═══════════════════════════════════════════
   TRANSPARENT FEED — ONBOARDING CSS (v5)
   Reordered flow + UX refinements
   ═══════════════════════════════════════════ */

:root {
  --bg: #000; --surface: rgba(255,255,255,0.06); --surface-2: rgba(255,255,255,0.10);
  --surface-3: rgba(255,255,255,0.14); --border: rgba(255,255,255,0.08); --border-2: rgba(255,255,255,0.14);
  --text: #f5f5f5; --text-2: rgba(255,255,255,0.55); --text-3: rgba(255,255,255,0.35);
  --purple: #b590cc; --purple-dim: rgba(181,144,204,0.15); --purple-mid: rgba(181,144,204,0.35);
  --clr-credibility: #60a5fa; --clr-importance: #fb923c; --clr-freshness: #4ade80; --clr-interests: #a78bfa;
  --clr-diversity: #2dd4bf; --clr-publishers: #f472b6;
  --green: #4ade80; --amber: #facc15; --red: #f87171;
  --radius: 16px; --radius-sm: 10px; --radius-xs: 6px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #111; font-family: 'Inter', -apple-system, sans-serif; color: var(--text); display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; padding: 30px 20px; gap: 32px; }

/* ═══ LEGEND ═══ */
.legend-panel { position: fixed; top: 30px; left: 30px; width: 280px; background: rgba(30,30,30,0.95); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(20px); z-index: 100; }
.legend-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; } .legend-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-bottom: 12px; }
.legend-divider { height: 1px; background: var(--border-2); margin: 12px 0; } .legend-features { display: flex; flex-direction: column; gap: 10px; }
.lf-item { display: flex; gap: 10px; align-items: flex-start; } .lf-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.lf-label { font-size: 12px; font-weight: 600; display: block; } .lf-sub { font-size: 11px; color: var(--text-3); display: block; line-height: 1.4; }
.screen-counter { font-size: 12px; color: var(--purple); font-weight: 600; }

/* ═══ PHONE FRAME ═══ */
.prototype-wrapper { display: flex; justify-content: center; }
.phone-frame { width: 393px; height: 852px; background: var(--bg); border-radius: 50px; border: 3px solid #333; position: relative; overflow: hidden; box-shadow: 0 25px 80px rgba(0,0,0,0.6); }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 126px; height: 34px; background: #000; border-radius: 0 0 20px 20px; z-index: 50; }
.phone-screen { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; border-radius: 47px; }
.phone-screen::-webkit-scrollbar { display: none; }

/* ═══ SCREENS ═══ */
.screen { display: none; min-height: 100%; } .screen.active { display: flex; flex-direction: column; }

/* ═══ BACK BUTTON ═══ */
.back-btn { background: none; border: none; color: var(--purple); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; padding: 4px 0; transition: opacity 0.2s ease; }
.back-btn:hover { opacity: 0.8; }
.path-back { position: absolute; top: 56px; left: 24px; }

/* ═══ 0: WELCOME ═══ */
.welcome-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 60px 28px 40px; text-align: center; }
.welcome-brand { font-size: 14px; font-weight: 600; letter-spacing: 6px; color: var(--text-2); margin-bottom: 24px; } .brand-accent { color: var(--purple); }
.formula-viz { display: flex; gap: 4px; margin-bottom: 32px; border-radius: 999px; overflow: hidden; height: 24px; width: 200px; }
.formula-seg { flex: 1; transition: flex 1.5s ease; }
.formula-seg:nth-child(1) { background: var(--clr-credibility); } .formula-seg:nth-child(2) { background: var(--clr-importance); }
.formula-seg:nth-child(3) { background: var(--clr-freshness); } .formula-seg:nth-child(4) { background: var(--clr-interests); }
.welcome-headline { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -0.5px; margin-bottom: 12px; } .purple { color: var(--purple); }
.welcome-sub { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-bottom: 32px; max-width: 300px; }
.cta-primary { width: 100%; max-width: 300px; padding: 16px; background: var(--purple); color: #fff; border: none; border-radius: 14px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; box-shadow: 0 4px 20px rgba(181,144,204,0.25); transition: all 0.2s ease; }
.cta-primary:hover { transform: translateY(-1px); }

/* ═══ CHOOSE PATH ═══ */
.path-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 60px 24px 40px; text-align: center; position: relative; }
.path-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.path-sub { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 24px; max-width: 300px; }
.path-options { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.path-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: left; cursor: pointer; transition: all 0.2s ease; }
.path-card:hover { border-color: var(--purple-mid); background: var(--surface-2); }
.path-card-icon { font-size: 24px; margin-bottom: 8px; } .path-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.path-card-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-bottom: 8px; } .path-card-time { font-size: 11px; color: var(--text-3); font-weight: 600; }

/* ═══ EDU SCREENS ═══ */
.edu-screen { padding: 56px 20px 30px; display: flex; flex-direction: column; min-height: 100%; }
.edu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 8px; }
.edu-step { font-size: 11px; font-weight: 600; color: var(--purple); text-transform: uppercase; letter-spacing: 1px; flex: 1; text-align: center; }
.edu-skip { font-size: 11px; color: var(--text-3); background: none; border: none; cursor: pointer; font-family: inherit; }
.edu-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 8px; }
.edu-subtitle { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 20px; } .edu-subtitle strong { color: var(--text); }

/* ═══ HOW IT WORKS — Explainer Steps ═══ */
.edu-explainer { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.edu-explainer-step { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-size: 12px; line-height: 1.5; color: var(--text-2); }
.edu-explainer-step strong { color: var(--text); }
.edu-explainer-num { width: 22px; height: 22px; border-radius: 50%; background: var(--purple-dim); border: 1px solid var(--purple-mid); color: var(--purple); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Concept */
.budget-concept { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.concept-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); margin-bottom: 10px; }
.concept-example { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.concept-ex-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.concept-ex-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.concept-ex-name { width: 70px; font-weight: 500; color: var(--text-2); } .concept-ex-level { width: 32px; font-weight: 700; color: var(--text); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.concept-ex-arrow { color: var(--text-3); font-size: 10px; } .concept-ex-pct { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.concept-bar-demo { display: flex; height: 16px; border-radius: 8px; overflow: hidden; gap: 2px; margin-bottom: 10px; }
.concept-bar-seg { transition: flex 1.5s cubic-bezier(0.34,1,0.64,1); border-radius: 4px; }
.concept-line { font-size: 12px; color: var(--text-2); line-height: 1.5; text-align: center; } .concept-line strong { color: var(--text); }

/* Progress */
.progress-bar { display: flex; gap: 4px; padding: 12px 0; margin-top: auto; }
.progress-seg { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); }
.progress-seg.active { background: var(--purple); } .progress-seg.done { background: rgba(181,144,204,0.4); }
.ob-continue { width: 100%; padding: 16px; background: var(--purple); color: #fff; border: none; border-radius: 14px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; box-shadow: 0 4px 20px rgba(181,144,204,0.25); transition: all 0.2s ease; margin-top: 16px; }

/* ═══ YOUR 4 CONTROLS ═══ */
.params-edu-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; flex: 1; }
.param-edu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.param-edu-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.param-edu-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.param-edu-icon svg { width: 16px; height: 16px; }
.param-edu-name { font-size: 14px; font-weight: 700; } .param-edu-q { font-size: 11px; color: var(--text-3); line-height: 1.4; }
.param-edu-signals { display: flex; flex-direction: column; gap: 4px; padding-left: 42px; }
.param-edu-signal { font-size: 11px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.signal-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.param-edu-fwd { font-size: 10px; color: var(--purple); padding-left: 42px; margin-top: 4px; font-weight: 500; }
.bg-credibility { background: rgba(96,165,250,0.15); } .bg-importance { background: rgba(251,146,60,0.15); }
.bg-freshness { background: rgba(74,222,128,0.15); } .bg-interests { background: rgba(167,139,250,0.15); }

/* ELI5 Dropdown */
.eli5-toggle { margin-top: 6px; padding: 6px 10px; width: 100%; background: rgba(181,144,204,0.06); border: 1px solid rgba(181,144,204,0.15); border-radius: var(--radius-xs); color: var(--purple); font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: space-between; transition: all 0.2s ease; }
.eli5-toggle:hover { background: rgba(181,144,204,0.12); }
.eli5-toggle svg { transition: transform 0.3s ease; flex-shrink: 0; stroke: var(--purple); }
.eli5-toggle.open svg { transform: rotate(180deg); }
.eli5-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.eli5-content.open { max-height: 250px; padding: 10px 12px; background: rgba(181,144,204,0.04); border: 1px solid rgba(181,144,204,0.1); border-top: none; border-radius: 0 0 var(--radius-xs) var(--radius-xs); }
.eli5-content p { font-size: 12px; color: var(--text-2); line-height: 1.6; margin-bottom: 6px; } .eli5-content p:last-child { margin-bottom: 0; }
.eli5-content strong { color: var(--text); }

/* ═══ SEARCH BAR ═══ */
.search-wrap { margin-bottom: 12px; }
.search-input { width: 100%; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 13px; font-family: inherit; outline: none; transition: border-color 0.2s ease; }
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { border-color: var(--purple-mid); }
.search-add-prompt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--surface); border: 1px solid rgba(181,144,204,0.2); border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 12px; color: var(--text-3); }
.search-add-btn { padding: 6px 12px; background: var(--purple-dim); border: 1px solid var(--purple-mid); border-radius: var(--radius-xs); color: var(--purple); font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; transition: all 0.2s ease; }
.search-add-btn:hover { background: var(--purple-mid); }
.pub-no-results { padding: 16px; text-align: center; font-size: 12px; color: var(--text-3); }

/* ═══ TOPICS (Row List) ═══ */
.topic-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; flex: 1; }
.topic-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; transition: all 0.25s ease; }
.topic-row.hidden { display: none; }
.topic-row.custom { border-style: dashed; border-color: var(--purple-mid); }
.topic-row-emoji { font-size: 20px; flex-shrink: 0; }
.topic-row-name { font-size: 12px; font-weight: 600; flex: 1; min-width: 60px; }
.tri-toggle { display: flex; gap: 3px; width: 100%; margin-top: 4px; }
.tri-opt { flex: 1; padding: 5px 2px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text-3); font-size: 9px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s ease; }
.tri-opt[data-level="low"].active-topic { background: rgba(248,113,113,0.15); border-color: rgba(248,113,113,0.3); color: #f87171; }
.tri-opt[data-level="mod"].active-topic { background: rgba(250,204,21,0.15); border-color: rgba(250,204,21,0.3); color: #facc15; }
.tri-opt[data-level="high"].active-topic { background: rgba(74,222,128,0.15); border-color: rgba(74,222,128,0.3); color: #4ade80; }

/* ═══ PUBLISHERS ═══ */
.publisher-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; flex: 1; }
.pub-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; transition: all 0.25s ease; }
.pub-row.hidden { display: none; }
.pub-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 800; flex-shrink: 0; }
.pub-name { font-size: 12px; font-weight: 600; flex: 1; min-width: 60px; }
.pub-info-btn { background: none; border: none; font-size: 14px; cursor: pointer; padding: 2px 4px; opacity: 0.5; transition: opacity 0.2s ease; flex-shrink: 0; }
.pub-info-btn:hover { opacity: 1; }
.pub-info-btn.open { opacity: 1; }
.pub-pref-toggle { display: flex; gap: 3px; width: 100%; margin-top: 4px; }
.pub-info { display: none; width: 100%; margin-top: 6px; padding: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius-xs); }
.pub-info.open { display: block; }
.pub-info-grid { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.pub-info-item { font-size: 10px; color: var(--text-2); } .pub-info-item b { color: var(--text); font-weight: 600; }
.pub-info-about { font-size: 10px; color: var(--text-3); line-height: 1.5; margin: 0; font-style: italic; }
.pub-opt { flex: 1; padding: 5px 2px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text-3); font-size: 9px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s ease; white-space: nowrap; }
.pub-opt.active-fav { background: rgba(74,222,128,0.15); border-color: rgba(74,222,128,0.3); color: #4ade80; }
.pub-opt.active-neutral { background: rgba(255,255,255,0.06); border-color: var(--border-2); color: var(--text-2); }
.pub-opt.active-dislike { background: rgba(250,204,21,0.12); border-color: rgba(250,204,21,0.3); color: #facc15; }
.pub-opt.active-blocked { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.3); color: #f87171; }

/* ═══ BUILD / SET PRIORITIES ═══ */
.build-screen { padding: 56px 16px 30px; }
.ob-formula-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; position: sticky; top: -10px; z-index: 10; backdrop-filter: blur(20px); }
.ob-formula-bar-wrap { width: 100%; height: 12px; border-radius: 6px; overflow: hidden; display: flex; background: rgba(255,255,255,0.04); margin-bottom: 10px; }
.ob-formula-bar-seg { height: 100%; transition: width 0.5s cubic-bezier(0.34,1,0.64,1); }
.ob-formula-weights { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.ob-fw-item { font-size: 10px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.ob-fw-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ob-fw-item strong { font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; transition: color 0.3s ease; }
.ob-formula-status { font-size: 11px; color: var(--text-2); font-weight: 500; font-style: italic; }

/* Presets */
.ob-preset-bar { display: flex; gap: 6px; margin-bottom: 12px; }
.ob-preset-pill { flex: 1; padding: 8px 4px; border-radius: var(--radius-xs); background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 11px; font-weight: 600; text-align: center; cursor: pointer; font-family: inherit; transition: all 0.25s ease; }
.ob-preset-pill:hover { background: var(--surface-2); }
.ob-preset-pill.active { background: var(--purple-dim); border-color: var(--purple-mid); color: var(--purple); }

/* Param cards */
.ob-param-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; transition: border-color 0.3s ease; }
.ob-param-card:hover { border-color: var(--border-2); }
.ob-param-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ob-param-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .ob-param-icon svg { width: 16px; height: 16px; }
.ob-param-info { flex: 1; } .ob-param-name { font-size: 13px; font-weight: 700; letter-spacing: -0.2px; }
.ob-param-desc { font-size: 10px; color: var(--text-3); line-height: 1.3; }
.ob-param-weight { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; transition: all 0.3s ease; }

/* ═══ IMPORTANCE SELECTOR ═══ */
.importance-selector { display: flex; gap: 4px; margin-bottom: 8px; }
.importance-selector.sub { margin-bottom: 0; }
.imp-btn { flex: 1; padding: 9px 2px; border-radius: var(--radius-xs); border: 1px solid var(--border); background: transparent; color: var(--text-3); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; cursor: pointer; font-family: inherit; transition: all 0.25s ease; text-align: center; }
.imp-btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.imp-btn.filled { opacity: 0.65; } .imp-btn.selected { opacity: 1; transform: scale(1.02); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }

/* ═══ RUBRIC TOGGLE ═══ */
.ob-rubric-toggle { margin-top: 4px; padding: 6px 10px; width: 100%; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text-3); font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: space-between; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s ease; }
.ob-rubric-toggle:hover { background: rgba(255,255,255,0.05); }
.ob-rubric-toggle svg { transition: transform 0.3s ease; flex-shrink: 0; } .ob-rubric-toggle.open svg { transform: rotate(180deg); }
.ob-rubric-content { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; }
.ob-rubric-content.open { max-height: 400px; padding: 10px 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-xs) var(--radius-xs); }

/* ═══ RUBRIC TABLE ═══ */
.rubric-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.rubric-table th { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); font-weight: 600; }
.rubric-table th:last-child { text-align: right; }
.rubric-table td { font-size: 11px; color: var(--text-2); padding: 6px; border-bottom: 1px solid rgba(255,255,255,0.03); line-height: 1.4; }
.rubric-table td:first-child { font-weight: 700; white-space: nowrap; padding-left: 8px; border-left: 3px solid transparent; }
.rubric-table td:last-child { text-align: right; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.rubric-td-top { color: var(--green) !important; border-left-color: var(--green) !important; }
.rubric-td-high { color: #60a5fa !important; border-left-color: #60a5fa !important; }
.rubric-td-mid { color: var(--amber) !important; border-left-color: var(--amber) !important; }
.rubric-td-low { color: var(--red) !important; border-left-color: var(--red) !important; }

/* ═══ PSEUDO-CODE FORMULA ═══ */
.rubric-formula { background: rgba(181,144,204,0.04); border: 1px solid rgba(181,144,204,0.12); border-radius: var(--radius-xs); padding: 10px; }
.rubric-formula-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.rubric-formula-code { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 11px; color: var(--text); margin-bottom: 6px; line-height: 1.6; }
.rubric-formula-ex { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 11px; color: var(--text-2); line-height: 1.6; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.05); }
.fv { color: var(--purple); font-weight: 600; } /* formula variable */
.fo { color: var(--text-3); font-weight: 400; padding: 0 2px; } /* formula operator */
.fn { color: var(--green); font-weight: 700; } /* formula number */

/* ═══ ADVANCED SUB-SIGNALS ═══ */
.ob-advanced-toggle { margin-top: 4px; padding: 6px 10px; width: 100%; background: rgba(167,139,250,0.04); border: 1px solid rgba(167,139,250,0.12); border-radius: var(--radius-xs); color: var(--text-3); font-size: 10px; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: space-between; transition: all 0.2s ease; }
.ob-advanced-toggle:hover { background: rgba(167,139,250,0.08); }
.ob-advanced-toggle svg { transition: transform 0.3s ease; flex-shrink: 0; } .ob-advanced-toggle.open svg { transform: rotate(180deg); }
.ob-advanced-content { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; }
.ob-advanced-content.open { max-height: 220px; padding: 10px 12px; background: rgba(167,139,250,0.04); border: 1px solid rgba(167,139,250,0.12); border-top: none; border-radius: 0 0 var(--radius-xs) var(--radius-xs); }
.ob-subsignal-card { margin-bottom: 10px; }
.ob-subsignal-card:last-child { margin-bottom: 0; }
.ob-subsignal-name { font-size: 12px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.ob-subsignal-desc { font-size: 10px; color: var(--text-3); margin-bottom: 6px; }

/* Save button */
.ob-save-btn { width: 100%; padding: 16px; background: var(--purple); color: #fff; border: none; border-radius: 14px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; margin-top: 12px; box-shadow: 0 4px 20px rgba(181,144,204,0.25); transition: all 0.2s ease; }
.ob-save-btn:hover { transform: translateY(-1px); }

/* ═══ DONE ═══ */
.done-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 60px 28px 40px; text-align: center; }
.done-check { width: 64px; height: 64px; border-radius: 50%; background: rgba(74,222,128,0.12); border: 2px solid rgba(74,222,128,0.3); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.done-check svg { width: 28px; height: 28px; stroke: var(--green); }
.done-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.done-sub { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 6px; max-width: 300px; }
.done-hint { font-size: 11px; color: var(--text-3); margin-bottom: 24px; }
.done-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; width: 100%; margin-bottom: 24px; }
.done-summary-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); margin-bottom: 10px; }
.done-summary-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-bottom: 12px; background: rgba(255,255,255,0.04); }
.done-bar-seg { height: 100%; transition: width 0.5s ease; }
.done-summary-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.done-legend-item { display: flex; align-items: center; gap: 6px; }
.done-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.done-legend-label { font-size: 11px; color: var(--text-2); flex: 1; }
.done-legend-pts { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ═══ TOAST ═══ */
.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(100px); background: rgba(40,40,40,0.95); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 20px; backdrop-filter: blur(20px); z-index: 200; transition: transform 0.4s cubic-bezier(0.34,1.2,0.64,1); pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); } .toast-text { font-size: 13px; color: var(--text); white-space: nowrap; }
@media (max-width: 800px) { .legend-panel { display: none; } body { padding: 10px; } }
