/* Royal Horizon HR prototype. Mobile first; the desktop frame (navy sidebar) starts at 861px.
   Values come from tokens.css. */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--canvas); scroll-padding-top: calc(var(--top) + var(--s4)); }
html.locked { overflow: hidden; }
body { margin: 0; font-family: var(--font); font-size: var(--t-m); line-height: 1.5; color: var(--text); background: var(--canvas); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-optical-sizing: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
q { quotes: "“" "”"; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-s); }
.start, .side, .toast, .si-brand { --focus: var(--accent-on-navy); }
[tabindex="-1"]:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: var(--s2); z-index: 99; padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--navy); color: var(--on-navy); }
.skip:focus { left: var(--s2); }
.num { font-variant-numeric: tabular-nums; font-stretch: var(--w-wide); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.num-s { font-variant-numeric: tabular-nums; font-stretch: var(--w-wide); font-weight: 700; color: var(--ink); }

/* Buttons: feedback lands on press, not release (apple-design §1) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s5); border: 0; border-radius: var(--r-ctl); font-weight: 650; font-size: var(--t-m); line-height: 1.2; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-press) ease-out, box-shadow var(--t-press) ease-out; }
.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--navy); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn-quiet:hover { background: var(--sunk); }
.btn-no { background: transparent; color: var(--no-fg); }
.btn-no:hover { background: var(--no-bg); }
.btn-danger { background: var(--no-fg); color: var(--on-navy); }   /* only for steps that can't be taken back */
.btn-danger:hover { background: var(--no-strong); }
.confirm-list { display: grid; gap: var(--s2); margin: var(--s3) 0 var(--s4); padding-left: var(--s5); list-style: disc; }
.btns { display: flex; flex-wrap: wrap; gap: var(--s2); }
.btn-s { padding: 0 var(--s3); font-size: var(--t-s); }
.btn-s .ic { width: 16px; height: 16px; }
.hide-m { display: none; }
.icon-btn { position: relative; display: grid; place-items: center; width: var(--tap); height: var(--tap); flex: none; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink); transition: background-color var(--t-press) ease-out, transform var(--t-press) var(--ease-out); }
.icon-btn:hover { background: var(--sunk); }
.icon-btn:active { transform: scale(0.92); }
.me-btn { width: auto; height: auto; min-width: var(--tap); min-height: var(--tap); }   /* grows with the avatar at large text */
.link { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); color: var(--ink); font-weight: 650; font-size: var(--t-s); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:active { opacity: 0.6; }
button.link { gap: var(--s1); padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
button.link .ic { width: 16px; height: 16px; }

/* Avatars */
.av { display: inline-grid; place-items: center; flex: none; width: var(--av); height: var(--av); border-radius: 50%; background: var(--with-bg); color: var(--navy); font-weight: 700; font-size: var(--t-s); font-stretch: var(--w-wide); letter-spacing: 0.02em; }
.av.s { width: 2rem; height: 2rem; font-size: var(--t-xs); }
.av.l { width: 3rem; height: 3rem; font-size: var(--t-m); }
.av.xl { width: 4rem; height: 4rem; font-size: var(--t-h3); background: var(--navy); color: var(--on-navy); }

/* Chips say where a request is. Gold only when the next move is yours. */
.chip { display: inline-flex; align-items: center; gap: var(--s15); min-height: 28px; padding: var(--s05) var(--s25); border-radius: var(--r-chip); font-size: var(--t-s); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.chip.needs { background: var(--needs-bg); color: var(--needs-fg); }
.chip.with { background: var(--with-bg); color: var(--with-fg); }
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip.no { background: var(--no-bg); color: var(--no-fg); }
.chip.quiet { background: var(--quiet-bg); color: var(--quiet-fg); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 var(--s15); border-radius: var(--r-chip); background: var(--accent); color: var(--navy); font-size: var(--t-xs); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }

/* Start screen */
.start { position: relative; min-height: 100svh; overflow: hidden; background: var(--navy); color: var(--on-navy); }
.start-in { position: relative; z-index: 1; max-width: 640px; padding: var(--s8) var(--s4) var(--s10); }
.start-logo { width: 150px; height: auto; }
.start h1 { margin-top: clamp(2.5rem, 8vh, 4.5rem); font-size: var(--t-hero); line-height: 1.02; letter-spacing: -0.03em; font-weight: 760; font-stretch: var(--w-wide); color: var(--on-navy); }
.start-lede { margin-top: var(--s4); max-width: 46ch; font-size: var(--t-l); color: var(--on-navy-mute); }
.start-list { display: grid; gap: var(--s2); margin-top: var(--s8); }
.start-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s4); width: 100%; min-height: 84px; padding: var(--s4); border: 0; border-radius: var(--r-panel); background: var(--navy-2); color: var(--on-navy); text-align: left; transition: background-color var(--t-press) ease-out, transform var(--t-press) var(--ease-out); }
.start-pick:hover { background: var(--navy-3); }
.start-pick:active { transform: scale(0.98); }
.start-pick .av { background: var(--accent); color: var(--navy); }
.sp-main { min-width: 0; }
.sp-main b { display: block; font-size: var(--t-l); font-weight: 650; }
.sp-main span { display: block; font-size: var(--t-s); color: var(--on-navy-mute); }
.sp-main small { display: block; margin-top: var(--s05); font-size: var(--t-note); color: var(--on-navy); }
.start-pick > .ic { color: var(--on-navy-mute); }
.start-try { margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--on-navy-line); }
.start-try h2 { font-size: var(--t-m); font-weight: 650; }
.start-try ol { margin-top: var(--s2); padding-left: 1.25rem; list-style: decimal; color: var(--on-navy-mute); }
.start-try li { padding: var(--s05) 0; }
.start-try li::marker { color: var(--accent); font-weight: 700; }
.start-foot { margin-top: var(--s6); font-size: var(--t-note); color: var(--on-navy-mute); }
.start-portal { margin-top: var(--s6); font-size: var(--t-note); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
a.start-pick { text-decoration: none; }
/* Demo: on every screen, so a demo on Nova's own addresses is never taken for the live system */
.demo-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.5; color: var(--accent); white-space: nowrap; }
.top-demo { margin-left: calc(-1 * var(--s1)); flex: none; }
.start-mark { display: none; }

/* Frame: phone first */
.shell { min-height: 100svh; }
.side { display: none; }
.main { min-width: 0; overflow-x: clip; }   /* tab slides never push the page sideways */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s1); height: var(--top-m); padding: 0 var(--s2) 0 var(--s3); background: var(--canvas-glass); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
.top::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(var(--edge), transparent); opacity: 0; transition: opacity var(--t-out) ease-out; pointer-events: none; }
.top.scrolled::after { opacity: 1; }
.top-mark { display: grid; place-items: center; width: var(--tap); height: var(--tap); flex: none; }
.top-mark img { width: 24px; height: auto; }
.top:has(.back-link) .top-mark, .top:has(.back-link) .top-demo { display: none; }
.back-link { display: inline-flex; align-items: center; gap: var(--s05); min-height: var(--tap); padding-right: var(--s2); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.back-link:active { opacity: 0.6; }
.top-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; color: var(--ink); opacity: 0; transform: translateY(4px); transition: opacity var(--t-out) ease-out, transform var(--t-out) ease-out; }
.top.scrolled .top-title { opacity: 1; transform: none; }
.top:has(.back-link) .top-title { display: none; }
.grow { flex: 1; }
/* The desktop header bar (Royal Horizon's wireframes): where you are and the title on the left, search, bell and you on the right. */
.top-t { display: none; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; font-size: var(--t-s); color: var(--mute); }
.crumbs li + li::before { content: "›"; margin: 0 var(--s2); }
.crumbs a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); margin: calc((1.25rem - var(--tap)) / 2) 0; color: var(--mute); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color var(--t-press) ease-out, text-decoration-color var(--t-press) ease-out; }
.crumbs a:hover { color: var(--ink); text-decoration-color: currentColor; }
.crumbs a:active { opacity: 0.6; }
.top-h { font-size: var(--t-xl); line-height: 1.15; letter-spacing: -0.02em; font-weight: 720; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
.offline { display: inline-flex; align-items: center; gap: var(--s15); padding: var(--s1) var(--s25); border-radius: var(--r-chip); background: var(--quiet-bg); color: var(--quiet-fg); font-size: var(--t-xs); font-weight: 600; }
.offline .ic { width: 16px; height: 16px; }
.bell .count { position: absolute; top: 4px; right: 2px; display: grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 var(--s1); border-radius: var(--r-chip); background: var(--navy); color: var(--on-navy); font-size: var(--t-xs); font-weight: 700; box-shadow: 0 0 0 2px var(--canvas); }
.me-btn .av { width: 34px; height: 34px; background: var(--navy); color: var(--on-navy); }

.content { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-content: start; width: 100%; max-width: var(--max); padding: var(--s2) var(--s4) calc(var(--tabs) + var(--act-space) + env(safe-area-inset-bottom)); }
.page-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding-top: var(--s1); }
.page-t { flex: 1 1 15rem; min-width: 0; }
.page-t h1 { font-size: var(--t-xl); line-height: 1.12; letter-spacing: -0.02em; font-weight: 720; color: var(--ink); text-wrap: balance; }
.page-t p { margin-top: var(--s1); color: var(--mute); }
.page-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }

