:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #fff;
  --surface-muted: #f0f2ee;
  --text: #17201a;
  --muted: #737c76;
  --line: #dfe4df;
  --green: #39745a;
  --green-strong: #24583f;
  --green-soft: #e4f1e8;
  --amber: #c59148;
  --locked: #a9b0ab;
  --shadow: 0 18px 50px rgba(35, 52, 41, 0.09);
  --sidebar: rgba(249, 250, 247, 0.92);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101411;
  --surface: rgba(27, 33, 29, 0.88);
  --surface-solid: #1b211d;
  --surface-muted: #222a25;
  --text: #edf3ee;
  --muted: #98a49c;
  --line: #303a33;
  --green: #68a982;
  --green-strong: #9ac9aa;
  --green-soft: #203a2b;
  --amber: #d3a862;
  --locked: #68736c;
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.28);
  --sidebar: rgba(17, 22, 18, 0.94);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px 18px; border-right: 1px solid var(--line); background: var(--sidebar); backdrop-filter: blur(24px); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: none; font-weight: 720; font-size: 19px; cursor: pointer; padding: 4px 8px 24px; }
.brand-mark { width: 29px; height: 29px; position: relative; display: block; }
.brand-mark span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.brand-mark span:nth-child(1) { left: 9px; top: 0; }
.brand-mark span:nth-child(2) { left: 1px; bottom: 2px; }
.brand-mark span:nth-child(3) { right: 1px; bottom: 2px; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; height: 2px; width: 14px; background: var(--green); top: 15px; left: 7px; transform: rotate(55deg); transform-origin: left center; }
.brand-mark::after { transform: rotate(125deg); transform-origin: right center; }
.nav { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 0; background: transparent; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 12px; cursor: pointer; color: var(--muted); text-align: left; transition: .18s ease; }
.nav-item:hover { background: var(--surface-muted); color: var(--text); }
.nav-item.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 3px 12px rgba(24, 40, 30, .05); }
.nav-icon { font-size: 20px; width: 22px; text-align: center; }
.sidebar-spacer { flex: 1; }
.goal-mini { padding: 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 15px; margin: 16px 0; }
.goal-mini-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.goal-mini strong { display: block; font-size: 13px; line-height: 1.35; }
.mini-progress { height: 5px; border-radius: 10px; background: var(--surface-muted); overflow: hidden; margin: 12px 0 7px; }
.mini-progress span { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .4s ease; }
.goal-mini small { color: var(--muted); font-size: 10px; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); padding-top: 15px; }
.icon-button { border: 1px solid var(--line); background: var(--surface); height: 38px; width: 38px; border-radius: 12px; cursor: pointer; }
.profile-button { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: none; text-align: left; }
.profile-button > span:last-child { display: grid; min-width: 0; }
.profile-button strong { font-size: 12px; }
.profile-button small { color: var(--muted); font-size: 10px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green-strong); font-size: 11px; font-weight: 700; }
.main { min-width: 0; }
.topbar { height: 72px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; }
.breadcrumbs { display: flex; gap: 8px; color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: var(--text); font-weight: 600; }
.top-actions { display: flex; gap: 8px; }
.mobile-auth { display: none; }
.button { border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor: pointer; background: var(--surface); font-size: 12px; font-weight: 650; transition: .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(30, 50, 37, .08); }
.button.primary { background: var(--green-strong); color: white; border-color: transparent; }
[data-theme="dark"] .button.primary { color: #102017; background: var(--green-strong); }
.button.ghost { background: transparent; color: var(--text); }
[hidden] { display: none !important; }
.view { display: none; padding: 44px 5vw 60px; max-width: 1480px; margin: 0 auto; }
.view.active { display: block; animation: viewIn .25s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } }
.view-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 32px; }
.view-heading.compact { align-items: center; }
.eyebrow { display: inline-block; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .15em; margin-bottom: 10px; }
h1 { font-size: clamp(32px, 4vw, 54px); line-height: 1.03; letter-spacing: -.045em; margin: 0 0 15px; max-width: 800px; font-weight: 690; }
.compact h1 { font-size: clamp(32px, 3vw, 44px); }
.view-heading p { margin: 0; color: var(--muted); max-width: 620px; line-height: 1.55; font-size: 14px; }
.progress-ring { width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) var(--progress, 0%), var(--surface-muted) 0); position: relative; flex: 0 0 auto; }
.progress-ring::after { content: ""; position: absolute; inset: 8px; background: var(--bg); border-radius: 50%; }
.progress-ring div { z-index: 1; display: grid; text-align: center; }
.progress-ring strong { font-size: 24px; }
.progress-ring span { color: var(--muted); font-size: 9px; }
.map-toolbar { display: flex; justify-content: flex-start; align-items: center; margin-bottom: 12px; gap: 12px; }
.map-toolbar .legend { margin-left: auto; }
.segmented { display: inline-flex; background: var(--surface-muted); padding: 3px; border-radius: 10px; }
.segmented button { border: 0; background: none; padding: 7px 11px; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 11px; }
.segmented button.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 7px rgba(24, 40, 30, .07); }
.legend { display: flex; gap: 15px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.completed { background: var(--green); }
.dot.active { background: var(--surface-solid); border: 2px solid var(--green); }
.dot.locked { background: var(--locked); }
.map-stage { position: relative; min-height: 590px; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(circle at 50% 46%, var(--surface-solid), color-mix(in srgb, var(--surface-muted) 65%, transparent)); overflow: hidden; box-shadow: inset 0 1px rgba(255,255,255,.6); }
.map-stage::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(var(--line) .7px, transparent .7px); background-size: 20px 20px; }
.connections { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.connections path { fill: none; stroke: var(--line); stroke-width: 1.5; }
.connections path.completed { stroke: color-mix(in srgb, var(--green) 55%, var(--line)); }
.map-nodes { position: absolute; inset: 0; }
.map-node { position: absolute; transform: translate(-50%, -50%); width: 150px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 94%, transparent); border-radius: 16px; box-shadow: 0 8px 24px rgba(35, 52, 41, .07); cursor: pointer; transition: .22s ease; text-align: left; backdrop-filter: blur(10px); }
.map-node { animation: nodeReveal .32s cubic-bezier(.2,.75,.25,1) both; }
@keyframes nodeReveal { from { opacity: 0; transform: translate(-50%, -50%) scale(.88); } }
.map-node:hover { transform: translate(-50%, -50%) translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.map-node.root { width: 175px; min-height: 92px; text-align: center; border-color: var(--green); background: var(--green-strong); color: white; display: grid; place-items: center; }
.map-node.domain { width: 165px; }
.map-node.skill { width: 142px; min-height: 58px; }
.map-node.locked { opacity: .56; filter: saturate(.3); }
.map-node.hidden-filter { opacity: .08; pointer-events: none; }
.node-kicker { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 8px; margin-bottom: 4px; }
.root .node-kicker { color: rgba(255,255,255,.65); }
.map-node strong { font-size: 11px; line-height: 1.3; display: block; }
.root strong { font-size: 13px; }
.node-meta { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; margin-top: 7px; }
.root .node-meta { color: rgba(255,255,255,.7); justify-content: center; }
.node-status { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--locked); }
.completed .node-status { background: var(--green); border-color: var(--green); }
.available .node-status { border-color: var(--green); }
.partial .node-status { background: linear-gradient(90deg, var(--amber) 50%, transparent 50%); border-color: var(--amber); }
.map-tip { position: absolute; bottom: 17px; left: 50%; transform: translateX(-50%); color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 8px 13px; border-radius: 20px; font-size: 10px; }
.map-tip span { color: var(--green); margin-right: 4px; }
.map-back { position: absolute; left: 18px; top: 18px; z-index: 3; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 10px; padding: 8px 11px; font-size: 10px; cursor: pointer; opacity: 0; transform: translateY(-5px); pointer-events: none; transition: .2s ease; }
.map-back.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.map-back:hover { color: var(--text); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.empty-goal { min-height: 590px; border: 1px solid var(--line); border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; background: radial-gradient(circle at 50% 38%, var(--green-soft), transparent 28%), radial-gradient(circle at 50% 45%, var(--surface-solid), var(--surface-muted)); box-shadow: inset 0 1px rgba(255,255,255,.55); }
.empty-goal h1 { max-width: 620px; margin-bottom: 14px; }
.empty-goal p { max-width: 590px; margin: 0 0 26px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.empty-goal .button { padding: 12px 20px; }
.empty-goal-mark { position: relative; width: 92px; height: 92px; margin-bottom: 24px; border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line)); border-radius: 50%; background: color-mix(in srgb, var(--surface-solid) 88%, transparent); box-shadow: 0 18px 45px rgba(38, 85, 58, .1); }
.empty-goal-mark::before, .empty-goal-mark::after, .empty-goal-mark span, .empty-goal-mark i, .empty-goal-mark b { content: ""; position: absolute; display: block; }
.empty-goal-mark::before { left: 45px; top: 25px; width: 1px; height: 42px; background: var(--green); }
.empty-goal-mark::after { left: 26px; top: 45px; width: 40px; height: 1px; background: var(--green); transform: rotate(-28deg); }
.empty-goal-mark span, .empty-goal-mark i, .empty-goal-mark b { width: 13px; height: 13px; border-radius: 50%; background: var(--green-strong); border: 3px solid var(--surface-solid); box-shadow: 0 0 0 1px var(--green); }
.empty-goal-mark span { left: 39px; top: 18px; }
.empty-goal-mark i { left: 19px; top: 52px; }
.empty-goal-mark b { right: 18px; bottom: 18px; }
.focus-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 22px; }
.focus-card, .alternatives, .wizard { border: 1px solid var(--line); background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); }
.focus-card { min-height: 390px; padding: 28px; }
.focus-card h2 { margin: 4px 0 12px; font-size: 30px; letter-spacing: -.03em; }
.focus-card > p { color: var(--muted); line-height: 1.6; }
.focus-context { display: grid; gap: 14px; margin: 20px 0; }
.focus-context section { padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); }
.focus-context h3 { margin: 0 0 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.focus-context p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.focus-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.focus-state { display: flex; align-items: center; gap: 6px; width: max-content; margin-bottom: 8px; color: var(--green); font-size: 10px; }
.focus-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.focus-stats { display: flex; gap: 20px; padding: 18px 0; border-block: 1px solid var(--line); margin: 22px 0; }
.focus-stats div { display: grid; gap: 4px; }
.focus-stats strong { font-size: 18px; }
.focus-stats span { color: var(--muted); font-size: 10px; }
.focus-checklist { display: grid; gap: 9px; margin: 15px 0 24px; }
.focus-checklist label { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.4; }
.focus-checklist input { accent-color: var(--green); }
.alternatives { padding: 24px; }
.alternative { width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: none; display: flex; justify-content: space-between; text-align: left; cursor: pointer; }
.alternative:last-child { border-bottom: 0; }
.alternative span { display: grid; gap: 4px; }
.alternative small { color: var(--muted); }
.wizard { overflow: hidden; }
.wizard-steps { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.wizard-steps button { border: 0; border-right: 1px solid var(--line); background: var(--surface-muted); padding: 16px; color: var(--muted); cursor: pointer; }
.wizard-steps button:last-child { border-right: 0; }
.wizard-steps button.active { background: var(--surface-solid); color: var(--text); }
.wizard-steps span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); margin-right: 7px; font-size: 10px; }
.wizard-steps .active span { background: var(--green-soft); color: var(--green-strong); }
.wizard-panel { display: none; padding: 28px; }
.wizard-panel.active { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid label, .paste-label { display: grid; gap: 8px; font-size: 11px; color: var(--muted); }
.optional-label { display: inline; font-size: 9px; opacity: .7; }
.form-grid .full { grid-column: 1 / -1; }
select, textarea { border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); border-radius: 12px; padding: 12px; outline: none; resize: vertical; }
select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent); }
.panel-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.prompt-box { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: #111713; color: #dcebe0; }
.prompt-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #2c352f; font-size: 11px; }
.prompt-head .button { color: #dcebe0; border-color: #38443b; }
.prompt-box pre { padding: 16px; margin: 0; max-height: 330px; overflow: auto; white-space: pre-wrap; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.hint { color: var(--muted); font-size: 11px; }
.validation { min-height: 20px; margin-top: 10px; font-size: 11px; }
.validation.success { color: var(--green); }
.validation.error { color: #bd4b4b; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 20, 16, .3); opacity: 0; pointer-events: none; transition: .25s ease; z-index: 30; backdrop-filter: blur(2px); }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.node-drawer { position: fixed; z-index: 40; top: 0; right: 0; height: 100vh; width: min(470px, 94vw); background: var(--surface-solid); border-left: 1px solid var(--line); box-shadow: -25px 0 60px rgba(19, 28, 22, .14); transform: translateX(102%); transition: .28s cubic-bezier(.2,.7,.2,1); padding: 34px; overflow-y: auto; }
.node-drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; top: 20px; right: 20px; border: 1px solid var(--line); background: var(--surface-muted); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.drawer-type { color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; }
.node-drawer h2 { font-size: 30px; line-height: 1.1; letter-spacing: -.035em; margin: 13px 45px 10px 0; }
.drawer-description { color: var(--muted); line-height: 1.6; font-size: 13px; }
.drawer-section { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 22px; }
.drawer-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; }
.drawer-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.drawer-list li { display: flex; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.drawer-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-top: 5px; flex: 0 0 auto; }
.status-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.status-selector button { border: 1px solid var(--line); background: var(--surface-muted); border-radius: 10px; padding: 10px 7px; font-size: 9px; cursor: pointer; }
.status-selector button.active { border-color: var(--green); background: var(--green-soft); color: var(--green-strong); }
.drawer-actions { display: flex; gap: 8px; margin-top: 22px; }
.drawer-notes { width: 100%; min-height: 105px; }
.task-check { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.task-check input { margin-top: 3px; accent-color: var(--green); }
.edit-form { display: grid; gap: 12px; }
.edit-form label, .auth-modal label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.edit-form input, .auth-modal input { border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); border-radius: 10px; padding: 11px; outline: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(10, 15, 11, .48); backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: .22s ease; }
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal { position: relative; width: min(760px, 96vw); max-height: 90vh; overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-solid); box-shadow: 0 28px 90px rgba(0,0,0,.24); padding: 30px; transform: translateY(12px) scale(.98); transition: .22s ease; }
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal h2 { margin: 0 40px 8px 0; font-size: 30px; letter-spacing: -.035em; }
.modal-intro { color: var(--muted); font-size: 12px; line-height: 1.55; margin-bottom: 22px; }
.assessment-list { display: grid; gap: 8px; max-height: 55vh; overflow: auto; padding-right: 5px; }
.assessment-item { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; }
.assessment-item strong { font-size: 11px; }
.assessment-item small { display: block; color: var(--muted); margin-top: 3px; font-size: 9px; }
.assessment-options { display: flex; gap: 4px; }
.assessment-options button { border: 1px solid var(--line); background: var(--surface-muted); border-radius: 8px; padding: 7px 8px; font-size: 8px; cursor: pointer; }
.assessment-options button.active { border-color: var(--green); background: var(--green-soft); color: var(--green-strong); }
.auth-modal { width: min(430px, 96vw); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-muted); padding: 3px; border-radius: 10px; margin-bottom: 18px; }
.auth-tabs button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 9px; font-size: 10px; cursor: pointer; }
.auth-tabs button.active { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 8px rgba(20,35,25,.07); }
#authForm { display: grid; gap: 13px; }
.auth-submit { width: 100%; margin-top: 4px; }
.register-only { display: none !important; }
.register-only.visible { display: grid !important; }
.captcha-field { display: none !important; }
.captcha-field.visible { display: grid !important; }
.account-summary { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--surface-muted); border-radius: 14px; padding: 14px; }
.account-summary .avatar { width: 42px; height: 42px; }
.account-summary > span:last-child { display: grid; gap: 3px; }
.account-summary small { color: var(--muted); font-size: 10px; }
.account-logout { width: 100%; margin-top: 18px; color: #c05a5a !important; }
.danger-zone p { margin: -2px 0 13px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.danger-button { width: 100%; color: #bd4b4b !important; border-color: color-mix(in srgb, #bd4b4b 35%, var(--line)) !important; }
.danger-button:hover { background: color-mix(in srgb, #bd4b4b 8%, transparent); }
.confirm-modal { width: min(450px, 96vw); }
.danger-eyebrow { color: #bd4b4b; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 9px; }
.button.danger-solid { color: white; background: #b94444; border-color: #b94444; }
.button.danger-solid:hover { background: #a83a3a; }
.completion-modal { width: min(560px, 96vw); }
.completion-form { display: grid; gap: 15px; }
.completion-form > label:not(.completion-task) { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.completion-task { display: flex; align-items: flex-start; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.completion-task input { margin-top: 2px; accent-color: var(--green); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 25px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); border-radius: 12px; padding: 11px 16px; font-size: 11px; opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .brand > span:last-child, .nav-item > span:last-child, .goal-mini, .profile-button > span:last-child { display: none; }
  .brand { justify-content: center; padding-inline: 0; }
  .nav-item { justify-content: center; padding-inline: 0; }
  .profile-button { justify-content: center; }
  .topbar { padding: 0 22px; }
  .view { padding-inline: 24px; }
  .focus-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: auto; bottom: 0; height: 66px; width: 100%; flex-direction: row; border: 0; border-top: 1px solid var(--line); padding: 8px 12px; z-index: 25; }
  .brand, .sidebar-spacer, .sidebar-footer { display: none; }
  .nav { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .nav-item { display: grid; place-items: center; gap: 1px; font-size: 8px; padding: 2px; }
  .nav-item > span:last-child { display: block; }
  .nav-icon { line-height: 1; }
  .main { padding-bottom: 66px; }
  .topbar { height: 58px; padding-inline: 14px; }
  .breadcrumbs { display: none; }
  .top-actions { margin-left: auto; }
  .top-actions { gap: 5px; }
  .top-actions .button { padding: 8px 10px; font-size: 10px; }
  .mobile-auth { display: inline-flex; min-width: 46px; justify-content: center; }
  #resetDemo { display: none; }
  .view { padding: 28px 14px 35px; }
  .empty-goal { min-height: calc(100vh - 151px); padding: 36px 20px; border-radius: 22px; }
  .empty-goal h1 { font-size: 34px; }
  .empty-goal p { font-size: 13px; }
  .view-heading { align-items: flex-start; }
  .progress-ring { width: 80px; height: 80px; }
  .progress-ring strong { font-size: 17px; }
  h1 { font-size: 33px; }
  .map-toolbar { align-items: flex-start; flex-direction: column; }
  .map-toolbar .legend { margin-left: 0; }
  .legend { display: none; }
  .map-stage { min-height: 0 !important; padding: 64px 13px 58px; overflow: hidden; }
  .connections { display: none; }
  .map-nodes { position: relative; inset: auto; display: grid; grid-template-columns: 1fr; gap: 10px; }
  .map-node, .map-node.domain, .map-node.skill, .map-node.root { position: relative; inset: auto; left: auto !important; top: auto !important; transform: none; width: 100%; min-height: 62px; animation: mobileNodeReveal .28s ease both; }
  .map-node:hover { transform: none; }
  .map-node.root { min-height: 82px; }
  .map-stage.state-overview .map-nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-stage.state-overview .map-node.root { grid-column: 1 / -1; }
  .map-stage.state-branch .map-node.domain,
  .map-stage.state-capability .map-node:nth-child(2) { border-color: var(--green); background: var(--green-soft); color: var(--text); }
  .map-stage.state-branch .map-node.root { min-height: 64px; background: var(--surface-muted); border-color: var(--line); color: var(--text); }
  .map-stage.state-branch .map-node.root .node-kicker,
  .map-stage.state-branch .map-node.root .node-meta { color: var(--muted); }
  .map-stage.state-capability .map-node:first-child { min-height: 52px; opacity: .78; }
  .map-tip { width: max-content; max-width: calc(100% - 24px); text-align: center; white-space: normal; }
  .map-back { left: 12px; top: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .wizard-panel { padding: 18px; }
  .wizard-steps button { font-size: 0; padding: 12px; }
  .wizard-steps span { font-size: 10px; margin: 0; }
  .panel-actions { flex-wrap: wrap; }
  .assessment-item { grid-template-columns: 1fr; }
  .assessment-options { display: grid; grid-template-columns: repeat(3, 1fr); }
}

@keyframes mobileNodeReveal { from { opacity: 0; transform: translateY(7px); } }
