/* Reading workspace: a quiet index and continuous prose, with violet reserved for learning actions. */
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.75 var(--sans); overflow-x: clip; }
button,input,textarea,select { font: inherit; color: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 4px; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 200; left: 16px; top: -80px; background: var(--panel); padding: 12px; }
.skip-link:focus { top: 10px; }
h1,h2,h3,h4,p { margin-top: 0; }
h1 { font-size: clamp(28px,3vw,38px); line-height: 1.35; letter-spacing: -.035em; margin-bottom: 12px; overflow-wrap: anywhere; }
h2 { font-size: 21px; line-height: 1.5; letter-spacing: -.02em; }
h3 { font-size: 17px; line-height: 1.6; }
small { font-size: 13px; }
.site-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: var(--sidebar); padding: 29px 18px 20px; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.25; padding: 0 9px; }
.brand img { border-radius: 9px; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 6px; }
.search-trigger { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 32px 0 24px; padding: 9px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; min-height: 42px; }
kbd { font: 11px var(--mono); padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; }
.nav-label { padding: 10px 13px 7px; color: var(--muted); font-size: 11px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 13px; margin: 4px 0; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-link:hover { background: var(--soft); color: var(--ink); }
.nav-symbol { width: 18px; font: 17px var(--mono); text-align: center; }
.sidebar-note { margin: auto 9px 25px; padding-top: 40px; font-size: 12px; color: var(--green); }
.sidebar-note p { color: var(--muted); line-height: 1.8; margin: 10px 0 0; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.sidebar-bottom { display: flex; justify-content: space-between; gap: 6px; border-top: 1px solid var(--line); padding: 18px 5px 0; font-size: 12px; }
.sidebar-bottom a { color: var(--muted); text-decoration: none; }
.sidebar-bottom button { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; }
.site-frame { margin-left: var(--sidebar); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--header); display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 0 38px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 13px; }
#breadcrumbs { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 24px; align-items: center; flex-shrink: 0; }
.edition { color: var(--muted); font-size: 12px; }
.profile-link { display: inline-block; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 7px; text-decoration: none; font-size: 12px; }
.icon-button { border: 1px solid var(--line); background: var(--panel); border-radius: 7px; min-height: 38px; padding: 6px 12px; font-size: 13px; }
#menu-toggle,.topbar-actions [data-open-search] { display: none; }
#menu-close { display: none; }
#content { min-height: calc(100vh - 145px); outline: none; }
.page { max-width: 1320px; margin: 0 auto; padding: 39px 44px 60px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-heading p,.lede { color: var(--muted); max-width: 760px; margin: 0; font-size: 15px; }
.quiet-label { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 5px; background: var(--soft); color: var(--muted); font-size: 11px; vertical-align: middle; }
.badge.violet { color: var(--accent); background: var(--accent-soft); }
.badge.green { color: var(--green); background: var(--green-soft); }
.badge.amber { color: var(--amber); background: var(--amber-soft); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 294px; gap: 28px; align-items: start; }
.continue-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 27px 28px; margin-bottom: 28px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.continue-card::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px; background: var(--accent); }
.continue-card h2 { font-size: 23px; margin: 10px 0 8px; }
.continue-card p { color: var(--muted); font-size: 14px; margin-bottom: 20px; max-width: 630px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 9px 17px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: var(--panel); text-decoration: none; font-size: 13px; font-weight: 600; gap: 8px; }
.button.secondary { border-color: var(--line); background: var(--panel); color: var(--ink); }
.button:hover { filter: brightness(.94); }
[data-theme="dark"] .button:not(.secondary) { color: var(--paper); }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.text-link { font-size: 13px; text-decoration: none; }
.section-heading { display: flex; gap: 16px; justify-content: space-between; align-items: baseline; margin: 30px 0 14px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.stage { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.stage-head { padding: 20px 22px 15px; display: flex; align-items: flex-start; gap: 13px; }
.stage-number { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; color: var(--accent); background: var(--accent-soft); border-radius: 9px; font: 13px var(--mono); }
.stage-head h3 { margin: 0 0 3px; font-size: 16px; }
.stage-head p { color: var(--muted); margin: 0; font-size: 12px; }
.chapter-row { display: flex; align-items: center; gap: 14px; padding: 14px 22px; color: var(--ink); border-top: 1px solid var(--line); text-decoration: none; min-width: 0; }
.chapter-row:hover { background: var(--paper); }
.row-number { color: var(--muted); font: 12px var(--mono); width: 24px; flex-shrink: 0; }
.row-body { flex: 1; min-width: 0; }
.row-body strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.6; }
.row-body small { color: var(--muted); font-size: 12px; }
.row-tail { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.row-done { color: var(--green); }
.dashboard-aside { display: grid; gap: 20px; }
.panel { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.panel h2 { font-size: 15px; margin-bottom: 18px; }
.panel p { font-size: 13px; color: var(--muted); }
.progress-track { height: 6px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.progress-track span { display: block; height: 100%; background: var(--accent); }
.progress-summary { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 12px 0 8px; }
.progress-summary b { color: var(--ink); font-weight: 500; }
.fact-list { list-style: none; padding: 0; margin: 18px 0 0; }
.fact-list li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.fact-list b { color: var(--ink); font-weight: 500; }
.reading-tip { background: var(--accent-soft); border: 0; }
.reading-tip h2 { color: var(--accent); }
.reading-tip p { color: var(--ink); line-height: 1.9; }
.update-item { display: block; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); padding: 13px 0; font-size: 13px; line-height: 1.65; }
.update-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.frontier-grid,.project-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.content-card { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); text-decoration: none; }
.content-card:hover { border-color: var(--accent); }
.content-card h3 { font-size: 17px; margin: 12px 0 9px; }
.content-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.content-card small { color: var(--accent); font-size: 12px; }
.reader-layout { display: grid; grid-template-columns: 242px minmax(0,1fr); min-height: calc(100vh - var(--header)); }
.reader-index { position: sticky; top: var(--header); align-self: start; max-height: calc(100vh - var(--header)); overflow-y: auto; padding: 26px 18px; background: var(--paper); border-right: 1px solid var(--line); }
.reader-index > h2 { font-size: 14px; margin: 0 10px 16px; }
.lesson-disclosure > summary { padding:0 10px 14px; font-size:14px; font-weight:600; cursor:pointer; }
.reader-index a { display: block; padding: 9px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.7; margin: 3px 0; }
.reader-index a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.reader-index a:hover { background: var(--soft); }
.reader-index .group-label { margin: 20px 10px 8px; color: var(--muted); font-size: 11px; }
.reader-main { min-width: 0; padding: 36px clamp(22px,4vw,66px) 70px; background: var(--panel); }
.reader-body { max-width: 820px; margin: 0 auto; }
.reader-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding-bottom: 22px; font-size: 12px; color: var(--muted); }
.reader-tools button { min-height: 36px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 6px 10px; font-size: 12px; }
.reader-header { border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 30px; }
.reader-header h1 { font-size: clamp(27px,3.3vw,37px); }
.reader-header p { color: var(--muted); font-size: 16px; }
.reader-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.reader-section { padding-top: 12px; margin-bottom: 34px; scroll-margin-top: 90px; }
.reader-section h2 { font-size: 24px; margin-bottom: 21px; }
.reader-section h3 { margin-top: 27px; }
.reader-section p,.prose p { font-size: var(--reading-size,17px); line-height: 2; margin-bottom: 20px; }
.reader-section li,.prose li { margin: 8px 0; line-height: 1.9; }
.objectives { padding: 20px 24px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; margin: 26px 0; }
.objectives h2 { font-size: 15px; margin-bottom: 12px; }
.objectives ul { padding-left: 20px; margin: 0; font-size: 14px; }
.callout { border-left: 3px solid var(--amber); background: var(--amber-soft); color: var(--amber); padding: 15px 18px; margin: 24px 0; font-size: 14px; line-height: 1.85; }
.diagram-shell { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; overflow: auto; padding: 24px 16px; margin: 28px 0; }
.diagram-shell summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.diagram-shell pre { background: none; color: var(--muted); font-size: 12px; }
.diagram-shell .mermaid { text-align: center; min-width: 400px; }
.diagram-shell .mermaid:not([data-processed]) { white-space: pre-wrap; font: 12px/1.7 var(--mono); }
.diagram-shell svg { max-width: 100%; height: auto; }
.code-shell { margin: 24px 0; background: var(--code-bg); border-radius: 9px; overflow: hidden; }
.code-label { display: flex; justify-content: space-between; padding: 9px 16px; color: var(--code-ink); border-bottom: 1px solid var(--line); font-size: 11px; }
.copy-code { border: 0; background: none; color: var(--code-ink); font-size: 12px; padding: 2px 8px; }
pre { margin: 0; padding: 20px; overflow: auto; color: var(--code-ink); font: 13px/1.8 var(--mono); tab-size: 4; }
code { font-family: var(--mono); overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 13px; }
th,td { border-bottom: 1px solid var(--line); padding: 13px 15px; vertical-align: top; text-align: left; }
th { font-weight: 500; background: var(--paper); color: var(--muted); }
.source-links { display: grid; gap: 10px; margin-top: 16px; }
.source-links a { font-size: 13px; overflow-wrap: anywhere; }
.reader-bottom { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line); margin-top: 35px; }
.note-field { margin-top: 28px; }
.note-field label { font-size: 14px; font-weight: 600; }
textarea { width: 100%; min-height: 130px; margin: 10px 0; resize: vertical; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 14px; line-height: 1.8; }
.note-status { color: var(--muted); font-size: 12px; }
.quiz-question { padding: 22px 0; border: 0; margin: 0; border-top: 1px solid var(--line); min-width: 0; }
.quiz-question legend { font-size: 16px; font-weight: 600; padding: 0; }
.quiz-options { display: grid; gap: 9px; margin-top: 15px; }
.quiz-option { min-height: 46px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-align: left; font-size: 14px; }
.quiz-option.correct { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.quiz-option.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.quiz-feedback { padding: 14px; margin-top: 12px; background: var(--soft); font-size: 14px; }
.quiz-feedback p { margin: 0; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-button { min-height: 38px; padding: 7px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.filter-button.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.inline-search { display: block; width: min(100%,340px); padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); min-height: 44px; font-size: 14px; }
.catalog-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 24px; align-items: start; }
.catalog-list { max-height: calc(100vh - 200px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.catalog-link { display: block; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; padding: 15px 18px; }
.catalog-link strong { display: block; font-size: 14px; }
.catalog-link small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.catalog-link.active { background: var(--accent-soft); color: var(--accent); }
.detail-panel { min-width: 0; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.detail-panel h1 { font-size: 28px; }
.detail-panel .detail-title { font-size:28px; margin:14px 0; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-list a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; text-decoration: none; }
.empty-state { padding: 40px 22px; color: var(--muted); text-align: center; background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; }
.metric-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 25px 0; }
.metric-row .panel { padding: 20px; }
.metric-row b { display: block; font-size: 30px; font-weight: 500; letter-spacing: -.04em; }
.metric-row small { color: var(--muted); }
.review-item { padding: 20px 0; border-top: 1px solid var(--line); }
.review-item h3 { font-size: 15px; }
.review-item p { color: var(--muted); font-size: 14px; }
.site-footer { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; max-width: 1320px; margin: 0 auto; padding: 22px 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
dialog { padding: 0; width: min(700px,calc(100% - 28px)); max-height: 80vh; margin: 12vh auto auto; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); background: var(--panel); color: var(--ink); }
dialog::backdrop { background: #17192370; }
.search-head { display: flex; padding: 18px; gap: 12px; border-bottom: 1px solid var(--line); }
.search-head input { flex: 1; min-width: 0; border: 0; background: none; font-size: 16px; }
.search-hint,.search-footer { margin: 0; padding: 12px 20px; font-size: 12px; color: var(--muted); }
#search-results { max-height: 50vh; overflow: auto; }
.search-result { display: block; padding: 14px 20px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.search-result strong { font-size: 14px; }
.search-result p { font-size: 12px; color: var(--muted); margin: 5px 0 0; }
.search-result.selected { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.search-footer { border-top: 1px solid var(--line); }
.nav-scrim { position: fixed; inset: 0; z-index: 55; border: 0; background: #17192370; }
.map-domain { margin-bottom: 24px; }
.map-domain header { margin-bottom: 14px; }
.map-domain h2 { margin-bottom: 5px; }
.map-domain p { font-size: 14px; color: var(--muted); }
.topic-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.topic-tile { padding: 17px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: var(--ink); }
.topic-tile strong { font-size: 14px; display: block; }
.topic-tile small { color: var(--muted); display: block; margin-top: 8px; line-height: 1.7; font-size: 12px; }
.topic-tile:hover { border-color: var(--accent); }
@media(min-width:1600px) { .page { padding-top:48px; } .reader-body { max-width:860px; } }
@media(max-width:1200px) { :root { --sidebar:202px; } .page { padding:30px 28px 50px; } .dashboard-grid { grid-template-columns:minmax(0,1fr) 260px; gap:20px; } .topbar { padding-inline:28px; } .reader-layout { grid-template-columns:210px minmax(0,1fr); } .topic-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:1000px) { .dashboard-grid { grid-template-columns:minmax(0,1fr); } .dashboard-aside { grid-template-columns:repeat(2,minmax(0,1fr)); } .dashboard-aside>:last-child { grid-column:1/-1; } .catalog-layout { grid-template-columns:240px minmax(0,1fr); } .edition { display:none; } .reader-layout { display:block; } .reader-index { position:static; max-height:220px; border-bottom:1px solid var(--line); border-right:0; padding:18px; } }
@media(max-width:760px) { :root { --header:60px; } .site-sidebar { transform:translateX(-100%); width:250px; } .site-sidebar.open { transform:translateX(0); } .site-frame { margin-left:0; } #menu-toggle,.topbar-actions [data-open-search] { display:inline-block; } .topbar { padding-inline:16px; gap:12px; } .topbar-actions { gap:8px; } .profile-link { display:none; } .page { padding:27px 20px 44px; } .page-heading { display:block; } .page-heading>:last-child:not(:first-child) { margin-top:18px; } .reader-main { padding:26px 22px 50px; } .reader-index { max-height:180px; } .catalog-layout { display:flex; flex-direction:column; } .catalog-list { width:100%; max-height:220px; } .detail-panel { width:100%; padding:23px 20px; } .frontier-grid,.project-cards { grid-template-columns:minmax(0,1fr); } .site-footer { padding:20px; } .icon-button,.filter-button { min-height:44px; } .chapter-row { padding:14px 16px; gap:10px; } }
@media(max-width:480px) { .page { padding-inline:16px; } .continue-card { padding:23px 22px; } .continue-card h2 { font-size:20px; } .stage-head { padding:18px 16px; } .dashboard-aside,.metric-row { grid-template-columns:minmax(0,1fr); } .dashboard-aside>:last-child { grid-column:auto; } .topic-grid { grid-template-columns:minmax(0,1fr); } .row-tail { display:none; } .reader-tools { align-items:flex-start; } .reader-section p,.prose p { font-size:var(--reading-size,16px); } .reader-section h2 { font-size:21px; } .button { min-height:44px; } .reader-bottom .button { flex:1; } .topbar #breadcrumbs { max-width:190px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }
@media print { .site-sidebar,.topbar,.site-footer,.reader-index,.reader-tools,.reader-bottom,.copy-code { display:none; } .site-frame { margin:0; } .reader-layout { display:block; } .reader-main { padding:0; } body { background:white; color:black; } }
@media(max-width:760px) { #menu-close { display:block; align-self:flex-end; margin-top:16px; } .site-sidebar { overflow-y:auto; } .sidebar-note { padding-top:20px; } }
@media(max-width:760px) { .lesson-disclosure:not([open]) > nav { display:none; } .lesson-disclosure > summary { padding:4px 2px; min-height:36px; } .reader-index:has(.lesson-disclosure) { max-height:none; padding:12px 20px; } .lesson-disclosure[open] > nav { max-height:50vh; overflow:auto; padding-top:12px; } .reader-index a,.reader-tools button,.copy-code,.tag-list a { min-height:44px; } }
