/* Mandali shell (admin v177, student app v178): one navigation, three layouts.
   Phone (<700px): 6-slot bottom bar + "All sections" sheet.
   iPad (700-1199px): labelled icon rail on the left.
   Monitor (>=1200px): full sidebar with the open section's pages listed under it, wide content.
   Operate mode: precise, calm, no decorative motion on things used all day. */

body.adm {
  --ink: #070B16; --panel: #0E1626; --raise: #152038; --line: #1D2940;
  --text: #ECE7DA; --muted: #9AA4B8; --gold: #E9B44C; --gold-soft: rgba(233,180,76,.11);
  --an-bg: #0A1120; --an-hi: rgba(233,180,76,.10); --an-ease: cubic-bezier(.23,1,.32,1);
  background: var(--ink);
}
html[data-theme="light"] body.adm {
  --ink: #F4EEE2; --panel: #FBF8F1; --raise: #EFE6D6; --line: #E1D6C3;
  --text: #241D14; --muted: #6B5F50; --gold: #9A6A10; --gold-soft: rgba(154,106,16,.10);
  --an-bg: #FBF8F1; --an-hi: rgba(185,129,20,.11);
}
html.night body:is(.adm,.stu) {
  --ink: #0F0C09; --panel: #17120D; --raise: #1E1812; --line: #2E251B;
  --text: #DCCCB0; --muted: #9C8A70; --gold: #C9954A; --gold-soft: rgba(201,149,74,.10);
  --ok: #7FB38A; --danger: #D9826E; --an-bg: #120E0A; --an-hi: rgba(201,149,74,.10);
}
html.night .an { background: var(--an-bg); }
html { -webkit-text-size-adjust: 100%; }
body:is(.adm,.stu) .topbar { background: var(--ink); }

