/* A single Academy-inspired reading system. Fonts are served locally. */
@font-face{font-family:Inter;src:url('/fonts/inter-latin-400-normal.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/inter-latin-500-normal.woff2') format('woff2');font-style:normal;font-weight:500;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/inter-latin-600-normal.woff2') format('woff2');font-style:normal;font-weight:600;font-display:swap}
@font-face{font-family:Inter;src:url('/fonts/inter-latin-700-normal.woff2') format('woff2');font-style:normal;font-weight:700;font-display:swap}
:root{--font-ui:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans","PingFang SC","Microsoft YaHei","Hiragino Sans","Yu Gothic","Malgun Gothic",sans-serif;--font-reading:var(--font-ui);--reading-serif:var(--font-ui);--type-body:17px;--type-leading:1.55}
html{font-synthesis:none;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{font-family:var(--font-ui);font-size:16px;line-height:1.65;color:#25282e;letter-spacing:0}
main :is(h1,h2,h3,h4,h5,h6){font-family:var(--font-ui)!important;font-weight:600!important;font-style:normal;letter-spacing:-.025em;text-wrap:pretty;color:#202328;overflow-wrap:break-word}
main h1,main .article-hero h1,main.paper-reading article>header h1,main.course-lesson .article-hero h1{font-size:36px!important;line-height:1.25!important;letter-spacing:-.035em!important;margin:16px 0 22px}
main.news-home .hero h1{font-size:44px!important;line-height:1.16!important;max-width:22ch}
main :is(h2,.prose-section h2){font-size:26px;line-height:1.4;margin:40px 0 18px}
main :is(h3,.prose-section h3){font-size:21px;line-height:1.45;margin:28px 0 12px}
main :is(h4,h5){font-size:18px;line-height:1.5}
main :is(p,li,dd,blockquote){font-family:var(--font-ui)!important;font-weight:400;letter-spacing:0;line-height:var(--type-leading)!important}
main :is(p,li):not(.hero-deck),main :is(.prose-section,.concept-reading,.frontier-decomposition,.interview-lesson,.depth-section) :is(p,li):not(.note):not(.notice){font-size:var(--type-body)!important}
main :is(.article-hero,.paper-hero)>p:not(.note):not(.paper-meta):not(.notice),main .course-overview .course-lead{font-family:var(--font-ui);font-size:19px!important;line-height:1.55!important;font-weight:400;color:#535963;letter-spacing:0}
main.news-home .hero-deck{font:400 22px/1.5 var(--font-ui)!important;letter-spacing:-.015em}
main :is(.article-hero,.paper-hero)>p{margin:14px 0}
main :is(.note,.notice,.paper-meta,.eyebrow,figcaption,.source-url,.section-help),main .article-hero :is(p.note,p.paper-meta,p.notice){font:400 15px/1.55 var(--font-ui)!important;letter-spacing:0;color:#585f6a}
main .eyebrow{font-weight:500!important;letter-spacing:.025em}
main .prose-section{margin:38px 0}
main :is(.prose-section,.concept-reading,.frontier-decomposition)>p{margin:0 0 22px;max-width:72ch}
main :is(.prose-section,.concept-reading) li{margin:10px 0}
main .prose-section :is(ul,ol){padding-left:26px;margin:18px 0 26px}
main:is(.paper-reading,.reading){max-width:824px}
main :is(.toc,.lesson-toc) a{font:400 16px/1.6 var(--font-ui)!important}
main :is(.frontier-preview,.learning-news,.practice-news,.paper-card,.home-route) h3,main :is(.learning-news,.practice-news) h4{font-size:23px;line-height:1.4;letter-spacing:-.025em}
main.news-home .frontier-preview:first-child h3{font-size:29px;line-height:1.3}
main :is(.frontier-preview,.learning-news,.practice-news,.paper-card,.home-route)>p,main .home-route p{font-size:16px!important;line-height:1.55!important}
main :is(pre,code,kbd,samp),main pre code.hljs{font-family:var(--font-code)!important;font-variant-ligatures:none;letter-spacing:0}
main :is(.rendered-formula,.math-line) mjx-container{line-height:normal}
:root:lang(zh),:root:lang(ja),:root:lang(ko){--type-leading:1.65;--type-body:18px}
html:is(:lang(zh),:lang(ja),:lang(ko)) main :is(h1,h2,h3,h4,h5,h6){letter-spacing:0!important;word-break:normal;line-break:strict}
html:is(:lang(zh),:lang(ja),:lang(ko)) main h1{line-height:1.4!important}
html:is(:lang(zh),:lang(ja),:lang(ko)) main :is(p,li,dd){word-break:normal;line-break:strict}
@media(max-width:700px){
 main h1,main .article-hero h1,main.paper-reading article>header h1,main.course-lesson .article-hero h1{font-size:30px!important;line-height:1.3!important;letter-spacing:-.025em!important}
 main.news-home .hero h1{font-size:34px!important;line-height:1.2!important}
 main :is(h2,.prose-section h2){font-size:24px;line-height:1.45}
 main :is(h3,.prose-section h3){font-size:20px;line-height:1.5}
 main :is(.article-hero,.paper-hero)>p:not(.note):not(.paper-meta):not(.notice){font-size:18px!important;line-height:1.55!important}
 main.news-home .hero-deck{font-size:20px!important}
 main.news-home .frontier-preview:first-child h3{font-size:25px;line-height:1.35}
}
/* Resolve older per-template heading sizes into the shared scale. */
main h2{font-size:26px!important;line-height:1.4!important}
main h3{font-size:21px!important;line-height:1.45!important}
main :is(.frontier-preview,.learning-news,.practice-news,.paper-card,.home-route) h3,main :is(.learning-news,.practice-news) h4{font-size:23px!important;line-height:1.4!important}
main.news-home .frontier-preview:first-child h3{font-size:29px!important}
@media(max-width:700px){main h2{font-size:24px!important}main h3{font-size:20px!important}main.news-home .frontier-preview:first-child h3{font-size:25px!important}}
/* CJK titles must not inherit Latin tracking from template-specific hero rules. */
html:is(:lang(zh),:lang(ja),:lang(ko)) #main :is(h1,h2,h3,h4,h5,h6){letter-spacing:0!important;line-height:1.4!important}

/* Long-form research: vertically labeled comparisons and consistent reading rhythm. */
main.survey-reading{max-width:820px}
main.survey-reading .article-hero{margin-bottom:24px;padding-bottom:0}
main.survey-reading .article-hero p.paper-meta,
main.survey-reading .article-hero p.survey-evidence{font-size:15px!important;line-height:1.5!important;margin:12px 0;color:#586170}
main.survey-reading .toc{padding:18px 0;margin:24px 0 32px}
main.survey-reading .toc ol{display:flex;flex-direction:column;gap:0;margin:0;padding-left:24px}
main.survey-reading .toc li{padding:0;margin:3px 0;font-size:16px!important;line-height:1.45!important}
main.survey-reading .toc a{display:inline-block;padding:5px 0}
main.survey-reading .prose-section{margin:32px 0;padding:0}
main.survey-reading .prose-section>h2{margin:32px 0 16px}
main.survey-reading .prose-section>h3{margin:26px 0 12px}
main.survey-reading .survey-comparisons{display:flex;flex-direction:column;gap:20px;margin:22px 0}
main.survey-reading .survey-comparison{padding:22px;border:1px solid #dce1e8;border-radius:12px;background:#fafbfd;margin:0}
main.survey-reading .survey-comparison h3{margin:0 0 18px;font-size:21px!important;line-height:1.4!important}
main.survey-reading .survey-comparison dl{margin:0}
main.survey-reading .survey-field+.survey-field{margin-top:18px;padding-top:16px;border-top:1px solid #e2e6ed}
main.survey-reading .survey-field dt{font-size:16px;font-weight:650;line-height:1.45;color:#344867;margin:0 0 6px}
main.survey-reading .survey-field dd{margin:0;font-size:17px;line-height:1.55;overflow-wrap:anywhere}
main.survey-reading .survey-agenda{margin:24px 0;padding:20px 22px;border:1px solid #dce1e8;border-left:3px solid #708bc0;border-radius:0 10px 10px 0;background:#fafbfd}
main.survey-reading .survey-agenda h3{margin:0 0 16px}
main.survey-reading .survey-agenda p{margin:12px 0}
main.survey-reading .survey-agenda p>strong:first-child{display:block;margin-bottom:4px;color:#344867}
main.survey-reading .survey-experiment{margin:24px 0;padding:22px;border:1px solid #d8e2f2;background:#f2f6fc;border-radius:10px}
main.survey-reading .survey-experiment h3{margin:0 0 14px}
main.survey-reading .survey-experiment label{display:block;font-size:16px;line-height:1.5;margin-bottom:7px}
main.survey-reading .survey-experiment input{display:block;width:min(100%,280px);min-height:44px;font-size:17px}
main.survey-reading .survey-experiment [role="status"]{font-weight:600;line-height:1.5}
main.survey-reading .survey-question{margin:12px 0;border:1px solid #dce1e8;border-radius:10px;padding:4px 18px}
main.survey-reading .survey-question summary{padding:14px 0;font-weight:600;line-height:1.5}
main.survey-reading .survey-question details{border-top:1px solid #e2e6ed;margin-top:12px}
main.survey-reading figure{margin:24px 0}
main.survey-reading figure img{display:block;width:100%;height:auto;border-radius:10px}
main.survey-reading figcaption{margin-top:10px;font-size:15px!important;line-height:1.5;color:#586170}
main.survey-reading pre{margin:18px 0;max-width:100%;overflow:auto;white-space:pre;padding:20px;font-size:15px;line-height:1.55}
main.survey-reading pre code{font-size:15px!important;line-height:1.55!important;white-space:pre;overflow-wrap:normal;word-break:normal}
main.survey-reading .rendered-formula{margin:18px 0;padding:16px;background:#f6f7fa;border-radius:8px;max-width:100%;overflow-x:auto}
main a[data-external-source],main a[data-external-source] .source-url{color:#1761bd;text-decoration:underline;text-underline-offset:3px}
main a[data-external-source] .source-url{line-height:1.45;margin:4px 0 6px;font-weight:400;overflow-wrap:anywhere}
@media(max-width:700px){
 main.survey-reading{padding-left:20px;padding-right:20px}
 main.survey-reading .survey-comparison,main.survey-reading .survey-agenda,main.survey-reading .survey-experiment{padding:16px}
 main.survey-reading .survey-field dd{font-size:17px;line-height:1.55}
 main.survey-reading .survey-comparison h3{font-size:20px!important}
 main.survey-reading .toc{margin:20px 0 26px}
 main.survey-reading .prose-section>h2{font-size:23px!important;line-height:1.4!important}
 main.survey-reading pre{padding:14px}
}
/* Long-form handbook: keep diagrams and mathematical notation within the reader column. */
.handbook-reading figure img{display:block;width:100%;height:auto;border-radius:10px}
.handbook-reading .rendered-formula{overflow-x:auto;max-width:100%;padding:12px}
.handbook-reading h3{font-size:21px;line-height:1.3;margin:24px 0 10px}
.handbook-reading .prose-section>p{margin:12px 0;line-height:1.55}
.handbook-reading details{margin:16px 0;padding:14px 16px;border:1px solid #ddd;border-radius:10px}
.handbook-reading summary{font-size:17px;line-height:1.45;font-weight:600;cursor:pointer}
.handbook-reading li{margin:8px 0;line-height:1.55}
@media(max-width:700px){.handbook-reading h3{font-size:20px}.handbook-reading .prose-section>p{font-size:17px;line-height:1.5}}
.handbook-reading .toc ol{list-style:none;padding-left:0}
.handbook-reading .toc li{margin:3px 0;line-height:1.4}
.handbook-reading .toc a{padding:5px 0}
/* Review: keep book navigation compact and reveal solutions deliberately. */
main.survey-reading .handbook-contents{margin:20px 0;padding:12px 16px;background:#f8f9fc;border-color:#dfe4ec}
main.survey-reading .handbook-contents>.toc{border:0;margin:12px 0 0;padding:0}
main.survey-reading .handbook-contents summary{min-height:28px}
main.handbook-reading .interview-solution{background:#f3f6fc;border-color:#dce5f3}
main.survey-reading .lifecycle-intro{padding-top:24px}
main.survey-reading .lifecycle-intro figure{margin:20px 0}
main.survey-reading .prose-section h3{margin-top:24px;margin-bottom:10px;font-size:21px;line-height:1.35}
main.survey-reading .handbook-contents .toc ol{list-style:none;padding-left:0}
main.survey-reading .handbook-contents .toc li{margin:3px 0;line-height:1.4}
main.survey-reading .handbook-contents .toc a{padding:5px 0}

/* Worked cases: single-column narrative, diagram scales without tiny labels. */
.topic-case { margin-block:2rem; border-top:1px solid #ddd; padding-top:1.5rem; }
.topic-case-map {max-width:640px;margin:1.4rem auto;}
.topic-case-map svg {display:block;width:100%;height:auto;}
.topic-case-map figcaption {font-size:.95rem;line-height:1.45;}
.topic-case section {margin-block:1.5rem;}
.topic-case th,.topic-case td {vertical-align:top;min-width:6rem;}
.topic-case td:last-child {min-width:16rem;}
.topic-case table {font-size:1rem;line-height:1.45;}
.topic-case th,.topic-case td {min-width:7.5rem;word-break:normal;overflow-wrap:normal;}
.topic-case th {font-size:1rem;}
.rag-survey .rag-map {margin:2rem auto;max-width:900px;}
.rag-survey .rag-map svg {width:100%;height:auto;display:block;}
.rag-survey .handbook-contents ol {display:block;}
.rag-survey .handbook-contents li {margin:.55rem 0;}
.rag-survey .rag-equation {overflow-x:auto;margin:1.5rem 0;}
.rag-survey .table-scroll table {font-size:1rem;line-height:1.45;}
.rag-survey .table-scroll th,.rag-survey .table-scroll td {min-width:10rem;word-break:normal;}
.rag-mobile-flow {display:none;}
@media(max-width:600px){.rag-survey .rag-map svg {display:none;}.rag-mobile-flow{display:block;}.rag-mobile-flow ol{padding:0;list-style:none;margin:1rem 0;border-left:3px solid #93c5fd;}.rag-mobile-flow ol+ol{border-color:#c4b5fd;}.rag-mobile-flow li{padding:.7rem 1rem;margin:.35rem 0;background:#f3f6fb;border-radius:0 8px 8px 0;font-size:1rem;}}

/* Distinguish publication and source-check records from article prose. */
main :is(.article-hero, .paper-hero) p.paper-meta, main p.paper-meta, main p.survey-evidence, main p.editorial-record { font-style: italic !important; }

/* Publication details form one quiet, vertically stacked editorial panel. */
main .article-hero .article-info-panel {
  margin: 24px 0 28px; padding: 18px 22px; max-width: 100%;
  background: #f7f7f8; border: 1px solid #dedfe3; border-radius: 10px;
}
main .article-hero .article-info-panel p.paper-meta {
  margin: 0 0 9px; font-size: 15px !important; line-height: 1.5 !important;
}
main .article-hero .article-info-panel p.survey-evidence {
  margin: 13px 0 0; padding-top: 13px; border-top: 1px solid #dedfe3;
  font-size: 14px !important; line-height: 1.55 !important; color: #58616c !important;
}
@media(max-width:600px){main .article-hero .article-info-panel{padding:16px;margin:20px 0 24px}}
main .article-hero .article-info-panel p.survey-evidence { font-style: italic !important; }

/* RAG method explanations retain the compact vertical reading rhythm. */
.rag-method-figure{margin:28px 0}.rag-method-figure img{display:block;width:100%;height:auto;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.rag-method-figure figcaption{font-size:15px;line-height:1.5;margin-top:10px;color:#475569}
.rag-sources{padding:16px 20px;border-left:3px solid #93c5fd;background:#f8fafc;margin:24px 0;overflow-wrap:anywhere}
.rag-survey a[href^="https://"]{color:#1d4ed8!important;text-decoration:underline!important;text-underline-offset:3px}
.rag-equation{max-width:100%;overflow-x:auto;padding:12px 0}.rag-question{border-top:1px solid #e2e8f0;padding:20px 0}.rag-question details{margin:8px 0}.rag-question summary{cursor:pointer;min-height:32px}

.rag-sources a::after{content:none!important}

/* Shared source/version panels: compact in every language and page. */
#main .rag-sources {
  padding: 12px 16px; margin: 18px 0;
  font-size: 14px !important; line-height: 1.45 !important;
}
#main .rag-sources h3 {
  margin: 0 0 8px; padding: 0;
  font-size: 15px !important; line-height: 1.4 !important;
}
#main .rag-sources p {
  margin: 0 0 10px; padding: 0;
  font-size: 14px !important; line-height: 1.45 !important;
}
#main .rag-sources p:last-child { margin-bottom: 0; }
#main .rag-sources :is(a, strong, span) { font-size: inherit !important; line-height: inherit !important; }
@media(max-width:600px){#main .rag-sources{padding:12px;margin:16px 0}}
/* RSI survey: vertical reading, protected source hierarchy, local figures. */
.rsi-survey .toc ol{display:flex;flex-direction:column;gap:.35rem;list-style:decimal outside;padding-inline-start:1.75rem}
.rsi-survey .toc li{display:list-item;padding-inline-start:.2rem}
.rsi-survey .table-scroll{max-width:100%;overflow-x:auto}
.rsi-survey figure{margin:1.3rem 0}
.rsi-survey figure img{display:block;max-width:100%;height:auto;border:1px solid #e0e3e8;border-radius:12px}
.rsi-survey a[href^="https://"]{color:#155cc0;text-decoration:underline;text-underline-offset:.16em}
.rsi-survey .rag-sources{font-size:.875rem;line-height:1.4}
.rsi-survey .rag-sources li{margin:.7rem 0;overflow-wrap:anywhere}
.rsi-survey .article-info-panel{background:#f5f5f4;border:1px solid #dededb;border-radius:12px;padding:1rem 1.2rem;margin:1.2rem 0}
.rsi-survey .article-info-panel p{margin:.45rem 0;font-size:.94rem;line-height:1.45}
.rsi-survey .article-info-panel hr{border:0;border-top:1px solid #dededb;margin:.8rem 0}
.rsi-survey pre{max-width:100%;overflow-x:auto}

/* Workflow stage labels need a stable column; scroll the wrapper on narrow screens. */
.workflow-survey #workflow-patterns .table-scroll {
  width:100%; max-width:100%; overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.workflow-survey #workflow-patterns .table-scroll table {
  display:table; width:100%; min-width:40rem; table-layout:fixed;
}
.workflow-survey #workflow-patterns .table-scroll th,
.workflow-survey #workflow-patterns .table-scroll td {
  box-sizing:border-box; padding:12px 16px; text-align:left;
  vertical-align:top; word-break:normal; overflow-wrap:break-word;
}
.workflow-survey #workflow-patterns .table-scroll tr > :first-child {
  width:20%; min-width:8rem; white-space:normal;
}
.workflow-survey #workflow-patterns .table-scroll tr > :not(:first-child) {
  width:40%;
}

/* Reading tables: stable label columns and one keyboard-scrollable viewport. */
main .reading-table-scroll {
  width:100%; max-width:100%; min-width:0; overflow-x:auto;
  -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain;
}
main .reading-table-scroll:focus-visible {outline:2px solid #2864be;outline-offset:3px}
main .reading-table-scroll > table[data-reading-table] {
  display:table; width:100%; max-width:none;
  min-width:var(--reading-table-min,32rem); table-layout:auto;
}
main .reading-table-scroll > table[data-reading-table] :is(th,td) {
  box-sizing:border-box; vertical-align:top; min-width:9rem;
  word-break:normal; overflow-wrap:break-word; white-space:normal;
}
main .reading-table-scroll > table[data-reading-table] tr > :first-child {
  min-width:10rem; width:20%;
}
main .reading-table-scroll > table.rubric-table[data-reading-table] tr > :first-child {
  min-width:5rem; width:5rem;
}
main .reading-table-scroll > table[data-reading-table="2"] tr > :first-child {width:30%}

/* One compact rhythm for article contents, including long wrapped labels. */
#main :is(.toc,.lesson-toc){gap:0;padding-block:12px;margin-block:20px 24px}
#main .toc ol{display:block;margin:0;padding-inline-start:1.75rem}
#main .toc li{margin:0;padding:0;line-height:1.4!important}
#main :is(.toc,.lesson-toc) a{display:block;min-height:0;padding:6px 8px;font-size:16px!important;line-height:1.4!important;white-space:normal;overflow-wrap:break-word}
#main .toc li::marker{font-size:15px;color:#667085}
#main.zero-survey .zero-request-trace table[data-reading-table] tr>:first-child{width:3.5rem;min-width:3.5rem}
#main.zero-survey .zero-request-trace table[data-reading-table] tr>:nth-child(2){width:36%;min-width:12rem}
#main.zero-survey .zero-request-trace td code{white-space:normal;overflow-wrap:anywhere}
#main.zero-survey .zero-command-stage{margin:1.5rem 0;padding-top:.5rem;border-top:1px solid #e5e7eb}
@media(pointer:coarse){#main :is(.toc,.lesson-toc) a{min-height:40px;padding-block:8px}}
