/* App Insights in the Awaken app look: the token values are the Media App
   system's (preach-media docs/DESIGN-SYSTEM.md), the same ones Set Prep and
   Number Coach copy, so the apps read as one family.

   - Warm neutrals, three text levels (ink, ink-2, ink-3). Light and dark
     follow the device.
   - Circular for everything, Quarto for display sizes only (fonts/).
   - The gradient means Awaken: the Awaken A, the sign-in button, the selected
     rail and Sunday's column. Selected controls are an ink pill.
   - Data is ink and orange-red; each app also has a family tone (s0 to s5;
     Fuel, s5, is the deep red)
     so its bar is the same colour in every calendar day. */
:root {
  --grad: linear-gradient(45deg, #E80E8A 0%, #EE4137 50%, #F59220 100%);
  --grad-v: linear-gradient(180deg, #E80E8A 0%, #EE4137 50%, #F59220 100%);
  --grad-h: linear-gradient(90deg, #E80E8A 0%, #EE4137 50%, #F59220 100%);
  --ink: #1F1B17; --ink-2: #574E45; --ink-3: #786D60;
  --bg: #F7F5F1; --surface: #FFFFFF; --surface-2: #FBF9F5; --line: #E4DFD7; --line-soft: #F0EBE3; --line-strong: #9E9384;
  --orange-text: #C4342A; --err: #C5221A; --ok: #0E7050;
  --sun: #FDEDEA; --sun-line: #F6CFC8;
  --s0: #1F1B17; --s1: #8F8477; --s2: #EE4137; --s3: #786D60; --s4: #574E45; --s5: #B5261C;
  --heat-0: #F3EFE9; --heat-1: #FBD5D0; --heat-2: #F5998F; --heat-3: #F2584D; --heat-4: #B5261C; --heat-4-fg: #FFFFFF;
  --dev-0: #1F1B17; --dev-1: #786D60; --dev-2: #C1BFB7;
  --font: Circular, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Quarto, Georgia, serif;
  --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-base: 14px; --fs-lg: 15px; --fs-xl: 20px; --fs-2xl: 26px; --fs-3xl: 36px;
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --sh-md: 0 8px 24px -14px rgba(0, 0, 0, .28);
  --ease: cubic-bezier(.2, .8, .3, 1); --dur-fast: 120ms; --dur: 200ms; --dur-slow: 320ms;
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--orange-text);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F4F2EE; --ink-2: #BCB6AC; --ink-3: #948B7C;
    --bg: #16130F; --surface: #201C17; --surface-2: #2A2520; --line: #37312A; --line-soft: #272220; --line-strong: #7A7366;
    --orange-text: #FF9384; --err: #FF9D95; --ok: #4cd699;
    --sun: #2E1D18; --sun-line: #4A2A22;
    --s0: #F4F2EE; --s1: #7A7366; --s2: #FF7B6B; --s3: #948B7C; --s4: #BCB6AC; --s5: #D63E31;
    --heat-0: #2A2520; --heat-1: #4A1D19; --heat-2: #7E2820; --heat-3: #C9372B; --heat-4: #FF6A5C; --heat-4-fg: #16130F;
    --dev-0: #F4F2EE; --dev-1: #948B7C; --dev-2: #57514A;
    --sh-sm: 0 1px 2px rgba(0, 0, 0, .45);
    --sh-md: 0 10px 26px -10px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-base); line-height: 1.5; -webkit-font-smoothing: antialiased; }
html { scrollbar-color: var(--line-strong) transparent; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: rgba(238, 65, 55, .2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fig { font-weight: 800; color: var(--ink); }
.note { font-size: var(--fs-md); color: var(--ink-3); }
.bad { color: var(--err); }
.wait { color: var(--ink-3); padding: 24px 0; }

/* ---------------------------------------------------------------- top bar */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .in { min-height: 60px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 10px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: var(--fs-lg); }
.mark { width: 28px; height: 28px; object-fit: contain; flex: none; }
.mark.big { width: 52px; height: 52px; }
.seg { display: inline-flex; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-full); padding: 3px; gap: 2px; margin-left: auto; }
.seg button { border: 0; background: none; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); padding: 7px 14px; border-radius: var(--r-full); min-height: 34px; transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.seg button:focus-visible { border-radius: var(--r-full); }
.acct { display: flex; align-items: center; gap: 12px; font-size: var(--fs-md); color: var(--ink-3); }
.acct:empty { display: none; }
.email { overflow-wrap: anywhere; }
.quiet { border: 0; background: none; font-weight: 700; color: var(--ink-2); padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-md); }
.quiet:hover { color: var(--ink); background: var(--line-soft); }
.demo { border: 1.5px solid var(--line); border-radius: var(--r-full); padding: 4px 12px; font-weight: 700; color: var(--ink-2); font-size: var(--fs-sm); white-space: nowrap; }
@media (max-width: 960px) { .email { display: none; } }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: calc(100vh - 61px); background: linear-gradient(90deg, var(--surface) 259px, var(--line) 259px 260px, transparent 260px); }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow-y: auto; }
.ra { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); text-decoration: none; position: relative; margin-bottom: 2px; transition: background-color var(--dur-fast) var(--ease); }
.ra:hover { background: var(--surface-2); }
.ra[aria-current="page"] { background: var(--ink); color: var(--surface); }
.ra[aria-current="page"] b, .ra[aria-current="page"] small { color: var(--surface); }
.ra[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad-v); }
.rn { flex: 1; min-width: 0; font-weight: 700; line-height: 1.3; }
.rn small { display: block; font-weight: 400; font-size: var(--fs-sm); color: var(--ink-3); }
.ra b { font-weight: 800; font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.ra.quiet .rn, .ra.quiet b { color: var(--ink-3); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw.all { background: var(--grad); }
.s0 { background: var(--s0); } .s1 { background: var(--s1); } .s2 { background: var(--s2); }
.s3 { background: var(--s3); } .s4 { background: var(--s4); } .s5 { background: var(--s5); }
.s6 { background: var(--s3); } /* an app not on the menu list yet */
main { padding: 32px 36px 72px; min-width: 0; transition: opacity var(--dur) var(--ease); }
main.busy { opacity: .55; }
main.solo { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.015em; line-height: 1.08; text-wrap: balance; }
.answer { color: var(--ink-2); font-size: clamp(15px, 1.3vw, 17px); margin: 10px 0 24px; max-width: 68ch; text-wrap: pretty; }
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: 20px 22px; min-width: 0; }
.card + .card, .card + .cols, .col > .card + .card { margin-top: 20px; }
.card h2 { font-size: var(--fs-lg); font-weight: 800; line-height: 1.3; }
.card h2 + .note { margin: 2px 0 14px; }
.card h3 { font-size: var(--fs-md); font-weight: 800; margin: 18px 0 4px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.col { min-width: 0; }
.key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: var(--fs-sm); color: var(--ink-2); }
.key li { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- filters */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 16px 0 4px; }
.fl { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-md); font-weight: 700; color: var(--ink-2); }
.fl select { appearance: none; -webkit-appearance: none; font: inherit; font-size: var(--fs-md); font-weight: 700; color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23786D60' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-full); padding: 8px 34px 8px 14px; min-height: 38px; cursor: pointer; max-width: 100%;
  transition: border-color var(--dur-fast) var(--ease); }