/* Bottom tabs: a translucent layer the page scrolls under (§12) */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; padding: 0 var(--s1) env(safe-area-inset-bottom); background: var(--surface-glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 -1px 0 var(--line); }
.tab { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s05); min-height: var(--tabs); padding: 0 var(--s05); color: var(--mute); text-decoration: none; font-size: var(--t-xs); font-weight: 600; transition: color var(--t-press) ease-out; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab .ic { width: 24px; height: 24px; transition: transform var(--t-press) var(--ease-out); }
.tab:active .ic { transform: scale(0.88); }
.tab[aria-current] { color: var(--ink); }
.tab[aria-current] .ic { stroke-width: 2.2; }
.tab .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; height: 20px; }
/* em media queries follow the reader's own text size, so this kicks in when big text meets a narrow phone */
@media (max-width: 19em) {
  .tab span:not(.sr) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tab .ic { width: 28px; height: 28px; }
}
.act-bar { position: fixed; left: var(--s4); right: var(--s4); bottom: calc(var(--tabs) + var(--s3) + env(safe-area-inset-bottom)); z-index: 25; max-width: 30rem; margin: 0 auto; }
.act-bar .btn { width: 100%; min-height: 52px; box-shadow: var(--shadow-float); }

/* Layout. Grid children may shrink below their content (wide calendars scroll inside their own box). */
.cols, .col-main, .col-side, .grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-content: start; min-width: 0; }
.content > *, .cols > *, .col-main > *, .col-side > *, .grid2 > *, .dp > *, .split > * { min-width: 0; }

/* Panels rest on a border; only floating things get a shadow */
.panel { min-width: 0; overflow: clip; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.panel.pad { padding: var(--s5); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s5) 0; }
.panel-h h2, .h-sm { font-size: var(--t-l); font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.panel.pad > .h-sm { margin-bottom: var(--s4); }
.h-xs { margin-bottom: var(--s3); font-size: var(--t-s); font-weight: 650; color: var(--mute); }
.panel-empty { padding: var(--s1) var(--s5) var(--s5); color: var(--mute); }
.panel.pad .panel-empty { padding: 0; }
.panel-line { padding: var(--s1) var(--s5) var(--s3); }
.panel-sub { margin-top: var(--s1); max-width: 62ch; font-size: var(--t-note); color: var(--mute); }
.panel.pad > .h-sm:has(+ .panel-sub) { margin-bottom: 0; }
.panel.pad > .panel-sub { margin-bottom: var(--s4); }
.panel-h.flush { min-height: 0; padding: 0 0 var(--s3); }
.pad-x { padding: 0 var(--s5) var(--s3); }
.panel-foot { padding: var(--s3) var(--s5) var(--s4); border-top: 1px solid var(--line); font-size: var(--t-note); color: var(--mute); }
.count-b { min-width: 28px; padding: var(--s05) var(--s2); border-radius: var(--r-chip); background: var(--quiet-bg); color: var(--quiet-fg); font-size: var(--t-s); font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }

/* Rows */
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s1) var(--s3); min-height: 64px; padding: var(--s3) var(--s5); color: inherit; text-decoration: none; transition: background-color var(--t-press) ease-out; }
.row > .chip, .row > .row-mid, .row > .row-end { grid-column: 2; justify-self: start; }
a.row:hover { background: var(--canvas); }
a.row:active { background: var(--sunk); }
a.row:focus-visible, .prow:focus-visible { outline-offset: -3px; }
.tico { display: grid; place-items: center; width: var(--av); height: var(--av); border-radius: var(--r-ctl); background: var(--canvas); color: var(--navy); }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-main b { overflow-wrap: anywhere; font-weight: 600; color: var(--ink); }   /* names wrap, never truncate */
.row-main span { font-size: var(--t-s); color: var(--mute); }
.row-mid { font-size: var(--t-s); }
.row-mid.away { color: var(--with-fg); font-weight: 600; }
.row-end { font-size: var(--t-s); color: var(--mute); }

.mini, .dates { display: grid; gap: var(--s3); padding: var(--s1) var(--s5) var(--s5); }
.mini li, .dates li { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.mini b, .dates b { display: block; font-weight: 600; color: var(--ink); }
.mini span span, .dates span span { display: block; font-size: var(--t-s); color: var(--mute); }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 46px; height: 50px; border-radius: var(--r-ctl); background: var(--canvas); line-height: 1.1; }
.date-tile small { font-size: var(--t-xs); color: var(--mute); }
.dates .date-tile b { font-size: var(--t-h4); font-weight: 700; font-stretch: var(--w-wide); font-variant-numeric: tabular-nums; }

/* Today */
.lead { max-width: 32ch; font-size: var(--t-lead); line-height: 1.3; letter-spacing: -0.015em; font-weight: 450; color: var(--ink); text-wrap: pretty; }
.lead b { font-weight: 750; font-stretch: var(--w-wide); }
.lead.lead-s { max-width: none; font-size: var(--t-h3); }
.lead-block .btns { margin-top: var(--s4); }

/* Balances */
.bals { display: grid; }
.bal { display: grid; align-content: start; gap: var(--s2); padding: var(--s5); }
.bal + .bal { border-top: 1px solid var(--line); }
.bal-t { font-weight: 650; color: var(--ink); }
.bal-n { display: flex; align-items: baseline; gap: var(--s2); }
.bal-n .num { font-size: var(--t-2xl); }
.bal.big .bal-n .num { font-size: var(--t-num); }
.bal-n span { color: var(--mute); }
.bar { display: flex; height: 8px; overflow: hidden; border-radius: var(--r-chip); background: var(--sunk); }
.bar i { display: block; height: 100%; }
.bar .used { background: var(--navy); }
.bar .asked, .c.asked { background: repeating-linear-gradient(108deg, var(--navy-3) 0 2px, var(--with-bg) 2px 6px); }
.bal-k { font-size: var(--t-s); color: var(--mute); }

/* The trail. Connectors are two parallel rails, like the logo's. */
.trail-wrap { container-type: inline-size; }
.trail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.step { position: relative; display: flex; flex-direction: column; gap: var(--s05); min-width: 0; padding-top: calc(var(--node) + var(--s25)); }
.step .node { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: var(--node); height: var(--node); border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); color: var(--on-navy); }
.step .node .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.step::after { content: ""; position: absolute; top: 10px; left: 34px; right: calc(8px - var(--s3)); height: 6px; border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
.step:last-child::after { display: none; }
.step.done .node { background: var(--navy); box-shadow: none; }
.step.done::after { border-color: var(--navy); }
.step.now .node { box-shadow: inset 0 0 0 2px var(--navy); }
.step.now .node::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); }
.step.needs .node { background: var(--accent); box-shadow: none; color: var(--navy); }
.step.needs:not(.back) .node::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); }
.step.back:not(.needs) .node { background: var(--with-bg); box-shadow: inset 0 0 0 2px var(--navy); color: var(--navy); }
.step.stop .node { background: var(--no-fg); box-shadow: none; }
.step b { font-weight: 650; color: var(--ink); }
.step.needs b { color: var(--needs-fg); }
.step-who { color: var(--text); }
.step time { font-size: var(--t-s); color: var(--mute); }
.step.todo b, .step.todo .step-who { color: var(--mute); }
.step q { margin-top: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--canvas); font-size: var(--t-note); color: var(--text); }
@container (max-width: 33.75em) {
  .trail { grid-template-columns: 1fr; gap: 0; }
  .step { padding: var(--s05) 0 var(--s5) calc(var(--node) + var(--s4)); }
  .step:last-child { padding-bottom: 0; }
  .step::after { top: 32px; bottom: 4px; left: 10px; right: auto; width: 6px; height: auto; border: 0; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line); }
  .step.done::after { border-color: var(--navy); }
}

