@import url("/workbench-nav-colors.css");

:root {
  color-scheme: light;
  --ink: #17181b;
  --muted: #6b6f77;
  --line: #e4e6ea;
  --line2: #eceef1;
  --control-line: #e4e6ea;
  --canvas: #f5f6f7;
  --rail: var(--canvas);
  --paper: #ffffff;
  --neutral-soft: #eceef0;
  --icon-muted: #707780;
  --brand: #b3262b;
  --brand-ink: #b51927;
  --brand-soft: #fbf1f0;
  --brand-line: #ebcfcd;
  /* Sidebar states from https://preview.pro.ant.design/dashboard/analysis. */
  --nav-section-ink: rgba(0, 0, 0, .45);
  --nav-item-radius: 12px;
  --nav-section-number: #E62129;
  --primary: #b3262b;
  --primary-hover: #8f1d21;
  --success: #18734c;
  --success-soft: #eaf3ed;
  --warning: #865514;
  --warning-soft: #fff6e6;
  --danger: #a31932;
  --danger-soft: #fae8ed;
  --sidebar: 160px;
  --control-height: 44px;
  --touch-height: 44px;
  --gutter: 24px;
  --motion: 200ms;
  --e: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.42, .5, 1);
  --ease: var(--spring);
  --font-ui: var(--workbench-typeface, "Alibaba PuHuiTi"), "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: var(--font-ui);
  --num: var(--font-ui);
  font-family: var(--font-ui);
  font-size: 15px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-weight: 400; font-synthesis: none; font-size: 14px; line-height: 1.6; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
html { scroll-padding-top: 76px; scrollbar-color: var(--control-line) var(--canvas); }
main:focus { outline: none; }
summary, section, article, [id] { scroll-margin-top: 76px; }
::selection { background: var(--brand); color: #fff; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }
button[aria-busy="true"] { cursor: wait; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.8; vertical-align: middle; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.4; }
h1 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: .01em; line-height: 1.15; }
.tn, .count, .training-clock { font-family: var(--num); font-variant-numeric: tabular-nums; }
h2 { margin: 0 0 12px; font-size: 17px; font-weight: 650; }
h3 { margin: 24px 0 10px; font-size: 15px; font-weight: 600; }
.muted, .hint, .small { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 100; transform: translateY(-150%); opacity: 0; pointer-events: none; padding: 10px 16px; background: var(--ink); color: var(--canvas); border-radius: 6px; }
.skip-link:focus { transform: translateY(0); opacity: 1; pointer-events: auto; }
summary { --disclosure-inset: 0px; cursor: pointer; padding-block: 9px; min-height: var(--control-height); overflow-wrap: anywhere; }
summary::marker { color: var(--muted); }
summary:hover { color: var(--brand-ink); }
summary:focus-visible { outline-offset: 1px; border-radius: 3px; }
summary.disclosure-trigger { position: relative; padding-inline-start: calc(26px + var(--disclosure-inset)); list-style: none; }
summary.disclosure-trigger::-webkit-details-marker { display: none; }
summary.disclosure-trigger::marker { content: ""; }
details > summary.disclosure-trigger > .disclosure-chevron { position: absolute; inset-inline-start: var(--disclosure-inset); top: calc(50% - 9px); width: 18px; height: 18px; margin: 0; color: var(--muted); pointer-events: none; transition: transform var(--motion) var(--ease); }
details[open] > summary.disclosure-trigger > .disclosure-chevron { transform: rotate(180deg); }

