@charset "UTF-8";
/* The host platform owns the page shell and shared tokens. Topic rules stay isolated. */
.history-topic { --history-blue:#90613e; --history-soft:#f6eddf; min-width:0; }
.history-topic [hidden] { display:none!important; }
.history-topic button { font-family:inherit; }
.history-topic .knowledge-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; margin:28px 0; }
.history-topic .knowledge-heading h1 { margin:0 0 12px; font-size:clamp(32px,2.5vw,46px); }
.history-topic .knowledge-heading p:last-child { margin:0; max-width:65ch; font-size:17px; }
.history-topic .knowledge-heading .eyebrow { font-size:14px; margin-bottom:8px; }
.history-topic .knowledge-tools { display:flex; flex-wrap:wrap; gap:12px; flex-shrink:0; }
.history-topic .secondary-button { display:inline-flex; align-items:center; justify-content:center; gap:14px; min-height:50px; border:1px solid #bacbb6; border-radius:14px; background:var(--white); color:var(--green); padding:10px 17px; font-size:16px; font-weight:600; }
.history-topic .secondary-button:hover { background:var(--soft); }
.history-topic .secondary-button b { font-size:14px; padding:2px 7px; border-radius:7px; background:var(--soft); }
.history-topic .knowledge-layout { gap:28px; }
.history-topic .knowledge-main { min-width:0; }
.history-topic .knowledge-directory { padding:20px 16px; border-radius:22px; }
.history-topic .knowledge-directory summary { cursor:pointer; display:flex; justify-content:space-between; align-items:center; list-style:none; font-size:21px; font-weight:750; gap:10px; }
.history-topic .knowledge-directory summary::-webkit-details-marker { display:none; }
.history-topic .knowledge-directory summary span { color:var(--muted); font-size:13px; font-weight:500; }
.history-topic .directory-note { margin:10px 0 17px; color:var(--muted); font-size:14px; }
.history-topic .chapter-group { margin-top:5px; }
.history-topic .chapter-select { display:flex; width:100%; align-items:center; gap:10px; border:0; border-radius:12px; padding:12px 11px; background:transparent; color:var(--ink); font-size:17px; line-height:1.7; font-weight:650; text-align:left; }
.history-topic .chapter-select:hover { background:#dce9d2; }
.history-topic .chapter-select[aria-current] { background:var(--green); color:white; }
.history-topic .chapter-select .chapter-number { font-size:13px; opacity:.8; }
.history-topic .chapter-select small { margin-left:auto; font-size:12px; font-weight:500; white-space:nowrap; }
.history-topic .directory-lessons { padding:7px 0 8px 12px; }
.history-topic .directory-lessons a { display:flex; align-items:baseline; gap:8px; font-size:15px; line-height:1.6; min-height:42px; padding:9px 10px; margin:0; color:var(--muted); border-radius:9px; }
.history-topic .directory-lessons a span { font-size:11px; color:var(--history-blue); flex-shrink:0; }
.history-topic .directory-lessons a:hover { background:#dce9d2; color:var(--ink); }
.history-topic .chapter-heading { display:flex; align-items:start; justify-content:space-between; gap:24px; border-bottom:1px solid var(--line); padding:0 0 18px; margin:3px 0 16px; }
.history-topic .chapter-heading h2 { font-size:30px; margin:0 0 9px; }
.history-topic .chapter-heading .eyebrow { font-size:13px; margin:0 0 7px; }
.history-topic .chapter-heading p:last-child { font-size:16px; color:var(--muted); margin:0; }
.history-topic .chapter-count { display:inline-flex; flex-shrink:0; font-size:14px; color:var(--history-blue); background:var(--history-soft); border-radius:10px; padding:7px 12px; }
.history-topic .lesson-index { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 22px; }
.history-topic .lesson-index a { display:inline-flex; gap:8px; align-items:center; min-height:40px; padding:7px 12px; font-size:14px; border:1px solid var(--line); border-radius:10px; background:var(--white); }
.history-topic .lesson-index a:hover { border-color:var(--history-blue); color:var(--history-blue); }
.history-topic .lesson { padding:clamp(22px,2vw,36px); margin-bottom:24px; border:1px solid var(--line); border-radius:22px; background:var(--white); scroll-margin-top:22px; min-width:0; }
.history-topic .lesson:focus-visible { outline:2px solid var(--history-blue); outline-offset:3px; }
.history-topic .lesson-heading { display:flex; align-items:start; justify-content:space-between; gap:20px; margin-bottom:22px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.history-topic .lesson-kicker { color:var(--history-blue); font-size:12px; font-weight:650; margin:0 0 7px; letter-spacing:.03em; }
.history-topic .lesson-heading h3 { margin:0; font-size:clamp(24px,1.7vw,31px); line-height:1.5; }
.history-topic .lesson-read { display:inline-flex; flex-shrink:0; align-items:center; justify-content:center; min-height:44px; padding:7px 12px; border:1px solid #cbdac4; border-radius:12px; background:#f7faf5; color:var(--green); font-size:14px; }
.history-topic .lesson-read[aria-pressed=true] { background:var(--green); color:white; }
.history-topic .lesson-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:30px; align-items:start; }
.history-topic .lesson-main { min-width:0; }
.history-topic .definition { margin:0 0 22px; padding:17px 20px; border-left:4px solid var(--history-blue); border-radius:0 12px 12px 0; background:var(--history-soft); font-size:19px; line-height:1.95; }
.history-topic .definition strong { display:block; color:var(--history-blue); font-size:13px; margin-bottom:5px; }
.history-topic .lesson-subheading { font-size:17px; font-weight:750; margin:22px 0 10px; color:var(--green); }
.history-topic .essentials { padding-left:23px; margin:0; }
.history-topic .essentials li { padding-left:3px; font-size:18px; line-height:1.95; margin-bottom:8px; }
.history-topic .facts-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin-top:20px; }
.history-topic .fact { padding:13px 15px; border:1px solid var(--line); border-radius:12px; background:#f7faf5; min-width:0; }
.history-topic .fact dt { font-size:12px; color:var(--muted); margin-bottom:5px; }
.history-topic .fact dd { margin:0; font-size:18px; color:var(--green); font-weight:700; overflow-wrap:anywhere; }
.history-topic .formula { padding:17px 20px; border:1px solid #dfccb2; border-radius:12px; background:#fbf4ea; font-size:19px; font-weight:650; line-height:1.9; white-space:pre-line; overflow-wrap:anywhere; }
.history-topic .table-scroll { overflow:auto; max-width:100%; margin-top:18px; border:1px solid var(--line); border-radius:12px; }
.history-topic table { border-collapse:collapse; width:100%; font-size:16px; line-height:1.85; }
.history-topic th, .history-topic td { padding:12px 14px; text-align:left; vertical-align:top; border-bottom:1px solid var(--line); min-width:110px; }
.history-topic th { background:#edf2e5; color:var(--green); font-weight:700; }
.history-topic tr:last-child td { border-bottom:0; }
.history-topic td:first-child { font-weight:600; }
.history-topic .lesson-diagram { margin:20px 0; padding:12px; border:1px solid var(--line); border-radius:12px; background:#f7faf5; overflow:auto; }
.history-topic .lesson-diagram svg { display:block; width:100%; height:auto; min-width:460px; }
.history-topic .diagram-note { color:var(--muted); font-size:12px; margin:8px 0 0; }
.history-topic .worked-example { margin-top:22px; padding:20px; border:1px solid #d4dfcd; border-radius:14px; background:#f2f6eb; }
.history-topic .worked-example h4 { font-size:15px; color:var(--green); margin:0 0 10px; }
.history-topic .example-question { font-size:18px; margin:0 0 12px; line-height:1.95; }
.history-topic .worked-example summary { cursor:pointer; color:var(--green); font-size:15px; font-weight:650; padding-block:6px; }
.history-topic .example-steps { padding-left:24px; font-size:17px; line-height:1.95; margin:14px 0; }
.history-topic .example-steps li { margin:5px 0; }
.history-topic .example-answer { margin:0; color:var(--green-dark); font-size:18px; font-weight:650; }
.history-topic .misconception { margin:20px 0 0; padding:17px 20px; border:1px solid #e8d8b9; border-radius:14px; background:#fff7e7; }
.history-topic .misconception h4 { margin:0 0 9px; font-size:15px; color:#815824; }
.history-topic .misconception p { font-size:16px; line-height:1.9; margin:6px 0; }
.history-topic .misconception .incorrect { color:#865d38; }
.history-topic .lesson-resources { min-width:0; padding-left:24px; border-left:1px solid var(--line); }
.history-topic .resource-label { margin:0 0 14px; color:var(--muted); font-size:13px; font-weight:650; }
.history-topic .resource-figure { margin:0 0 18px; }
.history-topic .resource-image { display:block; padding:0; border:0; border-radius:12px; background:#edf1ea; overflow:hidden; width:100%; }
.history-topic .resource-image img { display:block; width:100%; height:200px; object-fit:cover; }
.history-topic .resource-image[data-image=calligraphy] img { object-fit:contain; background:#eee2cc; }
.history-topic .resource-figure figcaption { font-size:13px; color:var(--muted); line-height:1.9; margin-top:10px; }
.history-topic .resource-image-source { display:inline-block; margin-top:7px; font-size:12px; text-decoration:underline; text-underline-offset:3px; color:var(--history-blue); }
.history-topic .resource-action { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:48px; padding:12px 14px; margin-bottom:10px; border:1px solid #c8dbd0; border-radius:12px; background:#eef5e9; color:var(--green); text-align:left; font-size:15px; font-weight:650; }
.history-topic .resource-action:hover { background:#dfeeda; }
.history-topic .resource-action span { font-size:19px; }
.history-topic .local-audio { margin:16px 0 20px; padding:14px; background:var(--history-soft); border-radius:12px; }
.history-topic .local-audio strong { display:block; font-size:15px; color:var(--history-blue); }
.history-topic .local-audio p { font-size:12px; color:var(--muted); margin:6px 0 10px; }
.history-topic audio { width:100%; height:40px; }
.history-topic .reference-list { list-style:none; padding:0; margin:10px 0 0; }
.history-topic .reference-list li { margin-top:10px; padding-top:10px; border-top:1px solid var(--line); }
.history-topic .reference-list a { color:var(--history-blue); font-size:14px; line-height:1.8; text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.history-topic .source-type { display:block; font-size:11px; color:var(--muted); margin-top:3px; }
.history-topic .lesson-practice { margin-top:24px; padding-top:18px; border-top:1px solid var(--line); }
.history-topic .lesson-practice summary { cursor:pointer; display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-size:17px; font-weight:750; padding-block:4px; }
.history-topic .practice-state { font-size:12px; color:var(--history-blue); font-weight:500; }
.history-topic .practice-question { font-size:18px; margin:20px 0 14px; }
.history-topic .practice-options { display:grid; gap:10px; }
.history-topic .practice-option { display:flex; align-items:center; gap:12px; width:100%; min-height:54px; padding:12px 16px; border:1px solid #bacbb6; border-radius:12px; background:#f7faf5; text-align:left; color:var(--ink); font-size:17px; }
.history-topic .practice-option b { font-size:13px; width:26px; flex-shrink:0; color:var(--green); }
.history-topic .practice-option.correct { border-color:var(--green); background:#e3efd7; }
.history-topic .practice-option.incorrect { border-color:#c68c58; background:#ffeddb; }
.history-topic .practice-feedback { margin:14px 0 0; color:var(--green-dark); font-size:17px; line-height:1.95; }
.history-topic .practice-feedback:empty { display:none; }
.history-topic .next-chapter { display:flex; gap:20px; align-items:center; width:100%; padding:20px 0; border:0; border-block:1px solid var(--line); background:none; color:var(--green); font-size:16px; text-align:left; }
.history-topic .next-chapter strong { margin-left:auto; font-size:22px; }
.history-topic .reference-guide { padding:26px 0 0; }
.history-topic .reference-guide h2 { font-size:22px; }
.history-topic .reference-guide ul { padding-left:22px; color:var(--muted); font-size:15px; line-height:1.95; }
.history-topic .reference-guide li { margin-bottom:8px; }
.history-topic .reference-guide > p { color:var(--muted); font-size:13px; }
.history-topic .reference-links { display:flex; flex-wrap:wrap; gap:12px 20px; color:var(--history-blue); font-size:13px; }
.history-topic .knowledge-dialog { width:min(1000px,calc(100% - 36px)); max-height:90dvh; padding:28px; border:1px solid #b7c9ad; border-radius:22px; background:var(--paper); color:var(--ink); overscroll-behavior:contain; }
.history-topic .knowledge-dialog::backdrop { background:#16382bb5; backdrop-filter:blur(4px); }
.history-topic .dialog-heading { display:flex; justify-content:space-between; align-items:start; gap:20px; margin-bottom:22px; }
.history-topic .dialog-heading h2 { font-size:28px; margin:0; }
.history-topic .dialog-heading .eyebrow { font-size:12px; }
.history-topic .close-dialog { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0; border:0; border-radius:12px; background:var(--soft); font-size:28px; color:var(--green); }
.history-topic .search-label { display:block; font-size:14px; margin-bottom:8px; }
.history-topic .search-result { display:block; width:100%; text-align:left; border:1px solid var(--line); border-radius:14px; padding:17px 19px; margin-bottom:12px; background:var(--white); color:var(--ink); }
.history-topic .search-result strong { display:block; font-size:20px; margin-bottom:8px; }
.history-topic .search-result p { font-size:15px; margin:0; color:var(--muted); line-height:1.9; }
.history-topic .search-result small { display:block; font-size:12px; margin-bottom:5px; color:var(--history-blue); }
.history-topic .empty-results { text-align:center; padding:30px; color:var(--muted); font-size:17px; }
.history-topic .progress-row { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; padding:13px 15px; margin-top:7px; border:1px solid var(--line); border-radius:12px; background:var(--white); text-align:left; color:var(--ink); font-size:16px; }
.history-topic .progress-row small { flex-shrink:0; color:var(--muted); font-size:12px; }
.history-topic .progress-row.done { border-color:#9cb58f; background:#eaf2e1; }
.history-topic .progress-row.done small { color:var(--green); }
.history-topic .small-note { color:var(--muted); font-size:13px; margin-top:20px; }
.history-topic .lab-dialog { width:min(1560px,calc(100% - 28px)); }
.history-topic .video-dialog { width:min(1200px,calc(100% - 28px)); }
.history-topic .video-dialog video { display:block; width:100%; max-height:65dvh; background:#102b20; border-radius:14px; }
.history-topic .video-dialog > p { color:var(--muted); font-size:15px; margin:18px 0 10px; }
.history-topic .video-dialog > a, .history-topic .image-dialog > a { color:var(--history-blue); font-size:14px; }
.history-topic .image-dialog { width:min(1300px,calc(100% - 24px)); }
.history-topic .image-dialog figure { margin:0; }
.history-topic .image-dialog figure img { max-height:70dvh; width:100%; object-fit:contain; }
.history-topic .image-dialog figcaption { font-size:14px; color:var(--muted); margin:16px 0; }
.history-topic .status-message { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); z-index:50; padding:14px 22px; border-radius:14px; background:var(--green-dark); color:white; font-size:16px; max-width:calc(100% - 32px); width:max-content; display:none; }
.history-topic .status-message.visible { display:block; }
@media(min-width:1900px) {
 .history-topic .lesson-layout { grid-template-columns:minmax(0,1fr) 340px; gap:36px; }
}
@media(max-width:1399px) {
 .history-topic .lesson-layout { grid-template-columns:minmax(0,1fr); }
 .history-topic .lesson-resources { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 24px; padding:20px 0 0; border-left:0; border-top:1px solid var(--line); }
 .history-topic .resource-label { grid-column:1/-1; margin:0; }
 .history-topic .resource-figure { grid-row:span 4; margin:0; }
 .history-topic .resource-links-block { min-width:0; }
 .history-topic .local-audio { margin-top:0; }
 .history-topic .knowledge-heading { align-items:start; }
 .history-topic .knowledge-tools { max-width:360px; justify-content:end; }
}
@media(max-width:899px) {
 .history-topic .knowledge-directory { position:static; max-height:none; }
 .history-topic #chapter-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
 .history-topic .directory-lessons { display:none; }
 .history-topic .chapter-select { height:100%; font-size:16px; }
 .history-topic .knowledge-heading { flex-wrap:wrap; gap:20px; }
 .history-topic .knowledge-tools { max-width:none; justify-content:start; }
 .history-topic .knowledge-directory summary:after { content:'⌄'; color:var(--green); }
 .history-topic .chapter-heading { margin-top:0; }
 .history-topic .knowledge-heading p:last-child { font-size:16px; }
}
@media(max-width:599px) {
 .history-topic .knowledge-heading { margin:22px 0; }
 .history-topic .knowledge-heading h1 { font-size:32px; }
 .history-topic .knowledge-tools { width:100%; gap:10px; }
 .history-topic .secondary-button { flex:1; padding:10px 12px; gap:8px; font-size:15px; }
 .history-topic .secondary-button b { font-size:12px; }
 .history-topic .knowledge-directory { padding:18px 14px; }
 .history-topic .chapter-select { font-size:15px; padding:10px 8px; gap:7px; }
 .history-topic .chapter-select small { font-size:11px; }
 .history-topic .chapter-number { display:none; }
 .history-topic .chapter-heading { gap:14px; }
 .history-topic .chapter-heading h2 { font-size:26px; }
 .history-topic .chapter-heading p:last-child { font-size:16px; }
 .history-topic .chapter-count { font-size:12px; padding:6px 9px; }
 .history-topic .lesson-index { flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; max-width:100%; }
 .history-topic .lesson-index a { flex:0 0 auto; font-size:13px; padding:7px 9px; }
 .history-topic .lesson { padding:22px 17px; border-radius:18px; }
 .history-topic .lesson-heading { gap:12px; }
 .history-topic .lesson-heading h3 { font-size:25px; }
 .history-topic .lesson-read { min-height:42px; font-size:12px; padding:7px 9px; }
 .history-topic .definition { padding:14px 15px; font-size:18px; }
 .history-topic .essentials { padding-left:22px; }
 .history-topic .essentials li { font-size:18px; }
 .history-topic .facts-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .history-topic .fact { padding:11px 12px; }
 .history-topic .fact dd { font-size:17px; }
 .history-topic .formula { font-size:17px; padding:15px; }
 .history-topic th,.history-topic td { padding:10px 12px; font-size:15px; }
 .history-topic .lesson-diagram { padding:8px; }
 .history-topic .worked-example { padding:17px 15px; }
 .history-topic .example-question,.history-topic .example-answer { font-size:18px; }
 .history-topic .example-steps { font-size:17px; }
 .history-topic .misconception { padding:15px; }
 .history-topic .misconception p { font-size:16px; }
 .history-topic .lesson-resources { display:block; padding-top:18px; }
 .history-topic .resource-label { margin-bottom:14px; }
 .history-topic .resource-figure { margin-bottom:20px; }
 .history-topic .resource-image img { height:200px; }
 .history-topic .resource-action { font-size:16px; }
 .history-topic .local-audio { margin:14px 0 18px; }
 .history-topic .practice-option { padding:12px; font-size:17px; }
 .history-topic .next-chapter { flex-wrap:wrap; gap:12px; font-size:14px; }
 .history-topic .next-chapter strong { font-size:20px; }
 .history-topic .knowledge-dialog { width:calc(100% - 24px); padding:22px 17px; border-radius:18px; }
 .history-topic .dialog-heading h2 { font-size:24px; }
 .history-topic .dialog-heading .eyebrow { font-size:11px; }
 .history-topic .progress-row { gap:12px; padding:12px; font-size:15px; }
 .history-topic .lab-dialog { width:calc(100% - 16px); padding:17px 10px; }
 .history-topic .lab-dialog .dialog-heading { padding-inline:6px; }
}
@media print {
 .history-demo .site-header,.history-demo .site-footer,.history-topic .knowledge-tools,
 .history-topic .knowledge-directory,.history-topic .lesson-index,.history-topic .lesson-read,
 .history-topic .resource-action,.history-topic .local-audio,.history-topic .lesson-practice,
 .history-topic .next-chapter,.history-topic .reference-guide,.history-topic dialog { display:none!important; }
 .history-topic .knowledge-layout,.history-topic .lesson-layout { display:block; }
 .history-topic .lesson { break-inside:avoid; border:0; border-bottom:1px solid #ccc; }
 .history-topic .lesson-resources { display:block; border:0; padding-left:0; }
}
