:root {
  --ink: #17231f;
  --muted: #6d7d78;
  --line: #dce6e2;
  --paper: #f5f8f6;
  --surface: #ffffff;
  --green: #11775e;
  --green-2: #23a47f;
  --green-soft: #e5f5ef;
  --blue: #3f81c5;
  --blue-soft: #eaf2fb;
  --amber: #c98220;
  --amber-soft: #fff3df;
  --red: #cf554f;
  --red-soft: #fceae8;
  --violet: #715fd0;
  --shadow: 0 16px 40px rgba(31, 52, 46, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
html[data-theme="2"] { filter: invert(1); }
html[data-theme="2"] { --paper: #f1efe8; --muted: #59645f; --line: #b7b5b8; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { color: inherit; font: inherit; }
button, label.file-button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(35, 164, 127, .32); outline-offset: 2px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; border-radius: 8px; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-header { position: sticky; top: 0; z-index: 20; height: 68px; display: grid; grid-template-columns: 240px 1fr auto; align-items: center; gap: 1rem; padding: 0 1.35rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; font-weight: 850; letter-spacing: -.035em; }
.brand > span:last-child span { color: var(--green); }
.brand-mark { position: relative; display: block; width: 30px; height: 30px; overflow: hidden; border-radius: 9px; background: var(--ink); }
.brand-mark i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #79dfbc; }
.brand-mark i:nth-child(1) { left: 6px; top: 12px; }.brand-mark i:nth-child(2) { left: 17px; top: 6px; }.brand-mark i:nth-child(3) { left: 18px; top: 19px; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; left: 9px; top: 15px; width: 14px; height: 1px; transform-origin: left; background: #79dfbc; }
.brand-mark::before { transform: rotate(-35deg); }.brand-mark::after { transform: rotate(28deg); }
.course-switcher { justify-self: center; min-width: 255px; display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; font-size: .82rem; font-weight: 700; cursor: pointer; }
.course-switcher span:last-child { margin-left: auto; color: var(--muted); }
.course-controls { position: relative; justify-self: center; display: flex; align-items: center; gap: .55rem; min-width: 0; }
.course-switcher #active-course-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-browse-button { min-height: 44px; padding: .55rem .8rem; border: 2px solid var(--green); border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: .78rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.header-browse-button:hover { background: color-mix(in srgb, var(--green-soft) 75%, var(--green)); }
.header-browse-button:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.header-browse-button .browse-short { display: none; }
.theme-button { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: .72rem; font-weight: 750; white-space: nowrap; cursor: pointer; }
.theme-button { min-height: 44px; padding: .55rem .85rem; border: 2px solid var(--green); background: var(--green-soft); color: var(--green); font-size: .88rem; }
.theme-button:focus-visible, .graph-zoom-controls button:focus-visible, .graph-tools button:focus-visible, .head-actions button:focus-visible, .inspector-top button:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.theme-button span:last-child { color: var(--muted); }
.theme-menu { position: absolute; z-index: 41; top: calc(100% + 8px); left: 0; width: 180px; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 20px 50px rgba(25,45,39,.16); }
.theme-menu[hidden] { display: none; }
.theme-menu button { width: 100%; padding: .65rem; border: 0; border-radius: 7px; background: transparent; text-align: left; font-size: .72rem; cursor: pointer; }
.theme-menu button:hover, .theme-menu button[aria-pressed="true"] { background: var(--green-soft); color: var(--green); }
.course-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 4px var(--green-soft); }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.mobile-data-button { display: none; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--green); font-size: .7rem; font-weight: 750; cursor: pointer; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.icon-button:hover { border-color: #add8c9; background: var(--green-soft); }
.avatar { width: 36px; height: 36px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #2b403a, var(--green)); color: white; font-size: .7rem; font-weight: 800; }
.course-menu { position: fixed; z-index: 40; top: 59px; left: 50%; width: min(330px, calc(100vw - 2rem)); padding: .4rem; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 20px 50px rgba(25,45,39,.16); }
.course-menu[hidden] { display: none; }
.course-menu button { width: 100%; display: flex; justify-content: space-between; gap: 1rem; padding: .7rem; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.course-menu button:hover, .course-menu button[aria-selected="true"] { background: var(--green-soft); }.course-menu small { color: var(--muted); }
.concept-context-menu { position: fixed; z-index: 60; width: min(235px, calc(100vw - 16px)); padding: .4rem; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 16px 42px rgba(20, 35, 30, .25); }
.concept-context-menu[hidden] { display: none; }
.concept-context-menu [hidden] { display: none !important; }
.concept-context-menu strong { display: block; overflow: hidden; padding: .45rem .6rem .6rem; color: var(--ink); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.concept-context-menu button { display: block; width: 100%; min-height: 41px; padding: .55rem .65rem; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-size: .82rem; font-weight: 700; text-align: left; cursor: pointer; }
.concept-context-menu button:hover, .concept-context-menu button:focus-visible { background: var(--green-soft); color: var(--green); }
.concept-context-menu button:disabled { color: var(--muted); opacity: .55; cursor: not-allowed; }
.concept-context-menu .context-delete { color: #a43a35; }
.concept-context-menu .context-delete:hover, .concept-context-menu .context-delete:focus-visible { background: var(--red-soft); color: #a43a35; }

.app-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: sticky; top: 68px; height: calc(100vh - 68px); display: flex; flex-direction: column; padding: 1.2rem .85rem .9rem; border-right: 1px solid var(--line); background: #f9fbfa; }
.nav-label { margin: 1rem .7rem .42rem; color: #97a39f; font-size: .65rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.nav-label:first-child { margin-top: 0; }
.nav-link { width: 100%; display: flex; align-items: center; gap: .72rem; padding: .68rem .78rem; border: 0; border-radius: 9px; background: transparent; color: #52625d; text-align: left; font-size: .84rem; cursor: pointer; }
.nav-link span { width: 18px; color: #82908c; text-align: center; }.nav-link:hover { color: var(--ink); background: #edf3f0; }.nav-link.active { color: #09654e; background: var(--green-soft); font-weight: 750; }.nav-link.active span { color: var(--green); }
.weekly-card { margin-top: auto; display: flex; align-items: center; gap: .7rem; padding: .75rem; border: 1px solid var(--line); border-radius: 11px; background: white; }
.weekly-ring { --weekly: 0; position: relative; width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green-2) calc(var(--weekly) * 1%), #e4ece9 0); }
.weekly-ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: white; }.weekly-ring strong { position: relative; z-index: 1; font-size: .62rem; }
.weekly-card > div:last-child { display: grid; gap: .18rem; color: var(--muted); font-size: .65rem; }.weekly-card > div:last-child strong { color: var(--ink); font-size: .72rem; }
.prototype-note { margin: .7rem 0 0; color: #84918d; text-align: center; font-size: .6rem; line-height: 1.45; }.prototype-note span { color: #a0aaa7; }

main { min-width: 0; width: 100%; max-width: none; margin: 0; padding: 2rem clamp(.75rem, 1vw, 1.25rem) 3rem; }
.app-view { display: none; }.app-view.active { display: block; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.45rem; }
.eyebrow { display: block; margin-bottom: .35rem; color: var(--green); font-size: .66rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }h1 { margin-bottom: .42rem; font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.05; letter-spacing: -.045em; }h2 { margin-bottom: .4rem; font-size: 1.1rem; letter-spacing: -.025em; }h3 { margin-bottom: 0; font-size: .8rem; }
.page-head p { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }.head-actions { display: flex; flex: 0 0 auto; gap: .65rem; }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: .7rem 1rem; font-size: .78rem; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.primary-button { border: 1px solid #0f6d55; background: linear-gradient(180deg, #1b8c6e, #106f57); color: white; box-shadow: 0 7px 16px rgba(19,124,98,.16); }.secondary-button { border: 1px solid var(--line); background: white; color: #40504b; }.danger-button { border: 1px solid #edc5c1; background: #fff6f5; color: #aa3f39; }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(31,52,46,.1); }.primary-button:disabled, .secondary-button:disabled { transform: none; opacity: .6; cursor: default; }.full-width { width: 100%; }
.head-actions .primary-button, .head-actions .secondary-button { min-height: 46px; padding: .7rem 1.05rem; font-size: .88rem; }
.head-actions .secondary-button { border: 2px solid var(--green); background: var(--green-soft); color: var(--green); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: .85rem; }
.metric-card { min-width: 0; display: flex; align-items: center; gap: .72rem; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
.metric-icon { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; font-weight: 800; }.metric-icon.green { color: var(--green); background: var(--green-soft); }.metric-icon.amber { color: var(--amber); background: var(--amber-soft); }.metric-icon.blue { color: var(--blue); background: var(--blue-soft); }.metric-icon.violet { color: var(--violet); background: #efecff; }
.metric-card div { min-width: 0; display: grid; gap: .08rem; }.metric-card small, .metric-card span { overflow: hidden; color: var(--muted); font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }.metric-card strong { font-size: 1rem; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: .85rem; align-items: start; }
.graph-panel, .inspector-panel, .content-card, .course-card, .session-card { border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.panel-head { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }.panel-head h2 { margin: 0; }.panel-head .eyebrow { margin-bottom: .2rem; font-size: .57rem; }.graph-tools { display: flex; align-items: center; gap: .6rem; }.edit-hint { color: var(--muted); font-size: .62rem; }
.panel-head { flex-wrap: wrap; }
.graph-tools { flex-wrap: wrap; }
.graph-tools .graph-view-toggle { min-height: 42px; padding: .55rem .75rem; border: 2px solid var(--green); background: var(--green-soft); color: var(--green); font-size: .8rem; }
.graph-tools .icon-button, .inspector-top .icon-button { width: 44px; height: 44px; border: 2px solid var(--green); background: var(--green-soft); color: var(--green); font-size: 1.1rem; }
.concept-views-count { display: block; margin-top: .3rem; color: var(--green); font-size: .7rem; font-weight: 750; }
.concept-views-count { display: inline-block; margin-top: .45rem; padding: .32rem .55rem; border: 1px solid var(--green); border-radius: 7px; background: var(--green-soft); font-size: .85rem; }
.memory-loss-status { display: block; margin-top: .2rem; color: var(--muted); font-size: .63rem; }
.memory-loss-status { margin-top: .35rem; color: var(--ink); font-size: .76rem; font-weight: 650; }
.modal .memory-loss-setting { display: flex; align-items: flex-start; gap: .7rem; padding: .7rem; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.modal .memory-loss-setting input { width: auto; margin: .16rem 0 0; accent-color: var(--green); }
.memory-loss-setting strong,.memory-loss-setting small { display: block; }
.memory-loss-setting small { margin-top: .2rem; color: var(--muted); font-size: .65rem; font-weight: 400; line-height: 1.4; }
.modal .setting-hint { color: var(--muted); font-size: .65rem; font-weight: 400; line-height: 1.4; }
.diagnostic-modal .diagnostic-rating[hidden] { display: none; }
.diagnostic-modal .diagnostic-rating legend { margin-bottom: .4rem; color: var(--ink); font-size: .75rem; font-weight: 750; }
.diagnostic-modal .diagnostic-rating label { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .42rem .6rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.diagnostic-modal .diagnostic-rating label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.diagnostic-modal .diagnostic-rating input { width: auto; margin: 0; accent-color: var(--green); }
.graph-stage { --graph-grid-line: #c6d7d1; position: relative; height: 520px; overflow: hidden; background-color: #fbfdfc; background-image: linear-gradient(to right, var(--graph-grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--graph-grid-line) 1px, transparent 1px); background-size: 22px 22px; }.graph-stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 55% 48%, rgba(207,240,228,.42), transparent 35%); pointer-events: none; }
.connections { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }.edge { fill: none; stroke: #bdccc7; stroke-width: 2; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }.edge-prerequisite { stroke: #8cb9aa; stroke-dasharray: none; }.edge-supports { stroke: #8fb6df; }.edge-example { stroke: #b69edb; }.edge-contradicts { stroke: #e59b96; }
.concept-node { --node: #788985; position: absolute; z-index: 2; left: var(--x); top: var(--y); width: 132px; min-height: 78px; display: grid; place-items: center; gap: 2px; padding: .67rem; transform: translate(-50%,-50%); border: 1px solid color-mix(in srgb, var(--node) 45%, white); border-radius: 14px; background: rgba(255,255,255,.97); box-shadow: 0 8px 22px rgba(35,54,49,.11); cursor: pointer; transition: transform .18s, box-shadow .18s; }.concept-node:hover, .concept-node.selected { transform: translate(-50%,-50%) scale(1.045); box-shadow: 0 14px 30px rgba(35,54,49,.17); }.concept-node.selected::after { content: ""; position: absolute; inset: -6px; border: 2px solid color-mix(in srgb, var(--node) 55%, transparent); border-radius: 18px; }.concept-node small { color: var(--node); font-size: .52rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }.concept-node strong { max-width: 112px; font-size: .73rem; line-height: 1.18; }.concept-node em { color: var(--node); font-size: .67rem; font-style: normal; font-weight: 850; }.node-dot { position: absolute; left: 10px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--node); box-shadow: 0 0 0 4px color-mix(in srgb, var(--node) 15%, white); }
.mastered { --node: #148261; }.strong { --node: #347fc1; }.learning { --node: #c58120; }.weak { --node: #cf554f; }.locked { --node: #87928f; }.concept-node.locked { background: #f4f7f5; }
.graph-legend { position: absolute; z-index: 3; left: .9rem; bottom: .75rem; display: flex; flex-wrap: wrap; gap: .65rem; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.93); color: var(--muted); font-size: .57rem; }.graph-legend span { display: flex; align-items: center; gap: .28rem; }.legend-dot, .mini-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }.legend-dot.mastered,.mini-dot.mastered { background:#148261; }.legend-dot.strong,.mini-dot.strong { background:#347fc1; }.legend-dot.learning,.mini-dot.learning { background:#c58120; }.legend-dot.weak,.mini-dot.weak { background:#cf554f; }.legend-dot.locked,.mini-dot.locked { background:#87928f; }

.inspector-panel { padding: 1rem; box-shadow: none; }.inspector-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }.status-pill { padding: .3rem .52rem; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: .59rem; font-weight: 850; text-transform: capitalize; }.status-pill.learning { color: #9c6415; background: var(--amber-soft); }.status-pill.weak { color: #aa3f39; background: var(--red-soft); }.status-pill.locked { color: #65726e; background: #edf1ef; }.inspector-panel > p { color: var(--muted); font-size: .74rem; line-height: 1.45; }
.mastery-score { display: flex; align-items: center; gap: .75rem; padding: .78rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.score-ring { --score: 0; position: relative; width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green-2) calc(var(--score)*1%), #e6ecea 0); }.score-ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: white; }.score-ring span { position: relative; z-index: 1; font-size: .72rem; font-weight: 850; }.mastery-score > div:last-child { display: grid; gap: .1rem; }.mastery-score small,.mastery-score span { color: var(--muted); font-size: .6rem; }.mastery-score strong { font-size: .8rem; }
.readiness { padding: .72rem 0; }.readiness > div { display: flex; justify-content: space-between; margin-bottom: .3rem; font-size: .65rem; }.readiness span { color: var(--muted); }.readiness progress { width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 10px; accent-color: var(--green-2); }.readiness progress::-webkit-progress-bar { background: #e7eeeb; }.readiness progress::-webkit-progress-value { background: var(--green-2); }
.detail-section { margin-top: .8rem; }.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: .38rem; }.section-title span { color: var(--muted); font-size: .58rem; }.prereq-list { display: grid; gap: .32rem; }.prereq-list button { width: 100%; display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: .45rem; padding: .48rem .52rem; border: 1px solid var(--line); border-radius: 8px; background: #fcfdfd; font-size: .62rem; text-align: left; cursor: pointer; }.prereq-list b { font-size: .6rem; }.connection-list { display: grid; gap: .25rem; }.connection-list div { display: flex; justify-content: space-between; align-items: center; padding: .42rem .5rem; border: 1px solid var(--line); border-radius: 7px; color: #50605b; font-size: .58rem; }.connection-list button { width: 22px; height: 22px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }.connection-list button:hover { color: var(--red); background: var(--red-soft); }.empty-copy { margin: 0; color: var(--muted); font-size: .62rem; }.evidence-card { padding: .55rem; border-radius: 8px; background: #f2f6f4; }.evidence-card strong { font-size: .62rem; }.evidence-card p { margin: .2rem 0 0; color: var(--muted); font-size: .6rem; line-height: 1.4; }

.recommendation { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1rem; margin-top: .85rem; padding: .95rem 1rem; border: 1px solid #b9dfd2; border-radius: 13px; background: linear-gradient(100deg,#ecf8f4,#fff); }.recommendation-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--green); color: white; }.recommendation .eyebrow { margin-bottom: .18rem; font-size: .52rem; }.recommendation h2 { margin-bottom: .15rem; font-size: .88rem; }.recommendation p { margin: 0; color: var(--muted); font-size: .65rem; line-height: 1.45; }.impact { display: grid; padding: 0 1rem; border-left: 1px solid #cbe4db; }.impact span,.impact small { color: var(--muted); font-size: .52rem; }.impact strong { color: var(--green); font-size: 1.15rem; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: .85rem; }.course-card { position: relative; padding: 1rem; box-shadow: none; }.course-card.active { border-color: #9fcfbe; box-shadow: 0 0 0 2px var(--green-soft); }.course-code { color: var(--green); font-size: .58rem; font-weight: 850; letter-spacing: .1em; }.course-card h2 { margin-top: .4rem; }.course-card p { color: var(--muted); font-size: .7rem; }.course-progress { height: 7px; overflow: hidden; margin: 1rem 0 .55rem; border-radius: 10px; background: #e8eeec; }.course-progress span { display: block; height: 100%; background: var(--green-2); }.course-card-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: .6rem; }.course-card-foot strong { color: var(--ink); }.course-card-actions { display: grid; grid-template-columns: auto 1fr; gap: .45rem; margin-top: .9rem; }.course-card-actions button { padding: .6rem; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--green); font-size: .7rem; font-weight: 750; cursor: pointer; }.course-card-actions button:last-child { background: var(--green-soft); border-color: #b9ddcf; }
.catalog-section { margin-top: 1.8rem; padding-top: 1.3rem; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.catalog-section .section-heading { max-width: 680px; }
.catalog-section .section-heading p { margin: .35rem 0 1rem; font-size: .72rem; line-height: 1.5; }
.catalog-search { display: grid; gap: .35rem; max-width: 340px; margin-bottom: .9rem; color: var(--ink); font-size: .7rem; font-weight: 700; }
.catalog-search input { padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font: inherit; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: .85rem; }
.catalog-card { display: flex; flex-direction: column; gap: .55rem; min-height: 230px; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.catalog-card h3 { margin: 0; font-size: 1rem; }.catalog-card p { margin: 0; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.catalog-card-meta { color: var(--muted); font-size: .65rem; }.catalog-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-top: auto; }
.catalog-card-foot a { color: var(--green); font-size: .66rem; font-weight: 700; }.catalog-card-foot button { min-height: 42px; }
.catalog-coming { margin: 1rem 0 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--green-soft); color: var(--ink); font-size: .75rem; font-weight: 650; }
.two-column { display: grid; grid-template-columns: 1.3fr .7fr; gap: .85rem; }.content-card { padding: 1rem; box-shadow: none; }.coverage-row { width: 100%; display: grid; grid-template-columns: 8px 1fr auto auto; align-items: center; gap: .7rem; padding: .65rem .2rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }.coverage-row:hover strong { color: var(--green); }.coverage-row strong { font-size: .72rem; }.coverage-row span { color: var(--muted); font-size: .62rem; }.coverage-row b { font-size: .66rem; }.explain-list { display: grid; gap: .85rem; padding-left: 1.2rem; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.session-list { display: grid; gap: .7rem; }.session-card { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 1rem; padding: .9rem; box-shadow: none; }.session-card.completed { opacity: .72; }.session-time { width: 58px; height: 58px; display: grid; place-content: center; border-radius: 12px; background: var(--green-soft); color: var(--green); text-align: center; }.session-time strong { font-size: 1.2rem; }.session-time span { font-size: .52rem; }.session-card .eyebrow { margin-bottom: .15rem; font-size: .52rem; }.session-card h2 { margin-bottom: .2rem; font-size: .84rem; }.session-card p { margin: 0; color: var(--muted); font-size: .65rem; }
.session-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.session-actions button { padding: .6rem .7rem; }
.guide-timer { display: grid; justify-items: center; gap: .5rem; padding: 1rem; border-radius: 12px; background: var(--green-soft); text-align: center; }
.guide-timer strong { color: var(--green); font-size: 2.2rem; font-variant-numeric: tabular-nums; }
.guide-timer span { color: var(--muted); font-size: .67rem; }
.guide-steps { display: grid; gap: .5rem; margin: 1rem 0; }
.modal .guide-step { display: flex; align-items: flex-start; gap: .7rem; margin: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.guide-step:has(input:checked) { border-color: var(--green-2); background: var(--green-soft); }
.modal .guide-step input { width: auto; margin: .15rem 0 0; accent-color: var(--green); }
.guide-step strong { display: block; font-size: .77rem; }
.guide-step small { display: block; margin-top: .3rem; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.session-done { color: var(--green); font-size: .65rem; font-weight: 750; }
#study-log-steps { margin: 0 0 1rem; padding: 0; border: 0; }
#study-log-steps legend { margin-bottom: .5rem; color: #4e5f59; font-size: .7rem; font-weight: 700; }
.modal .study-log-step { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .45rem; padding: .6rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.modal .study-log-step input { width: auto; margin: .1rem 0 0; accent-color: var(--green); }
.timeline { position: relative; display: grid; gap: 0; }.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }.timeline-item { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: .7rem; padding: .6rem 0; }.timeline-dot { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 2px; border: 3px solid white; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 1px #a9d6c7; }.timeline-item div { display: grid; gap: .15rem; }.timeline-item strong { font-size: .72rem; }.timeline-item div span { color: var(--muted); font-size: .59rem; }
.data-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .85rem; }.action-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 240px; }.action-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 10px; background: var(--green-soft); color: var(--green); font-weight: 850; }.action-card p { flex: 1; color: var(--muted); font-size: .72rem; line-height: 1.5; }.danger-card .action-icon { color: var(--red); background: var(--red-soft); }.file-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.modal { width: min(540px,calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px rgba(18,35,30,.25); }.modal::backdrop { background: rgba(17,30,27,.56); backdrop-filter: blur(4px); }.modal form { position: relative; padding: 1.45rem; }.modal h2 { margin-bottom: 1.1rem; font-size: 1.4rem; }.dialog-close { position: absolute; top: .8rem; right: .8rem; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 1.1rem; cursor: pointer; }.modal label { display: grid; gap: .35rem; margin-bottom: .8rem; color: #4e5f59; font-size: .7rem; font-weight: 700; }.modal input,.modal textarea,.modal select { width: 100%; padding: .65rem .7rem; border: 1px solid #ccd9d4; border-radius: 8px; background: white; font-size: .78rem; }.modal textarea { resize: vertical; }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }.form-hint { margin: -.25rem 0 .8rem; color: var(--muted); font-size: .65rem; }.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; }.dialog-actions .danger-button { margin-right: auto; }.danger-button:disabled { transform: none; opacity: .5; cursor: not-allowed; }.diagnostic-modal h2 { padding-right: 1.5rem; font-size: 1.2rem; line-height: 1.35; }.diagnostic-modal fieldset { display: grid; gap: .5rem; margin: 0 0 .8rem; padding: 0; border: 0; }.answer-option { display: flex!important; grid-template-columns: none!important; align-items: center; gap: .55rem!important; margin: 0!important; padding: .72rem!important; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }.answer-option:has(input:checked) { border-color: var(--green); background: var(--green-soft); }.answer-option input { width: auto; margin: 0; accent-color: var(--green); }.answer-feedback { display: none; padding: .65rem; border-radius: 8px; font-size: .7rem; line-height: 1.45; }.answer-feedback.visible { display: block; }.answer-feedback.correct { color: #0d684f; background: var(--green-soft); }.answer-feedback.incorrect { color: #a33e39; background: var(--red-soft); }.session-step { display: grid; grid-template-columns: 75px 1fr; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--line); }.session-step > span { color: var(--green); font-size: .62rem; font-weight: 850; }.session-step strong { font-size: .75rem; }.session-step p { margin: .15rem 0 0; color: var(--muted); font-size: .65rem; }
.empty-state { padding: .8rem; border-radius: 9px; background: #f1f5f3; color: var(--muted); font-size: .72rem; text-align: center; }.empty-state.large { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: .5rem; background: transparent; }.graph-stage > .empty-state.large { position: absolute; inset: 0; min-height: 0; }.empty-state.large strong { color: var(--ink); font-size: 1rem; }.empty-state p { margin-bottom: .7rem; }
.toast-region { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; }.toast { max-width: 340px; padding: .72rem .9rem; border: 1px solid #a8d6c6; border-radius: 9px; background: #effaf6; color: #0f634d; box-shadow: 0 12px 32px rgba(30,50,44,.15); font-size: .72rem; }.toast.warning { border-color: #efd3a6; background: #fff8eb; color: #895a17; }.toast.error { border-color: #e9b6b2; background: #fff2f1; color: #9f3934; }

.graph-navigation { display: grid; grid-template-columns: auto minmax(160px, 260px) 1fr; align-items: center; gap: .45rem .7rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line); }
.graph-navigation label { font-size: .68rem; font-weight: 750; }
.graph-navigation input { width: 100%; padding: .42rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: .72rem; }
.graph-navigation > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .59rem; line-height: 1.35; }
.graph-navigation > .graph-viewed-hint { color: var(--ink); font-size: .68rem; font-weight: 650; }
.graph-viewed-hint span { color: var(--green); font-size: .95rem; text-shadow: 0 0 8px var(--green); }
.graph-glow-control { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; color: var(--ink); font-size: .68rem; font-weight: 650; }
.graph-glow-control input { width: min(180px, 40vw); padding: 0; accent-color: var(--green); cursor: pointer; }
.graph-glow-control output { min-width: 2.5rem; font-variant-numeric: tabular-nums; }
.graph-glow-control span { color: var(--muted); font-size: .62rem; font-weight: 400; }
.graph-interaction-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.graph-interaction-row p { margin: 0; color: var(--ink); font-size: .78rem; line-height: 1.4; }
.graph-interaction-button { flex: 0 0 auto; min-height: 46px; padding: .7rem 1rem; border: 2px solid #2473ed; border-radius: 9px; background: #2473ed; color: #fff; font-size: .78rem; font-weight: 800; cursor: pointer; box-shadow: 0 5px 14px #2473ed3d; }
.graph-interaction-button:hover { background: #1558c2; }
.graph-interaction-button[aria-pressed="true"] { background: transparent; color: #2473ed; box-shadow: none; }
.graph-interaction-button:focus-visible { outline: 3px solid #2473ed; outline-offset: 3px; }
html[data-theme="2"] .graph-interaction-button { filter: invert(1); }
.graph-search-results { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: .35rem; }
.graph-search-results:empty { display: none; }
.graph-search-results button { padding: .38rem .55rem; border: 1px solid #b9ddcf; border-radius: 7px; background: var(--green-soft); color: var(--green); font-size: .65rem; cursor: pointer; }
.graph-search-results span { color: var(--muted); font-size: .65rem; }
.graph-stage { overflow: hidden; cursor: grab; touch-action: none; }
.graph-stage.graph-interaction-off { cursor: grab; }
.graph-stage:active { cursor: grabbing; }
.graph-viewport-space { position: absolute; left: 50%; top: 50%; transform: translate(calc(-50% + var(--graph-pan-x)), calc(-50% + var(--graph-pan-y))) rotate(var(--graph-rotation, 0rad)); }
.graph-stage:has(.graph-canvas) { background-image: none; }
.graph-screen-grid { position: absolute; inset: -100vmax; pointer-events: none; background-image: linear-gradient(to right, var(--graph-grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--graph-grid-line) 1px, transparent 1px); transform: rotate(var(--graph-rotation, 0rad)); }
.graph-viewport-space { z-index: 1; }
.graph-canvas { position: relative; width: var(--graph-width); height: var(--graph-height); transform: scale(var(--graph-zoom)); transform-origin: top left; }
.graph-iso-grid { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; stroke: #dbeae3; stroke-width: 1; }
html[data-theme="2"] .graph-iso-grid { stroke: #bac2c7; }
.graph-view-toggle { padding: .45rem .65rem; font-size: .66rem; white-space: nowrap; }
.graph-stage.isometric { background-color: #f2f8f5; background-image: linear-gradient(30deg, transparent 48%, #dbeae3 49%, #dbeae3 51%, transparent 52%), linear-gradient(150deg, transparent 48%, #dbeae3 49%, #dbeae3 51%, transparent 52%); }
.graph-stage.three-dimensional { background: radial-gradient(circle at 50% 42%, #e2f2eb, #f5faf7 75%); }
.graph-3d-scene { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.graph-3d-grid { stroke: #bed8cd; stroke-width: 1; }
.graph-3d-edges { stroke: #789d90; stroke-width: 2; fill: none; }
.graph-3d-edges .edge-prerequisite { stroke: #487d6c; }
.graph-3d-column { --node: #788985; stroke: color-mix(in srgb, var(--node) 65%, #152c25); stroke-width: 1; }
.graph-3d-column.mastered,.graph-3d-label.mastered { --node: #148261; }
.graph-3d-column.strong,.graph-3d-label.strong { --node: #347fc1; }
.graph-3d-column.learning,.graph-3d-label.learning { --node: #c58120; }
.graph-3d-column.weak,.graph-3d-label.weak { --node: #cf554f; }
.graph-3d-column.locked,.graph-3d-label.locked { --node: #87928f; }
.graph-3d-column .side { fill: var(--node); }
.graph-3d-column .side-alt { fill: color-mix(in srgb, var(--node) 70%, #19382f); }
.graph-3d-column .top { fill: color-mix(in srgb, var(--node) 60%, white); }
.graph-3d-label { position: absolute; min-width: 92px; max-width: 130px; display: grid; gap: .1rem; padding: .3rem .4rem; transform: translate(-50%, -115%); border: 1px solid var(--node); border-radius: 8px; background: rgba(255,255,255,.96); color: var(--ink); box-shadow: 0 4px 12px #1b342b26; cursor: pointer; touch-action: none; }
.graph-3d-label strong { overflow: hidden; text-overflow: ellipsis; font-size: .65rem; }
.graph-3d-label em { color: var(--node); font-size: .65rem; font-style: normal; font-weight: 800; }
.graph-3d-label.selected,.graph-3d-label:focus-visible { outline: 3px solid color-mix(in srgb, var(--node) 35%, transparent); }
.iso-node { position: absolute; left: var(--x); top: var(--y); z-index: var(--layer); width: 130px; height: calc(var(--bar-height) + 44px); padding: 0; transform: translate(-50%, -100%); border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.iso-node .iso-column { position: absolute; bottom: 0; left: calc(50% - 20px); width: 40px; height: var(--bar-height); border-radius: 2px 2px 0 0; background: var(--node); box-shadow: 0 10px 18px rgba(30,60,50,.18); }
.iso-node .iso-column::before { content: ""; position: absolute; top: -12px; left: 0; width: 40px; height: 12px; background: color-mix(in srgb, var(--node) 60%, white); clip-path: polygon(0 100%, 28% 0, 100% 0, 72% 100%); }
.iso-node .iso-column::after { content: ""; position: absolute; top: -12px; right: -11px; width: 11px; height: calc(100% + 12px); transform: skewY(-45deg); transform-origin: left bottom; background: color-mix(in srgb, var(--node) 70%, #172b24); }
.iso-node .iso-label { position: absolute; top: 0; left: 50%; width: 130px; min-height: 35px; display: grid; place-items: center; gap: .12rem; padding: .28rem .42rem; transform: translateX(-50%); border: 1px solid color-mix(in srgb, var(--node) 55%, white); border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 5px 15px rgba(35,54,49,.12); }
.iso-node .iso-label strong { max-width: 118px; font-size: .64rem; line-height: 1.12; text-align: center; }
.iso-node .iso-label em { color: var(--node); font-size: .68rem; font-style: normal; font-weight: 850; }
.iso-node:hover .iso-label,.iso-node.selected .iso-label,.iso-node:focus-visible .iso-label { border-width: 2px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--node) 20%, transparent), 0 6px 18px rgba(35,54,49,.18); }
.iso-node:focus-visible { outline: none; }
.concept-node:not(.viewed) { opacity: var(--view-dim-opacity, .8); }
.concept-node.viewed { border-width: 2px; filter: brightness(var(--view-brightness, 1.15)); box-shadow: 0 0 0 var(--view-glow-ring, 3px) color-mix(in srgb, var(--node) var(--view-glow-ring-colour, 30%), transparent), 0 0 var(--view-glow-blur, 22px) color-mix(in srgb, var(--node) var(--view-glow-colour, 48%), transparent); }
.iso-node:not(.viewed) .iso-column { opacity: var(--view-dim-opacity, .8); }
.iso-node:not(.viewed) .iso-label { border-style: dashed; }
.iso-node.viewed .iso-column { filter: brightness(var(--view-brightness, 1.15)); box-shadow: 0 0 var(--view-glow-blur, 22px) var(--view-glow-ring, 3px) color-mix(in srgb, var(--node) var(--view-glow-colour, 48%), transparent); }
.iso-node.viewed .iso-label { border-width: 2px; box-shadow: 0 0 0 var(--view-glow-ring, 3px) color-mix(in srgb, var(--node) var(--view-glow-ring-colour, 30%), transparent), 0 0 var(--view-glow-blur, 22px) color-mix(in srgb, var(--node) var(--view-glow-colour, 48%), transparent); }
.graph-3d-column:not(.viewed) { opacity: var(--view-dim-opacity, .8); }
.graph-3d-column.viewed { filter: brightness(var(--view-brightness, 1.15)) drop-shadow(0 0 var(--view-glow-blur, 22px) color-mix(in srgb, var(--node) var(--view-glow-colour, 48%), transparent)); }
.graph-3d-label:not(.viewed) { border-style: dashed; }
.graph-3d-label.viewed { border-width: 2px; box-shadow: 0 0 0 var(--view-glow-ring, 3px) color-mix(in srgb, var(--node) var(--view-glow-ring-colour, 30%), transparent), 0 0 var(--view-glow-blur, 22px) color-mix(in srgb, var(--node) var(--view-glow-colour, 48%), transparent); }
.graph-zoom-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; justify-self: end; }
.graph-zoom-controls button { min-height: 32px; padding: .25rem .55rem; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--green); font-size: .68rem; font-weight: 750; cursor: pointer; }
.graph-zoom-controls button { min-width: 42px; min-height: 42px; padding: .45rem .65rem; border: 2px solid var(--green); background: var(--green-soft); font-size: .82rem; }
.graph-zoom-controls button:disabled { color: var(--muted); cursor: default; opacity: .6; }
.graph-zoom-controls output { min-width: 3.2rem; color: var(--muted); font-size: .66rem; text-align: center; }
.graph-zoom-controls output { min-width: 3.5rem; color: var(--ink); font-size: .82rem; font-weight: 750; }
.concept-node { touch-action: none; }
.concept-node:active { cursor: grabbing; }

.section-heading p { margin: -.15rem 0 .7rem; color: var(--muted); font-size: .68rem; }
.coverage-row { grid-template-columns: 8px minmax(0,1fr) auto auto auto; cursor: default; }
.coverage-row button { padding: .38rem .5rem; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--green); font-size: .6rem; font-weight: 750; cursor: pointer; }
.coverage-row button:last-child { background: var(--green-soft); }
.dialog-content { position: relative; padding: 1.45rem; }
.question-list { display: grid; gap: .55rem; margin: .9rem 0; }
.question-item { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; padding: .7rem; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfc; }
.question-item strong { font-size: .7rem; line-height: 1.35; }
.question-item span { display: block; margin-top: .2rem; color: var(--muted); font-size: .58rem; }
.question-item button { padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--green); font-size: .62rem; font-weight: 750; cursor: pointer; }
.question-csv-tools { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.question-csv-tools h3 { margin-bottom: .4rem; }
.question-csv-tools p,.question-csv-tools li { color: var(--muted); font-size: .7rem; line-height: 1.45; }
.question-csv-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.question-csv-actions > * { flex: 1; }
#question-csv-input[hidden] { display: none; }
.question-csv-actions button:hover { transform: none; }
#question-csv-preview { margin-top: 1rem; padding: .85rem; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfa; }
#question-csv-preview[hidden] { display: none; }
#question-csv-preview ul { max-height: 155px; overflow: auto; margin: .5rem 0 1rem; padding-left: 1.2rem; }
.option-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .7rem; }
.result-score { margin-bottom: .9rem; padding: 1rem; border-radius: 12px; background: var(--green-soft); text-align: center; }
.result-score strong { display: block; color: var(--green); font-size: 2rem; }
.result-score span { color: var(--muted); font-size: .7rem; }
.result-breakdown { display: grid; gap: .45rem; margin-bottom: 1rem; }
.diagnostic-result-actions { display: grid; gap: .6rem; }
.diagnostic-result-actions > [hidden] { display: none; }
.result-row { display: grid; grid-template-columns: 1fr auto auto; gap: .65rem; align-items: center; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.result-row strong { font-size: .7rem; }.result-row span { color: var(--muted); font-size: .62rem; }.result-row b { font-size: .68rem; }
.diagnostic-history { margin-top: .85rem; }
.diagnostic-history h2 { margin-bottom: .6rem; }
#diagnostic-history { display: grid; gap: .45rem; }
.diagnostic-history-item { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; width: 100%; padding: .75rem; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--muted); text-align: left; font-size: .7rem; cursor: pointer; }
.diagnostic-history-item:hover { border-color: var(--green-2); }
.diagnostic-history-item strong { color: var(--ink); }
.diagnostic-history-item span:last-child { margin-left: auto; color: var(--green); }
.review-answer { padding: .8rem; border: 1px solid var(--line); border-left: 3px solid var(--green-2); border-radius: 8px; }
.review-answer.incorrect { border-left-color: var(--red); }
.review-answer h3 { margin: .2rem 0 .45rem; font-size: .85rem; line-height: 1.4; }
.review-answer p { margin: .3rem 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.review-answer p strong { color: var(--ink); }
.progress-section { margin-top: 1.5rem; }
.progress-section .section-heading h2 { margin-bottom: .3rem; }
.progress-overview { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .7rem; margin-bottom: .7rem; }
.progress-overview > div { display: grid; gap: .35rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: white; }
.progress-overview span { color: var(--muted); font-size: .68rem; }
.progress-overview strong { font-size: 1.05rem; }
.progress-target-track { height: 7px; overflow: hidden; border-radius: 10px; background: var(--green-soft); }
.progress-target-track span { display: block; height: 100%; background: var(--green-2); }
.progress-panels { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.progress-panels h3 { margin-bottom: .85rem; font-size: .82rem; }
.progress-study-bars { height: 180px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .3rem; }
.progress-study-day { min-width: 0; display: grid; grid-template-rows: 1fr auto auto; gap: .3rem; text-align: center; color: var(--muted); font-size: .57rem; }
.progress-study-day strong { color: var(--ink); font-size: .57rem; white-space: nowrap; }
.progress-bar-track { display: flex; align-items: flex-end; overflow: hidden; border-radius: 6px; background: #f1f5f3; }
.progress-bar-track span { display: block; width: 100%; min-height: 0; border-radius: 6px; background: var(--green-2); }
.progress-answer-days { display: grid; gap: .4rem; }
.progress-answer-day { display: grid; grid-template-columns: 85px minmax(0,1fr) 35px; align-items: center; gap: .5rem; font-size: .65rem; }
.progress-answer-day progress { width: 100%; height: 10px; accent-color: var(--green-2); }
.progress-answer-day strong { text-align: right; }
.import-preview-list { margin: .75rem 0 1rem; padding-left: 1.3rem; font-size: .75rem; line-height: 1.8; }
.import-replace-hint { margin: 1.3rem 0 .5rem; }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2,1fr); }.workspace-grid { grid-template-columns: 1fr; }.inspector-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }.inspector-top,.inspector-panel>h2,.inspector-panel>p,.mastery-score,.readiness,.inspector-panel>.full-width { grid-column: 1; }.detail-section { grid-column: 2; }.recommendation { grid-template-columns: auto 1fr auto; }.impact { display: none; }.data-grid { grid-template-columns: 1fr 1fr; }
  .graph-navigation { grid-template-columns: auto minmax(0, 1fr); }
  .graph-zoom-controls { grid-column: 1 / -1; justify-self: start; }
  .graph-search-results { grid-column: 1 / -1; }
}
@media (max-width: 900px) { .header-browse-button .browse-full { display: none; }.header-browse-button .browse-short { display: inline; }.header-browse-button { padding: .5rem .6rem; }.course-switcher { min-width: 0; max-width: 180px; } }
@media (max-width: 760px) {
  .session-card .session-actions { grid-column: 1 / -1; }
  .session-actions button { flex: 1; }
  .progress-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .progress-overview > div:first-child { grid-column: 1 / -1; }
  .progress-panels { grid-template-columns: 1fr; }
  .mobile-data-button { display: inline-flex; }
  .app-header { height: 60px; grid-template-columns: 1fr auto; padding: 0 .85rem; }.course-switcher { display: none; }.app-shell { display: block; }.sidebar { position: fixed; z-index: 30; top: auto; left: 0; right: 0; bottom: 0; height: 64px; padding: .32rem; border: 0; border-top: 1px solid var(--line); }.sidebar nav { display: flex; justify-content: space-around; }.nav-label,.weekly-card,.prototype-note { display: none; }.nav-link { width: auto; flex-direction: column; gap: .1rem; padding: .35rem .45rem; font-size: .5rem; }.nav-link span { font-size: .85rem; }.nav-link:nth-of-type(n+5) { display: none; }main { padding: 1.2rem .75rem 5rem; }.page-head { display: block; }.head-actions { margin-top: .9rem; }.head-actions button { flex: 1; }.metric-grid { gap: .5rem; }.metric-card { padding: .68rem; }.metric-icon { display: none; }.graph-stage { height: 480px; }.concept-node { width: 110px; min-height: 70px; transform: translate(-50%,-50%) scale(.9); }.concept-node:hover,.concept-node.selected { transform: translate(-50%,-50%) scale(.96); }.inspector-panel { display: block; }.recommendation { grid-template-columns: auto 1fr; }.recommendation button { grid-column: 1/-1; }.two-column,.data-grid { grid-template-columns: 1fr; }.action-card { min-height: 190px; }.session-card { grid-template-columns: 55px 1fr; }.session-card > button { grid-column: 1/-1; }.form-row,.option-editor { grid-template-columns: 1fr; }.coverage-row { grid-template-columns: 8px 1fr auto auto; }.coverage-row span { display: none; }.edit-hint { display: none; }
}
@media (max-width: 760px) { .graph-navigation { grid-template-columns: 1fr; }.graph-navigation > p,.graph-search-results { grid-column: 1; }.graph-navigation > p { font-size: .61rem; }.graph-zoom-controls { justify-self: start; } }
@media (max-width: 760px) { .graph-interaction-row { align-items: flex-start; flex-direction: column; }.graph-interaction-button { width: 100%; } }
@media (max-width: 760px) { .app-header { grid-template-columns: minmax(0,1fr) auto auto; gap: .4rem; padding: 0 .65rem; }.course-controls { justify-self: end; }.theme-button { padding: .4rem .5rem; }.header-actions { gap: .35rem; }.avatar { display: none; } }
@media (max-width: 460px) { .metric-grid { grid-template-columns: 1fr; }.metric-card:nth-child(n+3) { display: none; }.graph-legend { left: .4rem; right: .4rem; justify-content: center; }.page-head h1 { font-size: 1.8rem; }.head-actions { flex-direction: column; } }
@media (max-width: 420px) { .app-header .brand > span:last-child { display: none; } }
@media (max-width: 350px) { .app-header #quick-add { display: none; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto!important; transition: none!important; } }

/* Theme 1: the colours below are inverted with the page, giving each area a distinct dark tone. */
html[data-theme="2"] .app-header { background: rgba(246, 242, 249, .97); }
html[data-theme="2"] .sidebar { background: #ebe9d9; }
html[data-theme="2"] .metric-card:nth-child(1) { background: #d7e5da; }
html[data-theme="2"] .metric-card:nth-child(2) { background: #e8dac9; }
html[data-theme="2"] .metric-card:nth-child(3) { background: #d4dde5; }
html[data-theme="2"] .metric-card:nth-child(4) { background: #e1d3df; }
html[data-theme="2"] .graph-panel, html[data-theme="2"] .content-card,
html[data-theme="2"] .course-card, html[data-theme="2"] .session-card,
html[data-theme="2"] .progress-overview > div { background: #e4e3d6; }
html[data-theme="2"] .inspector-panel { background: #dce6da; }
html[data-theme="2"] .graph-stage { --graph-grid-line: #aeb7c0; background-color: #efe3d8; }
html[data-theme="2"] .graph-stage.isometric { background-image: linear-gradient(30deg, transparent 48%, #bac2c7 49%, #bac2c7 51%, transparent 52%), linear-gradient(150deg, transparent 48%, #bac2c7 49%, #bac2c7 51%, transparent 52%); }
.graph-stage.isometric:has(.graph-canvas), html[data-theme="2"] .graph-stage.isometric:has(.graph-canvas) { background-image: none; }
html[data-theme="2"] .weekly-card, html[data-theme="2"] .course-menu,
html[data-theme="2"] .theme-menu { background: #e5e1e9; }
:where(.auth-gate, .account-menu) [hidden], .auth-gate[hidden], .account-menu[hidden] { display: none !important; }
html.auth-enabled:not(.auth-ready) .app-header,
html.auth-enabled:not(.auth-ready) .app-shell,
html.auth-enabled:not(.auth-ready) .course-menu,
html.auth-enabled:not(.auth-ready) .concept-context-menu { display: none !important; }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: var(--canvas, #f4f7f5); color: var(--ink, #17231f); }
.auth-card { width: min(100%, 430px); padding: clamp(1.5rem, 5vw, 2.5rem); background: var(--surface, #fff); border: 1px solid #bdccc5; border-radius: 20px; box-shadow: 0 18px 60px #13281b1c; }
.auth-card h1 { margin: .4rem 0; font-size: clamp(1.65rem, 4vw, 2.3rem); }
.auth-card p { line-height: 1.5; }
.auth-card form { display: grid; gap: 1rem; margin-top: 1.2rem; }
.auth-card label { display: grid; gap: .4rem; font-weight: 600; }
.auth-card input { width: 100%; min-height: 44px; padding: .65rem .8rem; border: 1px solid #8c9e95; border-radius: 9px; background: #fff; color: #17231f; font: inherit; }
.auth-card input:focus-visible { outline: 3px solid #358bd2; outline-offset: 2px; }
.auth-card .auth-remember { display: flex; align-items: center; gap: .7rem; min-height: 44px; cursor: pointer; }
.auth-card .auth-remember input { width: 22px; height: 22px; min-height: 22px; padding: 0; flex: 0 0 22px; accent-color: #145eaa; }
.auth-card #auth-remember-help { margin-top: -.7rem; line-height: 1.5; }
.auth-tabs { display: flex; gap: .5rem; margin-top: 1.2rem; }
.auth-tabs button { flex: 1; min-height: 44px; border: 1px solid #81998b; border-radius: 9px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.auth-tabs button[aria-pressed="true"] { background: #145eaa; border-color: #145eaa; color: white; font-weight: 700; }
.auth-text-button { min-height: 44px; margin-top: .8rem; padding: .4rem 0; border: 0; background: transparent; color: #145eaa; text-decoration: underline; font: inherit; cursor: pointer; }
.auth-message { min-height: 1.5rem; font-weight: 600; }
.auth-message.error { color: #a3192a; }
.account-menu { position: fixed; z-index: 50; top: 70px; right: 1rem; width: min(340px, calc(100vw - 2rem)); padding: 1rem; border: 1px solid #879b90; border-radius: 12px; background: #fff; color: #17231f; box-shadow: 0 12px 40px #102a2040; }
.account-menu strong { overflow-wrap: anywhere; }
.account-menu p { margin: .7rem 0; }
.account-menu button { width: 100%; min-height: 44px; margin-top: .35rem; padding: .5rem .65rem; border: 1px solid #82998d; border-radius: 8px; background: #edf4f0; color: #17231f; text-align: left; font: inherit; cursor: pointer; }
.account-menu button:hover { background: #d9e8df; }
@media (max-width: 760px) { .app-header #account-button:not([hidden]) { display: grid; place-items: center; } }

/* Keep concept creation visible alongside the main map actions. */
.page-head:has(.map-head-actions) { display:grid; grid-template-columns:minmax(300px, 1fr) minmax(0, 1.1fr); align-items:center; gap:1rem 1.5rem; }
.page-head:has(.map-head-actions) > div:first-child { min-width:0; }
.page-head:has(.map-head-actions) .map-head-actions { display:flex; justify-content:flex-end; align-items:center; gap:.55rem; }
.page-head:has(.map-head-actions) .map-head-actions button { flex:0 0 auto; min-height:40px; padding:.55rem .75rem; font-size:.78rem; }
@media (max-width:1350px) { .page-head:has(.map-head-actions) { grid-template-columns:1fr; } .page-head:has(.map-head-actions) .map-head-actions { justify-content:flex-start; } }
@media (max-width:560px) { .page-head:has(.map-head-actions) .map-head-actions button { flex:1 1 auto; } }
.map-head-actions { flex: 0 1 auto; flex-wrap: wrap; }
.head-actions .new-concept-button { background: #245ab5; border: 2px solid #174289; color: #fff; font-weight: 800; box-shadow: 0 5px 14px #245ab52b; }
.head-actions .new-concept-button:hover { background: #174289; }
html[data-theme="2"] .head-actions .new-concept-button { background: #dba54a; border-color: #e8bd76; color: #000; box-shadow: 0 5px 14px #dba54a2b; }
html[data-theme="2"] .head-actions .new-concept-button:hover { background: #e8bd76; }

.question-figure { margin: 1rem 0; padding: .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.question-figure img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #fff; border-radius: 6px; }
.question-figure > a { display: block; }
.question-figure figcaption { margin-top: .6rem; font-size: .75rem; line-height: 1.5; color: var(--muted); }
html[data-theme="2"] .question-figure img { filter: invert(1); }
.question-image-editor { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.question-image-editor legend { font-weight: 750; }
.question-image-editor p { font-size: .8rem; line-height: 1.5; color: var(--muted); }

.sharing-banner { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem; margin:1rem 0; padding:1.2rem; border:2px solid var(--green); border-radius:14px; background:var(--surface); }
.sharing-banner h2 { margin:0 0 .4rem; font-size:1.2rem; }
.sharing-banner p { margin:0; }
.sharing-modal { width:min(900px,94vw); }
.sharing-tabs, .sharing-actions, .sharing-pagination { display:flex; flex-wrap:wrap; gap:.6rem; margin:1rem 0; }
.sharing-tabs button[aria-pressed="true"] { background:var(--green); color:var(--bg); border-color:var(--green); }
.sharing-inline { display:flex; gap:.75rem; align-items:flex-end; margin:1rem 0; }
.sharing-inline label { flex:1; margin:0; }
.sharing-inline button { flex-shrink:0; min-height:44px; }
.sharing-panel { margin-top:1.5rem; padding:1rem; border:1px solid var(--line); border-radius:12px; }
.sharing-panel h4 { margin-top:1.5rem; }
.sharing-check { display:flex !important; align-items:flex-start; gap:.7rem; line-height:1.5; }
.sharing-check input { width:20px; height:20px; flex-shrink:0; margin-top:.2rem; }
.sharing-members { padding:0; list-style:none; }
.sharing-members li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.6rem; padding:.6rem 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.sharing-status { min-height:2rem; padding:.75rem; border-radius:8px; background:var(--surface); line-height:1.5; }
.sharing-status[data-tone="error"] { border:2px solid #d45b5b; }
.sharing-status[data-tone="warning"] { border:2px solid #d4a85b; }
.sharing-modal button { min-height:42px; }
@media(max-width:600px) { .sharing-inline { flex-direction:column; align-items:stretch; } #header-share-courses { font-size:.7rem; padding:.4rem .5rem; } .sharing-actions button { width:100%; } }

@media(max-width:760px) { .app-header { height:auto; min-height:72px; padding-top:.5rem; padding-bottom:.5rem; } .course-controls { flex-wrap:wrap; justify-content:flex-end; } #header-share-courses { flex-basis:auto; } }
.sharing-modal [hidden], .sharing-banner[hidden] { display:none !important; }

.header-sharing-hint { display: block; margin-top: .2rem; font-size: .65rem; line-height: 1.2; font-weight: 600; white-space: normal; }
.header-sharing-hint[hidden] { display: none; }

#shared-refresh { min-width: 175px; background: #245ab5; border: 2px solid #174289; color: #fff; font-weight: 800; }
#shared-refresh:hover { background: #174289; }
#shared-refresh:focus-visible { outline: 3px solid #245ab5; outline-offset: 3px; }

.workspace-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
#shared-workspace-banner.is-minimised { padding: .35rem .7rem; gap: .4rem; margin: .5rem 0; }
#shared-workspace-banner.is-minimised p { font-size: .8rem; }
#shared-workspace-banner.is-minimised button { padding: .35rem .6rem; min-height: 36px; font-size: .75rem; }

#shared-workspace-banner { position: relative; padding-right: 4rem; }
#shared-workspace-banner.is-minimised { padding-right: 4rem; }
#shared-workspace-banner #toggle-workspace-banner { position: absolute; top: .4rem; right: .4rem; width: 40px; height: 36px; min-height: 36px; padding: 0; display: grid; place-items: center; font-size: 1.35rem; line-height: 1; }


.plan-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.plan-features section { border: 1px solid var(--line); border-radius: 12px; padding: .8rem; }
@media (max-width: 600px) { .plan-features { grid-template-columns: 1fr; } }

#plan-dialog button[hidden] { display: none; }

#trial-card-note { margin: .35rem 0 .8rem; color: var(--ink); font-size: .9rem; font-weight: 700; }
#start-premium-trial[hidden] + #trial-card-note { display: none; }


.flashcard-answer { padding: 1rem; margin: 1rem 0; border: 2px solid var(--blue, #2774df); border-radius: 12px; white-space: pre-wrap; font-size: 1.1rem; line-height: 1.6; overflow-wrap: anywhere; }

/* Lecture study notes keep their headings and worked steps readable. */
.study-notes p { white-space: pre-line; font-size: .9rem; line-height: 1.65; overflow-wrap: anywhere; }
.study-notes strong { overflow-wrap: anywhere; }

.local-preview-notice { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; padding: 1rem; background: #183a66; color: #fff; border-bottom: 2px solid #76bbff; font-size: .95rem; line-height: 1.5; }
.local-preview-notice[hidden], #local-preview-entry[hidden] { display: none; }
.local-preview-notice a { color: #fff; text-decoration: underline; font-weight: 750; margin-left: auto; }
#local-preview-entry small { display: block; margin-top: .6rem; line-height: 1.5; }
#local-preview-entry a { text-decoration: none; text-align: center; }

/* Connections stay distinct from the fine floor grid in every graph view. */
.graph-stage .edge { stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: none; vector-effect: non-scaling-stroke; }
.graph-stage .edge-prerequisite { stroke: #00855a; }
.graph-stage .edge-supports { stroke: #087bdb; }
.graph-stage .edge-example { stroke: #873bd1; stroke-dasharray: 10 6; }
.graph-stage .edge-contradicts { stroke: #d62839; stroke-dasharray: 3 5; }
/* Theme 1 inverts the page: these source colours produce bright cyan/green/purple/coral lines. */
html[data-theme="2"] .graph-stage .edge-prerequisite { stroke: #cb2c66; }
html[data-theme="2"] .graph-stage .edge-supports { stroke: #c74207; }
html[data-theme="2"] .graph-stage .edge-example { stroke: #3f7b03; }
html[data-theme="2"] .graph-stage .edge-contradicts { stroke: #078e8e; }

.graph-region-controls { display: flex; flex-wrap: wrap; gap: .65rem; padding: .8rem; border-top: 1px solid var(--line); background: #f5f8fc; }
.graph-region-controls[hidden] { display: none; }
.region-control { display: grid; gap: .25rem; flex: 1 1 230px; padding: .75rem 1rem; text-align: left; border: 2px solid #087bdb; border-radius: 10px; background: #fff; color: #173350; cursor: pointer; }
.region-control strong { font-size: .95rem; }.region-control span { font-size: .8rem; }.region-control b { color: #087bdb; font-size: .85rem; }
.region-control.region-diodes { border-color: #873bd1; }.region-control.region-diodes b { color: #873bd1; }
svg.graph-regions { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.graph-region polygon { fill: #087bdb; fill-opacity: .07; stroke: #087bdb; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.graph-region text { fill: #07599c; font-size: 13px; font-weight: 800; }
.graph-region.region-diodes polygon { fill: #873bd1; stroke: #873bd1; }.graph-region.region-diodes text { fill: #632596; }
.graph-3d-scene .graph-region text { font-size: 15px; }
.region-summary { width: 190px; min-height: 100px; padding: .8rem; border: 3px solid #087bdb; background: #fff; color: #173350; cursor: pointer; }
.region-summary strong { max-width: none; font-size: .9rem; line-height: 1.3; }.region-summary span,.region-summary em,.region-summary small { font-size: .78rem; line-height: 1.4; }
.region-summary.region-diodes { border-color: #873bd1; }
.iso-node.region-summary .iso-label { width: 190px; padding: .8rem; border: 3px solid #087bdb; }.iso-node.region-summary.region-diodes .iso-label { border-color: #873bd1; }
.iso-node.region-summary .iso-label strong { max-width: none; font-size: .9rem; }
html[data-theme="2"] .graph-region.region-logic polygon { fill: #c74207; stroke: #c74207; }
html[data-theme="2"] .graph-region.region-logic text { fill: #c74207; }
html[data-theme="2"] .graph-region.region-diodes polygon { fill: #3f7b03; stroke: #3f7b03; }
html[data-theme="2"] .graph-region.region-diodes text { fill: #3f7b03; }

.region-panel { margin: 12px 0; }
.region-panel > header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px; }
.graph-region-controls { max-height:240px; overflow:auto; }
.region-card { display:flex; gap:6px; align-items:center; flex:1 1 260px; }
.region-card .region-control { flex:1; min-width:0; }
.graph-region-labels { position:absolute; inset:0; pointer-events:none; }
.graph-region-label { position:absolute; font:700 17px/1.3 system-ui,sans-serif; max-width:240px; padding:4px 8px; border-radius:6px; background:var(--panel,#fff); color:var(--text,#172b4d); box-shadow:0 1px 4px #0002; overflow-wrap:anywhere; }
.region-teal { --region-fill:#14b8a6; --region-stroke:#0d9488; }
.region-amber { --region-fill:#f59e0b; --region-stroke:#d97706; }
.region-rose { --region-fill:#f43f5e; --region-stroke:#e11d48; }
.region-slate { --region-fill:#64748b; --region-stroke:#475569; }
.graph-region polygon { fill:var(--region-fill); stroke:var(--region-stroke); }
.region-concept-picker { max-height:280px; overflow:auto; display:grid; gap:8px; }
.region-concept-picker label { display:flex; align-items:center; gap:8px; }
.region-concept-picker input { width:auto; }

.region-logic { --region-fill:#087bdb; --region-stroke:#087bdb; }
.region-diodes { --region-fill:#873bd1; --region-stroke:#873bd1; }
.region-control { border-color:var(--region-stroke,#087bdb); }
.region-control b { color:var(--region-stroke,#087bdb); }
.graph-region-label { border-left:4px solid var(--region-stroke,#087bdb); }

/* Long concept notes scroll beside the graph instead of setting the page row height. */
@media (min-width: 1081px) {
  .workspace-grid { position: relative; }
  .workspace-grid > .graph-panel { grid-column: 1; }
  .workspace-grid > .inspector-panel { position: absolute; top: 0; bottom: 0; right: 0; width: 315px; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
}


/* Cognivoke responsive branding: preserve the existing theme engine. */
.brand { min-width:0; gap:.65rem; }
.brand-mascot { flex:none; width:51px; height:67px; object-fit:contain; }
.brand-name { display:flex; flex-direction:column; line-height:1.05; font-size:1.35rem; letter-spacing:-.035em; white-space:nowrap; }
.brand-name > span { display:inline; }
.brand-name { display:block; }
.brand-name small { display:block; margin-top:.34rem; font-size:.52rem; font-weight:650; letter-spacing:.15em; text-transform:uppercase; color:var(--muted); }
.brand-name > span { color:#078bb3!important; }
.app-header { grid-template-columns:minmax(205px, 270px) minmax(0,1fr) auto; gap:.7rem; }
.course-controls { justify-self:center; flex-wrap:nowrap; }
.theme-button, .header-browse-button { border-color:#078bb3; color:#087fa6; background:#e9f9fd; }
.theme-button:focus-visible, .header-browse-button:focus-visible { outline-color:#078bb3; }
.header-browse-button:hover { background:#d5f1fa; }
html[data-theme="2"] .brand-name > span { color:#b92c10!important; }
html[data-theme="2"] .theme-button,
html[data-theme="2"] .header-browse-button { border-color:#b92c10; color:#b92c10; background:#f4fbff; }
html[data-theme="2"] .header-browse-button:hover,
html[data-theme="2"] .theme-button:hover { background:#e8f7ff; }
/* Both dark palettes invert the page. Counter-invert only the mascot image,
   as in the original classic-dark fix, so its natural dark artwork remains. */
html[data-theme="1"] .brand-mascot,
html[data-theme="2"] .brand-mascot {
  filter: invert(1);
  -webkit-filter: invert(1);
}
@media (max-width: 1080px) {
 .app-header { grid-template-columns:minmax(185px,auto) minmax(0,1fr) auto; }
 .brand-name { font-size:1.13rem; }
 .brand-mascot { width:40px; height:53px; }
}
@media (max-width:760px) {
 .app-header { grid-template-columns:minmax(0,1fr) auto; gap:.5rem; padding:.4rem .65rem .55rem; }
 .app-header .brand { grid-column:1; grid-row:1; }
 .brand-mascot { width:39px; height:51px; }
 .brand-name { font-size:clamp(.95rem,4.5vw,1.3rem); }
 .brand-name small { font-size:.45rem; letter-spacing:.08em; }
 .app-header .brand > span:last-child { display:block; }
 .header-actions { grid-column:2; grid-row:1; }
 .course-controls { grid-column:1 / -1; grid-row:2; justify-self:stretch; display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,.85fr) minmax(0,1.25fr); gap:.35rem; width:100%; flex-wrap:nowrap; }
 .course-controls .course-switcher { display:none; }
 .course-controls .theme-button,.course-controls .header-browse-button { min-width:0; width:100%; min-height:42px; justify-content:center; padding:.38rem .18rem; font-size:clamp(.63rem,2.55vw,.82rem); white-space:nowrap; border-radius:10px; }
 .course-controls .theme-button { display:flex; }
 .course-controls .theme-menu { top:calc(100% + 6px); }
 .course-controls #header-share-courses { font-size:clamp(.58rem,2.45vw,.8rem); padding:.35rem .1rem; }
}
@media (max-width:420px) { .app-header .brand > span:last-child { display:block; } }
@media (max-width:350px) { .brand-mascot {width:34px;height:45px;} .brand-name {font-size:.9rem;} .brand-name small {font-size:.39rem;} .course-controls {gap:.2rem;} }


/* Keep the main creation controls coordinated with the new cyan header. */
.head-actions .secondary-button { border-color:#078bb3; background:#e9f9fd; color:#087fa6; }
html[data-theme="2"] .head-actions .secondary-button { border-color:#b92c10; background:#f4fbff; color:#b92c10; }
html[data-theme="2"] .head-actions .secondary-button:hover { background:#e8f7ff; }

/* Guided tutorials and concept-specific forecast cards. */
.header-help-button { border:1px solid currentColor; background:transparent; border-radius:9px; padding:.5rem .8rem; color:inherit; cursor:pointer; font:inherit; }
.help-tour-dialog { width:min(440px, calc(100vw - 28px)); max-height:88vh; border:1px solid #c4d4ce; border-radius:16px; padding:1.4rem; color:#17392c; background:#fff; box-shadow:0 16px 55px #0005; }
.help-tour-dialog::backdrop { background:#081e1bd0; }
.help-tour-body { position:relative; }
.help-tour-body #help-close { position:absolute; top:0; right:0; }
#help-tour-choices { display:grid; gap:.6rem; margin-top:1rem; }
#help-tour-choices button, .help-tour-actions button { min-height:40px; cursor:pointer; border:1px solid #08775b; border-radius:8px; background:#ebf6ef; color:#07583f; }
.help-tour-actions { display:flex; justify-content:space-between; gap:.6rem; margin-top:1rem; }
.help-tour-highlight { outline:4px solid #16a37b!important; outline-offset:4px; position:relative; z-index:5; }
/* Step guide leaves the interface visible and points to real controls. */
.help-tour-dialog:not(:modal) { position:fixed; inset:auto 20px 20px auto; margin:0; z-index:1001; width:min(390px,calc(100vw - 40px)); box-shadow:0 18px 60px #0008; }
.help-tour-dialog:not(:modal) #help-tour-choices { display:none; }
.help-tour-dialog:not(:modal) #help-tour-step { display:block; }
.help-tour-dialog:not(:modal) #help-tour-next, .help-tour-dialog:not(:modal) #help-tour-finish { cursor:pointer; }
.concept-retention-chart { width:100%; display:block; max-height:145px; }
.concept-retention-legend { font-size:.78rem; color:var(--muted); }
.concept-retention-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; margin:.6rem 0; }
.concept-retention-stats > div { border:1px solid var(--line); border-radius:8px; padding:.6rem; }
.concept-retention-stats strong { display:block; font-size:1.15rem; }
.concept-retention-stats span { font-size:.75rem; }

/* Expanded mastery graph; keeps existing zoom, drag, regions and view modes. */
.graph-panel:fullscreen { display:flex; flex-direction:column; background:var(--surface, #fff); padding:1rem; overflow:auto; }
/* Native fullscreen moves the panel to the top layer, outside the root filter. */
html[data-theme="1"] .graph-panel:fullscreen,
html[data-theme="2"] .graph-panel:fullscreen {
  filter: invert(1);
  -webkit-filter: invert(1);
  background-color: var(--paper);
}
.graph-panel:fullscreen .graph-stage { flex:1 1 auto; height:auto; min-height:55vh; }
.graph-panel:fullscreen .graph-navigation { flex:0 0 auto; }
.graph-panel:fullscreen .panel-head { flex:0 0 auto; }
.sound-toggle { float:right; margin:0 2.5rem .5rem .5rem; padding:.4rem .65rem; font-size:.76rem; }

.graph-panel.graph-expanded-fallback { position:fixed; inset:0; z-index:10000; display:flex; flex-direction:column; overflow:auto; padding:1rem; background:var(--surface, #fff); }
.graph-panel.graph-expanded-fallback .graph-stage { flex:1 1 auto; height:auto; min-height:55vh; }
.graph-panel.graph-expanded-fallback .panel-head, .graph-panel.graph-expanded-fallback .graph-navigation { flex:0 0 auto; }

/* Compact sound actions; reveal the range only when the user wants it. */
.diagnostic-audio-controls { position:relative; display:flex; align-items:center; justify-content:flex-end; gap:.2rem; min-height:2rem; margin:0 2.5rem .65rem 0; }
.diagnostic-audio-controls .sound-toggle,
.diagnostic-audio-controls .diagnostic-sound-settings-toggle { float:none; margin:0; min-width:2.1rem; min-height:2rem; padding:.25rem .4rem; font-size:.86rem; }
.diagnostic-audio-controls .diagnostic-sound-settings-toggle { min-width:1.5rem; padding:.25rem; }
.diagnostic-sound-settings { position:absolute; top:calc(100% + .35rem); right:0; z-index:2; padding:.7rem .85rem; background:var(--surface, #fff); border:1px solid var(--line); border-radius:.7rem; box-shadow:0 8px 22px rgba(0,0,0,.13); }
.diagnostic-sound-settings[hidden] { display:none; }
.diagnostic-volume-label { display:flex; align-items:center; gap:.45rem; font-size:.76rem; color:var(--ink); white-space:nowrap; }
.diagnostic-volume-label input[type="range"] { width:clamp(110px, 20vw, 170px); accent-color:var(--green); margin:0; }
.diagnostic-volume-label output { min-width:4ch; text-align:right; font-variant-numeric:tabular-nums; }

/* Drag the header divider upward in expanded mode to prioritise the graph. */
.graph-space-resizer { display:none; }
.graph-panel:fullscreen .graph-space-resizer,
.graph-panel.graph-expanded-fallback .graph-space-resizer {
  display:flex; flex:0 0 23px; align-items:center; justify-content:center; gap:.65rem;
  cursor:ns-resize; touch-action:none; user-select:none; border-block:1px solid var(--line);
  color:var(--muted); font-size:.68rem; margin:.25rem 0 .4rem;
}
.graph-resizer-grip { width:55px; height:5px; border-radius:100px; background:var(--muted); opacity:.6; }
.graph-space-resizer:focus-visible { outline:2px solid var(--green); outline-offset:2px; }
.graph-panel:fullscreen .graph-expanded-controls,
.graph-panel.graph-expanded-fallback .graph-expanded-controls { max-height:none; }
.graph-panel:fullscreen .graph-stage,
.graph-panel.graph-expanded-fallback .graph-stage { min-height:0; }
.graph-panel:fullscreen .graph-navigation,
.graph-panel.graph-expanded-fallback .graph-navigation { min-height:0; }
.graph-panel:fullscreen .graph-region-section,
.graph-panel.graph-expanded-fallback .graph-region-section { min-height:0; }

.graph-panel:fullscreen .graph-expanded-controls,
.graph-panel.graph-expanded-fallback .graph-expanded-controls {
  display:block; flex:0 1 auto; overflow-y:auto; overscroll-behavior:contain;
  min-height:58px;
}

/* Theme 1: Obsidian green. Inversion allows the existing light-first component
   rules to remain readable; these pre-inverted values render as dark forest
   surfaces and jade accents. Theme 2 retains the original dark appearance. */
html[data-theme="1"] {
  filter: invert(1);
  --paper: #f7eef2;
  --surface: #e9d6df;
  --ink: #1b1018;
  --muted: #453443;
  --line: #986e84;
  --green: #673a53;
  --green-2: #70405b;
  --green-soft: #d6b7c5;
  --blue: #80512b;
  --blue-soft: #d8c9bc;
  --amber: #3156b8;
  --amber-soft: #d8d6c4;
  --red: #159b9d;
  --red-soft: #e1c9d1;
  --violet: #6858a8;
  --shadow: 0 16px 40px rgba(30, 52, 40, .12);
}
/* Theme 1: subtle atmospheric colour behind see-through glass surfaces.
   The CSS colours are pre-inverted by the existing theme system. The resulting
   onscreen effect is a very restrained moss/teal ambient glow, NOT a busy image. */
html[data-theme="1"] body,
html[data-theme="1"] .auth-gate {
  background-color: #f7eef2;
  background-image:
    radial-gradient(ellipse 55% 63% at 78% 26%, rgba(157, 105, 129, .12), transparent 77%),
    radial-gradient(ellipse 49% 59% at 16% 81%, rgba(168, 136, 120, .10), transparent 78%),
    linear-gradient(135deg, #f7eef2 0%, #f4ebf0 100%);
  background-attachment: fixed;
}
/* Semi-transparent graded panels produce a glass sheen without blurring text.
   The translucent face carries the effect; controls and fonts stay opaque. */
html[data-theme="1"] :is(.graph-panel,.inspector-panel,.content-card,.course-card,.session-card,.question-figure) {
  background: linear-gradient(125deg, rgba(221, 192, 207, .62), rgba(231, 209, 219, .49));
  border-color: rgba(189, 155, 176, .65);
  backdrop-filter: none;
}
html[data-theme="1"] :is(.modal,.theme-menu,.account-menu,.concept-context-menu) {
  background: rgba(228, 207, 217, .95);
  border-color: var(--line);
}
html[data-theme="1"] :is(.concept-node,.region-summary,.iso-node .iso-label,.graph-3d-label,.graph-legend,.region-control,.graph-region-label) {
  background: #dcc3d1; color: #1f141c;
}
/* A low-glare, low-saturation obsidian palette with gently raised forest panels.
   Theme 1 alone uses inverted source colours to match the existing light-first
   UI. The displayed hues are: shell #101914, panels #1b3026, ink #e0ebe3,
   muted mint #83af93. Preserve the other two themes. */
html[data-theme="1"] .concept-node.locked { background: #d7c7d0; }
html[data-theme="1"] .app-header { background: rgba(241, 232, 237, .74); backdrop-filter: none; }
html[data-theme="1"] .sidebar { background: rgba(235, 222, 229, .68); }
html[data-theme="1"] .metric-card {
  background: linear-gradient(135deg, rgba(220, 190, 206, .59), rgba(229, 208, 219, .48));
  border-color: rgba(189, 155, 176, .63);
}
html[data-theme="1"] .graph-stage { --graph-grid-line: #d5bdcc; background-color: rgba(235, 219, 227, .38); }
html[data-theme="1"] .graph-stage::before { background: none; }
html[data-theme="1"] .graph-stage.isometric { background-color: rgba(235, 219, 227, .38); background-image: none; }
html[data-theme="1"] .graph-stage.three-dimensional { background: rgba(231, 212, 221, .50); }
html[data-theme="1"] .graph-region-controls { background: rgba(225, 203, 214, .52); }
html[data-theme="1"] .brand-name > span { color: #7c506c !important; }
html[data-theme="1"] .theme-button,
html[data-theme="1"] .header-browse-button { border-color: #91637e; color: #673a53; background: rgba(225, 203, 214, .59); }
html[data-theme="1"] .theme-button:hover,
html[data-theme="1"] .header-browse-button:hover { background: #d6b5c5; }
html[data-theme="1"] .head-actions .secondary-button { border-color: #91637e; color: #673a53; background: rgba(225, 203, 214, .59); }
html[data-theme="1"] .nav-link.active { background: rgba(216, 185, 200, .70); color: #673a53; }
html[data-theme="1"] .nav-link:not(.active) { color: #4b3544; }
html[data-theme="1"] .nav-link span { color: #674f5e; }
html[data-theme="1"] .nav-label { color: #6d5865; }
html[data-theme="1"] .nav-link:hover { color: var(--ink); background: rgba(216, 185, 200, .34); }
html[data-theme="1"] .auth-card {
  background: linear-gradient(160deg, rgba(220, 190, 205, .64), rgba(228, 205, 216, .50));
  border-color: rgba(189, 155, 176, .68);
  backdrop-filter: none;
}
html[data-theme="1"] .auth-card input { background: #ebdae4; color: #1f141c; border-color: #bd9bb0; }
html[data-theme="1"] .auth-tabs button[aria-pressed="true"] { background: #885675; border-color: #885675; color: #fff; }
html[data-theme="1"] .auth-tabs button { border-color: var(--line); }
html[data-theme="1"] .auth-text-button { color: #673a53; }
html[data-theme="1"] .graph-zoom-controls button { border-color: var(--line); }
html[data-theme="1"] .graph-navigation input { background: #ebdae4; border-color: var(--line); color: #1f141c; }
html[data-theme="1"] .graph-iso-grid { stroke: #c6abbb; }
html[data-theme="1"] .graph-stage .edge-prerequisite { stroke: #7c506c; }
html[data-theme="1"] .graph-stage .edge-supports { stroke: #7c5c4c; }
html[data-theme="1"] .graph-stage .edge-example { stroke: #655277; }
html[data-theme="1"] .graph-stage .edge-contradicts { stroke: #58776e; }
html[data-theme="1"] .graph-interaction-button { background: #784661; border-color: #784661; color: #fff; box-shadow: none; }
html[data-theme="1"] .graph-interaction-button:hover { background: #6d3e58; }
html[data-theme="1"] .graph-interaction-button[aria-pressed="true"] { background: transparent; color: #673a53; }
html[data-theme="1"] .head-actions .new-concept-button { background: #784661; border-color: #86526e; color: #fff; box-shadow: none; }
html[data-theme="1"] .head-actions .new-concept-button:hover { background: #6d3e58; }
/* The base .primary-button is green before inversion, hence pink after it.
   Give this action a dedicated pre-inverted sage palette on Theme 1 alone. */
html[data-theme="1"] .map-head-actions #start-diagnostic {
  background: linear-gradient(180deg, #744763, #85566f);
  border: 1px solid #693e58;
  color: #fff;
  box-shadow: 0 6px 16px rgba(33, 65, 48, .12);
}
html[data-theme="1"] .map-head-actions #start-diagnostic:hover {
  background: linear-gradient(180deg, #69405b, #774963);
}
html[data-theme="1"] .question-figure img { filter: invert(1); }


/* Lock view freezes gesture navigation but keeps node clicks, keyboard focus,
   and natural page scrolling usable (particularly on mobile touch screens). */
.graph-interaction-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .55rem; }
.graph-view-lock-button {
  flex: 0 0 auto; min-height: 46px; padding: .68rem .92rem;
  border: 2px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink);
  font-size: .78rem; font-weight: 800; cursor: pointer;
}
.graph-view-lock-button:hover { border-color: var(--green); color: var(--green); }
.graph-view-lock-button[aria-pressed="true"] {
  border-color: var(--green); background: var(--green-soft);
  color: var(--green);
}
.graph-view-lock-button:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.graph-interaction-button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.graph-stage.graph-view-locked,
.graph-stage.graph-view-locked:active { cursor: default; touch-action: pan-y pinch-zoom; }
.graph-stage.graph-view-locked :is(.concept-node,.iso-node,.graph-3d-label,.graph-canvas,.graph-3d-scene) {
  touch-action: pan-y pinch-zoom;
}
.graph-stage.graph-view-locked .edge-hit,
.graph-stage.graph-view-locked .region-hit,
.graph-stage.graph-view-locked .graph-region-label { cursor: default; }
@media (max-width: 760px) {
  .graph-interaction-actions { width: 100%; }
  .graph-interaction-actions > button { flex: 1 1 0; min-width: 0; }
}

/* Visible line remains thin, but the transparent hit area makes right-click
   removal practical at different zoom levels. Boundary interior stays pannable. */
.graph-stage .edge-hit { stroke: transparent; stroke-width: 18; fill: none; pointer-events: stroke; cursor: context-menu; vector-effect: non-scaling-stroke; }
.graph-stage .edge[data-relationship-id],.graph-stage [data-relationship-id] { cursor: context-menu; }
.graph-regions .graph-region .region-hit,.graph-3d-scene .graph-region .region-hit { fill: none !important; stroke: transparent !important; stroke-width: 16; pointer-events: stroke; vector-effect: non-scaling-stroke; cursor: context-menu; }
.graph-region-labels .graph-region-label[data-region-boundary] { pointer-events: auto; cursor: context-menu; }
.graph-stage.graph-interaction-off .edge-hit,.graph-stage.graph-interaction-off .region-hit { cursor: grab; }
.graph-stage.graph-interaction-off .graph-region-label { cursor: grab; }

/* Four mastery-map actions should occupy two compact rows on phones, rather
   than consume a full-screen vertical stack. Desktop layout is untouched. */
@media (max-width: 560px) {
  .page-head:has(.map-head-actions) { display: flex; flex-direction: column; align-items: stretch; gap: .65rem; }
  .page-head:has(.map-head-actions) .map-head-actions {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%; gap: .55rem; margin-top: .5rem; justify-content: stretch;
  }
  .page-head:has(.map-head-actions) .map-head-actions button {
    min-width: 0; width: 100%; min-height: 52px;
    padding: .6rem .3rem; font-size: .76rem; line-height: 1.25;
    white-space: normal; overflow-wrap: anywhere; text-align: center;
  }
}
@media (max-width: 350px) {
  .page-head:has(.map-head-actions) .map-head-actions { gap: .4rem; }
  .page-head:has(.map-head-actions) .map-head-actions button { font-size: .7rem; }
}

/* Flexible question-bank CSV upload and paste controls. */
.question-csv-mode, .question-csv-paste { display: grid; gap: .35rem; margin: .85rem 0; font-size: .74rem; font-weight: 650; }
.question-csv-mode select,.question-csv-paste textarea { width: 100%; min-width: 0; padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
#preview-pasted-csv { min-height: 42px; margin-bottom: .6rem; }
#question-csv-details { padding-left: 1.3rem; max-height: 260px; overflow: auto; }
#question-csv-details li { margin-bottom: .35rem; overflow-wrap: anywhere; }
#question-csv-details .csv-error { color: var(--red); }
#question-csv-details .csv-warning { color: var(--amber); }
.csv-option-review summary { cursor: pointer; font-weight: 650; }
.csv-option-review ol { margin: .5rem 0; padding-left: 1.3rem; }
.csv-option-review li { font-weight: 400; }
.question-csv-review { display: flex; align-items: flex-start; gap: .65rem; margin: .7rem 0; padding: .65rem; border: 1px solid var(--amber); border-radius: 8px; font-size: .75rem; line-height: 1.4; }
.question-csv-review[hidden] { display: none; }
.question-csv-review input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: .08rem; }


/* Bars stay directly selectable when 3D concept cards are minimised. */
#graph-labels-toggle[hidden] { display: none; }
.graph-3d-column { pointer-events: visiblePainted; cursor: pointer; touch-action: none; }
.graph-3d-column.selected { stroke-width: 2; }
.graph-3d-column:focus-visible { outline: none; stroke: var(--ink); stroke-width: 3; }

/* Each view has its own label preference; compact targets retain accessible names. */
.graph-labels-minimised .graph-region-labels { display: none; }
.graph-labels-minimised .concept-node:not(.label-revealed):not(:focus-visible) {
  width: 32px; min-height: 32px; padding: 0; border-radius: 50%;
}
.graph-labels-minimised .concept-node:not(.label-revealed):not(:focus-visible) :is(strong,small,em,span:not(.node-dot)) { display: none; }
.graph-labels-minimised .concept-node:not(.label-revealed):not(:focus-visible) .node-dot { left: 11px; top: 11px; }
.graph-labels-minimised .iso-node:not(.label-revealed):not(:focus-visible) { width: 44px; height: calc(var(--bar-height) + 12px); }
.graph-labels-minimised .iso-node:not(.label-revealed):not(:focus-visible) .iso-label { display: none; }
#context-connections[hidden] { display: none; }
#context-connections { padding: .5rem; border-top: 1px solid var(--line); }
#context-connections label { display: block; font-size: .75rem; margin-bottom: .4rem; }
#concept-connection-select { width: 100%; min-width: 0; max-width: 100%; padding: .5rem; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; }
#remove-selected-connection:disabled { opacity: .5; cursor: default; }
.concept-context-menu { max-height: calc(100dvh - 16px); overflow-y: auto; }

/* Optional 2D mastery-only cards keep the percentage as the visual focus. */
#graph-percentages-toggle[hidden], #graph-camera-controls[hidden] { display: none; }
.graph-stage.graph-percentages-only .concept-node { width: 76px; min-height: 68px; padding: .45rem; border-radius: 12px; }
.graph-stage.graph-percentages-only .concept-node :is(strong,small,span) { display: none; }
.graph-stage.graph-percentages-only .concept-node em { display: block; font-size: 1.5rem; line-height: 1.2; font-weight: 850; }
.graph-stage.graph-percentages-only .graph-region-labels { display: none; }
.graph-camera-controls { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .5rem .9rem; border-top: 1px solid var(--line); }
.graph-viewcube { position: relative; width: 128px; height: 110px; flex: 0 0 128px; }
.graph-viewcube button { position: absolute; border: 0; font-size: .68rem; font-weight: 800; cursor: pointer; color: var(--ink); background: var(--green-soft); }
.graph-viewcube .cube-top { left: 0; top: 0; width: 128px; height: 64px; padding-bottom: 16px; clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); }
.graph-viewcube .cube-front { left: 0; top: 34px; width: 63px; height: 76px; padding-top: 5px; clip-path: polygon(0 0,100% 42%,100% 100%,0 58%); }
.graph-viewcube .cube-right { left: 65px; top: 34px; width: 63px; height: 76px; padding-top: 5px; clip-path: polygon(0 42%,100% 0,100% 58%,0 100%); }
.graph-camera-presets { flex: 1 1 170px; }
.graph-camera-presets strong { display: block; font-size: .78rem; margin-bottom: .35rem; }
.graph-camera-presets div { display: flex; flex-wrap: wrap; gap: .35rem; }
.graph-camera-presets button { min-height: 36px; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: 7px; background: var(--green-soft); color: var(--ink); cursor: pointer; font-size: .72rem; }
.graph-camera-presets small { display: block; margin-top: .4rem; color: var(--muted); font-size: .7rem; }
.graph-camera-controls button[aria-pressed="true"], .graph-camera-controls button:hover { background: var(--green); color: var(--paper); }
.graph-camera-controls button:focus-visible { outline: 3px solid var(--blue); outline-offset: -4px; }
.graph-camera-controls button:disabled { opacity: .5; cursor: default; }

/* Scale around the existing node anchor; map coordinates and camera stay fixed. */
.graph-stage .concept-node { transform: translate(-50%,-50%) scale(var(--concept-scale, 1)); }
.graph-stage .concept-node:hover, .graph-stage .concept-node.selected { transform: translate(-50%,-50%) scale(calc(var(--concept-scale, 1) * 1.045)); }
.graph-stage .iso-node { transform: translate(-50%,-100%) scale(var(--concept-scale, 1)); transform-origin: 50% 100%; }
.graph-stage .graph-3d-label { transform: translate(-50%,-115%) scale(var(--concept-scale, 1)); transform-origin: 50% 100%; }
.graph-node-size-control { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .65rem; }
.graph-node-size-control label { font-size: .76rem; font-weight: 750; }
.graph-node-size-control input { width: min(240px, 45vw); accent-color: var(--green); }
.graph-node-size-control output { min-width: 3rem; font-size: .75rem; font-weight: 750; }
.graph-node-size-control small { flex-basis: 100%; color: var(--muted); font-size: .7rem; }
.graph-node-size-control button { padding: .45rem .6rem; }
.concept-node-size-control { display: grid; gap: .4rem; padding: .65rem; margin: .7rem 0; border: 1px solid var(--line); border-radius: 9px; }
.concept-node-size-control label { font-size: .78rem; font-weight: 750; }
.concept-node-size-control input { width: 100%; accent-color: var(--green); }
.concept-node-size-control output, .concept-node-size-control small { color: var(--muted); font-size: .7rem; }
.concept-node-size-control button { padding: .4rem; }
@media (max-width: 760px) {
  .graph-stage .concept-node { transform: translate(-50%,-50%) scale(calc(var(--concept-scale, 1) * .9)); }
  .graph-stage .concept-node:hover, .graph-stage .concept-node.selected { transform: translate(-50%,-50%) scale(calc(var(--concept-scale, 1) * .96)); }
}

/* Keep settings out of the search grid's intrinsic column sizing. */
.graph-navigation { grid-template-columns: auto minmax(0, 1fr); }
.graph-navigation > #graph-search { max-width: 360px; min-width: 0; }
.graph-navigation > .graph-zoom-controls { grid-column: 1 / -1; justify-self: start; width: 100%; }
.graph-zoom-controls > button, .graph-zoom-controls > output { flex: 0 0 auto; }
.graph-navigation > .graph-node-size-control { grid-column: 1 / -1; min-width: 0; }
.graph-node-size-control input[type="range"] { padding: 0; }
.graph-panel, .graph-navigation { min-width: 0; }
@media (max-width: 760px) {
  .graph-navigation { grid-template-columns: minmax(0, 1fr); }
  .graph-navigation > #graph-search { max-width: none; }
}

/* Use the concept menu instead of the browser's touch callout. */
#graph-stage [data-concept-id] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }


.region-resize-handle, .region-title-resize { display: none; }
.graph-stage.graph-region-editing .graph-region-labels { display: block; }
.graph-stage.graph-region-editing .graph-region-label {
  cursor: move; touch-action: none; user-select: none;
}
.graph-stage.graph-region-editing .region-title-resize {
  display: block; position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px;
  background: var(--green); border: 2px solid var(--panel); border-radius: 2px; cursor: nwse-resize;
}
.graph-stage.graph-region-editing .region-resize-handle {
  display: block; fill: var(--green); stroke: var(--panel); stroke-width: 2;
  vector-effect: non-scaling-stroke; pointer-events: all; cursor: nwse-resize; touch-action: none;
}
.graph-stage:not(.graph-interaction-off) [data-region-resize="ne"],
.graph-stage:not(.graph-interaction-off) [data-region-resize="sw"] { cursor: nesw-resize; }
.graph-stage .graph-regions .graph-region .region-hit { pointer-events: all; }
.graph-canvas .region-resize-handle { r: calc(6px / var(--graph-zoom, 1)); }
.graph-region-label { box-sizing: border-box; overflow: hidden; }

/* Only actual connections should catch clicks above the region floor. */
.graph-canvas > svg.connections { pointer-events: none; }
.region-resize-side { display: none; }
.graph-stage.graph-region-editing .region-resize-side {
  display: block; stroke: transparent; stroke-width: 16;
  vector-effect: non-scaling-stroke; pointer-events: stroke; touch-action: none;
}
.graph-region-editing :is([data-region-resize="n"], [data-region-resize="s"]) { cursor: ns-resize; }
.graph-region-editing :is([data-region-resize="e"], [data-region-resize="w"]) { cursor: ew-resize; }

.graph-stage.graph-region-editing .graph-region .region-hit {
  pointer-events: all; cursor: move; touch-action: none;
}

.site-about-link { margin-top: 1.5rem; font-size: .85rem; }
.site-about-link a { color: var(--green); }

#header-about-creator { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
@media (min-width: 761px) and (max-width: 1200px) {
  .course-controls { justify-self: stretch; justify-content: center; }
  .course-controls .course-switcher { min-width: 0; }
}
@media (max-width: 760px) {
  .course-controls { grid-template-columns: minmax(0, .95fr) minmax(0, .85fr) minmax(0, 1.25fr) minmax(0, .75fr); }
}

.about-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  max-width: 920px;
  margin: auto;
  padding: .75rem clamp(1rem, 4vw, 2rem);
}
.about-page { max-width: 920px; margin: auto; padding: clamp(1rem, 4vw, 2rem); }
.about-page .content-card { padding: clamp(1.3rem, 5vw, 3rem); }
.about-page p { max-width: 66ch; margin: .5rem 0 1rem; line-height: 1.65; }
.about-page .about-intro { font-size: 1.08rem; }
.about-page h2 { margin-top: 1.6rem; }