.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); max-width: var(--sidebar); display: flex; flex-direction: column; padding: 12px 10px; background: var(--rail); border-right: 1px solid var(--line); overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
.brand { display: flex; align-items: center; min-height: 50px; padding: 0 10px; }
.brand-logo { width: 132px; height: 54px; object-fit: contain; object-position: left center; }
.workspace-name { font-size: 14px; font-weight: 600; padding: 4px 8px 10px; }
nav { display: grid; gap: 4px; }
nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; transition: background var(--motion), color var(--motion); }
nav a:hover { background: var(--neutral-soft); color: var(--ink); }
nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.nav-group-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); text-align: left; font: inherit; cursor: pointer; }
.nav-group-toggle:hover { background: var(--neutral-soft); color: var(--ink); }
.nav-group-toggle.is-current { color: var(--brand-ink); font-weight: 650; }
.nav-group-toggle > span { flex: 1; min-width: 0; }
.nav-group-toggle > .lucide:last-child { width: 14px; height: 14px; transition: transform 240ms var(--ease); }
.nav-group.is-open .nav-group-toggle > .lucide:last-child { transform: rotate(180deg); }
.app-sidebar .nav-tree .nav-group-toggle > .lucide:last-child { transform: rotate(-90deg); }
.app-sidebar .nav-tree.is-open .nav-group-toggle > .lucide:last-child { transform: none; }
.app-sidebar .nav-tree .nav-subnav { transition: grid-template-rows 280ms cubic-bezier(0.16, 1, 0.3, 1); }
.nav-subnav { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms var(--ease); }
.nav-group.is-open .nav-subnav { grid-template-rows: 1fr; }
.nav-subnav > div { min-height: 0; overflow: hidden; }
.nav-subnav a { min-height: 42px; margin-left: 12px; font-size: 14px; opacity: 0; transform: translateY(-5px); transition: opacity 160ms var(--ease), transform 200ms var(--ease), background var(--motion), color var(--motion); }
.nav-group.is-open .nav-subnav a { opacity: 1; transform: translateY(0); transition-delay: 35ms; }
.nav-group.is-open .nav-subnav a:nth-child(2) { transition-delay: 80ms; }
.nav-subnav a .lucide { width: 14px; height: 14px; flex: 0 0 14px; }
@media (prefers-reduced-motion: reduce) {
  .nav-subnav, .nav-subnav a, .nav-group-toggle > .lucide:last-child { transition: none !important; }
}
.sidebar-footer { margin-top: auto; }
.agent-identity { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 14px 10px; }
.agent-identity > .lucide { color: var(--brand); }
.agent-identity b, .account b { display: block; font-size: 13px; font-weight: 600; }
.agent-identity span, .app-sidebar .account div > span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.status-dot.demo { background: var(--warning); }
.account { display: flex; align-items: center; gap: 10px; }
.app-sidebar .account { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 4px; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.app-sidebar .account .avatar { display: none; }
.app-sidebar .account > div { min-width: 0; flex: 1; }
.app-sidebar .account b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--neutral-soft); color: var(--muted); font-size: 12px; font-weight: 650; }
.workspace-bar { position: fixed; inset: 0 0 auto var(--sidebar); z-index: 20; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); }
.workspace-shortcut { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--ink); text-decoration: none; }
.workspace-shortcut:hover { color: var(--brand-ink); }
.workspace-shortcut .lucide { width: 16px; height: 16px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--muted); font-size: 13px; }
.breadcrumb .lucide { width: 14px; height: 14px; color: var(--icon-muted); }
.breadcrumb b { font-weight: 500; color: var(--ink); }
.breadcrumb h1 { color: var(--ink); font-size: 17px; white-space: nowrap; }
.workspace-bar .study-progress { margin-left: auto; flex-shrink: 0; white-space: nowrap; }
.training-clock { margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.training-clock[data-ended="true"] { color: var(--muted); font-weight: 500; }
.workspace-bar .workspace-shortcut { flex-shrink: 0; }
.mode-label { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; color: var(--success); font-size: 12px; }
.mode-label .lucide { width: 14px; height: 14px; }
.mode-label.demo { color: var(--warning); background: var(--warning-soft); padding: 3px 7px; border-radius: 4px; }
.mobile-menu.icon-button, .nav-scrim { display: none; }
.main { width: calc(100% - var(--sidebar)); margin-left: var(--sidebar); padding: 80px var(--gutter) 32px; min-width: 0; min-height: 100dvh; background: var(--paper); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; margin-bottom: 24px; }
.study-progress { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
progress { display: block; width: 80px; height: 4px; border: 0; border-radius: 3px; background: var(--neutral-soft); overflow: hidden; accent-color: var(--success); }
progress::-webkit-progress-bar { background: var(--neutral-soft); }
progress::-webkit-progress-value { background: var(--success); }
progress::-moz-progress-bar { background: var(--success); }
.section-head, .reading-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; margin-bottom: 12px; }
.section-head h2, .reading-head h2 { display: flex; align-items: center; gap: 7px; margin: 0; }
.section-head h2 .lucide { color: var(--muted); width: 16px; height: 16px; }
.explanation .section-head h2 .lucide { color: var(--brand); }
.agent-label { color: var(--muted); font-size: 11px; }

.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 6px; min-height: var(--control-height); padding: 10px 16px; font-size: 14px; font-weight: 600; transition: background var(--motion), border-color var(--motion), color var(--motion), transform 100ms var(--ease); }
.button { position: relative; overflow: hidden; text-align: center; max-width: 100%; flex-shrink: 0; overflow-wrap: anywhere; min-height: 36px; height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 500; transition: background .2s, border-color .2s, color .2s, transform .15s var(--spring), box-shadow .2s; }
.button:active:not(:disabled) { transform: scale(.97); }
.icon-button:active:not(:disabled) { transform: scale(.97); }
.button .lucide { width: 16px; height: 16px; }
.button.primary { height: 42px; padding: 0 22px; color: #fff; background: var(--primary); border-color: var(--primary); font-size: 14px; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 18px -8px rgba(179,38,43,.7); }
.button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: 0 10px 24px -10px rgba(179,38,43,.9); }
dialog .button.primary { height: 36px; padding: 0 18px; font-size: 13px; }
.rip { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: rip .6s var(--e) forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.button.secondary { color: var(--ink); border-color: var(--line); background: var(--paper); }
.button.secondary:hover { background: var(--rail); border-color: var(--ink); }
.button.plain { color: var(--muted); background: transparent; }
.button.plain:hover { background: var(--rail); }
.button.danger { color: var(--danger); }
.icon-button { width: var(--control-height); height: var(--control-height); min-height: var(--control-height); padding: 9px; flex-shrink: 0; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: var(--neutral-soft); }
.icon-button[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.password-field { position: relative; display: block; min-width: 0; }
.password-field > input, .auth-page .password-field > .input { padding-right: 52px; }
.password-toggle { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); }
.password-toggle:active:not(:disabled) { transform: translateY(-50%); }
input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.action-row { display: flex; justify-content: flex-end; margin-top: 10px; }
label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 500; }
input, select, textarea { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 9px 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; caret-color: var(--ink); font-size: 13.5px; line-height: 1.55; transition: border-color .2s, box-shadow .2s, background .2s; }
input, select { height: 40px; min-height: 40px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus, textarea:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 19, 18, .06); }
input:disabled, select:disabled { color: var(--muted); background: var(--canvas); cursor: not-allowed; }
textarea:read-only { color: var(--muted); background: var(--canvas); resize: none; cursor: default; }
textarea { resize: none; min-height: 130px; line-height: 1.7; }
.inline-form { display: flex; align-items: end; gap: 8px; }
.inline-form > * { min-width: 0; }
.inline-form label, .inline-form input { flex: 1; }
.search-field { position: relative; margin: 0 0 10px; }
.search-field .lucide { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.search-field input { padding-left: 30px; background: var(--paper); font-size: 12px; }
.empty-state { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; color: var(--muted); text-align: center; }
.empty-state > .lucide { width: 28px; height: 28px; color: var(--icon-muted); stroke-width: 1.4; }
.empty-state p { margin: 0; font-size: 14px; }

.training-layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); border-top: 1px solid var(--line); min-height: calc(100dvh - 184px); }
.training-layout > *, .learning-workspace > * { min-width: 0; }
.catalog { position: sticky; top: 76px; align-self: start; max-height: calc(100dvh - 100px); display: flex; flex-direction: column; padding: 20px 20px 0 0; border-right: 1px solid var(--line); }
.catalog .section-head h2 { font-size: 14px; }
.catalog .search-field { flex-shrink: 0; }
.catalog-filter { display: block; margin-bottom: 8px; }
.catalog-filter select { width: 100%; min-height: 40px; }
.product-videos { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.product-videos h3 { margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.product-videos ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 2px 16px; margin: 0; padding: 0; list-style: none; }
.product-videos li { min-width: 0; }
.product-videos a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 7px 0; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.product-videos a:hover { color: var(--ink); }
.product-videos a span { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.product-videos .lucide { flex: 0 0 16px; width: 16px; height: 16px; }
.course-cycle > .lucide { color: var(--muted); }
.reading > .section-head { gap: 12px; align-items: flex-start; }
.reading > .section-head h2 { min-width: 0; overflow-wrap: anywhere; }
.reading > .section-head > button { flex-shrink: 0; }
#products { overflow-y: auto; scrollbar-width: thin; }
#catalog-toggle { display: none; }
.product-link { display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; align-items: start; gap: 8px; width: 100%; min-height: 48px; margin-bottom: 4px; padding: 12px 10px; text-align: left; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 6px; }
.product-link b { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.product-link .course-cycle { color: var(--muted); font-size: 12px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.product-link .lucide { width: 16px; height: 16px; color: var(--success); margin-top: 3px; }
.product-link:hover { background: var(--rail); }
.product-link.active { background: var(--brand-soft); color: var(--brand-ink); }
.product-link.active b { font-weight: 600; }
.learning-workspace { display: block; max-width: 960px; padding: 24px 0 0 32px; }
.reading { padding: 0; }
.reading #source-version { overflow-wrap: anywhere; }
.reading > .section-head { padding-bottom: 24px; margin-bottom: 0; align-items: start; }
.reading > .section-head h2 { font-size: 20px; max-width: 32ch; }
.explanation { padding: 12px 0; border-top: 1px solid var(--line); }
.explanation > summary { font-size: 14px; font-weight: 500; }
.explanation > summary .lucide { width: 16px; height: 16px; margin-right: 6px; }
.explanation form { margin-top: 16px; }
.explanation form label { margin-bottom: 6px; }
.explanation .inline-form { flex-wrap: wrap; }
.explanation .inline-form input { flex: 1 1 180px; }
.original { overflow-wrap: anywhere; }
.rich-text { font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.rich-text > p, .rich-text > ul, .rich-text > ol { max-inline-size: 72ch; }
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text h1 { font-size: 18px; margin: 0 0 14px; }
.rich-text h2 { font-size: 15px; margin: 18px 0 7px; }
.rich-text h3 { font-size: 14px; margin: 14px 0 6px; }
.rich-text p { margin: 0 0 12px; }
.rich-text ul, .rich-text ol { padding-left: 22px; }
.rich-text pre { overflow-x: auto; padding: 10px; background: var(--rail); border-radius: 4px; }
.rich-text code { font-size: 12px; }
.rich-text img { max-width: 100%; height: auto; }
.rich-text table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.rich-text th, .rich-text td { border: 1px solid var(--line); padding: 7px 9px; }
.rich-text blockquote { margin: 12px 0; padding: 10px 12px; border-left: 1px solid var(--control-line); background: var(--rail); }
.answer { margin-top: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer.rich-text { white-space: normal; }
.sources { margin-top: 16px; border-top: 1px solid var(--line); }
.sources summary { padding-block: 12px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); }
.sources summary .count { margin-left: 8px; }
.sources article { border-top: 1px solid var(--line); padding: 10px 0; }
.sources article p { margin: 0; white-space: pre-wrap; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.sources article h3 { margin: 0 0 4px; font-size: 13px; }
.sources article .small { margin-bottom: 8px; }

.exam-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px 0; border-block: 1px solid var(--line); margin-bottom: 16px; }
.exam-toolbar > label { min-width: 156px; }
.exam-rules { position: relative; flex-shrink: 0; }
.exam-rules summary { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.exam-rules summary .lucide { width: 16px; height: 16px; }
.exam-rules > div { position: absolute; right: 0; top: 100%; z-index: 10; width: min(320px, calc(100vw - 40px)); padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 12px 30px #20212414; font-size: 14px; }
.exam-rules p { margin: 0; }
.exam-rules p + p { margin-top: 12px; }
.segmented { display: flex; gap: 0; padding: 0; margin: 0; border: 0; position: relative; }
.segmented label { display: block; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; }
.segmented span { display: grid; place-items: center; min-height: var(--control-height); padding: 8px 12px; border: 1px solid var(--control-line); background: var(--paper); cursor: pointer; transition: background var(--motion), color var(--motion); }
.segmented input:disabled + span { cursor: not-allowed; opacity: .6; }
.segmented label:first-of-type span { border-radius: 6px 0 0 6px; }
.segmented label:not(:first-of-type) span { border-left: 0; }
.segmented label:last-of-type span { border-radius: 0 6px 6px 0; border-left: 0; }
.segmented input:checked + span { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.segmented input:focus-visible + span { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
.exam-session-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 0; }
.exam-session-head h2 { margin: 0; }
.exam-question { padding: 20px 0; border: 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.exam-question h2 { margin: 8px 0 12px; font-size: 15px; max-inline-size: 76ch; font-weight: 600; line-height: 1.7; }
.exam-question textarea { min-height: 150px; }
.answer-option { display: flex; align-items: start; gap: 10px; max-width: 760px; padding: 10px 12px; border: 1px solid var(--line); margin-top: 8px; background: var(--paper); cursor: pointer; }
.answer-option:hover { border-color: var(--control-line); background: var(--canvas); }
.answer-option input { flex: 0 0 auto; width: auto; min-height: 18px; margin-top: 2px; }
.conversation { display: grid; gap: 8px; max-width: 760px; margin: 14px 0; }
.conversation p { margin: 0; padding: 9px 12px; background: var(--canvas); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.review-conversation { margin-top: 12px; }
.review-video { display: block; width: min(100%, 720px); max-height: 420px; margin: 12px 0 6px; background: #111; }
.review-criteria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 10px 0; }
.review-criteria input { margin-top: 5px; }
#bank-warning { white-space: normal; line-height: 1.7; max-width: 100%; }
.bank-tools, .bank-actions { margin-block: 10px; }
.bank-tools { justify-content: start; align-items: end; flex-wrap: wrap; gap: 8px; }
.bank-tools label { min-width: 180px; }
.bank-actions { justify-content: start; gap: 8px; }
.bank-count { margin: 12px 0; }
.bank-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding-block: 16px; }
.bank-record > .reading-head { grid-column: 1 / -1; margin-bottom: 0; min-height: 28px; }
.bank-record > p { grid-column: 1 / -1; margin: 0; }
.bank-record > details { min-width: 0; }
.bank-record .bank-actions { align-self: start; margin: 0; }
.bank-record > details > summary { font-size: 13px; color: var(--muted); }
.bank-editor { margin-block: 10px; }
.bank-editor[open] { border-bottom: 1px solid var(--line); }
.bank-editor summary { font-weight: 600; }
.bank-import { margin-bottom: 18px; }
.knowledge-point-editor .inline-form { margin-top: 10px; align-items: end; }
.knowledge-point-editor label { flex: 1; min-width: 0; }
#video-progress { width: min(100%, 720px); margin-block: 10px; }
.question-rubric { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.question-rubric ul { list-style: none; margin: 0 0 12px; padding: 0; max-width: 440px; }
.question-rubric li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.question-rubric li span { white-space: nowrap; font-variant-numeric: tabular-nums; }
#exam-form > .button { margin: 2px 0 16px; }
.result { padding: 16px 0; border-bottom: 1px solid var(--line); }
.result-outcome { display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: 12px; }
.result-score { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-score.success { color: var(--success); }
.result-score.attention { color: var(--warning); }
.result-feedback { max-inline-size: 76ch; }
.state-label { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.state-label.success { color: var(--success); background: var(--success-soft); }
.state-label.attention { color: var(--warning); background: var(--warning-soft); }
.state-label.neutral { color: var(--muted); background: var(--neutral-soft); }
.result-review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding-bottom: 12px; }
.result-review h3 { margin-bottom: 8px; }
.result-review ul { margin: 0; padding-left: 20px; }
.result-review li + li { margin-top: 6px; }
.review-links { display: grid; gap: 4px; }
.review-links a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-height); padding: 8px 0; text-decoration: none; }
.review-links a span { min-width: 0; overflow-wrap: anywhere; }
.review-links a .lucide { width: 15px; height: 15px; }
.review-links a:hover { text-decoration: underline; }
.grading-item { padding: 16px 0; border-top: 1px solid var(--line); }
.grading-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.grading-item-head h3 { margin: 0; }
.question-prompt { margin: 8px 0; max-inline-size: 76ch; }
.submitted-answer .answer { margin: 0 0 12px; padding: 12px; background: var(--canvas); }
.review-reason { font-size: 13px; }
.history-section { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.history-item { border-top: 1px solid var(--line); padding: 0; }
.history-item > summary { cursor: pointer; overflow-wrap: anywhere; font-size: 13px; padding-block: 14px; }
.history-item[open] > summary { color: var(--ink); font-weight: 600; }
.history-item summary span { margin-left: 14px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.mock-notice { margin: 0 0 12px; padding: 8px 12px; color: var(--warning); background: var(--warning-soft); font-size: 13px; }
.task-section { margin-bottom: 12px; padding-bottom: 0; }
.task-section .section-head { border: 0; margin-bottom: 8px; }
.task-section-head h2 { font-size: 14px; color: var(--muted); font-weight: 500; }
.task-row, .remediation-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.task-row > div:first-child, .remediation-row > div:first-child { min-width: 0; flex: 1; }
.task-row b, .remediation-row b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.task-row .small, .remediation-row .small { display: block; }
.task-row details { margin-top: 6px; }
.task-row summary { color: var(--muted); cursor: pointer; font-size: 13px; min-height: var(--control-height); }
.task-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.task-title .lucide { width: 15px; height: 15px; color: var(--muted); }
.task-row .rich-text { margin-top: 8px; }
.task-row .task-actions { align-self: flex-start; }
.single-task [data-complete-task] { display: none; }
.task-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.full-document { padding: 12px 0; border-top: 1px solid var(--line); }
.course-meta { display: flex; flex-wrap: wrap; gap: 20px 32px; margin: 0 0 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.course-meta > div { display: grid; gap: 4px; }
.course-meta dt { color: var(--muted); font-size: 13px; }
.course-meta dd { margin: 0; color: var(--ink); font-weight: 500; }
.course-copy { white-space: pre-wrap; max-inline-size: 70ch; overflow-wrap: anywhere; }
.course-extra { margin-top: 24px; }
.full-document > summary { font-weight: 600; color: var(--muted); }
.full-document > summary > .lucide { width: 15px; height: 15px; margin-right: 6px; }
.full-document .original { padding-top: 12px; }
a.button, a.icon-button { text-decoration: none; }
.remediation-section { padding: 0; border-top: 1px solid var(--line); margin-bottom: 12px; }
.remediation-overview > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; font-weight: 600; }
.remediation-overview > summary > span:first-of-type { display: inline-flex; align-items: center; gap: 8px; }
.remediation-count { display: flex; align-items: center; gap: 8px; }
.remediation-row { align-items: start; }
.remediation-row details { margin-top: 8px; }
.remediation-row .rich-text { margin-top: 12px; }
.grading-criteria, .source-snapshot, .review-editor { margin-top: 12px; }
.grading-criteria summary, .source-snapshot summary, .review-editor summary, .remediation-row summary { min-height: var(--control-height); cursor: pointer; color: var(--muted); overflow-wrap: anywhere; font-size: 13px; }
.grading-criteria summary:hover, .source-snapshot summary:hover, .review-editor summary:hover, .remediation-row summary:hover, .task-row summary:hover { color: var(--brand-ink); }
.review-editor > summary { color: var(--brand-ink); font-weight: 600; }
.criterion-row { padding: 10px 0; border-top: 1px solid var(--line); }
.criterion-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; font-size: 13px; }
.criterion-head b { font-weight: 600; }
.criterion-score { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.criterion-row p { font-size: 13px; margin: 6px 0; }
.criterion-row .deduction { color: var(--danger); }
.source-snapshot { padding: 12px 0; border-block: 1px solid var(--line); }
.source-snapshot .rich-text { margin: 12px 0; }
.review-entry { padding: 8px 0; border-top: 1px solid var(--line); }
.record-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.record-filters label { flex: 1 1 180px; max-width: 280px; }
.review-form { display: grid; gap: 12px; padding-top: 12px; }
.review-form fieldset { min-width: 0; margin: 0; padding: 12px 0; border: 0; border-top: 1px solid var(--line); }
.review-form legend { max-width: 100%; padding: 0 4px; overflow-wrap: anywhere; font-weight: 600; }
.review-form fieldset label + label { margin-top: 10px; }
.review-form input[type="number"] { max-width: 130px; }
.review-form textarea { min-height: 80px; }
.review-form > .button { justify-self: start; }

.admin-tabs { display: grid; gap: 2px; padding: 12px 0 12px 8px; margin-top: 12px; border-top: 1px solid var(--line); }
.admin-tabs button { display: flex; align-items: center; gap: 10px; padding: 8px 12px; min-height: 40px; background: transparent; color: var(--muted); border: 0; border-radius: 6px; text-align: left; white-space: nowrap; font-size: 14px; }
.admin-tabs button .lucide { width: 16px; height: 16px; }
.admin-tabs button:hover { color: var(--ink); background: var(--neutral-soft); }
.admin-tabs button[aria-selected="true"] { color: var(--ink); background: #e6e8eb; font-weight: 600; }
.admin-section-switch { display: none; }
.admin-section-select { display: block; }
[data-page="admin"] .page-head:has(#admin-status:empty) { display: none; }
.admin-section { padding: 0; min-width: 0; width: 100%; }
.admin-section .rich-text > p, .admin-section .rich-text > ul, .admin-section .rich-text > ol { max-inline-size: none; }
.admin-section .rich-text { overflow-x: auto; }
.admin-section .rich-text table { display: table; width: 100%; }
.admin-section form { margin-bottom: 18px; }
.admin-section > label { max-width: 280px; }
#user-form, #settings-form { max-width: 760px; }
.account-form, .operations-form { display: grid; gap: 16px; max-width: 640px; }
.account-form { max-width: 440px; }
.account-form > button, .operations-form > button { justify-self: start; }
.operations-form fieldset { margin-top: 20px; padding: 16px 0; border: 0; border-top: 1px solid var(--line, #e2e5e9); }
.rubric-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: start; gap: 16px; margin-bottom: 20px; }
.rubric-row textarea { min-height: 88px; }
.draft-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; min-height: 36px; }
.draft-list { margin-bottom: 24px; }
.draft-record { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.draft-record > div { min-width: 0; overflow-wrap: anywhere; }
.ai-review-state { margin: 16px 0; }
.records-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); border-top: 1px solid var(--line); padding-top: 20px; }
.records-summary > section { min-width: 0; }
.records-summary h3 { margin-top: 0; }
.records-summary p { overflow-wrap: anywhere; }
.records-exams { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
.records-exams > h3 { margin-top: 0; }
.backup-location { max-width: 640px; margin-block: 12px; }
#backup-list .record, #backup-location { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .rubric-row { grid-template-columns: minmax(0, 1fr); }
  .draft-record { align-items: start; flex-direction: column; }
}
.upload-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 800px; }
.upload-form .wide { grid-column: 1 / -1; }
.upload-form > .button { justify-self: start; }
[data-page="admin"] .upload-form { max-width: none; }
.knowledge-views { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.knowledge-views [aria-pressed="true"] { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-line); }
.knowledge-editor { margin: 20px 0 24px; }
.knowledge-editor > summary { --disclosure-inset: 16px; display: inline-flex; align-items: center; gap: 8px; padding-block: 10px; padding-inline-end: 16px; min-height: 44px; color: #fff; background: var(--primary); border-radius: 6px; font-weight: 600; font-size: 14px; }
.knowledge-editor > summary.disclosure-trigger > .disclosure-chevron { color: inherit; }
.knowledge-editor > summary:hover { background: var(--primary-hover); }
.knowledge-editor > form { margin-top: 24px; padding-bottom: 16px; }
.version-entry { margin: 8px 0; padding: 8px 0; border-top: 1px solid var(--line); }
.source-version { margin-top: 8px; }
.source-version .rich-text { white-space: normal; }
#knowledge-search-form { flex-wrap: wrap; }
#knowledge-search-form label { flex: 1 1 180px; }
#knowledge-search-results { min-width: 0; width: 100%; }
#knowledge-jobs .reading-head, #knowledge .reading-head { flex-wrap: wrap; }
#knowledge-form input[type="hidden"] { display: none; }
#knowledge-form select[multiple] { min-height: 100px; }
.upload-field { display: grid; align-content: start; gap: 6px; }
.file-picker { display: flex; align-items: center; gap: 8px; position: relative; min-height: var(--control-height); padding: 8px 10px; border: 1px solid var(--control-line); border-radius: 6px; cursor: pointer; font-size: 13px; }
.file-picker:hover { background: var(--canvas); border-color: var(--ink); }
.file-picker:focus-within { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 19, 18, .06); }
.file-picker input:focus, .file-picker input:focus-visible { outline: none; border-color: transparent; box-shadow: none; }
.file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#file-selection { overflow-wrap: anywhere; }
.training-video { max-width: 760px; margin-top: 12px; aspect-ratio: 16 / 9; background: var(--canvas); }
.training-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.record { padding: 12px 0; border-top: 1px solid var(--line); }
.record .reading-head > b { min-width: 0; overflow-wrap: anywhere; }
.record .reading-head > .state-label { flex-shrink: 0; }
.record .original { padding-top: 12px; white-space: pre-wrap; }
.record .original.rich-text { white-space: normal; }
.user-record { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.user-record > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.password-reset-form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 16px 0 0; max-width: 560px; }
.password-reset-form label { flex: 1 1 160px; }
.toggle-label { display: inline-flex; align-items: center; gap: 7px; min-height: var(--control-height); padding-inline: 6px; cursor: pointer; }
.toggle-label input { flex: 0 0 16px; width: 16px; height: 16px; min-height: 0; accent-color: var(--brand-ink); }
#admin-status { color: var(--success); }
.error { color: var(--danger); font-size: 13px; font-weight: 500; }
#request-error { padding: 10px 12px; margin: 0 0 12px; background: var(--danger-soft); border-radius: 4px; }
.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; }
.feedback-toast { position: fixed; bottom: 20px; left: calc(var(--sidebar) + (100% - var(--sidebar)) / 2); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 8px; width: max-content; max-width: min(480px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 8px 24px rgba(20,20,19,.08); font-size: 13px; pointer-events: none; animation: feedback-in var(--motion) var(--ease); }
.feedback-toast .lucide { color: var(--success); }
.loading-output { padding: 20px 0; min-height: 160px; color: var(--muted); font-size: 13px; }
.loading-output p { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; }
.loading-output .lucide { animation: working 1s linear infinite; }
.skeleton-line { height: 10px; background: var(--neutral-soft); border-radius: 3px; margin-top: 14px; width: 100%; }
.skeleton-line:nth-last-child(2) { width: 88%; }
.skeleton-line:last-child { width: 64%; }
@keyframes working { to { transform: rotate(360deg); } }
@keyframes feedback-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 1680px) and (min-width: 761px) {
  .main { padding-inline: 16px; }
}
@media (max-width: 1099px) {
  .main { padding-inline: 16px; }
  .training-layout { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .learning-workspace { padding-left: 24px; }
  .reading > .section-head { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; --control-height: var(--touch-height); }
  .app-sidebar { width: min(280px, calc(100% - 56px)); max-width: calc(100% - 56px); transform: translateX(-100%); transition: transform var(--motion) var(--ease); z-index: 50; }
  .nav-open .app-sidebar { transform: translateX(0); }
  .nav-open { overflow: hidden; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 40; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(20,20,19,.3); }
  .workspace-bar { left: 0; padding: 0 12px; gap: 8px; }
  .mobile-menu.icon-button { display: inline-flex; }
  .breadcrumb { flex: 1; gap: 6px; }
  .breadcrumb > span, .breadcrumb > .lucide { display: none; }
  .breadcrumb h1 { font-size: 15px; }
  [data-page="training"] .workspace-shortcut .lucide:last-child { display: none; }
  .main { width: 100%; margin-left: 0; padding: 76px 20px 24px; }
  .page-head { align-items: center; flex-wrap: wrap; margin-bottom: 20px; gap: 12px; }
  .page-head .muted { font-size: 13px; }
  .study-progress progress { display: none; }
  .study-progress { min-height: 30px; }
  .training-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .learning-workspace { padding: 24px 0 0; }
  .catalog { position: static; max-height: none; padding: 12px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .catalog .section-head { min-height: 28px; margin-bottom: 8px; }
  .catalog .search-field { max-width: 100%; }
  #catalog-toggle { display: inline-flex; margin-left: auto; }
  #products { display: none; max-height: 320px; overflow-y: auto; }
  .catalog-open #products { display: block; }
  .catalog-open #catalog-toggle .lucide { transform: rotate(180deg); }
  .product-link { width: 100%; }
  .reading { padding: 0; }
  .reading > .section-head { gap: 16px; padding-bottom: 20px; }
  .reading > .section-head h2 { font-size: 20px; }
  .task-row { flex-wrap: wrap; gap: 8px; }
  .task-row > div:first-child { flex-basis: 100%; }
  .task-row .task-actions { justify-content: flex-end; width: 100%; }
  .course-meta { gap: 16px 24px; }
  .explanation { padding: 12px 0; }
  .explanation .inline-form input { flex: 1; }
  .empty-state { min-height: 130px; }
  .exam-toolbar { gap: 10px; }
  .exam-toolbar > label { flex: 1 1 140px; min-width: 0; }
  .exam-toolbar .segmented { flex-basis: 100%; }
  .exam-toolbar > .button { width: 100%; }
  .exam-question { padding: 16px 0; }
  .history-item summary span { display: block; margin-left: 0; }
  .remediation-row { flex-wrap: wrap; }
  .remediation-row > div:first-child { flex-basis: 100%; }
  .task-actions .button { min-height: var(--touch-height); }
  .result-review { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .result-outcome { gap: 8px; }
  .result-score { font-size: 22px; }
  .result .reading-head { align-items: start; }
  .admin-tabs button { min-height: var(--touch-height); }
  .feedback-toast { left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .admin-tabs { gap: 2px; }
  .admin-tabs button { gap: 5px; }
  [data-page="admin"] .page-head { margin-bottom: 0; min-height: 0; }
  [data-page="admin"] #admin-status:empty { display: none; }
  .admin-section-switch { display: block; margin-bottom: 20px; }
  .admin-section-switch > span { display: none; }
  .records-summary { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .records-summary > section + section { border-top: 1px solid var(--line); padding-top: 16px; }
  .bank-record { grid-template-columns: minmax(0, 1fr); }
  .bank-record > .reading-head, .bank-record > p { grid-column: auto; }
  .bank-record .bank-actions { justify-content: flex-end; }
  #user-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #user-form > .button { justify-self: start; }
  .admin-section { padding-top: 0; }
  .admin-section .inline-form { flex-wrap: wrap; }
  .admin-section .inline-form label { flex: 1 1 150px; }
  .upload-form { grid-template-columns: minmax(0, 1fr); }
  .upload-form .wide { grid-column: auto; }
  .user-record { align-items: flex-start; flex-wrap: wrap; }
  .record .reading-head { align-items: flex-start; }
}
@media (max-width: 366px) {
  .main { padding-inline: 16px; }
  .workspace-shortcut { gap: 5px; }
  .workspace-shortcut > .lucide:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
[hidden] { display: none !important; }
.daily-save-state, .homework-save-state, #draft-status, #plant-draft-status { color: #5b6268; font-size: 12px; font-weight: 400; line-height: 1.4; }
.feedback-toast { top: 76px; bottom: auto; border: 0; border-radius: 12px; padding: 10px 16px; background: #fff; color: #242424; font-size: 14px; box-shadow: 0 8px 28px rgba(32, 33, 36, .14); }
.feedback-toast .save-tip-mark { width: 18px; height: 18px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #1f9d55; }
.feedback-toast .save-tip-mark svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.daily-field-label small, .hw-answer-heading p, .entry-tip { display: block; margin-top: 4px; color: #5b6268; font-size: 12px; font-weight: 400; line-height: 1.45; }

/* sales shell matches the light workbench used by Davis, hr, and trainers */
body { background: linear-gradient(90deg, #fff var(--sidebar), #fff 0); }
.app-sidebar {
  --nav-item-padding: 12px;
  --nav-icon-size: 16px;
  --nav-icon-gap: 10px;
  --subnav-pad: 8px;
  --subnav-line: calc(var(--nav-item-padding) + var(--nav-icon-size) / 2);
  --subnav-item: calc(var(--nav-item-padding) + var(--nav-icon-size) + var(--nav-icon-gap) + 2px - var(--subnav-pad));
  padding: 0 8px 0; background: #fff; border-right: 1px solid #dedfe2; color: #6b6f77; }
.app-sidebar .brand { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; height: 66px; margin: 0 -8px; padding: 0 8px; background: #fff; }
.app-sidebar .brand-logo { display: block; width: 120px; height: auto; object-fit: contain; object-position: left center; }
.app-sidebar .brand::after { content: none; }
.app-sidebar .workspace-name { display: none; }
.app-sidebar nav { gap: 0; padding: 0 0 76px; }
.app-sidebar .nav-section { display: grid; gap: 0; margin-top: 7px; }
.app-sidebar :is(a, button) > .lucide,
.app-sidebar :is(a, button) > .lucide svg,
.app-sidebar nav a > svg,
.app-sidebar .nav-group-toggle > .lucide,
.app-sidebar .nav-chapter-toggle > .lucide { width: var(--nav-icon-size); height: var(--nav-icon-size); stroke-width: 1.55; }
.app-sidebar .nav-group-toggle > .lucide:last-child,
.app-sidebar .nav-chapter-toggle .side .lucide { width: 14px; height: 14px; stroke-width: 1.5; }
.app-sidebar .nav-section:first-child { margin-top: 0; }
.app-sidebar .nav-section > h2 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px; color: var(--nav-section-ink); font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1.4; white-space: nowrap; }
.app-sidebar .nav-section > h2::after { content: ""; flex: 1; min-width: 12px; height: 1px; background: #dedfe2; }
.app-sidebar nav a, .app-sidebar .nav-group-toggle { min-height: 40px; height: 40px; padding: 0 var(--nav-item-padding); border-radius: var(--nav-item-radius); color: var(--nav-ink); font-size: 13.5px; font-weight: 700; }
.app-sidebar nav a:has(> .nav-notification-count:not([hidden])) { column-gap: 0; padding-inline-end: 5px; }
.app-sidebar nav a:has(> .nav-notification-count:not([hidden])) > .lucide { margin-inline-end: 10px; }
.app-sidebar .nav-notification-count {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 22px;
  min-width: 22px;
  margin-inline-start: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: #E62129;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1;
  text-align: center;
}
.app-sidebar .nav-chapter-link > span:not(.side),
.app-sidebar .nav-chapter-toggle > span:not(.side) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar .nav-chapter-link .side,
.app-sidebar .nav-chapter-toggle .side { display: flex; flex: 0 0 14px; margin-left: auto; }
.app-sidebar .nav-chapter-link .side .lucide,
.app-sidebar .nav-chapter-toggle .side .lucide { width: 14px; height: 14px; }
.app-sidebar .nav-chapter-toggle { display: flex; align-items: center; gap: var(--nav-icon-gap); width: 100%; height: 40px; min-height: 40px; margin: 0; padding: 0 var(--nav-item-padding); border: 0; border-radius: var(--nav-item-radius); background: transparent; color: var(--nav-ink); font: inherit; font-size: 13.5px; font-weight: 700; text-align: left; white-space: nowrap; }
.app-sidebar .nav-chapter-toggle > span:not(.side) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar .nav-chapter-toggle .side { display: flex; flex: 0 0 14px; margin-left: auto; transition: transform 180ms cubic-bezier(.16, 1, .3, 1); }
.app-sidebar .nav-chapter-toggle[aria-expanded="true"] .side { transform: rotate(180deg); }
body.use-chapter-flyout #chapter-flyout.chapter-menu:not([hidden]) {
  display: block !important; position: fixed !important; z-index: 80 !important;
  left: calc(var(--sidebar) + 10px) !important; top: var(--preview-menu-top, 112px) !important;
  width: min(352px, calc(100vw - var(--sidebar) - 24px)) !important; max-height: min(640px, calc(100dvh - 24px));
  margin: 0; overflow: auto; background: #fff; border: 1px solid #e4e6ea; border-radius: 12px;
  box-shadow: 0 12px 36px rgba(27, 32, 43, .12), 0 2px 6px rgba(27, 32, 43, .04);
}
body.use-chapter-flyout #chapter-flyout .sheet-list { padding: 4px; }
body.use-chapter-flyout #chapter-flyout .sheet-list > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: var(--nav-item-radius); background: transparent; color: var(--nav-ink); font: 700 13px/1.45 var(--font-ui); text-align: left; }
body.use-chapter-flyout #chapter-flyout .num { flex: none; width: 4.8em; color: inherit; font-size: 12.5px; }
html body :is(#chapter-flyout, #chapter-sections) button[data-section-index] > .num { color: var(--nav-section-number); }
body.use-chapter-flyout #chapter-flyout .name { min-width: 0; }
body.use-chapter-flyout #chapter-flyout .section-cue { width: 7px; height: 7px; margin-left: auto; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
body.use-chapter-flyout #chapter-flyout .inline-sections { display: grid; margin: 2px 8px 4px 26px; padding: 0 0 2px 10px; border-left: 1px solid #e5e8ed; }
@media (max-width: 760px) {
  .app-sidebar:has(#chapter-flyout:not([hidden])) { padding-bottom: 0; }
  .app-sidebar:has(#chapter-flyout:not([hidden])) .sidebar-footer { padding-bottom: 12px; }
  body .app-sidebar #chapter-flyout.chapter-menu:not([hidden]) {
    position: static !important;
    z-index: auto !important;
    width: auto !important;
    min-width: 0;
    max-height: none;
    margin: 0 0 4px;
    margin-inline-start: calc(var(--nav-item-padding) + var(--chapter-nav-icon-size, var(--nav-icon-size)) + var(--nav-icon-gap) / 2);
    overflow: visible;
    border: 0;
    border-inline-start: 1px solid rgba(23, 24, 27, .08);
    box-shadow: none;
  }
  body .app-sidebar #chapter-flyout .sheet-list { padding: 4px 4px 4px 0; }
  body .app-sidebar #chapter-flyout .sheet-list > button { padding-inline-start: 7px; }
  html body #chapter-flyout .sheet-list button { min-height: var(--touch-height); }
  #chapter-flyout .sheet-list > button > .num { width: 3.9em; }
  #chapter-flyout .name { white-space: normal; overflow-wrap: anywhere; }
  body .app-sidebar .nav-chapter-toggle > .side { transform: rotate(90deg); }
  body .app-sidebar .nav-chapter-toggle[aria-expanded="true"] > .side { transform: rotate(270deg); }
}
.app-sidebar nav a:hover, .app-sidebar .nav-group-toggle:hover { background: var(--nav-hover-bg); color: var(--nav-hover-ink); }
.app-sidebar nav a[aria-current="page"], .app-sidebar nav a[aria-current="step"], .app-sidebar .nav-group-toggle.is-current, .app-sidebar .nav-chapter-toggle[aria-current="page"] { position: relative; overflow: hidden; background: var(--nav-selected-bg); color: var(--nav-selected-ink); font-weight: 700; border: 0; box-shadow: none; }
.app-sidebar nav a[aria-current="page"]:hover, .app-sidebar nav a[aria-current="step"]:hover, .app-sidebar .nav-group-toggle.is-current:hover, .app-sidebar .nav-chapter-toggle[aria-current="page"]:hover { background: var(--nav-selected-bg); color: var(--nav-selected-ink); }
.app-sidebar nav a[aria-current="page"]::after, .app-sidebar nav a[aria-current="step"]::after, .app-sidebar .nav-chapter-toggle[aria-current="page"]::after, .app-sidebar .nav-group-toggle.is-current::after { content: none; }
.app-sidebar .nav-group-toggle { gap: var(--nav-icon-gap); }
.app-sidebar .nav-group-toggle > span { flex: 0 1 auto; position: relative; align-self: stretch; display: flex; align-items: center; }
.app-sidebar .nav-group-toggle > .lucide:last-child { margin-left: auto; }
.app-sidebar nav a[aria-current="page"] .lucide, .app-sidebar nav a[aria-current="step"] .lucide, .app-sidebar .nav-group-toggle.is-current .lucide, .app-sidebar .nav-chapter-toggle[aria-current="page"] .lucide, .app-sidebar .nav-chapter-toggle[aria-current="page"] .side { color: inherit; }
.app-sidebar .nav-tree > .nav-group-toggle {
  transition: color 200ms, background-color 200ms;
}
.app-sidebar .nav-subnav a {
  min-height: 36px;
  margin-inline-start: var(--subnav-item);
  padding-inline: var(--subnav-pad);
  border-radius: var(--nav-item-radius);
  color: var(--nav-ink);
  font-size: 13px;
}
.app-sidebar .nav-subnav > div { position: relative; }
.app-sidebar .nav-subnav > div::before {
  content: "";
  position: absolute;
  inset-block: 4px;
  inset-inline-start: var(--subnav-line);
  width: 1px;
  background: rgba(23, 24, 27, .08);
  pointer-events: none;
}
.app-sidebar .nav-tree .nav-subnav a {
  min-height: 0;
  height: auto;
  padding-block: 4px;
  font-size: 12.5px;
  line-height: 1.6;
  transition: opacity 160ms var(--ease), transform 200ms var(--ease),
    color 200ms;
}
.app-sidebar .nav-tree.is-open .nav-subnav { margin-top: 4px; }
.app-sidebar .nav-tree.is-open .nav-subnav a { transition-delay: 35ms, 35ms, 0s; }
.app-sidebar .nav-tree.is-open .nav-subnav a:nth-child(2) { transition-delay: 80ms, 80ms, 0s; }
.app-sidebar .nav-tree .nav-subnav a + a { margin-top: 4px; }
.app-sidebar .nav-tree .nav-subnav a:focus-visible { outline-offset: -2px; }
.app-sidebar .nav-tree .nav-subnav a[aria-current="page"],
.app-sidebar .nav-tree .nav-subnav a[aria-current="page"]:hover {
  background: var(--nav-selected-bg);
  color: var(--nav-selected-ink);
  font-weight: 700;
}
@media (max-width: 760px) {
  .app-sidebar .nav-tree .nav-subnav a { min-height: var(--touch-height); }
}
.app-sidebar .nav-chapter { min-width: 0; max-width: 100%; margin: 0 0 4px; }
.app-sidebar .nav-chapter #products { display: grid; gap: 1px; min-width: 0; max-width: 100%; margin: 0; padding: 0 0 4px 8px; overflow: hidden; }
.app-sidebar .nav-chapter .day-one-catalog,
.app-sidebar .nav-chapter .day-two-catalog { min-width: 0; max-width: 100%; }
.app-sidebar .nav-chapter .day-link { display: grid; grid-template-columns: auto minmax(0, 1fr) 12px; align-items: center; gap: 4px; width: 100%; min-width: 0; min-height: 28px; margin: 0; padding: 3px 2px 3px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--nav-ink); font-size: 12px; line-height: 1.3; text-align: left; }
.app-sidebar .nav-chapter .milestone-link { grid-template-columns: 16px minmax(0, 1fr); }
.app-sidebar .nav-chapter .factory-review-link { grid-template-columns: minmax(0, 1fr); }
.app-sidebar .nav-chapter .milestone-link > .lucide { width: 14px; height: 14px; }
.app-sidebar .nav-chapter .day-number,
.app-sidebar .nav-chapter .day-link-title,
.app-sidebar .nav-chapter .day-one-step-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar .nav-chapter .day-number { font-size: 11px; }
.app-sidebar .nav-chapter .day-link-title { font-size: 12px; font-weight: 400; }
.app-sidebar .nav-chapter .day-link:hover { background: var(--nav-hover-bg); color: var(--nav-hover-ink); }
.app-sidebar .nav-chapter .day-link[aria-current="step"] { background: var(--nav-selected-bg); color: var(--nav-selected-ink); }
.app-sidebar .nav-chapter .day-link[aria-current="step"] .day-number,
.app-sidebar .nav-chapter .day-link[aria-current="step"] .day-link-title { font-weight: 600; }
.app-sidebar .nav-chapter .day-link > .lucide { width: 12px; height: 12px; }
.app-sidebar .nav-chapter .catalog-chapters { display: grid; min-width: 0; max-width: 100%; padding: 0 0 2px 10px; }
.app-sidebar .nav-chapter .catalog-chapters button { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 4px; align-items: center; width: 100%; min-width: 0; min-height: 26px; padding: 2px 2px; border: 0; border-radius: 6px; background: transparent; color: var(--nav-ink); font-size: 12px; line-height: 1.3; text-align: left; }
.app-sidebar .nav-chapter .catalog-chapters button:hover { background: var(--nav-hover-bg); color: var(--nav-hover-ink); }
.app-sidebar .nav-chapter .catalog-chapters button[aria-current="location"] { background: var(--nav-selected-bg); color: var(--nav-selected-ink); font-weight: 600; }
.app-sidebar .nav-mark {
  position: absolute;
  z-index: 0;
  border-radius: var(--nav-item-radius);
  background: var(--nav-selected-bg);
  pointer-events: none;
}
.app-sidebar nav:has(.nav-mark) { position: relative; }
.app-sidebar nav:has(.nav-mark) :is(a, button) { position: relative; z-index: 1; }
.app-sidebar nav:has(.nav-mark) :is(
  a[aria-current="page"]:not(.nav-subnav a),
  a[aria-current="page"]:not(.nav-subnav a):hover,
  a[aria-current="step"],
  a[aria-current="step"]:hover,
  .nav-chapter-toggle[aria-current="page"],
  .nav-chapter-toggle[aria-current="page"]:hover
),
.app-sidebar nav:has(.nav-mark) .nav-tree :is(.nav-mark-target, .nav-mark-target:hover),
.app-sidebar nav:has(.nav-mark) .nav-chapter .day-link[aria-current="step"],
.app-sidebar nav:has(.nav-mark) .nav-chapter .day-link[aria-current="step"]:hover,
.app-sidebar nav:has(.nav-mark) .nav-chapter .catalog-chapters button[aria-current="location"],
.app-sidebar nav:has(.nav-mark) .nav-chapter .catalog-chapters button[aria-current="location"]:hover { background: transparent; }
.app-sidebar .nav-chapter .catalog-chapters .day-one-step-number { color: var(--nav-section-number); }
.app-sidebar .nav-chapter .catalog-chapter-status { display: none; }
.app-sidebar .sidebar-footer { position: sticky; bottom: 0; z-index: 2; margin: auto -8px 0; background: #fff; border-top: 1px solid #dedfe2; }
.app-sidebar .account { grid-template-columns: minmax(0, 1fr) 24px 24px; gap: 8px; margin: 0; padding: 10px; border-top: 0; color: var(--nav-ink); }
.app-sidebar .account b { color: var(--nav-ink); font-size: 13px; }
.app-sidebar .account div > span { color: var(--nav-ink); }
.app-sidebar .icon-button { width: 24px; height: 28px; min-height: 28px; padding: 0; border-radius: 0; color: #6b6f77; }
.app-sidebar .icon-button:hover { background: #eceef1; color: #17181b; }
.sidebar-account {
  position: relative;
  margin: 7px 8px;
}
.sidebar-account-toggle {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--nav-ink);
  text-align: start;
  cursor: pointer;
}
.sidebar-account-toggle:hover,
.sidebar-account-toggle[aria-expanded="true"] { background: var(--nav-hover-bg); color: var(--nav-hover-ink); }
.sidebar-account-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eceef0;
  color: var(--nav-ink);
  font-size: 13px;
  font-weight: 650;
}
.sidebar-account-identity { display: grid; min-width: 0; gap: 0; line-height: 1.25; }
.sidebar-account-identity b {
  overflow: hidden;
  color: rgba(0, 0, 0, .95);
  font-size: 14px;
  font-weight: 700;
  line-height: 17.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-account-identity > span {
  overflow: hidden;
  color: #6b6f77;
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-account-chevron { width: 16px; height: 16px; color: var(--nav-ink); stroke-width: 2; }
.sidebar-account-actions {
  position: fixed;
  z-index: 70;
  width: 224px;
  min-width: 224px;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(23, 24, 27, .1), 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  transform-origin: left bottom;
}
.sidebar-account-actions.is-opening { animation: sidebar-account-in 100ms ease both; }
.sidebar-account-actions.is-closing { animation: sidebar-account-out 100ms ease both; }
.sidebar-account-menu-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding: 6px 4px 8px;
  border-bottom: 1px solid #e4e6ea;
}
@keyframes sidebar-account-in {
  from { opacity: 0; transform: translate3d(-8px, 0, 0) scale(.95); }
}
@keyframes sidebar-account-out {
  to { opacity: 0; transform: scale(.95); }
}
@keyframes sidebar-account-in-up {
  from { opacity: 0; transform: translate3d(0, 8px, 0) scale(.95); }
}
.sidebar-account-actions :is(a, button) {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--nav-ink);
  font: inherit;
  font-size: 13px;
  text-align: start;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.sidebar-account-actions :is(a, button) > .lucide { width: 15px; height: 15px; flex: none; stroke-width: 1.6; }
.sidebar-account-actions a:hover { background: var(--nav-hover-bg); color: var(--nav-hover-ink); }
.app-sidebar .sidebar-account-actions a[aria-current="page"],
.app-sidebar .account a[aria-current="page"] { background: var(--nav-selected-bg); color: var(--nav-selected-ink); font-weight: 700; }
.sidebar-account-signout { margin-top: 3px; padding-top: 3px; border-top: 1px solid var(--line); }
.sidebar-account-signout button:hover { background: var(--danger-soft); }
.sidebar-account :is(button, a):focus-visible { outline: 2px solid var(--brand-ink); outline-offset: -2px; }
.workspace-bar { height: 64px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); }
.workspace-bar .breadcrumb b, .workspace-bar .breadcrumb h1 { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: .01em; line-height: 1.15; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: #eceef1; }
.table tbody td:first-child { transition: padding .25s var(--e); }
.table tbody tr:hover td:first-child { padding-left: 16px; }
@media (min-width: 761px) {
  :root { --sidebar: 160px; }
  .app-sidebar .brand-logo { width: 120px; height: auto; max-width: 100%; }
  .app-sidebar > nav > .nav-section > a > span { white-space: nowrap; }
}
@media (max-width: 760px) {
  .sidebar-account-actions {
    position: absolute;
    inset: auto 0 calc(100% + 4px);
    width: auto;
    min-width: 0;
    transform-origin: center bottom;
  }
  .sidebar-account-actions.is-opening { animation-name: sidebar-account-in-up; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-account-actions.is-opening,
  .sidebar-account-actions.is-closing { animation: none; }
}
@media (prefers-reduced-motion: no-preference) {
  body[data-page] main.workbench-ready {
    animation: workbench-rise 160ms cubic-bezier(.16, 1, .3, 1) backwards;
  }
}
@keyframes workbench-rise { from { translate: 0 4px; } to { translate: 0 0; } }
@media (max-width: 1536px) and (min-width: 761px) {
  :root { --sidebar: 160px; }
  .app-sidebar { padding-left: 8px; padding-right: 8px; }
  .app-sidebar .brand { margin-left: -8px; margin-right: -8px; padding: 0 8px; }
  .app-sidebar .sidebar-footer { margin-left: -8px; margin-right: -8px; }
  .app-sidebar .nav-chapter #products { padding-left: 4px; }
  .app-sidebar .nav-chapter .day-link { padding-left: 6px; }
}
input:focus, input:focus-visible,
textarea:focus, textarea:focus-visible,
select:focus, select:focus-visible,
.search-field:focus-within, .search:focus-within,
.file-picker:focus-within, .srch:focus-within { outline: none !important; }