.fl select:hover { border-color: var(--ink-3); }
.fl select:focus-visible { border-radius: var(--r-full); }
.clear { font-size: var(--fs-md); font-weight: 700; color: var(--orange-text); text-underline-offset: 3px; padding: 6px 2px; }
.filters + .answer { margin-top: 12px; }

/* ---------------------------------------------------------------- the calendar */
/* The calendar always fits its card; no scroll box, so the page scrolls straight past it. */
.calwrap { overflow: visible; }
.cal { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; margin: -6px; width: calc(100% + 12px); }
.cal thead th { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 0 8px 2px; }
.cal thead th.sun { color: var(--ink); background: var(--grad-h) 8px 100% / 28px 3px no-repeat; padding-bottom: 8px; }
.cal .wkh { width: 88px; font-weight: 700; text-align: left; vertical-align: middle; padding: 0 4px; font-size: var(--fs-base); }
.cal thead .wkh { padding: 0; }
.cal .wkh small { display: block; font-weight: 400; font-size: var(--fs-sm); color: var(--ink-3); }
.d { height: 92px; background: var(--surface-2); border-radius: var(--r-md); padding: 8px 9px; vertical-align: top; position: relative; }
.d.sun { background: var(--sun); box-shadow: inset 0 0 0 1px var(--sun-line); }
.d.blank { background: transparent; box-shadow: inset 0 0 0 1px var(--line-soft); }
.d.blank.lead { box-shadow: none; background: none; }
.d.sun .dt { color: var(--ink-2); }
.d .dt { font-size: var(--fs-xs); color: var(--ink-3); }
.d b { float: right; font-size: var(--fs-base); font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.d.none b { color: var(--ink-3); font-weight: 400; }
.marks { position: absolute; left: 9px; right: 9px; bottom: 9px; display: flex; flex-direction: column; gap: 3px; }
.marks i { display: block; height: 5px; width: var(--w); border-radius: 3px; transform-origin: left; }
.marks i[style^="--w:0%"] { visibility: hidden; }
.single .d { height: 84px; }
.single .marks i { height: 22px; border-radius: var(--r-xs); }
.enter .marks i { animation: grow var(--dur-slow) var(--ease) both; animation-delay: calc(var(--k) * 28ms); }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------------------------------------------------------------- leaving a browser out */
.mecard .note { max-width: 76ch; }
.sites li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.sites li:last-child { border-bottom: 0; }
.sites li > span { font-weight: 700; }
.pill-link { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-full); font-size: var(--fs-md); font-weight: 700; text-decoration: none; color: var(--ink); transition: border-color var(--dur-fast) var(--ease); }
.pill-link:hover { border-color: var(--ink-3); }
.pill-link:focus-visible, .quiet-link:focus-visible { border-radius: var(--r-full); }
.quiet-link { font-size: var(--fs-md); font-weight: 700; color: var(--ink-2); text-underline-offset: 3px; padding: 6px 2px; }
@media (max-width: 560px) { .sites li { grid-template-columns: minmax(0, 1fr) auto; } .sites .quiet-link { grid-column: 2; justify-self: end; } }

