/* PA Hub — the Pinnacle app frame (same values as Booking and Feedback; PA-SIS docs/18 §3) + Hub pages. */
:root {
  --ink: #1d1d1f; --muted: #6e6e73; --hint: #86868b;
  --canvas: #f5f5f7; --card: #ffffff; --side: #fbfbfd; --line: #e8e8ed; --sel: #e8e8ed; --field: #d2d2d7;
  --blue: #0071e3; --blue-dark: #0062c4; --blue-soft: #e8f2fd;
  --teal: #00a8a8; --teal-dark: #007a7a; --teal-soft: #e0f5f4;
  --warn: #9a5b00; --warn-bg: #fff3dd; --bad: #d70015; --bad-bg: #fff0f0;
  --side-w: 248px; --rail-w: 72px; --bar-h: 53px; --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 14px; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; letter-spacing: inherit; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid rgba(0,113,227,.35); outline-offset: 1px; border-radius: 8px; }
.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 { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 10px 14px; border-radius: 10px; z-index: 99; box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.loading { padding: 60px 0; color: var(--muted); text-align: center; }

/* ── frame ── */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
body.nav-rail .shell { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--line); z-index: 25; }
.side-brand { position: relative; flex: none; height: var(--bar-h); padding: 0 8px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.sb-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.sb-btn:hover { background: var(--sel); }
.sb-logo { width: 32px; height: auto; flex: none; display: block; }
.sb-txt { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.sb-school { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.sb-app { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.sb-btn > svg { width: 16px; height: 16px; color: var(--muted); }
.sw-menu { position: absolute; top: 50px; left: 8px; width: 280px; background: var(--card); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 6px; display: grid; gap: 2px; z-index: 45; }
.sw-head { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 4px; }
.sw-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; color: var(--ink); min-height: 44px; }
.sw-item:hover { background: var(--sel); text-decoration: none; }
.sw-item[aria-current="page"] { background: var(--sel); }
.sw-item b { display: block; font-size: 14px; }
.sw-item small { color: var(--muted); font-size: 12px; }
.side-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 10px 24px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.nav-item:hover { background: var(--sel); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--sel); font-weight: 600; }
.nav-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-divider { border: 0; border-top: 1px solid var(--line); margin: 14px 10px; }
body.nav-rail .side-brand { padding: 0 6px; }
body.nav-rail .sb-btn { justify-content: center; padding: 4px; }
body.nav-rail .sb-txt, body.nav-rail .sb-btn > svg, body.nav-rail .nav-label { display: none; }
body.nav-rail .sw-menu { left: calc(100% - 2px); top: 4px; }
body.nav-rail .side-nav { padding: 8px 6px 24px; }
body.nav-rail .nav-item { flex-direction: column; gap: 3px; min-height: 56px; padding: 8px 2px; justify-content: center; }
body.nav-rail .nav-item .label { font-size: 11px; font-weight: 500; text-align: center; white-space: normal; line-height: 1.15; flex: none; }
body.nav-rail .nav-item[aria-current="page"] .label { font-weight: 600; }
body.nav-rail .nav-divider { margin: 10px 4px; }

.shell-main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--bar-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 0 8px; background: rgba(255,255,255,.8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,.06); }
.top-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; border: 0; background: transparent; color: var(--ink); padding: 0; cursor: pointer; }
.icon-btn:hover { background: var(--sel); }
.top-app { display: none; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.top-crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.top-crumbs a { color: var(--muted); padding: 3px 6px; border-radius: 8px; flex: none; }
.top-crumbs a:hover { background: var(--sel); color: var(--ink); text-decoration: none; }
.tc-here { color: var(--ink); font-weight: 500; padding: 3px 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tc-sep { color: #aeaeb2; padding: 0 2px; }
.who { position: relative; flex: none; }
.acct-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.acct-face { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; display: grid; place-items: center; overflow: hidden; flex: none; }
.acct-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-face.lg { width: 40px; height: 40px; font-size: 14px; }
.acct-btn:hover .acct-face, .acct-btn[aria-expanded="true"] .acct-face { box-shadow: 0 0 0 3px var(--sel); }
.acct-menu { position: absolute; right: 0; top: 46px; width: 280px; background: var(--card); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 6px; z-index: 40; }
.acct-who { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; min-width: 0; }
.acct-who > div { min-width: 0; }
.acct-who b { display: block; font-size: 14px; }
.acct-who .who-email { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.acct-role { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--teal-dark); background: var(--teal-soft); padding: 2px 8px; border-radius: 999px; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-size: 14px; text-align: left; cursor: pointer; }
.acct-item:hover { background: var(--sel); }
.acct-item svg { width: 18px; height: 18px; }
a.acct-item { text-decoration: none; }

main#app { padding: 24px 28px 80px; min-width: 0; }
main#app:focus { outline: none; }
.page { max-width: 1200px; margin: 0 auto; }

/* ── page parts ── */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.page-head .t { flex: 1; min-width: 0; }
h1 { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; display: flex; align-items: center; gap: 10px; }
h2 .spacer { flex: 1; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 16px; border-radius: 980px; border: 1px solid var(--blue); background: transparent; color: var(--blue); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--blue-soft); text-decoration: none; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.small { min-height: 28px; padding: 3px 12px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.btn.quiet { border-color: transparent; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn:disabled { opacity: .4; cursor: default; }
.card { background: var(--card); border-radius: var(--r); padding: 18px 20px; }
.empty { background: var(--card); border-radius: var(--r); padding: 22px; color: var(--muted); }
.notice { border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--line); color: var(--muted); line-height: 1.4; white-space: nowrap; }
.pill.ok { background: var(--teal-soft); color: var(--teal-dark); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.blue { background: var(--blue-soft); color: var(--blue-dark); }

/* announcements */
.anns { display: grid; gap: 10px; }
.ann { background: var(--card); border-radius: var(--r); padding: 14px 18px; display: flex; gap: 14px; align-items: flex-start; }
.ann-main { flex: 1; min-width: 0; }
.ann-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ann-title { font-weight: 600; font-size: 15px; margin: 6px 0 2px; }
.ann-msg { white-space: pre-line; overflow-wrap: anywhere; margin-top: 4px; line-height: 1.5; }
.ann-acts { display: flex; gap: 4px; flex: none; }
/* quick links */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.link { position: relative; display: block; background: var(--card); border-radius: var(--r); padding: 14px 16px; color: var(--ink); min-height: 74px; }
.link:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--blue-soft); }
.link b { display: block; font-size: 14px; }
.link small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.link-acts { display: flex; gap: 2px; margin-top: 8px; }
/* celebrations */
.celebs { display: flex; flex-wrap: wrap; gap: 10px; }
.celeb { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: var(--r); padding: 10px 14px; }
/* people */
.search { width: 100%; padding: 10px 14px; border: 1px solid var(--field); border-radius: 12px; font: inherit; font-size: 14px; background: var(--card); }
.toolbar { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.person { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--r); padding: 12px 14px; border: 0; text-align: left; cursor: pointer; color: var(--ink); width: 100%; min-width: 0; }
.person:hover { box-shadow: 0 0 0 2px var(--blue-soft); }
.person > div { min-width: 0; }
.person b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face { width: 40px; height: 40px; border-radius: 50%; background: #8e8e93; color: #fff; font-weight: 600; font-size: 13px; display: grid; place-items: center; overflow: hidden; flex: none; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face.lg { width: 64px; height: 64px; font-size: 20px; }
.facts { display: grid; grid-template-columns: 110px 1fr; margin: 14px 0 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { overflow-wrap: anywhere; }
/* org chart */
.org-top { display: flex; justify-content: center; margin: 0 0 18px; }
.org-cols { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.org-col { flex: 0 0 230px; display: grid; gap: 8px; }
.org-box { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 12px; padding: 10px 12px; border: 0; text-align: left; cursor: pointer; color: var(--ink); width: 100%; min-width: 0; }
.org-box.head { border-top: 3px solid var(--blue); }
.org-box.apex { border-top: 3px solid var(--ink); width: 260px; }
.org-box.hit { box-shadow: 0 0 0 2px var(--blue); }
.org-box.dim { opacity: .35; }
.org-box > div { min-width: 0; }
.org-box b { display: block; font-size: 13px; }
.org-box small { display: block; color: var(--muted); font-size: 12px; }
.org-box .face { width: 32px; height: 32px; font-size: 11px; }
.org-label { font-size: 12px; color: var(--muted); padding: 6px 4px; text-align: center; background: var(--side); border-radius: 10px; }
.org-sub { display: grid; gap: 6px; margin-left: 14px; padding-left: 10px; border-left: 2px solid var(--line); }
/* forms & calendar */
.frame-box { background: var(--card); border-radius: var(--r); overflow: hidden; }
.frame-box iframe { display: block; width: 100%; border: 0; }
.formlist { display: grid; gap: 10px; }
.formrow { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--r); padding: 14px 18px; }
.formrow .t { flex: 1; min-width: 0; }
/* manage list */
.mlist { display: grid; gap: 8px; }
.mrow { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 12px; padding: 12px 16px; }
.mrow .t { flex: 1; min-width: 0; }
.mrow.gone { opacity: .6; }
/* dialog */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 60; display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--card); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 24px; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.dialog h3 { margin: 0 0 14px; font-size: 18px; }
.field { display: grid; gap: 5px; margin: 0 0 12px; }
.field label { font-size: 13px; font-weight: 500; }
.field input, .field select, .field textarea { font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; }
.dialog-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.dialog .err { color: var(--bad); font-size: 13px; margin: 6px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 70; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
pre.paste { white-space: pre-wrap; }

/* signed out / not staff: one centred card (same as Booking and Feedback) */
body.signed-out .side, body.signed-out .top, body.signed-out .scrim { display: none !important; }
body.signed-out .shell { display: block; }
body.signed-out main#app { padding: 0 16px; }
.login-wrap { max-width: 400px; margin: 6rem auto 40px; padding: 48px 40px; background: #fff; border-radius: 18px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 24px 64px rgba(0,0,0,.08); }
.login-wrap img { width: auto; height: 52px; display: block; margin: 0 auto 16px; }
.login-school { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6e6e73; margin: 0 0 4px; }
.login-wrap h1 { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 0 0 6px; }
.login-wrap p { font-size: 13px; color: #86868b; line-height: 1.6; letter-spacing: 0; margin: 0 0 28px; }
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 13px 20px; border: 1px solid rgba(0,0,0,.08); border-radius: 980px; background: #fff; color: #1d1d1f; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s; }
.btn-google:hover { background: #f5f5f7; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.login-error { color: var(--bad) !important; margin: 14px 0 0 !important; }

@media (max-width: 767px) {
  .shell, body.nav-rail .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: var(--bar-h); left: 0; bottom: 0; height: auto; width: 280px; z-index: 35; background: var(--card); transform: translateX(-100%); visibility: hidden; transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.2); border-right: 0; }
  body.nav-open .side { transform: none; visibility: visible; }
  body.nav-open .scrim { display: block !important; position: fixed; inset: var(--bar-h) 0 0 0; background: rgba(0,0,0,.28); z-index: 34; }
  body.nav-rail .side-brand { padding: 0 8px; }
  body.nav-rail .sb-btn { justify-content: flex-start; padding: 4px 8px; }
  body.nav-rail .sb-txt, body.nav-rail .nav-label { display: grid; }
  body.nav-rail .sb-btn > svg { display: block; }
  body.nav-rail .side-nav { padding: 12px 10px 24px; }
  body.nav-rail .nav-item { flex-direction: row; gap: 10px; min-height: 44px; padding: 8px 10px; justify-content: flex-start; }
  body.nav-rail .nav-item .label { font-size: 14px; text-align: left; white-space: nowrap; flex: 1; }
  .sw-menu, body.nav-rail .sw-menu { left: 8px; top: 50px; }
  .top-app { display: flex; }
  .top-crumbs { display: none; }
  main#app { padding: 18px 16px 60px; }
  h1 { font-size: 21px; line-height: 26px; }
  .two { grid-template-columns: 1fr; }
  .ann { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* ── calendar (doc 19 §18) ── */
.caltools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.segs { display: inline-flex; background: var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.calhead { margin-left: 6px; font-size: 15px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--card); font-size: 12.5px; cursor: pointer; border: 1px solid var(--line); }
.chip input { accent-color: var(--c); margin: 0; }
.chip span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.evrow { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 0; border-left: 4px solid var(--c); border-radius: 10px; padding: 10px 14px; cursor: pointer; color: var(--ink); }
.evrow:hover { box-shadow: 0 0 0 2px var(--blue-soft); }
.evwhen { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.evmain { min-width: 0; }
.evmain b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.evmain small { display: block; color: var(--muted); font-size: 12.5px; }
.evtags { display: flex; gap: 6px; align-items: center; }
.evtype { font-size: 11.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.evmeet { font-size: 11.5px; font-weight: 600; color: var(--teal-dark); background: var(--teal-soft); padding: 2px 8px; border-radius: 999px; }
.evrep { color: var(--muted); }
.ylist { display: grid; gap: 6px; }
.calmonth { margin: 18px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.yrow { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; }
.yrow.past { opacity: .55; }
.ydate { text-align: center; line-height: 1.1; }
.ydate b { display: block; font-size: 18px; }
.ydate small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; }
.todayline { display: flex; align-items: center; gap: 10px; color: var(--bad); font-size: 12px; font-weight: 600; margin: 8px 0; }
.todayline::after { content: ""; flex: 1; height: 2px; background: var(--bad); border-radius: 2px; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.mhead { background: var(--side); font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; text-align: center; }
.mcell { background: var(--card); min-height: 108px; padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mcell.out { background: #fafafc; }
.mcell.out .mday { color: var(--hint); }
.mday { align-self: flex-end; border: 0; background: transparent; font-size: 12px; font-weight: 600; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; color: var(--ink); }
.mcell.today .mday { background: var(--blue); color: #fff; }
.mev { border: 0; text-align: left; font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, white); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 3px solid var(--c); }
.mev span { color: var(--muted); }
.mmore { border: 0; background: transparent; font-size: 11.5px; color: var(--blue); text-align: left; cursor: pointer; padding: 0 6px; }
.wgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wgrid .evrow { grid-template-columns: 1fr; gap: 2px; padding: 8px 10px; }
.wgrid .evtags { display: none; }
.dlist .wcol { display: grid; gap: 6px; }
.wcol { display: grid; gap: 6px; align-content: start; min-width: 0; }
.whead { border: 0; background: transparent; text-align: left; font-weight: 600; font-size: 13px; padding: 4px 2px; cursor: pointer; color: var(--ink); }
.wcol.today .whead { color: var(--blue); }
.thisweek { display: grid; gap: 6px; }
@media (max-width: 900px) { .wgrid { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .evrow { grid-template-columns: 1fr; gap: 2px; }
  .evtags { flex-wrap: wrap; }
  .mcell { min-height: 64px; }
  .mev { font-size: 0; padding: 0; height: 6px; border-left-width: 6px; }
  .mmore { font-size: 10px; }
}

/* ── Phase 2: students, schedule, documents, org chart toggles ── */
.gradechips { flex-wrap: wrap; margin: 0 0 6px; background: transparent; padding: 0; gap: 6px; }
.gradechips .seg { background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.gradechips .seg.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.gradechips .seg.on .muted { color: rgba(255,255,255,.7); }
/* Bold name + grey number, the org chart style (product owner, Oct 15): the name in ink so the grey number stands apart */
.gradechips .seg b { color: var(--ink); font-weight: 600; }
.gradechips .seg .muted { font-weight: 400; }
.gradechips .seg.on b { color: #fff; }
h2 .muted { font-weight: 400; color: var(--hint); }
.wnode summary b { font-weight: 600; color: var(--ink); }
.wnode summary .muted { font-weight: 400; }
.sub-h { margin: 18px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.guardian { border-top: 1px solid var(--line); padding: 10px 0; }
.dialog.wide { width: min(1100px, 100%); }
.sched-wrap { overflow-x: auto; }
table.sched { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 13px; }
.sched th, .sched td { border: 1px solid var(--line); padding: 8px; vertical-align: top; text-align: left; }
.sched thead th { background: var(--side); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sched th.ptime { white-space: nowrap; color: var(--muted); font-weight: 500; background: var(--side); }
.sched td b { display: block; font-size: 13px; }
.sched td small { display: block; color: var(--muted); font-size: 12px; }
.sched .today { background: #f2f7fe; }
.sched td.now { box-shadow: inset 0 0 0 2px var(--blue); }
.sched td.brk { color: var(--muted); font-style: italic; background: #fafafc; }
.notice:not(.warn):not(.bad) { background: var(--blue-soft); color: var(--blue-dark); }
.wiki { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.wiki-drives { display: grid; gap: 2px; background: var(--card); border-radius: var(--r); padding: 8px; position: sticky; top: 64px; }
.wd { border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); font-size: 14px; }
.wd:hover { background: var(--sel); }
.wd.on { background: var(--sel); font-weight: 600; }
.wiki-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 0 0 8px; }
.wiki-head h3 { margin: 0; font-size: 16px; }
.wnode > summary { cursor: pointer; padding: 6px 8px; border-radius: 8px; list-style: none; }
.wnode > summary::-webkit-details-marker { display: none; }
.wnode > summary:hover { background: var(--sel); }
.wkids { margin-left: 18px; border-left: 1px solid var(--line); padding-left: 8px; }
.wfile { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; color: var(--ink); }
.wfile:hover { background: var(--sel); text-decoration: none; }
.wfile .muted { margin-left: auto; }
.org-tog { border: 0; background: transparent; color: var(--blue); font-size: 12px; text-align: left; cursor: pointer; padding: 2px 4px; }
@media (max-width: 767px) { .wiki { grid-template-columns: 1fr; } .wiki-drives { position: static; } }

/* ⋯ actions menu for editors (Oct 15) — quiet until hovered/focused; always visible on touch screens */
.link-wrap { position: relative; }
.link.has-kb { padding-right: 44px; }
.ann { position: relative; }
.kb { position: relative; flex: none; }
.link-wrap > .kb { position: absolute; top: 8px; right: 8px; }
.formrow .kb { margin-left: 2px; }
.kb-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.kb-btn svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.kb-btn:hover, .kb-btn[aria-expanded="true"] { background: var(--sel); color: var(--ink); }
.kb-btn:focus-visible { outline: 2px solid var(--blue, #0071e3); outline-offset: 1px; }
@media (hover: hover) {
  .link-wrap > .kb .kb-btn, .ann .kb .kb-btn, .formrow .kb .kb-btn, .mrow .kb .kb-btn { opacity: 0; transition: opacity .12s; }
  .link-wrap:hover .kb-btn, .ann:hover .kb-btn, .formrow:hover .kb-btn, .mrow:hover .kb-btn, .kb-btn:focus-visible, .kb-btn[aria-expanded="true"] { opacity: 1; }
}
.kb-menu { position: absolute; right: 0; top: 34px; z-index: 30; min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; }
.kb-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.kb-item svg { width: 16px; height: 16px; flex: none; }
.kb-item:hover:not([disabled]), .kb-item:focus-visible { background: var(--sel); outline: none; }
.kb-item[disabled] { color: var(--hint); cursor: default; }
.kb-item.danger { color: #c62828; }
@media (prefers-reduced-motion: reduce) { .kb-btn { transition: none; } }

/* Waiting for you (doc 19 §14) — numbers, today's meetings, Overdue / Today / This week */
.wait { display: flex; flex-direction: column; gap: 12px; }
.k-app { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hint); margin: 2px 2px -4px; }
.w-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.w-num { display: flex; flex-direction: column; gap: 3px; min-height: 112px; background: var(--card); border-radius: var(--r); padding: 14px 16px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: box-shadow .12s, transform .12s; }
.w-num:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--blue-soft), 0 4px 14px rgba(0,0,0,.06); }
.k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.k-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.k-ico svg { width: 18px; height: 18px; }
.k-ico.late { background: #fdecec; color: #c62828; } .k-ico.due { background: #fff4e0; color: #b26a00; }
.k-ico.info { background: var(--blue-soft); color: var(--blue); } .k-ico.ok { background: #e7f6ec; color: #1e7b3a; }
.k-val { font-size: 28px; line-height: 1; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.k-lbl { font-size: 14px; font-weight: 600; }
.k-ctx { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .w-num { transition: none; } }
.w-group { background: var(--card); border-radius: var(--r); padding: 6px 6px 8px; }
.w-head { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 6px; }
.w-head.late { color: #c62828; } .w-n { font-weight: 400; color: var(--hint); margin-left: 4px; }
.w-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; }
.w-row:hover { background: var(--canvas); }
.w-main { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; }
.w-main:hover { text-decoration: none; } .w-main:hover b { text-decoration: underline; }
.w-main b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.w-sub { font-size: 12.5px; color: var(--muted); }
.w-app { flex: none; font-size: 11.5px; color: var(--hint); }
.w-time { flex: none; width: 70px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.w-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hint); }
.w-dot.overdue { background: #c62828; } .w-dot.today { background: #0071e3; } .w-dot.week { background: var(--field); }
@media (max-width: 600px) { .w-row.meet { flex-wrap: wrap; } .w-time { width: auto; } }

/* Assigned to Me (doc 19 §14.6) */
.am-list { background: var(--card); border-radius: var(--r); padding: 4px; }
.am-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.am-row + .am-row { border-top: 1px solid var(--line); border-radius: 0; }
.am-row:hover { background: var(--canvas); text-decoration: none; } .am-row:hover b { text-decoration: underline; }
.am-app { flex: none; width: 64px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--hint); }
.am-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.am-main b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.am-num { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.am-sub { font-size: 12.5px; color: var(--muted); }
.am-due { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.am-due.late { color: #c62828; font-weight: 600; } .am-due.today { color: #0071e3; font-weight: 600; }
.am-go { flex: none; color: var(--hint); }
@media (max-width: 600px) { .am-row { flex-wrap: wrap; } .am-app { width: auto; } .am-due { order: 3; width: 100%; padding-left: 0; } }
.toolbar .spacer { flex: 1; }

/* Academic / Activity label on events */
.evlist { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.chips .segs { margin-right: 6px; }

/* Year calendar for print (the school's paper format; Hub's 5 types and colours) */
.board { background: #fff; color: #111; border-radius: var(--r); padding: 18px; max-width: 1040px; font-size: 11px; }
.b-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; text-align: center; }
.b-school { font-size: 20px; font-weight: 700; letter-spacing: .04em; } .b-title { font-size: 16px; font-weight: 700; }
.b-body { display: grid; grid-template-columns: 170px 1fr 170px; gap: 12px; align-items: start; }
.b-side { display: flex; flex-direction: column; gap: 10px; }
.bm-h { background: #2d4a7a; color: #fff; text-align: center; font-weight: 700; font-size: 11px; padding: 2px 0; }
.bm-g { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid #c9d3e3; border-top: 0; }
.bm-g b { background: #8fa8cf; color: #fff; font-size: 9px; text-align: center; font-weight: 600; }
.bm-g span { font-size: 9.5px; text-align: center; padding: 1px 0; font-variant-numeric: tabular-nums; }
.bm-g span.wk { background: #eef1f6; color: #666; }
.bm-g span.hit { background: var(--c); color: #fff; font-weight: 700; }
.bt { width: 100%; border-collapse: collapse; } .bt th { background: #2d4a7a; color: #fff; text-align: left; padding: 3px 5px; font-size: 10.5px; }
.bt td { border: 1px solid #9aa7bd; padding: 2px 5px; vertical-align: top; font-size: 10.5px; } .bt td.c, .bq td.c { text-align: center; white-space: nowrap; }
.bt .t { color: #555; } .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--c); margin-right: 5px; vertical-align: -1px; }
.blg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0; font-size: 10.5px; }
.bq { border-collapse: collapse; margin-top: 4px; } .bq th { background: #2d4a7a; color: #fff; padding: 3px 8px; font-size: 10.5px; } .bq td { border: 1px solid #9aa7bd; padding: 2px 8px; font-size: 10.5px; }
.bnote { font-size: 9.5px; color: #555; margin: 4px 0 0; }
@media (max-width: 900px) { .b-body { grid-template-columns: 1fr; } .b-side { flex-direction: row; flex-wrap: wrap; } .bm { width: 160px; } }
@page { size: letter portrait; margin: 0.3in; }
/* One Letter page (product owner Oct 16): .fit = the print layout, also applied on screen for a moment so the page can
   measure itself; --z shrinks it just enough to fit (set in pagePrint). Width grows by 1/z so the zoomed page fills the width. */
.board.fit { width: calc(7.9in / var(--z, 1)); max-width: none; padding: 0; font-size: 9px; zoom: var(--z, 1); border-radius: 0; }
.board.fit .b-body { grid-template-columns: 1.5in 1fr 1.5in; gap: 8px; }
.board.fit .b-side { flex-direction: column; gap: 6px; }
.board.fit .b-head { margin-bottom: 6px; } .board.fit .b-head img { width: 42px; height: auto; }
.board.fit .b-school { font-size: 16px; } .board.fit .b-title { font-size: 13px; }
.board.fit .bt td, .board.fit .bt th { font-size: 8px; padding: 0 4px; line-height: 1.25; }
.board.fit .bm-g span { font-size: 8px; padding: 0; } .board.fit .bm-h { font-size: 9.5px; padding: 1px 0; } .board.fit .bm-g b { font-size: 7.5px; }
.board.fit .blg, .board.fit .bq td, .board.fit .bq th { font-size: 8px; } .board.fit .bnote { font-size: 7.5px; }
@media print {
  body, .shell-main, main { background: #fff !important; }
  .side, header.top, .scrim, .noprint, .toast, .skip { display: none !important; }
  .shell { display: block !important; } .page { padding: 0 !important; max-width: none !important; }
  .bm-g span.hit, .bm-h, .bm-g b, .bt th, .bq th, .sw { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .board.fit, .bt tr { break-inside: avoid; }
}
}