/* Facts */
.facts { display: grid; }
.facts > div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.facts > div:first-child { padding-top: 0; border-top: 0; }
.facts > div:last-child { padding-bottom: 0; }
.facts dt { padding-top: var(--s05); font-size: var(--t-s); color: var(--mute); }
.facts dd { font-weight: 500; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.facts dd small { display: block; font-size: var(--t-note); font-weight: 400; color: var(--mute); }
.facts dd a { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.brk { overflow-wrap: anywhere; }
.notice { display: flex; align-items: flex-start; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-ctl); background: var(--with-bg); color: var(--with-fg); font-size: var(--t-note); }
.notice .ic { width: 18px; height: 18px; margin-top: var(--s05); }
.fine { margin-top: var(--s4); font-size: var(--t-note); color: var(--mute); }

/* Tabs: pills; the current one is navy, as in Royal Horizon's wireframes */
.seg { display: flex; flex-wrap: wrap; gap: var(--s2); max-width: 100%; }
.seg a { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--r-chip); color: var(--mute); font-size: var(--t-m); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color var(--t-press) ease-out, color var(--t-press) ease-out; }
.seg a:hover { background: var(--sunk); color: var(--ink); }
.seg a:not([aria-current]):active { background: var(--line); color: var(--ink); }
.seg a[aria-current] { background: var(--navy); color: var(--on-navy); }
.seg b { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 37.4375em) {
  /* One row that scrolls sideways (owlake-dashboard: Record on phones), fading at the edge while there's more */
  .seg { flex-wrap: nowrap; width: 100%; gap: var(--s1); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg a { flex: 1 0 auto; justify-content: center; padding: 0 var(--s3); font-size: var(--t-m); }
  .rec-acts > * { flex: 1 1 0; }
  .rec-acts > .btn-primary { order: -1; flex-basis: 100%; }   /* the one primary leads, the rest share the row under it */
}
.seg[data-more], .cal-scroll[data-more] { mask-image: linear-gradient(to right, var(--ink) calc(100% - 2.5rem), transparent); }
.nw { white-space: nowrap; }

/* Approvals, laid out as wireframe 03 */
.ap-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.ap-hand { margin-left: auto; }
.deleg { display: flex; flex: 1 1 22rem; align-items: center; gap: var(--s2) var(--s3); min-height: var(--tap); margin: 0; padding: 0 var(--s1) 0 var(--s4); border-radius: var(--r-ctl); background: var(--with-bg); color: var(--with-fg); font-weight: 550; }
.deleg > .ic { flex: none; width: 18px; height: 18px; }
.deleg > span { flex: 1; min-width: 0; }
.btn-in { flex: none; min-height: var(--tap); padding: 0 var(--s3); border: 0; border-radius: var(--r-s); background: transparent; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; transition: background-color var(--t-press) ease-out; }
.btn-in:hover { background: var(--surface); }
.btn-in:active { background: var(--sunk); }
.split { display: grid; gap: var(--s5); align-items: start; }
.split-detail { display: none; }
.split-list { container-type: inline-size; display: grid; gap: var(--s3); align-content: start; }
/* The filter bar (filters.js), the same on every list: a box that filters as you type, then menus.
   One row when it fits; otherwise the box takes its own row and the menus share the next. */
.tools-c { container-type: inline-size; }
.tools { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tools .tools-q { flex: 1 1 10rem; }
.tools input[type="search"], .tools select { min-height: var(--tap); }
.tools select { flex: 0 1 auto; width: auto; max-width: 14rem; }
@container (max-width: 34rem) { .tools .tools-q { flex-basis: 100%; } .tools select { flex: 1 1 0; min-width: 0; max-width: none; } }
@container (max-width: 46rem) { .tools[data-n="3"] .tools-q, .tools[data-n="4"] .tools-q { flex-basis: 100%; } .tools[data-n="3"] select, .tools[data-n="4"] select { flex: 1 1 0; min-width: 0; max-width: none; } }
@container (max-width: 34rem) { .tools[data-n="3"] select, .tools[data-n="4"] select { flex-basis: calc(50% - var(--s1)); } }   /* narrow: two menus a row */
.tools-on { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); font-size: var(--t-s); color: var(--mute); }
.tools-on[hidden], .tools-none[hidden] { display: none; }
.tools-none { padding: var(--s6) var(--s4); border: 1.5px dashed var(--line); border-radius: var(--r-panel); color: var(--mute); text-align: center; }
.panel > .tools-c, .panel > .tools-on { padding: 0 var(--s5) var(--s3); }
.panel > .tools-none { margin: 0 var(--s5) var(--s5); }
@media (hover: hover) and (min-width: 53.8125em) {
  .ap-acts { transition: opacity var(--t-press) ease-out; }
  .ap-item:not(:hover):not(:focus-within):not(:has(.ap-link[aria-current])) .ap-acts { opacity: 0; }
  /* With a mouse the buttons only show on hover, so they lie over the end of the card instead of taking a column:
     the name and detail keep the card's full width (18 Nov 2026, from the Finance and Learning queue cards). */
  @container (min-width: 30rem) {
    .ap-list .ap-item { grid-template-columns: minmax(0, 1fr); }
    .ap-list .ap-acts { position: absolute; top: 50%; right: var(--s4); transform: translateY(-50%); padding-left: var(--s8); background: linear-gradient(to right, transparent, var(--surface) var(--s6)); }
  }
}
.ap-list { container-type: inline-size; display: grid; gap: var(--s3); }
/* A queue card: the whole card opens the request; Approve and Return sit on top of it, on the right when there's room. */
.ap-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: var(--s3) var(--s4); padding: var(--s4) var(--s5); border: 1.5px solid var(--line); border-radius: var(--r-panel); background: var(--surface); transition: border-color var(--t-press) ease-out, background-color var(--t-press) ease-out, transform var(--t-press) var(--ease-out); }
.ap-item:hover { border-color: var(--field); }
.ap-item:has(.ap-link:active) { transform: scale(0.985); }
.ap-item:has(.ap-link[aria-current]) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.ap-item:has(.ap-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.ap-link { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s4); color: inherit; text-decoration: none; }
.ap-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ap-link:focus-visible { outline: none; }
.ap-main { min-width: 0; }
.ap-main b { display: block; overflow-wrap: anywhere; font-size: var(--t-l); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.ap-main > span { display: block; margin-top: var(--s05); font-size: var(--t-s); color: var(--mute); }
.ap-main > .ap-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); margin-top: var(--s2); }
.tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 var(--s25); border-radius: var(--r-chip); background: var(--with-bg); color: var(--with-fg); font-size: var(--t-s); font-weight: 600; }
.ap-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); font-size: var(--t-xs); color: var(--mute); }
.ap-acts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
@container (min-width: 30rem) {
  .ap-item { grid-template-columns: minmax(0, 1fr) auto; }
  .ap-acts { grid-template-columns: repeat(2, minmax(7rem, auto)); }
  .ap-link { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ap-meta { grid-column: auto; flex-direction: column; align-items: flex-end; gap: var(--s15); white-space: nowrap; }
}
.flag { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--t-s); color: var(--needs-fg); font-weight: 650; }
.flag .ic { width: 14px; height: 14px; }

.dp { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding: var(--s5) var(--s6); }
.dp textarea { min-height: 4.5rem; }
.dp .c { height: 22px; }
.dp-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.dp-h h2 { font-size: var(--t-h2); line-height: 1.2; font-weight: 750; letter-spacing: -0.015em; color: var(--ink); }
/* The request as labelled facts: label on the left, value on the right (wireframe 03) */
.dp-facts { display: grid; gap: var(--s3); }
.dp-facts > div { display: grid; grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr); align-items: start; gap: var(--s4); }
.dp-facts dt { color: var(--mute); }
.dp-facts dd { display: flex; align-items: flex-start; justify-content: flex-end; gap: var(--s2); min-width: 0; text-align: right; }
.dp-facts dd b { display: block; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.dp-facts dd small { display: block; font-size: var(--t-note); color: var(--mute); }   /* a line of explanation: 16px on phones */
.dp-facts .ic { flex: none; width: 18px; height: 18px; margin-top: var(--s05); }
.dp-facts .ok .ic { color: var(--ok); }
.dp-facts .warn .ic, .dp-facts .warn dd b { color: var(--needs-fg); }
.dp-facts .info .ic { color: var(--mute); }
.dp-note dd b { font-weight: 500; }
.dp .dp-sh { display: block; margin-bottom: var(--s3); font-size: var(--t-m); font-weight: 700; color: var(--ink); }
.dp .dp-sh .opt { font-size: var(--t-note); font-weight: 400; }
.dp-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.dp-btns .btn { min-height: 48px; padding: 0 var(--s3); }
.dp { container-type: inline-size; }
@container (max-width: 26rem) {   /* a narrow panel stacks each label over its value */
  .dp-facts > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dp-facts dd { justify-content: flex-start; text-align: left; }
}
.dp-sum { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: var(--s4); border-radius: var(--r-ctl); background: var(--canvas); }
.dp-sum .num { font-size: var(--t-num); }
.dp-t { flex: 1 1 10rem; min-width: 0; }
.dp-t small { display: block; margin-top: var(--s05); font-size: var(--t-xs); color: var(--mute); }
.dp-sum b { display: block; font-weight: 650; color: var(--ink); }
.said p { font-size: var(--t-l); color: var(--ink); }
.said p::before { content: "“"; }
.said p::after { content: "”"; }
.said cite { display: block; margin-top: var(--s1); font-size: var(--t-s); font-style: normal; color: var(--mute); }
.checks { display: grid; gap: var(--s2); }
.checks li { display: flex; align-items: flex-start; gap: var(--s2); }
.checks .ic { width: 18px; height: 18px; margin-top: var(--s05); }
.checks .ok .ic { color: var(--ok); }
.checks .warn .ic { color: var(--accent-ink); }
.checks .info .ic { color: var(--mute); }
.decide { display: grid; gap: var(--s3); }

/* Calendar strip */
.cal-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--s1)); padding: 0 var(--s1) var(--s1); overscroll-behavior-x: contain; }
.cal { display: grid; grid-template-columns: minmax(6.5rem, 9.5rem) repeat(var(--n), minmax(1.75rem, 1fr)); gap: var(--s05); align-items: center; min-width: calc(6.5rem + var(--n) * 2rem); }
.ch { display: flex; flex-direction: column; align-items: center; padding-bottom: var(--s1); font-size: var(--t-xs); line-height: 1.25; color: var(--mute); }
.ch b { min-width: 24px; padding: 0 var(--s1); border-radius: var(--r-chip); font-weight: 650; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }
.ch.is-today b { background: var(--navy); color: var(--on-navy); }
.cn { position: sticky; left: 0; z-index: 1; display: flex; align-items: center; height: 100%; padding-right: var(--s2); background: var(--surface); font-size: var(--t-s); font-stretch: var(--w-narrow); line-height: 1.15; overflow-wrap: anywhere; color: var(--text); }
.cn.lead { font-weight: 650; color: var(--ink); }
.c { display: block; height: var(--node); border-radius: var(--r-xs); background: var(--canvas); }
.c.is-today { box-shadow: inset 0 0 0 1.5px var(--line); }
.c.off { background: var(--navy); }
.c.hol { background: var(--sunk); }
.c.this, .c.asked.this { background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent-ink); }
.cal-fig figcaption { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s3); font-size: var(--t-s); color: var(--mute); }
.key { display: inline-flex; align-items: center; gap: var(--s15); }
.key .c { width: 16px; height: 14px; border-radius: var(--r-xs); }

