/* Paper grid and registration marks, tinted to the academy palette. */
:root {
  --map-fine:#59499907;--map-line:#5c489514;--map-cross:#64539845;
  --map-glow:#cdc0f638;--map-bg:#f3f2f8;--nav-glass:rgba(246,244,252,.8);
  --nav-line:#68529638;--nav-shadow:#3b275d13;--nav-text:#373245;--nav-selected:#e6dff3;
}
:root[data-theme=dark] {
  --map-fine:#cfc1ff05;--map-line:#cfc1ff0d;--map-cross:#e4d4ff42;
  --map-glow:#69509932;--map-bg:#191821;--nav-glass:rgba(39,36,51,.8);
  --nav-line:#c0a9f330;--nav-shadow:#08071140;--nav-text:#efedf7;--nav-selected:#554a67;
}
body {isolation:isolate;background:transparent}
body::before {
  content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;
  background:
    linear-gradient(var(--map-line) 1px,transparent 1px) 0 40px/80px 80px,
    linear-gradient(90deg,var(--map-line) 1px,transparent 1px) 40px 0/80px 80px,
    linear-gradient(var(--map-fine) 1px,transparent 1px) 0 0/8px 8px,
    linear-gradient(90deg,var(--map-fine) 1px,transparent 1px) 0 0/8px 8px,
    radial-gradient(ellipse at 86% 84%,var(--map-glow),transparent 61%),var(--map-bg);
}
body::after {
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:var(--map-cross);
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cpath d='M40.5 35v11M35 40.5h11' stroke='black'/%3E%3C/svg%3E") 0 0/320px 320px;
}
.masthead, :root[data-theme=dark] .masthead {position:relative;top:auto;background:transparent;z-index:24;transform:none}
.academy-header {
  display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;gap:clamp(6px,1.2vw,18px);
  width:min(1280px,92%);min-height:0;margin:10px auto 14px;padding:7px 12px;
  color:var(--nav-text);border:1px solid var(--nav-line);border-radius:22px;
  background:var(--nav-glass);box-shadow:0 4px 18px var(--nav-shadow);
}
.academy-header .brand {gap:6px}
.academy-header .brand-reveal {width:40px;height:40px}
.academy-header .brand b {font-size:24px}
.academy-header .brand > i,.academy-header .brand > span:last-child {display:none}
.switch-slot {min-width:0;height:46px;align-self:center}
.academy-header .section-switcher {
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;align-items:stretch;
  width:100%;height:46px;margin:0;padding:0;border:0;border-radius:16px;box-sizing:border-box;
  color:var(--nav-text);background:transparent;box-shadow:none;
  transition:opacity .2s ease,translate .22s ease;
}
.academy-header .section-switcher a {
  display:flex;gap:clamp(4px,.6vw,9px);min-width:0;min-height:44px;align-items:center;justify-content:center;
  padding:4px;color:inherit;font-size:clamp(12px,.98vw,15px);text-decoration:none;border-radius:12px;
}
.section-switcher svg {flex:none;width:16px;height:16px}
:root[data-theme] .academy-header .section-switcher {background:transparent}
:root[data-theme] .academy-header .section-switcher a {background:transparent;box-shadow:none;transition:color .22s ease}
:root[data-theme] .academy-header .section-switcher a:is([aria-current=page],:hover) {
  color:var(--accent);background:transparent;box-shadow:none
}
@media(prefers-reduced-motion:no-preference){
  .academy-header .section-switcher a svg {transition:transform .22s cubic-bezier(.22,.75,.25,1)}
  .academy-header .section-switcher a:hover svg {transform:translateY(-1px) scale(1.08)}
}
.academy-header .header-tools {display:flex;align-items:center;gap:clamp(6px,.7vw,12px)}
.academy-header .header-tools::before {content:"";flex:none;width:1px;height:36px;background:color-mix(in srgb,var(--nav-text) 25%,transparent)}
@media(max-width:600px){.academy-header .header-tools::before{height:26px}}
.academy-header .header-tools nav {margin:0}
.academy-header .header-tools a.instructor-link {display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 16px;border:1px solid var(--nav-line);border-radius:18px;color:var(--nav-text);background:var(--nav-selected);font-size:14px;font-weight:650;line-height:1.1;text-decoration:none;transition:background .18s,color .18s}
.academy-header .header-tools a.instructor-link:hover {background:var(--ink);color:var(--reading-sheet)}
.profile-fields .action-sounds {display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;padding:6px 0;border:0;background:transparent;color:inherit;font-size:14px;cursor:pointer}
.sound-track {position:relative;width:33px;height:20px;border-radius:20px;background:var(--muted)}
.sound-track::after {content:"";position:absolute;inset:3px auto 3px 3px;border-radius:50%;width:14px;background:white;transition:transform .16s ease}
.action-sounds[aria-checked=true] .sound-track {background:var(--accent)}
.action-sounds[aria-checked=true] .sound-track::after {transform:translateX(13px)}
@media(max-width:620px){
  body:has(#admin) header .header-tools {grid-column:2;grid-row:1;display:flex;align-items:center;gap:4px}
}
@media(max-width:400px){
  body:has(#admin) header .brand i,body:has(#admin) header .brand > span:last-child {display:none}
}
.academy-header .brand-reveal .brand-reveal__mount {display:block}
.brand-reveal:has(.academy-glass) .brand-glyph {visibility:hidden}
.academy-search {margin:0}
.hero .academy-search {padding:0;margin-top:clamp(14px,2vw,24px)}
.hero .academy-search .search {background:#fff;color:#29253c;width:min(100%,510px);min-height:56px}
.hero .academy-search .search input {color:#231f32;font-size:16px}
.hero .academy-search .lens {color:#635685}
#search-home:empty {display:none}
#search-home:not(:empty) {padding-top:8px}
#law-search-slot .academy-search {padding:0;width:100%}
#law-search-slot .search {width:100%}
@media(max-width:920px){
  .academy-header{grid-template-columns:1fr auto;gap:4px 8px;padding:5px 8px;align-items:center}
  .academy-header .header-tools {grid-column:2;grid-row:1}
  .switch-slot{grid-column:1/-1;grid-row:2}
  .academy-header .section-switcher a{font-size:13px}
}
@media(max-width:560px){
  .academy-header{width:96%;padding-inline:6px;border-radius:16px}
  .academy-header .section-switcher a{flex-direction:column;gap:2px;padding:2px 0;font-size:clamp(9px,2.6vw,12px)}
  .academy-header .section-switcher svg{width:15px;height:15px}
  .academy-header .brand-reveal{width:32px;height:32px}
  .academy-header .brand b{font-size:21px}
}
@media(prefers-reduced-motion:reduce){.academy-header .section-switcher{transition:none}}

:root {--academy-font:"Segoe UI",system-ui,-apple-system,sans-serif;--reading-sheet:#fcfbff}
:root[data-theme=dark] {--reading-sheet:#24232f}
body,body :where(h1,h2,h3,h4,h5,p,span,a,strong,b,i,small,dt,dd,button,summary,label,textarea,input,select,th,td,legend,li,section,nav) {font-family:var(--academy-font)!important}
.home-card .section-photo {display:block;width:100%;height:auto;aspect-ratio:1.82;object-fit:cover;border-radius:11px}
.academy-search[hidden],#search-home:has(.academy-search[hidden]) {display:none}
#search-home .search {width:100%;max-width:none}
#top .academy-home-hero .lead .academy-search .search {width:100%;background:#fff;color:#312c41}
#top .academy-home-hero .lead .academy-search input {color:#292336}
#top .academy-home-hero .lead .academy-search input::placeholder {color:#696475}
.glossary-entries,#catalog .group-items.library-list,#test-list.library-list {
  background:var(--reading-sheet);border:1px solid var(--line);border-radius:16px;
  padding:0 clamp(14px,2vw,26px);overflow:hidden;
}
.glossary-entries>div:first-child {border-top:0}
.glossary-entries dt {align-items:center}
.glossary-entries dt b {display:inline-grid;place-items:center;flex:none;min-width:58px;min-height:32px;padding:3px 7px;border-radius:8px;background:color-mix(in srgb,var(--accent) 9%,var(--reading-sheet));font-size:15px}
.academy-glass {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 46'%3E%3Cpath d='M3 39 18 6h10L13 39zm18-14 8-17 15 31H34l-3-7H18z' fill='white'/%3E%3C/svg%3E") center/82% 82% no-repeat}
.brand-reveal:has(.academy-glass) .brand-glyph {visibility:visible;color:var(--accent)}
.academy-waves {
  position:fixed;inset:-16% -28%;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse at 5% -24%,transparent 61%,#9572dd16 63%,#a989fa2a 64%,transparent 67%),
             radial-gradient(ellipse at 100% 130%,transparent 58%,#765fae1a 61%,#b29be322 62%,transparent 64%);
  animation:academy-wave-pass 18s ease-in-out infinite alternate;
}
@keyframes academy-wave-pass {from{transform:translate(-8%,-4%) rotate(-3deg)}to{transform:translate(9%,5%) rotate(4deg)}}
@media(prefers-reduced-motion:reduce){.academy-waves{animation:none}}

#downloads-heading {font:700 clamp(23px,2.1vw,30px)/1.15 var(--academy-font);letter-spacing:-.038em;margin:0}
#academy-downloads {margin:0 0 clamp(36px,4vw,64px)}
.program-list {margin-top:20px;padding:0 clamp(16px,2.5vw,32px);background:var(--reading-sheet);border:1px solid var(--line);border-radius:20px}
.program-list article {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(12px,2vw,26px);padding:clamp(20px,2.2vw,30px) 0}
.program-list article + article {border-top:1px solid var(--line)}
.program-icon {width:56px;height:56px;object-fit:contain}
.shortcut-icon {display:flex;align-items:center;justify-content:center;gap:2px;border:1px solid #bfb0d9;border-radius:15px;background:linear-gradient(140deg,#e9def7,#c5b6db);color:#46335e}
.shortcut-icon kbd {padding:2px 3px;border:1px solid #aa95bf;border-bottom-width:3px;border-radius:4px;font:700 10px/1.2 var(--academy-font);background:#f4edf9}
.program-list h3 {font-size:clamp(19px,1.7vw,24px);line-height:1.2;letter-spacing:-.035em;margin:0}
.program-list p {margin:5px 0 8px;line-height:1.5;color:var(--muted)}
.program-list small,.program-guide {display:inline-block;font-size:12px;line-height:1.6}
.program-list small {color:var(--muted);margin-right:12px}
.program-guide {color:var(--accent);font-weight:600;text-underline-offset:3px}
.program-download {display:inline-grid;place-items:center;border-radius:100px;min-height:42px;padding:7px 23px;background:var(--nav-selected);color:var(--nav-text);font-size:14px;font-weight:650;text-decoration:none;transition:background .18s ease,color .18s ease}
.program-download:hover,.program-download:focus-visible {background:var(--ink);color:var(--reading-sheet)}
@media(max-width:540px){
  .program-list article {grid-template-columns:40px minmax(0,1fr);align-items:start;gap:10px 12px}
  .program-icon {width:40px;height:40px}
  .shortcut-icon {border-radius:11px;gap:1px}
  .shortcut-icon kbd {font-size:8px;padding:2px}
  .program-download {grid-column:2;justify-self:start;min-height:38px}
}

.search-question-field,.atlas-question-field {position:relative;flex:1 1 0;min-width:0}
.search-question-field {display:grid;align-items:center}
.search .search-question-field input {display:block;width:100%;box-sizing:border-box;min-width:0}
.question-example {display:none;position:absolute;inset-inline:0;top:50%;transform:translateY(-50%);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;color:var(--muted);font:inherit;line-height:1.35}
.search-question-field[data-question-hint] input::placeholder,#top .search-question-field[data-question-hint] input::placeholder {color:transparent!important}
.search-question-field[data-question-hint] input:placeholder-shown+.question-example,
.atlas-question-field[data-question-hint] textarea:placeholder-shown+.question-example {display:block}
#top .hero .question-example {color:#696475}
.drawer-field .question-example {font-size:16px}

header .academy-brand-home {padding:0;border:0;background:transparent;color:var(--nav-text);text-align:start;line-height:1;cursor:pointer}
:root {--floating-nav-top:max(8px,env(safe-area-inset-top,0px));--floating-nav-height:54px;--floating-nav-offset:0px}
:root[data-section-menu] {--floating-nav-offset:calc(var(--floating-nav-top) + var(--floating-nav-height));scroll-padding-top:var(--floating-nav-offset)}
:root[data-theme] .academy-header .section-switcher[data-floating] {
  position:fixed;top:var(--floating-nav-top);inset-inline:0;margin-inline:auto;z-index:25;
  width:min(800px,calc(100% - 2 * max(10px,env(safe-area-inset-left,0px),env(safe-area-inset-right,0px))));
  height:var(--floating-nav-height);padding:3px 4px;border:1px solid var(--nav-line);border-radius:16px;
  background:var(--nav-glass);-webkit-backdrop-filter:blur(22px) saturate(1.2);backdrop-filter:blur(22px) saturate(1.2);
  box-shadow:0 5px 20px var(--nav-shadow);opacity:0;translate:0 calc(-100% - var(--floating-nav-top));pointer-events:none;
}
:root[data-section-menu][data-theme] .academy-header .section-switcher[data-floating] {opacity:1;translate:0 0;pointer-events:auto}
#catalog:has(.law-directory) .law-rail {top:calc(14px + var(--floating-nav-offset))}
@media(prefers-reduced-motion:no-preference){#catalog:has(.law-directory) .law-rail {transition:top .22s ease}}
@media(max-width:740px) {#catalog:has(.law-directory) .law-rail {top:auto}}
