:root{
  --navy:#082d4b;
  --navy-2:#0b3d63;
  --blue:#0d5f9f;
  --blue-2:#1684c6;
  --sky:#eaf4fb;
  --sky-2:#f5f9fc;
  --ink:#112433;
  --muted:#526675;
  --line:#ccdae4;
  --gold:#c79b43;
  --paper:#fffef9;
  --white:#ffffff;
  --danger:#9f2b35;
  --success:#1f7654;
  --shadow:0 18px 45px rgba(6,40,67,.11);
  --radius:18px;
  --radius-sm:11px;
  --shell:min(1220px, calc(100% - 34px));
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:82px}
body{margin:0;background:#fff;color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;line-height:1.55}
img,svg{max-width:100%;display:block}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
a{color:var(--blue)}
.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}
.skip-link{position:fixed;left:12px;top:-60px;z-index:9999;background:#fff;color:var(--navy);padding:10px 14px;border-radius:8px;box-shadow:var(--shadow)}
.skip-link:focus{top:12px}
.shell{width:var(--shell);margin-inline:auto}
.section{padding:76px 0}
.section-tint{background:linear-gradient(180deg,#f7fbfe 0%,#eaf4fb 100%)}
.section-dark{background:radial-gradient(circle at top left,#145b8b 0%,#082d4b 50%,#061f35 100%);color:#fff}
.site-header{position:sticky;top:0;z-index:1200;background:rgba(5,39,65,.96);backdrop-filter:blur(12px);border-bottom:1px solid rgba(255,255,255,.1)}
.header-inner{width:var(--shell);margin:auto;min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none;min-width:230px}
.brand-mark{width:42px;height:42px;border:1px solid rgba(255,255,255,.5);display:grid;place-items:center;border-radius:50%;font-family:Georgia,serif;font-weight:800;letter-spacing:-1px;background:linear-gradient(145deg,#176ba6,#0a3354)}
.brand strong{display:block;font-size:.98rem;letter-spacing:.01em}.brand small{display:block;color:#b8d5e9;font-size:.73rem;letter-spacing:.08em;text-transform:uppercase}
.site-nav{display:flex;align-items:center;gap:4px}
.site-nav a,.site-nav button{border:0;background:transparent;color:#dcecf7;text-decoration:none;padding:10px 9px;border-radius:8px;font-size:.86rem;white-space:nowrap}
.site-nav a:hover,.site-nav a:focus,.site-nav button:hover,.site-nav button:focus{background:rgba(255,255,255,.1);color:#fff}
.site-nav .nav-report{background:#fff;color:var(--navy);font-weight:700;margin-left:7px;padding-inline:13px}
.nav-toggle{display:none;width:44px;height:40px;border:1px solid rgba(255,255,255,.25);background:transparent;border-radius:8px;padding:8px}
.nav-toggle span:not(.sr-only){display:block;height:2px;background:#fff;margin:5px 0;border-radius:3px}
.hero{position:relative;overflow:hidden;background:linear-gradient(122deg,#0a3559 0%,#0b568e 56%,#147eb5 100%);color:#fff;padding:76px 0 64px}
.hero-pattern{position:absolute;inset:0;opacity:.16;background-image:linear-gradient(30deg,transparent 24%,rgba(255,255,255,.16) 25%,rgba(255,255,255,.16) 26%,transparent 27%,transparent 74%,rgba(255,255,255,.12) 75%,rgba(255,255,255,.12) 76%,transparent 77%),linear-gradient(90deg,transparent 49%,rgba(255,255,255,.11) 50%,transparent 51%);background-size:58px 58px}
.hero-inner{position:relative;width:var(--shell);margin:auto;display:grid;grid-template-columns:1.25fr .75fr;gap:50px;align-items:center}
.eyebrow{margin:0 0 8px;text-transform:uppercase;letter-spacing:.14em;font-size:.72rem;font-weight:800;color:var(--blue)}
.hero .eyebrow,.section-dark .eyebrow{color:#8dd3fb}
h1{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:clamp(2.65rem,6vw,5rem);line-height:.98;letter-spacing:-.035em;max-width:850px}
.hero-subtitle{margin:18px 0 12px;color:#d3ebf9;font-size:clamp(1.04rem,2vw,1.36rem);font-weight:650}
.hero-lead{font-size:1.06rem;max-width:780px;color:#e7f3fa}
.hero-actions,.button-row,.modal-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:24px}
.button{border:1px solid transparent;border-radius:10px;padding:12px 18px;font-weight:750;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.18s ease}
.button:hover{transform:translateY(-1px)}
.button.primary{background:#fff;color:var(--navy);box-shadow:0 8px 24px rgba(0,0,0,.17)}
.button.secondary{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.35);color:#fff}
.button.compact{padding:9px 13px;background:var(--blue);color:#fff;font-size:.88rem}
.button.ghost,.button.compact.ghost{background:transparent;color:var(--blue);border-color:var(--line)}
.hero .button.ghost{color:#fff;border-color:rgba(255,255,255,.4)}
.hero-thesis{position:relative;padding:34px 30px 27px;border:1px solid rgba(255,255,255,.25);border-radius:22px;background:rgba(4,29,48,.34);box-shadow:0 25px 55px rgba(0,0,0,.22)}
.quote-mark{position:absolute;font:700 6rem/1 Georgia;color:rgba(255,255,255,.18);top:3px;left:15px}
.hero-thesis>p{position:relative;font:700 1.55rem/1.25 Georgia,serif;margin:10px 0 8px}.hero-thesis>small{color:#bcd9ea}
.scope-grid{display:grid;gap:9px;margin-top:25px}.scope-grid span{display:block;padding:10px 12px;border-radius:9px;background:rgba(255,255,255,.08);font-size:.84rem;color:#dbedf7}.scope-grid strong{display:block;color:#fff}
.orientation-band{background:#fff;border-bottom:1px solid var(--line);box-shadow:0 8px 20px rgba(6,40,67,.05)}
.orientation-inner{width:var(--shell);margin:auto;display:grid;grid-template-columns:repeat(4,1fr);gap:0}
.orientation-inner>div{display:grid;grid-template-columns:42px 1fr;column-gap:11px;align-items:center;padding:19px 16px;border-right:1px solid var(--line)}.orientation-inner>div:first-child{border-left:1px solid var(--line)}
.orientation-inner span{grid-row:1/3;width:34px;height:34px;border:2px solid var(--blue);border-radius:9px;display:grid;place-items:center;color:var(--blue);font-weight:900}.orientation-inner strong{font-size:.9rem}.orientation-inner small{color:var(--muted);font-size:.76rem;line-height:1.25}
.section-heading{max-width:860px;margin:0 auto 34px;text-align:center}.section-heading.left-heading{text-align:left;margin-inline:0}.section-heading h2{font:700 clamp(2rem,4vw,3.4rem)/1.08 Georgia,serif;letter-spacing:-.025em;margin:0 0 13px;color:var(--navy)}.section-heading p:last-child{font-size:1.02rem;color:var(--muted);margin:0}.section-heading.light h2{color:#fff}.section-heading.light p:last-child{color:#d5e9f5}
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px}.panel+.panel{margin-top:22px}
.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}.panel-heading h3,.panel h3{margin:0;color:var(--navy);font:700 1.38rem/1.2 Georgia,serif}.panel-heading p{margin:6px 0 0;color:var(--muted);font-size:.9rem}.method-chip{display:inline-flex;align-items:center;white-space:nowrap;border-radius:999px;padding:7px 10px;background:#eaf4fb;color:var(--blue);font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.method-chip.reconstructed{background:#f7efe2;color:#805e1d}.method-chip.interpreted{background:#efeafd;color:#6042a3}.method-chip.calculated{background:#e7f6ee;color:#276c4d}
.numeral-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:9px}.numeral-card{border:1px solid var(--line);background:#f8fbfe;border-radius:12px;padding:4px;transition:.16s ease}.numeral-card:hover,.numeral-card:focus,.numeral-card.active{border-color:var(--blue);box-shadow:0 0 0 3px rgba(13,95,159,.12);transform:translateY(-2px)}
.selected-numeral{margin-top:22px;display:grid;grid-template-columns:190px 1fr;gap:24px;align-items:center;border-top:1px solid var(--line);padding-top:22px}.selected-symbol{border-radius:15px;overflow:hidden;border:1px solid var(--line)}.selected-numeral h4{font-size:2.4rem;margin:0;color:var(--navy)}.selected-numeral p{margin:5px 0;color:var(--muted)}
.component-strip{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.component-strip span{background:var(--sky);border-radius:8px;padding:7px 10px;font-weight:750;font-size:.82rem;color:var(--navy)}
.two-column{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:22px}.comparison-row{align-items:stretch}
.text-button{border:0;background:transparent;color:var(--blue);font-weight:750;padding:4px 0}
.symbol-tray{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.symbol-token{min-height:70px;border:1px solid var(--line);background:#f8fbfe;border-radius:11px;color:var(--navy);font-weight:750;display:flex;align-items:center;justify-content:center;gap:10px}.symbol-token:hover{border-color:var(--blue)}.dot-token span{width:14px;height:14px;background:var(--navy);border-radius:50%}.bar-token span{width:45px;height:10px;background:var(--navy);border-radius:6px}.zero-token img{width:52px;height:42px;object-fit:cover;object-position:center}
.builder-dropzone{min-height:190px;border:2px dashed #a9c2d4;border-radius:14px;margin-top:14px;padding:20px;display:grid;place-items:center;background:#f8fbfe;transition:.15s}.builder-dropzone.dragover{border-color:var(--blue);background:#eaf4fb}.builder-dropzone>p{color:var(--muted);text-align:center}.builder-pieces{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:13px}.piece-dot{width:24px;height:24px;background:var(--navy);border-radius:50%}.piece-bar{width:80px;height:15px;background:var(--navy);border-radius:8px}.piece-zero{width:100px}.builder-result{margin-top:12px;display:grid;grid-template-columns:1fr auto;align-items:center;border:1px solid var(--line);border-radius:11px;padding:12px 14px}.builder-result strong{font-size:1.8rem;color:var(--blue)}.builder-result p{grid-column:1/-1;margin:4px 0 0;color:var(--muted);font-size:.84rem}
.field-label,label{font-weight:700;color:var(--navy);font-size:.88rem}.field-label{display:block;margin-bottom:7px}.input-group{display:flex;gap:8px}.input-group input{min-width:0;flex:1}
input,select,textarea{width:100%;border:1px solid #b9cbd8;background:#fff;border-radius:9px;padding:10px 11px;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(13,95,159,.12)}
.segmented{display:grid;grid-template-columns:1fr 1fr;margin-top:14px;background:#eef4f8;border-radius:10px;padding:4px}.segmented button,.image-toggle button{border:0;background:transparent;border-radius:8px;padding:9px;color:var(--muted);font-weight:750}.segmented button.active,.image-toggle button.active{background:#fff;color:var(--blue);box-shadow:0 4px 12px rgba(6,40,67,.1)}
.place-stack{display:flex;flex-direction:column;gap:8px;align-items:center;margin:20px auto 14px;max-width:300px}.place-row{display:grid;grid-template-columns:78px 130px 78px;align-items:center;gap:8px;width:100%}.place-row .place-weight{text-align:right;color:var(--muted);font-size:.78rem}.place-row .place-name{font-size:.78rem;color:var(--blue);font-weight:800}.place-row .place-symbol{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#f8fbfe}.equation-line{text-align:center;font-weight:750;color:var(--navy);word-break:break-word}
.zero-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.zero-gallery figure{margin:0;border:1px solid var(--line);border-radius:11px;padding:8px;background:#f8fbfe}.zero-gallery figcaption{text-align:center;font-size:.74rem;color:var(--muted);margin-top:5px}.caution-note{border-left:4px solid var(--gold);background:#fff8e9;border-radius:0 9px 9px 0;padding:11px 13px;color:#5d5033;font-size:.84rem;margin:15px 0 0}
.nahua-symbols{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;color:var(--navy)}.nahua-symbols>div{border:1px solid var(--line);border-radius:11px;padding:10px;text-align:center;background:#f8fbfe}.nahua-symbols svg{width:60px;height:60px;margin:auto}.nahua-symbols strong{display:block;font-size:1.25rem}.nahua-symbols span{font-size:.72rem;color:var(--muted)}.nahua-panel>p{font-size:.87rem;color:var(--muted)}
.score-card{background:var(--navy);color:#fff;border-radius:11px;padding:9px 13px;min-width:110px;text-align:center}.score-card span{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em;color:#bcd7e9}.score-card strong{font-size:1.16rem}
.arithmetic-controls{display:grid;grid-template-columns:1fr 1fr 1fr auto auto;gap:10px;align-items:end}.arithmetic-controls label{display:grid;gap:5px}.compact-controls{grid-template-columns:1fr 1fr 1fr auto}
.arithmetic-workspace{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:12px;align-items:center;margin:25px 0}.operand-card{border:1px solid var(--line);border-radius:14px;background:#f8fbfe;min-height:190px;padding:12px;display:grid;place-items:center;position:relative}.operand-card>span{position:absolute;left:10px;top:8px;background:#fff;border:1px solid var(--line);border-radius:7px;padding:4px 8px;font-weight:850;color:var(--blue)}.operand-card>div{width:150px}.result-card{background:#edf7fc}.operator-mark{font-size:2rem;font-weight:900;color:var(--navy)}
.step-deck{display:grid;gap:9px}.step-card{display:grid;grid-template-columns:36px 1fr;gap:10px;border:1px solid var(--line);border-radius:10px;padding:11px;background:#fff;opacity:.65}.step-card.active{opacity:1;border-color:var(--blue);box-shadow:0 0 0 3px rgba(13,95,159,.09)}.step-card span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--blue);color:#fff;font-weight:900}.step-card p{margin:0;color:var(--muted)}.practice-answer{margin-top:18px;border-top:1px solid var(--line);padding-top:17px}.practice-answer .input-group{max-width:410px;margin-top:6px}.practice-answer p{min-height:22px;font-weight:750}.feedback-good{color:var(--success)}.feedback-bad{color:var(--danger)}
.visual-model-layout{display:grid;grid-template-columns:1.25fr .75fr;gap:20px;margin-top:21px}.visual-model{min-height:300px;border:1px solid var(--line);border-radius:14px;background:#f8fbfe;padding:18px;display:flex;flex-wrap:wrap;gap:12px;align-content:flex-start}.group-box{border:2px solid #83b5d4;border-radius:12px;padding:9px;display:grid;grid-template-columns:repeat(var(--cols,4),18px);gap:6px;background:#fff}.counter{width:18px;height:18px;border-radius:50%;background:var(--blue)}.division-group{border:2px solid #83b5d4;border-radius:12px;padding:10px;min-width:86px;background:#fff}.division-group strong{display:block;color:var(--navy);margin-bottom:7px}.division-counters{display:flex;flex-wrap:wrap;gap:5px}.remainder-box{border:2px dashed var(--gold);background:#fff9eb;border-radius:12px;padding:10px;min-width:110px}.explanation-card{border-left:4px solid var(--blue);background:#edf7fc;border-radius:0 12px 12px 0;padding:19px}.explanation-card h4{margin:0;color:var(--navy);font:700 1.25rem Georgia,serif}.explanation-card p{color:var(--muted)}.explanation-card .equation{font-weight:900;font-size:1.25rem;color:var(--blue)}
.long-count-grid{align-items:stretch}.unit-ladder{display:grid;gap:8px;margin-top:16px}.unit-ladder>div{display:grid;grid-template-columns:1fr auto;gap:2px 14px;border:1px solid var(--line);padding:11px 13px;border-radius:10px;background:#f8fbfe}.unit-ladder span{font-weight:850;color:var(--navy)}.unit-ladder strong{color:var(--blue)}.unit-ladder small{grid-column:1/-1;color:var(--muted)}.unit-ladder .modified{border-color:var(--gold);background:#fff8e8}
.long-count-output{display:flex;justify-content:center;gap:6px;margin:23px 0;flex-wrap:wrap}.lc-digit{border:1px solid var(--line);border-radius:12px;background:#f8fbfe;padding:10px;text-align:center;min-width:85px}.lc-digit img,.lc-digit svg{width:70px;margin:auto}.lc-digit strong{display:block;font-size:1.15rem;color:var(--navy)}.lc-digit span{font-size:.72rem;color:var(--muted)}.comparison-box{background:#edf7fc;border-radius:11px;padding:13px;color:var(--navy)}
.calendar-infrastructure{margin-top:22px}.cycle-diagram{display:grid;grid-template-columns:1fr 1fr 1.15fr;gap:16px;align-items:center}.cycle{border-radius:50%;aspect-ratio:1;display:grid;place-content:center;text-align:center;border:9px solid rgba(13,95,159,.2);background:#f6fbfe}.cycle strong{font-size:2rem;color:var(--navy)}.cycle span{font-weight:850;color:var(--blue)}.cycle small{display:block;max-width:190px;color:var(--muted);font-size:.72rem}.cycle.overlap{border-radius:20px;aspect-ratio:auto;min-height:180px;border-style:double;border-width:10px}
.evidence-legend{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin:-16px 0 27px}.evidence{border-radius:999px;padding:7px 10px;font-size:.72rem;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.evidence.visible{background:#e4f3fb;color:#0a5c8e}.evidence.calculated{background:#e4f5eb;color:#246847}.evidence.reconstructed{background:#fff0d3;color:#755417}.evidence.interpreted{background:#efe8fc;color:#604091}.dark-legend .evidence{box-shadow:0 0 0 1px rgba(255,255,255,.15)}
.dark-panel{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.18);box-shadow:0 22px 50px rgba(0,0,0,.22)}.dark-panel h3,.dark-panel .panel-heading h3{color:#fff}.dark-panel p,.dark-panel .panel-heading p{color:#cfe5f2}.xultun-layout{display:grid;grid-template-columns:1.12fr .88fr;gap:22px}.image-toggle{display:grid;grid-template-columns:repeat(3,1fr);padding:4px;background:rgba(255,255,255,.08);border-radius:10px;margin-bottom:14px}.image-toggle button{color:#bcd8e9}.image-toggle button.active{color:var(--blue)}.xultun-image-wrap{background:#fff;border-radius:13px;overflow:auto;max-height:700px}.xultun-image-wrap img{width:100%;height:auto}.attribution{font-size:.73rem!important;margin:11px 0 0!important}.xultun-blocks{display:flex;flex-wrap:wrap;gap:7px}.xultun-blocks button{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.06);color:#fff;border-radius:8px;padding:7px 9px;font-weight:800}.xultun-blocks button.active,.xultun-blocks button:hover{background:#fff;color:var(--navy)}.case-detail{margin-top:17px;border-top:1px solid rgba(255,255,255,.18);padding-top:17px}.case-detail h4{font:700 1.4rem Georgia,serif;margin:0 0 8px}.case-detail dl{display:grid;grid-template-columns:120px 1fr;gap:7px 12px}.case-detail dt{font-weight:850;color:#96d4f5}.case-detail dd{margin:0;color:#dcecf5}.case-detail .evidence{margin-right:5px}
.cycle-panel{margin-top:22px}.cycle-bars{display:grid;gap:10px}.cycle-bar{display:grid;grid-template-columns:150px 1fr 100px;gap:12px;align-items:center}.cycle-bar span{font-weight:800}.cycle-bar i{display:block;height:18px;border-radius:9px;background:linear-gradient(90deg,#59b9ea,#a7ddf6);width:var(--w)}.cycle-bar b{text-align:right;color:#fff}.formula-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:20px}.formula-grid>div{padding:13px;border:1px solid rgba(255,255,255,.16);border-radius:11px;background:rgba(255,255,255,.05)}.formula-grid strong,.formula-grid span,.formula-grid b,.formula-grid small{display:block}.formula-grid strong{font-size:1.2rem}.formula-grid span{color:#bcd9e8}.formula-grid b{margin-top:5px}.formula-grid small{color:#9dbed1;margin-top:5px}
.dresden-panel{padding:0;overflow:hidden}.dresden-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 17px;background:var(--navy);color:#fff}.page-tabs{display:flex;gap:6px;overflow-x:auto}.page-tabs button{border:1px solid rgba(255,255,255,.25);background:transparent;color:#d7e8f2;border-radius:8px;padding:8px 11px;font-weight:800;white-space:nowrap}.page-tabs button.active{background:#fff;color:var(--navy)}.zoom-controls{display:flex;align-items:center;gap:6px}.zoom-controls button{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:#fff;border-radius:7px;padding:7px 10px}.zoom-controls span{min-width:48px;text-align:center;font-size:.8rem}
.dresden-layout{display:grid;grid-template-columns:1.35fr .65fr;min-height:760px}.codex-viewer{overflow:auto;background:#d6d0c0;padding:24px;position:relative}.codex-stage{width:520px;max-width:none;margin:auto;position:relative;transform-origin:top center;transition:transform .15s}.codex-stage img{width:100%;height:auto;box-shadow:0 18px 35px rgba(0,0,0,.35)}.dresden-hotspots{position:absolute;inset:0}.hotspot{position:absolute;border:2px solid transparent;background:transparent;border-radius:5px}.hotspot:hover,.hotspot.active{border-color:#e23434;background:rgba(255,245,0,.12);box-shadow:0 0 0 2px rgba(255,255,255,.65)}.dresden-annotation{padding:24px;overflow:auto;border-left:1px solid var(--line);background:#fff}.dresden-annotation h3{font:700 1.55rem Georgia,serif;color:var(--navy);margin:0 0 12px}.dresden-annotation p{color:var(--muted)}.annotation-facts{display:grid;gap:9px}.annotation-facts>div{border-left:4px solid var(--blue);background:#f1f7fb;padding:10px;border-radius:0 9px 9px 0}.annotation-facts strong{display:block;color:var(--navy)}.line-guide{margin-top:18px;display:grid;gap:6px}.line-guide button{display:grid;grid-template-columns:70px 1fr;text-align:left;gap:8px;border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px}.line-guide button.active,.line-guide button:hover{border-color:var(--blue);background:#eef7fc}.line-guide b{color:var(--blue)}.dark-text{color:var(--muted)!important;padding:0 20px 18px}
.venus-phases{display:flex;gap:10px;height:125px;align-items:end}.venus-phases>div{flex:1;display:flex;flex-direction:column;justify-content:end;height:100%;text-align:center}.venus-phases>div>span{height:var(--phase);min-height:7px;background:linear-gradient(180deg,#2f99cc,#0c5c96);border-radius:8px 8px 3px 3px}.venus-phases strong{color:var(--navy);margin-top:7px}.venus-phases small{color:var(--muted)}.venus-equations{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:20px}.venus-equations span{background:#edf7fc;border-radius:10px;padding:12px;text-align:center;color:var(--navy)}
.reference-list{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.reference-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;box-shadow:0 10px 25px rgba(6,40,67,.07)}.reference-card .ref-category{display:inline-block;color:var(--blue);font-weight:850;text-transform:uppercase;letter-spacing:.08em;font-size:.66rem}.reference-card h3{font:700 1.04rem/1.35 Georgia,serif;color:var(--navy);margin:6px 0}.reference-card p{color:var(--muted);font-size:.86rem;margin:7px 0}.reference-card a{font-size:.82rem;font-weight:750}
.pdf-frame{padding:0;overflow:hidden}.pdf-frame iframe{width:100%;height:800px;border:0;background:#e7edf1}.pdf-fallback{padding:12px 18px;margin:0;color:var(--muted);font-size:.84rem;border-top:1px solid var(--line)}
.comments-section{padding:76px 0;background:#eef5fa}.comments-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:24px;align-items:start}.comment-form label{display:grid;gap:6px;margin-bottom:13px}.comment-form label span{font-weight:500;color:var(--muted)}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.honeypot{position:absolute!important;left:-9999px!important}.form-actions{display:flex;align-items:center;gap:12px}.form-actions .button.primary{background:var(--blue);color:#fff}.comments-list-panel{min-height:500px}.comments-list{display:grid;gap:10px}.comment-card{border:1px solid var(--line);border-radius:11px;padding:13px;background:#f9fbfd}.comment-card header{display:flex;justify-content:space-between;gap:8px}.comment-card strong{color:var(--navy)}.comment-card small{color:var(--muted)}.comment-card p{white-space:pre-wrap;margin:9px 0 0;color:#334b5c}.empty-state{color:var(--muted);text-align:center;padding:50px 15px}
.site-footer{background:#061f35;color:#d3e6f2;padding:24px 0}.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:20px}.footer-inner strong,.footer-inner span{display:block}.footer-inner span{font-size:.78rem;color:#9fbcd0}.footer-inner button{border:0;background:transparent;color:#fff;text-decoration:underline}
.modal[hidden]{display:none}.modal{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;background:rgba(1,19,32,.76);backdrop-filter:blur(4px)}.modal-card{position:relative;width:min(650px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:28px;box-shadow:0 35px 90px rgba(0,0,0,.45)}.modal-card h2{font:700 2rem Georgia,serif;color:var(--navy);margin:0 0 10px}.modal-card>p{color:var(--muted)}.modal-card label{display:grid;gap:6px;margin-top:14px}.modal-card label span{font-weight:500;color:var(--muted)}.modal-close{position:absolute;right:14px;top:12px;width:34px;height:34px;border:0;border-radius:50%;background:#eef4f8;color:var(--navy);font-size:1.4rem}.progress-wrap{margin-top:18px}.progress-track{height:12px;background:#dce7ee;border-radius:999px;overflow:hidden}.progress-track span{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--blue),var(--blue-2));transition:width .3s}.progress-wrap p{margin:7px 0;color:var(--muted);font-size:.84rem}.report-result{min-height:22px;font-weight:750}
@keyframes pulseRegroup{0%,100%{transform:scale(1)}50%{transform:scale(1.05);box-shadow:0 0 0 7px rgba(13,95,159,.12)}}.regrouping{animation:pulseRegroup 1s ease 2}
@media(max-width:1050px){
  .site-nav{position:absolute;top:68px;left:0;right:0;display:none;flex-direction:column;align-items:stretch;background:#082d4b;padding:12px 18px;border-top:1px solid rgba(255,255,255,.1)}.site-nav.open{display:flex}.site-nav a,.site-nav button{text-align:left;padding:12px}.site-nav .nav-report{margin-left:0}.nav-toggle{display:block}
  .hero-inner{grid-template-columns:1fr;gap:30px}.hero-thesis{max-width:750px}.numeral-grid{grid-template-columns:repeat(5,1fr)}.arithmetic-controls{grid-template-columns:repeat(3,1fr)}.arithmetic-controls button{width:100%}.xultun-layout,.dresden-layout{grid-template-columns:1fr}.dresden-layout{min-height:0}.dresden-annotation{border-left:0;border-top:1px solid var(--line)}.codex-viewer{min-height:720px}.formula-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:760px){
  :root{--shell:min(100% - 24px,1220px)}.section{padding:56px 0}.hero{padding:58px 0 48px}.orientation-inner{grid-template-columns:1fr 1fr}.orientation-inner>div:nth-child(3){border-left:1px solid var(--line)}.orientation-inner>div{border-bottom:1px solid var(--line)}
  .two-column,.comments-grid,.visual-model-layout{grid-template-columns:1fr}.numeral-grid{grid-template-columns:repeat(4,1fr)}.selected-numeral{grid-template-columns:1fr;text-align:center}.selected-symbol{max-width:200px;margin:auto}.component-strip{justify-content:center}.symbol-tray{grid-template-columns:1fr}.zero-gallery,.nahua-symbols{grid-template-columns:repeat(2,1fr)}
  .arithmetic-controls,.compact-controls{grid-template-columns:1fr 1fr}.arithmetic-workspace{grid-template-columns:1fr auto 1fr;align-items:center}.arithmetic-workspace>.operator-mark:nth-of-type(2){display:none}.result-card{grid-column:1/-1;min-height:170px}.operand-card{min-height:150px}.operand-card>div{width:120px}.cycle-diagram{grid-template-columns:1fr}.cycle{max-width:260px;margin:auto;width:100%}.cycle.overlap{max-width:none}.cycle-bars .cycle-bar{grid-template-columns:100px 1fr 75px}.formula-grid{grid-template-columns:1fr}.dresden-toolbar{align-items:flex-start;flex-direction:column}.dresden-layout{display:block}.codex-viewer{min-height:580px;padding:14px}.codex-stage{width:420px}.venus-phases{height:auto;display:grid;grid-template-columns:1fr 1fr}.venus-phases>div{height:120px}.venus-equations,.reference-list{grid-template-columns:1fr}.pdf-frame iframe{height:620px}.form-row{grid-template-columns:1fr}.footer-inner{align-items:flex-start;flex-direction:column}
}
@media(max-width:480px){
  .brand{min-width:0}.brand strong{font-size:.85rem}.brand small{font-size:.63rem}.hero h1{font-size:2.65rem}.panel{padding:17px}.numeral-grid{grid-template-columns:repeat(3,1fr)}.orientation-inner{grid-template-columns:1fr}.orientation-inner>div{border-left:1px solid var(--line)}.arithmetic-controls,.compact-controls{grid-template-columns:1fr}.arithmetic-workspace{grid-template-columns:1fr}.operator-mark{display:none}.result-card{grid-column:auto}.place-row{grid-template-columns:60px 1fr 60px}.zero-gallery,.nahua-symbols{grid-template-columns:1fr 1fr}.page-tabs{width:100%}.zoom-controls{width:100%;justify-content:flex-end}.codex-stage{width:340px}.modal-card{padding:22px 17px}.cycle-bar{grid-template-columns:86px 1fr!important}.cycle-bar b{display:none}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Dynamic explorer components */
.maya-digit{display:block;width:100%;height:auto;max-height:112px}.selected-symbol .maya-digit{max-height:190px}.numeral-card strong{display:block;color:var(--navy);font-size:.86rem;margin:-8px 0 5px}.component-strip{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.component-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:#f4f9fc;color:var(--navy);font-size:.78rem;font-weight:750}.mini-dot{width:10px;height:10px;border-radius:50%;background:var(--navy)}.mini-bar{width:28px;height:7px;border-radius:6px;background:var(--navy)}
.builder-dropzone.drag-over{border-color:var(--blue);background:#eaf4fb}.builder-piece{border:0;background:transparent;padding:4px;cursor:pointer}.builder-piece:hover{filter:drop-shadow(0 3px 4px rgba(5,48,79,.22))}.builder-dot span{display:block;width:25px;height:25px;border-radius:50%;background:var(--navy)}.builder-bar span{display:block;width:84px;height:15px;border-radius:8px;background:var(--navy)}.builder-zero img{display:block;width:105px;height:70px;object-fit:contain}.builder-pieces .builder-dot{order:1}.builder-pieces .builder-bar{order:2}.builder-pieces .builder-zero{order:0}
.place-meta{text-align:right}.place-meta strong,.place-meta small,.place-value strong,.place-value small{display:block}.place-meta strong{color:var(--blue)}.place-meta small,.place-value small{font-size:.7rem;color:var(--muted)}.place-value strong{font-size:1.1rem;color:var(--navy)}.place-symbol{display:grid;place-items:center}.place-symbol .maya-digit{height:86px}.place-symbol svg{width:100px}.stacked-number{display:flex;flex-direction:column;align-items:center;gap:3px}.mini-place{position:relative;width:120px;border:1px solid var(--line);border-radius:9px;background:#f9fcfe;display:grid;place-items:center}.mini-place>span{position:absolute;top:4px;left:5px;font-size:.58rem;color:var(--muted);font-weight:750}.mini-place .maya-digit{height:78px;width:90px}.operand-card>div{width:auto;max-height:260px;overflow:auto}.result-card .stacked-number{max-height:230px;overflow:auto}
.step-card{opacity:1}.step-card strong{display:block;color:var(--navy);margin-bottom:3px}.step-card.regroup-step{border-color:var(--gold);background:#fff9ec}.correct-feedback{color:var(--success)!important}.incorrect-feedback{color:var(--danger)!important}
.group-array{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start;width:100%}.object-group,.division-pool,.remainder-pool{border:2px solid #83b5d4;border-radius:12px;padding:10px;background:#fff}.object-group{min-width:105px}.object-group strong,.division-pool strong,.remainder-pool strong{display:block;color:var(--navy);font-size:.76rem;margin-bottom:7px}.object-group>div,.division-pool>div,.remainder-pool>div{display:flex;flex-wrap:wrap;gap:5px}.object-dot{display:block;width:17px;height:17px;border-radius:50%;background:var(--blue);box-shadow:inset 0 -2px 0 rgba(0,0,0,.15)}.division-pool{width:100%;border-style:dashed}.sharing-arrow{width:100%;text-align:center;color:var(--blue);font-weight:900;padding:4px}.remainder-pool{width:100%;border-color:var(--gold);background:#fff9eb}.model-equation{font-weight:900!important;color:var(--blue)!important;word-break:break-word}.explanation-card .stacked-number{margin-top:8px}.explanation-card .mini-place{width:95px}.explanation-card .mini-place .maya-digit{width:75px;height:65px}
.long-count-unit{border:1px solid var(--line);border-radius:12px;background:#f8fbfe;padding:9px;text-align:center;min-width:86px}.long-count-unit>div{height:72px;display:grid;place-items:center}.long-count-unit svg{width:70px;height:68px}.long-count-unit strong,.long-count-unit span,.long-count-unit small{display:block}.long-count-unit strong{color:var(--navy);font-size:1.1rem}.long-count-unit span{font-weight:800;color:var(--blue);font-size:.78rem}.long-count-unit small{font-size:.62rem;color:var(--muted)}.comparison-box{display:grid;grid-template-columns:1fr 1fr;gap:8px}.comparison-box>div{padding:10px;border:1px solid rgba(13,95,159,.13);border-radius:9px;background:rgba(255,255,255,.6)}.comparison-box>div:last-child{grid-column:1/-1}.comparison-box strong{display:block;color:var(--navy);font-size:1.06rem}.comparison-box p{margin:4px 0;color:var(--muted);font-size:.78rem}
.xultun-blocks button{display:grid;text-align:left;gap:2px}.xultun-blocks button span{font-size:.62rem;font-weight:500;opacity:.8}.case-detail h4{color:#fff}.case-detail>p{color:#dcecf5}.case-detail .evidence{display:inline-block;margin-bottom:10px}.detail-math,.detail-caution{display:grid;gap:4px;padding:11px 13px;border-radius:9px;margin-top:10px}.detail-math{background:rgba(49,164,220,.13);border-left:4px solid #5dc2ef}.detail-caution{background:rgba(209,154,52,.13);border-left:4px solid #dda842}.detail-math strong,.detail-caution strong{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em}.detail-math span,.detail-caution span{color:#e1eff7;font-size:.85rem}.cycle-bar i{display:block;height:100%;min-width:3px;background:linear-gradient(90deg,#39a6d8,#9edff6);border-radius:999px}.page-intro{border-top:1px solid var(--line);padding-top:12px;margin-top:13px!important;font-size:.82rem}.dresden-annotation .evidence{display:inline-block;margin-bottom:7px}
body.modal-open{overflow:hidden}.modal-actions{display:flex;gap:10px;align-items:center;margin-top:18px}.modal-card input,.modal-card textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px;font:inherit}.modal-card .button.primary{background:var(--blue);color:#fff}.modal-card .button.ghost{color:var(--blue)}
@media(max-width:760px){.comparison-box{grid-template-columns:1fr}.comparison-box>div:last-child{grid-column:auto}.object-group{min-width:90px}.place-symbol svg{width:85px}}

/* v1.1 layout hardening, inline PDF, and Nova panel guide */
html,body{max-width:100%;overflow-x:hidden}
main,.section,.shell,.panel,.two-column>*{min-width:0}
.panel[data-guide-key]{position:relative}
.panel[data-guide-key]>.panel-heading:first-of-type{padding-right:62px}
.dresden-panel[data-guide-key] .dresden-toolbar{padding-right:78px}
.xultun-image-panel[data-guide-key],.unit-ladder-panel[data-guide-key],.long-count-converter[data-guide-key],.comment-form[data-guide-key]{padding-top:70px}
.pdf-frame[data-guide-key]{padding-top:0}

.dresden-layout{grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);max-width:100%;overflow:hidden}
.codex-viewer{min-width:0;max-width:100%;overscroll-behavior:contain}
.codex-stage{width:min(520px,100%)}
.dresden-toolbar{max-width:100%}
.dresden-toolbar>*{min-width:0}
.page-tabs{max-width:100%;min-width:0}
.reference-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.reference-card,.comment-card{min-width:0;overflow-wrap:anywhere;word-break:normal}
.comments-grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
.comment-form,.comments-list-panel{width:100%;max-width:100%;min-width:0}
.comment-form input,.comment-form textarea{display:block;width:100%;min-width:0;max-width:100%;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);padding:11px 12px;outline:none}
.comment-form textarea{resize:vertical;overflow-wrap:anywhere}
.comment-form input:focus,.comment-form textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(13,95,159,.12)}
.form-row{grid-template-columns:repeat(2,minmax(0,1fr))}
.comment-card header>div{min-width:0}.comment-card small{display:block}.comment-card p{overflow-wrap:anywhere}

.pdf-frame{min-height:820px;background:#e7edf1}
.pdf-frame iframe{display:block;width:100%;height:820px;min-height:820px;border:0;background:#e7edf1}

.nova-guide-trigger{position:absolute;top:12px;right:12px;z-index:24;width:52px;height:52px;border:1px solid rgba(13,95,159,.24);border-radius:50%;padding:3px;background:#fff;box-shadow:0 8px 20px rgba(6,40,67,.18);display:grid;place-items:center;overflow:visible;transition:transform .18s ease,box-shadow .18s ease}
.nova-guide-trigger img{width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 3px 3px rgba(6,40,67,.18))}
.nova-guide-trigger span{position:absolute;right:46px;top:50%;transform:translateY(-50%) translateX(8px);opacity:0;pointer-events:none;background:var(--navy);color:#fff;border-radius:999px;padding:5px 9px;font-size:.68rem;font-weight:850;letter-spacing:.04em;white-space:nowrap;transition:opacity .16s ease,transform .16s ease}
.nova-guide-trigger:hover,.nova-guide-trigger:focus-visible{transform:translateY(-2px) scale(1.04);box-shadow:0 12px 28px rgba(6,40,67,.24);outline:none}
.nova-guide-trigger:hover span,.nova-guide-trigger:focus-visible span{opacity:1;transform:translateY(-50%) translateX(0)}
.dark-panel .nova-guide-trigger{border-color:rgba(255,255,255,.48);background:rgba(255,255,255,.95)}
.nova-panel-active{box-shadow:0 0 0 3px rgba(22,132,198,.34),var(--shadow)!important}
.dark-panel.nova-panel-active{box-shadow:0 0 0 3px rgba(141,211,251,.55),0 22px 50px rgba(0,0,0,.25)!important}

.nova-guide[hidden]{display:none}
.nova-guide{position:fixed;right:18px;bottom:18px;z-index:2800;width:min(720px,calc(100vw - 36px));pointer-events:none;opacity:0;transform:translateX(115%);transition:transform .34s cubic-bezier(.22,.8,.3,1),opacity .22s ease}
.nova-guide.open{pointer-events:auto;opacity:1;transform:translateX(0)}
.nova-guide-card{position:relative;display:grid;grid-template-columns:210px minmax(0,1fr);gap:4px;align-items:end;border:1px solid rgba(255,255,255,.48);border-radius:24px;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(237,247,252,.98));box-shadow:0 30px 80px rgba(1,25,43,.35);overflow:hidden;backdrop-filter:blur(12px)}
.nova-guide-card:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 12% 20%,rgba(43,180,235,.18),transparent 38%),radial-gradient(circle at 90% 85%,rgba(146,71,213,.12),transparent 35%);pointer-events:none}
.nova-character-stage{position:relative;z-index:1;min-height:250px;display:flex;align-items:flex-end;justify-content:center;padding:18px 0 0 12px;overflow:hidden}
.nova-character-stage:after{content:"";position:absolute;left:20%;right:10%;bottom:9px;height:18px;border-radius:50%;background:rgba(8,45,75,.18);filter:blur(7px);z-index:-1}
.nova-character-stage img{width:208px;max-width:none;height:auto;transform-origin:50% 100%;animation:novaArrive .58s cubic-bezier(.22,.9,.32,1) both}
.nova-guide.is-speaking .nova-character-stage img{animation:novaTalk .72s ease-in-out infinite alternate}
.nova-guide-copy{position:relative;z-index:2;padding:25px 48px 23px 12px;min-width:0}
.nova-guide-copy h2{margin:0 0 9px;color:var(--navy);font:700 1.55rem/1.15 Georgia,"Times New Roman",serif}
.nova-guide-copy .eyebrow{margin-bottom:5px}
.nova-guide-transcript{max-height:220px;overflow:auto;padding-right:7px;color:#334b5c;font-size:.91rem;line-height:1.58;scrollbar-width:thin}
.nova-sentence{transition:background .18s ease,color .18s ease;box-decoration-break:clone;-webkit-box-decoration-break:clone;border-radius:4px}
.nova-sentence.active{background:#dff3fc;color:#073b60}
.nova-sentence.heard{color:#6a7c89}
.nova-guide-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:15px}
.nova-guide-controls .button{padding:8px 12px;font-size:.8rem}
.nova-guide-controls .button.ghost{border:1px solid var(--line);background:#fff;color:var(--blue)}
#nova-audio-status{font-size:.72rem;color:var(--muted);font-weight:700}
.nova-guide-close{position:absolute;top:11px;right:11px;z-index:5;width:34px;height:34px;border:0;border-radius:50%;background:#eaf2f7;color:var(--navy);font-size:1.35rem;line-height:1;display:grid;place-items:center}
.nova-guide-close:hover,.nova-guide-close:focus-visible{background:var(--navy);color:#fff;outline:none}
@keyframes novaArrive{0%{transform:translateX(-130%) rotate(-9deg);opacity:0}65%{transform:translateX(7%) rotate(2deg);opacity:1}100%{transform:translateX(0) rotate(0)}}
@keyframes novaTalk{0%{transform:translateY(0) rotate(-.8deg)}100%{transform:translateY(-5px) rotate(.8deg)}}

@media(max-width:1050px){
  .dresden-layout{grid-template-columns:1fr}.codex-stage{width:min(520px,100%)}
}
@media(max-width:760px){
  .dresden-layout{display:block;overflow:hidden}.codex-viewer{width:100%;min-height:520px}.codex-stage{width:min(420px,100%)}
  .comments-grid,.form-row{grid-template-columns:1fr}.comments-list-panel{min-height:320px}
  .reference-list{grid-template-columns:1fr}.pdf-frame,.pdf-frame iframe{height:650px;min-height:650px}
  .nova-guide{right:8px;bottom:8px;width:calc(100vw - 16px)}
  .nova-guide-card{grid-template-columns:128px minmax(0,1fr);border-radius:18px}
  .nova-character-stage{min-height:210px;padding-left:5px}.nova-character-stage img{width:145px}
  .nova-guide-copy{padding:20px 42px 18px 4px}.nova-guide-copy h2{font-size:1.25rem}.nova-guide-transcript{font-size:.83rem;max-height:190px}
}
@media(max-width:480px){
  .codex-viewer{padding:10px;min-height:450px}.codex-stage{width:100%}
  .dresden-toolbar{padding-right:70px}.page-tabs{width:100%}
  .nova-guide-card{grid-template-columns:1fr;align-items:start}.nova-character-stage{position:absolute;left:7px;bottom:8px;width:92px;min-height:0;padding:0;opacity:.96}.nova-character-stage img{width:96px}
  .nova-guide-copy{padding:19px 40px 76px 18px}.nova-guide-transcript{max-height:185px}.nova-guide-controls{padding-left:88px}
  .nova-guide-trigger{width:46px;height:46px}.nova-guide-trigger img{width:39px;height:39px}
  .xultun-image-panel[data-guide-key],.unit-ladder-panel[data-guide-key],.long-count-converter[data-guide-key],.comment-form[data-guide-key]{padding-top:64px}
}
@media(prefers-reduced-motion:reduce){.nova-guide,.nova-character-stage img,.nova-guide-trigger{animation:none!important;transition:none!important}}
.reference-list[data-guide-key]{position:relative;padding-top:70px}
.reference-list[data-guide-key]>.nova-guide-trigger{top:6px;right:6px}

/* v1.2 section rhythm, uniform panel grids, self-hosted document viewer, and comments repair */
.section-white{
  background:#fff;
}
.section-bluewash{
  position:relative;
  background:
    linear-gradient(180deg,rgba(234,244,251,.96),rgba(241,248,252,.98)),
    radial-gradient(circle at 8% 12%,rgba(22,132,198,.16),transparent 34%),
    radial-gradient(circle at 92% 88%,rgba(13,95,159,.10),transparent 30%);
  border-top:1px solid rgba(13,95,159,.10);
  border-bottom:1px solid rgba(13,95,159,.10);
}
.section-bluewash:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:5px;
  background:linear-gradient(90deg,var(--navy),var(--blue-2),var(--navy));
  opacity:.9;
}
.section-bluewash>.shell{position:relative}
.section-bluewash .panel{
  border-color:#bfd5e3;
  box-shadow:0 18px 42px rgba(6,40,67,.12);
}
.section-bluewash .section-heading h2{color:#073554}
.section-bluewash .section-heading p:last-child{color:#415f72}

/* The general vertical panel rhythm must not offset cards inside grids. */
.two-column,
.xultun-layout,
.long-count-grid,
.comments-grid{
  align-items:stretch;
}
.two-column>.panel,
.xultun-layout>.panel,
.long-count-grid>.panel,
.comments-grid>.panel{
  height:100%;
  margin-top:0;
}
.two-column>.panel+.panel,
.xultun-layout>.panel+.panel,
.long-count-grid>.panel+.panel,
.comments-grid>.panel+.panel{
  margin-top:0;
}
.two-column>.panel,
.long-count-grid>.panel{
  display:flex;
  flex-direction:column;
}
.two-column>.panel>.button-row:last-child,
.long-count-grid>.panel>.button-row:last-child{
  margin-top:auto;
}
.comparison-row .panel-heading{
  min-height:104px;
}
.long-count-grid .panel>h3{
  padding-right:62px;
}
.venus-math-panel{margin-top:22px}

/* Dresden remains inside a full-width blue band and cannot escape its shell. */
#dresden .shell{min-width:0}
.dresden-panel,
.venus-math-panel{max-width:100%;overflow:hidden}
.dresden-layout{min-width:0}
.codex-viewer,.dresden-annotation{min-width:0}

/* Reliable self-hosted inline methodological-note viewer. */
.document-viewer{
  padding:0;
  overflow:hidden;
  background:#dfeaf1;
}
.document-viewer[data-guide-key]>.nova-guide-trigger{
  top:10px;
  right:10px;
}
.document-toolbar{
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 76px 14px 18px;
  color:#fff;
  background:linear-gradient(135deg,var(--navy),var(--blue));
  border-bottom:1px solid rgba(255,255,255,.18);
}
.document-title{min-width:0}
.document-title strong,
.document-title span{display:block}
.document-title strong{
  font:700 1.05rem/1.25 Georgia,"Times New Roman",serif;
  overflow-wrap:anywhere;
}
.document-title span{
  margin-top:3px;
  color:#cce5f4;
  font-size:.77rem;
}
.document-controls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
}
.document-controls button{
  min-height:36px;
  border:1px solid rgba(255,255,255,.35);
  border-radius:8px;
  padding:7px 11px;
  color:#fff;
  background:rgba(255,255,255,.08);
  font-weight:750;
}
.document-controls button:hover,
.document-controls button:focus-visible{
  background:#fff;
  color:var(--navy);
  outline:none;
}
.document-controls button:disabled{opacity:.42;cursor:not-allowed}
.document-controls span{
  min-width:48px;
  color:#e8f4fb;
  text-align:center;
  font-size:.78rem;
  font-weight:800;
}
.document-stage{
  min-height:760px;
  max-height:860px;
  overflow:auto;
  padding:24px;
  background:
    linear-gradient(45deg,rgba(8,45,75,.035) 25%,transparent 25%,transparent 75%,rgba(8,45,75,.035) 75%),
    linear-gradient(45deg,rgba(8,45,75,.035) 25%,transparent 25%,transparent 75%,rgba(8,45,75,.035) 75%),
    #dce5eb;
  background-size:28px 28px;
  background-position:0 0,14px 14px;
  overscroll-behavior:contain;
  outline:none;
}
.document-stage:focus-visible{box-shadow:inset 0 0 0 3px rgba(22,132,198,.45)}
.document-stage img{
  display:block;
  width:100%;
  max-width:980px;
  height:auto;
  margin:0 auto;
  background:#fff;
  box-shadow:0 18px 50px rgba(3,28,48,.28);
  transition:width .16s ease;
}
.document-page-strip{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:11px 14px;
  background:#f7fbfd;
  border-top:1px solid var(--line);
  scrollbar-width:thin;
}
.document-page-strip button{
  flex:0 0 auto;
  min-width:36px;
  height:34px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--navy);
  font-weight:800;
}
.document-page-strip button.active,
.document-page-strip button:hover,
.document-page-strip button:focus-visible{
  border-color:var(--blue);
  background:var(--blue);
  color:#fff;
  outline:none;
}
.document-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 16px;
  border-top:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  font-size:.78rem;
}
.document-footer a{font-weight:800;white-space:nowrap}
.document-error{
  max-width:600px;
  margin:80px auto;
  padding:24px;
  border:1px solid #d9b7ba;
  border-radius:14px;
  background:#fff;
  color:var(--danger);
  text-align:center;
}

/* Comments heading spans the full section; form and log align beneath it. */
.comments-section{
  position:relative;
  background:
    linear-gradient(180deg,#e7f2f9 0%,#f1f7fb 100%),
    radial-gradient(circle at 15% 20%,rgba(22,132,198,.12),transparent 35%);
  border-top:1px solid rgba(13,95,159,.12);
}
.comments-section:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:5px;
  background:linear-gradient(90deg,var(--navy),var(--blue-2),var(--navy));
}
.comments-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}
.comment-form,
.comments-list-panel{
  min-height:540px;
}
.comment-form{
  display:flex;
  flex-direction:column;
}
.comment-form>.panel-heading,
.comments-list-panel>.panel-heading{
  min-height:88px;
  padding-right:58px;
}
.comment-form label{
  min-width:0;
}
.comment-form textarea{
  min-height:205px;
}
.comment-form .form-actions{
  margin-top:auto;
  padding-top:8px;
  flex-wrap:wrap;
}
#comment-status{min-width:0;overflow-wrap:anywhere}
.comments-list-panel{
  display:flex;
  flex-direction:column;
}
.comments-list{
  flex:1;
  min-height:360px;
  max-height:640px;
  overflow:auto;
  padding-right:3px;
}
.empty-state{
  display:grid;
  min-height:300px;
  place-items:center;
  padding:30px 15px;
}

@media(max-width:980px){
  .two-column,
  .long-count-grid,
  .comments-grid,
  .visual-model-layout{
    grid-template-columns:1fr;
  }
  .two-column>.panel,
  .long-count-grid>.panel,
  .comments-grid>.panel{
    height:auto;
  }
  .two-column>.panel+.panel,
  .long-count-grid>.panel+.panel,
  .comments-grid>.panel+.panel{
    margin-top:0;
  }
  .comparison-row .panel-heading{min-height:0}
  .comment-form,
  .comments-list-panel{min-height:0}
  .comments-list{min-height:280px;max-height:520px}
  .document-toolbar{align-items:flex-start;flex-direction:column;padding-right:72px}
  .document-controls{justify-content:flex-start}
  .document-stage{min-height:640px;max-height:760px;padding:16px}
}

@media(max-width:620px){
  .section-bluewash:before,.comments-section:before{height:4px}
  .document-toolbar{padding:13px 62px 13px 13px}
  .document-title strong{font-size:.94rem}
  .document-controls{gap:5px}
  .document-controls button{min-height:34px;padding:6px 9px;font-size:.76rem}
  .document-stage{min-height:500px;max-height:660px;padding:10px}
  .document-footer{align-items:flex-start;flex-direction:column}
  .form-row{grid-template-columns:1fr}
  .comment-form>.panel-heading,
  .comments-list-panel>.panel-heading{min-height:0}
  .comments-list-panel .panel-heading{align-items:flex-start}
}
.comment-form[data-guide-key]{padding-top:24px}
@media(max-width:480px){.comment-form[data-guide-key]{padding-top:17px}}

/* v1.3 continuous Stella Nova academic-blue corridor
   Keeps the lower half of the explorer visually anchored to the original
   Stella Nova /al/here design language instead of dropping to white or pale blue. */
.section-academic-blue{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(circle at 10% 4%,rgba(56,174,228,.20),transparent 31%),
    radial-gradient(circle at 92% 96%,rgba(15,116,174,.24),transparent 34%),
    linear-gradient(135deg,#082d4b 0%,#0a4d7c 48%,#0a365a 100%);
  border-top:1px solid rgba(160,218,246,.16);
}
.section-academic-blue::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  opacity:.17;
  background-image:
    linear-gradient(30deg,transparent 24%,rgba(255,255,255,.13) 25%,rgba(255,255,255,.13) 26%,transparent 27%,transparent 74%,rgba(255,255,255,.09) 75%,rgba(255,255,255,.09) 76%,transparent 77%),
    linear-gradient(90deg,transparent 49%,rgba(255,255,255,.08) 50%,transparent 51%);
  background-size:64px 64px;
}
.section-academic-blue::after{
  content:"";
  position:absolute;
  inset:0 0 auto;
  z-index:-1;
  height:5px;
  background:linear-gradient(90deg,#54b9e9,#0d6ca8 48%,#54b9e9);
  box-shadow:0 1px 0 rgba(255,255,255,.18);
}
.section-academic-blue>.shell{position:relative;z-index:1;min-width:0}
.section-academic-blue .section-heading h2{color:#fff}
.section-academic-blue .section-heading p:last-child{color:#d7ebf7}
.section-academic-blue .section-heading .eyebrow{color:#8dd3fb}
.section-academic-blue .panel{
  color:var(--ink);
  background:rgba(255,255,255,.985);
  border-color:rgba(183,210,228,.95);
  box-shadow:0 22px 52px rgba(1,25,43,.24);
}
.section-academic-blue .panel-heading h3,
.section-academic-blue .panel h3{color:var(--navy)}
.section-academic-blue .panel-heading p,
.section-academic-blue .panel p{color:var(--muted)}
.section-academic-blue .attribution{color:#536d7d!important}

/* Subtle tonal variation while preserving one uninterrupted blue system. */
.academic-blue-dresden{
  background:
    radial-gradient(circle at 14% 10%,rgba(63,185,235,.20),transparent 34%),
    radial-gradient(circle at 88% 92%,rgba(19,101,157,.28),transparent 38%),
    linear-gradient(135deg,#082d4b 0%,#0b5688 52%,#083455 100%);
}
.academic-blue-references{
  background:
    radial-gradient(circle at 88% 12%,rgba(66,181,229,.18),transparent 30%),
    linear-gradient(145deg,#07304f 0%,#0a456f 50%,#082d4b 100%);
}
.academic-blue-methodology{
  background:
    radial-gradient(circle at 12% 86%,rgba(43,157,210,.19),transparent 34%),
    linear-gradient(135deg,#082d4b 0%,#0b4f7d 56%,#07304f 100%);
}
.comments-section.section-academic-blue{
  background:
    radial-gradient(circle at 84% 16%,rgba(70,189,237,.18),transparent 32%),
    radial-gradient(circle at 8% 92%,rgba(24,117,174,.22),transparent 35%),
    linear-gradient(140deg,#07304f 0%,#0a4a77 54%,#082d4b 100%);
  border-top:1px solid rgba(160,218,246,.16);
}
.comments-section.section-academic-blue::before{
  inset:0;
  height:auto;
  background-image:
    linear-gradient(30deg,transparent 24%,rgba(255,255,255,.13) 25%,rgba(255,255,255,.13) 26%,transparent 27%,transparent 74%,rgba(255,255,255,.09) 75%,rgba(255,255,255,.09) 76%,transparent 77%),
    linear-gradient(90deg,transparent 49%,rgba(255,255,255,.08) 50%,transparent 51%);
  background-size:64px 64px;
  opacity:.17;
}
.comments-section.section-academic-blue::after{
  content:"";
  position:absolute;
  inset:0 0 auto;
  z-index:-1;
  height:5px;
  background:linear-gradient(90deg,#54b9e9,#0d6ca8 48%,#54b9e9);
  box-shadow:0 1px 0 rgba(255,255,255,.18);
}

/* Reference library is now a deliberate panel instead of cards floating on a white field. */
.reference-library-panel{
  position:relative;
  padding:72px 22px 22px;
}
.reference-library-panel>.nova-guide-trigger{top:14px;right:14px}
.reference-library-panel .reference-list{padding:0}
.reference-library-panel .reference-card{
  background:linear-gradient(180deg,#fafdff 0%,#eef6fb 100%);
  border-color:#c7dce9;
  box-shadow:none;
}
.reference-library-panel .reference-card:hover{
  border-color:#74b8dc;
  box-shadow:0 10px 22px rgba(6,40,67,.09);
}

/* Keep the lower page panels crisp against the dark surround. */
.academic-blue-dresden .dresden-panel,
.academic-blue-dresden .venus-math-panel,
.academic-blue-methodology .document-viewer,
.academic-blue-comments .comment-form,
.academic-blue-comments .comments-list-panel{
  border:1px solid rgba(204,223,235,.98);
}
.academic-blue-methodology .document-viewer{background:#dce8ef}
.academic-blue-comments .comments-list-panel{background:#fff}
.academic-blue-comments .empty-state{color:#617786}

/* Remove legacy pale-band top rules where the new corridor is active. */
.section-academic-blue.section-bluewash::before,
.comments-section.section-academic-blue:before{height:auto}

@media(max-width:760px){
  .section-academic-blue::after,
  .comments-section.section-academic-blue::after{height:4px}
  .reference-library-panel{padding:64px 14px 14px}
}

/* ========================================================================== 
   v1.4 — unified Stella Nova deep-blue bento system
   Every learning module now uses the same visual language as the Xultun
   glyph-block guide: deep navy panels, restrained cyan highlights, inset
   bento cells, soft depth, and no color-band separators between sections.
   ========================================================================== */
main{
  background:
    radial-gradient(circle at 12% 18%,rgba(40,149,205,.11),transparent 28%),
    radial-gradient(circle at 88% 72%,rgba(31,119,176,.10),transparent 31%),
    linear-gradient(30deg,transparent 24%,rgba(255,255,255,.025) 25%,rgba(255,255,255,.025) 26%,transparent 27%,transparent 74%,rgba(255,255,255,.018) 75%,rgba(255,255,255,.018) 76%,transparent 77%),
    linear-gradient(180deg,#082f4f 0%,#062842 52%,#061f35 100%);
  background-size:auto,auto,64px 64px,auto;
}

.section-deep-system{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  color:#f5fbff;
  background:transparent!important;
  border:0!important;
}
.section-deep-system::before,
.section-deep-system::after,
.comments-section.section-deep-system::before,
.comments-section.section-deep-system::after{
  content:none!important;
  display:none!important;
}
.section-deep-system + .section-deep-system{
  margin-top:0;
}
.section-deep-system>.shell{
  position:relative;
  z-index:1;
  min-width:0;
}

/* Section titles now sit in the same blue system instead of on white bands. */
.section-deep-system .section-heading{
  max-width:920px;
  margin-bottom:34px;
}
.section-deep-system .section-heading h2,
.section-deep-system .section-heading.light h2{
  color:#fff;
  text-shadow:0 2px 18px rgba(0,13,24,.28);
}
.section-deep-system .section-heading p:last-child,
.section-deep-system .section-heading.light p:last-child{
  color:#cfe2ee;
}
.section-deep-system .section-heading .eyebrow,
.section-deep-system .section-heading.light .eyebrow{
  color:#7fd1f4;
}

/* Canonical panel: matches the Glyph-block guide panel. */
.section-deep-system .panel{
  color:#f3f9fd;
  background:
    linear-gradient(145deg,rgba(27,75,108,.97),rgba(18,55,83,.985));
  border:1px solid rgba(174,218,241,.20);
  box-shadow:
    0 24px 56px rgba(0,16,29,.28),
    inset 0 1px 0 rgba(255,255,255,.055);
}
.section-deep-system .panel:hover{
  border-color:rgba(174,218,241,.27);
}
.section-deep-system .panel-heading h3,
.section-deep-system .panel h3,
.section-deep-system .panel h4,
.section-deep-system .panel-heading label,
.section-deep-system .panel label,
.section-deep-system .field-label{
  color:#fff;
}
.section-deep-system .panel-heading p,
.section-deep-system .panel p,
.section-deep-system .panel figcaption,
.section-deep-system .panel small{
  color:#c9dde9;
}
.section-deep-system .panel .eyebrow{
  color:#82d2f5;
}
.section-deep-system .panel a,
.section-deep-system .text-button{
  color:#8bd7f7;
}
.section-deep-system .panel+.panel{
  margin-top:22px;
}

/* Evidence pills remain readable and consistent on navy. */
.section-deep-system .method-chip,
.section-deep-system .evidence{
  box-shadow:0 6px 18px rgba(0,18,31,.15);
}
.section-deep-system .method-chip:not(.reconstructed):not(.interpreted):not(.calculated){
  background:#e8f6fc;
  color:#0b5e91;
}

/* Shared inset bento cells. */
.section-deep-system :is(
  .component-strip span,
  .builder-result,
  .unit-ladder>div,
  .comparison-box,
  .comparison-box>div,
  .formula-grid>div,
  .annotation-facts>div,
  .line-guide button,
  .venus-equations span,
  .comment-card,
  .reference-card,
  .explanation-card,
  .cycle,
  .long-count-unit
){
  background:rgba(255,255,255,.055);
  border-color:rgba(176,216,238,.18);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}

/* Numerals and comparison tiles retain a pale canvas for the dark-blue SVGs,
   while the containing panel remains the canonical navy bento card. */
.section-deep-system :is(
  .numeral-card,
  .selected-symbol,
  .place-symbol,
  .zero-gallery figure,
  .nahua-symbols>div,
  .operand-card,
  .visual-model,
  .group-box,
  .division-group,
  .long-count-unit>div
){
  background:linear-gradient(180deg,#f9fcfe 0%,#eef6fa 100%);
  border-color:#bcd3e1;
  color:#0b456f;
}
.section-deep-system .numeral-card:hover,
.section-deep-system .numeral-card:focus,
.section-deep-system .numeral-card.active{
  border-color:#55b8e4;
  box-shadow:0 0 0 3px rgba(85,184,228,.22),0 10px 24px rgba(0,20,36,.18);
}
.section-deep-system .selected-numeral{
  border-top-color:rgba(176,216,238,.19);
}
.section-deep-system .selected-numeral h4{
  color:#fff;
}
.section-deep-system .selected-numeral p{
  color:#c9dde9;
}
.section-deep-system .component-strip span{
  color:#e9f7fd;
}

/* Builder and interaction surfaces. */
.section-deep-system .symbol-token{
  color:#eef9fe;
  background:rgba(255,255,255,.055);
  border-color:rgba(176,216,238,.19);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.section-deep-system .symbol-token:hover,
.section-deep-system .symbol-token:focus-visible{
  background:rgba(104,199,241,.12);
  border-color:#68c7f1;
  outline:none;
}
.section-deep-system .dot-token span,
.section-deep-system .bar-token span{
  background:#dff5ff;
}
.section-deep-system .builder-dropzone{
  color:#d2e7f2;
  background:rgba(2,28,47,.34);
  border-color:rgba(143,205,235,.42);
}
.section-deep-system .builder-dropzone.dragover{
  background:rgba(61,170,219,.12);
  border-color:#68c7f1;
}
.section-deep-system .builder-dropzone>p,
.section-deep-system .builder-result p{
  color:#bed6e4;
}
.section-deep-system .builder-result strong{
  color:#8bd7f7;
}

/* Forms remain high contrast, but are framed by dark bento cards. */
.section-deep-system input,
.section-deep-system select,
.section-deep-system textarea{
  color:#102e43;
  background:#f8fbfd;
  border-color:#b9cedb;
  box-shadow:inset 0 1px 2px rgba(4,40,65,.08);
}
.section-deep-system input:focus,
.section-deep-system select:focus,
.section-deep-system textarea:focus{
  border-color:#55b8e4;
  box-shadow:0 0 0 3px rgba(85,184,228,.24);
  outline:none;
}
.section-deep-system .segmented,
.section-deep-system .image-toggle{
  background:rgba(0,24,41,.32);
  border:1px solid rgba(176,216,238,.14);
}
.section-deep-system .segmented button,
.section-deep-system .image-toggle button{
  color:#c8deea;
}
.section-deep-system .segmented button.active,
.section-deep-system .image-toggle button.active{
  color:#0b456f;
  background:#fff;
  box-shadow:0 8px 18px rgba(0,16,29,.18);
}
.section-deep-system .equation-line{
  color:#eef9fe;
}
.section-deep-system .place-row .place-weight{
  color:#b8d1df;
}
.section-deep-system .place-row .place-name{
  color:#8bd7f7;
}

/* Zero and comparative bento rows. */
.section-deep-system .zero-gallery figcaption,
.section-deep-system .nahua-symbols span{
  color:#526a79;
}
.section-deep-system .nahua-symbols{
  color:#0b456f;
}
.section-deep-system .nahua-panel>p{
  color:#c9dde9;
}
.section-deep-system .caution-note{
  color:#f5e8c3!important;
  background:rgba(212,164,63,.13);
  border-left-color:#e2ad42;
  box-shadow:inset 0 0 0 1px rgba(226,173,66,.10);
}

/* Arithmetic bento system. */
.section-deep-system .score-card{
  background:rgba(2,26,44,.42);
  border:1px solid rgba(176,216,238,.18);
}
.section-deep-system .operand-card>span{
  color:#0c6095;
  background:#fff;
  border-color:#bdd4e2;
}
.section-deep-system .operator-mark{
  color:#dff5ff;
}
.section-deep-system .result-card{
  background:linear-gradient(180deg,#edf8fd,#dceef7);
}
.section-deep-system .visual-model{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}
.section-deep-system .explanation-card{
  color:#eef8fd;
  background:rgba(49,164,220,.10);
  border-left-color:#59c3ef;
}
.section-deep-system .explanation-card h4{
  color:#fff;
}
.section-deep-system .explanation-card p{
  color:#c9dde9;
}
.section-deep-system .explanation-card .equation{
  color:#8bd7f7;
}
.section-deep-system .group-box,
.section-deep-system .division-group{
  color:#0b456f;
}
.section-deep-system .remainder-box{
  color:#5e4c20;
  background:#fff8df;
}

/* Long Count and calendar cells. */
.section-deep-system .unit-ladder span,
.section-deep-system .unit-ladder strong,
.section-deep-system .comparison-box strong{
  color:#fff;
}
.section-deep-system .unit-ladder small,
.section-deep-system .comparison-box p{
  color:#bed5e2;
}
.section-deep-system .unit-ladder .modified{
  color:#fff6d9;
  background:rgba(214,166,69,.13);
  border-color:rgba(231,185,91,.45);
}
.section-deep-system .long-count-unit{
  color:#fff;
}
.section-deep-system .long-count-unit strong{
  color:#fff;
}
.section-deep-system .long-count-unit span{
  color:#8bd7f7;
}
.section-deep-system .long-count-unit small{
  color:#c4dae6;
}
.section-deep-system .cycle{
  color:#fff;
  border-color:rgba(104,199,241,.24);
}
.section-deep-system .cycle strong{
  color:#fff;
}
.section-deep-system .cycle span{
  color:#8bd7f7;
}
.section-deep-system .cycle small{
  color:#c4dae6;
}

/* Xultun remains the canonical reference style. */
.section-deep-system .dark-panel{
  background:linear-gradient(145deg,rgba(27,75,108,.97),rgba(18,55,83,.985));
  border-color:rgba(174,218,241,.20);
}
.section-deep-system .xultun-blocks button{
  background:rgba(255,255,255,.05);
  border-color:rgba(176,216,238,.22);
}
.section-deep-system .xultun-blocks button.active,
.section-deep-system .xultun-blocks button:hover{
  color:#0a3859;
  background:#fff;
}
.section-deep-system .case-detail{
  border-top-color:rgba(176,216,238,.18);
}

/* Dresden now uses the same outer card and nested bento treatment. */
.section-deep-system .dresden-panel{
  background:linear-gradient(145deg,rgba(27,75,108,.97),rgba(18,55,83,.985));
}
.section-deep-system .dresden-toolbar,
.section-deep-system .document-toolbar{
  background:rgba(1,28,48,.45);
  border-bottom-color:rgba(176,216,238,.18);
}
.section-deep-system .dresden-layout{
  background:rgba(0,23,39,.18);
}
.section-deep-system .codex-viewer{
  background:#d7d0bf;
}
.section-deep-system .dresden-annotation{
  color:#f3f9fd;
  background:rgba(255,255,255,.045);
  border-left-color:rgba(176,216,238,.18);
}
.section-deep-system .dresden-annotation h3{
  color:#fff;
}
.section-deep-system .dresden-annotation p{
  color:#c9dde9;
}
.section-deep-system .annotation-facts>div{
  color:#dcecf5;
  border-left-color:#58c1ef;
}
.section-deep-system .annotation-facts strong{
  color:#fff;
}
.section-deep-system .line-guide button{
  color:#dcecf5;
}
.section-deep-system .line-guide button.active,
.section-deep-system .line-guide button:hover{
  color:#fff;
  background:rgba(77,181,228,.14);
  border-color:#68c7f1;
}
.section-deep-system .line-guide b{
  color:#8bd7f7;
}
.section-deep-system .dark-text,
.section-deep-system .attribution{
  color:#bdd5e2!important;
}
.section-deep-system .venus-phases strong{
  color:#fff;
}
.section-deep-system .venus-phases small{
  color:#bfd6e3;
}
.section-deep-system .venus-phases>div>span{
  background:linear-gradient(180deg,#5dc8f2,#1380b8);
  box-shadow:0 8px 18px rgba(0,20,36,.20);
}
.section-deep-system .venus-equations span{
  color:#eaf7fd;
}

/* References are real bento cards rather than pale cards floating on a band. */
.section-deep-system .reference-library-panel{
  padding:70px 20px 20px;
}
.section-deep-system .reference-card{
  color:#edf8fd;
  background:linear-gradient(145deg,rgba(255,255,255,.065),rgba(255,255,255,.035));
  border-color:rgba(176,216,238,.18);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 12px 28px rgba(0,17,30,.12);
}
.section-deep-system .reference-card:hover{
  border-color:rgba(104,199,241,.54);
  background:rgba(77,181,228,.10);
  box-shadow:0 16px 34px rgba(0,17,30,.18);
}
.section-deep-system .reference-card .ref-category,
.section-deep-system .reference-card a{
  color:#8bd7f7;
}
.section-deep-system .reference-card h3{
  color:#fff;
}
.section-deep-system .reference-card p{
  color:#c4dae6;
}

/* Methodological viewer: dark shell, white document page only. */
.section-deep-system .document-viewer{
  background:linear-gradient(145deg,rgba(27,75,108,.97),rgba(18,55,83,.985));
}
.section-deep-system .document-stage{
  background:
    linear-gradient(45deg,rgba(255,255,255,.025) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.025) 75%),
    linear-gradient(45deg,rgba(255,255,255,.025) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.025) 75%),
    rgba(0,24,41,.34);
  background-size:28px 28px;
  background-position:0 0,14px 14px;
}
.section-deep-system .document-page-strip,
.section-deep-system .document-footer{
  color:#c3dae7;
  background:rgba(1,28,48,.40);
  border-top-color:rgba(176,216,238,.17);
}
.section-deep-system .document-page-strip button{
  color:#e4f4fb;
  background:rgba(255,255,255,.055);
  border-color:rgba(176,216,238,.22);
}
.section-deep-system .document-page-strip button.active,
.section-deep-system .document-page-strip button:hover,
.section-deep-system .document-page-strip button:focus-visible{
  color:#073452;
  background:#fff;
  border-color:#fff;
}
.section-deep-system .document-footer a{
  color:#8bd7f7;
}

/* Comments use the same pair of dark bento cards. */
.comments-section.section-deep-system{
  background:transparent!important;
}
.section-deep-system .comment-form,
.section-deep-system .comments-list-panel{
  min-height:540px;
}
.section-deep-system .comment-card{
  color:#eaf6fc;
}
.section-deep-system .comment-card strong{
  color:#fff;
}
.section-deep-system .comment-card small,
.section-deep-system .comment-card p,
.section-deep-system .empty-state{
  color:#c4dae6;
}

/* Buttons and Nova triggers harmonize with the dark cards. */
.section-deep-system .button.compact{
  background:linear-gradient(180deg,#1684c6,#0d679f);
  color:#fff;
  box-shadow:0 8px 18px rgba(0,20,36,.18);
}
.section-deep-system .button.compact.ghost,
.section-deep-system .button.ghost{
  color:#dff5ff;
  background:rgba(255,255,255,.045);
  border-color:rgba(176,216,238,.25);
}
.section-deep-system .button.compact.ghost:hover,
.section-deep-system .button.ghost:hover{
  background:rgba(104,199,241,.13);
  border-color:#68c7f1;
}
.section-deep-system .nova-guide-trigger{
  background:rgba(255,255,255,.96);
  border-color:rgba(255,255,255,.72);
  box-shadow:0 10px 28px rgba(0,16,29,.27);
}

/* Remove the inherited bright separators and old lower-page color variants. */
.academic-blue-dresden,
.academic-blue-references,
.academic-blue-methodology,
.academic-blue-comments,
.section-dark,
.section-tint,
.section-bluewash,
.section-white{
  background:transparent!important;
  border:0!important;
}

@media(max-width:980px){
  .section-deep-system .dresden-annotation{
    border-left:0;
    border-top:1px solid rgba(176,216,238,.18);
  }
}

@media(max-width:760px){
  .section-deep-system{
    padding-top:62px;
    padding-bottom:62px;
  }
  .section-deep-system .panel{
    padding:20px;
  }
  .section-deep-system .dresden-panel,
  .section-deep-system .document-viewer{
    padding:0;
  }
  .section-deep-system .reference-library-panel{
    padding:64px 14px 14px;
  }
}

@media(max-width:480px){
  .section-deep-system{
    padding-top:52px;
    padding-bottom:52px;
  }
  .section-deep-system .section-heading{
    margin-bottom:25px;
  }
  .section-deep-system .panel{
    border-radius:15px;
  }
}

/* The four-step orientation row is part of the same visual system. */
.orientation-band{
  color:#edf8fd;
  background:#082b48;
  border-top:1px solid rgba(176,216,238,.10);
  border-bottom:1px solid rgba(176,216,238,.14);
  box-shadow:0 14px 28px rgba(0,16,29,.16);
}
.orientation-inner{
  gap:10px;
  padding:14px 0;
}
.orientation-inner>div{
  border:1px solid rgba(176,216,238,.16)!important;
  border-radius:13px;
  background:linear-gradient(145deg,rgba(255,255,255,.065),rgba(255,255,255,.035));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.orientation-inner span{
  color:#8bd7f7;
  border-color:#68c7f1;
  background:rgba(2,28,47,.26);
}
.orientation-inner strong{color:#fff}
.orientation-inner small{color:#c2d9e6}
@media(max-width:760px){
  .orientation-inner{gap:8px;padding:10px 0}
}

@media(max-width:620px){
  .section-deep-system .panel-heading{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }
  .section-deep-system .panel[data-guide-key]>.panel-heading:first-of-type{
    padding-right:58px;
  }
  .section-deep-system .panel-heading .method-chip,
  .section-deep-system .panel-heading .score-card,
  .section-deep-system .panel-heading>.text-button{
    align-self:flex-start;
  }
  .section-deep-system .method-chip{
    white-space:normal;
    max-width:calc(100% - 2px);
    line-height:1.25;
  }
  .section-deep-system .comments-list-panel .panel-heading>.text-button{
    margin-top:0;
  }
}

/* ========================================================================== 
   v1.5 — hero correction, AJ–TZ’IHB–ba attribution, builder contrast,
   and a single spacing rhythm across the explorer.
   ========================================================================== */

/* The hero now uses the restrained Stella Nova navy family rather than the
   brighter cyan-blue gradient that had drifted from the reference styling. */
.hero{
  background:
    radial-gradient(circle at 88% 16%,rgba(65,180,226,.14),transparent 34%),
    radial-gradient(circle at 12% 92%,rgba(29,123,174,.10),transparent 32%),
    linear-gradient(135deg,#082d4b 0%,#0a3a5d 54%,#0b486d 100%);
  border-bottom:1px solid rgba(175,218,240,.13);
}
.hero-pattern{opacity:.11}
.hero-inner{
  grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr);
  gap:42px;
  align-items:center;
}
.hero-copy{min-width:0}
.hero-support{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(245px,.88fr) minmax(285px,1.12fr);
  gap:18px;
  align-items:stretch;
}
.hero-thesis{
  min-width:0;
  max-width:none;
  padding:29px 22px 22px;
  border-radius:18px;
  background:linear-gradient(145deg,rgba(4,31,51,.56),rgba(10,54,84,.42));
  box-shadow:0 22px 48px rgba(0,14,26,.23),inset 0 1px 0 rgba(255,255,255,.045);
}
.hero-thesis>p{
  font-size:clamp(1.22rem,1.65vw,1.48rem);
  margin:8px 0 7px;
}
.hero-thesis>small{display:block;line-height:1.4}
.scope-grid{
  display:grid;
  gap:8px;
  margin-top:20px;
}
.hero-thesis .scope-grid .scope-item{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid rgba(176,216,238,.12);
  border-radius:10px;
  background:linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.04));
  color:#e7f5fb;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
.hero-thesis .scope-grid .scope-icon,
.hero-thesis .scope-grid .scope-copy{
  display:block;
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  color:inherit;
}
.hero-thesis .scope-grid .scope-icon{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid rgba(116,205,244,.34);
  border-radius:10px;
  background:rgba(42,153,207,.10);
}
.hero-thesis .scope-grid .scope-icon svg{
  width:24px;
  height:24px;
  fill:none;
  stroke:#91dcfa;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.hero-thesis .scope-grid .scope-icon svg circle{fill:#91dcfa;stroke:none}
.hero-thesis .scope-grid .scope-copy strong{
  display:block;
  color:#fff;
  font-size:.82rem;
  line-height:1.18;
}
.hero-thesis .scope-grid .scope-copy small{
  display:block;
  margin-top:3px;
  color:#c9e0ec;
  font-size:.70rem;
  line-height:1.28;
}
.hero-glyph-card{
  min-width:0;
  margin:0;
  padding:18px 17px 15px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border:1px solid rgba(176,216,238,.20);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(7,38,61,.60),rgba(16,65,96,.42));
  box-shadow:0 22px 48px rgba(0,14,26,.23),inset 0 1px 0 rgba(255,255,255,.045);
}
.hero-glyph-stage{
  min-height:220px;
  display:grid;
  place-items:center;
  padding:3px 8px 10px;
}
.hero-glyph-stage img{
  width:min(100%,330px);
  max-height:255px;
  object-fit:contain;
  filter:drop-shadow(0 14px 23px rgba(0,0,0,.25));
}
.hero-glyph-card figcaption{
  padding-top:12px;
  border-top:1px solid rgba(176,216,238,.15);
  color:#c7dce8;
  font-size:.68rem;
  line-height:1.45;
}
.hero-glyph-card figcaption i{color:#f5fbff}

/* White construction pieces on the dark work surface. */
.section-deep-system .builder-dot span,
.section-deep-system .builder-bar span,
.section-deep-system .piece-dot,
.section-deep-system .piece-bar{
  background:#f1fbff!important;
  box-shadow:0 2px 8px rgba(86,198,239,.22);
}
.section-deep-system .zero-token img,
.section-deep-system .builder-zero img{
  object-fit:contain;
  filter:drop-shadow(0 2px 7px rgba(86,198,239,.18));
}
.section-deep-system .builder-piece:focus-visible{
  outline:2px solid #8bd7f7;
  outline-offset:4px;
  border-radius:8px;
}

/* One deliberate layout rhythm. Section boundaries are closer than before,
   while every adjacent panel or bento grid uses the same gap. */
.section-deep-system{
  --mme-panel-gap:24px;
  padding-top:62px;
  padding-bottom:62px;
}
.section-deep-system + .section-deep-system{padding-top:16px}
.section-deep-system .section-heading{margin-bottom:30px}
.section-deep-system .two-column,
.section-deep-system .xultun-layout,
.section-deep-system .long-count-grid,
.section-deep-system .comments-grid{
  gap:var(--mme-panel-gap);
}
.section-deep-system .two-column{margin-top:var(--mme-panel-gap)}
.section-deep-system .cycle-panel,
.section-deep-system .venus-math-panel{margin-top:var(--mme-panel-gap)}
.section-deep-system .panel+.panel{margin-top:var(--mme-panel-gap)}
.section-deep-system :is(.two-column,.xultun-layout,.long-count-grid,.comments-grid)>.panel+.panel{margin-top:0}

@media(max-width:1100px){
  .hero-inner{grid-template-columns:1fr;gap:30px}
  .hero-copy{max-width:900px}
  .hero-support{grid-template-columns:minmax(250px,.82fr) minmax(300px,1.18fr)}
}
@media(max-width:760px){
  .hero{padding:54px 0 46px}
  .hero-support{grid-template-columns:1fr}
  .hero-thesis,.hero-glyph-card{width:100%}
  .hero-glyph-stage{min-height:190px}
  .hero-glyph-stage img{width:min(82%,300px);max-height:220px}
  .section-deep-system{
    --mme-panel-gap:18px;
    padding-top:48px;
    padding-bottom:48px;
  }
  .section-deep-system + .section-deep-system{padding-top:12px}
  .section-deep-system .section-heading{margin-bottom:24px}
}
@media(max-width:480px){
  .hero-thesis{padding:26px 18px 18px}
  .hero-glyph-card{padding:15px 14px 13px}
  .hero-glyph-stage{min-height:165px}
  .hero-glyph-card figcaption{font-size:.64rem}
  .hero-thesis .scope-grid .scope-item{grid-template-columns:34px minmax(0,1fr)}
  .hero-thesis .scope-grid .scope-icon{width:34px;height:34px}
  .section-deep-system{
    padding-top:44px;
    padding-bottom:44px;
  }
  .section-deep-system + .section-deep-system{padding-top:8px}
}