/* People */
.search { position: relative; flex: 1 1 16rem; }
.search .ic { position: absolute; left: 12px; top: 50%; color: var(--mute); transform: translateY(-50%); pointer-events: none; }
.search input[type="search"] { padding-left: calc(var(--node) + var(--s4)); }
.ptable-h { display: none; }
.ptable > li + li { border-top: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av name" "av pos" "av today"; align-items: center; gap: var(--s05) var(--s3); min-height: 64px; padding: var(--s3) var(--s5); color: inherit; text-decoration: none; transition: background-color var(--t-press) ease-out; }
.prow:hover { background: var(--canvas); }
.prow:active { background: var(--sunk); }
.prow .av { grid-area: av; }
.pr-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); min-width: 0; }
.pr-name b { display: inline; overflow-wrap: anywhere; font-weight: 600; color: var(--ink); }
.pr-name small { font-size: var(--t-xs); color: var(--mute); font-variant-numeric: tabular-nums; }
.pr-pos { grid-area: pos; font-size: var(--t-s); color: var(--mute); }
.pr-today { grid-area: today; font-size: var(--t-s); }
.pr-today.away { color: var(--with-fg); font-weight: 600; }
.pr-unit, .pr-bal { display: none; }
.count { font-size: var(--t-s); color: var(--mute); }

/* Record */
.page-h > .av { flex: none; }
.timeline > li { position: relative; padding: var(--s05) 0 var(--s5) calc(var(--node) + var(--s4)); }
.timeline > li:last-child { padding-bottom: 0; }
.timeline .node { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: var(--node); height: var(--node); border-radius: 50%; background: var(--navy); color: var(--on-navy); }
.timeline .node .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.timeline .todo .node { background: var(--surface); box-shadow: inset 0 0 0 2px var(--navy); color: var(--navy); }
.timeline > li::after { content: ""; position: absolute; top: 32px; bottom: 4px; left: 10px; width: 6px; border-left: 1.5px solid var(--navy); border-right: 1.5px solid var(--navy); }
.timeline > li:last-child::after { display: none; }
.timeline b { display: block; font-weight: 600; color: var(--ink); }
.timeline span { display: block; font-size: var(--t-note); }
.timeline small { display: block; font-size: var(--t-xs); color: var(--mute); }

/* Settings (Admin, Super Admin) */
.role-card .panel-h { flex-wrap: wrap; align-items: flex-start; padding-top: var(--s4); padding-bottom: var(--s3); }
.role-card .panel-h > div { flex: 1 1 16rem; min-width: 0; }
.row.holder, .row.hol-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.row.holder > .btn, .row.hol-row > .icon-btn, .row.hol-row > .row-end { grid-column: auto; justify-self: end; }
.row.holder > .row-end { grid-column: auto; justify-self: end; display: grid; justify-items: end; gap: var(--s1); }
.hold-note { max-width: 10rem; font-size: var(--t-note); text-align: right; color: var(--mute); }
.hol-row.past b, .hol-row.past .date-tile b { color: var(--mute); }
.name-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.name-chips li { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3) var(--s1) var(--s1); border-radius: var(--r-chip); background: var(--canvas); font-size: var(--t-s); font-weight: 550; color: var(--ink); }
.pol-list { display: grid; }
.pol-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s1) var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.pol-row:first-child { border-top: 0; }
.pol-name b { display: block; font-weight: 600; color: var(--ink); }
.pol-name small { display: block; font-size: var(--t-note); color: var(--mute); }
.pol-in { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-s); color: var(--mute); }
.pol-in input { width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.pol-row .err { grid-column: 1 / -1; font-size: var(--t-note); }
.add-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); }
.add-row .field { flex: 1 1 10rem; }
.add-row .field.wide { flex: 2 1 14rem; }
.add-row .btn { min-height: var(--field-h); }
form[data-form] > .err { margin-top: var(--s2); }
.unit-acts { display: flex; flex-wrap: wrap; gap: var(--s1); }
.row.unit-row > .unit-acts { grid-column: 2; }
.row-main b.wrap { overflow: visible; white-space: normal; }
.row-main .wrap-s { font-size: var(--t-note); }

/* System (System Admin) */
.sec-list { display: grid; gap: var(--s5); }
.two.stack-m { grid-template-columns: minmax(0, 1fr); }
form[data-form] > .btns { margin-top: var(--s5); }
.row.holder .row-main b { white-space: normal; }
.types.duo { grid-template-columns: minmax(0, 1fr); }
a.chip { text-decoration: none; transition: opacity var(--t-press) ease-out; }
a.chip:active { opacity: 0.7; }

/* Empty states point at the next move */
.empty { display: grid; justify-items: start; gap: var(--s2); padding: var(--s8) var(--s5); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
.empty > .ic { width: 28px; height: 28px; color: var(--navy); }
.empty b { font-size: var(--t-l); color: var(--ink); }
.empty p { max-width: 46ch; color: var(--mute); }
.empty .btns, .empty > .btn { margin-top: var(--s2); }

/* Forms */
.field { display: grid; align-content: start; gap: var(--s15); min-width: 0; }
.field > label, .field > legend { padding: 0; font-size: var(--t-s); font-weight: 650; color: var(--ink); }
.field > legend { margin-bottom: var(--s15); }
.opt { font-weight: 400; color: var(--mute); }
input[type="text"], input[type="search"], input[type="date"], input[type="time"], input[type="number"], input[type="tel"], input[type="email"], input[type="password"], select, textarea { display: block; width: 100%; min-height: var(--field-h); padding: 0 var(--s3); border: 1.5px solid var(--field); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font-size: var(--t-m); transition: border-color var(--t-press) ease-out; }
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; line-height: 44px; }
input::-webkit-date-and-time-value { text-align: left; }
textarea { min-height: 88px; padding: var(--s3); line-height: 1.45; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--navy-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--navy); outline: 2px solid var(--focus); outline-offset: 1px; }
[aria-invalid="true"] { border-color: var(--no-fg) !important; }
.err { font-size: var(--t-note); font-weight: 600; color: var(--no-fg); }
.hint { font-size: var(--t-note); color: var(--mute); }
#rq, #ch, #ho { display: grid; gap: var(--s5); }
.types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.type { position: relative; display: grid; align-content: center; gap: var(--s05); min-height: 64px; padding: var(--s3); border: 1.5px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; transition: border-color var(--t-press) ease-out, background-color var(--t-press) ease-out, transform var(--t-press) var(--ease-out); }
.type:hover { border-color: var(--field); }
.type:active { transform: scale(0.98); }
.type input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.type:has(input:checked) { border-color: var(--navy); background: var(--with-bg); }
.type:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.type b { font-weight: 600; line-height: 1.25; color: var(--ink); }
.type small { font-size: var(--t-note); color: var(--mute); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.sum:empty { display: none; }
.sum-days { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-radius: var(--r-ctl); background: var(--canvas); }
.sum-days .num { font-size: var(--t-2xl); }
.sum-days b { display: block; color: var(--ink); }
.sum-days span span { font-size: var(--t-s); }
.sum-after { margin-top: var(--s2); font-size: var(--t-note); }
.sum-notes { display: grid; gap: var(--s15); margin-top: var(--s2); }
.sum-notes li { display: flex; gap: var(--s2); font-size: var(--t-note); }
.sum-notes .ic { width: 16px; height: 16px; margin-top: var(--s05); color: var(--mute); }

/* Sheets */
.sheet-layer { position: fixed; inset: 0; z-index: 50; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; }
.sheet { position: absolute; display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-float); will-change: transform; }
.from-right .sheet { top: var(--s3); right: var(--s3); bottom: var(--s3); width: min(520px, calc(100vw - 24px)); border-radius: var(--r-sheet); }
.from-bottom .sheet { left: 0; right: 0; bottom: 0; max-height: calc(100svh - 32px); padding-bottom: env(safe-area-inset-bottom); border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
.sheet-h { position: relative; display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s3) var(--s3) var(--s6); }
.sheet-h h2 { flex: 1; min-width: 0; font-size: var(--t-h3); font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.grab { display: none; }
.from-bottom .sheet-h { padding-top: var(--s6); touch-action: none; cursor: grab; }
.from-bottom .grab { display: block; position: absolute; top: var(--s2); left: 50%; width: var(--av); height: 5px; border-radius: var(--r-chip); background: var(--line); transform: translateX(-50%); }
.sheet-b > * + * { margin-top: var(--s3); }
.sheet-b { flex: 1; overflow: auto; padding: var(--s2) var(--s6) var(--s6); overscroll-behavior: contain; }
.sheet-b .dp { padding: 0; border: 0; border-radius: 0; overflow: visible; }
.sheet-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s6); border-top: 1px solid var(--line); }
.goes { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-s); color: var(--mute); }
.goes .ic { width: 16px; height: 16px; }
.from-bottom .sheet-f > .btn, .from-bottom .goes { flex: 1 1 100%; }
.from-bottom .sheet-f > .btn { min-height: 52px; }
.sheet-f .decide-btns { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.sheet-f .decide-btns .btn-primary { grid-column: 1 / -1; min-height: 52px; }
.sheet-layer.fade .sheet, .sheet-layer.fade .scrim { opacity: 0; transition: opacity var(--t-out) ease; }
.sheet-layer.fade.in .sheet, .sheet-layer.fade.in .scrim { opacity: 1; }

/* Popovers grow from their trigger */
.pop { position: fixed; z-index: 60; max-height: min(70vh, 560px); overflow: auto; border-radius: var(--r-panel); background: var(--surface); box-shadow: var(--shadow-pop); opacity: 0; transform: scale(0.96); transition: opacity var(--t-out) var(--ease-in), transform var(--t-out) var(--ease-in); }
.pop.open { opacity: 1; transform: none; transition-duration: var(--t-in); transition-timing-function: var(--ease-out); }
.pop-h { padding: var(--s4) var(--s4) var(--s2); font-weight: 650; color: var(--ink); }
.pick { padding: 0 var(--s2) var(--s2); }
.pick button { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 56px; padding: var(--s2); border: 0; border-radius: var(--r-ctl); background: transparent; text-align: left; transition: background-color var(--t-press) ease-out; }
.pick button:hover { background: var(--canvas); }
.pick button:active { background: var(--sunk); }
.pick button[aria-pressed="true"] { background: var(--with-bg); }
.pick-t { flex: 1; min-width: 0; }
.pick b { display: block; font-weight: 600; color: var(--ink); }
.pick small { font-size: var(--t-note); color: var(--mute); }
.pop-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s3) var(--s4) var(--s4); border-top: 1px solid var(--line); }
.pop-f .btn { padding: 0 var(--s3); font-size: var(--t-s); }
.notes { padding: 0 var(--s2) var(--s2); }
.note { display: grid; gap: var(--s05); padding: var(--s3); border-radius: var(--r-ctl); font-size: var(--t-s); color: var(--text); text-decoration: none; transition: background-color var(--t-press) ease-out; }
.note:hover { background: var(--canvas); }
.note:active { background: var(--sunk); }
.note.new span { font-weight: 650; color: var(--ink); }
.note time { font-size: var(--t-xs); color: var(--mute); }
.pop-empty { padding: 0 var(--s4) var(--s4); font-size: var(--t-note); color: var(--mute); }

