/* Logo and name in the top bar (moved here from the old landing.css). */
.brand{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:700;font-size:22px}
.brand svg{width:28px;height:28px}
.brand span{display:flex;flex-direction:column;line-height:1.05}
.brand .tag{font-family:var(--body);font-size:12px;font-weight:600;color:var(--accent)}
/* App shell: top bar, Learn path nodes, tab bar, chart colours, and the shared page parts
   (page heads, cards, fields, sliders) used by Tools, My Plan, Profile and account screens. */
/* app shell */
.shell{display:flex;flex-direction:column;min-height:100%;min-height:100vh;min-height:100dvh}
.topbar{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--bg);display:flex;align-items:center;justify-content:space-between;padding-block:14px;gap:12px}
.stats{display:flex;gap:10px}
.pill{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:14px;padding:6px 10px;border-radius:999px;background:var(--surface);border:1px solid var(--line)}
.pill svg{width:16px;height:16px}
.pill.gold{color:var(--gold)}
.pill.green{color:var(--accent)}
.unit-head{background:var(--accent);color:var(--accent-ink);border-radius:var(--r);padding:16px 18px;margin-top:6px;display:flex;align-items:center;gap:14px}
.unit-icon{flex:none;display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:color-mix(in srgb,var(--accent-ink) 15%,transparent)}
.unit-icon svg{width:28px;height:28px}
.unit-head small{font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.85;font-size:12px}
.unit-head h2{font-size:22px;margin-top:2px}
.unit-head p{font-size:14px;opacity:.9;margin-top:4px}
.trail{list-style:none;padding:0;margin:18px 0 8px;display:flex;flex-direction:column;gap:12px;position:relative}
.trail::before{content:"";position:absolute;left:27px;top:20px;bottom:20px;width:3px;background:var(--line);border-radius:2px}
.node{display:flex;align-items:center;gap:14px;background:none;border:0;padding:0;text-align:left;width:100%;position:relative}
.dot{flex:none;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:var(--surface);border:3px solid var(--line);color:var(--muted);font-family:var(--display);font-weight:700;font-size:18px}
.dot svg{width:24px;height:24px}
.node.done .dot{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.node.current .dot{border-color:var(--accent);color:var(--accent);box-shadow:0 0 0 6px var(--accent-soft)}
.node .meta{display:flex;flex-direction:column;min-width:0}
.node .meta b{font-size:16px}
.node .meta span{font-size:13px;color:var(--muted)}
.node.locked{cursor:default;opacity:.6}
.start-tag{margin-left:auto;font-size:13px;font-weight:700;color:var(--accent-ink);background:var(--accent);padding:6px 12px;border-radius:999px}
.locked-units{display:flex;flex-direction:column;gap:8px;margin-top:22px}
.lu{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);font-size:15px}
.lu svg{width:18px;height:18px;flex:none}
.lu b{color:var(--ink);font-weight:600}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;margin-top:22px}
.panel h3{font-size:18px;margin-bottom:8px}
.panel dl{margin:0;display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:14px}
.panel dt{color:var(--muted)}
.panel dd{margin:0;font-weight:600}
.adv{background:var(--gold-soft);border-color:transparent}
.adv p{font-size:14px;color:var(--muted);margin-bottom:12px}
.tabbar{position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);padding-bottom:env(safe-area-inset-bottom,0px);margin-top:auto}
.tabbar button{background:none;border:0;padding:10px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;font-weight:600;color:var(--muted)}
.tabbar button svg{width:22px;height:22px}
.tabbar button.on{color:var(--accent)}
.proto-note{font-size:12px;color:var(--muted);text-align:center;padding-block:16px}


