/* together² portal (my-together2). The same design as the together² Card Receipts portal
   (t2-receipts public/assets/app.css), plus a few portal additions at the end. An app, in the together² brand: a pinned purple bar with the logo and
   the brand circles, Comfortaa for headings and numbers, a plain UI sans for everything you read
   and type, quiet borders instead of heavy shadows. */
@font-face { font-family: 'Comfortaa'; font-weight: 300 700; font-display: swap; src: url('/assets/fonts/comfortaa-latin.woff2') format('woff2'); }
:root {
  --purple: #6561A8; --purple-deep: #4F4B8C; --ink: #28244A; --text: #1F2233; --soft: #5B6170; --line: #E3E5EC; --line-strong: #CDD0DB;
  --purple-tint: #EEEDF7; --purple-pale: #F8F8FC; --lime: #C7D540; --lime-tint: #F1F5D6; --coral: #EC694A; --coral-deep: #A33A18;
  --coral-tint: #FCE6DE; --teal: #00A0B7; --teal-deep: #007787; --teal-tint: #E0F1F4; --pink: #E5005A; --green: #007A59; --bg: #F5F6F9;
  --head: 'Comfortaa', 'Trebuchet MS', Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --page: 960px; --wide: 1240px; --r: 12px; --r-s: 9px;
  --shadow: 0 1px 2px rgba(31, 34, 51, 0.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); }
