/* =====================================================================
   Green Acres Hub. Styles.html is taken from Lesson Plan Hub byte for
   byte, so everything specific to this app lives here and uses the same
   tokens, glass, radii and springs.

   Layout (v0.2.0): a greeting bar, a strip of six numbers, then a
   12 column bento grid. Tasks are the one hero tile. Everything a
   morning needs sits in the first screen on a 13 inch laptop; detail
   opens in a drawer instead of stretching the page.
   ===================================================================== */

/* ---------- Sidebar links out ----------
   The nav holds Home, CampMinder and Capacity; the links follow, and Admin comes last (v0.4.1). It is sized to its items and the links take the rest of the
   sidebar, instead of sitting under a tall empty gap.
   v0.3.0: the wrap used to be a fixed 50px with overflow hidden, which sliced the selected item's shadow
   off in a hard line just under Home. The wrap now grows with its items and lets the shadow show. */
.sidebar .side-nav-wrap { flex: 0 0 auto; height: auto; overflow: visible; }
.sidebar .side-nav-wrap .side-nav { position: static; overflow: visible; padding-bottom: 2px; }
.sidebar .side-nav-wrap .side-more { display: none; }
.side-links { padding: 0 0 6px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.side-links .side-section { padding-top: 10px; }
.side-links .side-item, .side-nav a.side-item { width: 100%; text-align: left; text-decoration: none; }
.sidebar .side-item .ext { margin-left: auto; opacity: .45; flex: 0 0 auto; }
.sidebar .side-item:hover .ext { opacity: .9; }


/* ---------- Page frame ---------- */
.hub { max-width: 1480px; margin: 0 auto; }
/* v0.4.1: the greeting sits in the same liquid glass page head as Admin and Capacity (and the other
   two hubs). Styles.html gives it the glass, radius, padding and the rise animation. */
/* Four pixels less padding top and bottom than the other pages, so the number strip still ends inside
   the first screen on a 13 inch laptop (the DESIGN.md promise). */
.hub-top { margin-bottom: 14px; padding: 12px 20px; }
.hub-date { color: var(--txt-dim); font-size: 12.5px; font-weight: 650; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.read-at { display: inline-flex; align-items: center; gap: 5px; }
.read-at.stale { color: var(--ink-warn); }
.hub-actions { display: flex; align-items: center; gap: 8px; }
.kbar { display: flex; align-items: center; gap: 9px; min-width: 300px; padding: 9px 12px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--stroke); background: var(--field); color: var(--txt-dim); font-weight: 650; font-size: 13px;
  transition: background .2s, box-shadow .2s, transform .22s var(--spring); }
.kbar:hover { background: var(--hover); box-shadow: var(--shadow); }
.kbar kbd, .hub kbd { margin-left: auto; font: 700 11px/1 var(--font); padding: 4px 6px; border-radius: 7px; border: 1px solid var(--stroke-2);
  background: var(--glass-2); color: var(--txt-dim); }
.icon-only { padding: 8px 10px; }

/* ---------- The number strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; display: block; text-align: left; cursor: pointer; padding: 13px 14px 12px; border-radius: 20px; font: inherit; color: inherit;
  border: 1px solid var(--stroke); background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  box-shadow: var(--shadow), inset 0 1px 0 var(--spec); transition: transform .22s var(--spring), box-shadow .2s; min-width: 0; }
.kpi:hover { transform: translateY(-2px); }
.kpi .k-l { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 750; color: var(--txt-dim); letter-spacing: .01em; }
.kpi .k-l svg { opacity: .8; }
.kpi .k-v { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .k-s { display: block; font-size: 11.5px; font-weight: 650; color: var(--txt-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.bad { background: linear-gradient(150deg, var(--tint-bad), var(--glass) 70%); border-color: rgba(226,80,79,.42); }
.kpi.bad .k-v { color: var(--ink-bad); }
.kpi.warn .k-v { color: var(--ink-warn); }
.kpi.info .k-v { color: var(--ink-info); }
.kpi.ok .k-v { color: var(--ink-ok); }
.kpi .k-bar { position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.kpi.bad .k-bar { background: var(--rose); }
.kpi .skel { height: 30px; width: 46px; margin: 6px 0 4px; }

/* ---------- The bento ----------
   Two columns that each stack on their own (8 and 4 of 12), so a short card never leaves a hole
   under it. Below 1240px the columns dissolve (display: contents) and the cards reflow in priority
   order: tasks, inbox, apps, year, team, links. */
.bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.b-main { grid-column: span 8; display: grid; gap: 16px; align-content: start; min-width: 0; }
.b-side { grid-column: span 4; display: grid; gap: 16px; align-content: start; min-width: 0; }
.bento .card, .bento .card + .card, .grid.bento > div > .card + .card { margin-top: 0; }
.flash { animation: hubflash 1.3s var(--ease); }
@keyframes hubflash { 0% { box-shadow: 0 0 0 0 rgba(76,175,109,.0); } 25% { box-shadow: 0 0 0 4px rgba(76,175,109,.55); } 100% { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* ---------- Card heads ---------- */
.ch { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; min-width: 0; flex-wrap: wrap; }
.ch h2 { margin: 0; font-size: 16px; }
.ch .grow { flex: 1 1 auto; }
.ch .fresh { color: var(--txt-dim); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.hub-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px;
  border-radius: 999px; background: var(--field); border: 1px solid var(--stroke); font-size: 11.5px; font-weight: 800; }
.hub-count.bad { background: var(--tint-bad); color: var(--ink-bad); border-color: transparent; }
.hub-count.warn { background: var(--tint-warn); color: var(--ink-warn); border-color: transparent; }
.card-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.linkish { background: none; border: 0; padding: 4px 2px; font: inherit; font-size: 12.5px; font-weight: 750; color: var(--green); cursor: pointer; }
:root[data-theme="dark"] .linkish { color: var(--mint); }
.linkish:hover { text-decoration: underline; }

/* ---------- Segmented tabs ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--field); border: 1px solid var(--stroke); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 6px 10px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--txt-dim); cursor: pointer; white-space: nowrap;
  transition: background .18s, color .18s; }
.seg button:hover { color: var(--txt); }
.seg button.on { background: var(--glass-strong); color: var(--txt); box-shadow: 0 1px 5px rgba(12,42,28,.12); }
.seg button .n { margin-left: 5px; font-size: 11px; font-weight: 800; opacity: .75; }
.seg button.on.bad .n { color: var(--ink-bad); opacity: 1; }
.seg button.zero { opacity: .55; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 750;
  background: var(--tint-info); color: var(--ink-info); border: 0; cursor: pointer; }

/* ---------- Task lines: one line each, detail in the drawer ---------- */
.tlist { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; text-align: left; font: inherit; color: inherit;
  padding: 9px 10px; min-height: 42px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; position: relative;
  transition: background .16s; }
.tl + .tl { box-shadow: inset 0 1px 0 var(--stroke-2); }
.tl:hover, .tl:focus-visible { background: var(--hover); outline: none; }
.tl:focus-visible { box-shadow: inset 0 0 0 2px var(--green); }
.tl.urgent::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--rose); }
.tl.urgent { background: linear-gradient(90deg, var(--tint-bad), transparent 70%); }
.tl-title { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl.urgent .tl-title { color: var(--ink-bad); font-weight: 750; }
.tl-meta { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.tl-ic { display: inline-flex; color: var(--txt-dim); opacity: .7; }
.tl-due { min-width: 64px; text-align: right; font-size: 12px; font-weight: 750; color: var(--txt-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-due.late { color: var(--ink-bad); }
.tl-due.soon { color: var(--txt); }
.chip.camp { font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 2px 7px; }
.chip.camp.RW { background: var(--tint-info); color: var(--ink-info); border-color: transparent; }
.chip.camp.OE { background: var(--tint-warn); color: var(--ink-warn); border-color: transparent; }
.tl-month { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--txt-dim); padding: 12px 10px 4px; }
.tl-month:first-child { padding-top: 2px; }

/* Status marks: shape as well as colour, so they read without colour too. */
.sd { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--txt-dim); box-sizing: border-box; display: inline-block; flex: 0 0 auto; opacity: .75; }
.sd-ip { border-color: var(--sky); background: conic-gradient(var(--sky) 0 50%, transparent 50% 100%); opacity: 1; }
.sd-ur { width: 15px; height: 15px; border: 0; background: var(--rose); opacity: 1; position: relative; }
.sd-ur::after { content: '!'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 900 10px/1 var(--font); }
.sd-ok { border-color: var(--grass); background: var(--grass); opacity: 1; }

/* People on a task, as initials */
.pp-stack { display: inline-flex; align-items: center; }
.pp { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 800; color: #fff;
  background: hsl(var(--h, 150), 42%, 42%); box-shadow: 0 0 0 2px var(--glass-strong); }
.pp + .pp { margin-left: -6px; }
.pp.has-photo { background: var(--field); overflow: hidden; }
.pp img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.pp.big { width: 44px; height: 44px; font-size: 16px; flex: 0 0 44px; box-shadow: 0 0 0 3px var(--glass-strong), 0 4px 14px rgba(12,42,28,.14); }
.person-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.person-head h2 { margin: 0; }
.pp.more { background: var(--field); color: var(--txt-dim); box-shadow: 0 0 0 2px var(--glass-strong); }

/* ---------- Task drawer ---------- */
.td-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; padding-right: 40px; }
.td-title { font-size: 19px; line-height: 1.3; margin: 2px 40px 14px 0; overflow-wrap: anywhere; }
.td-grid { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.td-grid .lbl { color: var(--txt-dim); font-weight: 700; font-size: 12px; }
.td-grid .late { color: var(--ink-bad); font-weight: 800; margin-left: 6px; }
.td-notes { padding: 12px 13px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--stroke-2); font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 14px; }
.td-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.td-note { color: var(--txt-dim); font-size: 12px; }

/* ---------- Inbox lines ---------- */
.ib-day { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--txt-dim); padding: 10px 4px 4px; }
.ib-day:first-child { padding-top: 0; }
.ib { display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 8px; border-radius: 12px; text-decoration: none; color: inherit;
  transition: background .16s; }
.ib:hover { background: var(--hover); }
.ib-bar { width: 3px; height: 30px; border-radius: 3px; background: var(--sky); margin-top: 2px; }
.ib-main { min-width: 0; }
.ib-from { display: block; font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-text { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ib-text b { font-weight: 700; }
.ib-text span { color: var(--txt-dim); }
.ib-time { color: var(--txt-dim); font-size: 11.5px; font-weight: 700; white-space: nowrap; padding-top: 1px; font-variant-numeric: tabular-nums; }

/* ---------- Camp apps ---------- */
.app-block { display: block; color: inherit; padding: 11px 12px; border-radius: 16px; border: 1px solid var(--stroke-2); background: var(--glass-2); }
.app-block + .app-block { margin-top: 10px; }
.app-head { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 13px; margin: -4px -6px 4px; padding: 4px 6px; border-radius: 10px;
  color: inherit; text-decoration: none; transition: background .2s; }
.app-head:hover { background: var(--hover); }
.app-head .ext { margin-left: auto; opacity: .5; }
.app-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.app-stat .n { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.app-stat .l { display: block; font-size: 11.5px; font-weight: 650; color: var(--txt-dim); line-height: 1.25; }
.app-stat .note { display: block; font-size: 11px; font-weight: 750; color: var(--ink-bad); }
.app-stat.bad .n { color: var(--ink-bad); }
.app-stat.warn .n { color: var(--ink-warn); }
.app-stat.info .n { color: var(--ink-info); }
button.app-stat { font: inherit; color: inherit; text-align: left; background: none; border: 0; padding: 4px 6px; margin: -4px -6px; border-radius: 10px; cursor: pointer;
  transition: background .2s, transform .22s var(--spring); }
button.app-stat:hover { background: var(--hover); }
button.app-stat:active { transform: scale(.97); }
button.app-stat:focus { outline: none; }
button.app-stat:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Lists behind the hub numbers (v0.3.0). Each line opens that plan or interview in its own app. ---------- */
.hl-mini { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--stroke-2); }
.hl-cap { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--txt-dim); padding: 0 4px 4px; }
.hl-mini .linkish { font-size: 12px; margin: 4px 4px 0; }
.hl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 6px; border-radius: 10px;
  text-decoration: none; color: inherit; transition: background .2s; }
.hl:hover { background: var(--hover); }
.hl.has-face { grid-template-columns: auto minmax(0, 1fr) auto; }
.hl .pp.hl-av { width: 32px; height: 32px; flex: 0 0 32px; font-size: 11.5px; }
.hl-list .hl .pp.hl-av { width: 36px; height: 36px; flex-basis: 36px; font-size: 12.5px; }
.hl-main { min-width: 0; }
.hl-t { display: block; font-weight: 750; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-s { display: block; font-size: 11.5px; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-w { font-size: 11.5px; font-weight: 700; color: var(--txt-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hl.late .hl-w { color: var(--ink-bad); }
.hl.today .hl-w { color: var(--ink-info); }
.hl-list .hl { padding: 9px 8px; }
.hl-list .hl + .hl { border-top: 1px solid var(--stroke-2); border-radius: 0; }

/* ---------- Pending applications (v0.3.3) ---------- */
.b-pending { margin-top: 0; }
.pa-kind { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -2px 0 10px; padding: 6px 10px; border-radius: 10px;
  background: var(--tint-info); color: var(--ink-info); font-size: 11.5px; font-weight: 650; }
.pa-kind strong { font-weight: 800; letter-spacing: .02em; }
.pa-kind span { color: var(--txt-dim); }
.pa-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 2px 0 10px; }
.pa-stage { font: inherit; color: inherit; border: 1px solid var(--stroke-2); background: var(--glass-2); border-radius: 12px; padding: 7px 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; min-width: 0; transition: background .2s, transform .22s var(--spring); }
.pa-stage:hover:not([disabled]) { background: var(--hover); }
.pa-stage:active:not([disabled]) { transform: scale(.97); }
.pa-stage[disabled] { cursor: default; opacity: .55; }
.pa-stage b { font-size: 18px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pa-stage span { font-size: 10.5px; font-weight: 700; color: var(--txt-dim); line-height: 1.2; }
/* v0.4.2: on a laptop each stage cell is about 60px, and "Interviewed" needed 69. Tighter padding and type keep it inside. */
.pa-stage { min-width: 0; padding-left: 2px; padding-right: 2px; }
.pa-stage span { font-size: 9.5px; letter-spacing: -.01em; }
.pa-stage.t-warn b { color: var(--ink-warn); }
.pa-stage.t-bad b { color: var(--ink-bad); }
.pa-stage.t-info b { color: var(--ink-info); }
.pa-stage.t-ok b { color: var(--ink-ok); }
.pa-stage.zero b { color: var(--txt-dim); }
.pa-stage:focus { outline: none; }
.pa-stage:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.pa-cap { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--txt-dim); padding: 2px 4px 4px; }
.pa { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px; border-radius: 12px;
  text-decoration: none; color: inherit; transition: background .2s; }
.pa:hover { background: var(--hover); }
.pa .pp { width: 30px; height: 30px; font-size: 11px; }
.pa-main { min-width: 0; }
.pa-name { display: block; font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-sub { display: block; font-size: 11.5px; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pa-st { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; white-space: nowrap; background: var(--field); color: var(--txt-dim); }
.pa-st.t-warn { background: var(--tint-warn); color: var(--ink-warn); }
.pa-st.t-bad { background: var(--tint-bad); color: var(--ink-bad); }
.pa-st.t-info { background: var(--tint-info, var(--field)); color: var(--ink-info); }
.pa-st.t-ok { background: var(--tint-ok); color: var(--ink-ok); }
.pa-w { font-size: 11px; font-weight: 700; color: var(--txt-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pa.old .pa-w { color: var(--ink-bad); }
.pa-list.big .pa { padding: 9px 8px; }
.pa-list.big .pa + .pa { border-top: 1px solid var(--stroke-2); border-radius: 0; }
@media (max-width: 520px) { .pa-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Admin (v0.3.0) ---------- */
.users-tbl tr.off td { opacity: .55; }
.users-tbl td { vertical-align: middle; }
/* The name sits beside the photo; it sizes to its words so a long surname never spills out of the cell on a phone. */
.users-tbl td.inline > span { flex: 0 1 auto; min-width: min-content; }
.sys-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 13px; }
.sys-grid .lbl { color: var(--txt-dim); font-weight: 700; }
#u-cal-wrap .skel.row { height: 38px; }

/* ---------- Inbox problems (v0.3.5) ---------- */
.mail-detail { margin: 8px 2px 0; line-height: 1.4; overflow-wrap: anywhere; }
.mail-detail .mono { font-size: 11.5px; }
.mail-issues { display: grid; gap: 10px; }
.mail-issue { padding: 10px 12px; border-radius: 12px; background: var(--field); border: 1px solid var(--stroke-2); min-width: 0; }
.mail-issue-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.mail-issue-head b { overflow-wrap: anywhere; }
.mail-issue-head .muted { margin-left: auto; font-size: 12px; white-space: nowrap; }
.mail-issue p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .users-tbl th:nth-child(2), .users-tbl td:nth-child(2), .users-tbl th:nth-child(5), .users-tbl td:nth-child(5) { display: none; }
}

/* ---------- Year at a glance ---------- */
.yr { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; }
.ym { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding: 4px 0; border-radius: 12px; min-width: 0; }
.ym:hover { background: var(--hover); }
.ym .c { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ym .c.bad { color: var(--ink-bad); }
.ym-bar { width: min(28px, 70%); height: 88px; border-radius: 8px; background: var(--field); border: 1px solid var(--stroke-2); display: flex; flex-direction: column-reverse; overflow: hidden; }
.ym-bar i { display: block; width: 100%; }
.ym-bar .done { background: var(--grass); }
.ym-bar .open { background: var(--sky); opacity: .85; }
.ym-bar .late { background: var(--rose); }
.ym .m { font-size: 11.5px; font-weight: 750; color: var(--txt-dim); }
.ym.current .m { color: var(--txt); }
.ym.current .ym-bar { box-shadow: 0 0 0 2px var(--green); }
.ym.past { opacity: .72; }
.ym.sel { background: var(--tint-info); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; color: var(--txt-dim); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Team ---------- */
.people .bar-row { grid-template-columns: 136px minmax(0, 1fr) 54px; cursor: pointer; margin: 5px 0; }
.people .bar-row:hover .nm { color: var(--green); }
.people .bar-row .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.people .bar-row .who .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.people .bar-row .who .pp { flex: 0 0 22px; }
.people .bar-row .who .pp.role { opacity: .75; }
.people .bar { display: flex; }
.people .bar span { flex: 0 0 auto; border-radius: 0; }
.people .bar span:first-child { border-radius: 999px 0 0 999px; }
.people .bar span:last-child { border-radius: 0 999px 999px 0; }
.people .bar span:only-child { border-radius: 999px; }
.people .bar .late { background: linear-gradient(90deg, var(--rose), #ff8f8e); }
.people .bar .ontime { background: linear-gradient(90deg, var(--green), var(--grass)); }
.people .bar-row .cnt { text-align: right; font-weight: 800; white-space: nowrap; }
.people .bar-row .cnt em { font-style: normal; color: var(--ink-bad); font-weight: 800; }
.people .bar-row .cnt em::before { content: ' '; }
.team-stuck { margin-bottom: 10px; }
.ok-line { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink-ok); padding: 8px 10px; border-radius: 12px; background: var(--tint-ok); margin-bottom: 10px; }

/* ---------- Quick links ---------- */
.dock { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dock a { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 14px; text-decoration: none; color: inherit; min-width: 0;
  border: 1px solid var(--stroke-2); background: var(--field); transition: transform .22s var(--spring), background .2s; }
.dock a:hover { transform: translateY(-2px); background: var(--hover); }
.dock .w-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(150deg, var(--tint-ok), var(--glass-2)); color: var(--ink-ok); }
.dock strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Search and jump (the palette) ---------- */
.modal.pal-modal { width: min(640px, 100%); padding: 12px; align-self: start; margin-top: 11vh; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; border-bottom: 1px solid var(--stroke-2); color: var(--txt-dim); }
.pal-in input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; outline: none; font: 600 17px/1.3 var(--font); color: var(--txt); padding: 4px 0; }
.pal-list { max-height: 54vh; overflow-y: auto; padding: 6px 2px 2px; }
.pal-g { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--txt-dim); padding: 10px 10px 4px; }
.pal-i { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; min-width: 0; }
.pal-i .t { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pal-i .s { margin-left: auto; color: var(--txt-dim); font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42%; flex: 0 0 auto; }
.pal-i.on { background: var(--hover); box-shadow: inset 3px 0 0 var(--green); }
.pal-none { padding: 22px 10px; text-align: center; color: var(--txt-dim); font-weight: 650; }
.pal-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 10px 8px 2px; border-top: 1px solid var(--stroke-2); margin-top: 6px; font-size: 11.5px; font-weight: 650; color: var(--txt-dim); }

/* ---------- Skeletons ---------- */
.skel { border-radius: 12px; background: linear-gradient(90deg, var(--field), var(--hover), var(--field));
  background-size: 200% 100%; animation: skelslide 1.4s linear infinite; height: 14px; margin: 8px 0; }
.skel.row { height: 34px; }
@keyframes skelslide { 0% { background-position: 120% 0; } 100% { background-position: -20% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ---------- Narrower laptops and iPad landscape ---------- */
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-main, .b-side { display: contents; }
  .b-tasks { grid-column: span 12; order: 1; }
  .b-mail { grid-column: span 6; order: 2; }
  .b-hubs { grid-column: span 6; order: 3; }
  .b-pending { grid-column: span 12; order: 4; }
  .b-year { grid-column: span 12; order: 4; }
  .b-team { grid-column: span 12; order: 5; }
  .b-links { grid-column: span 12; order: 6; }
}

/* ---------- Phone and iPad portrait ---------- */
@media (max-width: 760px) {
  .hub-top { margin-bottom: 12px; padding: 12px 16px; }
  .hub-actions { width: 100%; }
  .kbar { min-width: 0; flex: 1 1 auto; }
  .kbar kbd { display: none; }
  .kpis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 0 14px; padding: 2px 2px 6px; scrollbar-width: none; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { flex: 0 0 44%; scroll-snap-align: start; }
  .b-mail, .b-hubs, .b-pending { grid-column: span 12; }
  .tl { grid-template-columns: 16px minmax(0, 1fr); align-items: start; row-gap: 4px; }
  .tl .sd { margin-top: 3px; }
  .tl-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tl-meta { grid-column: 2; justify-content: flex-start; }
  .tl-due { min-width: 0; text-align: left; order: -1; }
  .yr { gap: 4px; }
  .ym .c { font-size: 11px; }
  .ym .m { font-size: 10.5px; }
  .ym-bar { height: 64px; }
  .people .bar-row { grid-template-columns: 120px minmax(0, 1fr) 50px; }
  .dock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal.pal-modal { margin-top: 0; align-self: end; }
}
@media (pointer: coarse) {
  .kbar kbd { display: none; }
  .tl, .ib, .dock a, .app-head, .hl, .pa, .pa-stage, .pal-i { min-height: 44px; }
  .seg button { min-height: 36px; }
  .side-links .side-item, .side-nav a.side-item { min-height: 44px; }
  .people .bar-row { min-height: 36px; }
}
/* ---------- Camper capacity (v0.4.0) ----------
   Colour follows Phil's Capacity Hub: green under 60%, orange from 60%, red when full or over. */
.cap-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; gap: 10px; margin: 0 0 14px; padding: 8px;
  border-radius: 20px; border: 1px solid var(--stroke); background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  box-shadow: var(--shadow), inset 0 1px 0 var(--spec); min-height: 62px; }
.cap-strip .cs-skel { height: 44px; margin: 0; grid-column: 2 / 4; }
.cs-head { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 4px 10px; border: 0; background: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer; border-radius: 14px; min-width: 0; transition: background .2s; }
.cs-head:hover { background: var(--hover); }
.cs-t { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.cs-f { font-size: 11px; font-weight: 650; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.cs-sessions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.cs-s { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "b b" "n n"; align-items: baseline; gap: 2px 8px; padding: 7px 11px;
  border-radius: 14px; border: 1px solid var(--stroke-2); background: var(--glass-2); font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0;
  transition: background .2s, transform .22s var(--spring); }
.cs-s:hover { background: var(--hover); transform: translateY(-1px); }
.cs-l { grid-area: l; font-size: 11.5px; font-weight: 750; color: var(--txt-dim); white-space: nowrap; }
.cs-v { grid-area: v; font-size: 17px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cs-bar { grid-area: b; height: 5px; border-radius: 99px; background: var(--field); overflow: hidden; margin: 2px 0 1px; }
.cs-bar i { display: block; height: 100%; border-radius: 99px; background: var(--grass); transition: width .6s var(--ease); }
.cs-n { grid-area: n; font-size: 11px; font-weight: 650; color: var(--txt-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-s.t-warn .cs-bar i { background: var(--sun); }
.cs-s.t-warn .cs-v { color: var(--ink-warn); }
.cs-s.t-bad .cs-bar i { background: var(--rose); }
.cs-s.t-bad .cs-v { color: var(--ink-bad); }
.cs-alert { display: grid; grid-template-columns: auto auto; align-content: center; gap: 0 6px; padding: 6px 14px; border-radius: 14px; border: 0; font: inherit; cursor: pointer;
  background: var(--tint-ok); color: var(--ink-ok); white-space: nowrap; transition: transform .22s var(--spring); }
.cs-alert:hover { transform: translateY(-1px); }
.cs-alert b { font-size: 15px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.cs-alert span { font-size: 11.5px; font-weight: 750; align-self: center; }
.cs-alert.bad { background: var(--tint-bad); color: var(--ink-bad); }
.cs-alert.warn { background: var(--tint-warn); color: var(--ink-warn); }
.cs-alert.ok { display: flex; align-items: center; gap: 6px; }

.cap-block-host:empty { display: none; }
.cap-block-host .app-block { margin-top: 10px; }
.app-stat .note.plain { color: var(--txt-dim); }
button.hl { width: 100%; font: inherit; color: inherit; text-align: left; border: 0; background: transparent; cursor: pointer; }
.cap-al.over .hl-w { color: var(--ink-bad); }
.cap-al.almost .hl-w { color: var(--ink-warn); }

.cap-page .cap-rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.cap-page .cap-rings .card { margin-top: 0; }
.cap-skel { height: 250px; margin: 0; border-radius: 22px; }
.cap-ring { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 14px 16px; }
.cr-svg { position: relative; width: 120px; height: 120px; margin-bottom: 4px; }
.cr-svg svg { display: block; }
.cr-track { stroke: var(--field); }
.cr-fill { stroke: var(--grass); transition: stroke-dasharray .8s var(--ease); }
.cap-ring.t-warn .cr-fill { stroke: var(--sun); }
.cap-ring.t-bad .cr-fill { stroke: var(--rose); }
.cr-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 25px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cap-ring h3 { margin: 2px 0 0; font-size: 16px; }
.cr-n { font-size: 13px; color: var(--txt-dim); font-weight: 650; font-variant-numeric: tabular-nums; }
.cr-n b { font-size: 19px; color: var(--txt); font-weight: 800; }
.cr-st { font-size: 11px; font-weight: 800; margin-top: 2px; border-color: transparent; }
.cr-st.t-ok { background: var(--tint-ok); color: var(--ink-ok); }
.cr-st.t-warn { background: var(--tint-warn); color: var(--ink-warn); }
.cr-st.t-bad { background: var(--tint-bad); color: var(--ink-bad); }
.cr-split { width: 100%; max-width: 170px; height: 6px; border-radius: 99px; background: var(--grass); overflow: hidden; margin-top: 8px; }
.cr-split i { display: block; height: 100%; background: var(--sun); }
.cr-sub { font-size: 11.5px; font-weight: 650; color: var(--txt-dim); }

.cap-alerts { margin-bottom: 16px; }
.cap-list { display: flex; flex-direction: column; }
.cap-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 6px; }
.cap-row + .cap-row { border-top: 1px solid var(--stroke-2); }
.cap-ic { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.cap-row.over .cap-ic { background: var(--tint-bad); color: var(--ink-bad); }
.cap-row.almost .cap-ic { background: var(--tint-warn); color: var(--ink-warn); }
.cap-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cap-prog { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--txt-dim); }
.cap-t { font-size: 13.5px; font-weight: 750; overflow-wrap: anywhere; }
.cap-s { font-size: 12px; color: var(--txt-dim); font-weight: 600; }
.cap-n { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cap-n em { font-style: normal; font-size: 12px; color: var(--txt-dim); font-weight: 700; }
.cap-row.over .cap-n { color: var(--ink-bad); }
.cap-row.almost .cap-n { color: var(--ink-warn); }

.cap-progs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.cap-progs .card { margin-top: 0; }
.cp-tot { font-size: 12.5px; color: var(--txt-dim); font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cp-tot b { font-size: 18px; color: var(--txt); font-weight: 800; }
.cp-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) 82px; gap: 10px; align-items: center; margin: 7px 0; font-size: 12.5px; }
.cp-l { font-weight: 700; color: var(--txt-dim); white-space: nowrap; }
.cp-bar { height: 9px; border-radius: 99px; background: var(--field); overflow: hidden; border: 1px solid var(--stroke-2); }
.cp-bar i { display: block; height: 100%; background: var(--grass); border-radius: 99px; }
.cp-bar.t-warn i { background: var(--sun); }
.cp-bar.t-bad i { background: var(--rose); }
.cp-n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.cap-side > .card + .card { margin-top: 16px; }
.cg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cg > div { padding: 10px 12px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--stroke-2); min-width: 0; }
.cg .n { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cg .l { display: block; font-size: 12px; font-weight: 750; }
.cg .s { display: block; font-size: 11.5px; color: var(--txt-dim); font-weight: 600; }

@media (max-width: 1240px) {
  .cap-strip { grid-template-columns: minmax(0, 1fr) auto; }
  .cap-strip .cs-sessions { grid-column: 1 / -1; grid-row: 2; }
  .cap-strip .cs-skel { grid-column: 1 / -1; }
  .cap-page .cap-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap-progs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* On a phone the strip stays one row of four, so the tasks are not pushed off the first screen. */
  .cap-strip { margin-bottom: 12px; padding: 6px; gap: 6px; min-height: 0; }
  .cs-sessions { gap: 5px; }
  .cs-s { padding: 6px 7px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "l" "v" "b"; gap: 1px; }
  .cs-l { font-size: 10.5px; }
  .cs-v { font-size: 15px; }
  .cs-n { display: none; }
  .cs-head { padding: 2px 6px; }
  .cs-alert { padding: 4px 10px; }
  .cs-f { max-width: 150px; }
  .cap-page .cap-rings { gap: 10px; }
  .cap-ring { padding: 14px 8px 12px; }
  .cr-svg, .cr-svg svg { width: 96px; height: 96px; }
  .cr-pct { font-size: 21px; }
  .cap-progs { grid-template-columns: 1fr; }
  .cp-row { grid-template-columns: 62px minmax(0, 1fr) 76px; }
}
@media (pointer: coarse) {
  .cs-s, .cs-head, .cs-alert, button.hl { min-height: 44px; }
}

/* =====================================================================
   Firebase version (new with the static web app). Styles.css stays
   byte-identical to the baseline, so the sign-in screen and the Connect
   Google pieces live here, on the same tokens.
   ===================================================================== */

/* ---------- Sign-in (ported from Interview Hub's styles.css) ----------
   html.auth-out is set before first paint when nobody is signed in (index.html), so the app chrome never flashes;
   the app below stays hidden until the sign-in is confirmed. */
.signin { display: none; }
html.auth-out .signin {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
html.auth-out .shell, html.auth-out #activity, html.auth-out #toast-root, html.auth-out #notif-root,
html.auth-out #drawer-root, html.auth-out #modal-root { display: none !important; }
.signin-card { width: min(440px, 100%); margin: auto; padding: 34px 28px 22px; border-radius: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.signin-card > * { position: relative; z-index: 1; }
.signin-logo { display: flex; justify-content: center; margin-bottom: 14px; min-height: 112px; }
.signin-logo .mark { width: 112px; height: 112px; border-radius: 34px; font-size: 38px; }
.signin-card h1 { font-size: 40px; line-height: 1.05; }
.signin-card .eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; color: var(--txt-dim); margin: 8px 0 24px; }
.signin-btn { width: 100%; justify-content: center; min-height: 50px; font-size: 16px; border-radius: 16px; gap: 10px; }
.signin-btn.busy, .signin-btn:disabled { opacity: .78; cursor: progress; transform: none; }
.signin-g { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); flex: 0 0 auto; }
.signin-msg { width: 100%; margin-top: 14px; text-align: left; }
html.auth-out .signin-card > * { animation: rise .55s var(--ease) both; }
html.auth-out .signin-card > :nth-child(2) { animation-delay: 60ms; }
html.auth-out .signin-card > :nth-child(3) { animation-delay: 90ms; }
html.auth-out .signin-card > :nth-child(4) { animation-delay: 110ms; }
html.auth-out .signin-card > .signin-btn { animation: pop .5s var(--spring) 130ms both; }
html.auth-out .signin-card > .signin-msg:not([hidden]) { animation: fadeUp .42s var(--ease) both; }
@media (max-width: 760px) { .signin-card { padding: 28px 20px 18px; } .signin-card h1 { font-size: 34px; } .signin-logo { min-height: 96px; } }
@media (pointer: coarse) { .signin-card { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); } }
@media (prefers-reduced-motion: reduce) { html.auth-out .signin-card > * { animation: none !important; } }
@media print { .signin { display: none !important; } }

/* No Access: the sign-in card shows a red X and the baseline deny page's words, with Use a Different Account. */
.signin-x { display: none; }
.signin-body[hidden] { display: none; }
.signin-body { font-size: 15px; line-height: 1.5; color: var(--txt-dim); margin: -8px 0 6px; }
.signin-body p { margin: 0 0 8px; }
.signin-body strong { color: var(--txt); overflow-wrap: anywhere; }
html.auth-noaccess .signin-card h1 { font-size: 26px; line-height: 1.2; }
html.auth-noaccess .signin-card .eyebrow { margin-bottom: 16px; }
html.auth-noaccess .signin-logo { display: none; }
html.auth-noaccess .signin-x { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; margin: 4px auto 18px; color: #fff; background: linear-gradient(160deg, #EE6A69, var(--rose, #E2504F)); box-shadow: 0 14px 34px rgba(226,80,79,.38), inset 0 1px 0 rgba(255,255,255,.35); }
html.auth-noaccess .signin-btn { display: none; }
.signin-other { display: none; }
html.auth-noaccess .signin-other { display: inline-block; margin-top: 14px; background: none; border: 0; padding: 6px 8px; font: inherit; font-size: 13.5px; color: var(--txt-dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html.auth-noaccess .signin-other:hover { color: var(--txt); }
html.auth-out.auth-noaccess .signin-card > .signin-x { animation: pop .5s var(--spring) both; }

/* ---------- Connect Google ---------- */
.gah-google:empty { display: none; }
.gah-google .side-item { width: 100%; text-align: left; font-size: 12.5px; color: var(--txt-dim); }
.gah-connect p { margin: 0 0 6px; }
.gah-connect .card-foot { margin-top: 8px; }

/* Disconnect Google: a quiet link under the Inbox card's content */
.gah-disc { margin-top: 6px; text-align: right; }
.gah-disc .linkish { font-size: 11.5px; font-weight: 650; color: var(--txt-dim); }