.adm-crumb { align-items: baseline; gap: 10px; min-width: 0; margin-right: auto; }
body:is(.adm,.stu) .adm-crumb { display: none; }
@media (min-width: 700px) { body:is(.adm,.stu).has-nav .adm-crumb { display: flex; } }
body:is(.adm,.stu) #wbTick { padding: 0 16px; }
@media (min-width: 1200px) { body:is(.adm,.stu) #wbTick { padding: 0 32px; } }

/* ---------- navigation element (shared) ---------- */
.an { position: fixed; z-index: 40; background: var(--an-bg); color: var(--muted); font-family: var(--sans); }
.an :where(button) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.an svg { display: block; flex: none; }
.an-brand, .an-sec-h, .an-sub, .an-foot, .an-search, .an-sloka, .an-n { display: none; }
.an-g { position: relative; display: flex; align-items: center; gap: 10px; border-radius: 12px; transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--an-ease); }
.an-g:active { transform: scale(.96); }
.an-g .an-ic { display: grid; place-items: center; width: 26px; height: 26px; }
.an-g.on { color: var(--gold); }
.an-g[data-grp="tactico"] .an-ic { color: #5FD3F3; }
.an-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #F2665E; color: #fff; font: 600 11px/18px var(--sans); font-style: normal; text-align: center; }

/* ---------- phone: bottom bar ---------- */
@media (max-width: 699.98px) {
  body:is(.adm,.stu).has-nav { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .an { left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line); transition: transform 240ms var(--an-ease); }
  .an.adm-hide { transform: translateY(calc(100% + 2px)); }
  .an-secs, .an-sec { display: contents; }
  .an-g { flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 0; font-size: 11px; font-weight: 500; letter-spacing: -.005em; }
  .an-g:not(.an-p) { display: none; }
  .an-g .an-lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .an-g.on::before { content: ""; position: absolute; top: -7px; left: 50%; width: 22px; height: 2px; margin-left: -11px; border-radius: 2px; background: var(--gold); }
  .an-g .an-badge { position: absolute; top: 2px; left: calc(50% + 6px); }
}
@media (max-width: 359.98px) { .an-g { font-size: 10px; } }
.an-ls { display: none; }
@media (max-width: 699.98px) { .an-lf { display: none; } .an-ls { display: inline; } }

/* ---------- iPad: labelled rail ---------- */
@media (min-width: 700px) {
  body:is(.adm,.stu).has-nav { padding-left: 92px; padding-bottom: 28px; }
  .an { top: 0; bottom: 0; left: 0; width: 92px; display: flex; flex-direction: column; padding: calc(12px + env(safe-area-inset-top, 0px)) 8px calc(12px + env(safe-area-inset-bottom, 0px)); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: none; }
  .an::-webkit-scrollbar { display: none; }
  .an-brand { display: grid; place-items: center; height: 46px; margin-bottom: 8px; text-decoration: none; }
  .an-brand img { width: 34px; height: 34px; border-radius: 50%; }
  .an-brand b, .an-brand small { display: none; }
  .an-search { display: grid; place-items: center; height: 40px; margin: 0 6px 10px; border-radius: 10px; border: 1px solid var(--line) !important; color: var(--text) !important; }
  .an-search span, .an-search kbd { display: none; }
  .an-secs { display: flex; flex-direction: column; gap: 2px; }
  .an-sec + .an-sec { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
  .an-g { width: 100%; flex-direction: column; justify-content: center; gap: 3px; min-height: 58px; font-size: 11.5px; font-weight: 500; }
  .an-g.an-more { display: none; }
  .an-g.on { background: var(--an-hi); }
  .an-g .an-badge { position: absolute; top: 5px; right: 12px; }
  .toast { left: calc(50% + 46px); }
  body:is(.adm,.stu).has-nav .topbar .brand { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  .an-g:not(.on):hover { color: var(--text); background: color-mix(in srgb, var(--raise) 70%, transparent); }
}

/* ---------- monitor: full sidebar ---------- */
@media (min-width: 1200px) {
  body:is(.adm,.stu).has-nav { padding-left: 256px; }
  .an { width: 256px; padding: calc(16px + env(safe-area-inset-top, 0px)) 14px 14px;
    background: radial-gradient(120% 60% at 0% 0%, rgba(233,180,76,.07), transparent 60%), var(--an-bg); }
  html[data-theme="light"] .an { background: radial-gradient(120% 60% at 0% 0%, rgba(185,129,20,.08), transparent 60%), var(--an-bg); }
  .an-brand { display: flex; gap: 11px; height: auto; padding: 4px 8px 16px; margin: 0; place-items: center start; }
  .an-brand img { width: 36px; height: 36px; }
  .an-brand b { display: inline-flex; align-items: center; font: 600 21px/1 var(--serif); color: var(--gold); letter-spacing: -.01em; }
  .an-brand small { display: block; margin-top: 4px; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
  .an-search { display: flex; align-items: center; gap: 10px; height: 40px; margin: 0 0 16px; padding: 0 8px 0 12px; place-items: center start; color: var(--muted) !important; background: var(--panel) !important; font-size: 14px !important; }
  .an-search span { display: block; flex: 1; text-align: left; }
  .an-search kbd { display: block; font: 500 11px/1 var(--mono); padding: 4px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); }
  .an-sec + .an-sec { margin-top: 12px; padding-top: 0; border-top: 0; }
  .an-sec-h { display: block; margin: 0 0 4px; padding: 0 10px; font: 500 10.5px/2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--muted) 75%, transparent); }
  .an-g { flex-direction: row; justify-content: flex-start; gap: 11px; min-height: 40px; padding: 0 10px; font-size: 14.5px; font-weight: 500; color: var(--text); }
  .an-g .an-ic { width: 22px; height: 22px; color: var(--muted); }
  .an-g .an-ic svg { width: 19px; height: 19px; }
  .an-g.on { color: var(--gold); background: var(--an-hi); }
  .an-g.on .an-ic { color: var(--gold); }
  .an-g .an-lb { flex: 1; text-align: left; }
  .an-g .an-badge { position: static; }
  .an-g .an-n { display: block; font: 500 11px/1 var(--mono); color: var(--muted); opacity: .7; }
  .an-g.on .an-n { display: none; }
  .an-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 21px; padding-left: 12px; border-left: 1px solid var(--line); }
  .an-sub button { position: relative; text-align: left; min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; color: var(--muted); transition: background-color 140ms ease, color 140ms ease; }
  .an-sub button[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--raise) 80%, transparent); font-weight: 600; }
  .an-sub button[aria-current="page"]::before { content: ""; position: absolute; left: -13px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--gold); }
  .an-foot { display: flex; gap: 6px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
  .an-foot a, .an-foot button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 500; }
  .an-sloka { display: block; margin: 12px 0 2px; text-align: center; font: 400 12.5px/1.5 "Tiro Devanagari Sanskrit", var(--serif); color: color-mix(in srgb, var(--gold) 70%, transparent); }
  .toast { left: calc(50% + 128px); }
  body:is(.adm,.stu) .wrap { padding-left: 32px; padding-right: 32px; }
  body.adm .wrap { max-width: 1240px; }
  body:is(.adm,.stu) .topbar { padding-left: 32px; padding-right: 24px; }
}
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .an-sub button:not([aria-current="page"]):hover, .an-foot a:hover, .an-foot button:hover { color: var(--text); background: color-mix(in srgb, var(--raise) 60%, transparent); }
}
@media (min-width: 1000px) { body.adm .wrap { max-width: 1240px; } }
@media (min-width: 1600px) { body.adm .wrap { max-width: 1400px; } }
@media (min-width: 1200px) { body.stu .wrap { max-width: 1040px; } body.stu .wrap.cxw { max-width: 1400px; } }