/* Toasts */
#toasts { position: fixed; left: var(--s4); right: var(--s4); bottom: calc(var(--tabs) + var(--s4) + env(safe-area-inset-bottom)); z-index: 70; display: flex; justify-content: center; pointer-events: none; }
body:has(.act-bar) #toasts { bottom: calc(var(--tabs) + 80px + env(safe-area-inset-bottom)); }
.toast { display: flex; align-items: center; gap: var(--s3); max-width: 520px; min-height: 52px; padding: var(--s1) var(--s1) var(--s1) var(--s4); border-radius: var(--r-panel); background: var(--navy); color: var(--on-navy); font-weight: 550; box-shadow: var(--shadow-float); pointer-events: auto; opacity: 0; transform: translateY(12px); transition: opacity var(--t-out) var(--ease-in), transform var(--t-out) var(--ease-in); }
.toast.in { opacity: 1; transform: none; transition-duration: var(--t-in); transition-timing-function: var(--ease-out); }
.toast button { display: inline-flex; align-items: center; gap: var(--s15); flex: none; min-height: var(--tap); padding: 0 var(--s3); border: 0; border-radius: var(--r-ctl); background: var(--navy-2); color: var(--on-navy); font-weight: 650; transition: background-color var(--t-press) ease-out, transform var(--t-press) var(--ease-out); }
.toast button:hover { background: var(--navy-3); }
.toast button:active { transform: scale(0.96); }
.toast .ic { width: 18px; height: 18px; color: var(--accent); }

/* Wider phones and up */
@media (min-width: 37.5em) {
  .row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .row > .chip, .row > .row-end { grid-column: auto; justify-self: end; }
  .row.team { grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) auto; }
  .row.team > .row-mid { grid-column: auto; }
  .row.unit-row > .unit-acts { grid-column: auto; justify-self: end; }
  .types.duo, .two.stack-m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-link { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ap-meta { grid-column: auto; flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: var(--s15); white-space: nowrap; }
  .types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .from-right .types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop frame: navy sidebar, no bottom tabs */
@media (min-width: 53.8125em) {
  :root { --t-note: var(--t-s); }
  .start-in { padding: clamp(2.5rem, 8vh, 5rem) 0 var(--s12) clamp(2rem, 8vw, 7rem); }
  .start-logo { width: 168px; }

  .shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
  .side { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; height: 100svh; padding: var(--s5) var(--s3); background: var(--navy); color: var(--on-navy); }
  .me-btn { display: none; }   /* the sidebar's own switcher does this job on desktop; the header keeps only the bell (Papa, 27 Oct) */
  .brand { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3) var(--s8); text-decoration: none; }
  .brand img { width: 128px; height: auto; }
  .brand { flex-wrap: wrap; row-gap: var(--s2); }
  .brand .demo-tag { flex-basis: auto; }
  .brand img + span + .demo-tag { order: 3; }
  .brand span { padding-left: var(--s3); border-left: 1px solid var(--on-navy-line); font-weight: 700; font-stretch: var(--w-wide); letter-spacing: 0.02em; color: var(--on-navy-mute); }
  .nav { display: grid; gap: var(--s05); }
  .nav-a { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); padding: 0 var(--s3); border-radius: var(--r-ctl); color: var(--on-navy-mute); font-weight: 550; text-decoration: none; transition: background-color var(--t-press) ease-out, color var(--t-press) ease-out; }
  .nav-a:hover { background: var(--on-navy-hover); color: var(--on-navy); }
  .nav-a:active { background: var(--on-navy-press); }
  .nav-a[aria-current] { background: var(--accent); color: var(--navy); font-weight: 650; }   /* the current page: Nova gold with navy text, 6.2:1 */
  .nav-a[aria-current] .badge { background: var(--navy); color: var(--on-navy); }
  .nav-a .badge { margin-left: auto; }
  .who { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 60px; margin-top: auto; padding: var(--s2) var(--s3); border: 0; border-radius: var(--r-ctl); background: var(--navy-2); color: var(--on-navy); text-align: left; transition: background-color var(--t-press) ease-out, transform var(--t-press) var(--ease-out); }
  .who:hover { background: var(--navy-3); }
  .who:active { transform: scale(0.98); }
  .who .av { background: var(--accent); color: var(--navy); }
  .who-t { flex: 1; min-width: 0; }
  .who b { display: block; overflow-wrap: anywhere; font-weight: 600; font-stretch: var(--w-narrow); }
  .who > .ic { width: 18px; height: 18px; }
  .who small { display: block; font-size: var(--t-s); line-height: 1.3; color: var(--on-navy-mute); }
  .who > .ic { color: var(--on-navy-mute); }

  .tabs, .act-bar, .top-mark, .top-demo, .top-title, .top .back-link { display: none; }
  .top { height: auto; min-height: var(--top); gap: var(--s3); padding: var(--s3) var(--s6) var(--s3) var(--s8); background: var(--surface-glass); border-bottom: 1px solid var(--line); }
  .top::after { display: none; }
  .top-t { display: grid; gap: var(--s05); min-width: 0; }
  /* The title lives in the header bar; the h1 stays in the page for screen readers and focus. */
  .page-t h1 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .page-t p { margin-top: 0; }
  .content { padding: var(--s6) var(--s8) var(--s12); }
  .page-t h1 { font-size: var(--t-2xl); }
  .hide-m { display: inline-flex; }
  #toasts, body:has(.act-bar) #toasts { bottom: var(--s6); }

  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .split-detail { display: block; position: sticky; top: calc(var(--top) + var(--s2)); }
  .bals { grid-template-columns: 1.5fr 1fr 1fr; }
  .bal + .bal { border-top: 0; border-left: 1px solid var(--line); }
}

@media (min-width: 65em) {
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptable-h, .prow { grid-template-columns: var(--av) minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(0, 1.2fr) 5.5rem; }
  .ptable-h { position: sticky; top: var(--top); z-index: 2; display: grid; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); background: var(--surface); font-size: var(--t-s); font-weight: 600; color: var(--mute); }   /* the header stays in view under the top bar */
  .ptable-h span:first-child { grid-column: 1 / 3; }
  .prow { grid-template-areas: "av name pos unit today bal"; }
  .pr-unit, .pr-bal { display: block; font-size: var(--t-s); }
  .pr-pos { font-size: var(--t-m); color: var(--text); }
  .pr-name { display: block; }
  .pr-name b { display: block; }
  .pr-bal { color: var(--mute); }
}

@media (min-width: 75em) {
  .start-mark { display: block; position: absolute; top: 50%; right: -7vw; width: min(44vw, 700px); height: auto; transform: translateY(-50%); pointer-events: none; }
}

@media (min-width: 73.75em) {
  .cols { grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 21.25rem); }
}