a { color: var(--purple-deep); }
h1, h2 { font-family: var(--head); line-height: 1.2; margin: 0; }
p { margin: 0 0 0.75rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 20; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── pinned header: brand bar + sub-bar ───────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(31, 34, 51, 0.35); }
.band { position: relative; overflow: hidden; background: var(--purple); color: #fff; }
.band-in { position: relative; z-index: 1; max-width: var(--page); margin: 0 auto; padding: 10px 20px; min-height: 60px; display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; }
.band-in.wide, main.wide, .foot-in.wide, .subbar-in.wide { max-width: var(--wide); }
.brand img { display: block; height: 26px; width: auto; }
.band-title { display: grid; gap: 1px; padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.35); }
.band h1 { font-size: 1.12rem; font-weight: 700; color: #fff; }
.band-sub { font-size: 0.74rem; color: rgba(255, 255, 255, 0.82); }
.band-extra { margin-left: auto; }
.band-nav { display: flex; gap: 8px 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; font-size: 0.8rem; }
.deco + .band-nav { margin-left: auto; }
.navlink { color: #fff; font-weight: 600; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 8px; padding: 5px 11px; }
.navlink:hover, .navlink.on { background: #fff; color: var(--purple-deep); }
.who { background: rgba(255, 255, 255, 0.16); border-radius: 99px; padding: 5px 11px; overflow-wrap: anywhere; }
/* The brand circles take whatever room is left after the title and never push anything onto a
   second row; when there is not enough room to show them whole, they go. */
.deco { flex: 1 1 0; min-width: 0; max-width: 190px; align-self: stretch; margin: -10px 0; position: relative; overflow: hidden; container-type: inline-size; }
.c { position: absolute; border-radius: 50%; opacity: 0.9; }
.c1 { width: 120px; height: 120px; left: 34px; bottom: -98px; background: var(--coral); }
.c2 { width: 70px; height: 70px; left: 118px; bottom: -48px; background: var(--lime); }
.c3 { width: 14px; height: 14px; left: 10px; bottom: 12px; background: var(--pink); }
@container (max-width: 188px) { .c { display: none; } }

.progress { display: grid; grid-template-columns: auto 150px; align-items: center; gap: 2px 12px; }
.p-line { font: 400 0.86rem var(--head); white-space: nowrap; }
.p-line strong { font-size: 1.05rem; }
progress { appearance: none; -webkit-appearance: none; border: 0; display: block; overflow: hidden; border-radius: 99px; background: var(--purple-tint); }
progress::-webkit-progress-bar { background: var(--purple-tint); }
progress::-webkit-progress-value { background: var(--purple); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--purple); border-radius: 99px; }
.band .bar { width: 150px; height: 8px; background: rgba(255, 255, 255, 0.28); }
.band .bar::-webkit-progress-bar { background: rgba(255, 255, 255, 0.28); }
.band .bar::-webkit-progress-value { background: var(--lime); }
.band .bar::-moz-progress-bar { background: var(--lime); }
.due { grid-column: 1 / -1; font-size: 0.72rem; color: rgba(255, 255, 255, 0.85); white-space: nowrap; }

.subbar { background: #fff; }
.subbar-in { max-width: var(--page); margin: 0 auto; padding: 10px 20px; display: grid; gap: 10px; }
.doctiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.doctiles a { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-s); text-decoration: none; background: var(--purple-pale); }
.doctiles a:hover { border-color: var(--purple); background: var(--purple-tint); }
.pdf { flex: none; font: 700 0.56rem/1 var(--body); letter-spacing: 0.05em; color: #fff; background: var(--coral-deep); border-radius: 5px; padding: 6px 5px 5px; }
.doctiles .doc-t { font-size: 0.82rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-block; font: 700 0.58rem/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--coral-deep); background: var(--coral-tint); border-radius: 99px; padding: 3px 7px; vertical-align: 1px; }

.chip.sign { color: #fff; background: var(--purple); }
.doctiles a.to-sign { border-color: var(--purple); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { font: 600 0.84rem var(--body); color: var(--soft); background: none; border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { background: var(--purple-tint); color: var(--purple-deep); }
.tab.on { background: var(--purple); color: #fff; }
.tab.guide { margin-left: auto; color: var(--purple-deep); }
.tab .n { font-size: 0.72rem; font-weight: 700; background: rgba(31, 34, 51, 0.08); border-radius: 99px; padding: 1px 7px; min-width: 22px; text-align: center; }
.tab.on .n { background: rgba(255, 255, 255, 0.25); }
body[data-show='todo'] .tx.done:not(.keep), body[data-show='done'] .tx:not(.done) { display: none; }
body[data-show='todo'] tr.rc.sent, body[data-show='done'] tr.rc:not(.sent) { display: none; }
.rc-empty { display: none; }
body[data-show='todo'] .tablewrap[hidden] ~ .rc-empty.todo, body[data-show='done'] .tablewrap[hidden] ~ .rc-empty.done { display: block; }

main { max-width: var(--page); margin: 0 auto; padding: 18px 20px 44px; }
.intro { margin: 0 0 14px; font-size: 0.9rem; color: var(--soft); }
.foot { color: var(--soft); font-size: 0.76rem; padding: 0 20px 28px; }
.foot a { color: inherit; }
.foot-in { max-width: var(--page); margin: 0 auto; border-top: 1px solid var(--line); padding-top: 14px; display: flex; justify-content: space-between; gap: 6px 20px; flex-wrap: wrap; }
.conf { font-weight: 700; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral-deep); }

/* ── cards and numbered headings ──────────────────────────────────────────────────────────── */
.panel, .tx, .tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.panel { padding: 18px 20px 12px; margin-bottom: 16px; }
.tx, .group h2.sec, .panel, h2.sec { scroll-margin-top: var(--stick, 0px); }
h2.sec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.02rem; font-weight: 700; color: var(--ink); padding-bottom: 10px; border-bottom: 2px solid var(--lime); margin-bottom: 14px; }
.secnum { flex: none; min-width: 26px; height: 26px; padding: 1px 7px 0; border-radius: 8px; background: var(--purple); color: #fff; font: 700 0.8rem var(--head); display: inline-flex; align-items: center; justify-content: center; }
.count { font: 400 0.82rem var(--body); color: var(--soft); margin-left: auto; white-space: nowrap; }
.lead { color: var(--soft); font-size: 0.9rem; }
.small { font-size: 0.84rem; color: var(--soft); }
.muted { color: var(--soft); }
.tip { background: var(--teal-tint); border: 1px solid #BFE1E7; border-radius: var(--r-s); padding: 10px 13px; font-size: 0.86rem; margin-bottom: 16px; }
.notice { background: var(--purple-tint); border: 1px solid #D5D2EC; border-radius: var(--r-s); padding: 11px 14px; margin-bottom: 16px; }
.notice.ok { background: var(--lime-tint); border-color: #D6DF8F; }

table.rules { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; font-size: 0.9rem; }
.rules th { width: 42%; text-align: left; vertical-align: top; background: var(--purple-pale); color: var(--ink); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.rules td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rules tr:last-child th, .rules tr:last-child td { border-bottom: 0; }

.docs ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.docs li a { display: flex; gap: 11px; align-items: flex-start; height: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-s); text-decoration: none; }
.docs li a:hover { border-color: var(--purple); background: var(--purple-pale); }
.docs .doc-t { display: block; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.doc-n { display: block; font-size: 0.82rem; color: var(--soft); margin-top: 2px; }

/* ── purchases ────────────────────────────────────────────────────────────────────────────── */
.group { margin-bottom: 22px; }
.group h2.sec { margin-bottom: 8px; }
.tx { padding: 14px 16px 10px; margin-bottom: 10px; border-left: 4px solid var(--coral); position: relative; }
.tx.done { border-left-color: var(--green); }
.tx header { padding-right: 70px; }
.tx-main { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tx-merchant, .tx-amt { font: 700 0.98rem var(--head); color: var(--ink); }
.tx-merchant { overflow-wrap: anywhere; }
.tx-amt { white-space: nowrap; }
.tx-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 0.82rem; color: var(--soft); margin-top: 3px; }
.tx-note { font-size: 0.84rem; color: var(--soft); margin: 6px 0 0; }
.badge { position: absolute; top: 13px; right: 14px; font: 700 0.62rem/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 99px; background: var(--coral-tint); color: var(--coral-deep); }
.tx.done .badge { background: var(--lime-tint); color: var(--green); }
fieldset.opts { border: 0; padding: 0; margin: 12px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
fieldset.opts legend { font-weight: 700; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); padding: 0; margin-bottom: 7px; width: 100%; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span { display: block; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: var(--r-s); font-weight: 600; font-size: 0.86rem; color: var(--ink); background: #fff; }
.opt input:hover + span { border-color: var(--purple); }
.opt input:checked + span { background: var(--purple); border-color: var(--purple); color: #fff; }
.opt input:focus-visible + span { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
.opt input:disabled + span { opacity: 0.6; }
.hint { font-size: 0.84rem; color: var(--teal-deep); min-height: 1.2em; margin: 4px 0 8px; }
.field span { display: block; font-size: 0.8rem; font-weight: 600; color: var(--soft); margin-bottom: 4px; }
textarea, input[type='email'], input[type='text'], input:not([type]) { width: 100%; font: inherit; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: 8px 10px; background: #fff; }
textarea:focus, input:focus { border-color: var(--purple); }
textarea:disabled, input:disabled { background: var(--purple-pale); color: var(--soft); }
.files { margin-top: 10px; }
.files ul { list-style: none; margin: 0 0 8px; padding: 0; font-size: 0.86rem; }
.files li { padding: 3px 0; overflow-wrap: anywhere; }
.btn { display: inline-block; font: 600 0.88rem var(--body); color: #fff; background: var(--purple); border: 1px solid var(--purple); border-radius: var(--r-s); padding: 9px 16px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--purple-deep); border-color: var(--purple-deep); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--purple-deep); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--purple-tint); border-color: var(--purple); }
.btn.small { padding: 6px 11px; font-size: 0.78rem; }
.btn.right { margin-left: auto; }
.upload:focus-within { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--coral-deep); text-decoration: underline; cursor: pointer; }
.state { font-size: 0.84rem; color: var(--green); min-height: 1.3em; margin: 8px 0 0; }
.state.error { color: var(--coral-deep); font-weight: 600; }
.declare { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-size: 0.88rem; background: var(--coral-tint); border: 1px solid #F3C4B5; border-radius: var(--r-s); padding: 11px 13px; }
.declare input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.declare.agree { background: var(--purple-tint); border-color: #D5D2EC; }
.grid2 { display: grid; gap: 12px 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 14px 0; }
.sigwrap { margin: 0 0 14px; }
.sig-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.sig-lab { font-weight: 700; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
canvas.sig { display: block; width: 100%; height: 170px; background: #fff; border: 1.5px dashed var(--purple); border-radius: var(--r-s); touch-action: none; cursor: crosshair; }
.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
.stepn { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--purple-tint); color: var(--purple-deep); font: 700 0.76rem var(--head); display: inline-flex; align-items: center; justify-content: center; padding-top: 1px; }
.stepw { font-weight: 600; color: var(--ink); min-width: 7.5em; }
.by { font-size: 0.84rem; color: var(--soft); }
.back { margin: 0 0 14px; }
.back a { display: inline-block; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: 6px 12px; font-weight: 600; font-size: 0.82rem; text-decoration: none; }

/* ── finance ──────────────────────────────────────────────────────────────────────────────── */
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tile { padding: 10px 14px 9px; border-top: 3px solid var(--lime); box-shadow: none; }
.tile-v { display: block; font: 700 1.25rem/1.15 var(--head); color: var(--ink); }
.tile-v small { font: 400 0.8rem var(--body); color: var(--soft); }
.tile-l { display: block; font-size: 0.78rem; color: var(--soft); margin-top: 3px; }
.tabs.links { border-top: 1px solid var(--line); padding-top: 8px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-s); margin-bottom: 10px; }
table.fin { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 1090px; }
table.fin.narrow { min-width: 0; }
.fin th, .fin td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fin thead th { background: var(--purple-pale); color: var(--soft); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid var(--line-strong); }
.fin tbody tr:hover { background: var(--purple-pale); }
.fin tbody tr:last-child th, .fin tbody tr:last-child td { border-bottom: 0; }
.fin tbody th a { font-weight: 700; color: var(--ink); text-decoration: none; }
.fin tbody th a:hover { color: var(--purple-deep); text-decoration: underline; }
.fin .sub { display: block; font-weight: 400; font-size: 0.76rem; color: var(--soft); }
.fin .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.frac { font-weight: 700; color: var(--ink); }
.mini { height: 5px; width: 80px; margin-top: 5px; }
.mini::-webkit-progress-value { background: var(--green); }
.mini::-moz-progress-bar { background: var(--green); }
table.fin.dash { min-width: 900px; }
table.fin.people { min-width: 1080px; }
table.fin.team { min-width: 760px; }
.fin td select { font: inherit; font-size: 0.8rem; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: #fff; color: var(--text); max-width: 190px; }
table.fin.rcs { min-width: 820px; }
.fin td input[type='email'], .fin td input[type='text'], .fin td input:not([type]) { padding: 6px 9px; font-size: 0.82rem; min-width: 210px; }
.fin .chk { width: 36px; text-align: center; }
.fin .chk input, .inline input { width: 16px; height: 16px; vertical-align: -3px; accent-color: var(--purple); }
.fin tr.rc.sent th a { font-weight: 600; }
.inline { display: inline-flex; align-items: center; gap: 7px; font-size: 0.86rem; }
.nomgr { margin-top: 5px; font-size: 0.76rem; color: var(--soft); }
.rowacts { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
form.email { display: inline; }
.btn.danger { background: #fff; color: var(--coral-deep); border-color: #F3C4B5; }
.btn.danger:hover { background: var(--coral-tint); border-color: var(--coral-deep); }
.bulkbar { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; margin: 14px 0 4px; }
.bulkbar + .state { margin: 0 0 8px; }
.subhead { font: 700 0.95rem var(--head); color: var(--ink); margin: 22px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.formrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wide2 { grid-column: 1 / -1; }
table.rules.slim { max-width: 520px; }
table.rules td { overflow-wrap: anywhere; }   /* long emails and references wrap on a phone */
a.tag.nolink:hover { text-decoration: underline; }
.tag { display: inline-block; text-decoration: none; font-weight: 700; font-size: 0.66rem; line-height: 1.2; letter-spacing: 0.02em; border-radius: 99px; padding: 4px 9px; white-space: nowrap; }
.tag.sent { background: var(--lime-tint); color: var(--green); }
.tag.going { background: var(--teal-tint); color: var(--teal-deep); }
.tag.wait { background: var(--purple-tint); color: var(--purple-deep); }
.tag.nolink { background: var(--coral-tint); color: var(--coral-deep); }
.tag.none { background: #EEF0F3; color: var(--soft); }
.dots { display: inline-flex; gap: 3px; margin-right: 8px; vertical-align: middle; }
.dot { width: 19px; height: 19px; border-radius: 50%; background: #EEF0F3; color: var(--soft); font-weight: 700; font-size: 0.6rem; display: inline-flex; align-items: center; justify-content: center; }
.dot.on { background: var(--green); color: #fff; }
.dot.next { background: var(--teal-tint); color: var(--teal-deep); outline: 1.5px solid var(--teal); }
.orderlist { list-style: none; counter-reset: ord; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.orderlist li { counter-increment: ord; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
.orderlist li::before { content: counter(ord); flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--purple); color: #fff; font: 700 0.78rem var(--head); display: inline-flex; align-items: center; justify-content: center; padding-top: 1px; }
.ord-on { display: flex; align-items: center; gap: 8px; min-width: 11em; }
.ord-on input { width: 17px; height: 17px; }
.ord-name { font-weight: 700; color: var(--ink); }
.ord-hint { flex: 1 1 240px; font-size: 0.84rem; color: var(--soft); }
.ord-move { display: flex; gap: 6px; }
#import-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
#import-form .state { flex-basis: 100%; margin: 0; }
.mailstate strong.on { color: var(--green); }
.mailstate strong.off { color: var(--coral-deep); }
.mailbtns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── smaller screens ──────────────────────────────────────────────────────────────────────── */
/* The Finance header holds six tiles and five tabs: too much to pin once they wrap. */
@media (max-width: 1099px) {
  .is-wide .top { position: static; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .band-in { padding: 9px 14px; gap: 8px 14px; }
  .band-title { padding-left: 12px; }
  .band-sub, .due, .deco { display: none; }
  .band-nav { margin-left: auto; }
  .band-extra { order: 5; flex-basis: 100%; margin-left: 0; }
  .progress { display: flex; gap: 10px; }
  .band .bar { flex: 1; width: auto; }
  .who { max-width: 44vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .subbar-in { padding: 8px 14px; gap: 8px; }
  /* Four documents in one swipeable row, so the pinned header stays short on a phone. */
  .doctiles { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .doctiles::-webkit-scrollbar { display: none; }
  .doctiles a { flex: none; padding: 7px 10px; }
  .tab { padding: 6px 10px; }
  main { padding: 14px 14px 40px; }
  .panel { padding: 16px 14px 10px; }
  .tx { padding: 13px 13px 9px; }
  .count { margin-left: 36px; flex-basis: 100%; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* A short screen (a phone on its side) has no room for a pinned header. */
@media (max-height: 560px) { .top { position: static; } }

/* ── portal additions (my-together2) ──────────────────────────────────────────────────────── */
.stack { display: grid; gap: 6px; max-width: 420px; margin-bottom: 10px; }
.stack .field span { margin: 6px 0 0; }
.stack > .btn, .stack .formrow { margin-top: 8px; justify-self: start; }
#otp { letter-spacing: 0.4em; font: 700 1.25rem var(--head); max-width: 220px; }
.or { display: flex; align-items: center; gap: 10px; max-width: 420px; color: var(--soft); font-size: 0.8rem; margin: 14px 0 10px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.notice.err { background: var(--coral-tint); border-color: #F3C4B5; color: var(--coral-deep); }
.navlink { background: none; font: inherit; font-weight: 600; cursor: pointer; }
button.navlink { font-size: 0.8rem; }
.cards { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.cards a { display: grid; gap: 3px; height: 100%; padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: var(--r-s); text-decoration: none; }
.cards a:hover { border-color: var(--purple); background: var(--purple-pale); }
.card-t { font: 700 0.98rem var(--head); color: var(--ink); }
.card-n { font-size: 0.84rem; color: var(--soft); }
.pids { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pid { display: inline-block; font: 700 0.95rem var(--head); color: var(--purple-deep); background: var(--purple-tint); border-radius: var(--r-s); padding: 7px 12px; }
.tiles.ci-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
table.fin.ci { min-width: 760px; }
.fin.ci .ci-action { min-width: 320px; max-width: 520px; }
.fin td.late { color: var(--coral-deep); font-weight: 600; }
.fin .tag + .sub { margin-top: 3px; }
.rules .sub { display: block; font-size: 0.8rem; color: var(--soft); }
.ci-lead { font: 400 1rem/1.5 var(--body); color: var(--ink); margin: 0 0 14px; }
ol.log { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 8px; }
ol.log li { padding: 9px 12px; border: 1px solid var(--line); border-left: 3px solid var(--lime); border-radius: var(--r-s); font-size: 0.88rem; overflow-wrap: anywhere; }
@media (max-width: 1099px) { .tiles.ci-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .tiles.ci-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fin.ci tbody th { white-space: nowrap; }

/* ── sign-in (the my.together2 Power Pages sign-in layout) ───────────────────────────────── */
.si-body { background: #fff; }
.t2-signin { --t2-purple: #6561a8; --t2-ink: #28244a; --t2-purple-tint: #eae8f2; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #fff; font-family: var(--head); }
.si-art { position: relative; overflow: hidden; background: var(--t2-purple-tint); display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px 0; }
.a-brand img, .si-logo img { height: 30px; width: auto; display: block; }
.si-tag { margin: 28px 0 0; max-width: 30ch; font-weight: 300; font-size: clamp(28px, 2.6vw, 40px); line-height: 1.15; color: var(--t2-ink); text-wrap: balance; }
.si-stage { position: relative; width: 100%; max-width: 620px; aspect-ratio: 960 / 700; align-self: center; margin-top: 24px; }
.si-stage > img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.hc { position: absolute; inset: 0; pointer-events: none; }
.hc i { position: absolute; aspect-ratio: 1; border-radius: 50%; animation: hc-drift 9s ease-in-out infinite; }
.hc i:nth-child(2n) { animation-duration: 12s; animation-direction: reverse; }
.hc .h1 { width: 56%; left: 24%; top: 0; background: var(--t2-purple); }
.hc .h2 { width: 22%; left: -2%; top: 40%; background: var(--lime); }
.hc .h3 { width: 18%; left: 84%; top: 44%; background: var(--coral); }
.hc .h4 { width: 11%; left: 6%; top: 6%; background: #ffd400; }
.hc .h5 { width: 14%; left: 84%; top: 6%; background: transparent; border: 6px solid var(--teal); }
@keyframes hc-drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .hc i { animation: none; } }
.si-panel { display: flex; flex-direction: column; padding: 48px clamp(24px, 6vw, 96px); background: #fff; }
.si-card { width: 100%; max-width: 420px; margin: auto; }
.si-logo { display: none; margin-bottom: 28px; }
.si-eyebrow { font-weight: 500; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t2-purple); margin: 0 0 12px; }
.si-card h1 { font-weight: 700; font-size: 30px; line-height: 1.2; color: var(--t2-ink); margin: 0 0 10px; }
.si-lead { font: 16px/1.55 var(--body); color: #5b6170; margin: 0 0 24px; }
.si-form { display: grid; gap: 8px; }
.si-label { font: 600 0.82rem var(--body); color: #5b6170; }
.si-form input { width: 100%; font: 16px var(--body); color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px; padding: 13px 14px; background: #fff; }
.si-form input:focus { border-color: var(--t2-purple); outline: none; box-shadow: 0 0 0 3px var(--purple-tint); }
.si-form #otp { font: 700 1.4rem var(--head); letter-spacing: 0.4em; }
.si-sent { font: 15px/1.5 var(--body); color: #5b6170; margin: 0 0 4px; }
.si-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; border-radius: 12px; background: var(--t2-purple); color: #fff; font: 700 17px var(--head); text-decoration: none; border: 1px solid var(--t2-purple); cursor: pointer; margin-top: 8px; }
.si-btn:hover { background: #4f4b8c; border-color: #4f4b8c; }
.si-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.si-btn.ghost, .si-btn.ms-btn { background: #fff; color: var(--t2-ink); border-color: var(--line-strong); }
.si-btn.ghost:hover, .si-btn.ms-btn:hover { background: var(--purple-pale); border-color: var(--t2-purple); }
.si-btn.ghost svg { stroke: var(--t2-purple); }
.si-btn svg.ms { stroke: none; width: 19px; height: 19px; }
.si-link { background: none; border: 0; padding: 6px 0; font: 600 0.9rem var(--body); color: #4f4b8c; text-decoration: underline; cursor: pointer; justify-self: start; }
[data-passkey] { margin-top: 4px; }
.si-msg { font: 0.9rem var(--body); color: var(--coral-deep); min-height: 1.3em; margin: 10px 0 0; }
.si-msg:empty { min-height: 0; margin: 0; }
.si-how { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; font: 14.5px/1.5 var(--body); color: #5b6170; }
.si-how li { display: flex; gap: 10px; align-items: flex-start; }
.si-how b { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--t2-purple-tint); color: #4f4b8c; font: 700 12px/22px var(--head); text-align: center; }
.si-secure { display: flex; gap: 10px; align-items: center; margin-top: 20px; padding: 10px 12px; border-radius: 10px; background: #f8f8fc; border: 1px solid #e3e5ec; font: 13px var(--body); color: #5b6170; }
.si-secure svg { flex: none; width: 18px; height: 18px; stroke: var(--t2-purple); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.si-divider { display: flex; align-items: center; gap: 12px; margin: 28px 0 6px; font: 500 12px var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--t2-purple); }
.si-divider::before, .si-divider::after { content: ''; flex: 1; height: 1px; background: #e3e5ec; }
.si-help { font: 13.5px/1.5 var(--body); color: #5b6170; margin: 10px 0 0; }
.si-error { font: 14px/1.5 var(--body); color: var(--coral-deep); background: var(--coral-tint); border: 1px solid #F3C4B5; border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; }
.si-badges { display: flex; justify-content: center; gap: 28px; margin: 28px 0 14px; flex-wrap: wrap; }
.si-badges a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: #55595c; font: 500 12px/1.3 var(--head); }
.si-badges a:hover span, .si-badges a:focus span { color: #4f4b8c; text-decoration: underline; }
.si-badges img { width: 72px; height: 72px; transition: transform 0.2s; }
.si-badges a:hover img, .si-badges a:focus img { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .si-badges img { transition: none; } }
.si-foot { padding-top: 24px; text-align: center; font: 12.5px var(--body); color: #5b6170; max-width: 420px; margin-inline: auto; width: 100%; }
.si-foot p { margin: 0 0 6px; }
@media (max-width: 900px) {
  .t2-signin { grid-template-columns: 1fr; }
  .si-art { padding: 24px 24px 0; }
  .si-art-top { display: none; }
  .si-stage { max-width: 420px; margin-top: 0; }
  .si-panel { padding: 32px 24px; }
  .si-logo { display: block; }
}

/* ── sign-in fits the window (no page scroll on laptops) ────────────────────────────────────
   Two columns fill exactly one screen. Spacing scales with the screen's height; the picture
   sizes itself to the room left under the tagline; on short screens the steps and badges tighten
   first. If a window is shorter still, only the card column scrolls, never the page. */
@media (min-width: 901px) {
  .si-body { overflow: hidden; }
  .t2-signin { height: 100vh; height: 100dvh; min-height: 0; }
  .si-art { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: clamp(20px, 4vh, 40px) clamp(24px, 3.4vw, 48px) 0; }
  .si-tag { margin-top: clamp(12px, 2.6vh, 28px); font-size: clamp(24px, min(2.6vw, 4.6vh), 40px); }
  .si-stage { align-self: end; justify-self: center; height: auto; width: min(100%, 620px, calc((100dvh - 190px) * 960 / 700)); max-height: 100%; margin-top: 8px; }
  .si-panel { overflow-y: auto; padding: clamp(16px, 3.6vh, 48px) clamp(24px, 5vw, 96px) clamp(12px, 2vh, 24px); }
  .si-card { margin: auto; }
  .si-eyebrow { margin-bottom: clamp(4px, 1vh, 12px); }
  .si-card h1 { font-size: clamp(24px, 3.6vh, 30px); margin-bottom: clamp(4px, 0.8vh, 10px); }
  .si-lead { font-size: clamp(14px, 1.9vh, 16px); margin-bottom: clamp(10px, 2.2vh, 24px); }
  .si-form { gap: clamp(4px, 0.8vh, 8px); }
  .si-form input { padding: clamp(9px, 1.4vh, 13px) 14px; }
  .si-btn { min-height: clamp(42px, 5.6vh, 52px); font-size: clamp(15px, 2vh, 17px); margin-top: clamp(4px, 0.8vh, 8px); }
  .si-how { margin-top: clamp(10px, 2vh, 22px); gap: clamp(4px, 0.9vh, 10px); font-size: clamp(13px, 1.7vh, 14.5px); }
  .si-secure { margin-top: clamp(8px, 1.8vh, 20px); padding: 8px 12px; }
  .si-divider { margin: clamp(12px, 2.6vh, 28px) 0 4px; }
  .si-help { margin-top: 6px; font-size: 13px; }
  .si-badges { gap: 22px; margin: clamp(10px, 2.4vh, 28px) 0 clamp(4px, 1vh, 14px); }
  .si-badges img { width: clamp(44px, 7vh, 72px); height: clamp(44px, 7vh, 72px); }
  .si-foot { padding-top: clamp(6px, 1.6vh, 24px); font-size: 12px; }
  .si-foot p { margin-bottom: 3px; }
}
/* Laptops under about 800px tall: the badges sit beside their labels, in one short row. */
@media (min-width: 901px) and (max-height: 800px) {
  .si-badges a { flex-direction: row; gap: 8px; text-align: left; }
  .si-badges img { width: 40px; height: 40px; }
}
/* Short screens: the three steps go; the lead and the button already say how it works. */
@media (min-width: 901px) and (max-height: 700px) {
  .si-how { display: none; }
  .si-help { display: none; }
}
@media (min-width: 901px) and (max-height: 600px) {
  .si-badges, .si-secure { display: none; }
}
/* Entering the code: only the code matters, so the extras step aside until "Use a different email". */
.si-card:has([data-step="code"]:not([hidden])) :is([data-passkey], .si-how, .si-secure, .si-divider, .ms-btn, .si-help) { display: none; }
@media (min-width: 901px) and (max-height: 780px) { .si-help { display: none; } }
/* Laptops: on the wider pages (tiles + tabs), the header scrolls away so the table gets the room. */
@media (max-height: 800px) { .is-wide .top { position: static; } }

.tiles.fu-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pid-s { font: 700 0.86rem var(--head); color: var(--purple-deep); }
@media (max-width: 720px) { .tiles.fu-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* My shifts and progress notes */
ol.shifts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.shift { border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: var(--r-s); padding: 10px 14px; }
.shift-h .sub { display: block; font-size: 0.8rem; color: var(--soft); }
.shift-p { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.shift-p li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.safety { background: var(--coral-tint); border: 2px solid var(--coral-deep); border-radius: var(--r-s); padding: 12px 14px; color: var(--coral-deep); margin: 8px 0; }
.safety p { margin: 6px 0 0; color: var(--text); }
.note-form textarea, .note-form input[type='text'], .note-form input:not([type]) { max-width: 640px; }
.stack:has(.note-form), form.note-form { max-width: 680px; }
ul.nl { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
ul.nl li { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
ul.nl .sub { display: block; font-size: 0.8rem; color: var(--soft); margin-top: 2px; }
h2.sec form.formrow { margin-left: auto; gap: 6px; }
h2.sec form.formrow input { width: 90px; padding: 5px 8px; font-size: 0.85rem; }

/* Family documents (Stage 2b) */
a.tile { text-decoration: none; color: inherit; }
a.tile:hover { background: var(--purple-pale); }
.viewer-pages { display: grid; gap: 12px; justify-items: center; margin-top: 10px; }
.pdf-page { display: block; width: 100%; max-width: 900px; height: auto; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; }
.sig-pad { display: block; width: 100%; max-width: 520px; height: auto; aspect-ratio: 13 / 4; border: 1px dashed var(--line-strong); border-radius: var(--r-s); background: #fff; touch-action: none; cursor: crosshair; }
.rlist { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.rlist li { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
.rlist .sub { display: block; font-size: 0.8rem; color: var(--soft); margin-top: 2px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
label.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .tiles.fu-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Family messages (Stage 2c) */
ol.thread { list-style: none; padding: 0; display: grid; gap: 10px; }
ol.thread li { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-s); }
ol.thread li.from-family { border-left: 4px solid var(--lime); }
ol.thread li.from-t2 { border-left: 4px solid var(--purple); background: var(--purple-pale); }
.msg-body { margin: 6px 0; }
.btn.small { padding: 5px 10px; font-size: 0.82rem; }
details.rights { margin-top: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-s); }
details.rights summary { font-weight: 600; cursor: pointer; }

/* Next steps (Stage 2d) */
.ns-h { font-size: 1rem; margin: 14px 0 6px; }
ol.told { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; border-left: 3px solid #c7d63b; display: grid; gap: 6px; font-size: .92rem; }
ol.told li { position: relative; }
ol.told li::before { content: ""; position: absolute; left: -21px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: #6561a8; }
.ns-form { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.ns-form .opt .sub { display: block; font-weight: 400; }

/* Privacy, Complaints, Accessibility, Help (Stage 2f) */
.info-list { margin: 0 0 8px; padding-left: 1.2em; display: grid; gap: 6px; }
.notice-urgent { border-left: 4px solid #a23a17; }
.foot a, .si-foot a { color: inherit; }

/* Employee and HR (Stage 3) */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 20px; }
.two-col .formrow { grid-column: 1 / -1; }
details > summary { cursor: pointer; font-weight: 600; margin: 12px 0 6px; }
.stack.two-col { max-width: 860px; }
input[type='tel'], input[type='date'], input[type='datetime-local'], input[type='time'], input[type='number'], select { width: 100%; font: inherit; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: 8px 10px; background: #fff; }
input[type='file'] { font: inherit; }
/* Let wide tables scroll inside their box instead of widening the page on phones. */
main > *, .panel { min-width: 0; }
.tablewrap { max-width: 100%; position: relative; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form input { width: auto; min-width: 180px; padding: 5px 8px; }
.btn.small { padding: 5px 10px; font-size: 0.8rem; }
.opts .check { display: block; margin: 4px 0; }
.overdue { color: var(--coral-deep); }
.inline-form input[type="checkbox"] { min-width: 0; width: 18px; }

/* Circular resolutions (Stage 4e-3): the exact text directors agree to. */
.restext { margin: 14px 0; padding: 12px 16px; border-left: 4px solid var(--purple, #5B4FA8); background: var(--purple-tint); border-radius: var(--r-s); }
.restext p { margin: 0 0 8px; } .restext p:last-child { margin-bottom: 0; }
code { overflow-wrap: anywhere; }

/* ── UI review Phase 1 (17 Nov 2026): slim pinned bar with the portals, a module row, one full-width layout ───────────── */
:root { --page: none; --wide: none; --gutter: clamp(14px, 2.5vw, 40px); --bar: 56px; }
.top { position: sticky; top: 0; z-index: 10; background: var(--purple); color: #fff; box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(31, 34, 51, 0.35); }
.bar-in { display: flex; align-items: center; gap: 8px 18px; min-height: var(--bar); padding: 6px var(--gutter); }
.brand { flex: none; display: flex; align-items: center; }
.portals { display: flex; gap: 6px; align-items: center; min-width: 0; padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, 0.35); }
.plink { color: #fff; font: 600 0.92rem var(--body); text-decoration: none; padding: 9px 14px; border-radius: 9px; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
.plink:hover { background: rgba(255, 255, 255, 0.16); }
.plink.on { background: #fff; color: var(--purple-deep); }
.portal-name { font: 700 1.05rem var(--head); padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, 0.35); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar-end .who { max-width: 26ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .navlink { min-height: 36px; display: inline-flex; align-items: center; white-space: nowrap; }
.pmenu { display: none; margin-left: auto; position: relative; }
.pmenu summary { list-style: none; cursor: pointer; color: #fff; font: 600 0.9rem var(--body); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 9px; padding: 9px 14px; min-height: 40px; }
.pmenu summary::-webkit-details-marker { display: none; }
.pmenu[open] summary { background: #fff; color: var(--purple-deep); }
.pmenu-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; background: #fff; color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 12px 28px -12px rgba(31, 34, 51, 0.45); padding: 8px; display: grid; gap: 4px; }
.pmenu-list nav { display: grid; gap: 2px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.pmenu-list .plink { color: var(--ink); min-height: 44px; }
.pmenu-list .plink:hover { background: var(--purple-tint); }
.pmenu-list .plink.on { background: var(--purple); color: #fff; }
.pmenu-list .who { color: var(--soft); background: none; font-size: 0.8rem; padding: 4px 14px; max-width: none; overflow-wrap: anywhere; white-space: normal; }
.pmenu-list .navlink { color: var(--purple-deep); border-color: var(--line-strong); justify-content: center; min-height: 44px; }

.mods { background: #fff; border-bottom: 1px solid var(--line); }
.mods-in { display: flex; gap: 2px; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
.mods-in::-webkit-scrollbar { display: none; }
.mlink { flex: none; color: var(--soft); font: 600 0.9rem var(--body); text-decoration: none; padding: 12px 14px 10px; border-bottom: 3px solid transparent; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.mlink:hover { color: var(--purple-deep); background: var(--purple-pale); }
.mlink.on { color: var(--purple-deep); border-bottom-color: var(--purple); }

.subbar { border-bottom: 1px solid var(--line); }
.subbar-in, main { padding-left: var(--gutter); padding-right: var(--gutter); }
.foot { padding: 0 var(--gutter) 28px; }
.page-h { font-size: 1.3rem; font-weight: 700; color: var(--ink); margin: 2px 0 12px; overflow-wrap: anywhere; }
/* Reading text keeps a readable line length even when the page is very wide. */
.intro, .panel > p:not(.notice), .panel > .lead, .panel > ul:not(.cards):not(.rlist):not(.pids) > li { max-width: 90ch; }
/* Widescreens: pages made of several short panels flow into two columns. Lists and tables (wide pages) stay one column. */
@media (min-width: 1700px) {
  main.flow:has(> .panel ~ .panel) { columns: 2; column-gap: 20px; }
  main.flow > .panel { break-inside: avoid; }
  main.flow > :not(.panel) { column-span: all; }
}
@media (max-width: 899px) {
  .portals, .bar-end { display: none; }
  .pmenu { display: block; }
  .portal-name { padding-left: 12px; font-size: 0.98rem; }
  .brand img { width: 112px; height: auto; }
}
@media (max-height: 420px) { .top { position: static; } }
.small-only { display: none; }
@media (max-width: 899px) { .small-only { display: inline; } }
/* Tiles and tabs sit under the page name, as a card in the page. */
main .subbar { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; box-shadow: var(--shadow); }
main .subbar-in { padding: 12px 14px; }
.pmenu summary { padding: 7px 13px; line-height: 1.3; min-height: 0; }
@media (max-width: 899px) { .bar-in { padding-top: 8px; padding-bottom: 8px; } }
/* The closed menu's hidden content must not add height to the bar. */
.pmenu { height: 36px; align-self: center; }
.pmenu summary { height: 36px; display: flex; align-items: center; }

/* ── UI review Phase 2: home pages that show what needs you ─────────────────────────────────── */
.home-actions { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 16px; column-span: all; }
.bigbtn { display: grid; gap: 3px; text-decoration: none; background: var(--purple); color: #fff; border-radius: var(--r); padding: 16px 18px; min-height: 76px; align-content: center; box-shadow: var(--shadow); }
.bigbtn:hover { background: var(--purple-deep); }
.bigbtn.alert { background: #fff; color: var(--coral-deep); border: 2px solid var(--coral); }
.bigbtn.alert:hover { background: var(--coral-tint); }
.bigbtn-t { font: 700 1.05rem var(--head); }
.bigbtn-n { font-size: 0.84rem; opacity: 0.92; }
.tiles.home-tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 8px; }
.home-tiles .tile { min-height: 84px; border-top-color: var(--line-strong); }
.home-tiles .tile.has { border-top-color: var(--purple); }
.home-tiles .tile.hot { border-top-color: var(--coral); background: #FFF9F7; }
.home-tiles .tile-l { font-size: 0.84rem; }
.tile-late { display: inline-block; margin-top: 5px; font: 700 0.7rem var(--body); color: var(--coral-deep); background: var(--coral-tint); border-radius: 99px; padding: 2px 8px; }
.steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
.steps .step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--purple-tint); color: var(--purple-deep); font: 700 0.8rem var(--head); display: inline-flex; align-items: center; justify-content: center; }
.steps li.done .step-n { background: var(--lime-tint); color: var(--green); }
.steps .step-t { flex: 1 1 200px; }

/* ── UI review Phase 3: page consistency ─────────────────────────────────────────────────────── */
/* Text sizes: 16px body, nothing you read under 14px. */
body { font-size: 16px; }
.small, .card-n, .tile-l, .home-tiles .tile-l, .intro, .lead, .count, .fin .sub, .sub, .bigbtn-n, .tab, .mlink, .plink { font-size: 0.875rem; }
table.fin { font-size: 0.9rem; }
.fin thead th { font-size: 0.75rem; }
.tag, .tile-late, .chip { font-size: 0.75rem; }
.foot { font-size: 0.8rem; }
.conf { font-size: 0.72rem; }
.btn.small { font-size: 0.875rem; padding: 7px 12px; }
.fin td select, .fin td input[type='email'], .fin td input[type='text'], .fin td input:not([type]) { font-size: 0.875rem; }
/* Touch screens: controls at least 44px high. */
@media (pointer: coarse) {
  .btn, .btn.small, .tab, .navlink, button, select, summary,
  input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='hidden']) { min-height: 44px; }
  .btn, .btn.small, .tab { display: inline-flex; align-items: center; justify-content: center; }
  details:not(.pmenu) > summary { padding-block: 11px; min-height: 0; }
  .pmenu summary { height: 40px; min-height: 40px; }
  .pmenu { height: 40px; }
  .opt, .check { min-height: 44px; align-items: center; }
  main a:not(.btn):not(.tile):not(.bigbtn):not(.tab) { padding-block: 3px; }
}
/* Phones: list tables become stacked cards (cells are labelled by app.js). */
@media (max-width: 720px) {
  .tablewrap:has(> table.fin.stacked) { border: 0; overflow: visible; }
  table.fin.stacked, table.fin.stacked.narrow, table.fin.stacked.ci, table.fin.stacked.people { display: block; min-width: 0; }
  table.fin.stacked thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.fin.stacked tbody { display: grid; gap: 10px; }
  table.fin.stacked tr { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: var(--r-s); padding: 10px 12px; }
  table.fin.stacked th[scope='row'] { display: block; padding: 0 0 6px; border: 0; font-size: 1rem; white-space: normal; }
  table.fin.stacked td { display: block; position: relative; padding: 5px 0 5px 42%; border: 0; min-height: 30px; white-space: normal; overflow-wrap: anywhere; }
  table.fin.stacked td::before { content: attr(data-label); position: absolute; left: 0; top: 6px; width: 39%; font-weight: 600; font-size: 0.8rem; color: var(--soft); }
  table.fin.stacked td:not([data-label]) { padding-left: 0; }
  table.fin.stacked td:empty { display: none; }
  table.fin.stacked .ci-action { min-width: 0; max-width: none; }
  table.fin.stacked td select { max-width: 100%; }
  table.fin.stacked td input[type='email'], table.fin.stacked td input[type='text'] { min-width: 0; width: 100%; }
}

/* ── UI review Phase 4: accessibility fixes ─────────────────────────────────────────────────── */
/* The signed-in email: white on the deep purple (8:1), not on a translucent white (3.9:1). */
.bar-end .who { background: var(--purple-deep); color: #fff; }
/* Keyboard users: a control scrolled to by Tab or a link isn't hidden under the pinned bar (WCAG 2.4.11). */
html { scroll-padding-top: calc(var(--bar) + 12px); }
/* Large text (200%) on a narrow screen: the bar wraps instead of pushing the page sideways (WCAG 1.4.4, 1.4.10). */
.bar-in { flex-wrap: wrap; }
.pmenu-list { max-width: calc(100vw - 24px); }
table.fin.stacked thead, .fin thead { left: 0; }
/* Long emails and status tags wrap rather than push the page sideways at large text sizes. */
.foot a, .foot span { overflow-wrap: anywhere; }
.foot-in > span { min-width: 0; }
@media (max-width: 480px) { .tag { white-space: normal; } }
/* The hidden column headings of a stacked table must not widen the page (overflow needs a block box). */
@media (max-width: 720px) { table.fin.stacked thead { display: block; } }
/* Tile labels wrap (long words like "Commission" at large text sizes), and narrow screens get one tile per row at 200% text. */
.tile-l, .tile-v { overflow-wrap: anywhere; }
.tile { min-width: 0; }
/* Filter box above long lists (Phase 4). */
.listfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; }
.listfilter label { font-weight: 600; font-size: 0.875rem; color: var(--ink); }
.listfilter input { flex: 1 1 220px; max-width: 420px; font: inherit; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: #fff; min-height: 40px; }
.listfilter .lf-n { font-size: 0.875rem; color: var(--soft); }
table.fin tr[hidden] { display: none !important; }
/* The count in the selected tab: white on the deep purple (8:1), not on translucent white (3.3:1). */
.tab.on .n { background: var(--purple-deep); color: #fff; }

/* ── Transitions (Stage 5b) ─────────────────────────────────────────────────────────────────── */
.titems { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.titem { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; background: #fff; }
.titem-h { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.titem-t { flex: 1 1 260px; }
.titem .inline-form { margin-top: 6px; }
.titem-upd, .titem-note { margin: 4px 0 0 14px; }
.tpost { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.tpost.must { border-left: 4px solid var(--coral); }
.tpost-b { white-space: pre-wrap; overflow-wrap: anywhere; }
.treply { margin: 8px 0 0 16px; padding-left: 10px; border-left: 3px solid var(--line-strong); }
.treply p { margin-bottom: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.titem .inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.titem .inline-form select { width: auto; max-width: 100%; }
.titem .inline-form input[type='text'] { flex: 1 1 200px; min-width: 0; width: auto; }
@media (max-width: 720px) { .tiles.home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-tiles .tile { min-height: 0; } }
.tworker { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin-bottom: 12px; background: var(--purple-pale); }
.tworker > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 4px 0; }
.hist { white-space: pre-wrap; font: 0.8rem/1.4 var(--body); color: var(--soft); margin: 4px 0 0; overflow-wrap: anywhere; }

/* ── UI review 3.1 and B8 (17 Nov 2026): detail pages in two columns; forms use the room they have ───────────────── */
/* The record and its actions on the left, its history on the right; stacked (record first) below 1100 px. */
.detail { display: grid; gap: 0 20px; column-span: all; }
.detail-main, .detail-side { min-width: 0; }
@media (min-width: 1100px) {
  .detail { grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr); align-items: start; }
}
/* Forms were capped at 420 px and sat as a thin strip on wide screens. Now up to 760 px (two-column forms 1100 px),
   and in a detail page's column they fill the panel. */
.stack, .stack:has(.note-form), form.note-form { max-width: 760px; }
.stack input[type='date'], .stack input[type='datetime-local'], .stack input[type='time'], .stack input[type='number'], .stack input[type='tel'] { max-width: 320px; }
.stack.two-col { max-width: 1100px; }
.detail .stack, .detail form.note-form { max-width: none; }

/* Stage 6a: a seventh portal (Business Services) for the CEO. On laptop widths the portal buttons sit closer and the
   signed-in email is shortened (the full address shows on hover), so the bar stays one line. On phones a long portal
   name is shortened too. */
@media (min-width: 900px) and (max-width: 1439px) {
  .portals { gap: 2px; padding-left: 12px; }
  .plink { padding: 9px 10px; }
  .bar-end .who { max-width: 14ch; }
}
@media (max-width: 899px) {
  .bar-in { flex-wrap: nowrap; }
  .portal-name { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .pmenu { flex: none; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .plink { padding: 8px 7px; font-size: 0.86rem; }
  .brand img { width: 112px; height: auto; }
}

/* Stage 6e: dropdowns in a row of filters size to their content instead of the full width. */
.inline-form select { width: auto; max-width: 100%; }

/* Roster (was the Service Delivery page): a tile that filters the list, and the break between the fortnight's two weeks */
a.tile.on { background: var(--purple-pale); border-top-color: var(--purple); }
hr.roster-wk { border: 0; border-top: 2px dashed var(--line); margin: 18px 0 6px; }
table.fin.roster th[scope="row"] { white-space: nowrap; }
@media (max-width: 720px) { table.fin.roster th[scope="row"] { white-space: normal; } }
/* Roster grid for one location: a card per day, seven across; one column on a phone */
ol.rgrid { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rday { border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; min-width: 0; background: #fff; }
.rday.today { border-top-color: var(--purple); }
.rday-h { font: 700 0.9rem var(--head); color: var(--ink); margin: 0 0 6px; }
.rday-h .sub { display: block; font: 400 0.78rem var(--body); color: var(--soft); margin-top: 2px; }
ul.rshifts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 0.84rem; }
ul.rshifts li { padding-top: 6px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
ul.rshifts li.carry { color: var(--soft); }
.rtime { display: block; font-weight: 600; }
@media (max-width: 1299px) { ol.rgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { ol.rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { ol.rgrid { grid-template-columns: minmax(0, 1fr); } }
.rrole { display: block; color: var(--soft); font-size: 0.78rem; }
/* Roster coverage bar (houses) and the "Needs a look" lines */
svg.cov { display: block; width: 100%; height: 8px; border-radius: 4px; margin: 0 0 4px; border: 1px solid var(--line); }
.cov-w { fill: var(--purple); }
.cov-n { fill: var(--purple-tint); }
.cov-g { fill: #fff; }
.cov-t { font-size: 0.78rem; color: var(--soft); margin: 0 0 6px; }
.cov-t.gap { color: var(--coral-deep); }
details.flag { border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 12px; margin: 0 0 6px; }
details.flag summary { cursor: pointer; font-weight: 600; min-height: 28px; }
details.flag ul { margin: 8px 0 2px; padding-left: 18px; font-size: 0.86rem; display: grid; gap: 4px; }
/* Roster views: staff grid, Now and next, and printing a location */
@media (min-width: 721px) { table.fin.staffgrid { min-width: 900px; } table.fin.staffgrid.fn { min-width: 1700px; } }
@media (max-width: 720px) { table.fin.stacked.staffgrid { display: block; min-width: 0; } }
table.fin.staffgrid th.today { background: var(--purple-pale); }
table.fin.staffgrid td { vertical-align: top; }
.sc { display: block; white-space: nowrap; font-size: 0.8rem; }
.sc + .sc { margin-top: 3px; }
@media (max-width: 720px) { .sc { white-space: normal; } }
ol.rgrid.rnow { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rnow-l { font: 700 0.72rem var(--head); text-transform: uppercase; letter-spacing: 0.04em; color: var(--soft); margin: 8px 0 2px; }
.printonly { display: none; }
@media print {
  body:has(.roster-print) { background: #fff; }
  body:has(.roster-print) .top, body:has(.roster-print) nav.mods, body:has(.roster-print) .subbar, body:has(.roster-print) .intro,
  body:has(.roster-print) .page-h, body:has(.roster-print) .noprint, body:has(.roster-print) .skip, body:has(.roster-print) .foot,
  .roster-print h2.sec, .roster-print .formrow, .roster-print .inline-form, .roster-print svg.cov { display: none !important; }
  .roster-print { border: 0; box-shadow: none; padding: 0; margin: 0; }
  .roster-print .printonly { display: block; font-size: 10pt; margin: 0 0 6pt; }
  .roster-print ol.rgrid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 8pt; }
  .roster-print .rday { break-inside: avoid; padding: 4px 6px; }
  .roster-print .rday-h { font-size: 9pt; }
  .roster-print ul.rshifts, .roster-print .cov-t, .roster-print .small { font-size: 8pt; }
  .roster-print .tag { border: 1px solid #999; background: none; color: #000; }
  @page { size: A4 landscape; margin: 10mm; }
}
.rwarn { display: block; font-size: 0.78rem; color: var(--coral-deep); margin-top: 2px; }
a.rtime { text-decoration: underline; color: inherit; }
/* Roster: adding a shift from a day card */
.rday .radd { margin: 8px 0 0; font-size: 0.82rem; }
.rday .radd a { font-weight: 600; }
@media print { .rday .radd { display: none; } }
/* Wellbeing pulse check */
.pulse-q legend { font-weight: 600; margin-bottom: 6px; }
.pulse-q { margin: 18px 0 8px; }
[data-pulse] [hidden] { display: none !important; }
.help-now { border-left: 4px solid var(--purple); }

/* Wellbeing site plan (Slice 3): Risk Register levels (Risk Management Policy v2.0 §5.3). Text says the level too. */
.lv { display: inline-block; padding: 1px 6px; border-radius: 4px; font-weight: 600; white-space: nowrap; }
/* Wellbeing trend lines (Slice 7b): decorative, beside a table that holds the numbers. */
.spark { display: inline-block; vertical-align: middle; overflow: visible; }
.lv-low { background: #e3f1e6; color: #1d4d2a; }
.lv-mod { background: #fdf3d0; color: #5c4400; }
.lv-high { background: #fde2c8; color: #6b3200; }
.lv-vhigh { background: #f9cfcf; color: #7a1414; }
.lv-ext { background: #7a1414; color: #fff; }

/* Board strategy dashboard (migration 0074): RAG always says its colour in words, with a shape, never colour alone (WCAG 1.4.1). */
.rag { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 0.72rem; line-height: 1.2; border-radius: 99px; padding: 4px 9px; white-space: nowrap; }
.rag-green { background: #e3f1e6; color: #1d4d2a; }
.rag-amber { background: #fdf3d0; color: #5c4400; }
.rag-red { background: #f9cfcf; color: #7a1414; }
.trend { white-space: nowrap; font-size: 0.82rem; color: var(--soft); }
.needs li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.needs li:last-child { border-bottom: 0; }
.needs .sub { display: block; font-size: 0.8rem; color: var(--soft); margin-top: 2px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 12px; font-size: 0.88rem; }
dl.kv dt { color: var(--soft); font-weight: 600; }
dl.kv dd { margin: 0; }
ul.timeline { list-style: none; margin: 0; padding: 0; font-size: 0.84rem; }
ul.timeline li { padding: 7px 0; border-bottom: 1px solid var(--line); }
ul.timeline .sub { display: block; font-size: 0.74rem; color: var(--soft); }
form.upd { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 10px; }
form.upd textarea, form.upd input[type='text'] { width: 100%; }
/* Switched-off measures and initiatives: marked by a bar and the words "(switched off)", not faded (fading failed colour contrast). */
form.upd.off { border-left: 4px solid #c9ccd3; padding-left: 12px; }
.rlist .sub { display: block; font-size: 0.8rem; color: var(--soft); }
details.upd { border: 1px solid var(--line); border-radius: var(--r-s); padding: 0 12px; margin: 8px 0; background: #fff; }
details.upd > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; padding: 10px 0; font-weight: 400; }
details.upd > summary .upd-t { font-weight: 600; color: var(--ink); flex: 1 1 18em; }
details.upd[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
details.upd form { padding-bottom: 10px; }
details.upd textarea, details.upd input[type='text'] { width: 100%; }
table.fin.kpis { table-layout: fixed; }
table.fin.kpis th:nth-child(1) { width: 26%; } table.fin.kpis th:nth-child(2) { width: 6%; } table.fin.kpis th:nth-child(3) { width: 12%; }
table.fin.kpis th:nth-child(4) { width: 13%; } table.fin.kpis th:nth-child(5) { width: 13%; } table.fin.kpis th:nth-child(6) { width: 16%; }
table.fin.kpis.nop th:nth-child(2) { width: 12%; }
blockquote.answer { margin: 6px 0 8px; padding: 8px 12px; border-left: 3px solid var(--purple); background: var(--purple-pale); border-radius: 0 var(--r-s) var(--r-s) 0; }
blockquote.answer p { margin: 0 0 4px; }
blockquote.answer .sub { display: block; font-size: 0.76rem; color: var(--soft); }
.qlist li p { margin: 6px 0; }
.stack.wideform { max-width: 640px; }
.stack.wideform textarea { width: 100%; }
.conf .sub { display: block; font-size: 0.8rem; color: var(--soft); }
table.fin.dash.pil, table.fin.dash.kpis.nop { min-width: 680px; }
@media (max-width: 720px) { table.fin.kpis.stacked, table.fin.dash.stacked { min-width: 0; table-layout: auto; } }
@media (max-width: 720px) { table.fin.dash.kpis.nop.stacked, table.fin.dash.pil.stacked, table.fin.dash.kpis.stacked { min-width: 0; display: block; } }


/* ── Board ease of use A2 (29 Nov 2026) ─────────────────────────────────────────────────────────── */
/* One to-do list on Board home: big, plain rows, each with its own button. */
.todo { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.todo li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; }
.todo .todo-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--purple); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.todo li.done { background: var(--lime-tint); border-color: transparent; }
.todo li.done .todo-mark { background: var(--green); border-color: var(--green); color: #fff; }
.todo .todo-t { flex: 1 1 240px; font-size: 1.05rem; line-height: 1.45; }
.todo .todo-sub, .todo .todo-due { display: block; font-size: 0.95rem; color: var(--soft); }
.todo .todo-due { color: var(--purple-deep); font-weight: 600; }
.todo .btn { min-height: 44px; font-size: 1rem; }
.todo-clear { font-size: 1.05rem; }
.next-m { line-height: 1.6; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Phones and tablets: every section of a portal is visible (the row wraps), never hidden off to the side. */
@media (max-width: 899px) {
  .mods-in { flex-wrap: wrap; overflow-x: visible; padding-top: 4px; padding-bottom: 4px; }
  .mlink { padding: 8px 12px; border-bottom-width: 3px; }
}
.pmenu-list .textsize { justify-content: center; }
.top .textsize { font-weight: 700; }
/* Larger text, chosen with the Text size button (remembered on the device). */
html.ts-1 { font-size: 112.5%; }
html.ts-1 body { font-size: 18px; }
html.ts-2 { font-size: 125%; }
html.ts-2 body { font-size: 20px; }
.foot-ts .textsize { color: var(--purple-deep); border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 14px; min-height: 44px; background: #fff; font: 700 0.95rem var(--body); cursor: pointer; }

/* ── Ease of use A3 (29 Nov 2026): nothing you read or tap is small ──────────────────────────── */
/* Form questions read as sentences, not tiny grey capitals. */
fieldset.opts legend { font: 600 1.1rem/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: 10px; }
.field span { font-size: 0.95rem; color: var(--ink); }
.tag, .rag { font-size: 0.875rem; letter-spacing: 0; padding: 4px 10px; }
.fin th { font-size: 0.875rem; }
.rlist .sub, .needs .sub { font-size: 0.9rem; }
/* Every button and back link is at least 44px tall, whatever the pointer (mouse, trackpad or finger). */
.btn, .btn.small, .back a, .opt, summary { min-height: 44px; }
.btn, .btn.small { display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.back a { display: inline-flex; align-items: center; font-size: 0.95rem; }
/* "Why?" notes: the reason or clause behind a rule, for those who want it. */
details.why { margin: 2px 0 10px; }
details.why > summary { display: inline-flex; align-items: center; cursor: pointer; color: var(--purple-deep); font-weight: 600; font-size: 0.95rem; min-height: 44px; }
details.why > p { margin: 4px 0 0; color: var(--soft); }
/* The directors' confidence figure (it used to share the footer's "CONFIDENTIAL" style). */
.conf-score { font: 700 1.4rem var(--head); color: var(--ink); margin: 4px 0; }
/* PDF viewer (A3): zoomed pages scroll sideways inside the viewer, never the whole page; the text layer sits over each page. */
.viewer-pages { overflow-x: auto; justify-items: start; }
@media (min-width: 900px) { .viewer-pages { justify-items: center; } }
.pdf-wrap { position: relative; max-width: none; flex: none; }
.pdf-wrap .pdf-page { width: 100%; height: 100%; max-width: none; }
.textLayer { position: absolute; inset: 0; overflow: hidden; line-height: 1; text-align: initial; opacity: 1; forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; z-index: 0; }
.textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.textLayer span.markedContent { top: 0; height: 0; }
.textLayer ::selection { background: rgba(101, 97, 168, 0.3); color: transparent; }
.textLayer br::selection { background: transparent; }

/* ── Board help (A4): numbered guides, a glossary, and a clean printout ─────────────────────── */
ol.guide { margin: 0 0 6px; padding-left: 1.4em; display: grid; gap: 10px; font-size: 1.02rem; line-height: 1.55; max-width: 80ch; }
dl.glossary { margin: 0; display: grid; gap: 4px 0; max-width: 85ch; }
dl.glossary dt { font-weight: 700; color: var(--ink); margin-top: 12px; scroll-margin-top: calc(var(--bar, 64px) + 16px); }
dl.glossary dd { margin: 2px 0 0; line-height: 1.55; }
dl.glossary dt:target { background: var(--lime-tint); border-radius: 6px; padding: 2px 6px; }
@media print {
  header.top, nav.mods, .foot, .print-hide, .skip { display: none !important; }
  .panel { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  main.flow { columns: 1 !important; }
  a { color: inherit; }
}
/* A legend hidden for screen readers stays hidden (the full-width legend rule above must not stretch it past the screen). */
fieldset.opts legend.sr { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Board Portal assistant (ADR 0002, B1): the plain-English answer, clearly marked as written by AI ─────── */
.ai-answer { border: 1px solid var(--line-strong); border-left: 4px solid var(--purple); border-radius: var(--r); padding: 14px 16px; margin: 0 0 14px; background: var(--purple-pale, #f6f5fb); max-width: 80ch; }
.ai-answer p { margin: 0 0 10px; line-height: 1.55; }
.ai-answer .ai-q { color: var(--soft); font-size: 0.95rem; }
.ai-answer .ai-note { margin: 4px 0 0; color: var(--soft); font-size: 0.9rem; }

/* Ask T2 (ADR 0003): the question, the answer (.ai-answer above) and its sources. */
.ask-q { margin: 0 0 10px auto; max-width: 70ch; padding: 10px 14px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.ask-q p { margin: 0; line-height: 1.5; }
.ask-who { margin: 0 0 4px !important; font-size: 0.9rem; color: var(--soft); font-weight: 500; }
.ai-answer ul, .ai-answer ol { margin: 0 0 10px; padding-left: 1.3em; line-height: 1.55; }
.ask-sources { margin: 8px 0 0 !important; font-size: 0.95rem; overflow-wrap: anywhere; }
.ask-sources .tag { font-size: 0.85rem; }
#thread textarea { width: 100%; max-width: 70ch; font-size: 1rem; }

/* CEO quarterly report (G3, migration 0099): the template's own section numbers, and a print layout for the board pack. */
.secnum.fixed { min-width: 34px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.ceo-report .ceo-ref { color: var(--soft); margin-top: -4px; }
.ceo-report .ceo-note { border-left: 4px solid var(--purple); padding: 4px 0 4px 10px; }
.ceo-report .ceo-edit { margin-top: 12px; }
.ceo-report .ceo-edit textarea { width: 100%; }
@media print {
  body:has(.ceo-report) .subbar, body:has(.ceo-report) .intro, .ceo-report .noprint, .ceo-report .notice.ok { display: none !important; }
  body:has(.ceo-report) { background: #fff; font-size: 10.5pt; }
  .ceo-report .printonly { display: block; font-weight: 600; }
  .ceo-report .panel { break-inside: auto; border: 0; border-top: 1px solid #999; border-radius: 0; padding: 8pt 0; margin: 0; }
  .ceo-report h2.sec, .ceo-report h3 { break-after: avoid; }
  .ceo-report tr { break-inside: avoid; }
  .ceo-report table.fin { min-width: 0; font-size: 9.5pt; }
  .ceo-report .rag, .ceo-report .tag { border: 1px solid #666; }
  @page { size: A4 portrait; margin: 14mm; }
}
table.ceo-lines { table-layout: fixed; }
table.ceo-lines thead th:first-child { width: 46%; }

/* ── Board: calm cards on every page (1 Dec 2026, mockup "Board Portal Calm Cards") ─────────────────────────────────────
   Workflow states (meetings, papers, replies, resolutions, milestones, questions) get their own neutral pills, never green/amber/red,
   so they can't be read as a strategy status. Late is red text with "!". */
.wf { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.78rem; line-height: 1; padding: 5px 10px; border-radius: 6px; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; }
.wf > i { font-style: normal; font-weight: 800; }
.wf.plan { background: #fff; color: var(--purple-deep); border-color: #C9C6E6; }
.wf.live { background: var(--teal-tint); color: #005A66; border-color: #A9D8E0; }
.wf.done { background: var(--purple-tint); color: var(--purple-deep); }
.wf.off { background: transparent; color: #4A5060; border: 1px dashed #9AA0AE; }
.wf.you { background: var(--purple); color: #fff; }
.wf.late { background: #FDE2DE; color: #9E1B0F; border-color: #F2B8AE; }
.todo li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-color: var(--line); }
.todo .todo-mark { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--purple-tint); color: var(--purple-deep); font: 700 0.95rem var(--head); }
.todo li.done { background: var(--purple-pale); border-color: var(--line); }
.todo li.done .todo-mark { background: #DFF3E8; color: #0B5E3B; }
.todo li.done .todo-t { color: var(--soft); }
.todo .todo-t { font-size: 1rem; font-weight: 600; }
.todo .todo-sub, .todo .todo-due { font-weight: 400; font-size: 0.86rem; }
.todo .todo-due { color: var(--soft); }
@media (max-width: 560px) { .todo li { grid-template-columns: 34px minmax(0, 1fr); } .todo li > .btn, .todo li > .wf { grid-column: 2; justify-self: start; } }
.cards a { border-left-width: 1px; border-radius: var(--r); padding: 14px 16px; }
.cards .card-t { font: 700 1rem var(--head); color: var(--ink); }
.bcards.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.bcard.muted { background: var(--purple-pale); }
.bcard .small { margin: 0; }
.cardfoot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.bcard form.inline-form, .bcard .inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bcard details > summary { cursor: pointer; color: var(--purple-deep); font-weight: 600; font-size: 0.86rem; }
.paper { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.ptype { width: 40px; height: 48px; border-radius: 6px; background: var(--purple-tint); color: var(--purple-deep); font: 700 0.6rem var(--body); letter-spacing: 0.04em; display: grid; place-items: center; text-align: center; text-transform: uppercase; border: 1px solid #D5D2EC; }
.ptype.dec { background: var(--coral-tint); color: var(--coral-deep); border-color: #F3C4B5; }
.pbar { height: 8px; border-radius: 99px; background: var(--purple-tint); overflow: hidden; margin-top: 6px; }
.pbar > span { display: block; height: 100%; background: var(--purple); border-radius: 99px; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-bottom: 14px; }
.fig { background: var(--purple-pale); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; display: grid; gap: 2px; }
.fig .n { font: 700 1.45rem/1.1 var(--head); color: var(--ink); font-variant-numeric: tabular-nums; }
.fig .w { font-size: 0.8rem; color: var(--soft); font-weight: 600; }
.kpi .val { font: 700 1.5rem/1.1 var(--head); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .vrow { display: flex; align-items: end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mrow { display: flex; justify-content: space-between; gap: 10px; align-items: start; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.mrow:last-child { border-bottom: 0; padding-bottom: 0; }
.mrow > span:first-child { min-width: 0; }
.stack2 { display: grid; gap: 10px; }
.rlist.needs li, .rlist.qlist li { background: #fff; border-radius: var(--r); padding: 12px 14px; display: grid; gap: 6px; }
.rlist.needs li > .rag:first-child, .rlist.needs li > .wf:first-child { justify-self: start; }
.rlist.needs li > a, .rlist.qlist li > a { font-weight: 700; color: var(--ink); }
ul.timeline li { border-left: 2px solid var(--purple-tint); padding-left: 12px; }
details.upd { border-radius: var(--r); }
@media print { .bcards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .bcard { break-inside: avoid; padding: 10px; } .bcard details.more .clamp { display: block; } }
.docrow { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 600; }
.docrow .ptype { width: 34px; height: 40px; flex: none; }
.docrow:hover { color: var(--purple-deep); text-decoration: underline; }

/* ── Board: Calm cards (CEO's choice, 1 Dec 2026; design options artifact "Board Portal Redesign", direction A) ──────────
   One meaning per colour: status (RAG) is green/amber/red with an icon and a word; risk level has its own scale (green, amber, three reds), used only
   for risk; "not set" is grey italic. Every text/fill pair is WCAG AA (4.5:1 or better). */
:root {
  --st-g-bg: #DFF3E8; --st-g-fg: #0B5E3B; --st-g-edge: #2E9E6A;
  --st-a-bg: #FFF0CC; --st-a-fg: #6B4200; --st-a-edge: #D99A00;
  --st-r-bg: #FDE2DE; --st-r-fg: #9E1B0F; --st-r-edge: #D9412E;
  --st-n-fg: #4A5060; --st-n-edge: #9AA0AE; --faint: #676D7D;
  /* Risk levels: Low green, Moderate amber, then three reds getting darker (High, Very High, Extreme). The level word is always shown too. */
  --rk1: #CDEDD9; --rk1-fg: #0B5E3B; --rk2: #FFD580; --rk2-fg: #4A2E00; --rk3: #F9B9AF; --rk3-fg: #6E120A;
  --rk4: #C42B1C; --rk4-fg: #FFFFFF; --rk5: #7A0F08; --rk5-fg: #FFFFFF;
}
.rag { gap: 6px; font-size: 0.8rem; line-height: 1; padding: 6px 11px 6px 7px; border: 1.5px solid transparent; }
.rag > span[aria-hidden] { width: 18px; height: 18px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 0.72rem; color: #fff; }
.rag-green { background: var(--st-g-bg); color: var(--st-g-fg); border-color: var(--st-g-edge); } .rag-green > span[aria-hidden] { background: var(--st-g-edge); }
.rag-amber { background: var(--st-a-bg); color: var(--st-a-fg); border-color: var(--st-a-edge); } .rag-amber > span[aria-hidden] { background: var(--st-a-edge); color: #2B1B00; }
.rag-red { background: var(--st-r-bg); color: var(--st-r-fg); border-color: var(--st-r-edge); } .rag-red > span[aria-hidden] { background: var(--st-r-edge); }
.rag.rag-none { background: transparent; color: var(--st-n-fg); border: 1.5px dashed var(--st-n-edge); padding-left: 11px; }
.bchip { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 0.78rem; line-height: 1; color: var(--soft); background: var(--purple-pale); border: 1px solid var(--line); border-radius: 99px; padding: 5px 9px; }
.bchip.new { color: var(--purple-deep); background: var(--purple-tint); border-color: transparent; }
.notset { color: var(--faint); font-style: italic; }
.rlv { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.78rem; line-height: 1; border-radius: 6px; padding: 5px 8px; white-space: nowrap; }
.rlv b { font-weight: 800; padding-left: 6px; border-left: 1px solid currentColor; font-variant-numeric: tabular-nums; }
.rlv.l1 { background: var(--rk1); color: var(--rk1-fg); } .rlv.l2 { background: var(--rk2); color: var(--rk2-fg); } .rlv.l3 { background: var(--rk3); color: var(--rk3-fg); }
.rlv.l4 { background: var(--rk4); color: var(--rk4-fg); } .rlv.l5 { background: var(--rk5); color: var(--rk5-fg); }
.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.bcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.bcard-top { display: flex; gap: 10px; align-items: start; justify-content: space-between; }
.bcard h3 { margin: 0; font: 700 1rem/1.3 var(--head); }
.bcard h3 a { color: var(--ink); text-decoration: none; } .bcard h3 a:hover { text-decoration: underline; }
.bcard h3 small, .bcard .ref { display: block; font: 600 0.78rem var(--body); color: var(--faint); margin-top: 3px; }
.bcard p.what { margin: 0; font-weight: 600; }
.kv { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 0.88rem; }
.kv dt { color: var(--soft); } .kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.bnote { font-size: 0.88rem; background: var(--purple-pale); border-radius: var(--r-s); padding: 10px 12px; }
.bnote .next { color: var(--soft); margin-top: 6px; font-size: 0.84rem; }
details.more > summary { cursor: pointer; color: var(--purple-deep); font-weight: 600; font-size: 0.84rem; margin-top: 4px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
details.more[open] .clamp { display: block; }
details.more[open] .rm, details.more:not([open]) .rl { display: none; }
.bempty { display: flex; gap: 10px; align-items: center; color: var(--soft); background: var(--purple-pale); border: 1px dashed var(--line-strong); border-radius: var(--r-s); padding: 12px 14px; margin: 0; }
.bmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.86rem; color: var(--soft); margin: 0; }
.bmeta b { color: var(--text); font-weight: 600; }
.bmeta .late, .kv .late { color: var(--st-r-fg); font-weight: 700; }
.levelrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ltile { border-radius: var(--r-s); padding: 10px 12px; display: grid; gap: 2px; }
.ltile .n { font: 700 1.5rem/1.1 var(--head); font-variant-numeric: tabular-nums; } .ltile .w { font-size: 0.78rem; font-weight: 700; }
.ltile.l1 { background: var(--rk1); color: var(--rk1-fg); } .ltile.l2 { background: var(--rk2); color: var(--rk2-fg); } .ltile.l3 { background: var(--rk3); color: var(--rk3-fg); }
.ltile.l4 { background: var(--rk4); color: var(--rk4-fg); } .ltile.l5 { background: var(--rk5); color: var(--rk5-fg); }
.ltile.zero { background: var(--purple-pale); color: var(--faint); outline: 1px dashed var(--line-strong); }
/* Staff Risk Register: the same tiles and cards, as links (tiles filter the list; card text opens the risk). */
a.ltile { text-decoration: none; } a.ltile:hover { box-shadow: inset 0 0 0 2px currentColor; } a.ltile[aria-current] { box-shadow: inset 0 0 0 3px currentColor; }
.bcard p.what a { color: var(--ink); text-decoration: none; } .bcard p.what a:hover { text-decoration: underline; }
table.rheat { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 560px; }
table.rheat th { font-weight: 600; font-size: 0.78rem; color: var(--soft); padding: 4px 6px; text-align: center; background: none; text-transform: none; letter-spacing: 0; }
table.rheat th[scope='row'] { text-align: right; white-space: nowrap; }
table.rheat td { height: 58px; border-radius: 8px; text-align: center; vertical-align: middle; }
table.rheat td .n { display: block; font: 700 1.25rem/1 var(--head); font-variant-numeric: tabular-nums; }
table.rheat td .w { font-size: 0.66rem; font-weight: 600; }
table.rheat td.e { background: var(--purple-pale); outline: 1px solid var(--line); } table.rheat td.e .w { color: var(--faint); }
table.rheat td.l1:not(.e) { background: var(--rk1); color: var(--rk1-fg); } table.rheat td.l2:not(.e) { background: var(--rk2); color: var(--rk2-fg); }
table.rheat td.l3:not(.e) { background: var(--rk3); color: var(--rk3-fg); } table.rheat td.l4:not(.e) { background: var(--rk4); color: var(--rk4-fg); }
table.rheat td.l5:not(.e) { background: var(--rk5); color: var(--rk5-fg); }
table.rheat caption { caption-side: bottom; text-align: left; color: var(--soft); font-size: 0.8rem; padding-top: 8px; }
@media (max-width: 720px) { .levelrow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Staff calm cards (src/calm.ts): status-toned tiles and tags for the Quality modules, on the Board status tokens. */
.ltile.good { background: var(--st-g-bg); color: var(--st-g-fg); } .ltile.warn { background: var(--st-a-bg); color: var(--st-a-fg); }
.ltile.bad { background: var(--st-r-bg); color: var(--st-r-fg); } .ltile.none { background: #fff; color: var(--st-n-fg); outline: 1.5px solid var(--line-strong); }
.levelrow.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .levelrow.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.levelrow.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1000px) { .levelrow.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .levelrow.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bcard .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bcard .acts form { margin: 0; }
.bcard .kv .sub { display: block; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; } }
.kv .sub, .bcard .sub { display: block; font-size: 0.8rem; color: var(--soft); font-weight: 400; }
/* ── Ask T2 for everyone (ADR 0005): a header button and one side panel. Wide screens (1280px+) push the page aside;
   narrower desktops get an overlay; phones get the whole screen (the page behind is made inert by the script). ───────── */
:root { --ask-w: 420px; }
.top .ask-open { background: #fff; color: var(--purple-deep); font-size: 0.8rem; }
.top .ask-open:hover, .top .ask-open[aria-expanded="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ask-open-m { display: none; }
@media (max-width: 899px) { .ask-open-m { display: inline-flex; margin-left: auto; } .ask-open-m + .bar-end + .pmenu { margin-left: 0; } }
.ask-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(var(--ask-w), 100vw); background: #fff; color: var(--text);
  border-left: 1px solid var(--line-strong); box-shadow: -10px 0 28px -18px rgba(31, 34, 51, 0.5); display: flex; flex-direction: column;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); overflow: hidden; }
.ask-panel[hidden] { display: none; }
body.ask-push { padding-right: var(--ask-w); }
body.ask-push .ask-panel { box-shadow: none; }
body.ask-full .ask-panel { width: 100vw; border-left: 0; }
body.ask-full { overflow: hidden; }
.ask-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.ask-title { font: 700 1.1rem var(--head); color: var(--ink); margin: 0; }
.ask-tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.ask-recent { margin: 0 0 8px; }
.ask-recent summary { cursor: pointer; font-weight: 600; color: var(--purple-deep); min-height: 32px; display: flex; align-items: center; }
.ask-recent ul { margin: 6px 0; max-height: 30vh; overflow-y: auto; }
.ask-panel .ask-log { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding-right: 4px; }
.ask-page .ask-log { min-height: 30vh; max-height: 65vh; overflow-y: auto; margin-bottom: 8px; }
.ask-log:focus { outline: none; }
.ask-log .ask-q { max-width: 92%; }
.ask-log .ai-answer { max-width: none; }
.ask-text > :last-child { margin-bottom: 0; }
.ask-looking { margin: 6px 0 0 !important; }
.ask-actions { margin: 10px 0 0 !important; display: flex; gap: 6px; flex-wrap: wrap; }
.ask-chips { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.ask-chip { font: inherit; text-align: left; width: 100%; background: var(--purple-pale); color: var(--purple-deep); border: 1px solid var(--line-strong);
  border-radius: var(--r-s); padding: 9px 12px; cursor: pointer; min-height: 44px; }
.ask-chip:hover { background: var(--purple-tint); border-color: var(--purple); }
.ask-status { min-height: 1.2em; margin: 4px 0 !important; color: var(--soft); }
.ask-form { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.ask-form textarea { width: 100%; font: inherit; font-size: 1rem; resize: vertical; min-height: 64px; border: 1px solid var(--line-strong); border-radius: var(--r-s); padding: 8px 10px; }
.ask-form .formrow { margin-top: 4px; }
.ask-form p.small { margin: 0; }
.ask-box .ai-note { margin: 6px 0 0; color: var(--soft); }
.ask-page .ask-top { border-bottom: 0; }
@media (max-width: 767px) { .ask-page .ask-log { max-height: none; } }
@media print { .ask-panel, .ask-open { display: none !important; } body.ask-push { padding-right: 0; } }
/* Room for the Ask T2 button in a full bar (the CEO's seven portals at 1280px): a shorter email (its full text is in the title). */
@media (max-width: 1439px) { .bar-end:has(.ask-open) .who { max-width: 12ch; } }

/* ── Header, one design for every portal (1 Dec 2026): the Card Receipts portal's bar ─────────────────────────────────
   One row at every width, never wrapping: logo, portal name (or the portal pills), the brand circles in any spare room,
   outlined pill links with the current one filled white, Ask T2, then the email and Sign out. Many portals scroll
   sideways inside their own row on a narrow laptop instead of pushing the bar onto two lines. Sections sit in a white
   bar underneath as rounded tabs, the current one filled purple. */
.top .bar-in { flex-wrap: nowrap; gap: 10px 16px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; position: relative; overflow: hidden; }
.top .bar-in > * { position: relative; z-index: 1; }
.top .brand img { height: 26px; width: auto; }
.top .deco { flex: 1 1 0; min-width: 0; max-width: 190px; align-self: stretch; margin: -8px 0; z-index: 0; }
.top .band-title { display: grid; gap: 1px; min-width: 0; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, 0.35); }
.top .band-title .portal-name { padding: 0; border: 0; font: 700 1.05rem/1.2 var(--head); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .pn-s { font-size: 0.76rem; color: rgba(255, 255, 255, 0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .portals { flex: 0 1 auto; min-width: 0; margin-left: auto; padding-left: 0; border-left: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.top .portals::-webkit-scrollbar { display: none; }
.top .portals .plink, .top .navlink { flex: none; font: 600 0.82rem/1.2 var(--body); color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 8px; padding: 6px 11px; min-height: 34px; display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none; }
.top .portals .plink:hover, .top .navlink:hover { background: rgba(255, 255, 255, 0.16); }
.top .portals .plink.on { background: #fff; color: var(--purple-deep); border-color: #fff; }
.top .ask-open { flex: none; background: #fff; color: var(--purple-deep); border-color: #fff; display: inline-flex; margin-left: 0; }
.top .ask-open:hover, .top .ask-open[aria-expanded="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.top .bar-in:not(:has(.portals)) .ask-open { margin-left: auto; }
.top .bar-end { flex: none; margin-left: 0; gap: 8px; }
.top .bar-end .who { background: rgba(255, 255, 255, 0.16); color: #fff; border-radius: 99px; padding: 6px 12px; font-size: 0.8rem; max-width: 30ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .pmenu { margin-left: 0; flex: none; }
.top .pmenu summary { font-size: 0.82rem; padding: 6px 12px; height: 34px; min-height: 34px; border-radius: 8px; }
.top .pmenu-list .plink { border: 0; color: var(--ink); font-size: 0.9rem; min-height: 44px; }
.top .pmenu-list .plink.on { background: var(--purple); color: #fff; }
.top .pmenu-list .navlink { color: var(--purple-deep); border-color: var(--line-strong); justify-content: center; min-height: 44px; }
.top .pmenu-list .who { color: var(--soft); background: none; }
/* The email gives way first, then the brand circles; with many portals it shows only on a wide screen. */
@media (max-width: 1199px) { .top .bar-end .who { display: none; } }
@media (max-width: 1599px) { .top .bar-in.many .bar-end .who { display: none; } }
@media (min-width: 900px) { .top .pmenu { display: none; } .top .bar-end { display: flex; } .top .portals { display: flex; } .top .small-only { display: none; } }
@media (max-width: 899px) {
  .top .portals, .top .bar-end, .top .deco { display: none; }
  .top .pmenu { display: block; }
  .top .portal-name.small-only { display: inline; flex: 1 1 auto; min-width: 0; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.35); font: 700 1rem var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top .band-title { flex: 1 1 auto; padding-left: 12px; }
  .top .ask-open { margin-left: auto; }
  .top .bar-in:has(.portal-name.small-only) .ask-open, .top .bar-in:has(.band-title) .ask-open { margin-left: 0; }
}
/* Section tabs: rounded, the current one filled purple (Card Receipts' tabs). */
nav.mods { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 6px 14px -12px rgba(31, 34, 51, 0.35); }
nav.mods .mods-in { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 8px; padding-bottom: 8px; overflow: visible; }
nav.mods .mlink { font: 600 0.86rem var(--body); color: var(--soft); border: 0; border-radius: 8px; padding: 7px 12px; min-height: 36px; }
nav.mods .mlink:hover { background: var(--purple-tint); color: var(--purple-deep); }
nav.mods .mlink.on { background: var(--purple); color: #fff; }
@media (max-width: 899px) { nav.mods .mods-in { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } nav.mods .mods-in::-webkit-scrollbar { display: none; } }
@media (min-width: 900px) and (max-width: 1279px) {
  .top .bar-in.many { gap: 8px 10px; }
  .top .bar-in.many .portals { gap: 4px; }
  .top .bar-in.many .plink, .top .bar-in.many .navlink { padding: 5px 8px; font-size: 0.78rem; }
  .top .bar-in.many .brand img { width: 112px; height: auto; }
}
@media (max-width: 479px) { .top .bar-in { gap: 8px; } .top .brand img { width: 100px; height: auto; } .top .ask-open, .top .pmenu summary { padding: 5px 9px; } }
.top .band-title + .deco { margin-left: 12px; }
/* Contrast (WCAG AA): the page name and the email are solid white on the bar's purple, and the email sits on the deep purple. */
.top .pn-s { color: #fff; font-weight: 600; }
.top .bar-end .who { background: var(--purple-deep); color: #fff; }
/* Everything after the brand circles sits at the right-hand end (the family, Board-only and Transitions bars have no
   portal pills to push it there). */
.top .deco { margin-right: auto; }
.top .bar-in:has(.deco) .ask-open, .top .bar-in:has(.deco) .portals { margin-left: 0; }
@media (max-width: 899px) { .top .band-title, .top .portal-name.small-only { margin-right: auto; } }

/* ── Ask T2 and Help: calm cards (1 Dec 2026, the Board mockup's Ask T2 and Help pages) ──────────────────────────────────
   Chat reads as a conversation: your question in a purple bubble on the right, Ask T2's answer in a pale bubble on the left.
   The /ask page puts the conversation and "Your chats" side by side from 900px (chats below it on phones). Help pages use
   guide cards with numbered steps and a glossary grid. */
.ask-log { display: grid; gap: 12px; align-content: start; }
.ask-log .ask-q { justify-self: end; max-width: min(80%, 70ch); margin: 0; background: var(--purple); color: #fff; border: 0; border-radius: 14px 14px 4px 14px; padding: 10px 14px; }
.ask-log .ask-q .ask-who { color: #fff; opacity: 1; }
.ask-log .ai-answer { justify-self: start; max-width: min(92%, 80ch); margin: 0; background: var(--purple-pale); border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 12px 14px; }
.ask-log .ask-who { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--purple-deep); }
.ask-log .ask-empty { background: var(--purple-pale); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 14px 16px; }
.ask-log .ask-empty > p:first-child { margin-top: 0; }
.ask-sources { line-height: 1.9; }
.ask-sources .tag { border-radius: 99px; }
.ask-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 20px; }
.ask-page .ask-main { min-width: 0; display: grid; gap: 4px; align-content: start; }
.ask-page .ask-top { border-bottom: 2px solid var(--lime); padding-bottom: 10px; margin-bottom: 10px; }
.ask-page .ask-chips { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.ask-page .ask-chip { min-height: 44px; }
.ask-page .ask-log:has(> .ask-empty) { min-height: 0; }
.ask-page .ask-form { background: var(--purple-pale); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.ask-page .ask-recent { margin: 0; background: var(--purple-pale); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; align-self: start; }
.ask-page .ask-recent summary { font: 700 1rem var(--head); color: var(--ink); }
.ask-page .ask-recent ul { max-height: 60vh; display: grid; gap: 8px; padding: 0; margin: 8px 0 10px; list-style: none; }
.ask-page .ask-recent li { background: #fff; border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; display: grid; gap: 2px; }
.ask-page .ask-recent li.muted { background: transparent; border-style: dashed; }
.ask-page .ask-recent li a { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ask-page .ask-recent li a:hover { text-decoration: underline; }
.ask-page .ask-recent li:has(a[aria-current]) { border-color: var(--purple); box-shadow: inset 3px 0 0 var(--purple); }
.ask-page .ask-recent form { margin-top: 10px; }
@media (min-width: 900px) {
  .ask-page { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 20px; }
  .ask-page .ask-recent { position: sticky; top: calc(var(--stick, 0px) + 12px); }
}
/* Help: guide cards and glossary grid */
.help-jump { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.help-jump .bchip { text-decoration: none; color: var(--purple-deep); min-height: 32px; padding: 6px 12px; }
.help-jump .bchip:hover { background: var(--purple-tint); }
.help-jump .btn { margin-left: auto; }
.bcard[id] { scroll-margin-top: calc(var(--stick, 0px) + 16px); }
ol.hsteps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
ol.hsteps li { counter-increment: s; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; line-height: 1.5; }
ol.hsteps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 8px; background: var(--purple-tint); color: var(--purple-deep); font: 700 0.8rem var(--head); display: grid; place-items: center; }
dl.glossary.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; max-width: none; }
dl.glossary.cards > div { background: var(--purple-pale); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; }
dl.glossary.cards dt { margin-top: 0; }
dl.glossary.cards dd { font-size: 0.92rem; }
dl.glossary.cards > div:has(dt:target) { background: var(--lime-tint); border-color: var(--lime); }
dl.glossary.cards dt:target { background: none; padding: 0; }
.colour-key { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 6px; }
.colour-key p { margin: 0 4px 0 0; flex-basis: 100%; }
.colour-key p + .rag, .colour-key p + .rlv { margin-left: 0; }
.help-ask p { margin: 0 0 8px; } .help-ask p:last-child { margin-bottom: 0; }
.help-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
a.help-tile { text-decoration: none; color: var(--text); gap: 6px; }
a.help-tile h3 { color: var(--ink); }
a.help-tile:hover { border-color: var(--purple); box-shadow: inset 0 -3px 0 var(--purple); }
a.help-tile:hover h3 { text-decoration: underline; }
.help-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.help-links .bchip { text-decoration: none; color: var(--purple-deep); min-height: 32px; padding: 6px 12px; }
@media print { .help-jump { display: none; } dl.glossary.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } dl.glossary.cards > div { break-inside: avoid; } ol.hsteps li::before { border: 1px solid #666; } }

/* ── Privacy, Complaints and Accessibility: calm cards (1 Dec 2026) ──────────────────────────────────────────────────────
   Each point is a small card in a grid (two columns for long points), steps that happen in order are numbered, and the
   "If someone is in danger" box stays first and stands out. Wording is unchanged. */
ul.icards { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
ul.icards.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
ul.icards > li { background: var(--purple-pale); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; line-height: 1.55; min-width: 0; overflow-wrap: anywhere; }
ul.icards.done > li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
ul.icards.done > li::before { content: "✓"; width: 22px; height: 22px; border-radius: 99px; background: var(--st-g-bg); color: var(--st-g-fg); font-weight: 800; font-size: 0.75rem; display: grid; place-items: center; margin-top: 1px; }
ul.icards.ways > li { background: #fff; }
.panel > p.bnote { margin: 0 0 12px; font-size: 0.95rem; line-height: 1.55; }
.notice-urgent { border: 1px solid #F2B8AE; border-left: 6px solid #a23a17; background: #FFF6F4; }
.notice-urgent h2.sec { border-bottom-color: #F2B8AE; color: #7A1E0A; }
.notice-urgent p { margin: 0 0 8px; line-height: 1.55; }
.panel[aria-labelledby] { scroll-margin-top: calc(var(--stick, 0px) + 16px); }
@media print { ul.icards { grid-template-columns: repeat(2, minmax(0, 1fr)); } ul.icards > li { break-inside: avoid; } }

/* ── Policy reading check (0112): the owner's question cards and the staff question ──────────────────────────────────── */
ol.check-opts { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; font-size: 0.92rem; }
ol.check-opts li.right { font-weight: 600; }
fieldset.check-q legend { font-weight: 700; font-size: 1.05rem; color: var(--ink); line-height: 1.4; margin-bottom: 8px; }
fieldset.check-q { display: grid; gap: 8px; }
fieldset.check-q label.check { background: var(--purple-pale); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; min-height: 44px; }
fieldset.check-q label.check:has(input:checked) { border-color: var(--purple); background: var(--purple-tint); }