/* ---------------------------------------------------------------- campuses */
.camp { --cols: repeat(var(--n), minmax(0, 1.4fr)); }
.cr { display: grid; grid-template-columns: minmax(96px, 220px) var(--cols); gap: 12px; align-items: center; padding: 4px 0; }
/* One app's campuses: name and bar share the card, so the bars have room. */
.camp.one .cr { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.cr.ch { font-size: var(--fs-sm); color: var(--ink-3); }
.cn { overflow-wrap: anywhere; }
.cell { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 10px; align-items: center; }
.cell b { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.cell.zero b { color: var(--ink-3); font-weight: 400; }
.camp .gap { height: 12px; }
/* Conferences & Events: one row like a campus's, that opens to list them. */
.evs { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.evs > summary { list-style: none; cursor: pointer; border-radius: var(--r-sm); }
.evs > summary::-webkit-details-marker { display: none; }
.evs > summary:focus-visible { outline: none; box-shadow: var(--focus); }
.evs > summary .cn { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.evs .evt { font-weight: 800; }
.evs .evt::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 9px 2px 1px; border: solid var(--ink-3); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform var(--dur-fast) var(--ease); }
.evs[open] .evt::before { transform: rotate(45deg); margin-bottom: 4px; }
.evs > summary small { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 400; }
.evs > summary:hover .evt { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
/* Events indent their names, not their bars, so the bars line up with the campuses'. */
.evlist { padding: 2px 0; }
.evlist .cn { padding-left: 17px; }
@media (prefers-reduced-motion: reduce) { .evs .evt::before { transition: none; } }
.meter { display: block; height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
/* Meters take the accent, so a card of shares reads as data, not a wall of ink. */
.meter > span { display: block; height: 100%; background: var(--s2); border-radius: 4px; }

/* ---------------------------------------------------------------- app page */
.scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
table.pages, table.rate { width: 100%; border-collapse: collapse; }
.pages th, .rate th { text-align: left; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-3); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line); }
.pages td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.pages th:last-child, .pages td:last-child { padding-right: 0; }
.t { display: block; font-weight: 700; }
a.t { text-decoration: none; }
a.t:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.p { display: block; font-size: var(--fs-sm); color: var(--ink-3); overflow-wrap: anywhere; }
.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Circular's even-width figures widen the space too: keep them off headers and "3m 1s". */
th.n, .pages td.n:last-child { font-variant-numeric: normal; }
/* Figures sit right under right-aligned headings, in columns only as wide
   as they need; the page name takes the rest. */
.pages th.n, .rate th.n { text-align: right; }
.pages th.n, .pages td.n { width: 1%; padding-left: 32px; }
.rate th.wk { text-align: center; }
@media (max-width: 560px) { .pages th.n, .pages td.n { padding-left: 16px; } }
@media (max-width: 560px) { .hide-sm { display: none; } }

.weeks { margin-top: 2px; }
.wr { display: grid; grid-template-columns: 56px minmax(0, 1fr) 40px 64px; gap: 12px; align-items: center; padding: 5px 0; }
.wl { font-size: var(--fs-md); color: var(--ink-3); white-space: nowrap; }
.wr b { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.wr .note { white-space: nowrap; }
.wbar { display: flex; gap: 2px; height: 14px; }
.wbar span { display: block; height: 100%; border-radius: var(--r-xs); }
.wbar .ret, .sw.ret { background: var(--ink-3); }
.wbar .new, .sw.new { background: var(--s2); }
.rate { width: auto; min-width: 100%; }
.rate th[scope="row"] { font-weight: 700; color: var(--ink); white-space: nowrap; padding-right: 16px; border-bottom: 1px solid var(--line-soft); }
.rate td, .rate th { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.rate td { border-bottom: 1px solid var(--line-soft); }
.rate td.n { padding-right: 12px; }
td.rc { padding: 3px 4px; min-width: 58px; }
td.rc span { display: block; padding: 5px 6px; border-radius: var(--r-xs); text-align: center; font-size: var(--fs-md); font-weight: 700; background: var(--heat-0); }
td.rc .r1 { background: var(--heat-1); } td.rc .r2 { background: var(--heat-2); }
td.rc .r3 { background: var(--heat-3); } td.rc .r4 { background: var(--heat-4); color: var(--heat-4-fg); }

.heat { display: grid; grid-template-columns: 38px repeat(18, minmax(13px, 1fr)); gap: 3px; align-items: center; min-width: 440px; }
.hl { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.dl { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-3); }
.dl.sun { color: var(--ink); }
.heat .c { height: 26px; border-radius: var(--r-xs); background: var(--heat-0); }
.c.l1, .sw.l1 { background: var(--heat-1); } .c.l2, .sw.l2 { background: var(--heat-2); } .c.l3, .sw.l3 { background: var(--heat-3); } .c.l4, .sw.l4 { background: var(--heat-4); }
.legend { margin-top: 12px; }
.key1 { display: inline-flex; align-items: center; gap: 5px; }

.ledger li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.ledger li:last-child { border-bottom: 0; }
.ledger b { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1; text-align: right; font-variant-numeric: tabular-nums; }

.stack { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin: 6px 0 10px; }
.stack span { flex: 1 1 0; }
.d0 { background: var(--s2); } .d1 { background: var(--dev-1); } .d2 { background: var(--dev-2); }
.devices li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 5px 0; }
.shares.where small { font-size: var(--fs-sm); color: var(--ink-3); margin-left: 4px; }
.devices li b, .shares b { font-weight: 800; text-align: right; }
.devices li .note { min-width: 9ch; text-align: right; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 28px; margin-top: 4px; }
.shares li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(32px, 1fr) 40px; gap: 8px; align-items: center; padding: 4px 0; font-size: var(--fs-md); }
.shares li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources li { font-size: var(--fs-base); }

/* ---------------------------------------------------------------- refresh, rates, invites */
.updated { white-space: nowrap; }
@media (max-width: 640px) { .updated { display: none; } }
.ra.rinv { margin-top: 14px; border-top: 1px solid var(--line-soft); border-radius: 0 0 var(--r-md) var(--r-md); padding-top: 14px; }
.ra.rinv[aria-current="page"] { border-radius: var(--r-md); }
.rates li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(48px, 1.2fr) 44px; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.rates .rn2 { font-weight: 700; }
.rates b { font-size: var(--fs-xl); font-weight: 800; text-align: right; line-height: 1.1; }
.rates .note { grid-column: 1 / -1; }
.rates + .ledger { margin-top: 6px; }
.opened li { grid-template-columns: minmax(0, 1.6fr) minmax(32px, 1fr) 40px; font-size: var(--fs-base); }
.inv-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin: 8px 0 12px; }
.inv-form label { display: grid; gap: 6px; font-size: var(--fs-md); font-weight: 700; color: var(--ink-2); }
.inv-form small { font-weight: 400; color: var(--ink-3); }
.inv-form input { font: inherit; font-size: var(--fs-base); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; }
.inv-form input:focus-visible { box-shadow: var(--focus); }
.inv-form .primary { margin: 0; min-height: 44px; }
@media (max-width: 720px) { .inv-form { grid-template-columns: minmax(0, 1fr); } }
.okmsg { color: var(--ok, #0E7050); font-weight: 700; margin-bottom: 8px; }
.invites .badge { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: var(--r-full); background: var(--line-soft); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 700; }
.invites td { vertical-align: middle; }
.invites td.n { font-variant-numeric: normal; }
.invites td.acts { text-align: right; }
.invites td.acts .quiet { display: block; margin-left: auto; padding: 4px 8px; white-space: nowrap; }
.invites .badge + .badge { margin-left: 6px; }
/* Status: a small pill, then the dates under it. Active is the ok green;
   an expired link is the error red; invited stays ink. */
.st { display: inline-block; padding: 2px 10px; border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: 700; border: 1.5px solid var(--line); color: var(--ink); white-space: nowrap; }
.st-active { color: var(--ok); border-color: currentColor; }
.st-expired { color: var(--err); border-color: currentColor; }
.st-d { display: block; margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-3); }

/* ---------------------------------------------------------------- sign-in */
.gate { padding: clamp(40px, 12vh, 140px) 0 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.gate p { color: var(--ink-2); font-size: var(--fs-lg); max-width: 52ch; }
.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 30px; border: 0; border-radius: var(--r-full); background: var(--grad); color: #fff; font-weight: 800; font-size: var(--fs-lg); box-shadow: var(--sh-sm); transition: transform var(--dur-fast) var(--ease); }
.primary:hover { transform: translateY(-1px); }
.primary:focus-visible { border-radius: var(--r-full); }
.ghost { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 700; padding: 10px 20px; border-radius: var(--r-full); }
.ghost:hover { border-color: var(--ink-3); }
.ghost:disabled, .primary:disabled { opacity: .6; cursor: default; transform: none; }
.gate .row { display: flex; flex-wrap: wrap; gap: 10px; }
.link { border: 0; background: none; padding: 4px 0; font-weight: 700; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.link:hover { color: var(--ink); text-decoration-color: currentColor; }

/* The email-and-password form, under the Google button. */
.pw-form { display: grid; gap: 12px; width: 100%; max-width: 380px; margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.pw-form h2 { margin: 0; font-size: var(--fs-lg); font-weight: 800; color: var(--ink); }
.pw-form .note { margin: -4px 0 0; }
.pw-form label { display: grid; gap: 6px; font-size: var(--fs-md); font-weight: 700; color: var(--ink-2); }
.pw-form small { font-weight: 400; color: var(--ink-3); }
.pw-form input { font: inherit; font-size: var(--fs-base); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; width: 100%; box-sizing: border-box; }
.pw-form input:focus-visible { box-shadow: var(--focus); outline: none; }
.pw-form input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.pw-form .ghost { justify-self: start; min-height: 44px; }
.pw-form .bad, .pw-form .okmsg { margin: 0; font-size: var(--fs-md); }
.pw-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1180px) { .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .rail { position: static; height: auto; display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--gutter); border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .ra { flex: none; margin: 0; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--r-full); gap: 8px; }
  .ra .rn small { display: none; }
  .ra b { font-size: var(--fs-base); }
  .ra[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
  .ra[aria-current="page"] b { color: var(--surface); }
  .ra[aria-current="page"]::before { left: 10px; right: 10px; top: auto; bottom: -11px; width: auto; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad-h); }
  main { padding: 22px var(--gutter) 56px; }
}
@media (max-width: 640px) {
  .seg { margin-left: 0; order: 3; }
  .acct { margin-left: auto; }
  .demo { white-space: normal; text-align: right; }
  .card { padding: 16px; border-radius: var(--r-md); }
  .cal { border-spacing: 3px; margin: -3px; width: calc(100% + 6px); }
  .cal .wkh { width: 44px; font-size: var(--fs-sm); }
  .cal .wkh small { display: none; }
  .cal thead th { letter-spacing: .04em; padding: 0 2px 2px; text-align: center; }
  .cal thead th.sun { background-position: 50% 100%; background-size: 18px 3px; }
  .d { height: 66px; padding: 5px; border-radius: var(--r-sm); }
  .d .dt { display: none; }
  .d b { float: none; display: block; text-align: center; font-size: var(--fs-md); }
  .marks { left: 5px; right: 5px; bottom: 6px; gap: 2px; }
  .marks i { height: 4px; }
  .single .marks i { height: 16px; }
  .wr { grid-template-columns: 48px minmax(0, 1fr) 32px 52px; gap: 8px; }
  .top { position: static; }
  .heat { min-width: 0; grid-template-columns: 30px repeat(18, minmax(0, 1fr)); gap: 2px; }
  .heat .c { height: 20px; }
  .hl { font-size: 10px; }
}
@media (max-width: 640px) {
  .fl { flex: 1 1 100%; justify-content: space-between; }
  .fl select { flex: 1; max-width: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  main, .seg button, .ra, .primary, .fl select { transition: none; }
  .enter .marks i { animation: none; }
}