/* Comfort settings (apple-design §14) */
@media (prefers-reduced-motion: reduce) {
  .btn:active, .icon-btn:active, .start-pick:active, .ap-item:has(.ap-link:active), .type:active, .who:active, .tab:active .ic, .toast button:active, .stat:active, .kchip:active { transform: none; opacity: 0.85; }
  .pop, .toast, .top-title { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .top { background: var(--canvas); -webkit-backdrop-filter: none; backdrop-filter: none; }
  @media (min-width: 53.8125em) { .top { background: var(--surface); } }
  .tabs { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .top { background: var(--canvas); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 1px 0 var(--field); }
  .tabs { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 -1px 0 var(--field); }
  .panel, .ap-item, .empty, .type { border-color: var(--field); }
  .chip { box-shadow: inset 0 0 0 1px currentColor; }
  .page-t p, .row-main span, .bal-k, .count, .hint { color: var(--text); }
}

/* HR officer (hr.js): the HR home, the employee record, balances */
/* The sidebar's groups: each heading opens and closes its pages (app.js navGroups) */
.side-nav { min-height: 0; margin: 0 calc(-1 * var(--s1)); padding: 0 var(--s1) var(--s3); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--on-navy-line) transparent; }
.nav-grp { display: grid; gap: var(--s05); margin-top: var(--s3); }
.nav-sub { display: grid; gap: var(--s05); }
.nav-sub[hidden] { display: none; }
.nav-g { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 36px; padding: 0 var(--s3); border: 0; border-radius: var(--r-ctl); background: none; color: var(--on-navy-mute); font: inherit; font-size: var(--t-xs); font-weight: 650; letter-spacing: 0.02em; text-align: left; cursor: pointer; transition: background-color var(--t-press) ease-out, color var(--t-press) ease-out; }
.nav-g:hover { background: var(--on-navy-hover); color: var(--on-navy); }
.nav-g .badge { margin-left: auto; }
.nav-g .badge[hidden] { display: none; }
.nav-g .ic { width: 16px; height: 16px; flex: none; margin-left: auto; transform: rotate(90deg); transition: transform var(--t-press) var(--ease-out); }
.nav-g .badge:not([hidden]) + .ic { margin-left: 0; }
.nav-g[aria-expanded="false"] .ic { transform: none; }
@media (prefers-reduced-motion: reduce) { .nav-g .ic { transition: none; } }
.mute { color: var(--mute); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.stat { display: grid; align-content: start; gap: var(--s1); min-height: var(--tap); padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); color: inherit; text-decoration: none; transition: border-color var(--t-press) ease-out, transform var(--t-press) var(--ease-out); }
.stat:hover { border-color: var(--field); }
.stat:active { transform: scale(0.985); }
.stat > span { font-size: var(--t-s); font-weight: 600; color: var(--mute); }
.stat .num { font-size: var(--t-2xl); line-height: 1.1; font-weight: 750; font-stretch: var(--w-wide); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat small { font-size: var(--t-s); color: var(--mute); }
@media (min-width: 54em) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }   /* em: with large default text the cards stay two across */

/* HR home (owlake-dashboard, Home floorplan): Needs you leads, grouped by when; its chips narrow it to one kind
   of work. Each row opens its record (a stretched link); its one action is quiet, and on desktop with a mouse it
   shows on hover or keyboard focus, as on the approvals queue. */
.kchips { display: flex; gap: var(--s2); padding: 0 var(--s5) var(--s3); overflow-x: auto; scrollbar-width: none; }
.kchips::-webkit-scrollbar { display: none; }
.kchip { display: inline-flex; flex: none; align-items: center; gap: var(--s2); min-height: var(--tap); padding: 0 var(--s4); border: 0; border-radius: var(--r-chip); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; font-size: var(--t-s); font-weight: 600; cursor: pointer; transition: background-color var(--t-press) ease-out, transform var(--t-press) var(--ease-out); }
.kchip:hover { background: var(--sunk); }
.kchip:active { transform: scale(0.97); }
.kchip[aria-pressed="true"] { background: var(--navy); box-shadow: none; color: var(--on-navy); }
.kchip .num-s { color: inherit; }
.kshow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); padding: 0 var(--s5) var(--s2); font-size: var(--t-s); color: var(--mute); }
.tgroup { border-top: 1px solid var(--line); }
.tg-h, .side-sub { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s4) var(--s5) var(--s1); font-size: var(--t-s); font-weight: 650; color: var(--mute); }
.tg-h .num-s, .side-sub .num-s { color: var(--mute); font-weight: 600; }
.tasks > li + li { border-top: 1px solid var(--line); }
.task { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--s1) var(--s4); padding: var(--s3) var(--s5); transition: background-color var(--t-press) ease-out; }
.task:hover { background: var(--canvas); }
.task:has(.task-t:active) { background: var(--sunk); }
.task:has(.task-t:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.task-ic { display: grid; place-items: center; grid-row: span 3; width: var(--av); height: var(--av); border-radius: var(--r-ctl); background: var(--canvas); color: var(--navy); }
.task.hot .task-ic { background: var(--needs-bg); color: var(--needs-fg); }
.task-b { min-width: 0; }
.task-t { font-weight: 650; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.task-t:focus-visible { outline: none; }
.task-t::after { content: ""; position: absolute; inset: 0; }
.task-b > span { display: block; margin-top: var(--s05); font-size: var(--t-note); color: var(--mute); }
.task-due { grid-column: 2; font-size: var(--t-s); color: var(--mute); font-variant-numeric: tabular-nums; }
.task-due b { font-weight: 650; color: var(--ink); }
.task-due small { font-size: var(--t-s); }
.task-b > .task-flags { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin-top: var(--s1); }
.task.hot .task-due b { color: var(--needs-fg); }
.task-act { position: relative; z-index: 1; grid-column: 2; margin-top: var(--s2); }
.side-sub { padding-top: var(--s1); }
.side-sub ~ .side-sub { padding-top: var(--s3); border-top: 1px solid var(--line); }
.panel > .side-sub + .panel-empty { padding-top: 0; }
@media (min-width: 53.8125em) { .kchips { flex-wrap: wrap; overflow: visible; } }
/* Needs you rows and the requests table lay out by the room their panel has, not the window, so large text stacks them again instead of clipping. */
.panel:has(.tasks), .panel:has(.rtable) { container-type: inline-size; }
@container (min-width: 30rem) {
  .task { grid-template-columns: auto minmax(0, 1fr) 7rem 11rem; align-items: center; }
  .task-ic { grid-row: auto; }
  .task-due { grid-column: 3; text-align: right; }
  .task-due b, .task-due small { display: block; }
  .task-due .dot { display: none; }
  .task-act { grid-column: 4; justify-self: end; margin-top: 0; }
  @media (hover: hover) and (min-width: 53.8125em) {
    /* With a mouse the button shows on hover or focus, over the end of the row, so the title gets the width. */
    .task { grid-template-columns: auto minmax(0, 1fr) 7rem; }
    .task:focus-within { background: var(--canvas); }
    .task-act { position: absolute; top: 50%; right: var(--s5); translate: 0 -50%; padding-left: var(--s8); background: linear-gradient(to right, transparent, var(--canvas) var(--s6)); opacity: 0; transition: opacity var(--t-press) ease-out; }
    .task:hover .task-act, .task:focus-within .task-act { opacity: 1; }
  }
}

.rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); padding: var(--s5) var(--s6); }
.rec-id { flex: 1 1 16rem; min-width: 0; }
.rec-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.rec-name > span:first-child { font-size: var(--t-xl); line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.rec-meta { margin-top: var(--s1); font-size: var(--t-s); color: var(--mute); }
.rec-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.notice > span { flex: 1 1 16rem; }
.notice > .btn { flex: none; }
.notice:has(.btn) { flex-wrap: wrap; align-items: center; }
.notice.warn { background: var(--needs-bg); color: var(--needs-fg); }
.rec-grid, .grid3 { display: grid; gap: var(--s5); align-items: start; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--s4) var(--s5); margin-top: var(--s4); }
.fgrid dt { font-size: var(--t-s); color: var(--mute); }
.fgrid dd { margin-top: var(--s05); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fgrid dd small { display: block; font-size: var(--t-note); font-weight: 400; color: var(--mute); }
.fgrid dd a { display: inline-flex; align-items: center; min-height: var(--tap); margin: calc((1.5em - var(--tap)) / 2) 0; text-decoration-color: var(--accent); text-underline-offset: 3px; }   /* 44px to tap, without pushing the row down */
.fine:has(.ic) { display: flex; align-items: flex-start; gap: var(--s2); }
.fine .ic { flex: none; width: 1em; height: 1lh; }   /* centred on the first line, whatever the size */
.row.doc .row-main span + span { margin-top: var(--s05); }
.row.doc.missing .tico { background: var(--needs-bg); color: var(--needs-fg); }
.tag.move { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--navy); }
.pr-pos small { display: block; font-size: var(--t-xs); color: var(--mute); }
.pr-today.st-with { color: var(--with-fg); font-weight: 600; }
.pr-today.st-quiet { color: var(--mute); }