/* chart series tokens (validated: light c1/c2 on white, dark on #162032) */
:root{--c1:#0E7A5C;--c2:#B87B0E}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--c1:#2A9475;--c2:#BF8420}}
:root[data-theme="dark"]{--c1:#2A9475;--c2:#BF8420}

/* app pages: tools, plan, profile, account */
.pagehead{margin:6px 0 16px}
.pagehead h1{font-size:28px}
.pagehead p{color:var(--muted);margin-top:6px}
.muted{color:var(--muted);font-size:14px}
.back{display:inline-flex;align-items:center;gap:4px;background:none;border:0;padding:8px 8px 8px 0;font-weight:700;color:var(--accent)}
.back svg{width:20px;height:20px}
.tsec{font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:22px 0 2px}
.tsub{margin:0 0 10px}
.toollinks{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.toollinks .link{text-align:left}
.pagehead small.kind{color:var(--accent)}
.kvs{display:flex;flex-direction:column}
.kv{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);font-size:15px}
.kv:last-child{border-bottom:0}
.kv span{color:var(--muted)}
.kv.tot span,.kv.tot b{color:var(--ink);font-weight:700}
.kv i.k{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:8px;vertical-align:middle}
.split3{display:flex;height:16px;border-radius:8px;overflow:hidden;background:var(--line)}
.split3 span{display:block;height:100%}
.k1,.split3 .a{background:var(--c1)} .k2,.split3 .b{background:var(--muted);opacity:.5} .k3,.split3 .c{background:var(--c2)}
.tlist{display:flex;flex-direction:column;gap:10px}
.tcard{display:flex;align-items:center;gap:14px;text-align:left;width:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 14px 14px 16px;min-height:72px}
.tcard:hover{border-color:var(--accent)}
.tcard>span:nth-child(2){display:flex;flex-direction:column;gap:2px;flex:1}
.tcard b{font-size:16px}
.tcard>span:nth-child(2)>span{font-size:14px;color:var(--muted)}
.ticon{flex:none;width:44px;height:44px;border-radius:12px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}
.ticon svg{width:24px;height:24px}
.tcard .chevr{width:18px;height:18px;flex:none;color:var(--muted)}
#learnit{display:block;margin-top:14px;padding-left:0;color:var(--accent);text-align:left}
.chartwrap{position:relative;margin-top:6px}
.chart{width:100%;height:auto;display:block;overflow:visible}
.chart .gl{stroke:var(--line);stroke-width:1}
.chart .ax{fill:var(--muted);font-size:10px;font-family:var(--body)}
.chart .s1{fill:var(--c1)} .chart .s2{fill:var(--c2)}
.chart .hit{fill:transparent;cursor:pointer}
.chart .bar{transition:opacity .15s}
.chart .bar.dim{opacity:.35}
.legend .k1{background:var(--c1)} .legend .k2{background:var(--c2)}
.tip{position:absolute;top:4px;background:var(--ink);color:var(--bg);border-radius:10px;padding:8px 10px;font-size:12px;display:flex;flex-direction:column;gap:1px;pointer-events:none;white-space:nowrap;z-index:3}
.tip b{font-size:13px}
.tview{margin-top:10px;font-size:14px}
.tview summary{cursor:pointer;color:var(--accent);font-weight:600}
.tview table{width:100%;border-collapse:collapse;margin-top:8px}
.tview th,.tview td{text-align:right;padding:6px 4px;border-bottom:1px solid var(--line)}
.tview th:first-child,.tview td:first-child{text-align:left}
.tview th{color:var(--muted);font-weight:600;font-size:12px}
.hbars{display:flex;flex-direction:column;gap:12px}
.hbars div{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;font-size:14px}
.hbars span{color:var(--muted)}
.hbars i{grid-column:1;grid-row:2;height:14px;border-radius:0 4px 4px 0;display:block;min-width:4px}
.hbars i.s1{background:var(--c1)} .hbars i.s2{background:var(--c2)}
.hbars b{grid-column:2;grid-row:2}
.pcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;margin-top:12px;display:flex;flex-direction:column;gap:10px}
.pcard h3{font-size:18px}
.pcard .goal{background:var(--bg)}
.pcard.links{padding:8px;gap:0}
.pcard.links .tcard{border:0;background:none}
.pcard.links .tcard+.tcard{border-top:1px solid var(--line);border-radius:0}
.sel{width:100%;font:inherit;font-size:16px;padding:12px 14px;border:2px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink)}
.ptext{width:100%;min-height:220px;margin-top:12px;font:13px/1.5 ui-monospace,monospace;padding:12px;border:2px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink)}
/* Save button on a tool or guide's top bar, and the Saved lists */
.savebtn{flex-shrink:0;display:inline-flex;align-items:center;gap:6px;background:none;border:1.5px solid var(--line);border-radius:999px;padding:6px 12px;font-weight:700;color:var(--ink)}
.savebtn svg{width:18px;height:18px}
.savebtn.on{color:var(--accent);border-color:var(--accent)}
.tsec>svg{width:18px;height:18px;vertical-align:-3px;margin-right:6px;color:var(--accent)}
.saved-empty{text-align:center}
.saved-empty .ticon{margin:0 auto 6px}
.topbar .back{text-align:left}
