:root {
  color-scheme: dark;
  --geo-bg: #06100d;
  --geo-panel: #0b1914;
  --geo-panel-2: #10231b;
  --geo-border: rgba(167, 243, 208, .14);
  --geo-text: #edfdf5;
  --geo-muted: #9fb8ab;
  --geo-accent: #34d399;
  --geo-accent-2: #22d3ee;
  --geo-danger: #fb7185;
  --geo-sidebar: 330px;
}
* { box-sizing: border-box; }
html { background: var(--geo-bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 72% -10%, rgba(52,211,153,.12), transparent 34%), var(--geo-bg); color: var(--geo-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
.geo-topbar { height: 68px; position: fixed; z-index: 70; inset: 0 0 auto; display: flex; align-items: center; border-bottom: 1px solid var(--geo-border); background: rgba(6,16,13,.92); backdrop-filter: blur(18px); }
.geo-topbar-inner { width: 100%; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.geo-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; letter-spacing: -.03em; }
.geo-brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--geo-accent), var(--geo-accent-2)); color: #052016; font-weight: 950; }
.geo-brand b { color: var(--geo-accent); }
.geo-top-title { min-width: 0; flex: 1; }
.geo-top-title p, .geo-top-title h1 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-top-title p { color: var(--geo-accent); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.geo-top-title h1 { margin-top: 2px; font-size: 17px; letter-spacing: -.02em; }
.geo-top-actions { display: flex; align-items: center; gap: 8px; }
.geo-top-actions a, .geo-mobile-toggle { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--geo-border); border-radius: 12px; background: rgba(255,255,255,.025); text-decoration: none; font-weight: 750; }
.geo-mobile-toggle { display: none; cursor: pointer; }
.geo-sidebar { position: fixed; z-index: 60; top: 68px; bottom: 0; left: 0; width: var(--geo-sidebar); border-right: 1px solid var(--geo-border); background: rgba(7,19,15,.96); overflow: auto; overscroll-behavior: contain; }
.geo-sidebar-head { position: sticky; top: 0; z-index: 2; padding: 18px; background: rgba(7,19,15,.96); border-bottom: 1px solid var(--geo-border); }
.geo-sidebar-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.geo-sidebar-head h2 { margin: 0; font-size: 15px; }
.geo-sidebar-head p { margin: 4px 0 14px; color: var(--geo-muted); font-size: 12px; }
.geo-close-sidebar { display: none; background: transparent; border: 0; font-size: 22px; cursor: pointer; }
.geo-search { width: 100%; min-height: 42px; border: 1px solid var(--geo-border); border-radius: 12px; background: #07140f; color: var(--geo-text); padding: 0 13px; outline: none; }
.geo-search:focus { border-color: var(--geo-accent); box-shadow: 0 0 0 3px rgba(52,211,153,.12); }
.geo-tree { padding: 12px; }
.geo-tree-theme { margin-bottom: 8px; }
.geo-tree-theme-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--geo-muted); text-align: left; font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; cursor: pointer; }
.geo-tree-theme-toggle:hover { background: rgba(255,255,255,.035); color: var(--geo-text); }
.geo-tree-theme-toggle span:last-child { transition: transform .2s; }
.geo-tree-theme-toggle[aria-expanded="true"] span:last-child { transform: rotate(180deg); }
.geo-tree-lessons { display: grid; gap: 4px; }
.geo-tree-lesson { display: grid; gap: 3px; padding: 10px 12px; border-radius: 11px; color: #c8ddd2; text-decoration: none; border: 1px solid transparent; }
.geo-tree-lesson span { font-size: 13px; line-height: 1.35; }
.geo-tree-lesson small { color: #729586; font-size: 11px; }
.geo-tree-lesson:hover, .geo-tree-lesson.is-active { background: rgba(52,211,153,.09); border-color: rgba(52,211,153,.19); color: #fff; }
.geo-tree-lesson.is-active small { color: var(--geo-accent); }
.geo-shell { margin-left: var(--geo-sidebar); padding: 98px clamp(18px, 4vw, 64px) 70px; }
.geo-main { max-width: 1030px; margin: 0 auto; }
.geo-status { margin-bottom: 16px; color: var(--geo-muted); font-size: 13px; }
.geo-overview-hero { padding: clamp(24px, 5vw, 56px); border: 1px solid var(--geo-border); border-radius: 26px; background: linear-gradient(145deg, rgba(52,211,153,.12), rgba(34,211,238,.045) 50%, rgba(255,255,255,.02)); box-shadow: 0 30px 80px rgba(0,0,0,.22); }
.geo-kicker { margin: 0 0 12px; color: var(--geo-accent); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; }
.geo-overview-hero h2 { max-width: 750px; margin: 0; font-size: clamp(32px, 6vw, 60px); line-height: 1.03; letter-spacing: -.055em; }
.geo-overview-hero > p:last-child { max-width: 760px; margin: 20px 0 0; color: #b9d0c4; font-size: clamp(16px, 2vw, 19px); line-height: 1.75; }
.geo-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.geo-theme-card { position: relative; min-width: 0; padding: 24px; border: 1px solid var(--geo-border); border-radius: 20px; background: rgba(11,25,20,.88); }
.geo-theme-number { color: var(--geo-accent); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.geo-theme-card h3 { margin: 12px 0 8px; font-size: 21px; line-height: 1.25; letter-spacing: -.03em; }
.geo-theme-card > p { margin: 0 0 17px; color: var(--geo-muted); font-size: 13px; }
.geo-theme-links { display: grid; gap: 6px; }
.geo-theme-links a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 11px; border-radius: 10px; background: rgba(255,255,255,.025); color: #d7ebe1; text-decoration: none; font-size: 13px; line-height: 1.35; }
.geo-theme-links a:hover { background: rgba(52,211,153,.08); color: #fff; }
.geo-lesson-intro { margin-bottom: 18px; padding: 28px; border: 1px solid var(--geo-border); border-radius: 20px; background: linear-gradient(145deg, rgba(52,211,153,.085), rgba(255,255,255,.018)); }
.geo-lesson-intro a { color: var(--geo-accent); font-size: 13px; font-weight: 800; text-decoration: none; }
.geo-lesson-intro p { margin: 22px 0 6px; color: var(--geo-muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.geo-lesson-intro h2 { margin: 0; font-size: clamp(28px, 5vw, 45px); line-height: 1.08; letter-spacing: -.045em; }
.geo-objective-list { display: grid; gap: 12px; }
.geo-objective-panel { border: 1px solid var(--geo-border); border-radius: 18px; background: rgba(11,25,20,.88); overflow: hidden; content-visibility: auto; contain-intrinsic-size: 500px; }
.geo-objective-toggle { width: 100%; display: grid; grid-template-columns: 115px minmax(0,1fr) 26px; align-items: center; gap: 14px; min-height: 70px; padding: 14px 18px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.geo-objective-toggle:hover { background: rgba(255,255,255,.025); }
.geo-objective-label { color: var(--geo-accent); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.geo-objective-title { font-weight: 780; line-height: 1.45; }
.geo-objective-chevron { justify-self: end; color: var(--geo-muted); font-size: 20px; transition: transform .2s; }
.geo-objective-panel:not(.is-collapsed) .geo-objective-chevron { transform: rotate(180deg); }
.geo-objective-stream { padding: 8px clamp(16px, 4vw, 34px) 32px; border-top: 1px solid var(--geo-border); overflow: hidden; }
.geo-objective-loading, .geo-page-loading { display: grid; place-items: center; min-height: 180px; color: var(--geo-muted); }
.geo-page-loading span { width: 28px; height: 28px; border: 3px solid rgba(52,211,153,.2); border-top-color: var(--geo-accent); border-radius: 50%; animation: geo-spin .8s linear infinite; }
@keyframes geo-spin { to { transform: rotate(360deg); } }
.geography-note-content { font-size: 16px; line-height: 1.82; color: #dbeee4; }
.geography-note-content h2, .geography-note-content h3, .geography-note-content h4, .geography-solutions-body h2, .geography-solutions-body h3, .geography-mastery h3 { color: #fff; line-height: 1.25; letter-spacing: -.025em; }
.geography-note-content h2 { margin: 34px 0 12px; font-size: 25px; }
.geography-note-content h3 { margin: 28px 0 10px; font-size: 21px; }
.geography-note-content h4 { margin: 24px 0 8px; font-size: 18px; }
.geography-note-content p, .geography-solutions-body p { margin: 0 0 16px; }
.geography-note-content ul, .geography-note-content ol, .geography-solutions-body ul, .geography-solutions-body ol { margin: 10px 0 20px; padding-left: 24px; }
.geography-note-content li, .geography-solutions-body li { margin: 7px 0; padding-left: 4px; }
.geography-note-content blockquote, .geography-solutions-body blockquote { margin: 18px 0; padding: 14px 18px; border-left: 3px solid var(--geo-accent); border-radius: 0 12px 12px 0; background: rgba(52,211,153,.07); color: #d8f7e7; }
.geography-note-content hr { margin: 28px 0; border: 0; border-top: 1px solid var(--geo-border); }
.geography-note-content code, .geography-solutions-body code { padding: 2px 5px; border-radius: 5px; background: #03100b; color: #a7f3d0; }
.table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; margin: 20px 0; border: 1px solid var(--geo-border); border-radius: 13px; }
table { min-width: 620px; width: 100%; border-collapse: collapse; background: #07140f; font-size: 14px; line-height: 1.5; }
th, td { padding: 12px 14px; border: 1px solid rgba(167,243,208,.12); text-align: left; vertical-align: top; }
th { background: rgba(52,211,153,.09); color: #fff; }
.math-display { max-width: 100%; margin: 18px 0; overflow-x: auto; padding: 15px; border-radius: 12px; background: #07140f; text-align: center; }
.katex-source { max-width: 100%; }
.insert-diagram { margin: 20px 0; padding: 16px 18px; border: 1px dashed rgba(52,211,153,.4); border-radius: 12px; color: #a7cbbb; background: rgba(52,211,153,.035); font-weight: 650; }
.geography-note-content img, .geography-solutions-body img { display: block; max-width: 100%; height: auto; margin: 20px auto; border-radius: 12px; }
.geography-solutions { margin: 28px 0 18px; border: 1px solid rgba(34,211,238,.2); border-radius: 14px; background: rgba(34,211,238,.035); overflow: hidden; }
.geography-solutions summary { display: flex; justify-content: space-between; align-items: center; min-height: 54px; padding: 12px 16px; cursor: pointer; color: #b9f5ff; font-weight: 850; list-style: none; }
.geography-solutions summary::-webkit-details-marker { display: none; }
.geography-solutions[open] summary span:last-child { transform: rotate(45deg); }
.geography-solutions-body { padding: 20px; border-top: 1px solid rgba(34,211,238,.16); color: #d8e8e9; font-size: 15.5px; line-height: 1.8; }
.geography-mastery { margin-top: 18px; padding: 20px; border: 1px solid rgba(52,211,153,.2); border-radius: 14px; background: rgba(52,211,153,.04); }
.geography-mastery h3 { margin: 0 0 13px; }
.task-list { padding: 0 !important; list-style: none; }
.task-list li { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; align-items: start; margin: 10px 0 !important; }
.task-list input { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--geo-accent); }
.geo-objective-error, .geo-load-error { margin: 18px 0; padding: 18px; border: 1px solid rgba(251,113,133,.25); border-radius: 13px; background: rgba(251,113,133,.055); color: #fecdd3; }
.geo-objective-error { display: grid; gap: 5px; }
.geo-load-error button { min-height: 42px; padding: 0 15px; border: 1px solid rgba(251,113,133,.35); border-radius: 10px; background: transparent; cursor: pointer; }
.geo-lesson-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.geo-lesson-nav a { min-width: 0; display: grid; gap: 4px; padding: 15px; border: 1px solid var(--geo-border); border-radius: 13px; background: rgba(255,255,255,.02); text-decoration: none; }
.geo-lesson-nav a:last-child { text-align: right; }
.geo-lesson-nav small { color: var(--geo-accent); text-transform: uppercase; font-weight: 850; letter-spacing: .06em; }
.geo-lesson-nav strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-backdrop { position: fixed; z-index: 55; inset: 68px 0 0; background: rgba(0,0,0,.64); }
.geo-fatal { max-width: 700px; margin: 100px auto; padding: 30px; }
[hidden] { display: none !important; }
@media (max-width: 860px) {
  .geo-mobile-toggle { display: inline-flex; }
  .geo-top-actions a { display: none; }
  .geo-sidebar { width: min(88vw, 360px); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 25px 0 70px rgba(0,0,0,.35); }
  .geo-sidebar.is-open { transform: translateX(0); }
  .geo-close-sidebar { display: block; }
  .geo-shell { margin-left: 0; padding: 90px 14px 60px; }
  .geo-theme-grid { grid-template-columns: 1fr; }
  .geo-objective-toggle { grid-template-columns: 1fr 26px; gap: 5px 10px; padding: 14px; }
  .geo-objective-label { grid-column: 1; }
  .geo-objective-title { grid-column: 1; }
  .geo-objective-chevron { grid-column: 2; grid-row: 1 / span 2; }
  .geo-objective-stream { padding: 4px 14px 25px; }
  .geography-note-content { font-size: 16px; line-height: 1.78; }
  .geo-lesson-nav { grid-template-columns: 1fr; }
  .geo-lesson-nav a:last-child { text-align: left; }
}
@media (max-width: 520px) {
  .geo-topbar-inner { padding: 0 12px; gap: 10px; }
  .geo-brand > span:last-child { display: none; }
  .geo-overview-hero, .geo-theme-card, .geo-lesson-intro { border-radius: 17px; }
  .geo-overview-hero { padding: 24px 19px; }
  .geo-theme-card { padding: 18px; }
  .geo-lesson-intro { padding: 20px 17px; }
  table { min-width: 540px; }
}
