/* APU reading template; Material/Skyzai colours come from the admitted gold carrier. */
:root[data-apu-template] {
  --g2-void:var(--md-sys-color-background); --g2-field:var(--md-sys-color-surface);
  --g2-surface:var(--md-sys-color-surface-container); --g2-surface-2:var(--md-sys-color-surface-variant);
  --g2-bone:var(--md-sys-color-on-surface); --g2-bone-muted:var(--md-sys-color-on-surface-variant); --g2-bone-faint:var(--md-sys-color-on-surface-variant);
  --g2-rule:var(--md-sys-color-outline-variant); --g2-rule-strong:var(--md-sys-color-outline);
  --g2-actual:var(--md-sys-color-primary); --g2-sans:'Google Sans Flex',sans-serif; --g2-display:'Google Sans Flex',sans-serif;
  --g2-mono:'Google Sans Code',monospace; --g2-reading:720px; --g2-nav-h:72px;
  --shape-full:999px; --shape-medium:12px;
  --m3-body-medium:var(--m3-type-body-medium);
  --m3-body-large:var(--m3-type-body-large);
  --m3-title-medium:var(--m3-type-title-medium);
  --m3-title-large:var(--m3-type-title-large);
  --m3-label-large:var(--m3-type-label-large);
  color-scheme:light dark; scroll-padding-top:96px;
}
html[data-apu-template] body { margin:0; padding:0 0 124px!important; background:var(--md-sys-color-background); color:var(--md-sys-color-on-surface); font:var(--m3-type-body-large); letter-spacing:var(--m3-tracking-body-large); }
html[data-apu-template] :is(.g2-nav,.site-header,.topbar,.site-head,body>.header,.g2-atlas-rail,.g2-skip,.skip-link) { display:none; }
html[data-apu-template] a { text-underline-offset:4px; }
.apu-site-header { position:sticky; top:0; z-index:40; min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:12px 32px; background:var(--md-sys-color-background); border-bottom:1px solid var(--md-sys-color-outline-variant); }
.apu-site-brand { display:flex; align-items:center; gap:16px; color:var(--md-sys-color-on-surface)!important; text-decoration:none; min-height:48px; }
.apu-site-brand span { font-size:24px; white-space:nowrap; } .apu-site-brand strong { font:var(--m3-type-title-medium); font-weight:var(--m3-type-emphasized-weight-medium); letter-spacing:var(--m3-tracking-title-medium); }
.apu-site-actions { display:flex; align-items:center; gap:16px; font:var(--m3-type-label-large); letter-spacing:var(--m3-tracking-label-large); }
.apu-site-actions>a,.apu-static-menu summary { min-height:48px; display:flex; align-items:center; text-decoration:none; color:var(--md-sys-color-on-surface); }
.apu-site-actions select { width:112px; min-height:48px; padding:8px; border:1px solid var(--md-sys-color-outline-variant); border-radius:12px; background:var(--md-sys-color-surface); color:var(--md-sys-color-on-surface); font:inherit; }
.apu-static-menu { position:relative; } .apu-static-menu nav { position:absolute; right:0; top:52px; width:220px; padding:12px; background:var(--md-sys-color-surface); border:1px solid var(--md-sys-color-outline-variant); border-radius:16px; }
.apu-static-menu nav a { display:flex; align-items:center; min-height:48px; padding:0 12px; color:var(--md-sys-color-on-surface); }
.apu-skip { position:fixed; top:-100px; left:16px; padding:16px; background:var(--md-sys-color-surface); z-index:100; } .apu-skip:focus { top:12px; }
.apu-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
html[data-apu-template] :is(a,button,input,select,summary,[tabindex]):focus-visible { outline:3px solid var(--md-sys-color-primary); outline-offset:3px; }
.apu-bottom-dock { position:fixed; z-index:60; bottom:max(20px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:min(720px,calc(100% - 32px)); display:flex; align-items:center; gap:8px; min-height:72px; padding:8px 12px; background:var(--md-sys-color-surface-container); border:1px solid var(--md-sys-color-outline-variant); border-radius:28px; box-shadow:var(--md-sys-elevation-level-1); }
#em-apu-menu { flex:none; } #em-apu-search { flex:1; min-width:0; }
.apu-enhanced .apu-dock-fallback { display:none; } .apu-dock-fallback { min-height:48px; display:flex; align-items:center; padding:0 16px; }
.apu-dock-caption { font:var(--m3-type-label-small); letter-spacing:var(--m3-tracking-label-small); color:var(--md-sys-color-on-surface-variant); padding-right:8px; }
.apu-dock-form { display:flex; align-items:center; gap:8px; }
.apu-dock-form input { width:100%; min-width:0; min-height:48px; border:0; background:transparent; color:var(--md-sys-color-on-surface); font:var(--m3-type-body-large); letter-spacing:var(--m3-tracking-body-large); padding:8px; }
.apu-dock-form button,.skyzai-apu-drawer-trigger { width:48px!important; height:48px!important; min-width:48px; display:grid; place-items:center; border:0; border-radius:50%; background:var(--md-sys-color-primary); color:var(--md-sys-color-on-primary); cursor:pointer; }
.apu-dock-form svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; }
.em-apu-drawer { font:var(--m3-body-medium); letter-spacing:var(--m3-tracking-body-medium); }
.em-apu-drawer :is(.skyzai-apu-drawer__tab,.skyzai-apu-drawer__close,.skyzai-apu-outline__row,.skyzai-apu-drawer__link) { min-height:48px; }
.em-apu-drawer .skyzai-apu-outline__label a { display:block; color:inherit; text-decoration:none; }
.em-apu-query { display:block; width:100%; min-height:56px; margin:8px 0 24px; padding:12px 16px; border:1px solid var(--md-sys-color-outline); border-radius:12px; font:inherit; color:var(--md-sys-color-on-surface); background:var(--md-sys-color-surface); }
.em-apu-results { list-style:none; margin:0; padding:0; }
.em-apu-results li { padding:20px 8px; border-top:1px solid var(--md-sys-color-outline-variant); } .em-apu-results a { display:block; color:var(--md-sys-color-primary); font:var(--m3-title-medium); letter-spacing:var(--m3-tracking-title-medium); }
.em-apu-results p { margin:12px 0 0; } .em-apu-result-page { display:block; font:var(--m3-type-body-small); letter-spacing:var(--m3-tracking-body-small); color:var(--md-sys-color-on-surface-variant); margin-bottom:8px; }
.em-apu-empty,.em-apu-count { padding:8px; color:var(--md-sys-color-on-surface-variant); overflow-wrap:anywhere; }
.em-apu-preferences { border:0; padding:16px; } .em-apu-preferences label { display:flex; gap:12px; align-items:center; min-height:48px; }
.em-apu-chat-panel { height:min(620px,62vh); } .em-apu-chat-panel>.skyzai-apu { height:100%; }
html[data-apu-template] :is(.reader-shell,.reading,.article,.prose) { max-width:760px; margin-inline:auto; }
html[data-apu-template] :is(.g2-main,.reader-shell,main) { padding-top:0; }
html[data-apu-template] h1 { font:var(--m3-type-display-large); letter-spacing:var(--m3-tracking-display-large); } html[data-apu-template] h2 { font:var(--m3-type-headline-large); letter-spacing:var(--m3-tracking-headline-large); }
.apu-home-hero { max-width:980px; margin:auto; text-align:center; padding:80px 24px 64px; }
.apu-home-hero h1 { font:var(--m3-type-display-large); letter-spacing:var(--m3-tracking-display-large); margin:24px 0; }
.apu-home-glyphs { font-size:clamp(40px,6vw,72px); color:var(--md-sys-color-primary); letter-spacing:.12em; }
.apu-home-hero .apu-lead { max-width:620px; margin:0 auto 32px; font:var(--m3-type-headline-small); letter-spacing:var(--m3-tracking-headline-small); }
.apu-button { display:inline-flex; align-items:center; justify-content:center; min-height:56px; padding:12px 24px; border-radius:28px; background:var(--md-sys-color-primary); color:var(--md-sys-color-on-primary)!important; text-decoration:none; font:var(--m3-type-label-large); font-weight:var(--m3-type-emphasized-weight-medium); letter-spacing:var(--m3-tracking-label-large); }
.apu-home-section { max-width:980px; margin:auto; padding:56px 24px; }
.apu-home-section>h2 { font:var(--m3-type-headline-large); letter-spacing:var(--m3-tracking-headline-large); }
.apu-home-section>p { max-width:720px; font:var(--m3-type-body-large); letter-spacing:var(--m3-tracking-body-large); }
.apu-curriculum { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.apu-curriculum a { display:flex; flex-direction:column; gap:16px; padding:24px; background:var(--md-sys-color-surface-container); border-radius:16px; color:var(--md-sys-color-on-surface); text-decoration:none; min-height:220px; }
.apu-curriculum a:hover { box-shadow:var(--md-sys-elevation-level-1); } .apu-curriculum strong { font:var(--m3-type-title-large); font-weight:var(--m3-type-emphasized-weight-regular); letter-spacing:var(--m3-tracking-title-large); } .apu-curriculum p { font:var(--m3-type-body-large); letter-spacing:var(--m3-tracking-body-large); margin:0; } .apu-curriculum small { color:var(--md-sys-color-on-surface-variant); font:var(--m3-type-body-small); letter-spacing:var(--m3-tracking-body-small); }
.apu-home-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; padding:0; list-style:none; } .apu-home-steps li { padding:20px; border:1px solid var(--md-sys-color-outline-variant); border-radius:12px; } .apu-home-steps strong { display:block; margin-bottom:12px; }
html[data-apu-template] .g2-footer { background:var(--md-sys-color-surface); }
@media(max-width:680px) {
 .apu-site-header { padding:8px 16px; gap:8px; } .apu-site-brand { gap:8px; } .apu-site-brand span { font-size:18px; }
 .apu-site-actions { gap:12px; } .apu-site-actions>a,.apu-site-actions select { display:none; }
 .apu-dock-caption { display:none; } .apu-home-hero { padding-top:56px; } .apu-curriculum,.apu-home-steps { grid-template-columns:1fr; } .apu-curriculum a { min-height:0; } .apu-home-section { padding:36px 22px; }
 .apu-bottom-dock { bottom:max(12px,env(safe-area-inset-bottom)); width:calc(100% - 24px); }
 .apu-dock-form input { font:var(--m3-type-body-medium); letter-spacing:var(--m3-tracking-body-medium); } html[data-apu-template] body { padding-bottom:112px!important; }
 html[data-apu-template] .apu-home-hero h1 { font:var(--m3-type-display-medium); letter-spacing:var(--m3-tracking-display-medium); }
}
@media(prefers-reduced-motion:reduce) { html[data-apu-template] { scroll-behavior:auto; } }
@media(forced-colors:active) { .apu-button,.apu-bottom-dock,.apu-site-header,.apu-curriculum a { border:1px solid CanvasText; } }
html[data-apu-template] .apu-home-hero h1 { max-width:none; width:auto; margin:24px auto; }
html[data-apu-template] .apu-home-section>h2 { max-width:none; }
.apu-full-atlas>summary { font:var(--m3-type-title-large); font-weight:var(--m3-type-emphasized-weight-regular); letter-spacing:var(--m3-tracking-title-large); min-height:56px; padding:16px 0; cursor:pointer; }
.apu-full-atlas .g2-shell { width:100%; } .apu-full-atlas .g2-atlas-rail { display:none; }
.apu-full-atlas .g2-hero { display:block; padding-top:32px; } .apu-full-atlas .g2-hero__context { display:block; }
html[data-apu-template] { --ink:var(--md-sys-color-on-surface); --ink-soft:var(--md-sys-color-on-surface-variant); --ink-faint:var(--md-sys-color-on-surface-variant); --bg2:var(--md-sys-color-surface-container); --panel:var(--md-sys-color-surface-variant); --rule-soft:var(--md-sys-color-outline-variant); }
html[data-apu-template] .book-shell { display:block; max-width:800px; margin:auto; }
html[data-apu-template] .reading { max-width:800px; padding:48px 24px; margin:auto; }
html[data-apu-template] .reading-inner { max-width:720px; margin:auto; }
html[data-apu-template] .apu-book-fallback { position:static; height:auto; border:0; padding:24px; }
html[data-apu-template].apu-enhanced .apu-book-fallback { display:none; }
.apu-home-hero>p:not(.apu-home-glyphs):not(.apu-lead) { max-width:660px; margin-left:auto; margin-right:auto; }
html[data-apu-template] { --serif:'Google Sans Flex',sans-serif; --sans:'Google Sans Flex',sans-serif; --mono:'Google Sans Code',monospace; }
