/* OneProp workbench. Shared geometry for trader, mentor and founder views. */
:root {
  --canvas: #eef4f7;
  --nav: #15394b;
  --ink: #203d4c;
  --muted: #526f80;
  --teal: #168c80;
  --teal-soft: #e5f4f0;
  --teal-ink: #137b70;
  --teal-action: #137f74;
  --coral: #d46e67;
  --coral-soft: #f9ece9;
  --line: #dce7ed;
  --white: #fff;
  --surface: #f8fbfc;
  --radius: 10px;
  --control-radius: 6px;
  --panel-space: 24px;
  --page-space: 32px;
  --sidebar-width: 232px;
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); font-size: 15px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: not-allowed; opacity: .58; }
a { color: var(--teal-ink); }
:is(button, a, input, select, textarea):focus-visible { outline: 3px solid #72bfb8; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; letter-spacing: -.9px; line-height: 1.2; font-weight: 650; }
h2 { font-size: 22px; letter-spacing: -.4px; line-height: 1.35; font-weight: 650; }
h3 { font-size: 17px; line-height: 1.45; font-weight: 650; }
p { max-width: 76ch; }
small { font-size: 12px; }
svg { display: block; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
.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; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 100; padding: 12px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.icon { height: 20px; width: 20px; flex-shrink: 0; }

/* Stable shell and brand */
.app-layout { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); }
.sidebar { background: var(--nav); color: #dceaf0; padding: 32px 20px 24px; position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; z-index: 20; overflow-y: auto; }
.brand { color: #43bead; font-size: 30px; font-weight: 700; letter-spacing: -1.3px; line-height: 1.2; display: inline-flex; align-items: baseline; gap: .18em; text-decoration: none; padding: 0 12px; align-self: flex-start; }
.brand span:nth-child(2) { color: #ec8c81; }
.brand-caption { font-size: 12px; color: #aac3ce; line-height: 1.55; margin: 12px 12px 28px; }
.sidebar-person { border-block: 1px solid #315464; padding: 20px 12px; margin-bottom: 24px; }
.person-name { font-size: 15px; color: #fff; font-weight: 600; }
.person-id { font-size: 12px; color: #a2c1ce; margin-top: 4px; }
.person-stage { font-size: 12px; color: #c1d8e2; margin-top: 12px; display: flex; align-items: baseline; gap: 8px; }
.person-stage .status-dot { flex-shrink: 0; align-self: center; }
.desktop-nav { display: grid; gap: 4px; }
.nav-button { width: 100%; background: none; color: #c0d6df; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; min-height: 48px; border-radius: 6px; font-size: 14px; line-height: 1.4; }
.nav-button:hover { background: #214657; color: white; }
.nav-button.active { background: #315767; color: white; }
.nav-button.active .icon { color: #66cfbd; }
.nav-button > span { min-width: 0; }
.sidebar-bottom { margin-top: auto; display: flex; align-items: flex-start; gap: 8px; padding: 32px 12px 0; font-size: 12px; line-height: 1.5; color: #aac3ce; }
.status-dot { width: 6px; height: 6px; background: #50bdab; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.sidebar-bottom .status-dot { margin-top: 6px; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { min-height: 80px; border-bottom: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px var(--page-space); }
.topbar-context { display: flex; align-items: center; gap: 16px; min-width: 0; }
.demo-badge { font-size: 12px; border: 1px solid #cbdde5; border-radius: 5px; padding: 5px 9px; color: #426677; background: #f0f6f8; white-space: nowrap; }
.context-copy { color: var(--muted); font-size: 12px; line-height: 1.5; }
.topbar-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.role-control { display: flex; }
.role-control select { height: 40px; background: white; color: var(--ink); border: 1px solid #d0dfe6; border-radius: var(--control-radius); padding: 0 28px 0 12px; font-size: 13px; max-width: 168px; }
.language-button { border: 1px solid #d0dfe6; background: white; color: var(--ink); width: 40px; height: 40px; border-radius: var(--control-radius); font-size: 13px; font-weight: 650; }
.phone-preview-link { min-height: 40px; display: inline-flex; align-items: center; font-size: 12px; color: #42687b; text-decoration: none; white-space: nowrap; padding-block: 10px; }
.phone-preview-link:hover { color: var(--teal); }
.mobile-brand { display: none; }
main { max-width: 1470px; margin: auto; padding: 32px var(--page-space) 16px; }
.workspace-footer { padding: 24px var(--page-space) 32px; font-size: 12px; line-height: 1.55; color: var(--muted); max-width: 1470px; margin: auto; }
.bottom-nav { display: none; }

/* Headings, controls and shared surfaces */
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-title-group { min-width: 0; flex: 1; }
.page-intro { font-size: 14px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.page-actions { display: flex; gap: 8px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--control-radius); padding: 11px 16px; min-height: 44px; font-size: 14px; line-height: 1.4; font-weight: 600; text-align: center; text-decoration: none; transition: background .15s, border-color .15s; }
.button.primary { background: var(--teal-action); color: #fff; }
.button.primary:hover { background: #11776d; }
.button.secondary { background: white; border-color: #cfdee5; color: var(--ink); }
.button.secondary:hover { background: #f5f9fa; border-color: #adc6d2; }
.button.quiet { background: #edf4f7; color: #365f72; }
.button.small { padding: 9px 12px; min-height: 40px; font-size: 13px; }
.button.danger { background: var(--coral-soft); color: #a44f47; border-color: #f0cdc7; }
.panel { background: white; border: 1px solid #d8e5ec; border-radius: var(--radius); min-width: 0; }
.panel-pad { padding: var(--panel-space); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading > div { min-width: 0; }
.panel-heading p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.text-link { font-size: 13px; font-weight: 600; background: none; color: var(--teal-ink); padding: 4px 0; text-decoration: none; }
.text-link:hover { color: #106f65; }
.section-space { margin-top: 24px; }
.minor { color: var(--muted); font-size: 12px; line-height: 1.5; }
.boundary-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 16px; }
.initial-loading { padding: 56px; font-size: 30px; color: var(--teal); }
.main-state { padding: 32px 24px; color: var(--muted); }
.loading-placeholder { height: 240px; background: #e7eff3; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: #557584; }
.error-panel { padding: 28px; background: white; border: 1px solid #e7c5bf; border-radius: var(--radius); color: #965148; }
.error-panel p { font-size: 14px; margin: 12px 0 20px; }
.screen-error { max-width: 700px; margin: 20px auto; }

/* A course is a sequence: every step shares the same circle and text baselines. */
.path-panel { padding: var(--panel-space); margin-bottom: 24px; overflow: hidden; }
.path-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.path-heading > div { min-width: 0; }
.path-heading-copy { flex: 1; }
.path-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-shrink: 0; }
.horizontal-scroll-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.horizontal-scroll-controls[hidden] { display: none; }
.horizontal-scroll-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; color: var(--teal-ink); background: white; border: 1px solid var(--line); border-radius: var(--control-radius); }
.horizontal-scroll-button:hover:not(:disabled) { background: var(--teal-soft); border-color: #8bbdb4; }
.horizontal-scroll-button:disabled { color: #b3c3ca; background: #f7fafb; cursor: default; }
.horizontal-scroll-button.previous .icon { transform: rotate(180deg); }
.table-scroll-controls { justify-content: flex-end; margin-bottom: 12px; }
.lesson-path:focus-visible, .table-scroll:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 5px; }
.path-copy { font-size: 13px; color: var(--muted); margin-top: 6px; }
.path-count { font-size: 12px; color: #137b70; white-space: nowrap; padding: 6px 10px; background: var(--teal-soft); border-radius: 5px; }
.lesson-path { display: grid; grid-template-columns: repeat(9,minmax(104px,1fr)); gap: 12px; position: relative; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; scrollbar-color: #b9ced8 transparent; }
.lesson-step { position: relative; min-width: 0; background: none; padding: 0; color: var(--muted); display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; }
.lesson-step:not(:last-child)::before { content: ""; position: absolute; top: 19px; left: 20px; width: calc(100% + 12px); height: 2px; background: var(--line); }
.lesson-step-circle { display: flex; align-items: center; justify-content: center; border-radius: 50%; width: 40px; height: 40px; background: white; border: 2px solid var(--line); font-weight: 600; font-size: 14px; position: relative; z-index: 1; margin-bottom: 12px; flex-shrink: 0; }
.lesson-step.done .lesson-step-circle { background: var(--teal); border-color: var(--teal); color: white; }
.lesson-step.current .lesson-step-circle { border-color: var(--teal); color: var(--teal-ink); box-shadow: 0 0 0 4px #e6f5f1; }
.lesson-step.current { color: var(--ink); }
.lesson-step-title { font-size: 12px; font-weight: 600; line-height: 1.5; display: block; flex: 1; }
.lesson-step-state { font-size: 11px; color: var(--muted); margin-top: 8px; display: block; }
.practice-goal { display: flex; align-items: baseline; gap: 16px; padding: 0 0 20px; font-size: 13px; color: #426879; }
.practice-goal-label { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.practice-goal strong { font-weight: 500; }

/* Trader's daily workbench */
.today-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.95fr); gap: 24px; align-items: start; }
.today-grid > *, .founder-grid > *, .mentor-layout > *, .form-layout > *, .side-stack > * { min-width: 0; }
.focus-panel { overflow: hidden; }
.focus-body { padding: var(--panel-space) var(--panel-space) 16px; display: flex; align-items: flex-start; gap: 16px; }
.focus-body > div { min-width: 0; }
.focus-number { flex-shrink: 0; color: var(--teal-ink); font-size: 13px; font-weight: 650; background: var(--teal-soft); border-radius: 5px; padding: 8px 10px; line-height: 1.5; }
.focus-body h2 { font-size: 24px; line-height: 1.35; }
.focus-description { font-size: 14px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.focus-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 20px var(--panel-space) var(--panel-space); }
.illustration-chart { margin: 0 var(--panel-space); display: block; border-top: 1px solid #e8eff3; padding-top: 20px; }
.illustration-chart svg { width: 100%; height: auto; }
.chart-caption { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; line-height: 1.5; }
.chart-caption > span:last-child { text-align: right; }
.side-stack { display: grid; gap: 24px; align-content: start; }
.mentor-message { padding: var(--panel-space); }
.mentor-byline { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.avatar { border-radius: 50%; background: #e7f2f5; color: #345d6f; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 13px; font-weight: 650; flex-shrink: 0; }
.avatar.teal { background: var(--teal-soft); color: var(--teal-ink); }
.message-body { font-size: 14px; line-height: 1.65; color: #385564; }
.message-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e8eff3; margin-top: 20px; padding-top: 16px; }
.routine-list { display: grid; gap: 8px; }
.routine-item { background: transparent; color: var(--teal); display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; font-size: 14px; text-align: left; line-height: 1.5; border-radius: 6px; }
.routine-item:hover { background: #f6fafb; }
.routine-icon { background: #f0f6f8; border-radius: 6px; padding: 9px; color: #4b7082; flex-shrink: 0; align-self: flex-start; }
.routine-copy { min-width: 0; flex: 1; }
.routine-title { display: block; color: #167b70; font-size: 14px; font-weight: 600; }
.routine-meta { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.routine-arrow { color: #7b97a4; width: 18px; height: 18px; margin-left: auto; }
.routine-item > span:not(.routine-icon):not(.routine-arrow) { min-width: 0; flex: 1; }

/* Decisions and filters */
.journal-list { display: grid; }
.journal-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; padding: 20px 0; border-top: 1px solid #e2edf2; cursor: pointer; }
.journal-row:hover { background: #f8fbfc; }
.journal-row:first-child { border-top: 0; }
.journal-copy { min-width: 0; }
.journal-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 10px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.journal-name { min-width: 0; overflow-wrap: anywhere; }
.journal-subtitle { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.journal-right { text-align: right; }
.pill { font-size: 11px; line-height: 1.45; padding: 4px 7px; border-radius: 4px; display: inline-flex; align-items: center; gap: 4px; background: #eef4f7; color: #506d7c; white-space: nowrap; font-weight: 500; }
.pill.teal { background: var(--teal-soft); color: #167467; }
.pill.coral { background: var(--coral-soft); color: #a4544d; }
.pill.blue { background: #eaf1f9; color: #496a8d; }
.result-value { font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.positive { color: #137d70; }
.negative { color: #b6524c; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-button { background: #f7fafb; color: #4c6979; padding: 10px 14px; min-height: 42px; border: 1px solid #d4e2e9; border-radius: var(--control-radius); font-size: 13px; line-height: 1.5; }
.filter-button.active { border-color: var(--teal); color: #137b70; background: var(--teal-soft); }
.search-input { margin-left: auto; background: white; border: 1px solid #d3e0e7; border-radius: var(--control-radius); padding: 10px 12px; max-width: 260px; width: 100%; font-size: 13px; min-height: 42px; }
.empty-state { padding: 32px 24px; text-align: center; border: 1px dashed #bed4df; border-radius: 8px; }
.empty-state p { margin: 8px auto 20px; color: var(--muted); font-size: 14px; }

/* Forms and checks */
.form-layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(300px,.85fr); gap: 24px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 16px; align-items: start; }
.form-field { display: grid; grid-template-rows: auto auto 1fr; gap: 8px; font-size: 13px; color: #3f6172; min-width: 0; }
.form-field > span:first-child { font-weight: 500; }
.form-field.full { grid-column: 1/-1; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid #c6d9e3; border-radius: var(--control-radius); background: #fbfdfe; color: var(--ink); padding: 11px 12px; min-width: 0; min-height: 46px; font-size: 15px; line-height: 1.5; }
.form-field input:disabled { background: #edf3f6; color: #617d8c; }
.form-field textarea { resize: vertical; min-height: 108px; line-height: 1.6; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #748c99; opacity: 1; }
.form-help { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.55; }
.form-divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.notice { padding: 16px; background: #edf6f7; border-left: 3px solid #72b3b3; color: #426676; font-size: 13px; line-height: 1.6; }
.notice.coral { background: #fbf0ed; border-color: var(--coral); color: #935c52; }
.upload-area { border: 1px dashed #acc7d5; border-radius: 8px; padding: 24px 20px; text-align: center; background: #f7fbfc; }
.upload-area > .icon { margin: 0 auto 12px; }
.upload-area input { display: block; width: 100%; margin-top: 12px; font-size: 13px; border: 0; background: none; padding: 4px; min-height: 40px; }
.upload-area input::file-selector-button { background: #fff; color: var(--ink); border: 1px solid #cbdde5; border-radius: 5px; padding: 8px 10px; font: inherit; cursor: pointer; margin-right: 8px; }
.upload-preview { max-height: 250px; max-width: 100%; display: block; margin: 12px auto; border-radius: 6px; }
.check-list { display: grid; gap: 12px; }
.check-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #d6e3ea; border-radius: 7px; background: #fafcfd; cursor: pointer; }
.check-item input, .task-item input, .privacy-line input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--teal); flex-shrink: 0; }
.check-copy { min-width: 0; }
.check-item strong { display: block; font-size: 14px; line-height: 1.5; font-weight: 600; }
.check-item p { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.check-progress { font-size: 13px; color: var(--teal-ink); margin-top: 16px; }
.privacy-line { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.inline-error { font-size: 13px; color: #a94f48; padding: 12px 14px; background: #fbedea; border-radius: 6px; margin-top: 16px; }
.inline-error:empty { display: none; }

/* Focused detail sheet */
.detail-dialog { border: 1px solid #d8e5eb; border-radius: 12px; background: var(--canvas); color: var(--ink); width: min(930px,calc(100% - 40px)); padding: 0; max-height: calc(100dvh - 48px); box-shadow: 0 24px 80px rgba(20,49,67,.2); }
.detail-dialog::backdrop { background: rgba(15,44,60,.46); }
.dialog-header { padding: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; background: white; border-bottom: 1px solid var(--line); }
.dialog-heading-copy { min-width: 0; }
.dialog-header .minor { margin-top: 6px; }
.close-button { background: #edf4f6; color: #466b7d; border-radius: 6px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; }
.dialog-body { padding: 24px; }
.dialog-body > .notice + h3 { margin-top: 24px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.detail-metric { padding: 16px; background: #f1f7f9; border-radius: 6px; min-width: 0; }
.detail-metric dl { margin: 0; }
.detail-metric dt { font-size: 12px; color: var(--muted); }
.detail-metric dd { font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 600; margin: 4px 0 0; overflow-wrap: anywhere; }
.detail-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; margin-top: 8px; }
.detail-figure { max-width: 100%; max-height: 420px; border-radius: 7px; margin: 16px auto; display: block; }
.dialog-section { margin-top: 24px; }
.dialog-section h3 { margin-bottom: 16px; }
.detail-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.review-item { padding: 16px 0; border-bottom: 1px solid #e0ebef; }
.review-item:last-child { border: 0; }
.review-byline { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.review-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-item { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; padding: 16px 0; border-bottom: 1px solid #e5edf2; }
.task-item.done > span { text-decoration: line-through; color: var(--muted); }
.mentor-task-summary { padding: 16px; background: #eef6f6; border-radius: 6px; margin-top: 16px; font-size: 13px; }
.profile-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0 0 24px; }
.profile-summary .avatar { width: 48px; height: 48px; }
.profile-copy { min-width: 0; }
.check-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.check-facts .icon { width: 16px; height: 16px; }
.video-player { width: 100%; max-height: 60vh; background: #102b3a; border-radius: 8px; margin-top: 16px; }

/* State journal */
.state-form { display: grid; gap: 24px; }
.state-options { display: flex; gap: 8px; flex-wrap: wrap; }
.state-choice { display: flex; gap: 8px; align-items: center; background: #f5f9fa; border: 1px solid #d3e2e9; border-radius: 6px; padding: 11px 12px; min-height: 44px; font-size: 13px; }
.state-choice input { accent-color: var(--teal); width: 16px; height: 16px; margin: 0; }
.notes-list { display: grid; gap: 16px; margin-top: 20px; }
.note-block { border-left: 2px solid #88b4c2; padding: 12px 16px; background: #f7fbfc; }
.note-block p { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 8px; }
.note-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 12px; color: var(--muted); }

/* Learning cards: action rows share a baseline across each grid row. */
.lesson-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.lesson-card { overflow: hidden; display: flex; flex-direction: column; }
.lesson-card-art { height: 112px; background: #e8f1f4; padding: 20px 24px; position: relative; display: flex; align-items: center; justify-content: space-between; }
.lesson-card-art .lesson-no { font-size: 44px; font-weight: 600; letter-spacing: -2px; color: #598a9f; }
.lesson-card-art.done { background: #e5f3ef; }
.lesson-card-art.done .lesson-no { color: #438c81; }
.lesson-card-art.current { background: var(--nav); }
.lesson-card-art.current .lesson-no { color: #58b6ae; }
.lesson-card-art svg { width: 85px; height: 66px; color: #6ea0b2; }
.lesson-card-content { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.lesson-card-content h3 { font-size: 17px; line-height: 1.45; min-height: 3em; }
.lesson-card-content p { font-size: 13px; color: var(--muted); margin: 12px 0 20px; line-height: 1.6; }
.lesson-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.lesson-actions .button { flex: 1 1 100%; }

/* Mentor queue and roster */
.mentor-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(330px,.85fr); gap: 24px; align-items: start; }
.queue-row { padding: 24px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 16px; }
.queue-row:first-child { border: 0; padding-top: 4px; }
.queue-row:last-child { padding-bottom: 0; }
.queue-info { min-width: 0; }
.queue-person { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.queue-title { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.queue-reason { font-size: 13px; color: var(--muted); margin-top: 8px; }
.roster-row { display: flex; align-items: center; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.roster-row:first-child { border: 0; padding-top: 4px; }
.roster-row:last-child { padding-bottom: 0; }
.roster-info { min-width: 0; flex: 1; }
.roster-name { font-size: 14px; font-weight: 600; }
.roster-stage { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.micro-progress { height: 4px; border-radius: 2px; background: #e3eef2; margin-top: 10px; overflow: hidden; }
.micro-progress span { display: block; height: 100%; background: var(--teal); max-width: 100%; }
.micro-progress [data-progress="0"] { width: 0; }
.micro-progress [data-progress="1"] { width: 11%; }
.micro-progress [data-progress="2"] { width: 22%; }
.micro-progress [data-progress="3"] { width: 33%; }
.micro-progress [data-progress="4"] { width: 44%; }
.micro-progress [data-progress="5"] { width: 56%; }
.micro-progress [data-progress="6"] { width: 67%; }
.micro-progress [data-progress="7"] { width: 78%; }
.micro-progress [data-progress="8"] { width: 89%; }
.micro-progress [data-progress="9"] { width: 100%; }
.role-disclaimer { font-size: 12px; line-height: 1.6; color: #526f7f; padding: 12px 16px; background: #e7eff4; border-radius: 6px; margin-bottom: 24px; }

/* Founder: tables are numeric, rather than an array of decorative cards. */
.founder-summary { background: var(--nav); color: white; padding: 28px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; border-radius: var(--radius); margin-bottom: 24px; }
.founder-summary > div { min-width: 0; display: flex; flex-direction: column; }
.founder-summary h2 { font-size: 14px; line-height: 1.5; color: #c8dde6; font-weight: 500; letter-spacing: 0; min-height: 3em; }
.founder-large { font-size: 34px; letter-spacing: -.7px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; margin-top: 8px; }
.founder-sub { font-size: 12px; color: #bad4df; margin-top: 8px; }
.summary-column { border-left: 1px solid #3a5d70; padding-left: 28px; }
.founder-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,1fr); gap: 24px; align-items: start; }
.metric-line { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 20px 0; border-bottom: 1px solid #e3edf2; font-size: 14px; }
.metric-line:last-child { border: 0; padding-bottom: 4px; }
.metric-line strong { font-size: 19px; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.table-scroll { overflow: auto; min-width: 0; max-width: 100%; scrollbar-width: thin; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.data-table th { text-align: left; color: #526f7f; font-weight: 500; font-size: 12px; padding: 12px 10px 16px; border-bottom: 1px solid #dbe8ed; vertical-align: bottom; }
.data-table td { padding: 20px 10px; border-bottom: 1px solid #e5edf1; vertical-align: middle; }
.data-table th:first-child, .data-table td:first-child { padding-left: 0; }
.data-table th:last-child, .data-table td:last-child { padding-right: 0; }
.data-table th:nth-child(n+2), .data-table td:nth-child(n+2) { text-align: right; }
.data-table td:nth-child(n+2) { white-space: nowrap; }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: #f6fafb; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .trader-cell strong { display: block; font-size: 14px; }
.data-table .trader-cell span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Feedback and supporting content */
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: calc(100% - 48px); }
.toast { background: var(--nav); color: white; padding: 16px 20px; border-radius: 7px; box-shadow: 0 8px 30px rgba(20,50,68,.16); font-size: 14px; }
.toast.error { background: #98574f; }
.community-illustration { display: flex; align-items: center; gap: 20px; padding: 24px 0; }
.community-illustration .avatar { width: 64px; height: 64px; font-size: 23px; }
.screen-clip { overflow: hidden; }

/* Compact desktop */
@media (max-width: 1250px) {
  :root { --sidebar-width: 216px; --page-space: 24px; }
  .sidebar { padding-inline: 16px; }
  .context-copy { display: none; }
  .lesson-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .today-grid { grid-template-columns: minmax(0,1.2fr) minmax(300px,1fr); }
  .focus-body { flex-direction: column; gap: 12px; }
  .mentor-layout, .form-layout, .founder-grid { grid-template-columns: minmax(0,1fr); }
  .mentor-layout > .side-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .founder-grid > .side-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-layout > .side-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .founder-summary { gap: 20px; padding: 24px; }
  .summary-column { padding-left: 20px; }
  .founder-large { font-size: 29px; }
}
@media (min-width: 1500px) {
  :root { --page-space: 40px; --panel-space: 28px; }
  main { padding-top: 40px; }
}

/* Phone and tablet: same workbench, deliberate vertical reading order. */
@media (max-width: 880px) {
  :root { --page-space: 24px; --panel-space: 24px; }
  .app-layout { display: block; }
  .sidebar { display: none; }
  .workspace { min-width: 0; }
  .topbar { min-height: 72px; padding: 12px var(--page-space); gap: 12px; position: sticky; top: 0; z-index: 19; }
  .mobile-brand { display: block; font-size: 24px; letter-spacing: -1px; line-height: 1.1; font-weight: 700; color: var(--teal); }
  .mobile-brand b { color: var(--coral); font-weight: 700; }
  .mobile-demo-badge { display: block; font-size: 10px; letter-spacing: 0; color: var(--muted); font-weight: 500; line-height: 1.3; margin-top: 5px; }
  .topbar-context, .phone-preview-link { display: none; }
  .topbar-controls { gap: 8px; }
  h1 { font-size: 30px; letter-spacing: -.75px; }
  .today-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .focus-body h2 { font-size: 22px; }
  .path-heading { align-items: flex-start; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); position: fixed; inset: auto 0 0; background: #fff; border-top: 1px solid #d6e4eb; padding: 8px 8px max(8px,env(safe-area-inset-bottom)); z-index: 30; }
  .bottom-nav:has(.nav-button:nth-child(4):last-child) { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .bottom-nav .nav-button { color: #567584; background: none; border-radius: 6px; padding: 6px 2px; min-height: 52px; gap: 5px; flex-direction: column; text-align: center; font-size: 11px; line-height: 1.25; }
  .bottom-nav .nav-button.active { color: #107b6e; background: #edf7f4; }
  .bottom-nav .nav-button .icon { height: 20px; width: 20px; }
  .bottom-nav .nav-button.active .icon { color: #107b6e; }
  .workspace-footer { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .toast-region { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  :root { --page-space: 16px; --panel-space: 20px; }
  body { font-size: 14px; }
  .topbar { min-height: 76px; gap: 8px; }
  .mobile-brand { font-size: 23px; }
  .role-control select { max-width: 145px; font-size: 12px; padding-left: 10px; height: 40px; }
  .language-button { width: 40px; height: 40px; font-size: 12px; }
  main { padding-top: 24px; }
  h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.65px; }
  h2 { font-size: 21px; }
  .page-heading { margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
  .page-title-group { flex-basis: 100%; }
  .page-intro { font-size: 14px; margin-top: 12px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .button { font-size: 14px; padding-inline: 14px; }
  .button.small { font-size: 13px; min-height: 40px; }
  .panel-heading { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .panel-heading .text-link { flex-shrink: 0; margin-top: 3px; }
  .path-panel { margin-bottom: 20px; }
  .path-heading { flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
  .path-heading-copy { flex-basis: 100%; }
  .path-heading-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .path-copy { font-size: 13px; }
  .path-count { font-size: 12px; }
  .lesson-path { grid-template-columns: repeat(9,116px); }
  .practice-goal { gap: 6px; font-size: 13px; padding-bottom: 20px; flex-direction: column; align-items: flex-start; }
  .practice-goal-label { font-size: 12px; }
  .today-grid, .side-stack, .mentor-layout, .form-layout, .founder-grid, .mentor-layout > .side-stack, .founder-grid > .side-stack, .form-layout > .side-stack { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
  .focus-body { padding-bottom: 16px; gap: 12px; }
  .focus-body h2 { font-size: 23px; }
  .focus-description { font-size: 14px; }
  .focus-actions .button { flex: 1 1 140px; }
  .chart-caption { font-size: 11px; }
  .mentor-byline { font-size: 13px; }
  .message-footer { gap: 8px; }
  .message-footer .text-link { white-space: nowrap; }
  .journal-row { padding: 20px 0; gap: 12px; }
  .journal-title { font-size: 14px; gap: 6px 8px; }
  .journal-right { max-width: 122px; }
  .result-value { font-size: 14px; }
  .journal-right .pill { white-space: normal; justify-content: flex-end; }
  .filters { gap: 8px; }
  .filter-button { font-size: 12px; padding: 10px 12px; }
  .search-input { margin-left: 0; max-width: none; font-size: 14px; flex-basis: 100%; }
  .form-grid { gap: 20px 12px; }
  .form-field { font-size: 13px; }
  .form-field > span:first-child { min-height: 2.9em; display: flex; align-items: flex-end; }
  .form-field.full > span:first-child { min-height: 0; }
  .form-field input, .form-field select, .form-field textarea { font-size: 16px; padding: 11px 12px; }
  .form-help { font-size: 12px; }
  .check-item { padding: 16px 14px; gap: 12px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .button { flex: 1 1 120px; }
  .lesson-grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .lesson-card-art { height: 100px; padding: 16px 20px; }
  .lesson-card-art .lesson-no { font-size: 40px; }
  .lesson-card-art svg { width: 80px; height: 62px; }
  .lesson-card-content { padding: 20px; }
  .lesson-card-content h3 { font-size: 18px; min-height: 0; }
  .lesson-card-content p { font-size: 14px; }
  .lesson-actions .button { flex-basis: 140px; }
  .detail-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 10px; }
  .dialog-header, .dialog-body { padding: 20px; }
  .dialog-header h2 { font-size: 22px; }
  .detail-grid { gap: 12px; }
  .detail-metric { padding: 12px; }
  .detail-metric dd { font-size: 17px; }
  .detail-controls .button { flex: 1 1 140px; }
  .queue-row { gap: 12px; grid-template-columns: minmax(0,1fr); }
  .queue-row .button { justify-self: start; }
  .roster-row { flex-wrap: wrap; }
  .roster-row .button { margin-left: 48px; }
  .roster-info { flex-basis: calc(100% - 48px); }
  .founder-summary { padding: 24px 20px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
  .founder-summary > div:first-child { grid-column: 1/-1; }
  .founder-summary h2 { min-height: 3em; font-size: 13px; }
  .founder-summary > div:first-child h2 { min-height: 0; }
  .founder-large { font-size: 32px; }
  .summary-column { padding-left: 0; border-left: 0; border-top: 1px solid #406172; padding-top: 16px; }
  .summary-column .founder-large { font-size: 28px; }
  .metric-line { font-size: 14px; padding: 20px 0; }
  .metric-line strong { font-size: 18px; }
  .data-table { font-size: 13px; min-width: 540px; }
  .toast-region { left: 16px; right: 16px; max-width: none; }
  .toast { font-size: 13px; }
  .community-illustration { gap: 16px; }
  .community-illustration .avatar { width: 48px; height: 48px; font-size: 18px; }
  .state-choice { font-size: 13px; }
}
@media (max-width: 370px) {
  :root { --page-space: 12px; --panel-space: 16px; }
  .mobile-brand { font-size: 21px; }
  .role-control select { max-width: 122px; padding-left: 8px; padding-right: 18px; }
  .topbar-controls { gap: 6px; }
  .language-button { width: 36px; }
  .mobile-demo-badge { font-size: 9px; }
  h1 { font-size: 26px; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .form-field > span:first-child { min-height: 0; }
  .detail-grid { grid-template-columns: minmax(0,1fr); }
  .dialog-header, .dialog-body { padding: 16px; }
  .journal-row { grid-template-columns: minmax(0,1fr); }
  .journal-right { max-width: none; text-align: left; display: flex; align-items: center; gap: 10px; }
  .result-value { margin-bottom: 0; }
  .journal-right .pill { justify-content: flex-start; }
  .bottom-nav .nav-button { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
