/* Components shared by every layout. Class prefix jb- (never "ad-": ad blockers hide those). */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--paper); -webkit-text-size-adjust: 100%; }
a { color: var(--maroon-text); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid rgba(101, 11, 9, .35); outline-offset: 2px; }
.jb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* type */
.jb-h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; }
.jb-h2 { font-family: var(--caps); font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--maroon-text); }
.jb-eyebrow { font-family: var(--caps); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-text); }
.jb-kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.jb-lede { font-family: var(--serif); font-size: 15px; color: #4A4A4A; }
#jb-main .jb-lede { max-width: 90ch; }   /* page intros keep a readable line on big screens (they ran ~290 characters wide at 2560) */
.jb-muted { color: var(--ink-3); font-size: 13px; }
.jb-small { font-size: 13px; }
.jb-serif { font-family: var(--serif); }
.tone-due { color: var(--maroon-text); } .tone-warn { color: var(--amber-ink); } .tone-ok { color: var(--sage-ink); } .tone-muted { color: #5A5A5A; }

/* layout helpers */
.jb-stack { display: flex; flex-direction: column; gap: 22px; }
.jb-stack-sm { display: flex; flex-direction: column; gap: 10px; }
.jb-cols { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.jb-cols > * { min-width: 0; }
.jb-col-1 { flex: 1 1 280px; } .jb-col-15 { flex: 1.5 1 400px; } .jb-col-2 { flex: 2 1 480px; } .jb-col-3 { flex: 3 1 560px; }
.jb-row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
/* a heading or intro with buttons beside it: long text wraps in its own column instead of pushing the buttons down */
.jb-page-head > :first-child:not(:only-child), .jb-row-between:has(> .jb-btn, > button, > .jb-inline, > a.jb-link) > :first-child { flex: 1 1 280px; min-width: 0; }
.jb-page-head > :not(:first-child), .jb-row-between > :not(:first-child) { flex-shrink: 0; }
.jb-row-between:has(> .jb-btn, > button, > .jb-inline, > a.jb-link) > .jb-seg:first-child { flex: 0 1 auto; }   /* a segmented control keeps its own width */
@media (max-width: 640px) { .jb-page-head > .jb-inline { flex: 1 1 100%; min-width: 0; } }   /* phone: a heading's buttons wrap under it instead of running off the screen */
.jb-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* a row of buttons beside a heading may wrap onto its own line, and within it, but never runs off a phone's screen */
.jb-page-head > .jb-inline:not(:first-child), .jb-row-between > .jb-inline:not(:first-child) { flex-shrink: 1; min-width: 0; max-width: 100%; }
.jb-grow { flex: 1 1 auto; min-width: 0; }
.jb-grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

/* cards */
.jb-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.jb-card > .jb-row-between:first-child { margin-bottom: 8px; }
.jb-card.flush { padding: 0; overflow: hidden; }
.jb-card.sage { background: var(--sage); color: var(--on-sage); border: 0; }
.jb-card.sage .jb-h2 { color: var(--on-sage); }
.jb-card.maroon { background: var(--maroon); color: var(--on-maroon); border: 0; }
.jb-card.maroon .jb-h2 { color: var(--on-maroon); }
.jb-card.wash { background: var(--maroon-wash); border-color: var(--maroon-line); }
.jb-card.mist { background: var(--sage-mist); border-color: var(--sage-line); }
.jb-link { font-size: 14px; font-weight: 600; color: var(--maroon-text); text-decoration: none; }
.jb-link:hover { text-decoration: underline; }
/* the back link above a page (“‹ Manage account”, “‹ Duty rosters”): chevron and words on one line, centered */
.jb-backlink, a.jb-link:has(> .jb-ico:first-child) { display: inline-flex; align-items: center; gap: 4px; }
.jb-backlink { font-size: 14px; font-weight: 600; color: var(--maroon-text); text-decoration: none; }
.jb-backlink:hover { text-decoration: underline; }
.jb-backlink .jb-ico, a.jb-link > .jb-ico:first-child { width: 16px; height: 16px; }
button.jb-link { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.jb-kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); font-size: 14px; }
.jb-card:not(.sage):not(.maroon) .jb-kv { border-bottom-color: var(--line-soft); }
.jb-kv b { white-space: nowrap; }
.jb-kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 18px; display: flex; align-items: center; gap: 14px; }
.jb-kpi .v { font-family: var(--caps); font-size: 24px; font-weight: 600; color: var(--maroon-text); min-width: 64px; }
.jb-kpi .l { font-size: 14px; font-weight: 600; }
.jb-kpi.big { flex-direction: column; align-items: flex-start; gap: 2px; }
.jb-kpi.big .v { font-size: 28px; }

/* buttons */
.jb-btn { min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 0; background: var(--maroon); color: var(--on-maroon); font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.jb-btn:hover { background: var(--maroon-ink); }
.jb-btn.outline { background: #fff; color: var(--maroon-text); border: 1px solid #CDB9B8; }
.jb-btn.outline:hover { background: var(--maroon-wash); }
.jb-btn.sage { background: var(--sage); color: var(--on-sage); } .jb-btn.sage:hover { background: var(--sage-ink); }
.jb-btn.ghost { background: transparent; color: var(--ink-3); }
.jb-btn.ghost:hover { background: var(--chip); }
.jb-btn.light { background: var(--paper); color: var(--sage-text); font-weight: 700; }
.jb-btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.jb-btn[disabled] { opacity: .5; cursor: default; }
.jb-btn.block { width: 100%; }
.jb-iconbtn { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid #DCD6CA; background: #fff; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.jb-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* AI: the filled sparkle everywhere AI appears, and one gentle multi-color wash (the setup guide's) behind every AI surface */
.jb-ico.ai { fill: currentColor; stroke: currentColor; stroke-width: 1.2; }
:root { --ai-wash: linear-gradient(165deg, color-mix(in srgb, var(--brand, var(--sage)) 12%, var(--card)), color-mix(in srgb, var(--accent) 8%, var(--card)));
  --ai-edge: color-mix(in srgb, var(--brand, var(--sage)) 24%, var(--line));
  --ai-tile: linear-gradient(135deg, var(--maroon), color-mix(in srgb, var(--maroon) 70%, #6d5dfc)); }

/* pills & chips */
.jb-pill { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--sage-tint); color: var(--sage-ink); }
/* a connection that's working (Stripe accepting payments, an integration connected, a domain live): always green,
   never the school's brand color, with a dot so it reads as a status at a glance */
.pill-live { background: #E3F5E8; color: #17663A; box-shadow: inset 0 0 0 1px #B7E2C4; display: inline-flex; align-items: center; gap: 6px; }
.pill-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #1F9D55; box-shadow: 0 0 0 3px rgba(31, 157, 85, .18); flex: none; } .pill-warn { background: var(--amber-tint); color: var(--amber); }
.pill-due { background: var(--maroon-tint); color: var(--maroon-text); } .pill-muted { background: var(--chip); color: #454545; }
.jb-chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; line-height: 1; padding: 4px 8px; border-radius: 4px; }
.jb-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #EA580C; color: #fff;   /* alert counts: always orange, never the school's colours */
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.jb-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--chip); gap: 3px; flex-wrap: wrap; }
.jb-seg button { min-height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent; color: #454545; font-weight: 600; font-size: 13px; cursor: pointer; }
.jb-seg button[aria-pressed="true"] { background: #fff; color: var(--maroon-text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.jb-kids { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jb-kids button { min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid #DCD6CA; background: #fff; color: #333; font-weight: 600; font-size: 14px; cursor: pointer; }
.jb-kids button[aria-pressed="true"] { border-color: var(--sage); background: var(--sage); color: var(--on-sage); }
.jb-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sage-tint); color: var(--sage-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.jb-avatar.maroon { background: var(--maroon); color: var(--on-maroon); }

/* lists */
.jb-list > * { border-bottom: 1px solid var(--line-soft); }
.jb-list > *:last-child { border-bottom: 0; }
/* Big screens (desktop-ready rule): a long list in a wide card flows into side-by-side columns, each at least 600px,
   instead of stretching every row across the screen. Laptops, phones and narrow cards (widgets, side panels) keep one
   column on their own, since the column count comes from the card's width. Opt out with .jb-list.one-col. */
.jb-card > .jb-list:not(.one-col):has(> :nth-child(6)) { columns: 600px; column-gap: 56px; }
.jb-card > .jb-list:not(.one-col) > * { break-inside: avoid; }
.jb-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; flex-wrap: wrap; }
/* list rows: the text takes the free space and wraps; buttons stay together on the right, on the same line */
.jb-item > .jb-grow { flex: 1 1 0%; min-width: 0; }
.jb-item > .jb-grow ~ * { flex-shrink: 0; }
.jb-item > .jb-grow + * { margin-left: auto; }
@media (max-width: 640px) {
  .jb-item > .jb-grow { flex-basis: 100%; }                         /* phones: text first, actions on their own line */
  .jb-item > :not(.jb-grow) + .jb-grow { flex-basis: calc(100% - 72px); }   /* …beside a leading avatar or chip */
}
.jb-item .t { font-weight: 700; font-size: 15px; }
.jb-item a.t { color: var(--ink); text-decoration: none; }
.jb-item a.t:hover { color: var(--maroon-text); text-decoration: underline; }
.jb-bar-left { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.jb-msg { display: flex; gap: 12px; padding: 11px 0; align-items: flex-start; text-decoration: none; color: inherit; }
.jb-msg:hover .s { text-decoration: underline; }
.jb-msg .s { font-size: 14px; color: #2A2A2A; }
.jb-msg.unread .s { font-weight: 700; }
.jb-empty { padding: 18px; text-align: center; color: var(--ink-3); font-size: 14px; }
/* a page's outline while its data comes (app.js SKELETON); fades in late so quick pages never flash it */
.jb-empty.jb-skel { padding: 4px 0; text-align: left; display: flex; flex-direction: column; gap: 16px; animation: jb-sk-in .2s ease-out .15s both; }
.jb-skel .sk-head i { height: 26px; border-radius: 8px; }
.jb-skel .sk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.jb-skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--chip-soft) 25%, var(--chip) 50%, var(--chip-soft) 75%); background-size: 200% 100%; animation: jb-sk 1.4s ease-in-out infinite; }
@keyframes jb-sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes jb-sk-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .jb-skel i { animation: none; } }

/* bars */
.jb-meter { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; }
.jb-meter > span { display: block; height: 100%; border-radius: 99px; background: var(--sage); }
.jb-meter.thin { height: 4px; }
.jb-meter > span.due { background: var(--maroon); }

/* tables */
.jb-tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.jb-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.jb-tbl th { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5A5A5A; text-align: left; white-space: nowrap; }
.jb-tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.jb-tbl td.num, .jb-tbl th.num { text-align: right; white-space: nowrap; }
.jb-tbl tr.click { cursor: pointer; } .jb-tbl tr.click:hover td { background: var(--chip-soft); }
.jb-tbl td.strong { font-weight: 600; }
.jb-tbl .missing { color: var(--maroon-text); font-weight: 700; } .jb-tbl .tograde { color: var(--amber); font-style: italic; }

/* forms */
.jb-field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.jb-field > span { font-weight: 600; }
.jb-input, .jb-field input, .jb-field select, .jb-field textarea { min-height: 44px; padding: 8px 12px; border: 1px solid #D5CFC2; border-radius: var(--r-sm); background: #fff; width: 100%; font-size: 16px; }
.jb-field textarea { min-height: 96px; resize: vertical; }
.jb-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.jb-form .wide { grid-column: 1 / -1; }
.jb-check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.jb-check input { width: 20px; height: 20px; accent-color: var(--sage); margin: 0; }
.jb-search { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 1px solid #DCD6CA; border-radius: var(--r-sm); background: #fff; color: var(--ink-3); }
.jb-search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); font-size: 15px; }
.jb-error { color: var(--maroon-text); font-size: 14px; font-weight: 600; }

/* tabs */
.jb-tabs { display: flex; gap: 2px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.jb-tabs a { padding: 10px 0; margin-bottom: -1px; font-weight: 600; font-size: 15px; color: var(--ink-3); text-decoration: none; border-bottom: 2px solid transparent; }
.jb-tabs a[aria-current="page"] { color: var(--maroon-text); border-bottom-color: var(--maroon); }

/* banner */
.jb-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 16px; border-radius: 10px; background: var(--sage-mist); border: 1px solid var(--sage-line); }
.jb-banner b { color: var(--sage-ink); font-size: 14px; white-space: nowrap; }
.jb-banner span { flex: 1 1 300px; font-size: 14px; }
.jb-banner.wash { background: var(--maroon-wash); border-color: var(--maroon-line); border-left: 4px solid var(--maroon); }
.jb-banner.wash b { color: var(--maroon-text); }

/* sheet / modal */
.jb-scrim { position: fixed; inset: 0; background: rgba(27, 20, 15, .38); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.jb-sheet { background: var(--paper); border-radius: var(--r-lg); width: min(640px, 100%); max-height: calc(92vh / var(--zf, 1)); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.jb-sheet.wide { width: min(920px, 100%); }
.jb-sheet header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.jb-sheet .body { padding: 18px 20px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.jb-sheet footer { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
/* phones: panels pop up in the middle of the screen (not a sheet sliding up from the bottom); a one-finger swipe down
   closes one (core.js sheet: only when its content is already at the top, so a swipe that can scroll scrolls instead) */
@media (max-width: 640px) {
  .jb-scrim:not(.right):not(.full) { align-items: center; padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); }
  .jb-scrim:not(.right):not(.full) > .jb-sheet { border-radius: 20px; max-height: calc(86vh / var(--zf, 1)); max-height: calc(86dvh / var(--zf, 1)); animation: jb-pop-in .18s cubic-bezier(.2, .9, .3, 1); }
  .jb-scrim:not(.right):not(.full) > .jb-sheet > footer { padding-bottom: 12px; }
}
.jb-sheet.jb-dragging { transition: none !important; }
.jb-sheet.jb-snap { transition: transform .22s cubic-bezier(.2, .9, .3, 1); }
.jb-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 80; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
.jb-toast.err { background: var(--maroon); color: var(--on-maroon); }

/* messages */
.jb-thread { display: flex; flex-direction: column; gap: 12px; }
.jb-bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; }
.jb-bubble.mine { align-self: flex-end; background: var(--sage-mist); border-color: var(--sage-line); }
.jb-bubble .meta { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; display: flex; gap: 8px; }

/* calendar */
.jb-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.jb-cal > div { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; font-size: 12px; background: #fff; overflow: hidden; }
.jb-cal .dow { min-height: 0; background: var(--chip-soft); font-weight: 700; text-align: center; color: var(--ink-3); }
.jb-cal .out { background: var(--chip-soft); color: var(--ink-4); }
.jb-cal .is-today { box-shadow: inset 0 0 0 2px var(--maroon); }
.jb-cal .n { font-weight: 700; display: block; margin-bottom: 3px; }
.jb-cal .ev { display: block; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--sage-tint); color: var(--sage-ink); }
.jb-cal .ev.due { background: var(--maroon-tint); color: var(--maroon-text); }
.jb-cal .ev.live { background: var(--amber-tint); color: var(--amber); }
@media (max-width: 720px) { .jb-cal > div { min-height: 64px; padding: 3px; } .jb-cal .ev { font-size: 10px; } }

/* gradebook */
.jb-gb td.cell { padding: 0; text-align: center; min-width: 76px; }
.jb-gb td.cell button { width: 100%; min-height: 40px; border: 0; background: transparent; cursor: pointer; font-size: 14px; }
.jb-gb td.cell button:hover { background: var(--chip-soft); }
.jb-gb th { white-space: normal; min-width: 76px; vertical-align: bottom; }
.jb-gb td:first-child, .jb-gb th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; }
.jb-marks { display: flex; gap: 4px; }
.jb-marks button { width: 38px; height: 38px; border-radius: 8px; border: 0; background: #F1F1F3; color: #8A8478; font-weight: 700; cursor: pointer; }
.jb-marks button[aria-pressed="true"].P { background: var(--sage); color: var(--on-sage); }
.jb-marks button[aria-pressed="true"].A { background: var(--maroon); color: var(--on-maroon); }
.jb-marks button[aria-pressed="true"].T { background: var(--amber-ink); color: #fff; }
.jb-marks button[aria-pressed="true"].E { background: #4A5A78; color: #fff; }
.jb-marks button[aria-pressed="true"].D { background: #6B5B95; color: #fff; }

/* admissions board */
.jb-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.jb-lane { background: var(--chip-soft); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.jb-lane h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.jb-appcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; display: block; }
.jb-appcard:hover { border-color: var(--maroon); }

/* lesson player */
.jb-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); background: #111; color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.jb-video .cap { position: absolute; top: 16px; left: 20px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #9A9A9A; }
.jb-video .ttl { font-weight: 300; font-size: clamp(22px, 4vw, 40px); text-align: center; padding: 0 30px; }
.jb-video .play { position: absolute; left: 50%; top: 68%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.jb-video .bar { position: absolute; left: 20px; right: 20px; bottom: 16px; display: flex; align-items: center; gap: 12px; color: #CFCFCF; font-size: 13px; }
.jb-video .bar .track { flex: 1; height: 3px; background: rgba(255,255,255,.25); border-radius: 99px; overflow: hidden; }
.jb-video .bar .track span { display: block; height: 100%; background: #fff; }
.jb-step { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.jb-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #CFCFCF; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.jb-dot.done { background: var(--sage); border-color: var(--sage); color: var(--on-sage); }
.jb-dot.cur { border: 2px solid var(--maroon); }
.jb-outline .lesson { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14px; }
.jb-outline .lesson:hover { background: var(--chip-soft); }
.jb-outline .lesson.cur { background: var(--sage-mist); font-weight: 600; }
.jb-quiz .q { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.jb-quiz label { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.jb-quiz .right { color: var(--sage-ink); font-weight: 700; } .jb-quiz .wrong { color: var(--maroon-text); font-weight: 700; }

/* print: progress reports, transcripts, receipts */
.jb-paper { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 36px 40px; max-width: 860px; }
.jb-paper h1 { font-family: var(--caps); letter-spacing: .08em; font-size: 22px; color: var(--maroon-text); }
@media print {
  body { background: #fff; }
  .jb-noprint, .jb-rail, .jb-top, .jb-week, .jb-banner { display: none !important; }
  .jb-main { padding: 0 !important; }
  .jb-paper { border: 0; padding: 0; max-width: none; }
}

/* sign-in */
.jb-login { min-height: calc(100vh / var(--zf, 1)); display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--paper); }
.jb-login-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 28px 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
.jb-login-logo { width: 240px; max-width: 100%; max-height: 130px; object-fit: contain; align-self: center; }
.jb-demo { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.jb-demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jb-demo-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; text-align: left; color: var(--ink); }
.jb-demo-btn:hover { border-color: var(--maroon); background: #fff; }
.jb-demo-btn .jb-ico { color: var(--sage-text); margin-bottom: 4px; }
.jb-demo-btn span { font-size: 13px; color: var(--ink-3); }
.jb-video .play .jb-ico { fill: #111; stroke: none; margin-left: 3px; width: 24px; height: 24px; }
.jb-lesson { max-width: 940px; }

/* update notice (pwa-update-notice skill): top centre, never over the phone tab bar */
.update-bar{position:fixed;left:12px;right:12px;margin:0 auto;top:calc(env(safe-area-inset-top,0px) + 12px);z-index:8500;display:flex;align-items:center;gap:12px;width:fit-content;max-width:560px;box-sizing:border-box;padding:8px 8px 8px 16px;border-radius:16px;background:var(--maroon-ink);color:var(--on-maroon-ink);font-family:var(--sans,inherit);font-weight:600;font-size:14.5px;box-shadow:0 14px 34px rgba(0,0,0,.3);animation:upd-in .35s cubic-bezier(.2,.9,.3,1)}
.update-bar button{flex:none;border:0;border-radius:999px;padding:8px 16px;background:#fff;color:var(--maroon-ink);font:inherit;font-weight:700;cursor:pointer}
@keyframes upd-in{from{opacity:0;transform:translateY(-14px)}}
@media (prefers-reduced-motion:reduce){.update-bar{animation:none}}

/* search results (header dropdown and full page) */
.jb-kbd { font: 600 11px var(--sans); color: var(--ink-4); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.jb-sr-pop { position: absolute; left: 0; right: 0; top: 50px; min-width: min(520px, calc(100vw / var(--zf, 1) - 32px)); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 44px rgba(40,30,20,.18); z-index: 45; max-height: calc(70vh / var(--zf, 1)); overflow: auto; padding: 6px 0; }
.jb-sr-group + .jb-sr-group { border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 4px; }
.jb-sr-head { display: flex; justify-content: space-between; padding: 8px 16px 4px; font-family: var(--caps); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--maroon-text); }
.jb-sr-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 16px; text-decoration: none; color: var(--ink); }
.jb-sr-item:hover, .jb-sr-item.on { background: var(--sage-mist); }
.jb-sr-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--chip-soft); color: var(--sage-text); display: flex; align-items: center; justify-content: center; flex: none; }
.jb-sr-ico .jb-ico { width: 17px; height: 17px; }
.jb-sr-label { display: block; font-weight: 600; font-size: 14.5px; }
.jb-sr-sub { display: block; font-size: 13px; color: var(--ink-3); }
.jb-sr-snip { display: block; font-size: 13px; color: #4A4A4A; margin-top: 2px; }
.jb-sr-item mark, .jb-sr-page mark { background: var(--amber-tint); color: inherit; border-radius: 3px; padding: 0 1px; }
.jb-sr-all { display: block; padding: 10px 16px 8px; border-top: 1px solid var(--line-soft); margin-top: 4px; font-weight: 600; color: var(--maroon-text); text-decoration: none; }
.jb-sr-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.jb-sr-page .jb-sr-group { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 0 10px; margin: 0; }
.jb-sr-page .jb-sr-group + .jb-sr-group { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 0; }
.jb-sr-more { display: inline-block; padding: 6px 16px 0; }

/* calendar items are buttons */
.jb-cal button.ev { width: 100%; border: 0; text-align: left; font: inherit; font-size: 12px; cursor: pointer; }
.jb-cal button.ev:hover { filter: brightness(.94); text-decoration: underline; }
.jb-more-ev { border: 0; background: none; padding: 0 2px; font: inherit; font-size: 12px; color: var(--maroon-text); cursor: pointer; }
.jb-cal-row { width: 100%; border: 0; border-bottom: 1px solid var(--line-soft); background: none; font: inherit; color: inherit; cursor: pointer; }
.jb-cal-row:hover { background: var(--chip-soft); }
@media (max-width: 720px) { .jb-cal button.ev { font-size: 10px; } }
/* phones: a day shows a dot per item (its color) and opens the day's list, which reads at full size */
.jb-cal-dots, .jb-cal-hint.phone { display: none; }
@media (max-width: 600px) {
  .jb-cal > div { min-height: 58px; position: relative; }
  .jb-cal .ev, .jb-cal .jb-more-ev, .jb-cal-hint { display: none; }
  .jb-cal-hint.phone { display: block; margin-top: 6px; }
  .jb-cal-legend .jb-chip::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--sage); }
  .jb-cal-legend .pill-due::before { background: var(--maroon); }
  .jb-cal-legend .pill-warn::before { background: var(--amber-ink); }
  .jb-cal-legend .pill-mine::before { background: var(--accent); }
  .jb-cal-dots { display: flex; flex-wrap: wrap; align-content: flex-end; gap: 3px; position: absolute; inset: 0; padding: 0 5px 7px; border: 0; background: none; cursor: pointer; font: inherit; }
  .jb-cal-dots:focus-visible { outline: 2px solid var(--maroon); outline-offset: -2px; }
  .jb-cal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
  .jb-cal-dots i.event { background: var(--sage); }
  .jb-cal-dots i.due { background: var(--maroon); }
  .jb-cal-dots i.live { background: var(--amber-ink); }
  .jb-cal-dots i.mine { background: var(--accent); }
  .jb-cal-dots b { font-size: 10px; line-height: 7px; color: var(--ink-3); }
  .jb-cal-row > b:first-child { min-width: 0 !important; width: 62px; flex: none; text-align: left; color: var(--ink-3); }
}

/* every overview card leads somewhere */
a.jb-kpi, button.jb-kpi, a.jb-cardlink, .jb-cardlink[data-href] { position: relative; text-decoration: none; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
button.jb-kpi { font: inherit; text-align: left; width: 100%; }
a.jb-kpi:hover, button.jb-kpi:hover, a.jb-cardlink:hover, .jb-cardlink[data-href]:hover { border-color: var(--maroon); box-shadow: var(--shadow); transform: translateY(-1px); }
a.jb-kpi::after, button.jb-kpi::after { content: '›'; position: absolute; top: 10px; right: 14px; font-size: 20px; line-height: 1; color: var(--ink-4); transition: transform .15s, color .15s; }
a.jb-kpi:hover::after, button.jb-kpi:hover::after { color: var(--maroon-text); transform: translateX(2px); }
.jb-card.maroon.jb-cardlink { color: var(--on-maroon); } .jb-card.sage.jb-cardlink { color: var(--on-sage); }   /* beat the card-link color reset */
.jb-card.maroon.jb-cardlink:hover { border-color: transparent; box-shadow: 0 8px 22px rgba(101,11,9,.25); }
a.jb-kpi:focus-visible, button.jb-kpi:focus-visible, a.jb-cardlink:focus-visible { outline: 3px solid rgba(101,11,9,.35); outline-offset: 2px; }
@keyframes jb-flash { 0% { box-shadow: 0 0 0 0 transparent; } 25% { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--spot) 50%, transparent), 0 0 18px 5px color-mix(in srgb, var(--spot) 32%, transparent); } 100% { box-shadow: 0 0 26px 10px transparent; } }
.jb-flash { animation: jb-flash 1.6s ease-out; scroll-margin-top: calc(var(--jb-head, 0px) + 16px); }
/* Spotlight (web/js/spotlight.js): the place a link sent you to glows for ~5 s, then fades back to normal */
@keyframes jb-spot {
  /* a soft warm glow: comes up in half a second, holds, then dissolves slowly (no hard ring) */
  0% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent, inset 0 0 0 999px transparent; }
  10% { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--spot) 55%, transparent), 0 0 22px 6px color-mix(in srgb, var(--spot) 38%, transparent), inset 0 0 0 999px color-mix(in srgb, var(--spot) 10%, transparent); }
  45% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--spot) 40%, transparent), 0 0 26px 8px color-mix(in srgb, var(--spot) 26%, transparent), inset 0 0 0 999px color-mix(in srgb, var(--spot) 7%, transparent); }
  75% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--spot) 18%, transparent), 0 0 30px 10px color-mix(in srgb, var(--spot) 12%, transparent), inset 0 0 0 999px color-mix(in srgb, var(--spot) 3%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent, 0 0 34px 12px transparent, inset 0 0 0 999px transparent; }
}
@keyframes jb-spot-bg { 10% { background-color: color-mix(in srgb, var(--spot) 16%, #fff); } 45% { background-color: color-mix(in srgb, var(--spot) 11%, #fff); } 75% { background-color: color-mix(in srgb, var(--spot) 4%, #fff); } }
.jb-spot { animation: jb-spot 5.6s cubic-bezier(.25, .1, .25, 1); scroll-margin: calc(var(--jb-head, 0px) + 24px); }
tr.jb-spot { animation: none; }
tr.jb-spot > td { animation: jb-spot-bg 5.6s cubic-bezier(.25, .1, .25, 1); }
@media (prefers-reduced-motion: reduce) { .jb-spot, tr.jb-spot > td { animation-duration: 5.6s; animation-timing-function: steps(2, jump-none); } }

@media (prefers-reduced-motion: reduce) { a.jb-kpi, button.jb-kpi, .jb-cardlink { transition: none; } a.jb-kpi:hover, .jb-cardlink:hover { transform: none; } }

/* dashboard widgets and customize mode */
.jb-zone { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.jb-zone > .jb-w > * { width: 100%; }
.jb-bottom .jb-zone { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 22px; }
.jb-bottom .jb-w.wide { flex: 2 1 480px; min-width: 0; }
.jb-bottom .jb-w.narrow { flex: 1 1 280px; min-width: 0; }
.jb-dash.editing .jb-zone { min-height: 120px; padding: 8px; border: 2px dashed var(--sage-line); border-radius: var(--r-lg); background: rgba(238, 241, 234, .5); }
.jb-dash.editing .jb-zone.drop-over { border-color: var(--maroon); background: var(--maroon-wash); }
.jb-w.editing { background: #fff; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line), var(--shadow); cursor: grab; }
.jb-w.editing.dragging { opacity: .45; }
.jb-w.editing.drop-before { box-shadow: 0 -4px 0 0 var(--maroon), 0 0 0 1px var(--line); }
.jb-wbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); background: var(--chip-soft); border-radius: var(--r) var(--r) 0 0; font-size: 13px; }
.jb-wbar .grip { color: var(--ink-4); font-size: 16px; cursor: grab; padding: 0 4px; }
.jb-wbar .jb-iconbtn { width: 32px; height: 32px; font-weight: 700; }
.jb-wbar select { width: auto; min-height: 32px; padding: 2px 6px; font-size: 13px; max-width: 150px; }
.jb-dropzone { border-radius: 10px; padding: 14px; text-align: center; color: var(--ink-4); font-size: 13px; }
.jb-bottom .jb-dropzone { flex: 1 1 200px; }
.jb-editbar { position: sticky; top: calc(var(--jb-head, 0px) + 8px); z-index: 20; box-shadow: var(--shadow); }
.jb-editbar span { flex: 1 1 260px; }
.jb-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jb-shortcuts a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; }
.jb-shortcuts a:hover { border-color: var(--maroon); color: var(--maroon-text); }
.jb-shortcuts .jb-ico { color: var(--sage-text); }
.jb-wbar { flex-wrap: wrap; row-gap: 4px; }
.jb-wbar b { flex: 1 1 calc(100% - 30px); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jb-wbar .jb-iconbtn:first-of-type { margin-left: auto; }

/* admissions: board, builder, automations */
.jb-kanban { grid-auto-flow: row; overflow-x: auto; }
.jb-kanban .jb-lane { min-width: 210px; }
.jb-lane.drop-over { background: var(--maroon-wash); outline: 2px dashed var(--maroon); }
.jb-lane-drop { display: none; border: 2px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; color: var(--ink-4); font-size: 12px; }
.jb-lane.drop-over .jb-lane-drop { display: block; }
.jb-appcard[draggable="true"] { cursor: grab; }
.jb-appcard.dragging { opacity: .4; }
.jb-auto-chip { align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--amber-ink); background: var(--amber-tint); border-radius: 99px; padding: 2px 8px; text-decoration: none; }
.jb-stagebar { display: flex; flex-wrap: wrap; gap: 0; }
.jb-stagebar button { position: relative; border: 0; background: var(--chip); color: var(--ink-2); font: 600 13px var(--sans); padding: 9px 16px 9px 22px; cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); margin-right: -4px; }
.jb-stagebar button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 14px; border-radius: 6px 0 0 6px; }
.jb-stagebar button:hover { filter: brightness(.95); }
.jb-stagebar button.on { background: var(--c); color: #fff; }
.jb-stagerow { flex-wrap: wrap; }
.jb-stagerow .grip { color: var(--ink-4); cursor: grab; font-size: 16px; }
.jb-stagerow.dragging { opacity: .4; }
.jb-autocard.off { opacity: .6; }
.jb-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.jb-flow > span { font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.jb-flow-when { background: var(--sage-mist); color: var(--sage-ink); font-weight: 600; }
.jb-flow-if { background: var(--amber-tint); color: var(--amber); }
.jb-flow-then { background: var(--chip-soft); border: 1px solid var(--line); }
.jb-flow-then b { color: var(--maroon-text); margin-right: 4px; }
.jb-flow > span + span::before { content: '→'; margin-right: 6px; color: var(--ink-4); }
.jb-flowstep { border-left: 4px solid var(--sage); padding: 4px 0 4px 14px; display: flex; flex-direction: column; gap: 8px; }
.jb-flowstep > b { font-family: var(--caps); letter-spacing: .12em; font-size: 13px; color: var(--sage-ink); }
.jb-flowstep.if { border-color: var(--amber-ink); } .jb-flowstep.if > b { color: var(--amber); }
.jb-flowstep.then { border-color: var(--maroon); } .jb-flowstep.then > b { color: var(--maroon-text); }
.jb-actioncard { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.jb-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.jb-switch input { width: 36px; height: 20px; accent-color: var(--sage); }

/* ---------- analytics (insights) ---------- */
.jb-ins-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; }
.jb-ins-tile { gap: 4px !important; min-height: 118px; }
.jb-ins-tile .l { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5A5A5A; }
.jb-ins-tile .v { font-size: 30px !important; }
.jb-spark { width: 96px; height: 26px; margin-top: auto; }
.jb-delta { font-size: 12.5px; font-weight: 700; white-space: nowrap; padding: 2px 6px; border-radius: 6px; }
.jb-delta.good { color: #1D5C2B; background: #E2F0E1; } .jb-delta.bad { color: #9B2C24; background: #FBE9E7; }   /* status colors stay fixed: never the platform or school color */ .jb-delta.flat { color: var(--ink-3); background: var(--chip); }
.jb-ins-card { min-width: 0; }
.jb-chart { position: relative; }
.jb-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.jb-chart .grid { stroke: #ECE8E0; stroke-width: 1; }
.jb-chart .ax { font: 11px var(--sans); fill: #6A6A6A; }
.jb-chart .ax.strong { font-weight: 700; fill: var(--ink); }
.jb-chart .lbl { font: 600 11.5px var(--sans); fill: var(--ink-2); }
.jb-chart .xhair { stroke: #8A8478; stroke-width: 1; stroke-dasharray: 3 3; }
.jb-chart .hit { fill: transparent; cursor: crosshair; }
.jb-tip { position: absolute; top: 34px; transform: translateX(12px); background: #1B1B1B; color: #fff; font-size: 12.5px; padding: 8px 10px; border-radius: 8px; pointer-events: none; z-index: 5; min-width: 140px; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.jb-tip.flip { transform: translateX(calc(-100% - 12px)); }
.jb-tip div { display: flex; align-items: center; gap: 6px; justify-content: space-between; } .jb-tip div b { margin-left: auto; }
.jb-tip i, .jb-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.jb-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin: 2px 0 6px; }
.jb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.jb-legend i { width: 14px; }
.jb-tableview { margin-top: 6px; font-size: 13px; } .jb-tableview summary { cursor: pointer; color: var(--ink-3); }
.jb-hbars { display: flex; flex-direction: column; gap: 9px; }
.jb-hbars .row { display: grid; grid-template-columns: minmax(82px, 30%) minmax(0, 1fr) auto; grid-template-areas: "lab track val" ". note note"; align-items: center; column-gap: 10px; font-size: 13.5px; }
.jb-hbars .lab { grid-area: lab; } .jb-hbars b { grid-area: val; text-align: right; } .jb-hbars .note { grid-area: note; font-size: 12px; }
.jb-hbars .track { grid-area: track; position: relative; height: 12px; background: #EFEFF2; border-radius: 99px; }
.jb-hbars .track > span { display: block; height: 100%; border-radius: 99px; }
.jb-hbars .track em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #6B6B6B; border-radius: 2px; }
.jb-segbar { display: flex; gap: 2px; height: 16px; border-radius: 99px; overflow: hidden; background: #EFEFF2; }
.jb-segbar span { display: block; height: 100%; }
.jb-act { align-items: flex-start; flex-wrap: nowrap; }
.jb-act-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--chip-soft); color: var(--ink-3); }
.sev-critical .jb-act-ico { background: #FBE9E7; color: #9B2C24; } .sev-warning .jb-act-ico { background: var(--amber-tint); color: var(--amber); }
.sev-good .jb-act-ico { background: #E2F0E1; color: #1D5C2B; } .sev-info .jb-act-ico { background: #E6EEF8; color: #2F6FB3; }
.jb-act .jb-btn { align-self: center; }
.jb-yoy td.cur, .jb-yoy th.cur { background: #F4F7FB; font-weight: 700; }
@media (max-width: 640px) { .jb-act { flex-wrap: wrap; } .jb-act .jb-btn { margin-left: 48px; } .jb-ins-tile .v { font-size: 24px !important; } }
@media print { .jb-ins-card, .jb-ins-tile { break-inside: avoid; } }

/* slide-out panel from the right (sheet({ side: 'right' })) */
.jb-scrim.right { justify-content: flex-end; align-items: stretch; padding: 0; }
.jb-sheet.jb-drawer { width: min(540px, 100%); max-height: none; height: calc(100vh / var(--zf, 1)); height: calc(100dvh / var(--zf, 1)); border-radius: 18px 0 0 18px; animation: jb-slide-in .22s cubic-bezier(.2, .9, .3, 1); }
.jb-sheet.jb-drawer .body { flex: 1 1 auto; }
@keyframes jb-slide-in { from { transform: translateX(100%); } }
@media (max-width: 640px) { .jb-sheet.jb-drawer { width: 100%; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { .jb-sheet.jb-drawer { animation: none; } }

/* near full-screen modal for dense editors (sheet({ size: 'full' })): the page lays out the body itself */
.jb-scrim.full { padding: 24px; }
.jb-sheet.jb-full { width: min(1480px, 100%); height: calc(100vh / var(--zf, 1) - 48px); height: calc(100dvh / var(--zf, 1) - 48px); max-height: none; animation: jb-pop-in .18s cubic-bezier(.2, .9, .3, 1); }
.jb-sheet.jb-full .body { flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; gap: 0; }
.jb-sheet.jb-full .body > .jb-error { flex: none; margin: 12px 24px 0; }
.jb-sheet.jb-full > header { padding: 14px 24px; }
.jb-sheet.jb-full > footer { padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); align-items: center; }
.jb-sheet-title { min-width: 0; }
.jb-sheet footer .jb-sheet-note { order: -1; margin-right: auto; align-self: center; font-size: 14px; color: var(--ink-2); }
.jb-sheet footer .jb-sheet-note:empty { display: none; }
.jb-sheet footer .jb-btn.jb-footleft { order: -2; }
@keyframes jb-pop-in { from { transform: translateY(8px) scale(.99); opacity: 0; } }
@media (max-width: 640px) {
  .jb-scrim.full { padding: 0; align-items: stretch; }
  .jb-sheet.jb-full { width: 100%; height: calc(100vh / var(--zf, 1)); height: calc(100dvh / var(--zf, 1)); max-height: none; border-radius: 0; }
  .jb-sheet.jb-full > header { padding: 12px 16px; }
  .jb-sheet.jb-full > footer { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .jb-sheet.jb-full footer .jb-sheet-note { flex: 1 1 100%; order: -3; }
  .jb-sheet.jb-full footer .jb-footleft { margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) { .jb-sheet.jb-full { animation: none; } }

/* visual sequence builder */
.vb { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .vb { grid-template-columns: 1fr; } }
.vb-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: calc(var(--jb-head, 0px) + 12px); max-height: calc(100vh / var(--zf, 1) - var(--jb-head, 0px) - 24px); max-height: calc(100dvh / var(--zf, 1) - var(--jb-head, 0px) - 24px); overflow-y: auto; padding-right: 4px; }
@media (max-width: 900px) { .vb-side { position: static; max-height: none; } }
.vb-side section { display: flex; flex-direction: column; gap: 8px; }
.vb-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.vb-stage { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.vb-stage:hover { background: var(--chip-soft); }
.vb-stage.on { background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.vb-stage.drop-before { box-shadow: 0 -3px 0 0 var(--maroon); }
.vb-stage.dragging { opacity: .4; }
.vb-stage .grip { color: var(--ink-4); cursor: grab; font-size: 15px; width: 12px; }
.vb-stage b { display: block; font-size: 15px; }
.vb-stage .jb-muted { display: block; font-size: 12px; }
.vb-num { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid var(--c, var(--sage)); color: var(--c, var(--sage)); background: #fff; position: relative; z-index: 1; }
.vb-stage.on .vb-num { background: var(--c, var(--sage)); color: #fff; }
.vb-num.start { --c: #4A5A78; margin-left: 22px; }
.vb-num.start .jb-ico { width: 16px; height: 16px; }
.vb-stage + .vb-stage::before { content: ''; position: absolute; left: 49px; top: -10px; height: 20px; border-left: 2px solid var(--line); }
.vb-stage:first-child + .vb-stage::before { left: 49px; }
.vb-count { font-size: 11px; font-weight: 700; color: var(--amber-ink); background: var(--amber-tint); border-radius: 99px; padding: 2px 7px; }
.vb-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 6px 0 0; }
.vb-palette, .vb-catalog { display: flex; flex-direction: column; gap: 6px; }
.vb-block { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: grab; text-align: left; font: inherit; color: var(--ink); }
.vb-block:hover { border-color: var(--maroon); }
.vb-block .jb-ico { width: 18px; height: 18px; flex: none; }
.vb-block.trig .jb-ico { color: #4A5A78; }
.vb-block.act .jb-ico { color: var(--maroon-text); }
.vb-block b { font-size: 13.5px; font-weight: 600; display: block; }
.vb-block .jb-muted { font-size: 12px; display: block; }
.vb-catalog .vb-block { cursor: pointer; padding: 12px 14px; }
.vb-canvas { min-width: 0; display: flex; flex-direction: column; gap: 18px; border-radius: var(--r-lg); padding: 4px; transition: background .15s; }
.vb-canvas.over, .vb-canvas.dragging-block { background: var(--sage-mist); outline: 2px dashed var(--sage-line); }
.vb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--c); color: #fff; padding: 14px 20px; border-radius: 12px; }
.vb-head b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.1; }
.vb-head-k { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.vb-head .jb-btn.light { color: var(--ink); }
.vb-auto { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 10px; }
.vb-auto.off { opacity: .6; }
.vb-trigger { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #EEF0F5; cursor: pointer; }
.vb-trigger:hover { box-shadow: 0 0 0 2px #4A5A78; }
.vb-trigger b { display: block; font-size: 16px; }
.vb-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #4A5A78; }
.vb-if { display: inline-block; margin-top: 4px; font-size: 12.5px; background: var(--amber-tint); color: var(--amber); border-radius: 6px; padding: 2px 8px; }
.vb-name { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.vb-ico { width: 34px; height: 34px; border-radius: 50%; background: #4A5A78; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.vb-ico .jb-ico { width: 17px; height: 17px; }
.vb-steps { list-style: none; margin: 0; padding: 0 0 0 16px; position: relative; }
.vb-steps::before { content: ''; position: absolute; left: 32px; top: 0; bottom: 22px; border-left: 2px solid var(--line); }
.vb-step { position: relative; display: flex; align-items: center; gap: 12px; padding: 3px 0; }
.vb-step.dragging { opacity: .4; }
.vb-dot { width: 14px; height: 14px; margin-left: 10px; border-radius: 50%; border: 2px solid var(--maroon); background: #fff; flex: none; position: relative; z-index: 1; }
.vb-bar { flex: 1; display: flex; align-items: center; gap: 12px; background: var(--maroon); color: var(--on-maroon); border-radius: 10px; padding: 10px 14px; cursor: pointer; min-width: 0; }
.vb-bar:hover, .vb-bar:focus-visible { background: var(--maroon-ink); }
.vb-bar .grip { cursor: grab; opacity: .7; }
.vb-bar .jb-ico { color: var(--on-maroon); opacity: .85; }
.vb-bar b { display: block; font-size: 14.5px; }
.vb-bar span span { display: block; font-size: 13px; color: var(--on-maroon); opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-bar .jb-grow { min-width: 0; }
.vb-n { font-size: 12px; font-weight: 700; opacity: .7; }
.vb-drop { height: 6px; margin: 0 0 0 38px; border-radius: 6px; transition: height .12s, background .12s; }
.vb-canvas.dragging-block .vb-drop, .vb-canvas.dragging-step .vb-drop { height: 16px; background: repeating-linear-gradient(90deg, var(--sage-line) 0 8px, transparent 8px 14px); }
.vb-drop.over { height: 40px !important; background: var(--maroon-wash) !important; outline: 2px dashed var(--maroon); }
.vb-add { display: flex; align-items: center; gap: 10px; padding: 6px 0 0; }
.vb-plus { width: 34px; height: 34px; margin-left: 0; border-radius: 50%; border: 2px dashed var(--ink-4); background: #fff; color: var(--ink-3); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; z-index: 1; }
.vb-plus:hover { border-color: var(--maroon); color: var(--maroon-text); }
.vb-tools { display: flex; justify-content: flex-end; gap: 4px; border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 6px; }
.vb-empty { background: #fff; border: 2px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.vb-newauto { display: flex; justify-content: center; }

/* Templates & automations */
.jb-tplcard { cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.jb-tplcard:hover, .jb-tplcard:focus-visible { border-color: var(--sage-line); box-shadow: 0 2px 10px rgba(62, 91, 61, .10); }
.jb-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; margin: 0; }
.jb-seqcard { display: flex; flex-direction: column; gap: 6px; }
.jb-seqcard.off { opacity: .6; }
.jb-qrow { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.jb-tplpick select { font-weight: 500; }
.jb-tplpick .jb-ico { width: 15px; height: 15px; vertical-align: -2px; }
/* automation Wait steps: a pause in the flow, not an action */
.vb-step.wait .vb-bar { background: #FBF3E4; color: var(--ink); border: 1.5px dashed #B7791F; }
.vb-step.wait .vb-bar:hover, .vb-step.wait .vb-bar:focus-visible { background: #F6E7CB; }
.vb-step.wait .vb-bar .jb-ico { color: #B7791F; }
.vb-step.wait .vb-bar span span { color: var(--ink-2, #5b554b); }
.vb-step.wait .vb-dot { border-color: #B7791F; border-style: dashed; }
.vb-block.act[data-block="action:wait"] .jb-ico, .vb-block.act[data-pick="wait"] .jb-ico { color: #B7791F; }
.jb-wait-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: #FBF3E4; border: 1px dashed #B7791F; }

/* Custom labels: preview popover */
.lp-btn { white-space: nowrap; }
.lp-btn .jb-ico { width: 16px; height: 16px; }
.lp-pop { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(40, 30, 20, .2); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; animation: lp-in .14s ease-out; }
@keyframes lp-in { from { opacity: 0; transform: translateY(4px); } }
.lp-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.lp-head b { font-size: 15px; }
.lp-use { display: flex; flex-direction: column; gap: 5px; }
.lp-where { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-ink); }
.lp-where .jb-muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.lp-mock { font-size: 14px; }
.lp-mock mark { background: var(--amber-tint); color: inherit; border-radius: 3px; padding: 0 2px; box-shadow: 0 0 0 1px rgba(122, 82, 0, .25); }
.lp-menu { align-self: flex-start; background: var(--sage); color: var(--on-sage); border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 13px; }
.lp-menu mark { background: #F1F4EE; color: var(--sage-ink); }
.lp-heading { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.15; }
.lp-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.lp-button { align-self: flex-start; background: var(--maroon); color: var(--on-maroon); border-radius: 8px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; }
.lp-button mark { background: #fff; color: var(--maroon-text); }
.lp-line, .lp-table { border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
.lp-table { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5A5A5A; }
.lp-was { font-size: 12px; color: var(--ink-4); text-decoration: line-through; }
.lp-foot { font-size: 12px; margin: 0; }

/* outside course content inside lessons (web/js/embeds.js) */
.jb-embed { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.jb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Integrations */
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ig-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card, #fff); color: inherit; font: inherit; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.ig-card:hover, .ig-card:focus-visible { border-color: var(--ink-3, #999); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.ig-card p { margin: 0; }
.ig-cta { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--maroon-text); }
.ig-tile { flex: none; display: inline-grid; place-items: center; border-radius: 10px; background: var(--c); color: #fff; font-weight: 700; letter-spacing: .02em; }
.ig-result { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); font-size: 14px; font-weight: 600; }
.ig-result .jb-ico { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ig-result.ok { background: var(--sage-tint); color: var(--sage-ink); }
.ig-result.bad { background: var(--amber-tint); color: var(--amber-ink); }
.ig-hook { display: flex; gap: 8px; align-items: center; }
.ig-hook code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; }
.ig-howto { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.ig-howto > summary { cursor: pointer; }
.ig-howto[open] > summary { margin-bottom: 8px; }
.ig-guide > p { margin: 0 0 8px; }
.ig-steps { margin: 0 0 10px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.ig-steps li { line-height: 1.45; }
.ig-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ig-flow > div { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); }
.ig-consent { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
@media (max-width: 560px) { .ig-flow { grid-template-columns: 1fr; } }
/* Templates assistant: docked beside the tabs on wide screens, stacked above them on narrow ones */
.jb-tplwrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.jb-tplwrap.ai-open { grid-template-columns: minmax(0, 1fr) 380px; }
.jb-ai { background: var(--ai-wash) !important; border-color: var(--ai-edge) !important; }
.jb-ai { position: sticky; top: calc(var(--jb-head, 0px) + 16px); display: flex; flex-direction: column; gap: 10px; background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 14px; max-height: calc(100vh / var(--zf, 1) - var(--jb-head, 0px) - 32px); max-height: calc(100dvh / var(--zf, 1) - var(--jb-head, 0px) - 32px); min-height: 420px; box-shadow: 0 2px 14px rgba(40, 30, 20, .06); }
.jb-ai-head { display: flex; align-items: center; gap: 10px; }
.jb-ai-head b { display: inline-flex; align-items: center; gap: 6px; font-family: var(--serif, inherit); font-size: 19px; color: var(--maroon-text); }
.jb-ai-head .jb-small { margin-left: auto; }
.jb-ai-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; min-height: 0; }
.jb-ai-me { align-self: flex-end; max-width: 88%; background: var(--maroon); color: var(--on-maroon); border-radius: 14px 14px 4px 14px; padding: 8px 12px; white-space: pre-wrap; font-size: 14.5px; }
.jb-ai-it { align-self: flex-start; max-width: 100%; background: var(--sage-mist); border: 1px solid var(--sage-line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-size: 14.5px; display: flex; flex-direction: column; gap: 8px; }
.jb-ai-it p { margin: 0; } .jb-ai-it ul, .jb-ai-it ol { margin: 0; padding-left: 20px; }
.jb-ai-it code { font-size: 13px; background: rgba(0, 0, 0, .05); padding: 0 4px; border-radius: 4px; }
.jb-ai-draft { background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.jb-ai-draft ol, .jb-ai-draft ul { margin: 0; padding-left: 18px; }
.jb-ai-pre { white-space: pre-wrap; margin: 0; max-height: 140px; overflow: auto; }
.jb-ai-hello { display: flex; flex-direction: column; gap: 10px; color: var(--ink-2, #5b554b); font-size: 14.5px; }
.jb-ai-hello p { margin: 0; }
.jb-ai-starters { display: flex; flex-direction: column; gap: 6px; }
.jb-ai-starters .jb-chip { text-align: left; border: 1px solid var(--sage-line); background: var(--sage-mist); cursor: pointer; padding: 7px 10px; border-radius: 10px; font-size: 13.5px; white-space: normal; }
/* the AI message box (web/js/ai-panel.js composer): one field that grows with the text, hint and send inside it */
.jb-cmp { position: relative; container: cmp / inline-size; }
.jb-cmp-box { display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--line); background: var(--card, #fff); cursor: text;
  box-shadow: 0 1px 2px rgba(40, 30, 20, .05), 0 6px 18px -8px rgba(40, 30, 20, .14); transition: border-color .16s, box-shadow .16s; }
.jb-cmp-box:hover { border-color: color-mix(in srgb, var(--ink) 18%, var(--line)); }
.jb-cmp-box:focus-within { border-color: transparent;
  background: linear-gradient(var(--card, #fff), var(--card, #fff)) padding-box, linear-gradient(120deg, var(--maroon), #6d5dfc 55%, color-mix(in srgb, var(--accent, #c9a227) 80%, #fff)) border-box;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--maroon) 10%, transparent), 0 10px 28px -10px color-mix(in srgb, #6d5dfc 40%, transparent); }
.jb-cmp textarea { display: block; width: 100%; box-sizing: border-box; min-height: 48px; max-height: 180px; margin: 0; padding: 13px 16px 2px; border: 0; border-radius: 16px 16px 0 0;
  background: transparent; color: var(--ink); font: 400 15px/1.5 var(--sans); resize: none; overflow-y: auto; outline: none; box-shadow: none; scrollbar-width: thin; }
.jb-cmp textarea:focus, .jb-cmp textarea:focus-visible { outline: none; box-shadow: none; }
.jb-cmp textarea::placeholder { color: var(--ink-4, #9a9286); }
.jb-cmp-bar { display: flex; align-items: center; gap: 10px; padding: 4px 8px 8px 16px; min-height: 36px; }
.jb-cmp-hint { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 4px; font: 500 11.5px var(--sans); color: var(--ink-4, #9a9286); white-space: nowrap; overflow: hidden; opacity: 0; transition: opacity .16s; }
.jb-cmp-box:focus-within .jb-cmp-hint { opacity: 1; }
.jb-cmp-hint i { font-style: normal; margin: 0 3px; opacity: .6; }
.jb-cmp-hint kbd { font: 600 10.5px var(--sans); color: var(--ink-3); background: var(--chip-soft, #f3efe9); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; line-height: 16px; }
.jb-cmp-send { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: var(--ai-tile); box-shadow: 0 4px 12px -2px color-mix(in srgb, var(--maroon) 45%, transparent); transition: transform .14s, box-shadow .14s, background .14s, opacity .14s; }
.jb-cmp-send .jb-ico { width: 17px; height: 17px; stroke-width: 2.4; }
.jb-cmp-send:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 7px 16px -3px color-mix(in srgb, var(--maroon) 55%, transparent); }
.jb-cmp-send:active:not(:disabled) { transform: scale(.94); }
.jb-cmp-send:focus-visible { outline: 3px solid color-mix(in srgb, #6d5dfc 45%, transparent); outline-offset: 2px; }
.jb-cmp-send:disabled { cursor: default; background: color-mix(in srgb, var(--ink) 9%, var(--card, #fff)); color: var(--ink-4, #9a9286); box-shadow: none; }
/* waiting on an answer: the button turns into a quiet spinner */
.jb-cmp.busy .jb-cmp-send { background: var(--ai-tile); color: transparent; position: relative; }
.jb-cmp.busy .jb-cmp-send::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: jb-cmp-spin .7s linear infinite; }
@keyframes jb-cmp-spin { to { transform: rotate(360deg); } }
.jb-cmp[data-off] .jb-cmp-box { background: var(--chip-soft, #f3efe9); box-shadow: none; cursor: default; }
@container cmp (max-width: 300px) { .jb-cmp-hint { display: none; } }
@media (hover: none) { .jb-cmp-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .jb-cmp-box, .jb-cmp-send { transition: none; } .jb-cmp.busy .jb-cmp-send::after { animation-duration: 2s; } }
.jb-ai-foot { padding-top: 4px; }
.jb-ai-typing { flex-direction: row; gap: 4px; padding: 12px 14px; }
.jb-ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); opacity: .4; animation: jb-ai-dot 1.2s infinite; }
.jb-ai-typing span:nth-child(2) { animation-delay: .2s; } .jb-ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes jb-ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 1099px) { .jb-tplwrap.ai-open { grid-template-columns: minmax(0, 1fr); } .jb-ai { position: static; order: -1; max-height: calc(70vh / var(--zf, 1)); } }
@media (prefers-reduced-motion: reduce) { .jb-ai-typing span { animation: none; opacity: .7; } }
/* Setup → Branding */
.jb-brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 20px; align-items: start; }
.jb-brand-preview-wrap { position: sticky; top: calc(var(--jb-head, 0px) + 16px); display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .jb-brand-grid { grid-template-columns: 1fr; } .jb-brand-preview-wrap { position: static; } }
.jb-brand-drop { width: 220px; height: 84px; border: 1px dashed var(--line); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; background: var(--paper); overflow: hidden; }
.jb-brand-drop img { max-width: 100%; max-height: 100%; object-fit: contain; }
.jb-brand-icon { width: 72px; height: 72px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #fff; font: 600 26px Georgia, serif; overflow: hidden; flex: none; }
.jb-brand-icon img { width: 100%; height: 100%; object-fit: cover; }
.jb-brand-preview { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--paper); box-shadow: var(--shadow); font-family: var(--sans); color: var(--ink); }
.jb-brand-preview .pv-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border-top: 3px solid var(--brand-a); border-bottom: 1px solid var(--line); }
.jb-brand-preview .pv-shell { display: flex; }
.jb-brand-preview .pv-rail { width: 46px; flex: none; background: var(--brand-b); display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 14px 0; }
.jb-brand-preview .pv-rail i { width: 26px; height: 26px; border-radius: 8px; background: var(--on-brand-b-hover); }
.jb-brand-preview .pv-rail i.on { background: #fff; }
.jb-brand-preview .pv-app-main { flex: 1; min-width: 0; }
.jb-brand-preview .pv-av { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-a); color: var(--on-brand-a); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.jb-brand-preview .pv-crest, .jb-brand-preview .pv-app { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font: 600 14px Georgia, serif; overflow: hidden; flex: none; }
.jb-brand-preview .pv-crest img, .jb-brand-preview .pv-app img { width: 100%; height: 100%; object-fit: cover; }
.jb-brand-preview .pv-crest { background: var(--crest-bg) !important; }
.jb-brand-preview .pv-crest img, .jb-crestfit .stage img { object-fit: contain; transform: translate(var(--crest-x, 0%), var(--crest-y, 0%)) scale(var(--crest-zoom, .71)); }
.jb-brand-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jb-undo { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--maroon-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; transition: background .15s, opacity .15s; }
.jb-undo:hover:not(:disabled) { background: var(--maroon-wash); }
.jb-undo:disabled { opacity: .35; cursor: default; color: var(--ink-3); }
.jb-brand-swatch { display: flex; align-items: center; gap: 8px; }
.jb-field .jb-brand-swatch input { height: 44px; min-height: 44px; box-sizing: border-box; margin: 0; }
.jb-field .jb-brand-swatch input[type=color] { width: 44px; padding: 3px; border-radius: var(--r-sm); cursor: pointer; flex: none; }
.jb-brand-swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.jb-brand-swatch input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.jb-brand-swatch input[type=color]::-moz-color-swatch { border: 0; border-radius: 5px; }
.jb-field .jb-brand-swatch input[data-hex] { width: 110px; font-family: ui-monospace, monospace; }
.jb-brand-status { font-size: 14px; color: var(--ink-3); margin-right: 4px; }
.jb-brand-status.err { color: var(--maroon-text); font-weight: 600; }
.jb-brand-iconwrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.jb-brand-iconwrap .pair { display: flex; gap: 12px; align-items: center; }
.jb-brand-iconwrap button { border: 0; padding: 0; background: none; cursor: pointer; }
.jb-brand-iconwrap .round { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; font: 600 26px Georgia, serif; background: var(--crest-bg); box-shadow: 0 0 0 1px var(--line); }
.jb-brand-iconwrap .round img { width: 100%; height: 100%; object-fit: contain; transform: translate(var(--crest-x, 0%), var(--crest-y, 0%)) scale(var(--crest-zoom, .71)); }
.jb-brand-iconwrap button:hover .round, .jb-brand-iconwrap button:focus-visible .round { box-shadow: 0 0 0 3px var(--maroon-line); }
.jb-brand-iconbtns { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.jb-brand-iconbtns .jb-link, .jb-brand-logobtns .jb-link { background: none; border: 0; padding: 0; cursor: pointer; }
.jb-brand-logobtns { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.jb-crestfit { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.jb-crestfit .stage { width: 240px; height: 240px; border-radius: 50%; overflow: hidden; position: relative; background: var(--crest-bg); cursor: grab; touch-action: none; box-shadow: 0 0 0 1px var(--line), 0 6px 24px rgba(0,0,0,.12); user-select: none; }
.jb-crestfit .stage.drag { cursor: grabbing; }
.jb-crestfit .stage img { width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.jb-crestfit .sizes { display: flex; gap: 18px; align-items: center; }
.jb-crestfit .sizes span { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--crest-bg); display: block; }
.jb-crestfit .sizes span.sm { width: 32px; height: 32px; }
.jb-crestfit .sizes img { width: 100%; height: 100%; display: block; object-fit: contain; transform: translate(var(--crest-x, 0%), var(--crest-y, 0%)) scale(var(--crest-zoom, .71)); }
.jb-crestfit .zoom { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 320px; }
.jb-crestfit .zoom input[type=range] { flex: 1; accent-color: var(--maroon); }
.jb-crestfit .zoom button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.jb-crestfit .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.jb-brand-preview .pv-logo { height: 36px; max-width: 220px; object-fit: contain; }
.jb-brand-preview .pv-name { font-size: 18px; font-weight: 700; color: var(--ink); }
.jb-brand-preview .pv-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.jb-brand-preview .pv-eyebrow { font-family: var(--caps); letter-spacing: .12em; text-transform: uppercase; font-size: 11px; color: var(--sage-text); margin: 0; }
.jb-brand-preview .pv-h { font-family: var(--serif); font-size: 26px; color: var(--maroon-text); margin: 0; font-weight: 600; }
.jb-brand-preview .pv-h2 { font-family: var(--serif); font-size: 18px; }
.jb-brand-preview .pv-p { margin: 0; color: var(--ink-2); }
.jb-brand-preview .pv-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jb-brand-preview .pv-btn { background: var(--maroon); color: var(--on-maroon); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.jb-brand-preview .pv-ghost { border: 1px solid var(--maroon-line); color: var(--maroon-text); padding: 7px 13px; border-radius: 999px; font-size: 14px; }
.jb-brand-preview .pv-pill { background: var(--sage-tint); color: var(--sage-ink); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.jb-brand-preview .pv-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--sage)); border-radius: var(--r-sm); padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.jb-brand-preview .pv-link { color: var(--maroon-text); font-size: 14px; }
.jb-brand-preview .pv-phone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; background: var(--sage-mist); border-top: 1px solid var(--line-soft); }
.jb-brand-preview .pv-app { width: 56px; height: 56px; border-radius: 14px; font-size: 20px; }

/* Docked assistant (Course builder): the Templates assistant's chat (.jb-ai-*) in a drawer that leaves the page usable */
.jb-ai-draft .jb-row-between { gap: 8px; }
.jb-ico.flip { transform: rotate(180deg); }
/* free media library */
.jb-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.jb-media { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: var(--chip-soft); cursor: pointer; aspect-ratio: 4 / 3; display: block; font: inherit; }
.jb-media img { width: 100%; height: 100%; object-fit: cover; display: block; } .jb-media:hover { box-shadow: 0 0 0 2px var(--sage); }
.jb-media-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-media-tag { position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; display: inline-flex; gap: 3px; align-items: center; } .jb-media-tag .jb-ico { width: 11px; height: 11px; fill: #fff; stroke: none; }
.jb-media-audio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; padding: 10px; text-align: center; font-size: 13px; } .jb-media-audio .jb-ico { width: 26px; height: 26px; color: var(--sage-text); }
/* platform-wide announcement (platform console → every school) */
.jb-platform-banner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--sage-mist); color: var(--ink); border-bottom: 1px solid var(--sage-line); font-size: 14px; line-height: 1.35; }
.jb-platform-banner.warn { background: #FFF4D6; border-color: #E8CF8A; }
/* the "one account manager" notice: not dismissible, with the button that fixes it */
.jb-mgrbar { flex-wrap: wrap; row-gap: 8px; }
.jb-mgrbar span { flex: 1 1 260px; }
.jb-platform-banner.jb-mgrbar .jb-btn { flex: none; color: var(--on-maroon); }
.jb-platform-banner .jb-mgrx { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: 0 -6px 0 -2px; padding: 0; border-radius: 8px; color: #7A5A12; } .jb-platform-banner .jb-mgrx:hover { background: rgba(122,90,18,.12); } .jb-platform-banner .jb-mgrx .jb-ico { width: 16px; height: 16px; }
.jb-platform-banner .jb-ico { flex: none; width: 18px; height: 18px; }
.jb-platform-banner span { flex: 1; } .jb-platform-banner a { color: inherit; font-weight: 600; }
.jb-platform-banner button { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 18px; line-height: 1; padding: 2px 6px; }
.jb-edwin-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: Inter, system-ui, -apple-system, sans-serif; font-size: 22px; letter-spacing: -.02em; font-weight: 800; color: #1E1C47; }
.jb-edwin-brand i { width: 36px; height: 36px; border-radius: 9px; background: #3D3B8E; color: #fff; display: inline-grid; place-items: center; font-style: normal; font-family: inherit; font-size: 21px; font-weight: 800; letter-spacing: 0; }

/* every table: sticky header + click-to-sort (web/js/tables.js) */
table.tb-on thead th { position: relative; z-index: 2; background: var(--card, #fff); }
table.tb-on.jb-gb thead th:first-child { z-index: 3; }
table.tb-stuck thead th { box-shadow: 0 1px 0 var(--line), 0 6px 8px -6px rgba(40, 30, 20, .18); }
th.tb-sort { cursor: pointer; user-select: none; }
th.tb-sort:hover { color: var(--ink); }
th.tb-sort:focus-visible { outline: 2px solid var(--sage); outline-offset: -2px; }
th.tb-sort::after { content: ''; display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: 0; transition: opacity .15s; }
th.tb-sort:hover::after { opacity: .35; }
th.tb-asc::after { border-top: 0; border-bottom: 5px solid currentColor; opacity: 1; }
th.tb-desc::after { opacity: 1; }
th.tb-asc, th.tb-desc { color: var(--ink); }
@media print { table.tb-on thead th { transform: none !important; box-shadow: none !important; } th.tb-sort::after { display: none; } }

/* In-page side lists (Reports list, section menus) stay in view beside long content; they scroll on their own if taller than the screen */
.jb-cols > nav.jb-card, .jb-sidenav { position: sticky; top: calc(var(--jb-head, 0px) + 16px); max-height: calc(100vh / var(--zf, 1) - var(--jb-head, 0px) - 32px); max-height: calc(100dvh / var(--zf, 1) - var(--jb-head, 0px) - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (max-width: 760px) { .jb-cols > nav.jb-card, .jb-sidenav { position: static; max-height: none; } }

/* generated documents (receipts, invoices, reports…) previewed in a panel; web/js/documents.js */
.jb-docbody { padding: 0 !important; background: #e9e7e2; }
.jb-docframe { width: 100%; border: 0; display: block; background: #e9e7e2; min-height: 420px; }
/* the printed-report panel (web/js/print-reports.js): sections to include, "Prepared for", then the live preview */
.jb-prt-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 18px; background: var(--card, #fff); border-bottom: 1px solid var(--line); }
.jb-prt-secs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.jb-prt-chip { display: inline-flex; align-items: center; cursor: pointer; }
.jb-prt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.jb-prt-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--card, #fff); transition: background .15s, color .15s, border-color .15s; }
.jb-prt-chip span::before { content: ''; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; box-sizing: border-box; }
.jb-prt-chip input:checked + span { color: var(--maroon); border-color: var(--maroon); background: var(--maroon-wash); }
.jb-prt-chip input:checked + span::before { background: currentColor; box-shadow: inset 0 0 0 2px var(--card, #fff); }
.jb-prt-chip input:focus-visible + span { outline: 2px solid var(--maroon); outline-offset: 2px; }
.jb-prt-for { display: inline-flex; align-items: center; gap: 8px; }
.jb-prt-for .jb-input { width: 280px; max-width: 60vw; min-height: 34px; }
.jb-prt-status { margin-left: auto; }
.jb-prt-view { min-height: 420px; }
.jb-emailframe { width: 100%; border: 1px solid var(--line); border-radius: var(--r); display: block; background: #f1eee8; min-height: 420px; }

/* ---------------------------------------------------------------- feature switches (web/js/feature-panel.js) */
.ft { display: flex; flex-direction: column; gap: 18px; }
.ft-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ft-q { flex: 1 1 180px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--card); }
.ft-count { white-space: nowrap; }
.ft-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 2px 32px; align-items: start; }
.ft-group > :not(.ft-row) { grid-column: 1 / -1; }
/* Announcements: one column on laptops and phones, two or more side by side on big screens (pages/school.js) */
.an-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 620px), 1fr)); gap: 16px; align-items: start; }
.an-feed > section { grid-column: 1 / -1; }   /* heading and note across; the switches flow into columns on wide screens */
.ft-group > .jb-small { margin: 0 0 6px; }
.ft-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 4px; border-top: 1px solid var(--line-soft); }
.ft-row.off .ft-name b { color: var(--ink-3); }
.ft-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ft-name { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ft-roles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-3); }
.ft-roles span { padding: 2px 8px; border-radius: 999px; background: var(--chip-soft); border: 1px solid var(--line-soft); }
.ft-roles em { font-style: normal; color: var(--ink-4); }
.ft-switch { flex: 0 0 auto; width: 44px; height: 26px; border-radius: 999px; border: 0; padding: 3px; background: #CFC9BE; cursor: pointer; position: relative; transition: background .15s; margin-top: 1px; }
.ft-switch i { display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.ft-switch[aria-checked="true"] { background: var(--sage); }
.ft-switch[aria-checked="true"] i { transform: translateX(18px); }
.ft-switch:disabled { opacity: .45; cursor: not-allowed; }
.ft-switch:focus-visible, .ft-i:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.ft-i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--ink-4); background: transparent; color: var(--ink-3); font: italic 600 12px/1 Georgia, serif; cursor: help; padding: 0; flex: 0 0 auto; }
.ft-i[aria-expanded="true"] { background: var(--ink-2); color: #fff; border-color: var(--ink-2); }
.ft-pop { position: fixed; z-index: 1000; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 14px 16px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ft-pop b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.ft-pop p { margin: 6px 0 0; }
.ft-pop .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); }
.ft-pop .r { color: var(--ink-4); font-size: 12px; }
.ft-also ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 600px) { .ft-bar .jb-seg { width: 100%; } }
.ft-roles em.miss { color: var(--amber); font-weight: 600; }
/* Branding → font chooser: each font is listed in its own typeface */
.jb-fontpick { position: relative; }
.jb-fontpick-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #D5CFC2; border-radius: var(--r-sm); background: #fff; color: var(--ink, #1F1A17); font-size: 18px; text-align: left; cursor: pointer; }
.jb-fontpick-btn .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jb-fontpick-btn svg { flex: none; opacity: .6; }
.jb-fontpick-btn[aria-expanded=true] { border-color: var(--maroon-text); }
.jb-fontpick-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid #D5CFC2; border-radius: var(--r-sm); box-shadow: 0 10px 28px rgba(31,26,23,.16); max-height: min(360px, 60vh); overflow-y: auto; }
.jb-fontpick-list li { padding: 9px 12px 9px 30px; border-radius: 6px; font-size: 19px; line-height: 1.25; color: var(--ink, #1F1A17); cursor: pointer; position: relative; outline: none; }
.jb-fontpick-list li:hover, .jb-fontpick-list li:focus { background: #F2EEE6; }
.jb-fontpick-list li[aria-selected=true]::before { content: '✓'; position: absolute; left: 10px; font-family: system-ui, sans-serif; font-size: 15px; top: 50%; transform: translateY(-50%); color: var(--maroon-text); }
.jb-fontpick-list.up { top: auto; bottom: calc(100% + 4px); }


/* ------------------------------------------------------------------ Messages: an email-style inbox (gm-*) */
.gm { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 18px; align-items: start; }
.gm-side { position: sticky; top: calc(var(--jb-head, 0px) + 12px); display: flex; flex-direction: column; gap: 14px; }
.gm-compose { display: flex; align-items: center; justify-content: center; gap: 10px; align-self: stretch; margin-left: -16px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--maroon-tint); color: var(--maroon-ink); font: 600 15px var(--sans); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); transition: box-shadow .15s; }
.gm-compose:hover { box-shadow: 0 2px 6px rgba(0,0,0,.16); }
.gm-compose .jb-ico { width: 22px; height: 22px; }
.gm-folders { display: flex; flex-direction: column; }
.gm-folders a { display: flex; align-items: center; gap: 14px; min-height: 34px; padding: 0 14px 0 16px; border-radius: 0 999px 999px 0; margin-left: -16px; padding-left: 32px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.gm-folders a:hover { background: var(--chip-soft); }
.gm-folders a[aria-current="page"] { background: var(--maroon-tint); color: var(--maroon-ink); font-weight: 700; }
.gm-folders a span { flex: 1; }
.gm-folders .jb-ico { width: 19px; height: 19px; }
.gm-n { font-size: 12px; font-weight: 700; }
.gm-main { background: #fff; border: 1px solid var(--line); border-radius: 16px; min-height: 420px; overflow: hidden; }
.gm-search { display: flex; align-items: center; gap: 10px; margin: 12px 12px 4px; padding: 0 14px; min-height: 46px; border-radius: 999px; background: var(--chip-soft); }
.gm-search:focus-within { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.gm-search input { flex: 1; border: 0; background: transparent; font: 15px var(--sans); outline: none; min-height: 44px; }
.gm-search .jb-ico { width: 18px; height: 18px; color: var(--ink-3); }
.gm-bar { display: flex; align-items: center; gap: 2px; min-height: 48px; padding: 0 10px; border-bottom: 1px solid var(--line-soft); }
.gm-count { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-3); }
.gm-selnote { font-size: 13px; color: var(--ink-3); margin-left: 8px; }
.gm-ib { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.gm-ib:hover { background: var(--chip); color: var(--ink); }
.gm-ib.off { opacity: .35; pointer-events: none; }
.gm-ib .jb-ico { width: 18px; height: 18px; }
.gm-check { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.gm-check input { width: 16px; height: 16px; accent-color: var(--maroon); cursor: pointer; }
.gm-row { position: relative; display: grid; grid-template-columns: 36px 30px minmax(120px, 210px) minmax(0, 1fr) 84px; grid-template-areas: "check star from text date"; align-items: center; gap: 0 6px; min-height: 42px; padding: 0 12px 0 10px; border-bottom: 1px solid var(--line-soft); background: var(--chip-soft); font-size: 14px; }
.gm-row.unread { background: #fff; }
.gm-row.unread .gm-from, .gm-row.unread .gm-subj, .gm-row.unread .gm-date { font-weight: 700; color: var(--ink); }
.gm-row:hover { box-shadow: inset 1px 0 0 var(--line), inset -1px 0 0 var(--line), 0 1px 3px rgba(40,40,60,.18); z-index: 1; }
.gm-row.sel { background: var(--maroon-wash); }
.gm-link { position: absolute; inset: 0; z-index: 0; }
.gm-link:focus-visible { outline: 2px solid var(--maroon); outline-offset: -2px; }
.gm-row > .gm-check, .gm-row > .gm-star, .gm-row > .gm-hover { position: relative; z-index: 2; }
.gm-row > .gm-check { grid-area: check; } .gm-row > .gm-star { grid-area: star; }
.gm-av { display: none; width: 40px; height: 40px; border-radius: 50%; background: var(--sage-tint); color: var(--sage-ink); align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.gm-av.sm { display: inline-flex; width: 28px; height: 28px; font-size: 11px; }
.gm-av .jb-ico { width: 18px; height: 18px; }
.gm-star { width: 30px; height: 30px; border: 0; background: transparent; color: #B9B9C0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; }
.gm-star:hover { color: var(--ink-3); background: var(--chip); }
.gm-star.on { color: #E3A200; } .gm-star.on .jb-ico { fill: #F6C33B; }
.gm-star .jb-ico { width: 18px; height: 18px; }
.gm-from { grid-area: from; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gm-n2 { color: var(--ink-4); font-weight: 400; font-size: 12px; margin-left: 5px; }
.gm-text { grid-area: text; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gm-subj { color: var(--ink-2); }
.gm-snip { color: var(--ink-3); }
.gm-date { grid-area: date; text-align: right; font-size: 12px; color: var(--ink-3); white-space: nowrap; pointer-events: none; }
.gm-hover { grid-area: date; justify-self: end; display: none; gap: 0; background: inherit; }
.gm-row:hover .gm-hover, .gm-row:focus-within .gm-hover { display: inline-flex; }
.gm-row:hover .gm-date, .gm-row:focus-within .gm-date { visibility: hidden; }
.gm-rows .jb-empty { margin: 40px auto; }

.gm-read { padding: 6px 24px 26px 24px; }
.gm-subjrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0 10px 52px; }
.gm-h2 { font: 400 23px var(--sans); color: var(--ink); }
.gm-tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--chip); color: var(--ink-2); }
.gm-msgs { display: flex; flex-direction: column; }
.gm-m { border-bottom: 1px solid var(--line-soft); }
.gm-mh { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0 10px; cursor: pointer; }
.gm-mh .gm-av { display: inline-flex; }
.gm-mwho { flex: 1; min-width: 0; }
.gm-mwho b { font-size: 14px; }
.gm-me { color: var(--ink-3); font-size: 13px; }
.gm-to { font-size: 12px; color: var(--ink-3); }
.gm-snip1 { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-m.open .gm-snip1 { display: none; } .gm-m:not(.open) .gm-to { display: none; }
.gm-when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.gm-body { display: none; padding: 2px 0 20px 52px; white-space: pre-wrap; font-size: 15px; line-height: 1.55; color: var(--ink); }
.gm-m.open .gm-body { display: block; }
.gm-more { align-self: flex-start; margin: 6px 0 6px 52px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 14px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.gm-more span { font-weight: 700; }
.gm-who-note { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--chip-soft); color: var(--ink-2); font-size: 13px; }
.gm-who-note svg { width: 16px; height: 16px; flex: none; }
.fam-gmsg { display: inline-flex; align-items: center; min-height: 26px; margin-top: 6px; border: 1px solid var(--sage-line, var(--line)); border-radius: 999px; background: var(--sage-mist, var(--chip-soft)); padding: 2px 10px; font: 600 12px var(--sans); color: var(--sage-ink, var(--ink-2)); cursor: pointer; }
.fam-gmsg:hover { border-color: var(--sage-ink, var(--ink-3)); }
.fam-gmsg.off { background: var(--amber-tint); border-color: transparent; color: var(--amber-ink, var(--ink)); }
/* a family's parent rows sit in a narrow card: name, email and phone always get the full width, the edit, roles and
   Message buttons go together underneath (otherwise the details are squeezed to a letter per line) */
.jb-person.fam-guard { flex-wrap: wrap; row-gap: 8px; align-items: flex-start; }
.jb-person.fam-guard > .av { margin-top: 2px; }
.jb-person.fam-guard > .jb-grow { flex: 1 1 calc(100% - 52px); }
.jb-person.fam-guard > .jb-grow + * { margin-left: 50px; }
.jb-person.fam-guard .jb-small { overflow-wrap: break-word; }
/* a parent row on phones: the name and details get the full width, the buttons go together underneath */
@media (max-width: 640px) {
  .jb-person:has(> button, > .jb-btn) { flex-wrap: wrap; row-gap: 6px; }
  .jb-person:has(> button, > .jb-btn) > .jb-grow { flex: 1 1 calc(100% - 52px); }
  .jb-person:has(> button, > .jb-btn) > .jb-grow + * { margin-left: 50px; }
}
.gm-rule { margin: 6px 14px 0; line-height: 1.4; }
.gm-receipt { text-align: right; font-size: 12px; color: var(--sage-text); margin-top: 8px; }
.gm-replybtn { margin: 18px 0 0 52px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 22px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: 600 14px var(--sans); cursor: pointer; }
.gm-replybtn:hover { background: var(--chip-soft); }
.gm-replybtn .jb-ico, .gm-ed-to .jb-ico { width: 16px; height: 16px; }
.gm-editor { margin: 18px 0 0 52px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.2); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.gm-ed-to { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.gm-editor textarea { border: 0; min-height: 140px; resize: vertical; font: 15px var(--sans); outline: none; padding: 4px 0; }
.gm-ed-foot { display: flex; align-items: center; gap: 12px; }
.gm-ed-foot .gm-ib { margin-left: auto; }

/* compact "start from a template" row inside the compose window, reply box and text composer */
.gm-wform .jb-tplpick .jb-field, .gm-editor .jb-tplpick .jb-field, .tx-compose .jb-tplpick .jb-field { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; }
.gm-wform .jb-tplpick .jb-field > span, .gm-editor .jb-tplpick .jb-field > span, .tx-compose .jb-tplpick .jb-field > span { font-weight: 500; color: var(--ink-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.gm-wform .jb-tplpick select, .gm-editor .jb-tplpick select, .tx-compose .jb-tplpick select { width: auto; max-width: 280px; min-height: 32px; font-size: 13px; padding: 2px 28px 2px 10px; }

/* compose: floating window bottom-right */
.gm-win { position: fixed; right: 24px; bottom: 0; z-index: 55; width: min(560px, calc(100vw / var(--zf, 1) - 32px)); max-height: calc(88vh / var(--zf, 1)); display: flex; flex-direction: column; background: #fff; border-radius: 12px 12px 0 0; box-shadow: 0 8px 30px rgba(0,0,0,.28); overflow: hidden; }
.gm-win > header { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; background: var(--chip); }
.gm-win > header b { font-size: 14px; cursor: pointer; flex: 1; }
.gm-wb { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.gm-wb:hover { background: rgba(0,0,0,.07); } .gm-wb .jb-ico { width: 16px; height: 16px; }
.gm-win.min .gm-wform { display: none; }
.gm-wform { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: auto; padding: 0 16px; position: relative; }
.gm-torow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line-soft); padding: 6px 0; min-height: 40px; }
.gm-lab { font-size: 14px; color: var(--ink-3); }
.gm-torow input { flex: 1; min-width: 120px; border: 0; outline: none; font: 14px var(--sans); min-height: 28px; }
.gm-chips { display: contents; }
.gm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--chip); font-size: 13px; }
.gm-chip button { border: 0; background: transparent; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.gm-chip .jb-ico { width: 12px; height: 12px; }
.gm-chipmore { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--maroon-text); font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; }
.gm-chipmore:hover { background: var(--chip-soft); }
.gm-wform > .gm-torow, .gm-wform > .gm-rule, .gm-wform > .gm-subjin, .gm-wform > .gm-tpl, .gm-wform > .gm-classrow { flex-shrink: 0; } /* a long To list grows the form (it scrolls); it never squashes the rows under it */
.gm-linkbtn { border: 0; background: none; color: var(--maroon-text); font: 600 13px var(--sans); cursor: pointer; padding: 2px 4px; }
.gm-sug { position: absolute; left: 12px; right: 12px; top: 42px; z-index: 3; background: #fff; border-radius: 8px; box-shadow: 0 6px 22px rgba(0,0,0,.2); padding: 4px 0; max-height: 280px; overflow: auto; }
.gm-sug button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 7px 12px; text-align: left; font: 14px var(--sans); cursor: pointer; }
.gm-sug button[aria-selected="true"], .gm-sug button:hover { background: var(--chip-soft); }
.gm-classrow { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.gm-classrow select { flex: 1; min-width: 160px; min-height: 36px; }
.gm-subjin { border: 0; border-bottom: 1px solid var(--line-soft); outline: none; font: 14px var(--sans); min-height: 40px; }
.gm-wform .jb-tplpick { padding-top: 8px; }
.gm-wbody { flex: 1; }
.gm-wbody textarea { border: 0; outline: none; min-height: 220px; resize: none; font: 15px var(--sans); padding: 10px 0; }
.gm-wform footer { position: sticky; bottom: 0; background: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 0 14px; }
.gm-wform footer .gm-ib { margin-left: auto; }

@media (max-width: 760px) {
  .gm { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gm-side { position: static; }
  .gm-compose { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 25; min-height: 52px; padding: 0 20px 0 16px; margin: 0; border-radius: 16px; box-shadow: 0 3px 10px rgba(0,0,0,.22); }
  .gm.reading .gm-compose { display: none; }
  .gm-folders { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .gm-folders a { margin: 0; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; flex: none; gap: 8px; }
  .gm-folders a[aria-current="page"] { border-color: transparent; }
  .gm-folders .jb-ico { width: 16px; height: 16px; }
  .gm-main { border: 0; border-radius: 0; margin: 0 -16px; min-height: 0; }
  .gm-search { margin: 4px 12px 6px; }
  .gm-row { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "av from date" "av text star"; padding: 10px 14px; background: #fff; gap: 2px 8px; align-items: start; }
  .gm-row:hover { box-shadow: none; }
  .gm-row > .gm-check, .gm-hover { display: none !important; }
  .gm-row:hover .gm-date { visibility: visible; }
  .gm-row .gm-av { display: inline-flex; grid-area: av; }
  .gm-from { font-size: 15px; } .gm-row:not(.unread) .gm-from { color: var(--ink-2); }
  .gm-text { display: flex; flex-direction: column; white-space: normal; }
  .gm-text > *, .gm-from { min-width: 0; max-width: 100%; }
  .gm-subj, .gm-snip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gm-dash { display: none; }
  .gm-row > .gm-star { justify-self: end; align-self: end; }
  .gm-read { padding: 4px 16px 24px; }
  .gm-subjrow, .gm-body { padding-left: 0; }
  .gm-more, .gm-replybtn, .gm-editor { margin-left: 0; }
  .gm-when .gm-rel { display: none; }
  .gm-win { right: 0; left: 0; top: 0; width: auto; max-height: none; border-radius: 0; }
}

/* ------------------------------------------------------------------ Texts (tx-*) */
.tx-tabs { align-self: flex-start; }
.tx-tabs a { min-height: 34px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; color: #454545; font-weight: 600; font-size: 13px; text-decoration: none; }
.tx-tabs a[aria-pressed="true"] { background: #fff; color: var(--maroon-text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tx-note { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); background: var(--chip-soft); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 10px 14px; margin-bottom: 14px; }
.tx-note.warn { background: var(--amber-tint); color: var(--amber); border-color: transparent; margin: 12px 0 0; }
.tx-note .jb-ico { width: 18px; height: 18px; flex: none; }
.tx { display: grid; grid-template-columns: 340px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-height: 520px; background: #fff; }
.tx-list { border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; min-width: 0; }
#convs { overflow: auto; flex: 1; max-height: calc(70vh / var(--zf, 1)); }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line-soft); }
.tx-row .gm-av { display: inline-flex; }
.tx-row:hover { background: var(--chip-soft); }
.tx-row[aria-current="page"] { background: var(--maroon-wash); }
.tx-rmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-rtop { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.tx-rtop .jb-muted { font-size: 12px; white-space: nowrap; }
.tx-rlast { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-row.unread .tx-rlast { color: var(--ink); font-weight: 600; }
.tx-row .gm-n { background: var(--maroon); color: var(--on-maroon); border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.tx-out { align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--amber); background: var(--amber-tint); border-radius: 4px; padding: 0 6px; }
.tx-conv { display: flex; flex-direction: column; min-width: 0; padding: 0 0 14px; }
.tx-conv > .jb-empty { margin: auto; }
.tx-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.tx-head .gm-av { display: inline-flex; }
.tx-head .tx-mail { margin-left: auto; }
.tx-back { display: none; }
.tx-msgs { flex: 1; overflow: auto; max-height: calc(56vh / var(--zf, 1)); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.tx-b { display: flex; flex-direction: column; max-width: 75%; }
.tx-b.out { align-self: flex-end; align-items: flex-end; }
.tx-bubble { padding: 9px 14px; border-radius: 18px; background: var(--chip); white-space: pre-wrap; font-size: 15px; line-height: 1.4; }
.tx-b.out .tx-bubble { background: var(--sage); color: var(--on-sage); border-bottom-right-radius: 6px; }
.tx-b.in .tx-bubble { border-bottom-left-radius: 6px; }
.tx-meta { font-size: 11px; color: var(--ink-4); margin: 3px 6px 0; }
.tx-compose { margin: 0 18px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.tx-compose textarea { border: 0; outline: none; resize: vertical; min-height: 54px; font: 15px var(--sans); }
.tx-cfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tx-conv > .tx-note { margin: 12px 18px 0; }
.tx-pick { max-height: 300px; overflow: auto; overscroll-behavior: contain; padding: 6px 12px; flex-shrink: 0; }
.tx-pick .jb-kind { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 2px; }
.tx-pick .jb-check { padding: 4px 0; }
@media (max-width: 760px) {
  .tx { grid-template-columns: 1fr; border: 0; border-radius: 0; margin: 0 -16px; }
  .tx.reading .tx-list, .tx:not(.reading) .tx-conv { display: none; }
  .tx-back { display: inline-flex; }
  .tx-head .tx-mail { display: none; }
  .tx-msgs { max-height: none; }
  #convs { max-height: none; }
}
/* ---------------------------------------------------------------- Media (web/js/pages/media.js) */
.md-tools { flex-wrap: wrap; justify-content: flex-end; }
.md-search { min-width: 240px; }
.md-new { position: relative; }
.md-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 6px; }
.md-menu button { display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 10px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink); }
.md-menu button span { grid-column: 2; font-weight: 400; font-size: 12.5px; color: var(--ink-3); }
.md-menu button:hover, .md-menu button:focus-visible { background: var(--chip-soft); outline: none; }
.md-menu .jb-ico { color: var(--maroon-text); }
.md-wrap { flex-wrap: nowrap; }
.md-side { flex: 0 0 250px; padding: 14px 10px; }
.md-main { flex: 1 1 auto; position: relative; min-height: 420px; }
.md-side-h { font-family: var(--caps); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 4px 10px 6px; }
.md-side-h:not(:first-child) { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.md-node { display: flex; align-items: center; padding-left: calc(var(--d) * 14px); }
.md-twist { flex: 0 0 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0; border-radius: 4px; color: var(--ink-3); cursor: pointer; }
.md-twist .jb-ico { width: 14px; height: 14px; transform: rotate(-90deg); transition: transform .15s; }
.md-twist[aria-expanded="true"] .jb-ico { transform: none; }
.md-twist:hover { background: var(--chip); }
.md-node a, .md-types button { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.md-types button { width: 100%; background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.md-node a .jb-ico, .md-types .jb-ico { width: 17px; height: 17px; flex: 0 0 17px; color: var(--ink-4); }
.md-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-ct { font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.md-node a:hover, .md-types button:hover { background: var(--chip-soft); }
.md-node a[aria-current="page"], .md-types button[aria-pressed="true"] { background: var(--maroon-wash); color: var(--maroon-text); font-weight: 600; }
.md-node a[aria-current="page"] .jb-ico, .md-types button[aria-pressed="true"] .jb-ico { color: var(--maroon-text); }
.md-over { outline: 2px dashed var(--maroon); outline-offset: -2px; background: var(--maroon-wash) !important; }
.md-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.md-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.md-crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.md-crumbs a:hover { background: var(--chip-soft); color: var(--ink); }
.md-crumbs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.md-crumbs span { color: var(--ink-4); }
.md-crumbs .jb-ico { width: 17px; height: 17px; }
.md-selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--maroon-wash); }
.md-h { font-size: 13px; font-weight: 700; color: var(--ink-3); margin: 4px 0 10px; }
.md-h + .md-folders, .md-h + .md-grid { margin-bottom: 22px; }
.md-count { margin: 0 0 12px; }
.md-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.md-folder { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--card); transition: border-color .15s, box-shadow .15s; }
.md-folder:hover { border-color: #CDB9B8; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.md-folder b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-folder .jb-muted { font-size: 12.5px; display: block; }
.md-folder .md-aud { display: inline-block; margin-top: 4px; }
.md-typesel { display: none; }
.md-fico { flex: 0 0 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--maroon-wash); color: var(--maroon-text); }
.md-fico .jb-ico { width: 22px; height: 22px; }
.md-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.md-card { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; text-align: left; font: inherit; color: var(--ink); overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.md-card:hover { border-color: #CDB9B8; box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.md-card:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.md-thumb { display: block; aspect-ratio: 4 / 3; background: var(--chip-soft); border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.md-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-art { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--k); background: color-mix(in srgb, var(--k) 8%, #fff); }
.md-glyph { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.md-art b { font-size: 11px; letter-spacing: .08em; padding: 3px 7px; border-radius: 4px; background: var(--k); color: #fff; }
.md-play { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--k); color: #fff; display: flex; align-items: center; justify-content: center; }
.md-play .jb-ico { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.md-cap { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.md-cap b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.md-cap .jb-muted { font-size: 12px; }
.md-path { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.md-path .jb-ico { width: 13px; height: 13px; flex: 0 0 13px; }
.md-aud { align-self: flex-start; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--chip); color: var(--ink-3); }
.md-tbl .md-name { display: inline-flex; align-items: center; gap: 10px; }
.md-mini { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: var(--k); background: color-mix(in srgb, var(--k) 12%, #fff); }
.md-mini .jb-ico { width: 16px; height: 16px; }
.md-mini-f { --k: var(--maroon); }
.md-mini svg.jb-ico { fill: none; stroke: currentColor; }
.md-tbl .md-ck { width: 36px; }
.md-tbl input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--maroon); }
.md-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 60px 16px; color: var(--ink-3); }
.md-empty .md-glyph { color: var(--ink-4); width: 52px; height: 52px; }
.md-empty b { color: var(--ink); font-size: 16px; }
.md-drop { position: absolute; inset: 0; z-index: 5; border-radius: inherit; background: color-mix(in srgb, var(--maroon) 7%, rgba(255,255,255,.92)); border: 2px dashed var(--maroon); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.md-drop > div { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--maroon-text); }
.md-drop .jb-ico { width: 36px; height: 36px; }
.md-drop b { font-size: 18px; }
.md-uploads { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: min(340px, calc(100% - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; }
.md-up { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.md-up .jb-grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-up .jb-meter { flex: 1 0 100%; }
.md-up.ok .md-pct { color: var(--sage-ink); font-weight: 600; } .md-up.bad .md-pct { color: var(--maroon-text); font-weight: 600; }
.md-note { margin: -4px 0 10px; }
.md-danger { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.md-danger p { margin: 4px 0 10px; }
.jb-sheet.md-sheet { width: min(880px, 100%); }
.md-pv { border-radius: 12px; overflow: hidden; background: var(--chip-soft); margin-bottom: 14px; }
.md-pv-img { display: flex; align-items: center; justify-content: center; background: #1b1b1b; max-height: 70vh; }
.md-pv-img img { max-width: 100%; max-height: 70vh; display: block; }
.md-pv-media { width: 100%; max-height: 70vh; display: block; background: #000; }
.md-pv-pdf { width: 100%; height: calc(70vh / var(--zf, 1)); border: 0; display: block; background: #fff; }
.md-pv-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; text-align: center; color: var(--k); background: color-mix(in srgb, var(--k) 7%, #fff); }
.md-pv-none .md-glyph { width: 64px; height: 64px; }
.md-pv-none b { font-size: 12px; letter-spacing: .08em; padding: 3px 8px; border-radius: 4px; background: var(--k); color: #fff; }
.md-pv-none span { color: var(--ink-3); max-width: 360px; }
.md-pv-none audio { width: min(420px, 100%); }
.md-pv-text { max-height: 60vh; overflow: auto; background: #fff; padding: 12px; }
.md-pv-text pre { margin: 0; white-space: pre-wrap; font-size: 13px; }
.md-pv .jb-embed { margin: 0; }
.md-pv-acts { flex-wrap: wrap; margin-bottom: 16px; }
.md-desc { margin: 0 0 14px; color: var(--ink-2); }
.md-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.md-dl dt { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.md-dl dd { margin: 2px 0 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .md-wrap { flex-wrap: wrap; }
  .md-side { display: none; }
  .md-typesel { display: block; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; background: #fff; font: inherit; }
  .md-tools { width: 100%; justify-content: flex-start; }
  .md-search { min-width: 0; flex: 1 1 100%; }
  .md-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .md-folders { grid-template-columns: 1fr; }
}

/* resizable columns (web/js/tables.js): a divider at each heading's right edge */
th.tb-rs { position: relative; }
.tb-grip { position: absolute; top: 0; bottom: 0; right: 0; width: 9px; z-index: 3; cursor: col-resize; touch-action: none; }
.tb-grip::after { content: ''; position: absolute; top: 20%; bottom: 20%; right: 0; width: 2px; border-radius: 1px; background: transparent; transition: background .12s; }
th.tb-rs:hover .tb-grip::after { background: var(--line); }
.tb-grip:hover::after, table.tb-dragging .tb-grip:active::after { background: var(--maroon); top: 0; bottom: 0; }
table.tb-sized { table-layout: fixed; max-width: none; }
table.tb-sized th, table.tb-sized td { overflow: hidden; text-overflow: ellipsis; overflow-wrap: anywhere; }
table.tb-measure th, table.tb-measure td { white-space: nowrap; overflow-wrap: normal; }
table.tb-dragging, table.tb-dragging * { cursor: col-resize !important; user-select: none; }
@media print { .tb-grip { display: none; } }
/* person profile (people split view) */
.jb-profile { display: flex; flex-direction: column; gap: 18px; }
.jb-profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.jb-profile-head .av { width: 64px; height: 64px; border-radius: 50%; background: var(--sage-tint); color: var(--sage-ink); display: grid; place-items: center; font-weight: 700; font-size: 22px; flex: none; letter-spacing: .02em; }
.jb-profile-head .jb-h1 { margin: 0; }
.jb-person { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.jb-person:last-child { border-bottom: 0; }
.jb-person .av { width: 38px; height: 38px; border-radius: 50%; background: var(--chip-soft); color: var(--ink-2, #333); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
@media (max-width: 760px) { .jb-profile-head .av { width: 48px; height: 48px; font-size: 17px; } }
.jb-busy > .jb-profile { opacity: .55; transition: opacity .15s .1s; pointer-events: none; }
.jb-person .jb-grow { min-width: 0; } .jb-person .jb-small { overflow-wrap: anywhere; }


/* ------------------------------------------------------------------ formatted-message editor (re-*) */
.re { position: relative; display: flex; flex-direction: column; min-height: 0; }
.re-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.re-b { min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; font: 600 15px var(--sans); }
.re-b:hover, .re-b[aria-expanded="true"] { background: var(--chip); color: var(--ink); }
.re-b .jb-ico { width: 17px; height: 17px; }
.re-serif { font-family: Georgia, serif; }
.re-a { font-weight: 700; border-bottom: 3px solid var(--maroon); line-height: 1; padding: 0 2px; }
.re-design span { font-size: 13px; }
.re-sel { height: 32px; min-height: 32px; width: auto; border: 1px solid transparent; border-radius: 6px; background: transparent; font: 13px var(--sans); color: var(--ink-2); padding: 0 22px 0 6px; cursor: pointer; }
.re-sel:hover { background: var(--chip-soft); }
.re-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.re-pop { position: relative; display: inline-flex; }
.re-menu { position: absolute; top: 36px; left: 0; z-index: 6; background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.2); padding: 10px 12px; min-width: 210px; display: flex; flex-direction: column; gap: 6px; }
.re-menu[hidden] { display: none; }
.re-menu.wide { min-width: 280px; }
.re-menu.right { left: auto; right: 0; }
.re-menu.design { width: 320px; }
.re-menu p { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 4px 0 0; }
.re-menu input[type=url], .re-menu input:not([type]) { min-height: 36px; font-size: 14px; }
.re-menu .jb-btn { min-height: 34px; align-self: flex-start; }
.re-sws { display: flex; flex-wrap: wrap; gap: 6px; }
.re-sw { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.re-sw.none { background: linear-gradient(135deg, #fff 45%, #d33 47%, #d33 53%, #fff 55%) !important; }
.re-sw[aria-pressed="true"] { outline: 2px solid var(--maroon); outline-offset: 2px; }
.re-custom { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.re-custom input[type=color] { width: 34px; height: 24px; border: 0; padding: 0; background: none; }
.re-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 7px 4px; border-radius: 6px; font: 14px var(--sans); cursor: pointer; text-align: left; }
.re-item:hover { background: var(--chip-soft); } .re-item .jb-ico { width: 16px; height: 16px; }
.re-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.re-lay { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; font: 600 11px var(--sans); color: var(--ink-2); cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.re-lay:hover { border-color: var(--maroon); }
.re-thumb { width: 100%; height: 38px; border-radius: 4px; background: #f4f4f6; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 10px; }
.re-thumb i { display: block; height: 4px; border-radius: 2px; background: #c9c9cf; }
.re-thumb i:nth-child(2) { width: 70%; } .re-thumb i:nth-child(3) { width: 85%; }
.re-lay-plain .re-thumb { background: #fff; border: 1px solid var(--line-soft); }
.re-lay-letter .re-thumb { background: #f7f4ee; box-shadow: inset 0 0 0 5px #f7f4ee, inset 0 0 0 40px #fff; }
.re-lay-announce .re-thumb i:first-child { height: 10px; background: var(--maroon); }
.re-lay-invite .re-thumb { background: linear-gradient(160deg, #f6ead8, #efe0c8); align-items: center; }
.re-lay-invite .re-thumb i:first-child { width: 50%; background: var(--maroon); }
.re-lay-newsletter .re-thumb { background: #edf2f7; } .re-lay-newsletter .re-thumb i:first-child { width: 45%; background: var(--maroon); }
.re-fonts { display: flex; flex-wrap: wrap; gap: 6px; }
.re-fonts button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.re-fonts button[aria-pressed="true"] { border-color: var(--maroon); color: var(--maroon-text); }
.re-page { flex: 1; min-height: 0; overflow: auto; border-radius: 10px; margin-top: 8px; transition: background .2s; }
.re-page.styled { padding: 24px 14px; }
.re-page.drop { outline: 2px dashed var(--maroon); outline-offset: -4px; }
.re-doc { min-height: 220px; outline: none; font: 15px/1.6 var(--sans); color: var(--ink); padding: 4px 2px; overflow-wrap: anywhere; }
.re.compact .re-doc { min-height: 120px; }
.re-doc.carded { max-width: 560px; margin: 0 auto; border-radius: 14px; padding: 30px 26px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.re-doc:empty::before { content: attr(data-ph); color: var(--ink-4); }
.re-doc p { margin: 0 0 10px; } .re-doc h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; } .re-doc h2 { font-size: 22px; margin: 14px 0 8px; } .re-doc h3 { font-size: 18px; margin: 12px 0 6px; }
.re-doc blockquote { border-left: 3px solid var(--line); margin: 8px 0; padding: 2px 14px; color: var(--ink-2); }
.re-doc ul, .re-doc ol { margin: 0 0 10px; padding-left: 24px; }
.re-doc img { max-width: 100%; cursor: pointer; }
.re-doc img.re-on { outline: none; }
/* a selected picture: a frame with four corner handles to drag (web/js/rich-editor.js placeTools) */
.re-isel { position: absolute; z-index: 5; border: 2px solid var(--maroon); border-radius: 2px; pointer-events: none; box-sizing: border-box; }
.re-isel[hidden] { display: none; }
.re-h { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--maroon); border-radius: 50%; pointer-events: auto; touch-action: none; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.re-h::after { content: ''; position: absolute; inset: -10px; }
.re-h.nw { top: -8px; left: -8px; cursor: nwse-resize; } .re-h.se { bottom: -8px; right: -8px; cursor: nwse-resize; }
.re-h.ne { top: -8px; right: -8px; cursor: nesw-resize; } .re-h.sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
.re-isize { position: absolute; right: 4px; bottom: 4px; background: rgba(31,31,36,.82); color: #fff; font: 600 11px var(--sans); padding: 2px 6px; border-radius: 4px; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.re-isel.dragging .re-isize { opacity: 1; }
@media (pointer: coarse) { .re-h { width: 20px; height: 20px; } .re-h.nw, .re-h.ne { top: -11px; } .re-h.sw, .re-h.se { bottom: -11px; } .re-h.nw, .re-h.sw { left: -11px; } .re-h.ne, .re-h.se { right: -11px; } }
.re-doc a { color: var(--maroon-text); }
.re-uploading { display: inline-block; padding: 6px 12px; border-radius: 8px; background: var(--chip); color: var(--ink-3); font-size: 13px; }
.re-page.dark .re-doc:not(.carded) { color: #fff; }
.re-imgbar { position: absolute; z-index: 5; display: flex; align-items: center; gap: 2px; background: #1f1f24; border-radius: 8px; padding: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.re-imgbar[hidden] { display: none; }
.re-imgbar button { border: 0; background: transparent; color: #fff; font: 600 12px var(--sans); padding: 6px 9px; border-radius: 5px; cursor: pointer; }
.re-imgbar button:hover { background: rgba(255,255,255,.15); }
.re-imgbar .re-sep { background: rgba(255,255,255,.25); }
.re-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 2px; }
.re-files[hidden] { display: none; }
.re-file { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--chip-soft); font-size: 13px; max-width: 100%; }
.re-file b { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.re-file span { color: var(--ink-3); font-size: 12px; } .re-file.pending { opacity: .65; }
.re-file .jb-ico { width: 14px; height: 14px; }
.re-file button { border: 0; background: transparent; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.re-file button:hover { background: var(--chip); }

/* compose window with the editor; panels it opens (preview, confirmations, picture library) sit above it */
body:has(.gm-win) .jb-scrim { z-index: 60; }
.gm-win { width: min(680px, calc(100vw / var(--zf, 1) - 32px)); }
.gm-win.max { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(1000px, calc(100vw / var(--zf, 1) - 48px)); height: calc(90vh / var(--zf, 1)); max-height: none; border-radius: 12px; }
.gm-win.max .gm-wform { flex: 1; }
.gm-wbody { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.gm-wbody .re-doc { min-height: 240px; }
.gm-tpl .jb-tplpick { padding-top: 8px; }
.gm-chip.group, .gm-chip.class { background: var(--sage-tint); color: var(--sage-ink); }
.gm-chip .jb-ico { width: 14px; height: 14px; }
.gm-chip i { font-style: normal; opacity: .7; }
.gm-chip select { border: 0; background: rgba(255,255,255,.6); border-radius: 999px; font: 12px var(--sans); min-height: 22px; height: 22px; padding: 0 18px 0 6px; width: auto; }
.gm-av.group, .gm-av.class { background: var(--sage-tint); }
.gm-ed-foot .jb-btn.ghost, .gm-wform footer .jb-btn.ghost { min-height: 40px; }
.gm-editor .re-bar { border-top: 1px solid var(--line-soft); }

/* attachments under a message */
.gm-files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; white-space: normal; }
.gm-file { display: flex; flex-direction: column; width: 180px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; background: #fff; }
.gm-file:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.gm-file img { width: 100%; height: 110px; object-fit: cover; display: block; background: var(--chip-soft); }
.gm-fico { height: 70px; display: flex; align-items: center; justify-content: center; background: var(--chip-soft); color: var(--ink-3); }
.gm-fico .jb-ico { width: 26px; height: 26px; }
.gm-fname { display: flex; flex-direction: column; padding: 8px 10px; font-size: 13px; }
.gm-fname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .gm-fname span { color: var(--ink-3); font-size: 12px; }
.gm-body.rich { white-space: normal; }
.gm-body.rich p { margin: 0 0 10px; } .gm-body.rich img { max-width: 100%; height: auto; }
.gm-body.rich h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; } .gm-body.rich h2 { font-size: 22px; margin: 14px 0 8px; }
.gm-body.rich [data-email] { border-radius: 12px; }
.gm-clip { display: inline-flex; vertical-align: -3px; margin-right: 6px; color: var(--ink-3); } .gm-clip .jb-ico { width: 15px; height: 15px; }

/* groups in the left column */
.gm-groups { display: flex; flex-direction: column; margin-top: 4px; }
.gm-ghead { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 4px 16px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.gm-ib.sm { width: 28px; height: 28px; }
.gm-grp { display: flex; align-items: center; gap: 12px; min-height: 32px; border: 0; background: transparent; padding: 0 14px 0 32px; margin-left: -16px; border-radius: 0 999px 999px 0; color: var(--ink-2); font: 14px var(--sans); cursor: pointer; text-align: left; }
.gm-grp:hover { background: var(--chip-soft); }
.gm-grp span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-grp .jb-ico { width: 17px; height: 17px; flex: none; }
.gm-grp .gm-n { color: var(--ink-4); font-weight: 400; }
.gm-ghint { font-size: 12px; color: var(--ink-3); padding: 0 8px 0 16px; }
/* group editor: the name and options stay put; only the people list scrolls (and never drags the panel with it) */
.jb-sheet .body:has(> .gm-gpick) { overflow: hidden; }
.gm-gpick { flex: 1 1 auto; min-height: 140px; overflow: auto; overscroll-behavior: contain; padding: 6px 12px; }
.gm-gpick .jb-kind { margin: 8px 0 2px; } .gm-gpick .jb-check { padding: 4px 0; }
.gm-gfilter { max-width: 200px; min-height: 34px; }

/* preview */
.gm-pvseg { margin-bottom: 12px; }
.gm-pvwrap { background: var(--chip-soft); border-radius: 12px; padding: 16px; display: flex; justify-content: center; }
.gm-pv { width: 100%; height: calc(62vh / var(--zf, 1)); border: 0; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.1); transition: width .2s; }
.gm-pv.phone { width: 390px; }

@media (max-width: 760px) {
  .gm-groups { display: none; }
  .gm-win.max { left: 0; top: 0; transform: none; width: auto; height: auto; border-radius: 0; }
  .re-bar { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .re-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto !important; }
  .gm-sendnote { display: none; }
  .gm-file { width: calc(50% - 5px); }
}

/* ---------------------------------------------------------------- forms from field lists (web/js/fieldkit.js) */
.fk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.fk-grid > .fk-wide, .fk-grid > .fk-head { grid-column: 1 / -1; }
.fk-grid > [hidden] { display: none; }
.fk-head { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line-soft); }
.fk-grid > .fk-head:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.fk-head b { font-family: var(--caps); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--maroon-text); }
.fk-req { font-style: normal; color: var(--maroon-text); }
.jb-field small { font-size: 12.5px; line-height: 1.35; }
/* Settings → Grades & seats */
.jb-gs-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.jb-gs-pair select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.jb-gs-new input { border-color: var(--amber-ink, var(--maroon)); box-shadow: 0 0 0 3px var(--amber-tint); }
.jb-gs-new > span { color: var(--amber-ink); font-weight: 700; }
.jb-gs-note { margin: 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--amber-tint); color: var(--amber-ink); }
[data-total]:empty { display: none; }
.jb-gs-more summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.jb-gs-more[open] summary { margin-bottom: 6px; }
.jb-gs-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.jb-gs-seats input { width: 100%; box-sizing: border-box; text-align: center; -moz-appearance: textfield; }
.jb-gs-seats input::-webkit-inner-spin-button, .jb-gs-seats input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.fk-money { position: relative; display: block; }
.fk-money > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.fk-money > input { padding-left: 26px !important; width: 100%; }
@media (max-width: 640px) { .fk-grid { grid-template-columns: minmax(0, 1fr); } }
/* answers read back */
.fk-facts { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.fk-facts h3 { font-family: var(--caps); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--maroon-text); margin: 0 0 10px; }
.fk-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0; }
.fk-facts dl > div.wide { grid-column: 1 / -1; }
.fk-facts dt { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.fk-facts dd { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 15px; }
@media (max-width: 640px) { .fk-facts dl { grid-template-columns: minmax(0, 1fr); } }

/* new request: pick a kind */
.rq-kinds { display: grid; gap: 10px; }
.rq-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; color: var(--ink); cursor: pointer; }
.rq-kind:hover, .rq-kind:focus-visible { border-color: var(--maroon); background: var(--maroon-wash); outline: none; }
.rq-kind b { font-size: 16px; }

/* approvals: rows open a panel */
.ap-row { cursor: pointer; border-radius: 8px; }
.ap-row:hover { background: var(--chip-soft); box-shadow: -8px 0 0 var(--chip-soft), 8px 0 0 var(--chip-soft); }
.ap-row:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.ap-chev { display: inline-flex; color: var(--ink-4); }
.ap-chev .jb-ico { width: 16px; height: 16px; transform: rotate(-90deg); }
.jb-sheet.ap-sheet { width: min(760px, 100%); }
.ap-person { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.ap-family { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; }
.ap-family .ap-person { padding: 2px 0; }
.ap-decide { margin-top: 6px; padding: 16px; border-radius: 12px; background: var(--chip-soft); display: flex; flex-direction: column; gap: 10px; }
.ap-decide h3 { margin: 0; font-size: 15px; }
@media (max-width: 640px) { .ap-chev { display: none; } }

/* form responses: families still to respond */
.jb-await { list-style: none; margin: 0; padding: 0; }
.jb-await li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.jb-await li > div { min-width: 0; }
.jb-await a { color: var(--ink); text-decoration: none; } .jb-await a:hover { color: var(--maroon-text); text-decoration: underline; }
.jb-await .jb-small a { color: var(--ink-3); }
.jb-await .jb-btn { flex-shrink: 0; }
.jb-formstate { align-items: center; gap: 12px; }

/* Universal sign-in at app.<domain>: Edwin's own look, not a school's */
.jb-cpd-host, .jb-cpd-host body { background: #f6f7f9; }
.jb-cpd { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: #12151c; }
.jb-cpd-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font-weight: 800; letter-spacing: -.02em; font-size: 22px; }
.jb-cpd-sub { color: #5d6472; margin: 0 0 22px; font-size: 15px; }
.jb-cpd-note { background: #e9ecfd; color: #1f33b3; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 18px; }
.jb-cpd-note a, .jb-cpd-foot a { color: #3047d9; }
.jb-cpd-form { display: grid; gap: 14px; }
.jb-cpd-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #2b303b; }
.jb-cpd-form input { height: 46px; border: 1px solid #d3d7de; border-radius: 10px; padding: 0 14px; font: 15px Inter, system-ui, sans-serif; color: #12151c; background: #fff; }
.jb-cpd-form input:focus { outline: none; border-color: #3047d9; box-shadow: 0 0 0 3px #e9ecfd; }
.jb-cpd-form button { height: 48px; border: 0; border-radius: 999px; background: #12151c; color: #fff; font: 600 15px Inter, system-ui, sans-serif; cursor: pointer; margin-top: 4px; }
.jb-cpd-form button:hover { background: #2b303b; } .jb-cpd-form button:disabled { opacity: .6; cursor: default; }
.jb-cpd-err { color: #b42318; font-size: 14px; margin: 0; }
.jb-cpd-school { display: grid; width: 100%; text-align: left; gap: 2px; border: 1px solid #d3d7de; background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; font: 15px Inter, system-ui, sans-serif; color: #12151c; }
.jb-cpd-school:hover { border-color: #3047d9; background: #f5f6fe; } .jb-cpd-school small { color: #5d6472; }
.jb-cpd-foot { text-align: center; font-size: 14px; color: #5d6472; margin: 22px 0 0; }
.jb-cpd-demo { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e6e8ec; }
.jb-cpd-demo p { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #2b303b; text-align: center; }
a.jb-cpd-school { text-decoration: none; }

/* Full-screen sign-in (every school's own page and the Edwin one): info on the left, sign-in on the right */
.jb-auth { min-height: calc(100vh / var(--zf, 1)); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.jb-auth-info { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: clamp(32px, 5vw, 64px); }
.jb-auth-school { background: radial-gradient(120% 90% at 0% 0%, var(--maroon) 0%, var(--maroon-ink) 70%); color: var(--on-maroon, #fff); }
.jb-auth-cpd { background: radial-gradient(110% 80% at 0% 0%, #232a3a 0%, #12151c 65%); color: #e9e6de; }
.jb-auth-info::after { content: ""; position: absolute; right: -18%; bottom: -24%; width: 70%; aspect-ratio: 1; border-radius: 50%; border: 1px solid currentColor; opacity: .08; box-shadow: 0 0 0 60px rgba(255,255,255,.02), 0 0 0 120px rgba(255,255,255,.015); pointer-events: none; }
.jb-auth-logo { display: inline-flex; background: #fff; border-radius: 18px; padding: 16px 22px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.45); }
.jb-auth-logo img { display: block; width: min(260px, 56vw); height: 104px; object-fit: contain; }
.jb-auth-copy { position: relative; max-width: 560px; }
.jb-auth-eyebrow { font-family: var(--caps, inherit); text-transform: uppercase; letter-spacing: .16em; font-size: 13px; font-weight: 600; opacity: .8; margin: 0 0 14px; }
.jb-auth-cpd .jb-auth-eyebrow { color: #e8b04a; opacity: 1; font-family: inherit; }
.jb-auth-info h1 { font-family: var(--serif, inherit); font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -.01em; margin: 0 0 16px; color: inherit; }
.jb-auth-cpd h1 { font-family: inherit; letter-spacing: -.03em; color: #fff; }
.jb-auth-lede { font-size: 17px; line-height: 1.55; opacity: .85; margin: 0 0 28px; max-width: 480px; }
.jb-auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.jb-auth-points li { display: grid; grid-template-columns: 38px 1fr; gap: 14px; align-items: start; }
.jb-auth-points .jb-ico { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: rgba(255,255,255,.12); stroke: currentColor; }
.jb-auth-points b { display: block; font-size: 15px; margin-bottom: 2px; }
.jb-auth-points span { font-size: 14px; opacity: .85; line-height: 1.45; }
.jb-auth-foot { position: relative; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; opacity: .8; }
.jb-auth-foot a { color: inherit; }
.jb-auth-main { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px); overflow-y: auto; }
.jb-auth-form { width: min(440px, 100%); display: flex; flex-direction: column; gap: 16px; }
.jb-auth-form h2 { font-family: var(--serif, inherit); font-size: 32px; margin: 0; color: var(--ink, #12151c); }
.jb-cpd .jb-auth-form h2 { font-family: inherit; letter-spacing: -.02em; font-weight: 700; }
.jb-auth-form > .jb-muted, .jb-auth-form > .jb-cpd-sub { margin: -8px 0 4px; }
/* the public admissions form (web/apply/): the sign-in page's split, with the form side wider (fields in 2–4 columns);
   the school's panel stays in view while the form scrolls. Stacked on phones (below). */
.ap-page { grid-template-columns: minmax(340px, .7fr) minmax(0, 1.3fr); }
.ap-info { position: sticky; top: 0; height: calc(100vh / var(--zf, 1)); height: calc(100dvh / var(--zf, 1)); }
.ap-title { font-family: var(--serif, inherit); font-size: clamp(30px, 3vw, 46px); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; margin: 0 0 28px; }
.ap-main { align-items: flex-start; }
.ap-formwrap { width: min(1200px, 100%); display: flex; flex-direction: column; gap: 16px; }
.ap-formwrap > .jb-h1 { margin: 0; }
.ap-formwrap > .jb-lede { margin: -6px 0 6px; }
.ap-formwrap .jb-form { grid-template-columns: repeat(auto-fit, minmax(max(220px, calc(33.33% - 10px)), 1fr)); }   /* at most three fields a row */
@media (max-width: 860px) { .ap-page { grid-template-columns: 1fr; } .ap-info { position: static; height: auto; } .ap-info .jb-auth-eyebrow { display: none; } .ap-title { font-size: 26px; margin: 0; } }
@media (max-width: 860px) {
  .jb-auth { grid-template-columns: 1fr; }
  .jb-auth-info { gap: 18px; padding: 28px 20px 26px; }
  .jb-auth-points, .jb-auth-foot, .jb-auth-lede { display: none; }
  .jb-auth-info h1 { font-size: 28px; margin: 0; }
  .jb-auth-logo { padding: 10px 14px; border-radius: 14px; } .jb-auth-logo img { height: 64px; width: min(200px, 56vw); }
  .jb-auth-main { align-items: flex-start; padding: 28px 20px 40px; }
}
/* sign-in panel: logo and welcome centered in the panel, footer pinned to the bottom */
.jb-auth-info { justify-content: flex-start; align-items: center; text-align: center; gap: 32px; }
.jb-auth-top { margin-top: auto; display: flex; justify-content: center; position: relative; }
.jb-auth-copy { margin: 0 auto; }
.jb-auth-lede { margin-left: auto; margin-right: auto; }
.jb-auth-points { display: inline-grid; text-align: left; }
.jb-auth-foot { margin-top: auto; align-self: stretch; }
@media (max-width: 860px) { .jb-auth-info { gap: 16px; } .jb-auth-points { display: none; } }

/* the update notice in each account's own colors: the school's main color, or Edwin's on app.<domain> */
.jb-cpd-host .update-bar { background: #12151c; color: #fff; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
.jb-cpd-host .update-bar button { color: #12151c; }

/* Custom labels: the labels assistant card, its draft list, and rows it just filled in */
.lb-ai { display: flex; gap: 16px; align-items: flex-start; background: var(--ai-wash); border-color: var(--ai-edge); }
.lb-ai-icon { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--ai-tile); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--maroon) 28%, transparent); }
.lb-ai-icon .jb-ico { width: 22px; height: 22px; }
.lb-ai-body { flex: 1; min-width: 0; }
.lb-ai-ask { display: flex; gap: 8px; }
.lb-ai-ask .jb-input { flex: 1; min-width: 0; min-height: 44px; }
.lb-ai-ask .jb-btn { flex: none; }
.lb-ai-starters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lb-ai-list { list-style: none; margin: 8px 0 4px; padding: 0; columns: 2; column-gap: 14px; font-size: 13px; }
.lb-ai-list li { break-inside: avoid; padding: 2px 0; }
@keyframes lb-flash { from { background: var(--accent-tint); } to { background: transparent; } }
tr.lb-new > td { animation: lb-flash 2.4s ease-out; }
@media (max-width: 640px) { .lb-ai { flex-direction: column; } .lb-ai-ask { flex-direction: column; } .lb-ai-list { columns: 1; } }

/* Custom labels: unsaved-changes save bar and the lit-up header button */
.lb-savebar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; background: var(--card); border: 1px solid var(--maroon-line); border-radius: var(--r-lg); box-shadow: 0 10px 30px rgba(40, 30, 20, .16); animation: lb-rise .2s ease-out; }
.lb-savebar[hidden] { display: none; }
.lb-savebar-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.lb-savebar-text { flex: 1; min-width: 0; }
.jb-btn.lb-dirty { box-shadow: 0 0 0 3px var(--accent-tint), 0 0 0 4px var(--accent); }
@keyframes lb-rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) { .lb-savebar { bottom: calc(80px + env(safe-area-inset-bottom)); flex-wrap: wrap; } .lb-savebar-text .jb-muted { display: none; } }

/* ---------------------------------------------------------------- setup wizard (web/js/setup-wizard.js) */
.wz { max-width: 860px; margin: 0 auto; display: grid; gap: 14px; }
.wz-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.wz-steps li { flex: 1; height: 6px; border-radius: 3px; background: var(--line); position: relative; }
.wz-steps li.done, .wz-steps li.now { background: var(--sage); }
.wz-steps li.now { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sage) 30%, transparent); }
.wz-steps li span { position: absolute; inset: 0; opacity: 0; }
.wz-head h2 { margin: 2px 0 4px; outline: none; }
.wz-body { display: grid; gap: 14px; }
.wz-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.wz-type { text-align: left; display: grid; gap: 6px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; font: inherit; color: inherit; min-height: 150px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.wz-type:hover { border-color: var(--sage); transform: translateY(-1px); }
.wz-type.on { border-color: var(--sage); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sage) 35%, transparent); }
.wz-type b { font-size: 16px; }
.wz-type small { color: var(--ink-3); font-size: 14px; line-height: 1.4; }
.wz-type-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--sage) 14%, transparent); color: var(--sage); }
.wz-type-ico .jb-ico { width: 22px; height: 22px; }
.wz-q { display: grid; gap: 6px; }
.wz-q > small { margin-top: -4px; }
.wz-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.wz-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.wz-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); }
.wz-opt:has(input:checked) { border-color: var(--sage); background: color-mix(in srgb, var(--sage) 7%, var(--card)); }
.wz-opt input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--sage); flex: none; }
.wz-opt span { display: grid; gap: 2px; }
.wz-opt small { color: var(--ink-3); font-size: 13.5px; line-height: 1.35; }
.wz-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; width: fit-content; }
.wz-seg label { cursor: pointer; }
.wz-seg input { position: absolute; opacity: 0; pointer-events: none; }
.wz-seg span { display: block; padding: 7px 18px; min-width: 64px; text-align: center; }
.wz-seg input:checked + span { background: var(--sage); color: #fff; }
.wz-seg input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: -2px; }
.wz-words { display: grid; gap: 8px; }
.wz-word { display: grid; grid-template-columns: minmax(130px, 1fr) 1fr 1fr; gap: 8px; align-items: center; }
.wz-word-std { font-weight: 600; }
.wz-word .jb-input { min-height: 40px; }
.wz-addr { display: flex; align-items: center; gap: 6px; }
.wz-addr input { flex: 1; min-width: 0; }
.wz-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.wz-sum div { display: grid; gap: 2px; }
.wz-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wz-group { display: grid; gap: 6px; align-content: start; }
.wz-group > div { display: flex; flex-wrap: wrap; gap: 5px; }
.wz-f { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--chip-soft); color: var(--ink-4); }
.wz-f.on { background: color-mix(in srgb, var(--sage) 16%, transparent); color: var(--ink); }
.wz-f.lock { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink); }
.wz-warn { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); margin: 0; }
.wz-err { color: var(--maroon-text); min-height: 1.2em; margin: 0; }
.wz-foot { display: flex; justify-content: space-between; gap: 10px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--page) 30%); }
@media (max-width: 640px) {
  .wz-word { grid-template-columns: 1fr 1fr; }
  .wz-word-std { grid-column: 1 / -1; }
  .wz-type { min-height: 0; }
}

/* ---------------------------------------------------------------- training pages (web/js/pages/training.js) */
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tr-item, .tr-path { display: flex; flex-direction: column; gap: 8px; }
.tr-item-t { font-size: 20px; line-height: 1.2; }
.tr-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.tr-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13.5px; color: var(--ink-3); }
.tr-meta span { display: inline-flex; align-items: center; gap: 4px; }
.tr-meta .jb-ico { width: 15px; height: 15px; }
.tr-item .jb-inline { margin-top: auto; flex-wrap: wrap; }
.tr-item select.jb-input { min-height: 34px; max-width: 220px; }
.tr-over { border-color: var(--maroon-line); }
.tr-off { opacity: .65; }
.tr-steps { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.tr-steps li.done { color: var(--ink-4); text-decoration: line-through; }
.tr-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
/* cohort schedules and plans (web/js/pages/cohort-plans.js) */
.cp-cohorts { display: flex; flex-direction: column; }
.cp-cohorts > .jb-item + .jb-item, .cp-sends > .jb-item + .jb-item { border-top: 1px solid var(--line-soft); }
.cp-cohorts .jb-btn .jb-ico { width: 15px; height: 15px; }
.cp-plan-row { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--chip-soft); }
.cp-plan-row .jb-pill { margin-left: 6px; vertical-align: 1px; }
.cp-rowbtns { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.cp-rowbtns .jb-iconbtn { width: 34px; height: 34px; }
.cp-rowbtns .jb-iconbtn:disabled { opacity: .35; cursor: default; }
.cp-sessions td { vertical-align: top; }
.cp-link { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.cp-gen { display: grid; gap: 12px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.cp-gen .jb-form { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cp-send { align-items: flex-start; }
.cp-send-when { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-text, var(--ink-3)); margin-bottom: 2px; }
.cp-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cp-past > summary { cursor: pointer; font-weight: 600; padding: 8px 0; color: var(--ink-3); }
.cp-chiprow { display: grid; gap: 6px; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-chips .jb-chip { border: 0; cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; letter-spacing: 0; padding: 6px 8px; }
.cp-chips .jb-chip:hover, .cp-chips .jb-chip:focus-visible { background: var(--sage-tint); color: var(--sage-ink); }
.cp-steps { display: flex; flex-direction: column; gap: 12px; }
.cp-step { border: 1px solid var(--line); border-left: 4px solid var(--sage); border-radius: 12px; padding: 12px 14px 14px; display: grid; gap: 12px; background: var(--paper); }
.cp-step.off { border-left-color: var(--line); background: var(--chip-soft); }
.cp-step.off .cp-fields { opacity: .6; }
.cp-step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-step-when { flex: 1 1 200px; min-width: 0; font-size: 15px; }
.cp-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--sage-tint); color: var(--sage-ink); }
.cp-step.off .cp-num { background: var(--chip); color: var(--ink-3); }
.cp-fields { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 12px; }
.cp-fields .cp-span2 { grid-column: span 2; }
@media (max-width: 420px) { .cp-fields .cp-span2 { grid-column: 1 / -1; } }
.cp-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.cp-add > span { flex-basis: 100%; }
.cp-onoff { align-self: end; min-height: 44px; }
.cp-next { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--sage-mist, var(--chip-soft)); font-size: 14px; }
.cp-next > .jb-ico { flex: none; width: 18px; height: 18px; color: var(--sage-ink); }
@media (max-width: 640px) { .cp-pills { justify-content: flex-start; } .cp-step-head .cp-rowbtns { margin-left: auto; } }
.tr-attest { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--sage-mist); }
.tr-attest p { margin: 0; font-style: italic; }
.tr-perms { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-3); }
.tr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tr-cert { background: #fff; color: #1b1b1b; border: 1px solid var(--line); border-radius: 6px; padding: 18px; max-width: 980px; aspect-ratio: 1.414; margin: 0 auto; width: 100%; }
.tr-cert-in { height: 100%; border: 3px double var(--maroon); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4% 6%; gap: 6px; }
.tr-cert-logo { max-height: 70px; max-width: 220px; object-fit: contain; margin-bottom: 6px; }
.tr-cert-k { font-family: 'Cinzel', serif; letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); font-size: clamp(14px, 2vw, 20px); }
.tr-cert-s { margin: 0; color: #5e5e5e; font-style: italic; font-family: 'Crimson Text', serif; font-size: clamp(14px, 1.8vw, 19px); }
.tr-cert-n { font-family: 'Crimson Text', serif; font-size: clamp(30px, 6vw, 58px); margin: 2px 0; font-weight: 600; }
.tr-cert-t { font-family: 'Cinzel', serif; font-size: clamp(18px, 3.2vw, 32px); margin: 4px 0 10px; }
.tr-cert-f { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; margin-top: 8px; }
.tr-cert-f div { display: grid; border-top: 1px solid #ccc; padding-top: 4px; min-width: 120px; }
.tr-cert-f span { font-size: 12px; color: #8a8478; text-transform: uppercase; letter-spacing: .08em; }
.tr-cert-c { margin-top: auto; font-size: 12px; color: #8a8478; }
@media print { .tr-cert { border: 0; padding: 0; max-width: none; } @page { size: landscape; margin: 10mm; } }
/* self sign-up (app.<domain>/#/signup) */
.jb-signup { min-height: calc(100vh / var(--zf, 1)); background: var(--page); padding: 16px; display: grid; align-content: start; gap: 16px; }
.jb-signup-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 920px; width: 100%; margin: 0 auto; flex-wrap: wrap; }
.jb-signup-card { max-width: 920px; width: 100%; margin: 0 auto; }
.jb-signup-foot { text-align: center; }
.jb-signup-note { max-width: 1120px; width: 100%; box-sizing: border-box; margin: 0 auto 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--amber-tint); color: var(--amber-ink); text-align: center; }
.jb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* package player (SCORM / xAPI / cmi5) inside the course player */
.pk-wrap { display: grid; gap: 8px; }
.pk-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pk-frame { width: 100%; height: calc(78vh / var(--zf, 1)); min-height: 420px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.jb-or { display: flex; align-items: center; gap: 10px; color: var(--ink-4); font-size: 13px; margin: 6px 0; }
.jb-or::before, .jb-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
/* the payment page (/pay/) */
.py-body { background: var(--page); min-height: 100vh; margin: 0; }
.py-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; max-width: 980px; margin: 0 auto; }
.py-back { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.py-org { font-family: 'Cinzel', serif; color: var(--maroon); }
.py-wrap { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }
.py-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.py-sum, .py-form, .py-msg, .py-connect { display: grid; gap: 10px; }
.py-title { font-size: 22px; }
.py-line { display: flex; justify-content: space-between; }
.py-total { border-top: 1px solid var(--line); padding-top: 8px; font-size: 18px; }
.py-el { min-height: 120px; }
.py-msg { max-width: 620px; margin: 8vh auto 0; }
.py-test { background: #B42318; color: #fff; text-align: center; font-weight: 700; padding: 6px; letter-spacing: .04em; }
@media (max-width: 720px) { .py-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- setup wizard, warm layout (two columns + live preview) */
.wz.wz2 { max-width: none; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; container-type: inline-size; min-height: 560px; }
.wz2 .wz-guide { background: linear-gradient(165deg, color-mix(in srgb, var(--brand, var(--sage)) 12%, var(--card)), color-mix(in srgb, var(--accent) 8%, var(--card))); border-right: 1px solid var(--line); padding: 26px 22px; display: flex; flex-direction: column; gap: 20px; border-radius: var(--r) 0 0 var(--r); }
.wz2 .wz-main { padding: 30px 40px 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0; animation: wz-in .28s ease-out; }
@keyframes wz-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wz2 .wz-head { display: grid; gap: 6px; max-width: 620px; }
.wz-kick { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand, var(--sage)); }
.wz2 .wz-title { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; margin: 0; outline: none; color: var(--ink); }
.wz-sub { margin: 0; color: var(--ink-3); font-size: 16.5px; line-height: 1.5; }
.wz2 .wz-body { max-width: 640px; }
.wz2 .wz-foot { margin-top: auto; max-width: 640px; background: none; position: static; padding: 10px 0 0; border-top: 1px solid var(--line-soft); }
.wz2 .wz-go { min-width: 150px; justify-content: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--maroon) 28%, transparent); }
.wz2 .wz-go:hover { transform: translateY(-1px); }
/* preview card */
.wz-preview { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.06); }
.wz-pv-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.wz-pv-top > div { display: grid; min-width: 0; }
.wz-pv-mark { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--maroon); }
.wz-pv-mark .jb-ico { width: 24px; height: 24px; }
.wz-pv-name { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.wz-pv-top small { color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.wz-pv-words { display: flex; flex-wrap: wrap; gap: 6px; }
.wz-pv-words span { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--brand, var(--sage)) 12%, transparent); color: var(--ink); }
.wz-pv-stat { font-size: 14px; color: var(--ink-3); }
.wz-pv-stat b { color: var(--ink); font-size: 18px; }
.wz-pv-hint { margin: 0; font-size: 13.5px; color: var(--ink-3); }
/* journey */
.wz-journey { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wz-journey li, .wz-journey button { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-4); padding: 5px 4px; }
.wz-journey button { all: unset; display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ink-2); padding: 5px 4px; border-radius: 8px; width: 100%; }
.wz-journey button:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }
.wz-journey button:focus-visible { outline: 2px solid var(--brand, var(--sage)); }
.wz-journey li.now { color: var(--ink); font-weight: 700; }
.wz-jdot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; flex: none; background: var(--card); }
.wz-journey li.done .wz-jdot { background: var(--sage); border-color: var(--sage); color: #fff; }
.wz-journey li.now .wz-jdot { border-color: var(--maroon); box-shadow: 0 0 0 4px color-mix(in srgb, var(--maroon) 18%, transparent); }
.wz-cheer { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border-radius: 12px; padding: 12px 14px; border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); }
.wz-cheer .jb-ico { color: var(--accent); flex: none; margin-top: 2px; }
.wz-cheer p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); font-style: italic; }
.wz-left { color: var(--ink-3); font-size: 13px; margin-top: auto; }
.wz-mobile-bar { display: none; }
/* type cards: a little delight */
.wz2 .wz-types { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.wz2 .wz-type { min-height: 136px; }
.wz2 .wz-type:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.wz2 .wz-type.picked { border-color: var(--brand, var(--sage)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, var(--sage)) 35%, transparent); transform: scale(.98); }
.wz2 .wz-type-ico { background: color-mix(in srgb, var(--brand, var(--sage)) 14%, transparent); color: var(--brand, var(--sage)); }
/* the account form: sized to what it holds */
.wz-acct { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 14px 16px; }
.wz-acct .full { grid-column: 1 / -1; }
.wz-acct > .wz-acct { margin: 0; }
.wz-fld { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.wz-fld > span:first-child { font-weight: 600; font-size: 14.5px; }
.wz-fld input { width: 100%; max-width: 536px; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.wz-fld input:focus { outline: none; border-color: var(--brand, var(--sage)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, var(--sage)) 18%, transparent); }
.wz2 .wz-addr { display: flex; align-items: center; max-width: 536px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.wz2 .wz-addr:focus-within { border-color: var(--brand, var(--sage)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, var(--sage)) 18%, transparent); }
.wz2 .wz-addr input { border: 0; box-shadow: none; max-width: 220px; border-radius: 0; }
.wz-host { padding: 0 14px; color: var(--ink-3); white-space: nowrap; background: var(--chip-soft); align-self: stretch; display: flex; align-items: center; border-left: 1px solid var(--line); font-size: 14.5px; }
.wz-pw { position: relative; display: block; max-width: 536px; }
.wz-pw input { padding-right: 48px; }
.wz-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; border-radius: 8px; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.wz-eye[aria-pressed="true"] { color: var(--brand, var(--sage)); }
.wz-eye:hover { background: var(--chip-soft); }
.wz-meter { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.wz-meter i { width: 120px; height: 6px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.wz-meter i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 8%; background: var(--maroon); border-radius: 3px; transition: width .25s, background .25s; }
.wz-meter[data-l="1"] i::after { width: 45%; background: var(--accent); }
.wz-meter[data-l="2"] i::after { width: 75%; background: var(--sage); }
.wz-meter[data-l="3"] i::after { width: 100%; background: var(--sage); }
.wz-meter[data-l="2"] b, .wz-meter[data-l="3"] b { color: var(--sage); }
.wz-agree { align-items: flex-start; font-size: 15px; }
.wz-agree a { text-decoration: underline; text-underline-offset: 2px; }
.jb-check > span { min-width: 0; }
/* celebration */
.wz-party { position: relative; overflow: hidden; text-align: center; display: grid; justify-items: center; gap: 14px; padding: 56px 24px 44px; min-height: 480px; align-content: center; }
.wz-party .wz-title { font-family: var(--serif); font-size: clamp(32px, 4vw, 46px); margin: 0; }
.wz-party-badge { width: 76px; height: 76px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; animation: wz-pop .5s cubic-bezier(.2, 1.6, .4, 1); box-shadow: 0 12px 30px color-mix(in srgb, var(--sage) 40%, transparent); }
.wz-party-badge .jb-ico { width: 40px; height: 40px; }
@keyframes wz-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wz-party-list { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 8px; text-align: left; }
.wz-party-list li { display: flex; gap: 10px; align-items: center; font-size: 16px; }
.wz-party-list .jb-ico { color: var(--sage); width: 18px; height: 18px; flex: none; }
.wz-confetti { position: absolute; inset: 0; pointer-events: none; }
.wz-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: .9; animation: wz-fall linear forwards; }
@keyframes wz-fall { to { transform: translateY(560px) rotate(540deg); opacity: 0; } }
/* narrow: the guide becomes a slim progress bar */
@container (max-width: 820px) {
  .wz.wz2 { grid-template-columns: 1fr; min-height: 0; }
  .wz2 .wz-guide { display: none; }
  .wz2 .wz-main { padding: 18px 4px 10px; }
  .wz-mobile-bar { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
  .wz-mobile-bar i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brand, var(--sage)) var(--p), var(--line) var(--p)); }
}
@media (max-width: 560px) { .wz-acct { grid-template-columns: 1fr; } .wz-acct .full { grid-column: auto; } }
@media (prefers-reduced-motion: reduce) { .wz2 .wz-main, .wz-party-badge { animation: none; } .wz-confetti { display: none; } }
/* sign-up page holds the wizard edge to edge */
.jb-signup-card { max-width: 1120px; padding: 0; overflow: hidden; }
.jb-signup .wz2 .wz-guide { border-radius: 0; }
.wz-card { padding: 0; overflow: hidden; }
.wz2 .wz-addr { width: fit-content; max-width: 100%; }
.wz2 .wz-addr input { width: 200px; }
.wz-pv-top small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.wz-rv-h { margin: 6px 0 0; font-size: 15px; font-weight: 700; }
.wz-off { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.wz-off summary { cursor: pointer; color: var(--ink-3); font-size: 14px; }
.wz-off > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.jb-signup { padding-top: clamp(16px, 5vh, 48px); }
/* yes/no switch: each half is a flex box so the hidden radio never adds a line below the label */
.wz-seg { align-items: stretch; position: relative; }
.wz-seg label { display: flex; position: relative; }
.wz-seg span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 20px; }
.wz-q { align-content: start; }
.wz-me { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--sage) 6%, var(--card)); max-width: 536px; }
.wz-me > .jb-ico { color: #fff; background: var(--sage); border-radius: 50%; width: 28px; height: 28px; padding: 5px; flex: none; }
.wz-me div { display: grid; gap: 2px; }
.wz-me small { color: var(--ink-3); }
.wz-me p { margin: 6px 0 0; font-size: 14px; }
.wz-switch { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-3); }
.wz-switch .jb-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
/* the Back / Continue bar stays on screen: pinned to the bottom of the window while the step scrolls */
.wz2 .wz-foot { position: sticky; bottom: 0; z-index: 3; margin-top: auto; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, color-mix(in srgb, var(--card) 0%, transparent), var(--card) 28%); border-top: 0; }
.wz2 .wz-foot::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; border-top: 1px solid var(--line-soft); }
/* sticky needs ancestors that don't clip: round the corners on the panels instead */
.jb-signup-card, .wz-card { overflow: visible; }
.jb-signup .wz2 .wz-guide, .wz-card .wz2 .wz-guide { border-radius: var(--r) 0 0 var(--r); }
.wz2 .wz-guide { position: sticky; top: 0; align-self: start; max-height: 100vh; max-height: 100dvh; overflow: auto; }
.pay-need { background: color-mix(in srgb, var(--accent) 10%, var(--card)); border-radius: 10px; padding: 10px 14px; }
.pay-need ul { margin: 6px 0 0; padding-left: 20px; }
/* "Make it yours": the brand preview */
.wz-find { display: flex; gap: 8px; max-width: 560px; }
.wz-find input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: var(--card); }
.wz-find input:focus { outline: none; border-color: var(--brand, var(--sage)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, var(--sage)) 18%, transparent); }
.wz-brand { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-width: 560px; box-shadow: 0 10px 28px rgba(0,0,0,.07); background: var(--card); }
.wz-brand-bar { background: var(--b1); color: #fff; display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 12px; letter-spacing: .14em; }
.wz-brand-bar img { max-height: 40px; max-width: 160px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 8px; }
.wz-brand-mono { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--b1); display: grid; place-items: center; font-weight: 700; letter-spacing: 0; }
.wz-brand-body { padding: 16px 18px 18px; display: grid; gap: 8px; border-top: 4px solid var(--b3); }
.wz-brand-body b { font-size: 24px; line-height: 1.15; color: var(--ink); }
.wz-brand-body p { margin: 0; color: var(--ink-3); }
.wz-brand-btn { justify-self: start; background: var(--b1); color: #fff; padding: 8px 16px; border-radius: 9px; font-weight: 600; box-shadow: inset 0 -3px 0 var(--b2); }
.wz-sws { display: flex; gap: 14px; }
.wz-sw { display: grid; justify-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); cursor: pointer; }
.wz-sw input { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--card); cursor: pointer; }
.wz-q .wz-fld select { min-height: 42px; max-width: 260px; }
.wz-rv-brand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wz-rv-brand img { max-height: 28px; max-width: 110px; object-fit: contain; }
.wz-rv-brand i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); }
.wz-rv-brand span { font-size: 13px; color: var(--ink-3); }
.wz2 .wz-go { background: var(--maroon); border-color: var(--maroon); }

/* a platform owner viewing the account as someone */
.jb-viewing { position: sticky; top: 0; z-index: 90; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px; background: #1f1f1f; color: #fff; font-size: 14px; line-height: 1.35; }
.jb-viewing .jb-ico { flex: none; width: 18px; height: 18px; }
.jb-viewing span { flex: 1 1 260px; }
.jb-viewing button { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.jb-viewing button:hover { background: rgba(255,255,255,.12); }
.jb-viewing button[data-viewexit] { background: #fff; color: #1f1f1f; }

/* ---------------------------------------------------------------- welcome tour (web/js/tour.js) */
.tr { position: fixed; inset: 0; z-index: 90; }
.tr-shade { position: absolute; inset: 0; background: rgba(18, 16, 44, .5); opacity: 0; transition: opacity .25s; }
.tr.center .tr-shade { opacity: 1; }
.tr-hole { position: fixed; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(18, 16, 44, .5); transition: left .35s cubic-bezier(.2, .9, .3, 1), top .35s cubic-bezier(.2, .9, .3, 1), width .35s cubic-bezier(.2, .9, .3, 1), height .35s cubic-bezier(.2, .9, .3, 1); }
.tr-hole::after { content: ''; position: absolute; inset: -3px; border-radius: 14px; box-shadow: 0 0 0 0 var(--accent); animation: tr-pulse 1.8s ease-out infinite; }
@keyframes tr-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent); } }
.tr-card { position: fixed; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 24px 60px rgba(18, 16, 44, .32), 0 2px 6px rgba(18, 16, 44, .12); padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 8px; transition: left .35s cubic-bezier(.2, .9, .3, 1), top .35s cubic-bezier(.2, .9, .3, 1), opacity .2s; font: 15px/1.5 var(--sans); }
.tr.moving .tr-card { opacity: .0; }
.tr-card h3 { margin: 0; font: 600 21px/1.25 var(--serif); color: var(--maroon-text); }
.tr-card p { margin: 0; color: var(--ink-2); }
.tr-step { font: 700 11px/1 var(--caps); letter-spacing: .12em; text-transform: uppercase; color: var(--sage-text); }
.tr-dots { display: flex; gap: 6px; margin-top: 6px; }
.tr-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .2s, width .2s; }
.tr-dots span.done { background: var(--maroon-line); }
.tr-dots span.on { width: 22px; border-radius: 4px; background: var(--maroon); }
.tr-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tr-foot .jb-grow { flex: 1; }
.tr-skip { padding: 0 8px; margin-left: -8px; }
/* the welcome card */
.tr.center .tr-card { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw / var(--zf, 1) - 32px)); padding: 0; overflow: hidden; animation: tr-in .35s cubic-bezier(.2, .9, .3, 1); }
@keyframes tr-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
.tr-hello { display: flex; flex-direction: column; gap: 10px; padding: 0 26px 6px; text-align: center; align-items: center; }
.tr-hello::before { content: ''; display: block; align-self: stretch; height: 92px; margin: 0 -26px -54px; background: linear-gradient(135deg, var(--maroon), var(--sage)); }
.tr-badge { width: 76px; height: 76px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 36px; box-shadow: 0 6px 18px rgba(18, 16, 44, .18); position: relative; animation: tr-wave 1.4s ease-in-out .3s 2; }
@keyframes tr-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-8deg); } 60% { transform: rotate(10deg); } 80% { transform: rotate(-4deg); } }
.tr-hello h2 { margin: 4px 0 0; font: 600 28px/1.2 var(--serif); color: var(--maroon-text); }
.tr-hello .tr-lead { font-size: 16px; color: var(--ink); }
.tr-meta { font-size: 13px; color: var(--ink-3) !important; }
.tr.center .tr-foot { padding: 12px 22px 20px; justify-content: center; gap: 10px; }
/* a stop whose spot isn't on screen: the same card as the other stops, just centered */
.tr.center .tr-card:not(:has(.tr-hello)) { padding: 18px 20px 16px; overflow: visible; }
.tr.center .tr-card:not(:has(.tr-hello)) .tr-foot { padding: 0; justify-content: flex-start; gap: 8px; }
/* phones: the card is a sheet at the bottom (or top, when the spotlight is low on the screen) */
.tr-card.sheet { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); top: auto; width: auto; max-height: calc(100dvh - 24px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); overflow-y: auto; }
.tr-card.sheet.top { top: calc(12px + env(safe-area-inset-top)); bottom: auto; }
@media (prefers-reduced-motion: reduce) { .tr-hole, .tr-card { transition: none; } .tr-hole::after, .tr-badge, .tr.center .tr-card { animation: none; } }
/* staff profile: access choices and per-class actions */
.stf-access { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.stf-access > span { font-weight: 600; }
.stf-access .jb-check { align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.stf-access .jb-check input { align-self: center; }
.jb-tbl td.stf-acts { white-space: nowrap; text-align: right; width: 1%; }
.jb-tbl td.stf-acts .jb-btn + .jb-btn { margin-left: 4px; }
.fam-edit { border: 0; background: none; padding: 6px; border-radius: 8px; color: var(--ink-3, #6b6b6b); cursor: pointer; display: inline-flex; }
.fam-edit:hover { background: var(--line-soft); color: var(--ink); }
.fam-edit svg { width: 16px; height: 16px; }
.cls-co { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; }

/* ---------------------------------------------------------------- Add a family (office.js addFamily) */
.af { display: flex; flex-direction: column; gap: 22px; }
.af-sec { display: flex; flex-direction: column; gap: 10px; }
.af-sec + .af-sec { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.af-sec h3 { margin: 0; font: 700 12px/1 var(--caps); letter-spacing: .12em; text-transform: uppercase; color: var(--sage-text); }
.af-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.af-head .jb-muted { font-size: 13px; }
.af-rows { display: flex; flex-direction: column; gap: 8px; }
.af-row { display: grid; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--chip-soft); }
.af-parent { grid-template-columns: 28px 1fr 1fr 1.5fr 150px 36px; }
.af-student { grid-template-columns: 28px 1fr 1fr 170px 36px; }
.af-row input, .af-row select { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font: inherit; font-size: 15px; color: var(--ink); min-width: 0; width: 100%; }
.af-row input:focus, .af-row select:focus { outline: 2px solid var(--maroon-line); outline-offset: 0; border-color: var(--maroon); }
.af-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon-tint); color: var(--maroon-text); font-weight: 700; font-size: 13px; }
.af-x { width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.af-x:hover { background: var(--chip); color: var(--ink); }
.af-x[hidden] { display: grid; visibility: hidden; }
.af-add { align-self: flex-start; }
.af-req { grid-column: 2 / -2; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; padding: 6px 0 2px; border-top: 1px dashed var(--line); margin-top: 2px; }
.af-req .af-reqlbl { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.af-req .jb-field { min-width: 0; }
.af-famreq:empty { display: none; }
.af-famreq { grid-column: 1 / -1; }
.af-famreq .af-req { grid-column: auto; }
@media (max-width: 720px) {
  .af-parent, .af-student { grid-template-columns: 28px 1fr 1fr 36px; }
  .af-parent [name="email"], .af-parent [name="relation"], .af-student [name="grade"] { grid-column: 2 / 4; }
  .af-row .af-x { grid-column: 4; grid-row: 1; }
}

/* ---- Where now? (office: the class a student is in right now) */
.wn-load { padding: 18px 0; }
.wn-flag { margin-bottom: 12px; }
.wn-now { border: 1px solid var(--maroon-line); background: var(--maroon-wash); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.wn-now.quiet { border-color: var(--line); background: var(--paper); }
.wn-tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--maroon-text); }
.wn-now.quiet .wn-tag { color: var(--ink-3); }
.wn-class { font-family: var(--serif); font-size: 26px; line-height: 1.15; color: var(--ink); }
.wn-where { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 15px; }
.wn-room { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--maroon-ink); }
.wn-room svg { width: 18px; height: 18px; }
.wn-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.wn-h { font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 6px; }
.wn-list { display: flex; flex-direction: column; }
.wn-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); }
.wn-row + .wn-row { border-top: 1px solid var(--line-soft); }
.wn-row .jb-grow { display: flex; flex-direction: column; min-width: 0; }
.wn-row.on { background: var(--maroon-tint); border-top-color: transparent; }
.wn-row.past { opacity: .55; }
.wn-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-3); min-width: 104px; }

/* ---- Streaks & personal bests (student dashboard) */
.stk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-auto-rows: 90px; gap: 10px; overflow: hidden; max-height: calc(var(--stk-rows, 1) * 90px + (var(--stk-rows, 1) - 1) * 10px); }
.stk-tiles > * { min-width: 0; }
.stk-tile { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; background: var(--paper); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.stk-tile:hover { border-color: var(--maroon-line); transform: translateY(-1px); }
.stk-tile.hot { border-color: var(--accent); background: var(--accent-tint); }
.stk-num { font-family: var(--serif); font-size: 30px; line-height: 1.05; color: var(--ink); display: flex; align-items: baseline; gap: 6px; }
.stk-num .fl { font-size: 20px; }
.stk-lbl { font-weight: 600; font-size: 13px; }
.stk-sub { font-size: 12px; color: var(--ink-3); }
.stk-glow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.stk-glow + .stk-glow { border-top: 1px solid var(--line-soft); }
.stk-up { font-weight: 700; color: var(--sage-text); background: var(--sage-tint); border-radius: 999px; padding: 2px 9px; font-size: 13px; white-space: nowrap; }
.stk-h { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin: 12px 0 2px; }
.stk-compact { display: flex; flex-direction: column; justify-content: center; gap: 2px; }

/* ---- Birthday confetti */
.bday-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.bday-confetti i { position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; opacity: .95; animation: bday-fall linear forwards; }
@keyframes bday-fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); opacity: .9; } }
.bday-banner { display: flex; align-items: center; gap: 12px; }
.bday-banner .cake { font-size: 28px; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .bday-confetti { display: none; } }
.stk-card { display: flex; flex-direction: column; }
.stk-card .stk-tiles { margin-block: auto; width: 100%; }

/* teachers' class reports (My classes → Reports) */
.jb-crep-nav { flex: 0 1 260px; }
.jb-crep-nav .jb-item { text-decoration: none; color: inherit; }
.jb-crep-nav .jb-item.on { color: var(--maroon-text); font-weight: 700; }
.jb-crep-sub { margin: 2px 0 0; }
.jb-crep-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.jb-crep-controls .jb-field { min-width: 0; }
.jb-crep-controls .jb-crep-class { flex: 1 1 240px; max-width: 360px; }
.jb-crep-controls input[type=date] { width: auto; }
.jb-crep-sum { display: flex; flex-wrap: wrap; gap: 10px; }
.jb-crep-sum .jb-kpi { padding: 8px 14px; gap: 10px; }
.jb-crep-sum .jb-kpi .v { font-size: 20px; min-width: 0; }
.jb-crep-who { color: inherit; text-decoration: none; }
.jb-crep-who:hover { text-decoration: underline; }
@media (max-width: 640px) { .jb-crep-nav { flex-basis: 100%; } .jb-crep-controls .jb-field { flex: 1 1 140px; } .jb-crep-controls .jb-crep-class { flex-basis: 100%; max-width: none; } .jb-crep-controls input[type=date] { width: 100%; } }
@media print { .jb-crep-sum .jb-kpi { border-color: #ccc; } }
.jb-crep-date { white-space: nowrap; }
.jb-crep-controls .jb-btn { margin-bottom: 4px; }
.jb-crep-pick { display: none; }
@media (max-width: 640px) { .jb-crep-nav { display: none; } .jb-crep-controls .jb-field.jb-crep-pick { display: flex; flex-basis: 100%; max-width: none; } }

/* Transcripts (pages/transcripts.js) */
.trx-filter { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.trx-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.trx-bar .trx-facts { margin-left: auto; }
.trx-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--accent-tint); font-size: 14px; }
.trx-act { text-align: right; white-space: nowrap; width: 1%; }
.trx-rec { table-layout: fixed; min-width: 760px; }
.trx-rec th:nth-child(1) { width: 25%; } .trx-rec th:nth-child(2) { width: 17%; } .trx-rec th:nth-child(3) { width: 12%; } .trx-rec th:nth-child(4) { width: 15%; }
.trx-rec th:nth-child(5) { width: 8%; } .trx-rec th:nth-child(6) { width: 15%; } .trx-rec th:nth-child(7) { width: 8%; }
.trx-rec td { overflow-wrap: anywhere; } .trx-rec .trx-act { width: auto; }
.trx-fmt .trx-prev { position: sticky; top: calc(var(--jb-head, 0px) + 16px); }
.trx-who { display: inline-flex; align-items: center; gap: 8px; }
.trx-who select { min-height: 38px; padding: 4px 10px; border: 1px solid #D5CFC2; border-radius: var(--r-sm); background: #fff; font-size: 14px; max-width: 280px; }
.trx-scale input { width: 100%; min-width: 0; min-height: 36px; padding: 4px 8px; border: 1px solid #D5CFC2; border-radius: var(--r-sm); background: #fff; font-size: 15px; }
.trx-scale td.num input { text-align: right; max-width: 90px; }
.trx-scale td:first-child input { max-width: 80px; font-weight: 700; }
.trx-scale .jb-iconbtn { width: 32px; height: 32px; }
.trx-sig { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.trx-sig .jb-iconbtn { margin-bottom: 2px; }
.trx-seal { display: flex; align-items: center; gap: 14px; }
.trx-seal img, .trx-seal-empty { width: 84px; height: 84px; object-fit: contain; border-radius: 50%; border: 1px dashed #D5CFC2; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); flex: none; }
.trx-file { position: relative; overflow: hidden; cursor: pointer; }
.trx-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.trx-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--chip); padding: 8px 10px; border-radius: var(--r-sm); overflow-x: auto; }
@media (max-width: 760px) {
  .trx-fmt .trx-prev { position: static; }
  /* each signature: Title with its remove button on the same row, the name under it */
  .trx-sig { grid-template-columns: minmax(0, 1fr) auto; }
  .trx-sig > .jb-field:nth-child(2) { grid-column: 1; }
  .trx-sig .jb-iconbtn { grid-column: 2; grid-row: 1; }
}
/* Transcript format on phones: a Preview button that stays in reach (inside the save bar while it shows) */
.trx-peek, .trx-peek-in { display: none; }
@media (max-width: 760px) {
  .trx-peek { display: flex; width: max-content; position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 19; margin: 12px 0 0 auto; box-shadow: 0 10px 24px rgba(40, 30, 20, .22); }
  .trx-peek-in { display: inline-flex; }
  .jb-cols.trx-fmt:has(~ #bar:not([hidden])) ~ .trx-peek { display: none; }
}
.trx-peekbox iframe { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.trx-scale td { padding-top: 5px; padding-bottom: 5px; }
.trx-fmt .jb-field > .jb-seg { align-self: flex-start; }
.trx-warn { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--accent-tint); font-size: 14px; line-height: 1.4; }
.trx-warn[hidden], .trx-check[hidden] { display: none; }
.trx-warn .jb-ic, .trx-warn svg { flex: none; margin-top: 2px; }
.trx-check { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line, #E5E0D5); border-radius: var(--r-sm); background: var(--paper, #fff); font-size: 14px; max-height: 260px; overflow: auto; }
.trx-check ul { margin: 0; padding-left: 18px; } .trx-check li { margin: 2px 0; }
.jb-check.is-off { opacity: .6; }
.jb-page-head > .trx-acts { flex-shrink: 1; min-width: 0; }

/* ---------------------------------------------------------------- Manage account → Roles & permissions (pages/roles.js) */
.rl-bases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1180px) { .rl-bases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rl-bases { grid-template-columns: 1fr; } }
.rl-base { display: flex; gap: 12px; align-items: flex-start; }
.rl-base .jb-grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rl-base p { margin: 4px 0 0; color: var(--ink-2); }
.rl-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--sage-tint); color: var(--sage-ink); }
.rl-ico .jb-ico { width: 20px; height: 20px; }
/* custom roles on phones: each role is a card, with Edit beside its name (no sideways scrolling) */
@media (max-width: 640px) {
  .rl-table, .rl-table tbody { display: block; width: 100% !important; }
  .rl-table thead { display: none; }
  .rl-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .rl-table tr:last-child { border-bottom: 0; }
  .rl-table td, .rl-table td.num { display: block; padding: 0; border: 0; text-align: left; width: auto !important; max-width: none !important; }
  .rl-table td:last-child { grid-column: 2; grid-row: 1; align-self: start; }
  .rl-table td:not(:first-child):not(:last-child) { grid-column: 1 / -1; }
  .rl-table td[data-label]::before { content: attr(data-label) ': '; color: var(--ink-3, var(--ink-2)); font-weight: 600; }
  .rl-table td.num[data-label] > div { display: inline-block; margin-left: 6px; }
}
.rl-empty { display: flex; flex-direction: column; gap: 8px; }
.rl-empty p { margin: 0; }
/* the role editor (sheet({ size: 'full' })): fixed top fields, a rail of groups beside the scrolling permissions */
.rl-ed { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.rl-top { flex: none; position: relative; z-index: 2; padding: 16px 24px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.rl-topgrid { display: grid; grid-template-columns: minmax(240px, 1.1fr) minmax(220px, 1.3fr) auto; gap: 14px 18px; align-items: start; }
.rl-namefield > label, .rl-basefield > span { font-weight: 600; }
.rl-optional { font-weight: 400; color: var(--ink-3); }
.rl-baseabout { margin: 0; }
.rl-pick { flex-wrap: nowrap; }
.rl-pick button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.rl-pick .jb-ico { width: 16px; height: 16px; }
.rl-basefixed { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 44px; }
.rl-basefixed .jb-small { max-width: 260px; }
/* the name field's suggestions (a combobox) */
.rl-combo { position: relative; }
.rl-sugg { position: absolute; left: 0; top: calc(100% + 6px); width: max(100%, 420px); max-width: calc(100vw / var(--zf, 1) - 32px); max-height: min(440px, calc(100vh / var(--zf, 1) - 260px)); max-height: min(440px, calc(100dvh / var(--zf, 1) - 260px)); overflow: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 14px 40px rgba(27, 20, 15, .18); z-index: 5; }
.rl-opt { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; }
.rl-opt[aria-selected="true"] { background: var(--maroon-wash); box-shadow: inset 3px 0 0 var(--maroon); }
.rl-optt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rl-optname { font-weight: 600; color: var(--ink); }
.rl-opt mark { background: var(--accent-tint); color: inherit; border-radius: 3px; padding: 0 1px; }
.rl-optmeta { font-size: 12.5px; font-weight: 600; color: var(--sage-text); }
.rl-optd { font-size: 13px; color: var(--ink-3); }
.rl-opthint { padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-3); }
.rl-ico.sm { width: 32px; height: 32px; border-radius: 8px; }
.rl-ico.sm .jb-ico { width: 17px; height: 17px; }
/* the rail of groups, and the scrolling permissions */
.rl-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.rl-rail { border-right: 1px solid var(--line); background: var(--chip-soft); overflow: auto; padding: 14px 10px; }
.rl-raillist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rl-railbtn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.rl-railbtn:hover { background: var(--chip); }
.rl-railbtn.dim { opacity: .45; }
.rl-rname { min-width: 0; }
.rl-rcount { flex: none; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-3); }
.rl-rcount.some { background: var(--sage-tint); color: var(--sage-ink); }
.rl-railbtn.locked .rl-rcount { background: transparent; padding: 0 4px; }
.rl-railbtn.locked .jb-ico { width: 16px; height: 16px; }
.rl-pane { overflow: auto; padding: 16px 24px 28px; display: flex; flex-direction: column; gap: 14px; scroll-padding-top: 12px; }
.rl-tools { display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; }
.rl-find { flex: 1 1 280px; max-width: 420px; min-height: 40px; background: var(--card); }
.rl-allbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.rl-summary { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--sage-mist); border: 1px solid var(--sage-line); font-size: 14px; }
.rl-summary .jb-ico { flex: none; width: 18px; height: 18px; color: var(--sage-ink); margin-top: 1px; }
.rl-presetbar { flex-wrap: nowrap; align-items: flex-start; }
.rl-presetbar > .jb-ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--sage-ink); }
.rl-presetbar > span { white-space: normal; flex: 1 1 auto; min-width: 0; }
.rl-presetbar b { white-space: normal; }  /* a long role name wraps instead of running under Clear */
.rl-presetbar .jb-btn { flex: none; margin: -6px -8px -6px 0; }
.rl-presetnote:empty { display: none; }
/* groups flow in balanced columns; each group keeps together */
.rl-grid { columns: 3 340px; column-gap: 16px; }
.rl-gcard { break-inside: avoid; display: flex; flex-direction: column; margin: 0 0 16px; padding: 14px 14px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); scroll-margin-top: 12px; }
.rl-gcard.flash { animation: rl-flash 1.1s ease-out; }
@keyframes rl-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--maroon-line); border-color: var(--maroon); } }
.rl-ghead { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.rl-ghead .rl-gtitles { padding-top: 4px; }
.rl-gtitles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.rl-gtitle { margin: 0; font-family: var(--caps); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maroon-text); }
.rl-gtitle:focus { outline: none; }
.rl-gcount { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rl-gcount.some { color: var(--sage-ink); }
.rl-allnone { flex: none; padding: 2px; gap: 2px; border-radius: 8px; flex-wrap: nowrap; }
.rl-allnone button { min-height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.rl-gabout { margin: 4px 0 6px; }
.rl-perms { display: flex; flex-direction: column; }
.rl-perm { display: flex; gap: 12px; align-items: flex-start; padding: 9px 8px; margin: 0 -6px; border-top: 1px solid var(--line-soft); border-radius: var(--r-sm); cursor: pointer; transition: background .12s; }
.rl-perm:hover { background: var(--chip-soft); }
.rl-perm.on { background: var(--sage-mist); box-shadow: inset 3px 0 0 var(--sage); border-top-color: transparent; }
.rl-perm.on + .rl-perm { border-top-color: transparent; }
.rl-perm .ft-switch { margin-top: 0; }
.rl-ptext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.rl-pname { font-weight: 600; font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.rl-perm.on .rl-pname { color: var(--ink); }
.rl-pname .jb-pill { padding: 3px 7px; font-size: 11px; vertical-align: 1px; }
.rl-pwhat { font-size: 13px; color: var(--ink-3); line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rl-perm.open .rl-pwhat { display: block; -webkit-line-clamp: unset; }
.rl-more { border: 0; background: none; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--maroon-text); cursor: pointer; }
.rl-more:hover { text-decoration: underline; }
.rl-locked { background: var(--chip-soft); border-style: dashed; }
.rl-perm.locked { cursor: default; }
.rl-perm.locked:hover { background: none; }
.rl-perm.locked .rl-pname { color: var(--ink-3); }
.rl-nomatch, .rl-nothing { margin: 0; padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); }
.rl-extra { display: flex; flex-direction: column; gap: 10px; }
.rl-extra:empty { display: none; }
.rl-people { display: flex; flex-direction: column; gap: 4px; }
.rl-people p { margin: 0; }
/* "Start from a common role" */
.rl-picks { display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rl-pickshead { display: flex; flex-direction: column; gap: 2px; }
.rl-pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.rl-pickcard { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; }
.rl-pickcard:hover { border-color: var(--maroon-line); background: var(--maroon-wash); }
.rl-pickcard:focus-visible { outline: 2px solid var(--maroon); outline-offset: 1px; }
.rl-pickt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rl-pickt b { font-size: 14px; line-height: 1.3; }
.rl-pickbase { font-size: 12px; font-weight: 600; color: var(--sage-text); }
.rl-pickd { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
@media (max-width: 1100px) {
  .rl-topgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rl-basefield { grid-column: 1 / -1; }
  .rl-main { grid-template-columns: 210px minmax(0, 1fr); }
}
/* phones: one scrolling page; the rail becomes a row of chips that stays at the top */
@media (max-width: 640px) {
  .rl-ed { overflow: auto; overscroll-behavior: contain; }
  .rl-top { padding: 14px 16px 12px; }
  .rl-topgrid { grid-template-columns: minmax(0, 1fr); }
  .rl-pick { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .rl-pick button { justify-content: center; }
  .rl-sugg { width: 100%; max-width: none; max-height: 340px; }
  .rl-main { display: block; flex: none; }
  .rl-rail { position: sticky; top: 0; z-index: 1; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; background: var(--paper); }
  .rl-rail::-webkit-scrollbar { display: none; }
  .rl-raillist { flex-direction: row; gap: 6px; width: max-content; }
  .rl-railbtn { width: auto; min-height: 34px; padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 13px; white-space: nowrap; }
  .rl-railbtn.locked { padding-right: 10px; }
  .rl-pane { overflow: visible; padding: 14px 16px 20px; }
  .rl-gcard { scroll-margin-top: 62px; }
  .rl-find { max-width: none; }
  .rl-allbtns { margin-left: 0; width: 100%; }
  .rl-allbtns .jb-btn { flex: 1 1 0; }
  .rl-grid { columns: 1; }
  .rl-pickgrid { display: flex; flex-wrap: wrap; gap: 8px; }
  .rl-pickcard { padding: 7px 14px; border-radius: 999px; align-items: center; }
  .rl-pickcard .rl-ico, .rl-pickbase, .rl-pickd { display: none; }
  .rl-pickt b { font-size: 14px; font-weight: 600; }
}
.rl-who { display: flex; gap: 10px; align-items: center; }
.rl-q { max-width: 360px; }
/* People tab: search + filter, then each person with their base roles (pill · custom role · ×) and Add a role */
.rl-ptools { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; }
.rl-ptools .rl-q { flex: 1 1 280px; max-width: 380px; }
.rl-filters { flex: 0 1 auto; }
.rl-filters button { display: inline-flex; align-items: center; gap: 6px; }
.rl-fcount { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rl-fcount:empty { display: none; }
.rl-filters button[aria-pressed="true"] .rl-fcount { color: var(--maroon-text); }
.rl-pnote { margin: 0; max-width: 860px; }
.rl-plist { padding-top: 4px; padding-bottom: 4px; }
.rl-person { align-items: flex-start; gap: 10px 24px; padding: 14px 0; }
.rl-who { align-items: flex-start; }
.rl-who .jb-avatar { flex: none; margin-top: 1px; }
.rl-whotext { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rl-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rl-name .jb-pill { padding: 4px 8px; font-size: 11px; }
.rl-sub { overflow-wrap: anywhere; }
.rl-where { color: var(--sage-text); font-weight: 600; }
.rl-roles { flex: 0 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.jb-item > .jb-grow + .rl-roles { margin-left: auto; }
.rl-row { display: grid; grid-template-columns: 136px minmax(0, 1fr) 36px; align-items: center; gap: 8px; }
.rl-basepill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--chip); color: var(--ink-2); justify-self: start; }
.rl-basepill .jb-ico { width: 15px; height: 15px; flex: none; }
.rl-basepill.rb-admin { background: var(--maroon-tint); color: var(--maroon-text); }
.rl-basepill.rb-teacher { background: var(--sage-tint); color: var(--sage-ink); }
.rl-basepill.rb-parent { background: var(--amber-tint); color: var(--amber); }
.rl-basepill.rb-student { background: var(--chip); color: #454545; }
.rl-cust { display: flex; align-items: center; gap: 8px; min-width: 0; height: 36px; padding: 0 10px 0 12px; border: 1px dashed #CFCAC0; border-radius: var(--r-sm); background: #fff; color: var(--ink-3); font-size: 14px; text-align: left; cursor: pointer; }
.rl-cust:hover { border-color: var(--maroon-line); background: var(--maroon-wash); color: var(--maroon-text); }
.rl-cust.set { border-style: solid; border-color: #D5CFC2; color: var(--ink); font-weight: 600; }
.rl-cust.off { border-color: #E8CF8A; background: var(--amber-tint); }
.rl-custname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-custoff { flex: none; font-size: 11.5px; font-weight: 700; color: var(--amber); }
.rl-cust .jb-ico { flex: none; width: 16px; height: 16px; color: var(--ink-3); }
.rl-custfixed { display: flex; align-items: center; gap: 8px; min-width: 0; height: 36px; }
.rl-x { width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.rl-x .jb-ico { width: 16px; height: 16px; }
.rl-x:hover { background: var(--maroon-wash); border-color: var(--maroon-line); color: var(--maroon-text); }
.rl-addrow { display: flex; padding-left: 144px; }
.rl-add .jb-ico { width: 16px; height: 16px; }
.rl-pfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0 8px; border-top: 1px solid var(--line-soft); }
.rl-pfoot:empty { display: none; }
/* the pickers: custom role, Add a role, which family */
.rl-picker, .rl-fam { display: flex; flex-direction: column; gap: 10px; }
.rl-choices { display: flex; flex-direction: column; gap: 8px; }
.rl-choice { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.rl-choice:hover:not([disabled]) { border-color: var(--maroon-line); background: var(--maroon-wash); }
.rl-choice:focus-visible { outline: 2px solid var(--maroon); outline-offset: 1px; }
.rl-choice[aria-checked="true"] { border-color: var(--maroon); background: var(--maroon-wash); box-shadow: inset 3px 0 0 var(--maroon); }
.rl-choice[disabled] { cursor: default; background: var(--chip-soft); color: var(--ink-3); }
.rl-choice[disabled] b { color: var(--ink-2); }
.rl-choice > .jb-pill { flex: none; margin-left: auto; align-self: center; }
.rl-radio { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid #C9C3B8; display: grid; place-items: center; background: #fff; }
.rl-choice[aria-checked="true"] .rl-radio { border-color: var(--maroon); background: var(--maroon); color: var(--on-maroon); }
.rl-radio .jb-ico { width: 12px; height: 12px; stroke-width: 3; }
.rl-ct { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rl-ct b { font-size: 15px; line-height: 1.3; }
.rl-cd { font-size: 13.5px; color: var(--ink-3); line-height: 1.4; }
.rl-cmeta { font-size: 12.5px; font-weight: 600; color: var(--sage-text); line-height: 1.4; }
/* Add person: who you're adding, then (a student) which family */
.rl-addkind { align-items: center; }
.rl-addkind > .jb-ico:last-child { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
.rl-addkind:hover > .jb-ico:last-child { color: var(--maroon); }
.rl-akicon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--maroon-wash); color: var(--maroon); }
.rl-akicon .jb-ico { width: 20px; height: 20px; }
.rl-addkind > .jb-avatar { flex: none; }
.rl-famfind { display: flex; flex-direction: column; gap: 12px; }
.rl-famfind .jb-search { width: 100%; }
.rl-famlist { min-height: 60px; }
.rl-linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.rl-ccount { flex: none; align-self: center; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.rl-create { border-style: dashed; }
.rl-create.lead { border-style: solid; border-color: var(--maroon-line); background: var(--maroon-wash); }
.rl-create .rl-ico, .rl-basechoice .rl-ico { margin-top: -2px; }
.rl-pickempty { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--chip-soft); color: var(--ink-2); }
.rl-go { flex: none; align-self: center; color: var(--ink-3); }
.rl-go .jb-ico { width: 18px; height: 18px; }
.rl-addfoot { margin: 4px 0 0; }
.rl-nofam { margin: 0; padding: 12px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); }
.rl-famlist { max-height: min(320px, calc(50vh / var(--zf, 1))); overflow: auto; padding: 1px; }
.rl-gain { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--sage-mist); border: 1px solid var(--sage-line); }
.rl-gain p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.rl-confirm p { margin: 0; }
.rl-guard { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--amber-tint); border: 1px solid #E8CF8A; color: var(--ink); }
.rl-guard p { margin: 0; }
.rl-guard > .jb-ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--amber); }
.rl-one .rl-roles { flex: none; }
.rl-one .rl-row { grid-template-columns: 124px minmax(0, 1fr) 36px; }
.rl-one .rl-addrow { padding-left: 132px; }
/* fields someone can see but not change (e.g. an administrator's email, for someone who isn't an account manager) */
.jb-field input:disabled, .jb-field select:disabled, .jb-field textarea:disabled { background: var(--line-soft); color: var(--ink-3, #6b6b6b); cursor: not-allowed; }
.rl-one .rl-mgr { align-items: flex-start; }
.rl-one .rl-mgr input { margin-top: 2px; flex: none; }
.rl-mgrwhy { display: block; margin-top: 2px; }
.rl-mgrinfo.warn { background: var(--amber-tint); border-color: #E8CF8A; }
.rl-mgrinfo .jb-ico { flex: none; width: 18px; height: 18px; }
.rl-muted { opacity: .55; }
@media (max-width: 860px) { .rl-roles { flex-basis: 100%; } .jb-item > .jb-grow + .rl-roles { margin-left: 46px; } }
@media (max-width: 600px) {
  .rl-ptools .rl-q { max-width: none; }
  .rl-filters { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .rl-filters::-webkit-scrollbar { display: none; }
  .rl-filters button { flex: none; }
  .jb-item > .jb-grow + .rl-roles { margin-left: 0; }
  .rl-row, .rl-one .rl-row { grid-template-columns: 124px minmax(0, 1fr) 36px; gap: 6px; }
  .rl-custfixed .jb-small { display: none; }
  .rl-basepill { padding: 0 10px 0 8px; }
  .rl-addrow, .rl-one .rl-addrow { padding-left: 0; }
  .rl-ccount { display: none; }
}
/* a class someone may only look at (a dean's "Other classes"): action buttons go, cells and fields can't be changed */
.sec-ro .jb-btn:not([data-print]) { display: none !important; }
.sec-ro button, .sec-ro input, .sec-ro select, .sec-ro textarea, .sec-ro [contenteditable] { pointer-events: none; }

/* ---------------------------------------------------------------- Fundraising (web/js/pages/fundraising.js) and the giving page (web/js/give.js) */
.fr-count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--maroon); color: var(--on-maroon); font-size: 12px; align-items: center; justify-content: center; margin-left: 4px; }
.fr-notice { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--r); background: var(--accent-tint); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 14px; }
.fr-notice.ok { background: var(--sage-mist); border-color: var(--sage-line); }
.fr-notice .jb-grow { min-width: 220px; }
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.fr-camp { padding: 0; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.fr-camp:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.fr-camp-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.fr-camp-ph { height: 64px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--maroon-wash), var(--sage-mist)); color: var(--maroon-text); }
.fr-camp-ph .jb-ico { width: 34px; height: 34px; opacity: .7; }
.fr-camp-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.fr-camp-t { font-size: 20px; line-height: 1.2; }
.fr-camp-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.fr-bar { height: 10px; border-radius: 99px; background: var(--chip); overflow: hidden; display: flex; }
.fr-bar > span { display: block; height: 100%; background: var(--maroon); }
.fr-bar > span.lt { background: var(--maroon); opacity: .3; }
.fr-bar.big { height: 14px; }
.fr-crumb { margin: 0; } .fr-crumb a { color: var(--ink-3); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.fr-hero { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.fr-thermocard { display: flex; align-items: center; gap: 18px; }
.fr-thermo { width: 64px; height: 236px; flex: none; }
.fr-thermo .tube { fill: var(--chip); stroke: var(--line); stroke-width: 1; }
.fr-thermo .fill { fill: var(--maroon); }
.fr-thermo .pledged { fill: var(--maroon); opacity: .3; }
.fr-thermo .tick { stroke: var(--ink-4); stroke-width: 1.2; }
.fr-thermo-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fr-big { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--maroon-text); font-weight: 600; }
.fr-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.fr-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--maroon); opacity: .3; display: inline-block; }
/* money helpers recorded that the office hasn't confirmed yet (counted apart from the total) */
.fr-await { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; text-decoration: none; color: inherit; }
.fr-confirm .fr-quote { margin-top: 4px; padding-left: 10px; border-left: 3px solid var(--line); color: var(--ink-2); }
.fr-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fr-kpis .jb-kpi { text-decoration: none; color: inherit; }
.fr-chart svg { margin-top: 6px; }
.fr-amt { min-width: 96px; text-align: right; }
.fr-dp { display: flex; flex-direction: column; gap: 8px; position: relative; }
.fr-dp-chosen { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--sage-line); background: var(--sage-mist); border-radius: var(--r-sm); }
.fr-dp-chosen .jb-grow { display: flex; flex-direction: column; min-width: 0; }
.fr-dp-find { display: flex; flex-direction: column; gap: 6px; }
.fr-dp-list { border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; max-height: 240px; overflow-y: auto; box-shadow: var(--shadow); }
.fr-dp-list button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: #fff; text-align: left; cursor: pointer; font: inherit; }
.fr-dp-list button:hover, .fr-dp-list button:focus { background: var(--chip-soft); outline: none; }
.fr-dp-list button span { font-size: 12.5px; color: var(--ink-3); }
.fr-dp-newbtn { align-self: flex-start; background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: var(--maroon-text); display: inline-flex; align-items: center; gap: 4px; }
.fr-dp-newbtn .jb-ico { width: 16px; height: 16px; }
.fr-dp-new { padding: 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); }
.fr-gift .jb-seg { align-self: flex-start; }
.fr-batch { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.fr-batch-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 110px 40px; gap: 8px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.fr-fundrow { display: grid; grid-template-columns: minmax(0, 1fr) 130px 40px; gap: 8px; align-items: center; }
.fr-pick { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-top: 6px; }
.fr-pick .jb-check { font-size: 14px; }
.fr-thumb { width: 72px; height: 52px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.fr-ithumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; float: left; margin-right: 10px; }
.fr-selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--maroon-wash); border-bottom: 1px solid var(--maroon-line); }
.fr-selbar b { margin-right: auto; }
.jb-tbl tr.fr-void td { color: var(--ink-4); text-decoration: line-through; }
.jb-tbl tr.fr-void td:last-child, .jb-tbl tr.fr-void td .jb-pill { text-decoration: none; }
.fr-task { align-items: flex-start; }
.fr-task .jb-check { align-items: flex-start; font-size: 14px; }
.fr-task .jb-iconbtn { width: 30px; height: 30px; border-color: transparent; }
.fr-done { text-decoration: line-through; color: var(--ink-4); }
.fr-note { border-left: 3px solid var(--sage-line); padding: 2px 0 2px 10px; }
.fr-note p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; }
.jb-field.fr-inl { flex-direction: row; align-items: center; gap: 6px; }
.jb-field.fr-inl > span { font-weight: 500; color: var(--ink-3); }
/* My giving: what a family still owes for auction items, and how to pay; the gifts table fits a phone */
.fr-owed { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: inset 4px 0 0 var(--accent); }
.fr-owed .jb-list { margin-top: 8px; border-top: 1px solid var(--line-soft); }
.fr-howpay { margin-top: 10px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--accent-tint); }
.fr-show-sm { display: none; }
.fr-pending td { background: color-mix(in srgb, var(--amber-tint) 35%, transparent); }
.fr-awaitnote { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.fr-awaitnote > span:last-child { flex: 1 1 220px; }
@media (max-width: 640px) {
  .fr-owed .jb-item { flex-wrap: nowrap; } .fr-owed .jb-item > .jb-grow { flex-basis: 0%; }
  .fr-mygifts .fr-hide-sm { display: none; }
  .fr-mygifts .fr-show-sm { display: block; }
  .fr-rcpt { padding: 0 10px; } .fr-rcpt span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.gv-hero { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 18px; }
.gv-img { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--r); }
.gv-head { display: flex; flex-direction: column; gap: 8px; }
.gv-title { font-size: 34px; margin: 0; }
.gv-prog { display: flex; flex-direction: column; gap: 6px; }
.gv-raised { font-size: 22px; color: var(--maroon-text); }
.gv-story p { margin: 0 0 12px; line-height: 1.6; } .gv-story p:last-child { margin: 0; }
.gv-amts { display: flex; flex-wrap: wrap; gap: 8px; }
.gv-amts .jb-btn { min-width: 76px; }
.gv-other { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #DCD6CA; border-radius: var(--r-sm); padding: 0 10px; background: #fff; }
.gv-other input { border: 0; outline: 0; width: 80px; min-height: 40px; font-size: 15px; }
@media (max-width: 900px) { .fr-hero { grid-template-columns: 1fr; } .fr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fr-batch-row { grid-template-columns: 1fr 1fr; } .fr-batch-row .dp { grid-column: 1 / -1; } .fr-thermocard { flex-direction: row; } .fr-big { font-size: 32px; } .gv-title { font-size: 26px; } }
.jb-input.fr-sel { width: auto; }
.gv-hero { margin-top: 18px; }
.ap-inv { text-decoration: none; color: inherit; }

/* ---------------------------------------------------------------- Help panel (web/js/help.js) */
.jb-help { position: fixed; z-index: 70; display: flex; flex-direction: column; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(20,16,12,.22), 0 2px 8px rgba(20,16,12,.08); overflow: hidden; min-width: 300px; }
.jb-help.gliding { transition: left .6s cubic-bezier(.22,.8,.24,1), top .6s cubic-bezier(.22,.8,.24,1); }
@media (prefers-reduced-motion: reduce) { .jb-help.gliding { transition: none; } }
.jb-help.dragging { box-shadow: 0 26px 70px rgba(20,16,12,.3); user-select: none; transition: none; }
.jb-help-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 16px; background: var(--maroon); color: var(--on-maroon, #fff); cursor: grab; touch-action: none; flex: none; }
.jb-help.dragging .jb-help-bar { cursor: grabbing; }
.jb-help-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 18px; font-weight: 600; min-width: 0; }
.jb-help-title .jb-ico { width: 20px; height: 20px; flex: none; }
.jb-help-sub { font-family: var(--sans); font-size: 13px; font-weight: 500; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-help-sub:not(:empty)::before { content: '·'; margin-right: 6px; }
/* Edwin open: the name with what Edwin is helping with on a second line under it, the star beside both */
.jb-help.has-ai:not(.min) .jb-help-title { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; line-height: 1.15; }
.jb-help.has-ai:not(.min) .jb-help-ico { grid-row: span 2; }
.jb-help.has-ai:not(.min) .jb-help-sub { grid-column: 2; font-size: 12.5px; }
.jb-help.has-ai:not(.min) .jb-help-sub:empty { display: none; }
.jb-help.has-ai:not(.min) .jb-help-sub::before { content: none; }
.jb-help-tools { display: inline-flex; gap: 2px; flex: none; }
.jb-help-tool { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.jb-help-tool:hover { background: rgba(255,255,255,.16); }
.jb-help-tool:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.jb-help-tool .jb-ico { width: 18px; height: 18px; }
.jb-help-main { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.jb-help-grip { position: absolute; left: 0; bottom: 0; width: 18px; height: 18px; cursor: nesw-resize; background: linear-gradient(45deg, transparent 0 45%, var(--ink-4) 45% 52%, transparent 52% 64%, var(--ink-4) 64% 71%, transparent 71%); opacity: .6; }
.jb-help.min { left: auto !important; top: auto !important; right: 20px; bottom: 20px; width: auto !important; max-width: 340px; min-width: 0; height: auto !important; border-radius: 999px; border: 0; }
.jb-help.min .jb-help-bar { padding: 6px 6px 6px 16px; cursor: pointer; }
.jb-help.min { transition: transform .3s cubic-bezier(.22,.8,.24,1); }
@media (prefers-reduced-motion: reduce) { .jb-help.min { transition: none; } }
/* a compose window docks bottom-right too: the minimized Help chip steps aside while it's open so it never covers
   Send (Help stays one tap away from the ? in the header) */
body:has(.gm-win) .jb-help.min { display: none; }
.jb-help.min .jb-help-main, .jb-help.min .jb-help-grip, .jb-help.min [data-dock], .jb-help.min [data-wide] { display: none; }

/* the topic browser (panel and Help page) */
.jb-help-search { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); flex: none; }
.jb-help-search input { width: 100%; min-height: 42px; padding: 8px 36px 8px 38px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: var(--paper); color: var(--ink); }
.jb-help-search input:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-wash); background: #fff; }
.jb-help-search input::-webkit-search-cancel-button { display: none; }
.jb-help-sico { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); color: var(--ink-3); display: inline-flex; pointer-events: none; }
.jb-help-sico .jb-ico { width: 18px; height: 18px; }
.jb-help-clear { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; display: inline-grid; place-items: center; }
.jb-help-clear:hover { background: var(--chip-soft); color: var(--ink); }
.jb-help-clear .jb-ico { width: 16px; height: 16px; }
.jb-help-scroll { overflow-y: auto; padding: 6px 14px 18px; flex: 1; min-height: 0; overscroll-behavior: contain; }
.jb-help-group h3, .jb-help-related h3 { font-family: var(--caps, var(--sans)); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 14px 2px 6px; font-weight: 700; }
.jb-help-suggest { margin: 12px 0 4px; padding: 4px 6px 8px; background: var(--maroon-wash); border-radius: 12px; }
.jb-help-suggest h3 { font-family: var(--caps, var(--sans)); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--maroon-text, var(--maroon)); margin: 8px 6px 4px; font-weight: 700; }
.jb-help-suggest .jb-help-item:hover, .jb-help-suggest .jb-help-item:focus-visible { background: rgba(255,255,255,.7); }
.jb-help-page .jb-help-scroll:has(> .jb-help-group) > .jb-help-suggest { break-inside: avoid; }
.jb-help-list { display: flex; flex-direction: column; gap: 2px; }
.jb-help-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.jb-help-item b { font-weight: 600; }
.jb-help-item > .jb-ico { width: 16px; height: 16px; color: var(--ink-4); flex: none; }
.jb-help-item:hover, .jb-help-item:focus-visible { background: var(--maroon-wash); outline: none; }
.jb-help-item:hover > .jb-ico { color: var(--maroon); }
.jb-help-scroll > .jb-help-list .jb-help-item, .jb-help-count + .jb-help-list .jb-help-item { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; }
.jb-help-item span { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.jb-help-item mark { background: var(--amber-tint, #fbecc4); color: inherit; border-radius: 3px; padding: 0 1px; }
.jb-help-count { font-size: 12px; color: var(--ink-3); margin: 10px 2px 4px; font-weight: 600; }
.jb-help-none { color: var(--ink-3); padding: 8px 2px; }
.jb-help-back { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 2px -6px; padding: 6px 10px 6px 6px; border: 0; border-radius: 8px; background: none; color: var(--maroon-text, var(--maroon)); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.jb-help-back:hover { background: var(--maroon-wash); }
.jb-help-back .jb-ico { width: 16px; height: 16px; }
.jb-help-cat { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-top: 10px; }
.jb-help-topic h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.2; margin: 2px 0 10px; }
.jb-help-body p { margin: 0 0 10px; line-height: 1.55; font-size: 15px; }
.jb-help-body p:has(> .jb-go) { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.jb-go { display: inline-flex; align-items: center; gap: 2px; padding: 5px 8px 5px 12px; border-radius: 999px; background: var(--maroon-wash); border: 1px solid var(--maroon-line, rgba(101,11,9,.18)); color: var(--maroon-text, var(--maroon)); font-size: 14px; font-weight: 600; text-decoration: none; line-height: 1.2; }
.jb-go:hover { background: var(--maroon); color: var(--on-maroon, #fff); border-color: var(--maroon); }
.jb-go .jb-go-i { width: 15px; height: 15px; }
.jb-help-related { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line-soft); }

/* the Help page: topics in columns, a topic in a readable column */
.jb-help-page { padding: 0; overflow: hidden; }
.jb-help-page .jb-help-search { padding: 16px 20px; }
.jb-help-page .jb-help-sico { left: 32px; }
.jb-help-page .jb-help-clear { right: 26px; }
.jb-help-page .jb-help-scroll { padding: 4px 20px 24px; overflow: visible; }
.jb-help-page .jb-help-scroll:has(> .jb-help-group) { columns: 260px 4; column-gap: 32px; }
.jb-help-page .jb-help-group { break-inside: avoid; padding-bottom: 6px; }
.jb-help-page .jb-help-topic { max-width: 720px; }
.jb-helpbtn .jb-ico { width: 22px; height: 22px; }
body.jb-help-open .jb-helpbtn { background: var(--maroon-wash); color: var(--maroon); }

/* phones: a sheet along the bottom, minimized to a tab above the menu bar */
@media (max-width: 719px) {
  .jb-help { left: 0; right: 0; bottom: 0; top: auto; height: calc(72vh / var(--zf, 1)); border-radius: 18px 18px 0 0; min-width: 0; padding-bottom: env(safe-area-inset-bottom); }
  .jb-help-bar { cursor: default; }
  .jb-help-grip, .jb-help [data-dock], .jb-help [data-wide] { display: none; }
  .jb-help.min { right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); padding-bottom: 0; }
}
@media print { .jb-help { display: none !important; } }
.jb-help-page .jb-help-group h3 { margin-top: 0; padding-top: 14px; }
@media (max-width: 560px) { .jb-helpbtn { display: none; } }   /* phones reach Help from the account menu */

/* the AI Helper tab's pulse, twinkle and first-visit bounce (web/js/help.js) */
@keyframes jb-star-pulse { 0% { box-shadow: 0 8px 24px rgba(20, 20, 40, .25), 0 0 0 0 color-mix(in srgb, var(--maroon) 50%, transparent); } 70% { box-shadow: 0 8px 24px rgba(20, 20, 40, .25), 0 0 0 18px color-mix(in srgb, var(--maroon) 0%, transparent); } 100% { box-shadow: 0 8px 24px rgba(20, 20, 40, .25), 0 0 0 0 color-mix(in srgb, var(--maroon) 0%, transparent); } }
@keyframes jb-star-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(8deg); } }
@keyframes jb-star-in { 0% { transform: translateX(180px) scale(.5); opacity: 0; } 50% { transform: translateX(-18px) scale(1.15); opacity: 1; } 68% { transform: translateX(8px) translateY(-10px) scale(.95); } 84% { transform: translateX(-3px) translateY(0) scale(1.03); } 100% { transform: none; } }
/* the assistant's chat inside the AI Helper tab */
.jb-help-ai .jb-ai { position: static; flex: 1; height: auto; max-height: none; min-height: 0; border: 0; border-radius: 0; box-shadow: none; padding: 12px 14px 14px; }
.jb-help-ai .jb-ai-head > b { display: none; }
.jb-help-ai .jb-ai-head { justify-content: flex-end; min-height: 0; }
.jb-help-ai .jb-ai-head .jb-small { margin-left: 0; margin-right: auto; }

/* Empty pages and blocks: an illustration (web/js/empty-art.js, tinted with the school's colors), a short title,
   one line on what goes here and the button that starts it. blank() in core.js; .sm for blocks and side panels. */
/* the drawings are an identity area: the school's own colors (--brand-*) */
.jb-blank { --ea-a: var(--brand-a); --ea-b: var(--brand-b); --ea-wash: var(--brand-a-wash); --ea-mist: var(--brand-b-mist); --ea-tint: var(--brand-b-tint);
  --ea-a-soft: color-mix(in srgb, var(--brand-a) 42%, #fff); --ea-b-soft: color-mix(in srgb, var(--brand-b) 45%, #fff); --ea-board: color-mix(in srgb, var(--brand-b) 58%, #17221b);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 20px 32px; }
.jb-blank .ea-svg { width: min(340px, 100%); height: auto; display: block; margin-bottom: 10px; }
.jb-blank h3 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); text-wrap: balance; }
.jb-blank p { margin: 0; max-width: 46ch; color: var(--ink-3); font-size: 14.5px; line-height: 1.5; text-wrap: pretty; }
.jb-blank .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.jb-blank.sm { padding: 14px 12px 18px; gap: 4px; }
.jb-blank.sm .ea-svg { width: min(190px, 100%); margin-bottom: 6px; }
.jb-blank.sm h3 { font-size: 16px; }
.jb-blank.sm p { font-size: 13px; }
.jb-blank.sm .acts { margin-top: 10px; }
.jb-blank.sm .acts .jb-btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
/* inside a table: one full-width cell under the headings */
td.jb-blank-cell { padding: 0 !important; border: 0 !important; background: #fff; }
td.jb-blank-cell:hover { background: #fff !important; }
/* the dashboard's "Let's get started" card for a new account (today.js startCard) */
.jb-start { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 8px 28px; align-items: center; margin-bottom: 16px; }
.jb-start-art { padding: 0; }
.jb-start-title { margin: 0 0 2px; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); }
.jb-start-art .ea-svg { margin: 0; }
.jb-start-steps { list-style: none; margin: 14px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.jb-start-steps a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); text-decoration: none; min-height: 58px; }
.jb-start-steps a:hover { border-color: var(--maroon-line); background: var(--maroon-wash); }
.jb-start-steps b { display: block; font-size: 14.5px; }
.jb-start-steps .jb-muted { font-size: 12.5px; }
.jb-start-steps .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; }
.jb-start-steps li.ok .dot { background: var(--sage); border-color: var(--sage); color: var(--on-sage, #fff); }
.jb-start-steps li.ok b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.jb-start-steps .dot .jb-ico { width: 14px; height: 14px; stroke-width: 3; }
.jb-start-steps a > .jb-ico { width: 16px; height: 16px; color: var(--ink-4); flex: none; }
@media (max-width: 760px) { .jb-start { grid-template-columns: 1fr; } .jb-start-art .ea-svg { max-width: 240px; margin: 0 auto; } }

/* AI Helper: the page's assistant as a tab of the Help panel (web/js/help.js) */
.jb-help-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line-soft); flex: none; }
.jb-help-tabs[hidden] { display: none; }
.jb-help-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 9px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ink-3); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 8px 8px 0 0; }
.jb-help-tabs button:hover { color: var(--ink); background: var(--chip-soft); }
.jb-help-tabs button.on { color: var(--maroon-text, var(--maroon)); border-bottom-color: var(--maroon); }
.jb-help-tabs .jb-ico { width: 16px; height: 16px; }
.jb-help-tabs [data-tab="ai"] .jb-ico, .jb-help.has-ai .jb-help-ico .jb-ico { fill: currentColor; }
.jb-help-main[hidden], .jb-help-ai[hidden] { display: none; }
.jb-help-ai { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ai-wash); }
.jb-help-ai .jb-ai { background: transparent !important; }
.jb-ai-head b .jb-ico.ai { color: var(--maroon); }
.jb-help.min .jb-help-tabs, .jb-help.min .jb-help-ai { display: none; }
/* the corner tab on a page with an assistant pulses, and bounces in with the assistant's name on a first visit */
.jb-help.min.has-ai { animation: jb-star-pulse 2.4s ease-out infinite; overflow: visible; }
.jb-help.min.has-ai .jb-help-ico .jb-ico { animation: jb-star-twinkle 2.4s ease-in-out infinite; }
.jb-help.min.has-ai .jb-help-bar { border-radius: 999px; }
.jb-help.min.intro { animation: jb-star-in 1s cubic-bezier(.2, 1.3, .35, 1) both, jb-star-pulse 2.4s ease-out 1s infinite; }
.jb-help.min.intro::before { content: attr(data-intro); position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: #1f1f24; color: #fff; font: 600 13px/1 var(--sans); padding: 9px 12px; border-radius: 9px; pointer-events: none; }
@media (max-width: 719px) { .jb-help.min.intro::before { display: none; } }
@media (prefers-reduced-motion: reduce) { .jb-help.min.has-ai, .jb-help.min.has-ai .jb-help-ico .jb-ico, .jb-help.min.intro { animation: none !important; } }

/* ------------------------------------------------------------------ card decks (web/js/viewmode.js): every card the same
   size in a grid, or compact rows; a Cards / Rows switch sits beside the page's main button */
.dk-tools { flex: none; gap: 10px; }
.dk-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--chip-soft); flex: none; }
.jb-row-between > .dk-switch { margin-left: auto; }
.dk-switch button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 12px; border-radius: 999px; font: 600 13px var(--sans); color: var(--ink-3); cursor: pointer; }
.dk-switch button .jb-ico { width: 15px; height: 15px; }
.dk-switch button:hover { color: var(--ink); }
.dk-switch button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.dk-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.dk-deck > .dk-empty { grid-column: 1 / -1; }
.dk-deck > .dk { height: var(--dk-h, 232px); min-width: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.dk-head { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dk-title { font: 600 16.5px/1.3 var(--sans); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.dk-tags { display: flex; flex-wrap: wrap; gap: 4px; max-height: 26px; overflow: hidden; }
.dk-tags:empty { display: none; }
.dk-desc { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; flex: 0 1 auto; }
.dk-desc:empty { display: none; }
.dk-meta { margin-top: auto; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; min-width: 0; }
.dk-meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-meta > .jb-row-between { gap: 10px; white-space: nowrap; }
.dk-meta > .tr-meta, .dk-meta > .tr-counts { white-space: normal; display: flex; }
.dk-meta > .jb-row-between > span:first-child { overflow: hidden; text-overflow: ellipsis; }
a.dk { text-decoration: none; color: inherit; }
/* a picture across the top of the card (fundraising campaigns); a small thumbnail in rows */
.dk-media { flex: none; height: 84px; margin: -18px -20px 2px; overflow: hidden; background: linear-gradient(135deg, var(--maroon-wash), var(--sage-mist)); color: var(--maroon-text); display: flex; align-items: center; justify-content: center; }
.dk-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dk-media .jb-ico { width: 34px; height: 34px; opacity: .7; }
/* a logo or tile before the title (integrations) */
.dk-head.with-ico { flex-direction: row; align-items: center; gap: 12px; }
.dk-head.with-ico > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dk-kind { font: 700 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
button.dk { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.dk-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; max-height: 40px; overflow: hidden; }
.dk-foot .ap-chain { flex-wrap: nowrap; overflow: hidden; min-width: 0; max-width: 100%; }
.dk-foot .ap-step { white-space: nowrap; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.dk-foot .ap-arrow { flex: none; }
.dk-foot .ap-step i { display: none; }
/* rows: one line per item, columns lined up */
.dk-deck.rows { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.dk-deck.rows > .dk { height: auto; min-height: 62px; display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1.6fr) minmax(170px, .9fr); grid-template-areas: "head desc meta"; align-items: center; column-gap: 20px; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; box-shadow: none; transform: none; }
.dk-deck.rows > .dk:last-child { border-bottom: 0; }
/* decks with buttons get a fixed-width last column so every row lines up */
.dk-deck.rows:has(.dk-foot) > .dk { grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1.5fr) minmax(170px, .9fr) 260px; grid-template-areas: "head desc meta foot"; }
.dk-deck.rows > .dk:hover { background: var(--chip-soft); box-shadow: none; }
.dk-deck.rows > .dk-empty { border: 0; border-radius: 0; }
.dk-deck.rows:has(.dk-media) > .dk { grid-template-columns: 72px minmax(180px, 1.1fr) minmax(0, 1.6fr) minmax(170px, .9fr); grid-template-areas: "media head desc meta"; }
.dk-deck.rows .dk-media { grid-area: media; margin: 0; height: 44px; width: 72px; border-radius: 8px; }
.dk-deck.rows .dk-media .jb-ico { width: 20px; height: 20px; }
.dk-deck.rows .dk-head { grid-area: head; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.dk-deck.rows .dk-title { -webkit-line-clamp: 1; font-size: 15px; }
.dk-deck.rows .dk-desc { grid-area: desc; display: -webkit-box; -webkit-line-clamp: 1; font-size: 13.5px; }
.dk-deck.rows .dk-meta { grid-area: meta; margin: 0; font-size: 13px; }
.dk-deck.rows .dk-foot { grid-area: foot; justify-content: flex-end; max-height: none; }
.dk-deck.rows .dk-foot { min-width: 0; }
.dk-deck.rows .dk-foot { margin: 0; align-self: center; }
.dk-deck.rows .dk-head.with-ico > div { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.dk-deck.rows .ig-tile { width: 32px !important; height: 32px !important; font-size: 12px !important; border-radius: 8px; }
@media (max-width: 760px) {
  .dk-switch span { display: none; }
  .dk-deck.rows > .dk, .dk-deck.rows:has(.dk-foot) > .dk, .dk-deck.rows:has(.dk-media) > .dk { grid-template-columns: 1fr; grid-template-areas: "head" "desc" "meta" "foot"; row-gap: 6px; }
  .dk-deck.rows .dk-media { display: none; }
  .dk-deck.rows .dk-foot { justify-content: flex-start; }
}

/* ------------------------------------------------------------------ sequence builder: the floating blocks bar (like the
   course builder's quick bar). Pinned to the bottom of the screen; drag a tile into the flow. */
.vb-dock { position: sticky; bottom: 14px; z-index: 6; align-self: center; max-width: 100%; margin-top: auto; }
/* clear the floating Help button in the corner */
body:has(.jb-help.min) .vb-dock { bottom: 76px; }
.vb-canvas:has(.vb-dock) { min-height: calc(100vh / var(--zf, 1) - var(--jb-head, 0px) - 150px); }
.vb-dock-row { display: flex; align-items: stretch; gap: 6px; flex-wrap: nowrap; justify-content: center; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(40, 30, 20, .16), 0 1px 3px rgba(40, 30, 20, .08); }
.vb-dgrp { display: flex; align-items: stretch; gap: 0; padding: 3px; border-radius: 10px; border: 1px dashed var(--line); min-width: 0; flex-wrap: nowrap; }
.vb-dgrp.trig { background: #F1F3F7; border-color: #C9D0DC; }
.vb-dlab { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; font: 700 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); padding: 0 2px; }
.vb-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 6px 7px; border: 0; border-radius: 8px; background: none; font: 500 11px var(--sans); color: var(--ink-3); cursor: grab; white-space: nowrap; user-select: none; }
.vb-tile:hover { background: var(--chip-soft); color: var(--ink); }
.vb-tile:active { cursor: grabbing; }
.vb-tile .jb-ico { width: 19px; height: 19px; }
.vb-tile.trig .jb-ico { color: #4A5A78; }
.vb-tile.act .jb-ico { color: var(--maroon-text); }
.vb-tile.act[data-block="action:wait"] .jb-ico { color: #B7791F; }
.vb-dgrp.trig .vb-tile:hover { background: #E3E8F0; }
.vb-dall { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 9px; margin-left: 3px; flex: none; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: 600 11px var(--sans); cursor: pointer; white-space: nowrap; }
.vb-dall .jb-ico { width: 18px; height: 18px; stroke: #fff; }
.vb-dall[aria-expanded="true"] { background: var(--maroon); }
.vb-dpop { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw / var(--zf, 1) - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(40, 30, 20, .2); padding: 12px; }
.vb-dpop[hidden] { display: none; }
.vb-dpop-h { display: flex; align-items: baseline; gap: 10px; padding: 0 4px 8px; font-size: 14px; }
.vb-dpop-h .jb-muted { font-size: 12.5px; }
.vb-dpop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
.vb-dpop-grid .vb-tile { min-width: 0; white-space: normal; text-align: center; line-height: 1.25; padding: 10px 6px; border: 1px solid var(--line-soft); }
/* while dragging: the bar and its pop-over get out of the way, and the gaps open up with a clear "Drop here" */
.vb-canvas.dragging-block .vb-dpop, .vb-canvas.dragging-step .vb-dpop { opacity: 0; pointer-events: none; }
.vb-canvas:is(.dragging-block, .dragging-step) .vb-dock { pointer-events: none; }
.vb-canvas:is(.dragging-block, .dragging-step) .vb-dock-row { opacity: .3; }
.vb-drop.over { position: relative; }
.vb-drop.over::after { content: 'Drop here'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--maroon-text); }
@media (max-width: 900px) { .vb-dock { bottom: calc(12px + var(--jb-tabbar, 0px)); } }
/* always one row: as the flow column narrows, the least-used quick actions move into All actions, then tiles go icon-only */
.vb-canvas { container: vbc / inline-size; }
.vb-dpop-grid .vb-tile { display: flex !important; }
@container vbc (max-width: 720px) { .vb-dgrp.act .vb-tile[data-block="action:add_tag"], .vb-dgrp.act .vb-tile[data-block="action:create_task"] { display: none; } }
@container vbc (max-width: 620px) { .vb-dgrp.act .vb-tile[data-block="action:move_stage"], .vb-dgrp.act .vb-tile[data-block="action:notify_staff"] { display: none; } .vb-dlab { display: none; } }
@container vbc (max-width: 500px) { .vb-dock-row .vb-tile span, .vb-dall span { display: none; } .vb-dock-row .vb-tile, .vb-dall { padding: 9px; } .vb-dock-row .vb-tile .jb-ico, .vb-dall .jb-ico { width: 20px; height: 20px; } }

/* ---------------------------------------------------------------- calendar: Day / Week / Month */
.jb-cal-head { flex-wrap: wrap; gap: 12px; }
.jb-cal-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jb-cal-nav { display: inline-flex; align-items: center; gap: 4px; }
.jb-cal-nav .icon-only { min-width: 36px; justify-content: center; font-size: 18px; line-height: 1; padding: 0 10px; }
.jb-cal-title { font-size: 20px; font-weight: 700; margin: 2px 0 12px; letter-spacing: -.01em; }
.jb-cal a.n { color: inherit; text-decoration: none; width: fit-content; padding: 0 4px; margin-left: -4px; border-radius: 5px; }
.jb-cal a.n:hover { background: var(--chip); }
.jb-cal .is-today a.n { color: var(--maroon-text); }
.jb-cal .ev.mine { background: var(--accent-tint); color: #6B4508; }

.jb-tg { --cols: 7; --hh: 48px; --gut: 64px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.jb-tg-head, .jb-tg-all { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.jb-tg-head { background: var(--chip-soft); }
.jb-tg-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; color: var(--ink-3); text-decoration: none; border-left: 1px solid var(--line); }
.jb-tg-day span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.jb-tg-day b { font-size: 20px; color: var(--ink, #1d1d1f); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.jb-tg-day:hover b { background: var(--chip); }
.jb-tg-day.is-today b { background: var(--maroon); color: #fff; }
.jb-tg.day .jb-tg-day { flex-direction: row; justify-content: flex-start; gap: 10px; padding-left: 14px; pointer-events: none; }
.jb-tg-all > div { border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jb-tg-lbl { font-size: 11px; color: var(--ink-4); text-align: right; padding: 8px 8px 0 0; }
.jb-tg .ev { display: block; width: 100%; border: 0; text-align: left; font: inherit; font-size: 12px; padding: 3px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; background: var(--sage-tint); color: var(--sage-ink); }
.jb-tg .ev.due { background: var(--maroon-tint); color: var(--maroon-text); }
.jb-tg .ev.live { background: var(--amber-tint); color: var(--amber); }
.jb-tg .ev.mine { background: var(--accent-tint); color: #6B4508; }
.jb-tg-body { position: relative; display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(0, 1fr)); }
.jb-tg-hours { position: relative; }
.jb-tg-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ink-4); white-space: nowrap; }
.jb-tg-hours span:first-child { transform: none; top: 2px !important; }
.jb-tg-col { position: relative; border-left: 1px solid var(--line); }
.jb-tg-col.is-today { background: color-mix(in srgb, var(--maroon-tint) 22%, #fff); }
.jb-tg-col > i { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }
.jb-tg-col > i:first-child { border-top: 0; }
.jb-tg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--maroon); z-index: 2; }
.jb-tg-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--maroon); }
.jb-tg-ev { position: absolute; z-index: 1; display: flex; flex-direction: column; gap: 1px; overflow: hidden; text-align: left; border: 0; border-left: 3px solid var(--sage); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 12px; line-height: 1.25; cursor: pointer; background: var(--sage-tint); color: var(--sage-ink); box-shadow: 0 0 0 1px #fff; }
.jb-tg-ev:hover { filter: brightness(.96); z-index: 3; }
.jb-tg-ev:focus-visible { outline: 2px solid var(--maroon); outline-offset: 1px; z-index: 3; }
.jb-tg-ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-tg-ev span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.jb-tg-ev.due { background: var(--maroon-tint); color: var(--maroon-text); border-left-color: var(--maroon); }
.jb-tg-ev.live { background: var(--amber-tint); color: var(--amber); border-left-color: var(--amber-ink); }
.jb-tg-ev.mine { background: var(--accent-tint); color: #6B4508; border-left-color: var(--accent); }
.jb-tg.day .jb-tg-ev { font-size: 13px; padding: 5px 10px; }
.jb-tg.day .jb-tg-ev span { font-size: 12px; }

/* phones: the week is a list of days */
.jb-tg-list { display: flex; flex-direction: column; gap: 10px; }
.jb-tg-list section { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.jb-tg-lday { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink-3); padding-top: 6px; }
.jb-tg-lday b { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.jb-tg-lday span { font-size: 20px; font-weight: 700; color: var(--ink, #1d1d1f); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.jb-tg-list .is-today .jb-tg-lday span { background: var(--maroon); color: #fff; }
.jb-tg-list .jb-chip { min-width: 74px; justify-content: center; }
@media (max-width: 720px) {
  .jb-cal-tools { width: 100%; }
  .jb-cal-tools .jb-seg { flex: 1 1 100%; display: flex; }
  .jb-cal-tools .jb-seg button { flex: 1 1 0; }
  .jb-tg { --gut: 48px; }
  .jb-tg-hours span { font-size: 10px; right: 5px; }
}
.jb-tg-ev.short { justify-content: center; padding-top: 0; padding-bottom: 0; }
.jb-tg-ev.short b small { font-size: 10.5px; font-weight: 700; opacity: .8; margin-right: 2px; }
.jb-tg-ev.short b span { font-weight: 400; opacity: .85; }
.jb-tg.day .jb-tg-ev.short { padding-top: 0; padding-bottom: 0; }
/* the past-due reminders box (web/js/reminders.js): what happens, the email, who gets it */
.rm-sheet.jb-sheet { width: min(680px, 100%); }
.rm { display: flex; flex-direction: column; gap: 20px; }
.rm h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.rm-what ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rm-what li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14.5px; line-height: 1.45; }
.rm-what li .jb-ico { width: 18px; height: 18px; margin-top: 2px; color: var(--maroon-text); }
.rm-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.rm-subj { font-size: 13.5px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.rm-eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--maroon-text); font-weight: 700; }
.rm-title { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 2px 0 6px; }
.rm-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.rm-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; margin-bottom: 12px; }
.rm-btn { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 8px; background: var(--maroon); color: var(--on-maroon); font-weight: 600; font-size: 13.5px; }
.rm-whohead { display: flex; align-items: baseline; justify-content: space-between; }
.rm-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rm-fam { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; background: #fff; }
.rm-fam:last-child { border-bottom: 0; }
.rm-fam:hover { background: var(--chip-soft); }
.rm-fam input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--maroon); }
.rm-fam:has(input:not(:checked)) .rm-main, .rm-fam:has(input:not(:checked)) .rm-amt { opacity: .45; }
.rm-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rm-ppl { display: flex; flex-direction: column; font-size: 13px; overflow-wrap: anywhere; }
.rm-amt { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 12.5px; gap: 2px; }
.rm-amt b { font-size: 15px; }
@media (max-width: 560px) { .rm-fam { grid-template-columns: 20px 1fr; } .rm-amt { grid-column: 2; align-items: flex-start; text-align: left; } }

/* My profile: who you are, then Your details (wide), Alerts and Password side by side; each saved with its own button */
.me-prof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; max-width: 1040px; }
.me-id, .me-wide { grid-column: 1 / -1; }
.me-id { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.me-av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-tint); color: var(--sage-ink); font-weight: 700; font-size: 19px; }
.me-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me-who b { font-size: 18px; }
.me-who span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-roles { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.me-sec { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.me-sec > header { padding: 16px 20px 0; }
.me-sec h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; }
.me-sec h2 svg { width: 18px; height: 18px; color: var(--sage); }
.me-sec > header p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 16px 20px 18px; flex: 1; align-content: start; }
.me-grid.one { grid-template-columns: minmax(0, 1fr); }
.me-grid .jb-field em { font-style: normal; font-weight: 400; color: var(--ink-2); margin-left: 4px; }
.me-grid .jb-field input:disabled { background: var(--maroon-wash, #F4F4F2); color: var(--ink-2); cursor: not-allowed; }
.me-confirm { grid-column: 2; }
.me-confirm[hidden] { display: none; }
.me-check { min-height: 44px; }
.me-sec > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; padding: 12px 20px; border-top: 1px solid var(--line-soft); background: var(--maroon-wash, #F4F4F2); }
.me-sec > footer p { margin: 0; min-width: 0; }
.me-sec > footer .jb-btn { flex: none; margin-left: auto; }
@media (max-width: 760px) {
  .me-prof { grid-template-columns: minmax(0, 1fr); }
  .me-grid { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 16px; }
  .me-confirm { grid-column: auto; }
  .me-sec > header { padding: 14px 16px 0; } .me-sec > footer { padding: 12px 16px; }
  .me-id { grid-template-columns: 48px minmax(0, 1fr); padding: 14px 16px; } .me-av { width: 48px; height: 48px; font-size: 17px; }
  .me-roles { grid-column: 2; justify-content: flex-start; }
}
/* a message about to be sent, editable for this send (web/js/msg-edit.js) */
.me { position: relative; }
.me-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.me-src { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); flex-wrap: wrap; }
.me-src > .jb-ico { width: 16px; height: 16px; color: var(--ink-3); }
.me-flag { font-size: 11.5px; font-weight: 700; color: #9a4a00; background: #FFF1E3; border-radius: 99px; padding: 2px 9px; }
.me-tools { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.me-round { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; }
.me-round:hover:not(:disabled) { border-color: var(--maroon); color: var(--maroon-text); }
.me-round:disabled { opacity: .4; cursor: default; }
.me-round .jb-ico { width: 16px; height: 16px; }
.me-tools .jb-btn:disabled { opacity: .45; }
.me-savewrap { position: relative; }
.me-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 300px; padding: 6px; }
.me-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 9px 11px; border-radius: 8px; white-space: normal; }
.me-menu button span { font-size: 12.5px; color: var(--ink-3); font-weight: 400; line-height: 1.4; }
.me-menu button:disabled { opacity: .5; cursor: not-allowed; }
.me-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.me-subj { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.me-subj > span { color: var(--ink-3); flex: none; }
.me-subj input { flex: 1; min-width: 0; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin: -6px 0; font: inherit; font-weight: 700; color: var(--ink); background: transparent; }
.me-subj input:hover, .me-body:hover { background: var(--chip-soft); }
.me-subj input:focus { outline: none; border-color: var(--maroon); background: #fff; box-shadow: 0 0 0 3px var(--maroon-wash); }
.me-eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--maroon-text); font-weight: 700; margin-bottom: 4px; }
.me-body { min-height: 60px; padding: 6px 8px; margin: 0 -8px 10px; border: 1px solid transparent; border-radius: 8px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); cursor: text; }
.me-body:focus { outline: none; border-color: var(--maroon); background: #fff; box-shadow: 0 0 0 3px var(--maroon-wash); }
.me-body p { margin: 0 0 8px; } .me-body p:last-child { margin-bottom: 0; } .me-body ul { margin: 0 0 8px; padding-left: 20px; }
.me-below { margin-bottom: 12px; font-size: 13px; }
.me-items { margin: 0; padding-left: 20px; color: var(--ink-3); font-style: italic; }
.me-btn { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 8px; background: var(--maroon); color: var(--on-maroon); font-weight: 600; font-size: 13.5px; }
.me-hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--ink-3); }
.me-fmt { position: absolute; z-index: 61; display: flex; gap: 2px; padding: 4px; background: #1f1f24; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.me-fmt button { min-width: 30px; height: 30px; border: 0; border-radius: 7px; background: none; color: #fff; font: 600 14px/1 var(--sans); cursor: pointer; }
.me-fmt button:hover { background: rgba(255, 255, 255, .16); }
.me-fmt .italic { font-style: italic; font-family: Georgia, serif; } .me-fmt .underline { text-decoration: underline; }
.rm-h { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
/* a new email waiting for its confirmation link */
.me-pending { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 20px 18px; padding: 12px 14px; border: 1px solid var(--sage-line, #D5DCE3); border-radius: var(--r); background: var(--sage-mist, #F0F3F5); }
.me-pending[hidden] { display: none; }
.me-pending-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--sage); }
.me-pending-ic svg { width: 18px; height: 18px; }
.me-pending-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me-pending-t b { overflow-wrap: anywhere; }
.me-pending-t span { color: var(--ink-2); font-size: 13.5px; }
.me-pending-acts { display: flex; gap: 8px; }
@media (max-width: 760px) { .me-pending { grid-template-columns: 36px minmax(0, 1fr); margin: 0 16px 16px; } .me-pending-acts { grid-column: 2; } }
/* the confirm-email page (from the link) */
.jb-confirm-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-tint); color: var(--sage-ink); }
.jb-confirm-ic.bad { background: #FBE9E7; color: #A23B2A; }
.jb-confirm-ic svg { width: 24px; height: 24px; }
.me-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.me-field { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.me-field:hover { border-color: var(--maroon); color: var(--maroon-text); }
.me-field code { font-size: 12px; color: var(--maroon-text); }
/* the compact message in a send box (read only; Preview and Edit open their own windows) */
.me-ro .me-subj b { font-weight: 700; color: var(--ink); }
.me-body.ro { cursor: default; margin: 0 0 10px; padding: 0; }
.me-body.ro:hover { background: none; }
.me-tag { display: inline-block; background: #FFF1E3; color: #9a4a00; border-radius: 4px; padding: 0 5px; font-family: ui-monospace, Menlo, monospace; font-size: .88em; line-height: 1.5; }
.me-compact .me-tools .jb-btn .jb-ico { width: 15px; height: 15px; }
/* the edit window, in the middle of the screen */
.jb-sheet.me-sheet { width: min(760px, calc(100vw / var(--zf, 1) - 32px)); }
.jb-sheet.me-sheet .me-body { min-height: 140px; }
/* previews of a text and an announcement (web/js/msg-edit.js previewText / previewAnnouncement) */
.pv-phone { width: min(340px, 100%); margin: 4px auto 10px; border: 1px solid var(--line); border-radius: 28px; background: #f6f6f8; overflow: hidden; box-shadow: 0 8px 26px rgba(0, 0, 0, .08); }
.pv-top { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 12px 10px; background: #fff; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.pv-av { width: 36px; height: 36px; border-radius: 50%; background: #c7c7cc; color: #fff; display: grid; place-items: center; }
.pv-av .jb-ico { width: 18px; height: 18px; }
.pv-thread { padding: 16px 14px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 160px; }
.pv-sms { max-width: 82%; padding: 9px 13px; border-radius: 18px 18px 18px 4px; background: #e5e5ea; color: #111; font-size: 14.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-stop { font-size: 13px; }
.pv-note { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-3); }
.pv-meta { text-align: center; margin: 0; }
.pv-appwrap { background: var(--paper); border-radius: 12px; padding: 16px; }
.pv-ann .pv-annbody p { margin: 0 0 8px; }

/* the school's color as a thin strip along the top of the header: an identity area (see tokens.css --brand-*) */
.jb-top { border-top: 3px solid var(--brand-a); }


/* ------------------------------------------------------------------ sequences, part two: holds, reviews, steps, people */
.vb-step.hold .vb-bar { background: #FFF7E6; color: #7A4A00; border: 1.5px solid #E0A526; }
.vb-step.hold .vb-bar .jb-ico, .vb-step.hold .vb-bar span { color: #7A4A00; }
.vb-step.review .vb-bar { background: #FFFBF2; color: #7A4A00; border: 1.5px dashed #E0A526; }
.vb-step.review .vb-bar .jb-ico, .vb-step.review .vb-bar span { color: #7A4A00; }
.vb-step.instr .vb-bar { background: #F2F4FB; color: #2C3E6B; border: 1px solid #C9D2EA; }
.vb-step.instr .vb-bar .jb-ico, .vb-step.instr .vb-bar span { color: #2C3E6B; }
.vb-stepstrip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.vb-stepstrip-k { font: 700 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin-right: 4px; }
.vb-stepchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--chip-soft); font-size: 13px; font-weight: 600; }
.vb-stepchip b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--card); font-size: 11px; color: var(--ink-3); }
.vb-stepchip i { font-style: normal; padding: 0 6px; border-radius: 99px; background: var(--card); color: var(--ink-3); font-size: 11px; }
.vb-stepline { width: 18px; height: 2px; background: var(--line); }
.jb-stepsedit { display: flex; flex-direction: column; gap: 6px; }
.jb-stepedit { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; }
.jb-stepedit input { min-height: 38px; padding: 6px 10px; border: 1px solid #D5CFC2; border-radius: var(--r-sm); font-size: 14px; }
.jb-stepbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.jb-stepbar button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font: 600 13px var(--sans); color: var(--ink-3); cursor: pointer; }
.jb-stepbar button.done { color: var(--sage-text); border-color: var(--sage-line); background: var(--sage-mist); }
.jb-stepbar button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.jb-stepnow { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--ink-3); }
.jb-stepnow .jb-ico { width: 13px; height: 13px; }
.jb-peoplepick { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.jb-peoplepick .jb-check { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.jb-peoplepick .jb-check[hidden] { display: none; }
.jb-reviewcard { border: 1.5px solid #E0A526; background: #FFFBF2; }

/* the sequence editor (Canvas, Timeline, Edit) fills the window, above the platform header and menu, like the
   course and form builders (web/js/pages/admissions.js seqFullscreen) */
.seq-fs { position: fixed !important; inset: 0; z-index: 40; overflow: auto; margin: 0 !important; max-width: none !important; width: auto !important; padding: 16px 28px 0 !important; background: var(--page); --jb-head: 0px; }
html.seq-fs-open { overflow: hidden; }
.seq-fsbar { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.seq-fs .sqc { margin: -16px -28px 0; border-radius: 0; height: calc(100% + 16px); min-height: 0; padding: 16px 24px; box-sizing: border-box; overflow: hidden; }
/* viewing the account as someone else from the console: the banner stays visible above the full-screen editors */
body.jb-viewing-on .seq-fs { top: var(--vbar, 52px); }
@media (max-width: 760px) { .seq-fs { padding: 12px 12px 0 !important; } .seq-fs .sqc { margin: -12px -12px 0; height: calc(100% + 12px); padding: 12px; } }

/* a block just dropped: a placeholder at that spot while its panel is open */
.vb-step.ph .vb-bar, .vb-auto.ph .vb-trigger { background: transparent; color: var(--ink-2); border: 2px dashed var(--accent, #6d5dfc); animation: vb-ph 1.4s ease-in-out infinite; cursor: default; }
.vb-step.ph .vb-bar .jb-ico, .vb-step.ph .vb-bar span { color: var(--ink-2); }
.vb-step.ph .vb-dot { border-style: dashed; }
.vb-auto.ph { border-style: dashed; }
@keyframes vb-ph { 50% { background: color-mix(in srgb, var(--accent, #6d5dfc) 10%, transparent); } }
@media (prefers-reduced-motion: reduce) { .vb-step.ph .vb-bar, .vb-auto.ph .vb-trigger { animation: none; } }


/* ---------------------------------------------------------------- Opportunities (web/js/pages/opportunities.js) */
.op-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--chip-soft); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.op-card .dk-meta { gap: 8px; }
.op-bar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: var(--chip-soft); gap: 2px; }
.op-bar span { display: block; background: var(--sage); opacity: calc(.45 + var(--i, 0) * .12); }
.op-bar span.won { background: var(--maroon); opacity: 1; }
.op-bar span.lost { background: var(--line); opacity: 1; }
.op-sub { margin-top: 8px; }
.op-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.op-who > div { min-width: 0; }
.op-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; }
.op-facts dt { color: var(--ink-3); font-size: 13px; }
.op-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.op-answers { display: flex; flex-direction: column; gap: 14px; }
.op-answers .jb-h2 { margin-top: 6px; }
.op-qa p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.op-others { margin: 6px 0 0; padding-left: 18px; }
.op-post-h { margin: 4px 0 2px; font: 600 26px/1.2 var(--serif); }
.op-desc { line-height: 1.6; overflow-wrap: anywhere; }
.op-desc p { margin: 0 0 12px; }
.op-desc ul, .op-desc ol { padding-left: 22px; margin: 0 0 12px; }
.op-steplist { margin: 0; padding-left: 20px; font-size: 14px; }
.op-copy { width: 100%; }
.op-done { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--chip-soft); color: var(--sage-ink); }
.op-done .jb-ico { width: 28px; height: 28px; }
/* the editor */
/* full-screen sheets lay out their own body: these scroll inside it (the sheet's body itself never scrolls) */
.jb-sheet.jb-full .body > .op-ed, .jb-sheet.jb-full .body > .op-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px max(24px, calc((100% - 900px) / 2)) 32px; box-sizing: border-box; }
.op-ed { display: flex; flex-direction: column; gap: 26px; width: 100%; }
.op-sec { display: flex; flex-direction: column; gap: 12px; }
.op-sec > h3 { margin: 0; font: 600 13px var(--caps); letter-spacing: .1em; text-transform: uppercase; color: var(--maroon-text); }
.op-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.op-kind, .op-visopt { position: relative; display: block; cursor: pointer; }
.op-kind input, .op-visopt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.op-kind > span, .op-visopt > span { display: flex; flex-direction: column; gap: 3px; height: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); transition: border-color .15s, background .15s; }
.op-kind small, .op-visopt small { color: var(--ink-3); font-size: 13px; line-height: 1.35; }
.op-kind input:checked + span, .op-visopt input:checked + span { border-color: var(--maroon); background: var(--maroon-wash, var(--chip-soft)); box-shadow: inset 0 0 0 1px var(--maroon); }
.op-kind input:focus-visible + span, .op-visopt input:focus-visible + span { outline: 3px solid var(--maroon-line, var(--maroon)); outline-offset: 2px; }
.op-vis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.op-desc-ed .re-b[data-attach], .op-desc-ed [data-open="pic"] { display: none; }
.op-desc-ed .re-doc { min-height: 180px; }
.op-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px 14px; max-height: 220px; overflow: auto; padding: 4px 2px; }

/* ---------------------------------------------------------------- applying, step by step (web/js/opp-apply.js) */
.oa { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.oa:not(:has(.oa-steps)) { grid-template-columns: 1fr; }
@media (max-width: 760px) { .oa { grid-template-columns: 1fr; gap: 16px; } }
.oa-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--jb-head, 0px) + 16px); }
@media (max-width: 760px) { .oa-steps { flex-direction: row; overflow-x: auto; position: static; gap: 6px; padding-bottom: 4px; } .oa-steps .oa-t { white-space: nowrap; } }
.oa-steps button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 10px; font: 500 14px var(--sans); color: var(--ink-3); text-align: left; cursor: pointer; }
.oa-steps button:disabled { cursor: default; opacity: .7; }
.oa-steps button:not(:disabled):hover { background: var(--chip-soft); color: var(--ink); }
.oa-steps button.now { background: var(--chip-soft); color: var(--ink); font-weight: 600; }
.oa-n { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 700; background: var(--card); }
.oa-n .jb-ico { width: 14px; height: 14px; }
.oa-steps .now .oa-n { border-color: var(--maroon); color: var(--maroon-text); }
.oa-steps .done .oa-n { background: var(--maroon); border-color: var(--maroon); color: var(--on-maroon); }
.oa-pane { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.oa-head { display: flex; flex-direction: column; gap: 4px; }
.oa-h { margin: 0; font: 600 24px/1.2 var(--serif); }
.oa-body input:disabled { background: var(--chip-soft); color: var(--ink-2); }
.oa-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.oa-doc { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.oa-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oa-fname { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; overflow-wrap: anywhere; }

/* Help / AI Helper opening from its minimized tab: grows out of the tab's corner */
.jb-help.jb-help-pop { transform-origin: bottom right; animation: jb-help-pop .2s cubic-bezier(.2, .9, .3, 1); }
@keyframes jb-help-pop { from { opacity: 0; transform: scale(.92); } }
@media (prefers-reduced-motion: reduce) { .jb-help.jb-help-pop { animation: none; } }
/* Opportunities, release 2: the board, the applicant */
.op-board .jb-lane { min-height: 260px; }
.op-acard { display: flex; flex-direction: column; gap: 6px; }
.op-acard-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.op-acard-h b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-acard-h .jb-avatar { width: 26px; height: 26px; font-size: 10.5px; flex: none; }
.op-acard-f { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-3); font-size: 12.5px; }
.op-acard-f .jb-ico { width: 14px; height: 14px; vertical-align: -2px; }
.op-acard-f:empty { display: none; }
.op-step { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 10px; background: var(--card); border: 1px dashed var(--line); }
.op-step-h { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.op-prof-h { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.op-av { width: 52px; height: 52px; font-size: 18px; flex: none; }
.op-note { position: relative; }
.op-mention { position: absolute; left: 24px; top: 104px; z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; min-width: 260px; display: flex; flex-direction: column; }
.op-mention button { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; font: 500 14px var(--sans); color: var(--ink); cursor: pointer; }
.op-mention button .jb-avatar { width: 24px; height: 24px; font-size: 10px; }
.op-mention button.on, .op-mention button:hover { background: var(--chip-soft); }
.op-notes, .op-activity { display: flex; flex-direction: column; gap: 0; padding: 4px 20px; }
.op-noterow, .op-actrow { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.op-noterow:last-child, .op-actrow:last-child { border-bottom: 0; }
.op-noterow p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.op-at { color: var(--maroon-text); font-weight: 600; }
.op-actic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--chip-soft); color: var(--ink-3); }
.op-actic .jb-ico { width: 15px; height: 15px; }
.op-thread { display: flex; flex-direction: column; gap: 12px; }
.op-bubble { max-width: 640px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.op-bubble.out { background: var(--chip-soft); }
.op-bubble.in { margin-left: auto; }
.op-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.op-filters { gap: 10px; }
.op-filters .jb-search { flex: 1 1 240px; }
.op-filters select { min-height: 40px; }
/* Opportunities, release 3: interviews, scores, references, clearances */
.op-iv { align-items: flex-start; border-bottom: 1px solid var(--line); padding: 14px 0; }
.op-iv:last-child { border-bottom: 0; }
.op-iv.cancelled { opacity: .6; }
.op-ivdate { flex: none; width: 52px; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 0; display: flex; flex-direction: column; }
.op-ivdate b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--maroon-text); }
.op-ivdate span { font: 600 20px var(--sans); }
.op-panel { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.op-panel .jb-avatar { width: 24px; height: 24px; font-size: 10px; }
.op-panel .jb-small { margin-left: 6px; }
.op-stars { letter-spacing: 1px; color: var(--line); white-space: nowrap; }
.op-stars .on { color: var(--accent); }
.op-score { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.op-score-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13.5px; color: var(--ink-2); }
.op-score p { margin: 0; white-space: pre-wrap; }
.op-rate { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.op-recopt { position: relative; }
.op-recopt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.op-recopt span { display: inline-block; padding: 6px 12px; border-radius: 999px; font: 600 13px var(--sans); color: var(--ink-3); }
.op-recopt input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.op-recopt input:focus-visible + span { outline: 3px solid var(--maroon-line, var(--maroon)); }
.op-clear { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.op-clear:last-child { border-bottom: 0; }
.op-clear select, .op-clear input[type=date] { min-height: 36px; }
/* an offer letter in the applicant's account (web/js/opp-apply.js offerBlock) */
.oa-offer { border: 1.5px solid var(--maroon); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: var(--card); }
.oa-offer-h { display: flex; gap: 12px; align-items: flex-start; }
.oa-offer-h > .jb-ico { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--chip-soft); color: var(--maroon-text); flex: none; }
.oa-letter { white-space: pre-wrap; line-height: 1.6; padding: 16px; border-radius: 10px; background: var(--page); border: 1px solid var(--line); overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
.oa-signed { margin: 0; font-family: var(--serif); }

/* Fundraising → campaign → Automations, and adding donors to a campaign's sequence */
.fr-flowstart { background: var(--ai-wash); border-color: var(--ai-edge); }
.fr-flowsteps { display: flex; flex-direction: column; gap: 0; border-left: 2px dashed var(--ai-edge); margin-left: 34px; padding-left: 0; }
.fr-flowstep { display: flex; align-items: flex-start; gap: 14px; padding: 7px 0; margin-left: -36px; }
.fr-flowstep > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fr-flowdate { flex: none; width: 70px; box-sizing: border-box; padding: 4px 0; border-radius: 999px; background: var(--card); border: 1px solid var(--ai-edge); text-align: center; font: 700 12px var(--sans); color: var(--maroon-text); }
.fr-check { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft, var(--line)); }
.fr-check:first-of-type { border-top: 0; }
.fr-check .jb-grow { display: flex; flex-direction: column; gap: 1px; }
.fr-check-i { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--amber, #c98a1b) 16%, var(--card)); color: var(--amber-text, #8a5a00); }
.fr-check.ok .fr-check-i { background: color-mix(in srgb, var(--green, #2f7a4d) 15%, var(--card)); color: var(--green-text, #23633d); }
.fr-check-i .jb-ico { width: 15px; height: 15px; }
.jb-donorlists { display: flex; flex-direction: column; gap: 6px; }
.jb-donorlist { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); transition: border-color .15s, background .15s; }
.jb-donorlist:hover { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.jb-donorlist:has(input:checked) { border-color: var(--maroon); background: color-mix(in srgb, var(--maroon) 5%, var(--card)); }
.jb-donorlist > span { display: flex; flex-direction: column; gap: 1px; }
.jb-donorlist input { margin-top: 3px; accent-color: var(--maroon); }
/* the AI panel: "Create all" under a set of drafts; a drafted automation list */
.jb-ai-all { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 2px; }
.jb-ai-flow { margin: 2px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }

/* ---- layering: nothing important hides behind something else (see core.js sheet for dialogs)
   a toast always shows, even over an open dialog */
.jb-toast { z-index: 120; }
/* the Help / AI Helper tab steps aside for other things that live in the bottom-right corner */
body:has(.jb-help.min) .md-uploads { bottom: 76px; }                                  /* the upload progress list */
@media (min-width: 761px) {
  body:has(.gm-win) .jb-help.min { right: calc(min(560px, 100vw / var(--zf, 1) - 32px) + 40px); }   /* a message being written */
  body.dc-open .jb-help.min { right: calc(min(410px, 100%) + 16px); }                  /* a discussion panel */
}
@media (max-width: 760px) {
  body:has(.gm-win) .jb-help.min, body.dc-open .jb-help.min { display: none; }        /* full-screen on a phone: back when it closes */
  body:has(.gm-compose:not([hidden])) .jb-help.min { bottom: calc(144px + env(safe-area-inset-bottom)); }   /* the Compose button */
}
@media (max-width: 1180px) { body:has(.ws-ed.has-panel) .jb-help.min { right: calc(min(380px, 100vw - 24px) + 24px); } }   /* the website editor's side panel */
body:has(.jb-more.open) .jb-help.min { display: none; }                               /* the phone's More menu */

/* email signatures (Settings and My profile) */
.sig-fill { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 1px 6px; margin: 2px 2px 0 0; font: 12px var(--mono, ui-monospace, Menlo, monospace); color: var(--ink-2); cursor: pointer; }
.sig-fill:hover { background: var(--chip-soft); }
.sig-prev { background: var(--chip-soft); border-radius: 10px; padding: 10px 14px; }
.sig-prev p { margin: 4px 0 0; white-space: pre-line; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.sig-choice { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* newest message first: Reply sits under it, then the earlier messages */
.gm-replytop { margin-bottom: 8px; }
.gm-replytop .gm-replybtn { margin-top: 10px; }
.gm-earlier { margin: 18px 0 4px 52px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3, #8a8a8f); }

/* info tips (core.js info): the "i" beside a field's name and its floating explanation */
.jb-info { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; vertical-align: 1px; border-radius: 50%; border: 1.5px solid currentColor; color: var(--ink-4, #9a9286); font: 700 10px/1 Georgia, 'Times New Roman', serif; font-style: italic; cursor: help; user-select: none; transition: color .15s, background .15s; text-transform: none; letter-spacing: 0; }
.jb-info:hover, .jb-info:focus-visible, .jb-info[aria-describedby] { color: #fff; background: var(--maroon); border-color: var(--maroon); outline: none; }
.jb-tipfloat { position: fixed; z-index: 130; box-sizing: border-box; padding: 11px 14px; border-radius: 12px; background: #1f1f24; color: #f3f1ee; font: 400 13px/1.5 var(--sans); box-shadow: 0 14px 36px rgba(0, 0, 0, .28); pointer-events: none; animation: jb-tip-in .12s ease-out; }
.jb-tipfloat[hidden] { display: none; }
.jb-tipfloat p { margin: 0; } .jb-tipfloat p + p { margin-top: 7px; }
.jb-tipfloat::after { content: ''; position: absolute; left: var(--ax, 50%); bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: #1f1f24; transform: rotate(45deg); }
.jb-tipfloat.below::after { bottom: auto; top: -5px; }
@keyframes jb-tip-in { from { opacity: 0; transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .jb-tipfloat { animation: none; } }
.jb-help-line { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
/* a narrow window with a dialog or panel open: no room beside it, so the Help tab waits until it closes */
@media (max-width: 1000px) { body:has(.jb-scrim) .jb-help.min { display: none; } }
/* the Share link box (web/js/share.js) */
.sh { display: flex; flex-direction: column; gap: 14px; }
.sh-row { display: flex; gap: 8px; }
.sh-url { flex: 1; min-width: 0; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--paper); color: var(--ink); }
.sh-url:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-wash); background: #fff; }
.sh-ways { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-qr { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sh-qr[hidden] { display: none; }
.sh-qrbox svg { display: block; width: 150px; height: 150px; }
@media (min-width: 900px) and (hover: hover) { .sh-sms { display: none; } }   /* "Text it" only where a phone can send one */
@media (max-width: 560px) { .sh-row { flex-direction: column; } .sh-qr { flex-direction: column; text-align: center; } }

/* The Edwin console's "viewing as" bar stays at the top of the window. Everything that covers the whole window
   (dialogs and right-side panels, full-screen builders, the course player, discussion) starts below it,
   so the bar never hides their top. --vbar is the bar's height, kept current by app.js. */
:root { --vbar: 0px; }
body.jb-viewing-on :is(.jb-scrim, .cb-app, .cb-gallery, .cp-app, .dc-panel, .ws-app, .fb-app, .lpb, .jb-more.open) { top: var(--vbar); }
/* the page header sticks just under the bar; --jb-head (set by layouts/planner.js) then counts the bar too, so the
   menu rail, side lists and sticky panels that sit under the header start below both */
body.jb-viewing-on .jb-top { top: var(--vbar); }
body.jb-viewing-on .cb-app.full .cb-fullbar { top: var(--vbar); }
body.jb-viewing-on .sqc-drawer { top: calc(var(--dtop, 0px) + var(--vbar)); }
@media (min-width: 761px) and (max-width: 1180px) { body.jb-viewing-on .ws-ed.has-panel .ws-panel { top: calc(118px + var(--vbar)); } }
body.jb-viewing-on .jb-scrim .jb-sheet:not(.jb-drawer) { max-height: calc(92vh / var(--zf, 1) - var(--vbar)); }
body.jb-viewing-on .jb-sheet.jb-drawer { height: calc(100vh / var(--zf, 1) - var(--vbar)); height: calc(100dvh / var(--zf, 1) - var(--vbar)); }

/* color choices shown as their color (core.js swatches) */
.jb-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.jb-swatch { position: relative; display: inline-flex; cursor: pointer; }
.jb-swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.jb-swatch-c { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 600 13px var(--sans); text-transform: capitalize; transition: box-shadow .15s, transform .12s; }
.jb-swatch.plain .jb-swatch-c { border-style: dashed; color: var(--ink-3); }
.jb-swatch.text .jb-swatch-c { font-weight: 700; }
.jb-swatch.border .jb-swatch-c { border-width: 2.5px; }
.jb-swatch:hover .jb-swatch-c { transform: translateY(-1px); }
.jb-swatch input:checked + .jb-swatch-c { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.jb-swatch input:checked + .jb-swatch-c::before { content: '✓'; font-weight: 800; }
.jb-swatch input:focus-visible + .jb-swatch-c { outline: 3px solid color-mix(in srgb, var(--maroon) 45%, transparent); outline-offset: 3px; }
.jb-swatches.sm .jb-swatch-c { min-height: 28px; padding: 0 10px; font-size: 12px; }

/* a field that needs filling in (core.js markInvalid / checkRequired) */
.jb-invalid input, .jb-invalid select, .jb-invalid textarea, input.jb-invalid, select.jb-invalid, textarea.jb-invalid, .jb-invalid [contenteditable] { border-color: var(--due, #B42318) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--due, #B42318) 16%, transparent) !important; }
.jb-invalid > span:first-child { color: var(--due, #B42318); }
.jb-invalid-note { display: block; margin-top: 4px; font: 600 12.5px/1.35 var(--sans); color: var(--due, #B42318); }
.jb-invalid-note::before { content: '! '; }
.jb-invalid .jb-swatch-c { box-shadow: 0 0 0 2px color-mix(in srgb, var(--due, #B42318) 45%, transparent); }

/* the Help / Edwin tab tucked to the right edge because it would cover something (help.js tuck): it shrinks to just its
   icon (the Edwin star, or ?) in a half-pill against the edge, never a clipped word; a click or a pull to the left brings it back out */
.jb-help.min.tucked { right: 0 !important; transform: none; border-radius: 999px 0 0 999px; box-shadow: -4px 6px 18px rgba(31, 31, 36, .22); animation: none; cursor: pointer; }
.jb-help.min.tucked .jb-help-bar { cursor: pointer; border-radius: 999px 0 0 999px; padding: 11px 12px 11px 15px; transition: padding .2s; }
.jb-help.min.tucked :is(.jb-help-name, .jb-help-sub, .jb-help-tools) { display: none; }
.jb-help.min.tucked:hover .jb-help-bar, .jb-help.min.tucked:focus-within .jb-help-bar { padding-right: 18px; }
.jb-help.min.tucked::before { display: none; }
@media (prefers-reduced-motion: reduce) { .jb-help.min.tucked { transition: none; } }
/* how many people match the search in each People tab */
.jb-tabn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--chip); color: var(--ink-3); font-size: 12px; font-weight: 700; vertical-align: 1px; }
[aria-current="page"] > .jb-tabn { background: var(--maroon-tint); color: var(--maroon-text); }

/* ---------------------------------------------------------------- calendar event card (read-only) */
.jb-evc-sheet { --tone: var(--sage); --tone-tint: var(--sage-tint); --tone-ink: var(--sage-ink); width: min(560px, 100%); overflow: hidden; }
.jb-evc-sheet.evc-due, .jb-evc-sheet.evc-holiday { --tone: var(--maroon); --tone-tint: var(--maroon-tint); --tone-ink: var(--maroon-text); }
.jb-evc-sheet.evc-live { --tone: var(--amber-ink); --tone-tint: var(--amber-tint); --tone-ink: var(--amber); }
.jb-evc-sheet.evc-mine { --tone: var(--accent); --tone-tint: var(--accent-tint); --tone-ink: #6B4508; }
.jb-evc-sheet > header { border-top: 5px solid var(--tone); border-bottom: 0; padding: 18px 22px 6px; align-items: flex-start; }
.jb-evc-sheet > header .jb-sheet-title { display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; }
.jb-evc-sheet > header .jb-sheet-title b { font-size: 24px !important; line-height: 1.2; overflow-wrap: anywhere; }
.jb-evc-sheet > header .jb-sheet-title .jb-muted { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tone-ink); }
.jb-evc-sheet > .body { padding-top: 10px; }
.jb-evc-sheet > footer { background: var(--chip-soft); }
.jb-evc { display: flex; flex-direction: column; gap: 18px; }
.jb-evc-when { display: flex; gap: 16px; align-items: center; }
.jb-evc-tile { flex: none; width: 68px; border-radius: 14px; overflow: hidden; text-align: center; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.jb-evc-tile span { background: var(--tone); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 0 3px; }
.jb-evc-tile b { font-size: 28px; line-height: 1; padding-top: 7px; color: var(--ink, #1d1d1f); }
.jb-evc-tile i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-4); padding: 3px 0 7px; }
.jb-evc-whentext { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.jb-evc-date { font-size: 16px; font-weight: 700; }
.jb-evc-time { display: flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: 14px; }
.jb-evc-time svg { width: 16px; height: 16px; flex: none; color: var(--tone); }
.jb-evc-dur { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.jb-evc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.jb-evc-pills .jb-pill { display: inline-flex; align-items: center; gap: 5px; }
.jb-evc-pills .jb-pill svg { width: 13px; height: 13px; }
.jb-evc-pills .pill-mine { background: var(--accent-tint); color: #6B4508; }
.jb-evc-rows { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.jb-evc-rows > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 12px 16px; align-items: center; }
.jb-evc-rows > div + div { border-top: 1px solid var(--line-soft); }
.jb-evc-rows dt { display: flex; align-items: center; gap: 9px; color: var(--ink-4); font-size: 13px; font-weight: 600; }
.jb-evc-rows dt svg { width: 16px; height: 16px; flex: none; color: var(--ink-4); }
.jb-evc-rows dd { margin: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.jb-evc-needs { border-radius: 12px; background: var(--accent-tint); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.jb-evc-needs h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #6B4508; }
.jb-evc-needs h4 svg { width: 16px; height: 16px; }
.jb-evc-need { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: 9px; padding: 8px 8px 8px 12px; font-weight: 600; font-size: 14px; }
.jb-evc-note, .jb-evc-instr { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.jb-evc-note { display: flex; gap: 10px; background: var(--accent-tint); }
.jb-evc-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.jb-evc-instr { background: var(--chip-soft); }
.jb-evc-instr b { display: block; margin-bottom: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); }
.jb-evc-foot { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-4); }
.jb-evc-foot svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 640px) {
  .jb-evc-rows > div { grid-template-columns: 1fr; gap: 3px; }
  .jb-evc-sheet > header .jb-sheet-title b { font-size: 21px !important; }
}
/* conferences: teachers' times and families' sign-up */
.cf-slot .cf-time { min-width: 76px; }
.cf-slot.booked { background: var(--maroon-wash); border-radius: var(--r-sm); }
.cf-window { align-items: center; }
.cf-teacher { display: flex; flex-direction: column; gap: 10px; }
.cf-day { display: flex; flex-direction: column; gap: 6px; }
.cf-times { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-taken { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: var(--r-sm); background: var(--chip-soft); color: var(--ink-4); font-size: 13px; text-decoration: line-through; }
.cf-secs { border: 0; padding: 0; margin: 0; }

/* ---------------------------------------------------------------- requests changed after they were sent */
.rq-epill { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; vertical-align: 2px; padding: 4px 9px; font-size: 11.5px; }
.rq-epill svg { width: 13px; height: 13px; }
.rq-edits { border: 1px solid #E8C98F; background: #FFF8EA; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.rq-edits.fresh { border: 2px solid #C2410C; background: #FFF4EC; box-shadow: 0 0 0 4px rgba(194, 65, 12, .08); }
.rq-edits > header { display: flex; gap: 12px; align-items: flex-start; }
.rq-edits > header svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: #9A5B00; }
.rq-edits.fresh > header svg { color: #C2410C; }
.rq-edits > header b { display: block; font-size: 15px; }
.rq-edits.fresh > header b { color: #9A3412; font-size: 16px; }
.rq-edits > header span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.rq-edit { background: #fff; border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line-soft); }
.rq-edit.older { opacity: .72; }
.rq-edit-when { font-size: 12px; font-weight: 600; color: var(--ink-4); margin-bottom: 6px; }
.rq-edit-when em { font-style: normal; color: #9A3412; }
.rq-edit table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rq-edit th { text-align: left; font-weight: 600; color: var(--ink-3); padding: 6px 10px 6px 0; width: 32%; vertical-align: top; font-size: 13px; }
.rq-edit td { padding: 6px 4px; vertical-align: top; overflow-wrap: anywhere; }
.rq-edit tr + tr th, .rq-edit tr + tr td { border-top: 1px solid var(--line-soft); }
.rq-edit td.arrow { width: 22px; text-align: center; color: var(--ink-4); }
.rq-edit del { text-decoration: line-through; text-decoration-color: rgba(185, 28, 28, .55); color: #8B4A4A; background: #FDECEC; border-radius: 4px; padding: 1px 5px; }
.rq-edit ins { text-decoration: none; color: #14532D; background: #E5F5EA; border-radius: 4px; padding: 1px 5px; font-weight: 600; }
.rq-edit del i, .rq-edit ins i { font-style: italic; font-weight: 400; opacity: .7; }
.rq-locked { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--ink-4); }
.rq-locked svg { width: 15px; height: 15px; flex: none; }
.jb-btn.ghost.danger { color: #B42318; }
.jb-btn.ghost.danger:hover { background: #FDECEC; }
/* warn banners: one row (message, then its button on the right; wraps under on narrow screens). Add .stack for a
   bold title stacked over its text. Never flex-direction: column without .stack: the span's 300px basis becomes height */
.jb-banner.warn { background: #FFF8EA; border-color: #E8C98F; border-left: 4px solid #C98A1B; margin-bottom: 14px; }
.jb-banner.warn b { color: var(--amber-ink); }
.jb-banner.warn > .jb-btn { flex: none; }
.jb-banner.warn.stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.jb-banner.stack > span { flex: none; }
@media (max-width: 640px) {
  .rq-edit table, .rq-edit tbody, .rq-edit tr { display: block; }
  .rq-edit th { display: block; width: auto; padding-bottom: 2px; }
  .rq-edit td { display: inline; padding: 0; }
  .rq-edit tr { padding: 6px 0; }
  .rq-edit tr + tr { border-top: 1px solid var(--line-soft); }
  .rq-edit tr + tr th, .rq-edit tr + tr td { border-top: 0; }
}
.rq-epill.fresh { background: #FFEDD5; color: #9A3412; box-shadow: inset 0 0 0 1px #FDBA74; font-weight: 700; }
.ap-row[data-changed] { box-shadow: inset 4px 0 0 #EA580C; background: #FFF9F4; padding-left: 14px; border-radius: 0 8px 8px 0; }
.ap-row[data-changed] .jb-btn:not(.ghost) { background: #C2410C; border-color: #C2410C; }
.rq-edit.is-new { opacity: 1; border-color: #FDBA74; }
.rq-new { display: inline-block; margin-right: 8px; padding: 2px 7px; border-radius: 999px; background: #C2410C; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }

/* Ask the teacher (web/js/ask.js): inline mini-chat on a homework item */
.ask-card { display: flex; flex-direction: column; gap: 12px; }
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ask-head .jb-h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.ask-head .jb-h2 svg { width: 18px; height: 18px; }
.ask-chat { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding: 2px; }
.ask-b { display: flex; align-items: flex-end; gap: 8px; }
.ask-b.me { justify-content: flex-end; }
.ask-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--chip-soft); color: var(--ink-2); font: 600 11px var(--sans); }
.ask-bub { max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--chip-soft); color: var(--ink); }
.ask-b.me .ask-bub { border-radius: 14px 14px 4px 14px; background: var(--maroon); color: var(--on-maroon, #fff); }
.ask-meta { font-size: 11px; opacity: .75; margin-bottom: 2px; }
.ask-body { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ask-body p { margin: 0; }
.ask-body p + p { margin-top: 4px; }
.ask-b.me .ask-body p[style] { color: inherit !important; opacity: .8; }
.ask-form { display: flex; gap: 8px; align-items: flex-end; }
.ask-form textarea { flex: 1; min-width: 0; resize: vertical; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: 14px/1.4 var(--sans); background: #fff; }
.ask-form textarea:focus { outline: 2px solid var(--maroon); outline-offset: 0; border-color: transparent; }
.ask-form .jb-btn { flex: none; }
/* My profile → Sign in on your phone: the one-time code, steps and QR code */
.pc-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.pc-code { font: 700 34px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; padding: 12px 20px; border-radius: var(--r); background: var(--maroon-wash); color: var(--maroon-text); }
.pc-steps { margin: 0; padding-left: 20px; text-align: left; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.pc-qr svg { display: block; width: 200px; height: 200px; }
.ask-inc { margin: -4px 0 0; font-size: 13px; }
.ask-who { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12px; color: var(--ink-3, #6e6e73); line-height: 1.4; }
.ask-who svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.ask-in { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.ask-in svg { width: 14px; height: 14px; flex: none; }

/* signature editor (web/js/rich-editor.js mode 'signature'): layouts, logo, fill-ins */
.re.sig .re-doc { min-height: 140px; }
.re.sig .re-doc table { border-collapse: collapse; }
.re.sig .re-doc td { vertical-align: top; }
.re.sig .re-doc img[data-logo] { height: auto; }
.re-siglays { display: grid; grid-template-columns: repeat(3, 96px); gap: 6px; }
.re-menu[data-menu="sigl"] { max-height: min(70vh, 420px); overflow-y: auto; }
/* a card holding the signature editor lets its menus open past the card's edge (they were cut off) */
.me-sec:has(.re.sig) { overflow: visible; }
.me-sec:has(.re.sig) > footer { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.me-sec:has(.re.sig) > header { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.re-siglay { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; font: 600 11.5px var(--sans); color: var(--ink-2); cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; }
.re-siglay:hover, .re-siglay:focus-visible { border-color: var(--maroon); color: var(--ink); }
.re-sigthumb { height: 36px; border-radius: 6px; background: #f4f4f6; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 4px 8px; }
.re-sigthumb i { display: block; height: 4px; border-radius: 2px; background: #c9c9cf; }
.re-sigthumb .w8 { width: 80%; } .re-sigthumb .w7 { width: 70%; } .re-sigthumb .w6 { width: 55%; }
.re-sigthumb .w8:first-child { background: #9a9aa3; }
.re-sigthumb i.lg { width: 14px; height: 14px; border-radius: 5px; background: var(--maroon); flex: none; }
.re-sigthumb .g { display: flex; align-items: center; gap: 8px; }
.re-sigthumb .c { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.re-sigthumb .g .c + .c { border-left: 0; }
.re-sigthumb .bar { display: flex; flex-direction: column; gap: 4px; border-left: 3px solid var(--maroon); padding-left: 7px; }
.re-menu .re-item code { font: 12px var(--mono, ui-monospace, Menlo, monospace); background: var(--chip-soft); border-radius: 4px; padding: 1px 5px; color: var(--ink); }
.sig-prev .sig-html { margin-top: 6px; color: var(--ink-2); font-size: 14px; line-height: 1.5; overflow-x: auto; }
.sig-prev .sig-html img { max-width: 100%; height: auto; }
.sig-prev .sig-html table { border-collapse: collapse; } .sig-prev .sig-html td { vertical-align: top; }
/* inside a form field the toolbar's own controls stay toolbar-sized (.jb-field select/input would stretch them) */
.jb-field .re .re-bar select.re-sel { width: auto; min-height: 32px; height: 32px; padding: 0 22px 0 6px; border: 1px solid transparent; background-color: transparent; font-size: 13px; }
.jb-field .re .re-menu input { width: auto; min-height: 0; }
.jb-field .re .re-menu input[type=url], .jb-field .re .re-menu input[type=text] { width: 100%; min-height: 36px; }
.re.sig { border: 1px solid #D5CFC2; border-radius: var(--r-sm, 10px); background: #fff; }
.re.sig .re-bar { padding: 4px 8px; }
.re.sig .re-page { margin-top: 0; }
.re.sig .re-doc { padding: 12px 14px; }
.re.sig:focus-within { border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-tint, rgba(0,0,0,.06)); }
.re.sig .re-doc [data-sig], .re.sig .re-doc div:empty::before { content: none; }
@media (max-width: 760px) { .re.sig .re-bar { flex-wrap: wrap; overflow: visible; } .re-siglays { grid-template-columns: repeat(3, 1fr); } }

/* Phones: iOS zooms the whole page into any text field whose text is under 16px when it's tapped (the header search
   was 15px). Every typing field is at least 16px on phones, so tapping one never zooms. Checkboxes, radios, colors
   and sliders aren't typed into, so they keep their size. */
@media (max-width: 760px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="file"]), select, textarea, [contenteditable="true"] { font-size: max(16px, 1em) !important; }
}

.fam-cardhead { margin-bottom: 4px; gap: 10px; flex-wrap: nowrap; align-items: center; }
.fam-cardhead > .jb-h2 { flex: 1 1 auto; width: auto; min-width: 0; margin: 0; }
.fam-cardhead > .jb-btn { flex: none; }

/* the children picker (web/js/kid-pick.js): Dashboard → Tonight's homework and the Agenda. Four boxes to a row (a fifth
   child starts a second row); picked boxes are outlined, the others fade; a ring around the initial shows how they're doing */
.kp-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; width: 100%; }   /* full width: 1–4 share the row (a phone fits 4), wider screens fit more */
.kp-boxes.one { grid-template-columns: 1fr; }
.kp-boxes.one .kp-box { cursor: default; flex-direction: row; justify-content: center; gap: 10px; padding: 10px 14px; }
.kp-boxes.one .kp-box .kp-name { margin-top: 0; font-size: 15px; font-weight: 600; }
.kp-box { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font: inherit; color: var(--ink); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; transition: opacity .15s, border-color .15s, box-shadow .15s; }
.kp-box .kp-av { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--kp-ring, transparent); }
.kp-box .kp-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; margin-top: 3px; }
.kp-box b { font-size: 13px; font-weight: 700; line-height: 1; min-height: 13px; }
.kp-box.ok { --kp-ring: var(--sage-ink); } .kp-box.ok b { color: var(--sage-ink); }
.kp-box.left { --kp-ring: var(--amber-ink); } .kp-box.left b { color: var(--amber-ink); }
/* a child with late work: the box is shaded the same gentle orange as their late rows on Due today */
.kp-box.late { --kp-ring: #C2672A; background: #FDEBDC; border-color: #EBC3A5; } .kp-box.late b { color: #9A4A12; }
.kp-box.late .kp-av { box-shadow: 0 0 0 2px #FDEBDC, 0 0 0 4px var(--kp-ring); }
.kp-box.none b { color: #8A8A8A; }
.kp-box.on { border-color: var(--maroon); box-shadow: 0 0 0 1px var(--maroon); }
.kp-box.off { opacity: .5; } .kp-box.off .kp-av { filter: grayscale(1); }
.kp-av.k0 { background: #EEEDFE; color: #3C3489; } .kp-av.k1 { background: #E1F5EE; color: #085041; } .kp-av.k2 { background: #FAECE7; color: #712B13; }
.kp-av.k3 { background: #FBEAF0; color: #72243E; } .kp-av.k4 { background: #E6F1FB; color: #0C447C; } .kp-av.k5 { background: #FAEEDA; color: #633806; }
/* students' and parents' pages (web/js/pages/learning.js): the children boxes under the title, and each picked child's
   part of the page under their name */
.lr-kids { margin: 2px 0 6px; }
.lr-kidhead { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; font-size: 18px; }
.lr-kidhead .kp-av { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
/* a child's initial on their own rows (Dashboard → Tonight's homework, the Agenda's per-child groups, the children's
   pages): the child's colour from the picker, ringed in the school colour like a picked box */
.tn-av, .ag-kav, .lr-kidhead .kp-av, .lr-av { box-sizing: border-box; border: 2px solid var(--maroon); }
.lr-av { flex: 0 0 auto; align-self: flex-start; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.lr-kidhead .jb-muted { font-size: 14px; font-weight: 500; }
.lr-report + .lr-report { margin-top: 18px; }
@media (max-width: 760px) {
  /* phones: a page's number cards (Grades, Attendance…) sit three across, number over label */
  .jb-grid-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .jb-grid-kpi .jb-kpi.big, .jb-grid-kpi > a.jb-kpi { padding: 10px 10px 9px; gap: 2px; }
  .jb-grid-kpi > a.jb-kpi { flex-direction: column; align-items: flex-start; min-width: 0; }
  .jb-grid-kpi .jb-kpi.big .v, .jb-grid-kpi > a.jb-kpi .v { font-size: 22px; min-width: 0; }
  .jb-grid-kpi .jb-kpi.big .l, .jb-grid-kpi > a.jb-kpi .l { font-size: 12.5px; line-height: 1.25; }
  .jb-grid-kpi .jb-kpi.big .jb-muted, .jb-grid-kpi > a.jb-kpi .jb-muted { display: none; }
  .jb-grid-kpi .jb-kpi.big::after, .jb-grid-kpi > a.jb-kpi::after { display: none; }
}
/* every item opens (web/js/item-open.js): the whole row is a tap target */
.io-row { cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 10px; transition: background .12s; }
.io-row:hover { background: color-mix(in srgb, var(--maroon) 4%, transparent); }
.io-row:active { background: color-mix(in srgb, var(--maroon) 8%, transparent); }
.io-row:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.io-body { display: flex; flex-direction: column; gap: 12px; }
.io-meta { margin: 0; font-size: 14px; color: #5A5A5A; }
.io-details { margin: 0; white-space: pre-line; font-size: 15.5px; line-height: 1.5; }
.io-ask:empty { display: none; }
/* a file on a phone: a preview for pictures, then Print or save and Open */
.ak-fileopts { display: flex; flex-direction: column; gap: 12px; }
.ak-fileprev { max-width: 100%; max-height: 50vh; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); }
.ak-filebtns { display: flex; flex-wrap: wrap; gap: 10px; }
.ak-filebtns .jb-btn { flex: 1 1 140px; justify-content: center; }
/* "Done: Long division practice · Undo" (web/js/item-open.js undoChip): floats above the phone's tab bar for a few seconds */
.io-chip { position: fixed; left: 12px; right: 12px; margin: 0 auto; width: fit-content; max-width: min(520px, calc(100% - 24px)); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 9000; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(20, 16, 12, .28); font-size: 14px; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.io-chip.in { opacity: 1; transform: none; }
.io-chip-ic { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--sage-ink); display: inline-flex; align-items: center; justify-content: center; }
.io-chip-ic .jb-ico { width: 14px; height: 14px; stroke: #fff; }
.io-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.io-chip-undo { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 7px 14px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 760px) { .io-chip { bottom: calc(84px + env(safe-area-inset-bottom)); } }   /* above the floating tab bar */
@media (prefers-reduced-motion: reduce) { .io-chip { transition: none; } }
/* iPhone/iPad give date and time fields a fixed minimum width (they ran off the side of panels on a phone):
   every date/time field fits its space, and its text sits on the left like other fields */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="week"] { min-width: 0; max-width: 100%; box-sizing: border-box; }
@supports (-webkit-touch-callout: none) {
  input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="week"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; }
  input::-webkit-date-and-time-value { text-align: left; margin: 0; }
}

/* ---- calendar: class times and the Show filter (web/js/pages/school.js calendar) ---- */
:root { --cls-c: #3F5E8C; --cls-tint: #E6ECF5; --cls-ink: #2B4366; }
.jb-cal .ev.class, .jb-tg .ev.class { background: var(--cls-tint); color: var(--cls-ink); }
.jb-tg-ev.class { background: var(--cls-tint); color: var(--cls-ink); border-left-color: var(--cls-c); }
.jb-cal-dots i.class { background: var(--cls-c); }
.jb-chip.pill-class { background: var(--cls-tint); color: var(--cls-ink); }
.jb-evc-sheet.evc-class { --tone: var(--cls-c); --tone-tint: var(--cls-tint); --tone-ink: var(--cls-ink); }
.jb-cal-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.jb-cal-flbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-right: 2px; }
.jb-cal-fchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-3); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.jb-cal-fchip:hover { border-color: var(--ink-4); }
.jb-cal-fchip:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.jb-cal-fchip[aria-pressed="true"] { background: var(--chip-soft); border-color: var(--ink-3); color: var(--ink); }
.jb-cal-fchip.all[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.jb-cal-fchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--sage); flex: none; }
.jb-cal-fchip[aria-pressed="false"] i { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.jb-cal-fchip i.due { background: var(--maroon); }
.jb-cal-fchip i.live { background: var(--amber-ink); }
.jb-cal-fchip i.mine { background: var(--accent); }
.jb-cal-fchip i.class { background: var(--cls-c); }
.jb-cal-fchip.kid b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--chip); color: var(--ink-2); margin-left: -6px; }
.jb-cal-fchip.kid[aria-pressed="false"] { text-decoration: line-through; text-decoration-color: var(--ink-4); }
.jb-cal-fsep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
@media (max-width: 600px) {
  .jb-cal-filter { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .jb-cal-filter::-webkit-scrollbar { display: none; }
  .jb-cal-fchip { flex: none; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cls-tint: #26324A; --cls-ink: #C9D7EE; --cls-c: #7C9BD0; } }
:root[data-theme="dark"] { --cls-tint: #26324A; --cls-ink: #C9D7EE; --cls-c: #7C9BD0; }

/* Homework questions for the teacher: the count on a class card, the pill on an assignment row, the questions sheet */
.dk-askn { position: absolute; top: 12px; right: 12px; }
.dk-asked { display: inline-flex; align-items: center; gap: 5px; color: #C2410C; font-weight: 600; }
.dk-asked svg { width: 14px; height: 14px; }
.jb-tabs a .jb-badge { margin-left: 6px; vertical-align: 2px; }
.asq-pill { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: 600 12px var(--sans); cursor: pointer; }
.asq-pill svg { width: 13px; height: 13px; }
.asq-pill:hover { border-color: var(--maroon); color: var(--ink); }
.asq-pill.new { background: #FFF1E7; border-color: #FDBA8C; color: #C2410C; }
.asq-pill.new:hover { border-color: #EA580C; }
.asq-grid { padding: 8px 16px 16px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.asq-side { position: sticky; top: 0; }
.asq-label { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3, #6e6e73); }
.asq-label svg { width: 14px; height: 14px; }
.asq-new { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: #EA580C; color: #fff; font: 600 11px var(--sans); vertical-align: 1px; }
.asq-conv .ask-chat { max-height: 420px; }
.ask-b.other .ask-bub { opacity: .7; }
@media (max-width: 900px) { .asq-grid { grid-template-columns: 1fr; } .asq-side { position: static; } }
.gm-about { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #FFF7F0; border: 1px solid #FCD9BD; color: var(--ink); text-decoration: none; font-size: 14px; }
.gm-about > svg { width: 18px; height: 18px; flex: none; color: #C2410C; }
.gm-about > span:first-of-type { flex: 1; min-width: 0; }
.gm-about-go { display: inline-flex; align-items: center; gap: 2px; flex: none; color: #C2410C; font-weight: 600; white-space: nowrap; }
.gm-about-go svg { width: 14px; height: 14px; }
.gm-about:hover { border-color: #EA580C; }
.pcl-top { position: relative; }
.pcl-askn { margin-left: 6px; align-self: flex-start; }
.pcl-asked { margin: 0 0 2px; align-self: flex-start; text-decoration: none; }
.asq-asg .av-prevbar, .asq-asg .av-askph { display: none; }   /* beside the questions: no "Preview" note or Ask placeholder */
/* certificate designs (catalog item → certificate design): accent, an extra line, a signature */
.tr-cert[style*="--cert-accent"] .tr-cert-k, .tr-cert[style*="--cert-accent"] .tr-cert-t { color: var(--cert-accent); }
.tr-cert-body { max-width: 560px; margin: 8px auto 0; }
.tr-cert-sig { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 18px auto 0; min-width: 220px; }
.tr-cert-sig .tr-cert-line { display: block; width: 220px; border-top: 1px solid currentColor; opacity: .5; margin-bottom: 6px; }
.tr-cert-sig span:not(.tr-cert-line) { font-size: 13px; opacity: .75; }
/* catalog course page (#/catalog/item/:id): C360-style details */
.tr-item-link { color: inherit; text-decoration: none; } .tr-item-link:hover { text-decoration: underline; }
.tr-ip-hero { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.tr-ip-hero:not(:has(.tr-ip-pic)) { grid-template-columns: 1fr; }
.tr-ip-pic { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r, 10px); }
.tr-ip-head { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tr-ip-head .jb-h1 { margin: 0; }
.tr-ip-act { gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.tr-ip-price { font-size: 22px; }
.tr-ip-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tr-ip-desc p { margin: 0 0 10px; line-height: 1.6; }
.tr-ip-learn { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tr-ip-learn li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; } .tr-ip-learn li svg { flex: 0 0 auto; margin-top: 3px; color: var(--sage, #4a7c59); }
.tr-ip-outline details { border-top: 1px solid var(--line); padding: 10px 0; } .tr-ip-outline details:first-child { border-top: 0; }
.tr-ip-outline summary { cursor: pointer; } .tr-ip-outline ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2, #444); line-height: 1.6; }
.tr-ip-inc { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.5; }
.tr-details { border: 1px solid var(--line); border-radius: var(--r, 10px); padding: 10px 14px; } .tr-details summary { cursor: pointer; padding: 4px 0; }
.tr-details[open] summary { margin-bottom: 10px; }
@media (max-width: 760px) { .tr-ip-hero, .tr-ip-cols { grid-template-columns: 1fr; } }

/* ---- Group purchases (organization buyers): Shop cards, the group page, the roster's groups, the join page */
.gp-foot { max-height: none; row-gap: 10px; }
.gp-price { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.gp-price > b { font-size: 20px; }
.gp-pk { color: var(--ink-2) !important; }
.gp-pk .jb-ico, .gp-joincard .jb-kind .jb-ico { width: 14px; height: 14px; vertical-align: -2px; }
.gp-mine { display: flex; flex-direction: column; gap: 10px; }
.gp-mine-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.gp-mine-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); min-width: 0; }
.gp-mine-row > .jb-ico { width: 20px; height: 20px; flex: none; color: var(--maroon-text); }
.gp-mine-row > span { display: flex; flex-direction: column; min-width: 0; }
.gp-mine-row b, .gp-mine-row .jb-small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-incl { padding: 12px 14px; border-radius: var(--r-sm); background: var(--chip-soft); border: 1px solid var(--line); }
.gp-incl ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.gp-incl li { display: flex; gap: 8px; align-items: flex-start; }
.gp-incl li > .jb-ico { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--sage-ink, var(--sage)); }
.gp-total { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.gp-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.gp-row { cursor: pointer; }
.gp-row:hover td { background: var(--chip-soft); }
.gp-pills { margin-top: 8px; flex-wrap: wrap; gap: 6px; }
.gp-pills:empty { display: none; }
.gp-invite { display: flex; gap: 20px; align-items: stretch; justify-content: space-between; flex-wrap: wrap; }
.gp-invite-main { display: flex; flex-direction: column; gap: 10px; flex: 1 1 300px; min-width: 0; }
.gp-invite-main .jb-h2, .gp-invite-main p { margin: 0; }
.gp-invite-main .jb-inline { flex-wrap: wrap; }
.gp-join { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--chip-soft); flex: 0 1 auto; min-width: 0; }
.gp-qr { background: #fff; border-radius: 8px; padding: 4px; flex: none; line-height: 0; }
.gp-join-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gp-code { font: 600 22px/1.1 var(--caps, var(--sans)); letter-spacing: .06em; }
.gp-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 18px 4px; }
.gp-sec-head .jb-h2 { margin: 0; }
.gp-prog { min-width: 180px; }
.gp-prog-row { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.gp-prog-row:last-child { margin-bottom: 0; }
.gp-prog-bar { display: grid; grid-template-columns: 1fr 40px; gap: 8px; align-items: center; }
.gp-prog-bar b { text-align: right; }
.gp-roster { display: flex; flex-direction: column; gap: 10px; padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.gp-roster-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.gp-roster-head .jb-h2, .gp-roster-head p { margin: 0; }
.gp-joinrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) {
  .gp-join { width: 100%; }
  .gp-joinrow { grid-template-columns: 1fr; }
  .gp-sec-head { flex-direction: column; align-items: flex-start; gap: 2px; }
}
/* a package card holds its seats and two buttons: it grows instead of clipping (the deck keeps its row height as a minimum) */
.dk-deck > .dk.gp-shopcard { height: auto; min-height: var(--dk-h, 232px); }
.dk-deck > .dk.gp-shopcard .dk-meta { margin-top: 0; }
.gp-shopcard .gp-foot { margin-top: auto; }
@media (max-width: 560px) {
  .gp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-join { align-items: flex-start; }
  .gp-qr svg { width: 84px; height: 84px; }
  .gp-code { font-size: 19px; white-space: nowrap; }
  .gp-join-txt .jb-inline { flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 560px) { .gp-join { flex-direction: column; align-items: flex-start; } .gp-join-txt { width: 100%; } }
.gp-people { list-style: none; margin: 0; padding: 0; }
.gp-person { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.gp-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gp-who > .jb-small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.gp-person .gp-prog { min-width: 0; }
.gp-act:empty { display: none; }
.gp-order { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.gp-order > span { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 640px) {
  .gp-person { grid-template-columns: minmax(0, 1fr) auto; }
  .gp-person .gp-prog { grid-column: 1 / -1; grid-row: 2; }
  .gp-person .gp-act { grid-column: 2; grid-row: 1; align-self: start; }
}
@media (max-width: 640px) {
  .gp-person { grid-template-columns: minmax(0, 1fr); }
  .gp-person .gp-act { grid-column: 1; grid-row: 3; justify-self: start; margin-left: -10px; }
}
.gp-order b { white-space: nowrap; }

/* day picker (web/js/day-pick.js): the school week, the days a class meets */
.dp-days { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-day { position: relative; display: inline-flex; cursor: pointer; }
.dp-day input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dp-day span { min-width: 52px; text-align: center; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13.5px; font-weight: 600; transition: background .12s, color .12s, border-color .12s; }
.dp-day input:checked + span { background: var(--maroon); border-color: var(--maroon); color: var(--on-maroon); }
.dp-day input:focus-visible + span { outline: 2px solid var(--maroon); outline-offset: 2px; }
.dp-day:hover input:not(:checked) + span { border-color: var(--ink-3); color: var(--ink); }

/* ---- admissions: the applicant page's References and Enrollment & payment cards (web/js/admission-cards.js) */
.ar-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ar-head .jb-h2 { margin: 0; }
.ar-head .jb-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.ar-head .jb-btn .jb-ico { width: 16px; height: 16px; }
.ar-list { display: grid; gap: 8px; }
.ar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.ar-main { flex: 1 1 220px; min-width: 0; }
.ar-name { overflow-wrap: anywhere; }
.ar-main .jb-small { overflow-wrap: anywhere; margin-top: 2px; }
.ar-acts { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; margin-left: auto; }
.ar-acts .jb-iconbtn { width: 32px; height: 32px; }
.ar-answers { flex: 1 1 100%; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.ar-answers > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.ar-answers[open] > summary { margin-bottom: 8px; }
.ar-answers dl { display: grid; gap: 2px 0; margin: 0 0 10px; }
.ar-answers dt { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.ar-answers dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ar-answers .jb-btn { display: inline-flex; align-items: center; gap: 6px; }
.ar-add { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ar-addbar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .ar-add { grid-template-columns: 1fr; } .ar-head .jb-btn { margin-left: 0; } .ar-acts { margin-left: 0; } }
@media (max-width: 359px) { .ar-acts { flex-wrap: wrap; } }
/* the public pay-to-enroll page (/pay/?enroll=…, web/js/pay.js) */
.py-step { display: grid; gap: 10px; }
.py-step + .py-step { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.py-step-h { display: flex; align-items: center; gap: 10px; }
.py-step-h .jb-h2 { margin: 0; }
.py-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--maroon-tint); color: var(--maroon-ink); }
.py-step.done .py-num { background: #DDEFE3; color: #1F6B3A; }
.py-coupon { display: flex; gap: 8px; align-items: flex-end; }
.py-coupon .jb-field { flex: 1; margin: 0; }
.py-who { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
/* the public application's References section (/apply/, web/js/apply.js) */
.ap-ref { grid-column: 1 / -1; margin: 0; padding: 8px 12px 12px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.ap-ref legend { font-weight: 600; padding: 0 6px; }
.ap-ref .jb-field { margin: 0; }
@media (max-width: 640px) { .ap-ref { grid-template-columns: 1fr; } }
/* the reference page's letter upload (/ref/, web/js/refpublic.js) */
.rf-letter { display: grid; gap: 6px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.rf-letter b { overflow-wrap: anywhere; }

/* Quick setup (web/js/quick-setup.js), every role: three short questions over the Dashboard. A centered card on larger
   screens; on phones it fills the screen so the buttons are big and nothing else competes for attention. */
body.ps-on { overflow: hidden; }
.ps { position: fixed; inset: 0; z-index: 90; background: rgba(27, 27, 40, .45); display: flex; align-items: center; justify-content: center; padding: 16px; padding-top: calc(16px + var(--vbar, 0px)); animation: ps-in .18s ease-out; }
@keyframes ps-in { from { opacity: 0; } }
.ps-card { width: 100%; max-width: 520px; max-height: calc(100vh / var(--zf, 1) - 32px); max-height: calc(100dvh / var(--zf, 1) - 32px); overflow: auto; background: var(--card); border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(20, 18, 50, .28); padding: 18px 24px 26px; display: flex; flex-direction: column; gap: 14px; }
.ps-top { display: grid; grid-template-columns: 44px 1fr 64px; align-items: center; }
.ps-back, .ps-skip { min-height: 40px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 15px; cursor: pointer; border-radius: var(--r-sm); }
.ps-back { width: 40px; display: inline-flex; align-items: center; justify-content: center; }
.ps-back .jb-ico { width: 20px; height: 20px; }
.ps-skip { justify-self: end; padding: 0 8px; }
.ps-steps { display: flex; justify-content: center; gap: 6px; }
.ps-steps i { width: 26px; height: 5px; border-radius: 3px; background: var(--line); }
.ps-steps i.on { background: var(--maroon); }
.ps-dev { display: flex; justify-content: center; margin-top: 6px; }
.ps-dev svg { width: 84px; height: 84px; fill: var(--maroon-wash); stroke: var(--maroon); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ps-q:focus { outline: none; }
.ps-q { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--ink); text-align: center; text-wrap: balance; }
.ps-lead { margin: -4px 0 4px; color: var(--ink-3); text-align: center; font-size: 15px; }
.ps-yes { min-height: 56px; border: 0; border-radius: var(--r); background: var(--maroon); color: var(--on-maroon); font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.ps-yes .jb-ico { width: 20px; height: 20px; }
.ps-or { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; color: var(--ink-3); font-size: 14px; }
.ps-or > span { width: 100%; text-align: center; }
.ps-alt { min-height: 44px; padding: 0 14px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.ps-alt svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ps-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-tile { min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.ps-tico { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--maroon-tint); color: var(--maroon-text); display: flex; align-items: center; justify-content: center; }
.ps-tico .jb-ico { width: 21px; height: 21px; }
.ps-tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-tt b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.ps-tt span { font-size: 13px; color: var(--ink-3); line-height: 1.3; }
.ps-none { min-height: 48px; border: 0; background: none; color: var(--maroon-text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border-radius: var(--r-sm); }
.ps-yes:focus-visible, .ps-alt:focus-visible, .ps-tile:focus-visible, .ps-none:focus-visible, .ps-back:focus-visible, .ps-skip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ps button:disabled { opacity: .6; cursor: progress; }
.ps-tile { position: relative; }
/* step 3 takes several: a picked tile is filled and ticked; once two are picked the rest are dimmed until one is unpicked */
.ps-tick { position: absolute; top: 50%; right: 12px; margin-top: -11px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); color: transparent; display: flex; align-items: center; justify-content: center; }
.ps-tick .jb-ico { width: 13px; height: 13px; }
.ps-multi .ps-tile { padding-right: 44px; }
.ps-tile.on { border-color: var(--maroon); background: var(--maroon-wash); box-shadow: inset 0 0 0 1px var(--maroon); }
.ps-tile.on .ps-tick { background: var(--maroon); border-color: var(--maroon); color: var(--on-maroon); }
.ps-tile.ps-full { opacity: .5; }
/* hover only with a real mouse (a phone keeps :hover on whatever is under the last tap, so the next step looked pre-picked);
   a press shows on touch instead. A freshly drawn step takes no taps for a moment (the finger that tapped is still there). */
@media (hover: hover) {
  .ps-back:hover, .ps-skip:hover { background: var(--chip-soft); color: var(--ink); }
  .ps-yes:hover { background: var(--maroon-ink); }
  .ps-alt:hover { border-color: var(--maroon-line); background: var(--maroon-wash); color: var(--maroon-text); }
  .ps-tile:not(.on):not(.ps-full):hover { border-color: var(--maroon-line); background: var(--maroon-wash); }
  .ps-none:hover { background: var(--maroon-wash); }
}
.ps-tile:active, .ps-alt:active, .ps-none:active { transform: scale(.985); }
.ps-yes:active { background: var(--maroon-ink); }
.ps.ps-fresh .ps-card { pointer-events: none; }
.ps button { -webkit-tap-highlight-color: transparent; }
.ps-done { align-items: stretch; padding-top: 28px; }
.ps-ok { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--maroon-tint); color: var(--maroon); display: flex; align-items: center; justify-content: center; }
.ps-ok .jb-ico { width: 30px; height: 30px; }
.ps-sum { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ps-sum li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.ps-sum .jb-ico { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--maroon-text); }
@media (max-width: 560px) {
  .ps { padding: 0; align-items: stretch; }
  .ps-card { max-width: none; max-height: none; height: 100%; border-radius: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .ps-tiles { grid-template-columns: 1fr; }
  .ps-q { font-size: 22px; }
  .ps-top { margin-bottom: auto; }                       /* the question sits in the middle of the screen */
  .ps-card::after { content: ''; margin-top: auto; }
  .ps-done::before { content: ''; margin-bottom: auto; }
}
@media (prefers-reduced-motion: reduce) { .ps { animation: none; } }

/* ---------------------------------------------------------------- Catalog (catalog-view.js): home, cards, item page */
.ct-home { display: flex; flex-direction: column; gap: 18px; }
.ct-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ct-pills { display: inline-flex; background: var(--chip-soft); border-radius: 999px; padding: 3px; }
.ct-pills button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.ct-pills button.on { background: var(--maroon); color: var(--on-maroon); }
.ct-tabs { display: flex; gap: 2px 18px; flex-wrap: wrap; }
.ct-tabs button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink-3); padding: 8px 0; border-bottom: 2px solid transparent; cursor: pointer; }
.ct-tabs button.on { color: var(--maroon-text); border-bottom-color: var(--maroon); }
.ct-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.ct-tools .jb-input { min-height: 38px; width: auto; }
.ct-search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); padding: 0 10px; min-height: 38px; color: var(--ink-3); }
.ct-search svg { width: 16px; height: 16px; }
.ct-search input { border: 0; outline: 0; background: none; font: inherit; color: var(--ink); width: 180px; }
.ct-search:focus-within { border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-tint); }
.ct-views { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.ct-views button { border: 0; background: var(--card); width: 38px; height: 36px; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; }
.ct-views button svg { width: 18px; height: 18px; }
.ct-views button.on { background: var(--maroon-tint); color: var(--maroon-text); }
.ct-views button + button { border-left: 1px solid var(--line); }

.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.ct-list { display: flex; flex-direction: column; gap: 12px; }
.ct-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.ct-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.ct-media-link { position: relative; display: block; }
.ct-media { display: block; aspect-ratio: 16 / 9; background: var(--chip-soft); overflow: hidden; }
.ct-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-ink) 100%); color: var(--on-maroon); font-family: var(--serif); font-size: 34px; letter-spacing: .04em; }
.ct-type { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: var(--sage); color: var(--on-sage); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.ct-type-program { background: var(--accent); color: var(--on-accent); }
.ct-type-live { background: var(--maroon); color: var(--on-maroon); }
.ct-type-path { position: static; align-self: flex-start; background: var(--chip); color: var(--ink-2); box-shadow: none; }
.ct-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ct-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ct-title { font-family: var(--serif); font-size: 20px; line-height: 1.2; font-weight: 600; margin: 0; }
.ct-title a { color: var(--ink); text-decoration: none; }
.ct-title a:hover { color: var(--maroon-text); }
.ct-price { font-weight: 700; font-size: 18px; white-space: nowrap; text-align: right; color: var(--ink); }
.ct-price small { display: block; font-size: 11px; font-weight: 600; color: var(--sage-text); }
.ct-tag { color: var(--ink-3); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-3); }
.ct-facts span { display: inline-flex; align-items: center; gap: 5px; }
.ct-facts svg { width: 14px; height: 14px; }
.ct-warn { color: var(--amber-ink); font-weight: 600; }
.ct-prog { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.ct-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; align-items: center; }
.ct-list .ct-card { flex-direction: row; }
.ct-list .ct-media-link { width: 240px; flex: none; }
.ct-list .ct-media { height: 100%; aspect-ratio: auto; min-height: 150px; }
.ct-none { text-align: center; padding: 30px; }
.ct-paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ct-path { background: var(--maroon-wash); border: 1px solid var(--maroon-line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ct-path b { font-family: var(--serif); font-size: 19px; }
.ct-path ol { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.ct-path a { color: var(--ink); }
@media (max-width: 720px) {
  .ct-tools { margin-left: 0; width: 100%; }
  .ct-search { flex: 1; } .ct-search input { width: 100%; }
  .ct-list .ct-card { flex-direction: column; } .ct-list .ct-media-link { width: auto; } .ct-list .ct-media { aspect-ratio: 16 / 9; min-height: 0; }
}

.ct-detail { display: flex; flex-direction: column; gap: 16px; }
.ct-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); text-decoration: none; font-weight: 600; align-self: flex-start; }
.ct-back svg { width: 16px; height: 16px; }
.ct-hero { background: linear-gradient(120deg, var(--maroon) 0%, var(--maroon-ink) 100%); color: var(--on-maroon); border-radius: var(--r-lg); padding: 34px 380px 44px 36px; position: relative; min-height: 240px; }
.ct-hero h1 { font-family: var(--serif); font-size: 40px; line-height: 1.08; margin: 6px 0 8px; font-weight: 600; }
.ct-hero-kicker { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-hero-kicker span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.ct-hero-kicker span + span::before { content: '·'; margin-right: 8px; }
.ct-hero-tag { font-size: 19px; margin: 0 0 10px; opacity: .95; }
.ct-hero-sum { margin: 0 0 14px; opacity: .9; max-width: 68ch; line-height: 1.55; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chips span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; }
.ct-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ct-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ct-buy { position: sticky; top: 16px; margin-top: -196px; display: flex; flex-direction: column; gap: 12px; z-index: 1; }
.ct-buy-in { padding: 0; overflow: hidden; box-shadow: 0 10px 30px rgba(20,15,10,.14); }
.ct-buy-in .ct-media { aspect-ratio: 16 / 10; }
.ct-buy-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.ct-buy-price { font-size: 32px; font-weight: 700; line-height: 1; }
.ct-member { color: var(--sage-text); font-weight: 600; font-size: 14px; }
.ct-pick { margin: 0; } .ct-pick select, .ct-pick input { width: 100%; }
.ct-aid { font-size: 14px; }
.ct-mine { display: flex; flex-direction: column; gap: 8px; }
.ct-sponsor { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); border-color: var(--maroon-line); background: var(--maroon-wash); }
.ct-sponsor svg { color: var(--maroon); flex: none; }
.ct-sponsor small { display: block; color: var(--ink-3); }
.ct-sec h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 12px; }
.ct-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ct-link { border: 0; background: none; color: var(--maroon-text); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.ct-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ct-checks.two { grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.ct-checks li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.4; }
.ct-checks svg { width: 18px; height: 18px; flex: none; color: var(--sage); margin-top: 1px; }
.ct-prose p { margin: 0 0 12px; line-height: 1.6; max-width: 72ch; } .ct-prose p:last-child { margin: 0; }
.ct-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; counter-reset: st; }
.ct-steps li { counter-increment: st; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-sm); background: var(--chip-soft); }
.ct-steps li::before { content: counter(st); width: 26px; height: 26px; border-radius: 50%; background: var(--maroon); color: var(--on-maroon); display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.ct-steps span { color: var(--ink-3); font-size: 14px; line-height: 1.4; }
.ct-sched { display: flex; flex-direction: column; }
.ct-sched-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.ct-sched-row:first-child { border-top: 0; padding-top: 0; }
.ct-sched-row > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.ct-sched-row.closed { opacity: .6; }
.ct-sched-r { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.ct-outline details { border-top: 1px solid var(--line-soft); }
.ct-outline details:first-child { border-top: 0; }
.ct-outline summary { cursor: pointer; padding: 11px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.ct-outline summary::before { content: '▸'; color: var(--ink-4); margin-right: 8px; }
.ct-outline details[open] summary::before { content: '▾'; }
.ct-outline summary::-webkit-details-marker { display: none; }
.ct-outline summary { justify-content: flex-start; } .ct-outline summary small { margin-left: auto; color: var(--ink-3); font-weight: 400; }
.ct-outline ol { margin: 0 0 12px; padding-left: 40px; display: grid; gap: 4px; color: var(--ink-2); }
.ct-admin { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--sage-mist); border-color: var(--sage-line); padding: 10px 14px; font-size: 14px; }
.ct-admin > span:first-child { display: inline-flex; gap: 6px; align-items: center; }
.ct-admin svg { width: 16px; height: 16px; }
@media (max-width: 960px) {
  .ct-hero { padding: 26px 22px 30px; } .ct-hero h1 { font-size: 30px; }
  .ct-cols { grid-template-columns: 1fr; } .ct-buy { position: static; margin-top: 0; order: -1; }
  .ct-checks.two { grid-template-columns: 1fr; }
}
/* the catalog item editor (near full-screen) */
.ct-editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 22px 28px; }
.ct-editor section.wide { grid-column: 1 / -1; }
.ct-editor .jb-h2 { margin-bottom: 10px; }
.ct-co-list { display: flex; flex-direction: column; gap: 8px; }
.ct-co { display: grid; grid-template-columns: 2fr 1fr 1fr 1.6fr 80px 90px auto auto; gap: 6px; align-items: center; }
.ct-co-new { grid-template-columns: 2fr 1fr 1fr 1.6fr 80px 90px auto; padding-top: 8px; border-top: 1px dashed var(--line); }
@media (max-width: 900px) { .ct-co, .ct-co-new { grid-template-columns: 1fr 1fr; } }
.ct-paychoice { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; background: var(--amber-tint); border-color: transparent; }

/* ---------------------------------------------------------------- Billing (pages/billing.js) */
.bl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.bl-tiles .jb-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.bl-tiles b { font-size: 24px; }
.bl-due { color: #B42318; font-weight: 700; }
.bl-filter a { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.bl-filter a.on { background: var(--maroon); color: var(--on-maroon); border-color: var(--maroon); }
.bl-tbl tr[data-open] { cursor: pointer; } .bl-tbl tr[data-open]:hover td { background: var(--maroon-wash); }
.bl-tbl .num { text-align: right; white-space: nowrap; }
.bl-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bl-sum > div { background: var(--chip-soft); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.bl-sum b { font-size: 20px; }
.bl-sched > div, .bl-entries > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.bl-sched > div > span:first-child { flex: 1; display: inline-flex; gap: 6px; align-items: center; }
.bl-sched > div.done { color: var(--ink-3); } .bl-sched svg { width: 14px; height: 14px; color: var(--sage); }
.bl-entries span { display: flex; flex-direction: column; }
.bl-entries b.cr { color: var(--sage-text); }
.bl-note { font-style: italic; }
.bl-aid { background: var(--amber-tint); border-color: transparent; }
.bl-aid p { margin: 6px 0 0; }
.bl-more .jb-btn.danger { color: #B42318; }
.bl-mine { display: flex; flex-direction: column; gap: 10px; }
.bl-mine-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.bl-title { font-size: 21px; }
.bl-bal { text-align: right; display: flex; flex-direction: column; } .bl-bal b { font-size: 24px; }
.bl-bar { height: 8px; border-radius: 99px; background: var(--chip); overflow: hidden; } .bl-bar span { display: block; height: 100%; background: var(--sage); border-radius: 99px; }
.bl-credit { display: flex; gap: 10px; align-items: center; background: var(--sage-mist); border-color: var(--sage-line); }

/* the payment page: amount choice, plan, help paying */
.py-choice { display: flex; flex-direction: column; gap: 8px; }
.py-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; cursor: pointer; font-weight: 600; }
.py-opt:has(input:checked) { border-color: var(--maroon); background: var(--maroon-wash); }
.py-opt small { display: block; font-weight: 400; }
.py-opt span { display: flex; flex-direction: column; }
.py-sched { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.py-sched .paid { color: var(--ink-3); text-decoration: line-through; }
.py-aid { border-top: 1px solid var(--line); padding-top: 10px; }
.py-aid summary { cursor: pointer; font-weight: 600; color: var(--maroon-text); }
.py-aid textarea { margin: 8px 0; width: 100%; }
.ct-mine > .jb-pill { align-self: flex-start; }
/* the public catalog (/catalog/) */
.ct-pub-top { max-width: none; padding-left: clamp(16px, 3vw, 64px); padding-right: clamp(16px, 3vw, 64px); }
.ct-pub-org { text-decoration: none; font-size: 20px; }
.ct-pub-wrap { max-width: none; margin: 0; padding: 8px clamp(16px, 3vw, 64px) 48px; }   /* the public catalog fills the screen; its card grid adds columns */
.ct-pub-head { display: flex; flex-direction: column; gap: 2px; }

/* sponsorship (pages/billing.js) and sponsorship pages on /give/ */
.bl-fund { display: flex; flex-direction: column; gap: 12px; }
.bl-fund details summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 4px 0; }
.bl-avail { color: var(--sage-text); }
.bl-give { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.bl-give .jb-input { width: 90px; min-height: 34px; }
.bl-share { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bl-share > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bl-url { font-weight: 600; overflow-wrap: anywhere; }
.bl-support .jb-cols { align-items: start; }
.gv-for { margin: 0 0 8px; color: var(--ink-2); }
.gv-for a { color: var(--maroon-text); font-weight: 600; }
.gv-freq { display: inline-flex; background: var(--chip-soft); border-radius: 999px; padding: 3px; margin-bottom: 4px; }
.gv-freq label { position: relative; }
.gv-freq input { position: absolute; opacity: 0; pointer-events: none; }
.gv-freq span { display: block; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.gv-freq input:checked + span { background: var(--maroon); color: var(--on-maroon); }
.gv-freq input:focus-visible + span { outline: 2px solid var(--maroon); outline-offset: 2px; }
.gv-updates .gv-upd { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 10px; }
.gv-updates .gv-upd:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.gv-updates p { margin: 4px 0 0; }
.gv-wall ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gv-wall li { background: var(--maroon-wash); border: 1px solid var(--maroon-line); border-radius: 999px; padding: 4px 11px; font-size: 14px; }
.gv-wording { border-top: 1px solid var(--line); padding-top: 10px; margin: 4px 0 0; }
.gv-manage { max-width: 560px; }
.ct-inc-t { font-size: 14px; line-height: 1.35; }
.ct-prose ul, .ct-prose ol { margin: 0 0 12px; padding-left: 22px; }
.ct-pubtoggle { align-self: center; white-space: nowrap; }

/* the thank-you page after a gift (give.js thankYou) */
.gv-thanks { max-width: 640px; margin: 24px auto 48px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 40px 32px 32px; box-shadow: 0 18px 50px rgba(20, 15, 10, .08); }
.gv-thanks-mark { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon-wash); animation: gv-beat 1.6s ease-out 1; }
.gv-thanks-mark svg { width: 36px; height: 36px; fill: var(--maroon); }
@keyframes gv-beat { 0% { transform: scale(.6); opacity: 0; } 40% { transform: scale(1.12); opacity: 1; } 70% { transform: scale(.96); } 100% { transform: scale(1); } }
.gv-thanks-h { font-family: var(--serif); font-size: 40px; line-height: 1.1; margin: 0 0 10px; color: var(--ink); }
.gv-thanks-what { font-size: 18px; color: var(--ink-2); margin: 0 0 18px; }
.gv-thanks-msg { font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--maroon-wash); border-radius: var(--r); padding: 18px 20px; margin: 0 0 16px; text-align: left; }
.gv-thanks-msg p { margin: 0 0 10px; } .gv-thanks-msg p:last-child { margin: 0; }
.gv-thanks-receipt { color: var(--ink-3); margin: 0 0 22px; }
.gv-thanks-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gv-thanks-share { margin-top: 12px; }
@media (max-width: 560px) { .gv-thanks { padding: 30px 18px 22px; } .gv-thanks-h { font-size: 30px; } .gv-thanks-actions .jb-btn { width: 100%; } }
/* the thank-you page's way into the donor's account */
.gv-thanks-acct { display: flex; align-items: center; gap: 14px; text-align: left; border: 1px solid var(--maroon-line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 20px; background: var(--card); }
.gv-thanks-acct-text { display: grid; gap: 2px; flex: 1; } .gv-thanks-acct-text span { color: var(--ink-2); font-size: 14px; }
@media (max-width: 560px) { .gv-thanks-acct { flex-direction: column; align-items: stretch; } }

/* ---------------------------------------------------------------- the donor's giving account and the giving home */
.gv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gv-topnav { display: flex; gap: 16px; align-items: center; }
.gv-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maroon-text); margin-bottom: 6px; }
.gv-note { background: var(--amber-tint, #FFF4DD); color: var(--ink); border-radius: var(--r-sm); padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.gv-linkbtn { background: none; border: 0; padding: 0; color: var(--maroon-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.gv-full { width: 100%; justify-content: center; margin-top: 10px; }
.gv-mono { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--card); color: var(--maroon); font-weight: 700; font-size: 22px; letter-spacing: .02em; box-shadow: 0 4px 14px rgba(20, 15, 10, .08); }
.gv-mono.sm { width: 36px; height: 36px; font-size: 13px; box-shadow: none; background: var(--maroon-wash); flex: none; }

/* signing in */
.gv-signin { max-width: 520px; margin: 32px auto 48px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px 32px 28px; box-shadow: 0 18px 50px rgba(20, 15, 10, .08); }
.gv-signin .gv-thanks-mark svg path[d^="M3"] { fill: none; stroke: var(--maroon); stroke-width: 1.7; stroke-linejoin: round; }
.gv-signin-h { font-family: var(--serif); font-size: 32px; line-height: 1.15; margin: 0 0 10px; color: var(--ink); }
.gv-signin-sub { color: var(--ink-2); font-size: 16px; line-height: 1.55; margin: 0 0 20px; }
.gv-signin-form { display: grid; gap: 12px; text-align: left; }
.gv-signin-form .jb-btn { justify-content: center; }
.gv-signin-foot { margin: 16px 0 0; }

/* the account */
.gv-acct-hero { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, var(--maroon-wash), var(--card) 75%); border: 1px solid var(--maroon-line); border-radius: var(--r-lg); padding: 26px 28px; margin: 18px 0 16px; }
.gv-acct-mark { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(20, 15, 10, .08); }
.gv-acct-mark svg { width: 32px; height: 32px; fill: var(--maroon); }
.gv-acct-h { font-family: var(--serif); font-size: 32px; line-height: 1.15; margin: 0 0 6px; color: var(--ink); }
.gv-acct-sub { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.gv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 22px; }
.gv-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; }
.gv-stat .v { font-size: 24px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.gv-stat .l { font-size: 13px; color: var(--ink-3); }
.gv-sec { margin: 0 0 22px; }
.gv-sec-h { font-size: 18px; margin: 0 0 10px; color: var(--ink); }
.gv-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.gv-rec { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--maroon); border-radius: var(--r); padding: 18px 18px 16px; display: grid; gap: 10px; transition: box-shadow .3s; }
.gv-rec.focus { box-shadow: 0 0 0 3px var(--maroon-line), 0 12px 30px rgba(20, 15, 10, .08); }
.gv-rec-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gv-rec-amt { font-size: 28px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.gv-rec-per { color: var(--ink-2); font-size: 15px; }
.gv-rec-to { margin: -4px 0 0; color: var(--ink-2); }
.gv-rec-to a { color: var(--maroon-text); font-weight: 600; text-decoration: none; }
.gv-rec-facts { margin: 0; display: grid; gap: 6px; border-top: 1px solid var(--line-soft, var(--line)); padding-top: 10px; }
.gv-rec-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.gv-rec-facts dt { color: var(--ink-3); } .gv-rec-facts dd { margin: 0; text-align: right; color: var(--ink); }
.gv-rec-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.gv-rec-actions .gv-stop { margin-left: auto; color: var(--ink-3); }
.gv-rec .gv-note { margin: 0; }
.gv-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.gv-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.gv-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-soft, var(--line)); }
.gv-row:first-child { border-top: 0; }
.gv-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gv-row-amt { font-variant-numeric: tabular-nums; }
.gv-side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.gv-side-card .gv-sec-h { font-size: 16px; }
.gv-years { display: grid; gap: 8px; margin-top: 8px; }
.gv-year { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--maroon-wash); border: 1px solid var(--maroon-line); border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.gv-year:hover { border-color: var(--maroon); }
.gv-ein { margin: 10px 0 0; } .gv-nowrap { white-space: nowrap; }
.gv-again-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; color: var(--ink); font-weight: 600; border-top: 1px solid var(--line-soft, var(--line)); }
.gv-again-row:first-of-type { border-top: 0; }
.gv-again-row img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.gv-again-row span:nth-child(2) { flex: 1; }
.gv-arrow { color: var(--ink-3); font-size: 20px; }
.gv-acct-foot { text-align: center; margin: 8px 0 32px; }
@media (max-width: 760px) { .gv-cols { grid-template-columns: 1fr; } .gv-stats { grid-template-columns: 1fr 1fr; } .gv-stats .gv-stat:first-child { grid-column: 1 / -1; } .gv-acct-hero { padding: 20px; } .gv-acct-h { font-size: 26px; } .gv-acct-mark { display: none; } .gv-recs { grid-template-columns: 1fr; } }

/* a small dialog and a toast (the giving pages have no app chrome) */
.gv-modal { position: fixed; inset: 0; background: rgba(20, 18, 30, .45); display: grid; place-items: center; padding: 16px; z-index: 1000; animation: gv-fade .15s ease-out; }
@keyframes gv-fade { from { opacity: 0; } to { opacity: 1; } }
.gv-modal-card { background: var(--card); border-radius: var(--r-lg); width: min(520px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); }
.gv-modal-card.wide { width: min(860px, 100%); }
.gv-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; }
.gv-modal-head h2 { margin: 0; font-size: 20px; }
.gv-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.gv-x:hover { background: var(--chip-soft, #f2f2f2); }
.gv-modal-body { padding: 12px 20px 20px; display: grid; gap: 12px; }
.gv-modal-body p { margin: 0; }
.gv-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.gv-modal .jb-btn.danger { background: #B42318; border-color: #B42318; color: #fff; }
.gv-doc .jb-docframe { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.gv-pe { min-height: 120px; }
.gv-stop-thanks { display: flex; gap: 12px; align-items: flex-start; background: var(--maroon-wash); border-radius: var(--r); padding: 14px; }
.gv-stop-thanks svg { width: 26px; height: 26px; fill: var(--maroon); flex: none; margin-top: 2px; }
.gv-toast { position: fixed; left: 16px; right: 16px; bottom: 24px; margin: 0 auto; width: fit-content; max-width: 520px; background: #1E1C2E; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); z-index: 1100; transition: opacity .4s, transform .4s; }
.gv-toast.out { opacity: 0; transform: translateY(8px); }
@media (max-width: 560px) { .gv-modal { place-items: end center; padding: 0; } .gv-modal-card { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92vh; } .gv-modal-actions .jb-btn { flex: 1; justify-content: center; } }

/* the giving home */
.gv-home-hero { text-align: center; max-width: 680px; margin: 26px auto 24px; }
.gv-home-h { font-family: var(--serif); font-size: 38px; line-height: 1.1; margin: 0 0 10px; color: var(--ink); }
.gv-home-sub { color: var(--ink-2); font-size: 17px; line-height: 1.55; margin: 0 0 18px; }
.gv-home-tools { display: grid; gap: 12px; justify-items: center; }
.gv-search { width: min(460px, 100%); }
.gv-search input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; font: inherit; font-size: 16px; background: var(--card); box-shadow: 0 4px 14px rgba(20, 15, 10, .05); }
.gv-search input:focus { outline: 2px solid var(--maroon); outline-offset: 1px; }
.gv-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.gv-chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.gv-chip[aria-selected="true"] { background: var(--maroon); border-color: var(--maroon); color: var(--on-maroon, #fff); }
.gv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 440px)); justify-content: center; gap: 16px; margin: 0 0 18px; }   /* cards up to 440px, centered: one campaign looks deliberate, many fill the row */
/* the giving page (web/give/) fills big screens instead of a 980px column */
.py-top:has(~ #give), #give.py-wrap { max-width: none; padding-left: clamp(16px, 3vw, 64px); padding-right: clamp(16px, 3vw, 64px); }
.gv-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.gv-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20, 15, 10, .1); }
.gv-card[hidden] { display: none; }
.gv-card-img { position: relative; height: 150px; background: linear-gradient(135deg, var(--maroon-wash), var(--maroon-tint)); display: grid; place-items: center; }
.gv-card-img img { width: 100%; height: 100%; object-fit: cover; }
.gv-card-kind { position: absolute; left: 10px; top: 10px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.gv-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gv-card-h { font-size: 18px; margin: 0; color: var(--ink); }
.gv-card-for { margin: 0; color: var(--maroon-text); font-weight: 600; font-size: 14px; }
.gv-card-blurb { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.gv-card-prog { display: grid; gap: 6px; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.gv-card-prog b { color: var(--ink); }
.gv-card-go { margin-top: auto; align-self: flex-start; }
.gv-card-body > .gv-card-go { margin-top: 10px; }
.gv-empty { text-align: center; }
.gv-quiet { text-align: center; padding: 30px 0; } .gv-quiet h2 { margin: 0 0 6px; }
.gv-quiet-mark { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; background: var(--maroon-wash); display: grid; place-items: center; } .gv-quiet-mark svg { width: 28px; height: 28px; fill: var(--maroon); }
.gv-home-foot { text-align: center; margin: 8px 0 36px; }
@media (max-width: 560px) { .gv-home-h { font-size: 28px; } .gv-grid { grid-template-columns: 1fr; } }

/* ---- class Progress tab: each learner's place in the course, and a lesson-by-lesson grid */
.pg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pg-kpis .jb-kpi { flex-direction: column; align-items: flex-start; gap: 2px; }
.pg-tools { margin: 4px 0 2px; gap: 12px; flex-wrap: wrap; }
.pg-sort { display: inline-flex; align-items: center; gap: 8px; }
.pg-sort .jb-input { width: auto; padding-top: 6px; padding-bottom: 6px; }
.pg-tbl td { vertical-align: middle; }
.pg-bar { min-width: 150px; max-width: 220px; }
.pg-tbl .jb-btn { white-space: nowrap; }
.pg-legend { display: inline-flex; align-items: center; gap: 6px 10px; color: var(--ink-3); flex-wrap: wrap; }
.pg-legend .pg-dot { margin-left: 6px; }
.pg-gridcard { padding: 0; overflow: hidden; }
.pg-gridcard > p { padding: 0 18px 14px; }
.pg-gridwrap { overflow-x: auto; }
.pg-grid { border-collapse: separate; border-spacing: 0; font: 500 12px var(--sans); min-width: 100%; }
.pg-grid th, .pg-grid td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.pg-grid thead th { color: var(--ink-3); font-weight: 600; position: sticky; top: 0; background: var(--card); }
.pg-grid thead th span { display: inline-block; min-width: 18px; }
.pg-grid .pg-name { text-align: left; padding: 7px 14px 7px 18px; position: sticky; left: 0; background: var(--card); z-index: 1; white-space: nowrap; font: 600 13px var(--sans); }
.pg-grid .pg-name a { color: var(--ink); text-decoration: none; }
.pg-grid .pg-name a:hover { text-decoration: underline; }
.pg-grid td.num, .pg-grid th.num { padding-right: 18px; text-align: right; }
.pg-grid tbody tr:hover th, .pg-grid tbody tr:hover td { background: var(--chip-soft); }
.pg-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); vertical-align: middle; }
.pg-dot.done { background: var(--sage); border-color: var(--sage); }
.pg-dot.started { background: linear-gradient(90deg, var(--sage) 50%, var(--card) 50%); border-color: var(--sage); }
a.pg-dot:hover { transform: scale(1.25); }
@media (max-width: 760px) { .pg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* a full-screen view opened directly (refresh): a plain page under it until it draws, never the school's frame */
html.jb-cover body::after { content: ""; position: fixed; inset: 0; z-index: 39; background: var(--page, #F7F5F0); }

/* ---- Android (docs/android-notes.md) ---------------------------------------------------------------------------- */
/* no blue/grey box flashing over every tapped link and button (buttons show their own :active state) */
html { -webkit-tap-highlight-color: transparent; text-size-adjust: 100%; color-scheme: only light; }
/* the keyboard is up (core.js sets html.jb-kb): bottom bars would sit on top of it, and over the field being typed in */
html.jb-kb .jb-tabbar, html.jb-kb .vb-dock, html.jb-kb .jb-help.min { display: none !important; }
/* a scroll that reaches the end of a dialog or slide-out doesn't move the page under it, or pull-to-refresh it */
.jb-sheet .body, .jb-drawer .body, .jb-more .panel, .dc-panel { overscroll-behavior: contain; }
/* full-screen players and builders: a downward drag at the top never reloads the page and loses work */
body.cp-fullscreen, html.sqc-open, html.lpb-open, html.seq-fs-open, html:has(.jb-scrim) { overscroll-behavior-y: none; }
/* touch screens: pressed buttons answer the finger now that the tap highlight is gone */
@media (hover: none) { .jb-btn:active, .jb-iconbtn:active { filter: brightness(.92); } }
/* "Add to your Home Screen" invitation on the sign-in page (install.js; phones and tablets in a browser only).
   The school's own color: a warm wash, an accent border and icon tile, a soft glow; install-guide.css adds the sweep. */
.jb-a2hs { --igd-shine: rgba(255, 255, 255, .9); display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 14px 14px 14px 12px; border-radius: 16px; border: 1.5px solid var(--maroon); background: linear-gradient(135deg, color-mix(in srgb, var(--maroon) 14%, #fff), color-mix(in srgb, var(--accent, var(--maroon)) 12%, #fff)); box-shadow: 0 6px 22px color-mix(in srgb, var(--maroon) 22%, transparent); color: var(--ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.jb-a2hs:active { transform: scale(.99); }
.jb-a2hs:focus-visible { outline: 3px solid var(--accent, var(--maroon)); outline-offset: 3px; }
.jb-a2hs-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--maroon); color: var(--on-maroon, #fff); }
.jb-a2hs-ic svg { width: 22px; height: 22px; }
.jb-a2hs-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jb-a2hs-t b { font-size: 16px; line-height: 1.25; color: var(--maroon-text, var(--ink)); }
.jb-a2hs-t span { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.jb-a2hs-go { flex: none; color: var(--maroon-text, var(--ink-2)); display: inline-flex; }
.jb-a2hs-go svg { width: 18px; height: 18px; }