.btable-h { display: none; }
.btable > li + li { border-top: 1px solid var(--line); }
.brow { display: grid; grid-template-columns: auto repeat(5, minmax(0, 1fr)); align-items: center; gap: var(--s1) var(--s3); min-height: 64px; padding: var(--s3) var(--s5); color: inherit; text-decoration: none; transition: background-color var(--t-press) ease-out; }
.brow:hover { background: var(--canvas); }
.brow:active { background: var(--sunk); }
.brow:focus-visible { outline-offset: -3px; }
.brow .av { grid-row: span 2; align-self: start; }
.br-name { grid-column: 2 / -1; min-width: 0; }
.br-name b { display: block; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.br-name small { font-size: var(--t-s); color: var(--mute); }
.br-n { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.br-n small { display: block; font-size: var(--t-xs); font-weight: 500; color: var(--mute); }
.br-n em { margin-left: var(--s1); font-style: normal; font-size: var(--t-xs); color: var(--ok-fg); }
.br-left b { font-weight: 750; color: var(--ink); }
.br-left.low b { color: var(--needs-fg); }

@media (min-width: 37.5em) { .row.doc > .btn, .row.doc > .chip { grid-column: auto; justify-self: end; } }
@media (min-width: 56.25em) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68.75em) { .rec-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
@media (min-width: 80em) { .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 65em) {
  .btable-h, .brow { grid-template-columns: var(--av) minmax(0, 2fr) repeat(5, minmax(0, 1fr)); }
  .btable-h { position: sticky; top: var(--top); z-index: 2; display: grid; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); background: var(--surface); font-size: var(--t-s); font-weight: 600; color: var(--mute); }
  .btable-h span:first-child { grid-column: 1 / 3; }
  .brow .av { grid-row: auto; align-self: center; }
  .br-name { grid-column: auto; }
  .br-n small { display: none; }
}
/* File picker (documents): a full-size target in the house style instead of the browser's small default button */
input[type="file"] { display: block; width: 100%; min-height: 64px; padding: var(--s3); border: 1.5px dashed var(--field); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font-size: var(--t-s); cursor: pointer; }
input[type="file"]:hover { border-color: var(--navy); }
input[type="file"]::file-selector-button { min-height: var(--tap); margin-right: var(--s3); padding: 0 var(--s4); border: 0; border-radius: var(--r-ctl); background: var(--navy); color: var(--on-navy); font: inherit; font-weight: 650; cursor: pointer; }
/* Secondary lines that run to sentence length: 16px on phones, 14px from 861px (--t-note) */
.row-main span, .ap-main > span:not(.ap-tags), .goes, .rec-meta, .timeline small { font-size: var(--t-note); }
/* Stacked filter bar (Leave): the search box is the widest thing on its own row; the menus share the row below. */
.tools.stacked .tools-q { flex-basis: 100%; }
.tools.stacked input[type="search"] { min-height: var(--field-h); font-size: var(--t-m); }
.tools.stacked select { flex: 1 1 0; min-width: 0; max-width: none; }
@container (max-width: 34rem) { .tools.stacked[data-n="3"] select, .tools.stacked[data-n="4"] select { flex-basis: calc(50% - var(--s1)); } }

/* Employee home (home.js) and the requests table every leave list uses */
.stat.soon { border-style: dashed; background: transparent; }
.stat.soon b { font-size: var(--t-xl); font-weight: 650; color: var(--mute); }
.stat.soon small { font-size: var(--t-note); }   /* a sentence, not a figure's context line */
.stat .unit { font-size: var(--t-l); font-weight: 600; font-stretch: normal; color: var(--text); }
.pop-note { padding: var(--s2) var(--s4) var(--s4); font-size: var(--t-note); color: var(--mute); }
.pick .tico { flex: none; }
.pick-t small { display: block; font-size: var(--t-note); color: var(--mute); }

.rtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rtable thead th { padding: var(--s2) var(--s5); border-bottom: 1px solid var(--line); text-align: left; font-size: var(--t-s); font-weight: 600; color: var(--mute); }
.rtable tbody tr { position: relative; transition: background-color var(--t-press) ease-out; }
.rtable tbody tr + tr { border-top: 1px solid var(--line); }
.rtable tbody tr:hover { background: var(--canvas); }
.rtable tbody tr:has(a:active) { background: var(--sunk); }
.rtable tbody tr.is-needs { background: var(--needs-bg); }
.rtable td, .rtable tbody th { padding: var(--s2) var(--s5); text-align: left; vertical-align: middle; font-weight: 400; }
.rt-what a, .rt-what > span { display: flex; flex-direction: column; justify-content: center; min-height: var(--tap); color: inherit; text-decoration: none; }
.rt-what a::after { content: ""; position: absolute; inset: 0; }   /* the whole row opens the request */
.rt-what a:focus-visible { outline: none; }
.rtable tbody tr:has(a:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.rt-what b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.rt-what small { font-size: var(--t-note); color: var(--mute); }
.rt-sent, .rt-who { font-size: var(--t-s); color: var(--text); white-space: nowrap; }
.rtable .rt-st { text-align: right; }
.rtable thead th:last-child { text-align: right; }
@container (max-width: 34rem) {
  .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rtable tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--s1) var(--s2); padding: var(--s3) var(--s5); }
  .rtable td, .rtable tbody th { padding: 0; }
  .rt-what a, .rt-what > span { min-height: 0; }
  .rt-what { grid-column: 1 / 3; grid-row: 1; }
  .rt-st { grid-column: 3; grid-row: 1; }
  .rt-sent { grid-column: 1; grid-row: 2; font-size: var(--t-note); color: var(--mute); }
  .rt-sent::before { content: "Sent "; }
  .rt-who { grid-column: 2 / 4; grid-row: 2; font-size: var(--t-note); color: var(--mute); white-space: normal; }
  .rt-who::before { content: "· "; }   /* one line under the request: "Sent 27 Oct · Akosua Frimpong" */
  .rtable tr.held .rt-who { display: none; }   /* the chip already says who has it: "With Kojo" */
}

/* Sign-in (signin.js; Royal Horizon's wireframe 01). Phone: a navy band with the logo over the form.
   From 53.8em: the navy brand panel on the left, the form on white on the right, as in the wireframe. */
.start .link { color: var(--on-navy); }
.si { display: grid; grid-template-rows: auto 1fr; min-height: 100svh; background: var(--surface); }
.si-brand { position: relative; overflow: hidden; display: grid; align-content: start; gap: var(--s3); padding: var(--s5) var(--s4) var(--s6); background: var(--navy); color: var(--on-navy); }
.si-logo { position: relative; z-index: 1; width: 132px; height: auto; }
.si-claim { position: relative; z-index: 1; max-width: 18ch; font-size: var(--t-xl); line-height: 1.1; letter-spacing: -0.02em; font-weight: 760; font-stretch: var(--w-wide); }
.si-claim span { color: var(--accent); }   /* as in the wireframe */
.si-legal { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--s2); font-size: var(--t-note); color: var(--on-navy-mute); }
.si-legal .ic { flex: none; width: 1.1em; height: 1.1em; }
.si-brand .si-legal { display: none; }
.si-legal-m { justify-content: center; margin-top: var(--s6); color: var(--mute); }
.si-mark { position: absolute; right: -3.5rem; bottom: -4.5rem; width: 13rem; aspect-ratio: var(--mark-ratio); background: var(--navy-3); -webkit-mask: var(--mark) no-repeat center / contain; mask: var(--mark) no-repeat center / contain; pointer-events: none; }   /* the logo's mark, as a tone of navy */
.si-panel { display: grid; align-content: start; justify-items: center; padding: var(--s6) var(--s4) var(--s10); }
.si-card { width: 100%; max-width: 26rem; }
.si-card h1 { font-size: var(--t-2xl); line-height: 1.1; letter-spacing: -0.02em; font-weight: 750; color: var(--ink); }
.si-card h1:focus { outline: none; }
.si-sub { margin-top: var(--s2); font-size: var(--t-note); color: var(--mute); }
.si-notice { margin-top: var(--s4); }
.si-step { display: inline-flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); font-size: var(--t-s); font-weight: 650; color: var(--with-fg); }
.si-step .ic { width: 1.1em; height: 1.1em; }
.si-step-no { color: var(--no-fg); }
.si-sso, .si-go { width: 100%; min-height: var(--field-h); margin-top: var(--s5); }
.si-or { display: flex; align-items: center; gap: var(--s3); margin: var(--s5) 0 var(--s1); font-size: var(--t-s); color: var(--mute); }
.si-or::before, .si-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
#si-form, #si-code { display: grid; gap: var(--s4); margin-top: var(--s3); }
#si-form .si-go, #si-code .si-go { margin-top: var(--s1); }
#si-u, #si-c { font-size: var(--t-m); }
.si-pw { position: relative; }
.si-pw input { width: 100%; padding-right: calc(var(--tap) + var(--s1)); font-size: var(--t-m); }
.si-pw .icon-btn { position: absolute; top: 50%; right: var(--s05); translate: 0 -50%; color: var(--mute); }
.si-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); }
.si-row .btn-in { padding: 0 var(--s1); color: var(--accent-ink); }
.si-check { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); font-size: var(--t-note); color: var(--text); cursor: pointer; }
.si-check input { width: 1.25rem; height: 1.25rem; accent-color: var(--navy); }
.si-mfa { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--with-bg); color: var(--with-fg); font-size: var(--t-note); font-weight: 600; }
.si-mfa .ic { flex: none; width: 1.1em; height: 1.1em; }
.si-hint { margin-top: var(--s3); font-size: var(--t-note); color: var(--mute); }
.si-hint b { color: var(--ink); font-weight: 650; }
.si-code input { max-width: 12rem; font-size: var(--t-xl); letter-spacing: 0.25em; font-variant-numeric: tabular-nums; }
.si-accounts { display: grid; gap: var(--s2); margin-top: var(--s5); }
.si-accounts button { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 64px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--t-press) ease-out, border-color var(--t-press) ease-out; }
.si-accounts button:hover { border-color: var(--field); background: var(--canvas); }
.si-accounts button:active { background: var(--sunk); }
.si-accounts .pick-t { flex: 1; min-width: 0; }
.si-accounts .pick-t b { display: block; font-weight: 650; color: var(--ink); }
.si-accounts .pick-t small { overflow-wrap: anywhere; }
.si-accounts .ic { flex: none; color: var(--mute); }
.si-back { display: inline-flex; align-items: center; gap: var(--s1); margin-top: var(--s4); }
.si-list { display: grid; gap: var(--s3); margin-top: var(--s5); }
.si-list li { display: flex; gap: var(--s2); font-size: var(--t-note); }
.si-list .ic { flex: none; width: 1.2em; height: 1.2em; color: var(--ok-fg); }
.si-card .notice { margin-top: var(--s4); }
.si-demo { margin-top: var(--s3); font-size: var(--t-note); color: var(--mute); text-align: center; }
.si-demo .link { font-size: inherit; }
@media (min-width: 53.8125em) {
  .si { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: 1fr; }
  .si-brand { align-content: stretch; grid-template-rows: auto 1fr auto auto; gap: var(--s6); padding: var(--s10) clamp(2rem, 5vw, 4.5rem) var(--s8); }
  .si-logo { width: 168px; }
  .si-claim { align-self: center; font-size: var(--t-hero); line-height: 1.04; letter-spacing: -0.03em; }
  .si-brand .si-legal { display: flex; }
  .si-legal-m { display: none; }
  .si-mark { right: -6rem; bottom: -6rem; width: 26rem; }
  .si-panel { align-content: center; padding: var(--s10) var(--s8); }
}