/* ---------- top bar crumb (iPad + monitor) ---------- */
.adm-crumb b { font: 600 19px/1.1 var(--serif); color: var(--text); letter-spacing: -.01em; white-space: nowrap; }
.adm-crumb span { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.adm-crumb i { font-style: normal; color: var(--line); }
body:is(.adm,.stu) .navbtns { margin-left: 0; }
@media (min-width: 700px) { body:is(.adm,.stu) .topbar .navbtns { margin-left: auto; } }

/* ---------- page tabs (phone + iPad) ---------- */
.adm-pg { display: flex; gap: 4px; margin: 2px 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.adm-pg::-webkit-scrollbar { display: none; }
.adm-pg button { flex: none; scroll-snap-align: start; position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 0; background: none;
  font: 500 14.5px/1 var(--sans); color: var(--muted); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--an-ease, ease); }
.adm-pg button:active { transform: scale(.97); }
.adm-pg button[aria-selected="true"] { color: var(--gold); background: var(--raise); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 28%, transparent); }
.adm-pg .badge { margin-left: 2px; }
@media (max-width: 699.98px) {
  .adm-pg { margin: 0 0 16px; padding: 0 0 8px; gap: 6px; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
  .adm-pg button { height: 40px; padding: 0 13px; font-size: 15px; }
  .adm-pg button[aria-selected="true"] { background: var(--gold-soft); box-shadow: none; }
}
@media (min-width: 700px) and (max-width: 1199.98px) { .adm-pg { width: max-content; max-width: 100%; } }
@media (min-width: 1200px) { .adm-pg { display: none; } }
@media (hover: hover) and (pointer: fine) { .adm-pg button:not([aria-selected="true"]):hover { color: var(--text); } }

/* ---------- "All sections" sheet / jump palette ---------- */
.aj.sheet-ov { align-items: flex-end; }
.aj .aj-box { width: min(640px, 100%); max-height: 86dvh; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0; padding: 6px 0 calc(10px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform 260ms var(--an-ease); }
.aj.on .aj-box { transform: none; }
.aj.closing .aj-box { transform: translateY(100%); transition-duration: 180ms; }
.aj-top { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; border-bottom: 1px solid var(--line); }
.aj-in { flex: 1; min-width: 0; height: 44px; padding: 0 14px 0 40px; border-radius: 12px !important; border: 1px solid var(--line); background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%239AA4B8' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px 50%;
  color: var(--text); font: 400 16px/1 var(--sans); outline: none; }
.aj-in:focus { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.aj-x { flex: none; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: none; color: var(--text); font: 500 14px/1 var(--sans); cursor: pointer; touch-action: manipulation; }
.aj-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 8px; }
.aj-sec-h { margin: 16px 0 6px; font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.aj-g { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.aj-sec-h + .aj-g { border-top: 0; }
.aj-ic { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--raise); color: var(--gold); }
.aj-g[data-g="tactico"] .aj-ic { color: #5FD3F3; }
.aj-gn { font: 600 15px/1.3 var(--sans); color: var(--text); display: flex; align-items: center; gap: 8px; padding-top: 1px; }
.aj-gn em { font-style: normal; font: 500 10px/1 var(--mono); letter-spacing: .1em; color: var(--gold); text-transform: uppercase; }
.aj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aj-chips button { height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 500 14px/1 var(--sans); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: transform 120ms var(--an-ease), border-color 140ms ease; }
.aj-chips button:active { transform: scale(.97); }
.aj-chips button.cur { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.aj-chips button.hit { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
.aj-none { padding: 26px 0; text-align: center; color: var(--muted); }
.aj-foot { display: flex; gap: 8px; padding: 10px 16px 0; border-top: 1px solid var(--line); }
.aj-foot a, .aj-foot button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; border-radius: 11px; border: 1px solid var(--line); background: none; color: var(--text); text-decoration: none; font: 500 14px/1 var(--sans); cursor: pointer; touch-action: manipulation; }
@media (min-width: 700px) {
  .aj.sheet-ov { align-items: flex-start; padding-top: 12vh; }
  .aj .aj-box { border-bottom: 1px solid var(--line); border-radius: 18px; max-height: 72vh; padding-bottom: 10px; opacity: 0; transform: translateY(-6px) scale(.98); transition: transform 200ms var(--an-ease), opacity 200ms var(--an-ease);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
  .aj.on .aj-box { opacity: 1; transform: none; }
  .aj.closing .aj-box { opacity: 0; transform: scale(.98); transition-duration: 140ms; }
  .aj-x, .aj .sheet-grab { display: none; }
  .aj-top { padding-top: 14px; }
}
@media (hover: hover) and (pointer: fine) { .aj-chips button:not(.cur):hover, .aj-foot a:hover, .aj-foot button:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); } }
@media (pointer: coarse) { .aj-in { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .an, .aj .aj-box { transition: opacity 150ms ease !important; transform: none !important; } .an.adm-hide { transform: none !important; } }

/* ticker follows the theme */
html[data-theme="light"] body:is(.adm,.stu) #wbTick { background: var(--panel); color: var(--text); border-bottom-color: var(--line); }
html[data-theme="light"] body:is(.adm,.stu) .wbt-i b { color: var(--muted); }
html[data-theme="light"] body:is(.adm,.stu) .wbt .up { color: #12805F; }
html[data-theme="light"] body:is(.adm,.stu) .wbt .dn { color: #B8433A; }

/* ---------- student app extras ---------- */
body.stu { --an-bg: color-mix(in srgb, var(--ink) 88%, #000); --an-hi: color-mix(in srgb, var(--gold) 12%, transparent); --an-ease: cubic-bezier(.23,1,.32,1); }
html[data-theme="light"] body.stu { --an-bg: var(--panel); }
body.stu.panch { --an-bg: #06181A; --an-hi: rgba(231,203,140,.12); }
body.stu .an { view-transition-name: bottomnav; }
body.priv-blur .an { filter: blur(22px); }
.an .an-pz { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 15px/1 var(--serif); color: #E7CB8C;
  background: radial-gradient(circle at 50% 50%, #12515C 0 42%, #0B2A2E 43% 100%); box-shadow: 0 0 0 1px #E7CB8C55; }
.an .an-g.on .an-pz { box-shadow: 0 0 0 2px #E7CB8C; }
@media (min-width: 1200px) { .an .an-pz { width: 22px; height: 22px; font-size: 13px; } }
body.stu .an-g[data-grp="panch"] { color: #C9B27A; }
body.stu .an-g[data-grp="panch"].on { color: #E7CB8C; }
@media (max-width: 699.98px) { body.stu .an { grid-template-columns: repeat(var(--an-n, 6), minmax(0, 1fr)); } }
/* owner seal: gold crown left of "Mandali", only on the owner's login */
.own-seal { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 7px; vertical-align: -3px; border-radius: 50%; color: #0B1220;
  background: linear-gradient(135deg, #F6D58A 0%, #E9B44C 45%, #B98114 100%); box-shadow: 0 0 0 1px rgba(233,180,76,.55), 0 2px 10px rgba(233,180,76,.35); position: relative; overflow: hidden; }
.own-seal::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transform: translateX(-120%); animation: ownShine 6s ease-in-out 1.2s infinite; }
@keyframes ownShine { 0%, 80% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .own-seal::after { animation: none; } }
.own-seal.sm { width: 20px; height: 20px; margin: 0 -2px 0 -4px; }
.an-brand { position: relative; }
.own-seal.rail { position: absolute; top: -2px; left: calc(50% + 8px); width: 18px; height: 18px; margin: 0; z-index: 1; }
@media (min-width: 1200px) { .own-seal.rail { display: none; } }

/* Jump to: Home + Trade desk on top, then every page A to Z (20 Nov 2026) */
.aj-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0 4px; }
.aj-quick button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); background: var(--gold-soft); color: var(--gold); font: 600 15px/1 var(--sans); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: transform 120ms cubic-bezier(.23,1,.32,1); }
.aj-quick button:active, .aj-it:active { transform: scale(.97); }
.aj-quick button.cur { background: var(--gold); color: var(--ink); }
.aj-l { margin: 14px 0 2px; color: var(--gold); }
.aj-it { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: transform 120ms cubic-bezier(.23,1,.32,1); }
.aj-it .aj-ic { grid-row: auto; flex: none; width: 30px; height: 30px; border-radius: 9px; }
.aj-it b { font: 600 15px/1.25 var(--sans); }
.aj-it small { flex: 1; font: 500 12.5px/1.2 var(--sans); color: var(--muted); }
.aj-it b + em, .aj-it b + .an-badge { margin-left: auto; }
.aj-it em { font-style: normal; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.aj-it.cur b { color: var(--gold); }
@media (hover: hover) and (pointer: fine) { .aj-it:hover { background: color-mix(in srgb, var(--raise) 60%, transparent); } .aj-quick button:not(.cur):hover { border-color: var(--gold); } }
/* Trade desk: gold icon so it is the first thing the eye finds after Home */
#adminNav .an-g[data-grp="trades"] .an-ic { color: var(--gold); }
/* 1 Dec 2026: second row for a desk's own views (Paper desks → Equinox → Live / Record / Strategy / Rules) */
.adm-sub2 { display: flex; gap: 6px; margin: -8px 0 16px; overflow-x: auto; scrollbar-width: none; }
.adm-sub2::-webkit-scrollbar { display: none; }
.adm-sub2 button { flex: none; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 12.5px/1 "JetBrains Mono", ui-monospace, monospace; touch-action: manipulation; cursor: pointer; }
.adm-sub2 button[aria-selected="true"] { color: #0B1220; background: var(--gold); border-color: var(--gold); }
.adm-sub2 button:active { transform: scale(.97); }

/* student sub-page clusters (Dec 2026) */
.adm-pg .pg-h { flex: none; align-self: center; scroll-snap-align: start; line-height: 38px; margin: 0 2px 0 10px; padding-left: 12px; border-left: 1px solid var(--line); font-family: var(--mono, ui-monospace, monospace); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--gold) 80%, var(--muted)); white-space: nowrap; user-select: none; }
.adm-pg .pg-h0 { margin-left: 6px; padding-left: 0; border-left: 0; }
.an-sub .an-sub-h { margin: 8px 0 2px 10px; font: 600 9.5px/1 var(--mono, ui-monospace, monospace); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.an-sub .an-sub-h:first-child { margin-top: 2px; }

/* Wordmark placement (Trade with Mandali), every width:
   phone: top bar · iPad rail (700–1199): peacock in the rail, wordmark leads the top bar · desktop: full wordmark in the sidebar */
@media (min-width: 700px) and (max-width: 1199.98px) {
  .an .an-brand > span { display: none; }
  .an-brand { height: 48px; margin-bottom: 10px; }
  body:is(.adm,.stu).has-nav .topbar .brand { display: flex; align-items: center; gap: 10px; flex: none; }
  body:is(.adm,.stu).has-nav .topbar .brand .brand-mark,
  body:is(.adm,.stu).has-nav .topbar .brand .brand-tag { display: none; }
  body:is(.adm,.stu).has-nav .topbar .brand .wm { height: 32px; }
  body:is(.adm,.stu).has-nav .topbar { align-items: center; }
  body:is(.adm,.stu).has-nav .adm-crumb { align-self: center; padding-left: 16px; margin-left: 6px; border-left: 1px solid var(--line); line-height: 1.2; }
}
@media (min-width: 1200px) {
  .an-brand { align-items: center; }
  .an-brand > span { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; }
  .an-brand .wm { height: 32px; width: auto; max-width: 100%; }
}
@media (min-width: 700px) and (max-width: 959.98px) {
  body.stu.has-nav .topbar .brand .tier { width: 28px; height: 28px; padding: 0; justify-content: center; gap: 0; margin-left: 0; flex: none; }
  body.stu.has-nav .topbar .brand .tier > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