/* Payroll (payroll.js; Royal Horizon's wireframe 06). The run's five stages are the trail with five steps;
   what happens next sits under it, with the one primary action. Money tables right-align their figures. */
.trail.t5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* Narrow (a phone): five labelled nodes in a row, so the work isn't pushed below the fold. Who holds each step
   stays for screen readers; the next-step line under it names who does what. */
@container (max-width: 36rem) {
  .trail.t5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s1); }
  .t5 .step { padding: calc(var(--node) + var(--s2)) 0 0; }
  .t5 .step::after { top: 10px; left: 30px; right: calc(4px - var(--s1)); bottom: auto; width: auto; height: 6px; border: 0; border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
  .t5 .step.done::after { border-color: var(--navy); }
  .t5 .step b { font-size: var(--t-xs); overflow-wrap: anywhere; }
  .t5 .step :is(.step-who, time) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.next-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.next-t { flex: 1 1 22rem; min-width: 0; }
.next-h { font-size: var(--t-l); font-weight: 650; line-height: 1.3; color: var(--ink); }
.next-t > p + p { margin-top: var(--s1); max-width: 70ch; }
.next-t .fine { margin-top: var(--s2); }

.mt-wrap { container: mt / inline-size; }
.mt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mt th, .mt td { padding: var(--s2) var(--s3); text-align: left; vertical-align: middle; font-weight: 400; }
.mt :is(th, td):first-child { padding-left: var(--s5); }
.mt :is(th, td):last-child { padding-right: var(--s5); }
.mt thead th { position: sticky; top: var(--top-m); z-index: 2; border-bottom: 1px solid var(--line); background: var(--surface); font-size: var(--t-s); font-weight: 600; color: var(--mute); white-space: nowrap; }
.mt.wide td { font-size: var(--t-s); }
.mt tbody tr { position: relative; transition: background-color var(--t-press) ease-out; }
.mt tbody tr + tr { border-top: 1px solid var(--line); }
.mt tbody tr.is-needs { background: var(--needs-bg); }
.mt tbody tr:has(.mt-open):hover { background: var(--canvas); }
.mt tbody tr:has(.mt-open:active) { background: var(--sunk); }
.mt .num-c { text-align: right; white-space: nowrap; }
.mt small { display: block; font-size: var(--t-note); color: var(--mute); }
.mt-b { font-weight: 650; color: var(--ink); }
.mt-open { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: var(--tap); padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.mt-open::after { content: ""; position: absolute; inset: 0; }   /* the whole row opens it */
.mt-open:focus-visible { outline: none; }
.mt tbody tr:has(.mt-open:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.mt-open b { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.mt tfoot :is(th, td) { padding-top: var(--s3); padding-bottom: var(--s3); border-top: 1.5px solid var(--navy); font-weight: 700; color: var(--ink); }
.mt .mt-only-n { display: none; }
@media (min-width: 53.8125em) { .mt thead th { top: var(--top); } }
/* With less room each row becomes two lines: who and the figure that matters, then a summary. */
@container mt (max-width: 48rem) {
  .mt.wide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mt.wide :is(tbody, tfoot) tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s1) var(--s3); padding: var(--s3) var(--s5); }
  .mt.wide :is(th, td), .mt.wide :is(th, td):is(:first-child, :last-child) { padding: 0; }
  .mt.wide .c-main { grid-column: 1; grid-row: 1; }
  .mt.wide .c-end { grid-column: 2; grid-row: 1; }
  .mt.wide .c-wide { display: none; }
  .mt.wide .mt-only-n { display: block; grid-column: 1 / -1; font-size: var(--t-note); font-weight: 400; color: var(--mute); }
  .mt.wide .mt-open { min-height: 0; }
}
@container mt (max-width: 34rem) {
  .mt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mt :is(tbody, tfoot) tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s1) var(--s3); padding: var(--s3) var(--s5); }
  .mt :is(th, td), .mt :is(th, td):is(:first-child, :last-child) { padding: 0; }
  .mt .c-main { grid-column: 1; grid-row: 1; }
  .mt .c-end { grid-column: 2; grid-row: 1; }
  .mt td:not(.c-main):not(.c-end):not(.c-wide) { grid-column: 1 / -1; }
  .mt .c-wide { display: none; }
  .mt .mt-only-n { display: block; font-size: var(--t-note); font-weight: 400; color: var(--mute); }
  .mt .mt-open { min-height: 0; }
}

.row.chg > .row-end { color: var(--ink); white-space: nowrap; }
.fx-st { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s4); font-size: var(--t-note); color: var(--mute); }
.sheet-b .dp-facts + .hint, .sheet-b .dp-facts + form, .sheet-b .hint + form { margin-top: var(--s5); }
.fx-months { margin: 0; padding: 0 0 var(--s2) var(--s3); }

/* A payslip */
.slip-net { display: grid; gap: var(--s1); margin-bottom: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--r-panel); background: var(--canvas); }
.slip-net > span { font-size: var(--t-s); font-weight: 600; color: var(--mute); }
.slip-net .num { font-size: var(--t-num); white-space: nowrap; }
.slip-net .unit { font-size: var(--t-l); font-weight: 600; font-stretch: normal; letter-spacing: 0; color: var(--text); }
.slip-net small { font-size: var(--t-note); color: var(--mute); }
.slip { width: 100%; margin-top: var(--s5); border-collapse: collapse; font-variant-numeric: tabular-nums; }
.slip caption { padding-bottom: var(--s2); text-align: left; font-size: var(--t-l); font-weight: 650; color: var(--ink); }
.slip :is(th, td) { padding: var(--s2) 0; border-top: 1px solid var(--line); text-align: left; font-weight: 400; }
.slip .num-c { padding-left: var(--s3); text-align: right; white-space: nowrap; }
.slip tfoot :is(th, td) { border-top: 1.5px solid var(--navy); font-weight: 700; color: var(--ink); }
#fx > * + *, #rt > * + * { margin-top: var(--s4); }
.mt small.mt-how { display: flex; align-items: flex-start; gap: var(--s1); margin-top: var(--s05); color: var(--text); }
.mt small.mt-how.ok .ic { flex: none; width: 1em; height: 1lh; color: var(--ok); }

/* The brand's logo leads on the sign-in page; the product is named under the claim. */
.si-product { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: var(--t-note); font-weight: 600; color: var(--on-navy-mute); }
.si-product img { width: 18px; height: auto; }
.start-mark { opacity: var(--mark-backdrop); }
/* Phones: the More tab's list of the remaining pages */
.more-a { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 0 var(--s3); border-radius: var(--r-ctl); color: var(--ink); font-weight: 600; text-decoration: none; }
.more-a:hover { background: var(--canvas); }
.more-a:active { background: var(--sunk); }
.more-a[aria-current] { background: var(--with-bg); }
.more-a .badge { margin-left: auto; }
.tabs button.tab { border: 0; background: transparent; font: inherit; }
/* Settings, Roles: grouped by what the roles do, and the duties that can't be combined */
.role-g { margin: var(--s6) 0 var(--s3); font-size: 15px; font-weight: 650; color: var(--mute); }
.sod { margin: var(--s2) 0 0; padding-left: var(--s5); display: grid; gap: var(--s1); }
/* Five figure cards (the employee dashboard with Performance and Learning) share one row on a wide screen */
@media (min-width: 80em) { .stats:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* The display face (--display in tokens.css) for page titles, the sign-in claim, the demo guide, the decision
   panel's and sheets' titles, a record's name and the big figures. Everything else is --font. */
.start h1, .top-h, .page-t h1, .si-claim, .si-card h1, .rec-name > span:first-child, .dp-h h2, .sheet-h h2, .num {
  font-family: var(--display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: var(--display-tracking);
}
.num { font-variant-numeric: lining-nums tabular-nums; }
/* A table whose hidden phone-summary cell comes last keeps the right padding on the cell before it */
.mt :is(th, td):has(+ .mt-only-n:last-child) { padding-right: var(--s5); }
