/* org screens (claude.ai/design). Uses tokens.css and the shared classes in app.css. */
.org-page { max-width: none; display: flex; flex-direction: column; gap: var(--space-md); }
.org-page.wide-page { max-width: none; }
.org-page.narrow-page { max-width: none; }
.org-page.settings-form { max-width: none; }
.org-page > *, .org-page .page-head { margin-bottom: 0; }
.org-page section { display: flex; flex-direction: column; gap: 10px; }
.section-h { margin: var(--space-2xs) 0 0; font-size: var(--text-md); }
.form-actions.end { justify-content: flex-end; }
.org-form h2 { margin: 0 0 var(--space-sm); font-size: var(--text-md); }
.org-form details .after-summary { margin-top: var(--space-sm); }
.notice.info { background: var(--color-info-soft); color: var(--color-info); font-size: var(--text-sm); align-items: flex-start; }
.notice.lock { background: var(--color-paper-2); color: var(--color-ink-2); font-size: var(--text-sm); }
.notice .icon { flex: none; margin-top: 2px; }
.merge { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-accent-text); background: none; border: 0; padding: 0; }
button.solid-danger { background: var(--color-bad); border-color: var(--color-bad); color: var(--color-surface); }
button.solid-danger:hover { background: color-mix(in oklch, var(--color-bad) 85%, var(--color-ink)); color: var(--color-surface); }
.btn.danger-text, .btn.danger-text:hover { color: var(--color-bad); }

/* Connections */
.conn-row { padding-block: var(--space-sm); }
.conn-name { font-weight: 500; display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.conn-sub { font-size: var(--text-xs); color: var(--color-ink-3); overflow-wrap: anywhere; }
.default-tag { height: 20px; display: inline-flex; align-items: center; padding: 0 6px; border-radius: var(--radius-sm); background: var(--color-paper-2); border: var(--rule); font-size: 11px; font-weight: 500; color: var(--color-ink-2); }
.conn-row .conn-actions { gap: var(--space-2xs); }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.75rem), 1fr)); gap: var(--space-sm); }
.provider-card { background: var(--color-surface); border: var(--rule); border-radius: var(--radius-lg); padding: 14px var(--space-md); display: flex; flex-direction: column; gap: 10px; }
.provider-top { display: flex; gap: 10px; align-items: center; }
.provider-top b { display: block; font-weight: 500; }
.provider-top span:not(.tile-icon) { display: block; font-size: var(--text-xs); color: var(--color-ink-3); }
.provider-card .why { display: flex; gap: var(--space-xs); align-items: flex-start; margin: 0; padding: var(--space-xs) 10px; border-radius: var(--radius); background: var(--color-paper-2); color: var(--color-ink-2); font-size: var(--text-sm); }
.provider-card .why .icon { flex: none; margin-top: 3px; }
.provider-card .row { align-items: center; gap: var(--space-sm); }
.provider-card > .row:last-child { margin-top: auto; }

/* Integrations > Sync */
#sync { scroll-margin-top: var(--space-lg); }
#sync .notice { margin-bottom: 0; }
.sync-row .conn-sub a { display: inline-flex; align-items: center; gap: 2px; }
.sync-row time { font-variant-numeric: tabular-nums; }
.provider-card .sync-note { margin: 0; }
.sync-row .field-note.warn { color: var(--color-warn); }
.colpick > .check + .hint { display: block; margin: 0 0 var(--space-xs) var(--space-lg); }
.confirm-box p { margin: 0 0 var(--space-sm); color: var(--color-ink-2); }
.dep-list { list-style: none; margin: 0 0 var(--space-md); padding: 0; display: flex; flex-direction: column; gap: var(--space-2xs); }
.dep-list li { display: flex; gap: var(--space-xs); align-items: center; }
.dep-list .icon { color: var(--color-ink-3); }
.mono-input { font-family: var(--font-mono); }

/* Columns */
.col-rows .r { gap: 6px 14px; }
.col-rows .r.picked { background: var(--color-accent-soft); }
.col-rows .move { display: flex; gap: 2px; }
.col-rows .move form { display: flex; }
.col-rows .move .icon-btn { width: 24px; min-height: 24px; padding: 0; display: grid; place-items: center; background: transparent; border: 0; color: var(--color-ink-3); }
.col-rows .move .icon-btn:hover { background: var(--color-paper-3); color: var(--color-ink); }
.col-rows .move .icon-btn:disabled { opacity: .35; background: transparent; cursor: default; }
.col-name { flex: 1 1 10rem; font-weight: 500; }
.col-rows .merge { flex: 1 1 12.5rem; overflow-wrap: anywhere; }
.col-type { width: 5rem; font-size: var(--text-sm); color: var(--color-ink-2); }
.col-used { width: 7rem; font-size: var(--text-xs); color: var(--color-ink-3); }
.col-act { min-width: 5.5rem; display: flex; gap: 10px; justify-content: flex-end; font-size: var(--text-sm); }
.builtin { font-size: var(--text-xs); color: var(--color-ink-3); }
.col-remove { margin: var(--space-sm) 0 0; padding-top: var(--space-sm); border-top: var(--rule); }
.new-col { align-items: flex-end; }
.new-col > label:first-of-type { flex: 2 1 14rem; }
.new-col > label.check { align-self: center; min-height: var(--control-h); }

/* Members */
.invite-form { align-items: flex-end; gap: var(--space-xs); }
.invite-form .grow-label { flex: 1 1 15rem; }
.member-rows .r { padding-block: 10px; }
.member-rows .who { font-weight: 500; }
.member-rows .meta { font-size: var(--text-xs); color: var(--color-ink-3); overflow-wrap: anywhere; }
.m-role { flex: none; width: 8rem; font-size: var(--text-sm); color: var(--color-ink-2); }
.m-state { flex: none; width: 10rem; font-size: var(--text-xs); color: var(--color-ink-3); }
.m-state.expired { color: var(--color-warn); }
.m-act { flex: none; min-width: 12rem; display: flex; gap: 10px; justify-content: flex-end; align-items: center; font-size: var(--text-sm); }
.m-act button.link { font-size: var(--text-sm); }
.member-pop { min-width: 15rem; padding: var(--space-xs); gap: var(--space-xs); }
.member-pop label { margin-bottom: var(--space-xs); }
.member-pop form + form { border-top: var(--rule); padding-top: var(--space-2xs); }
.menu-pop.member-pop form > button.sm { width: auto; background: var(--color-accent); color: var(--color-accent-ink); justify-content: center; padding: 0 10px; }

/* Roles */
.role-form { display: flex; flex-direction: column; gap: var(--space-sm); }
.role-name { max-width: 22.5rem; margin: 0; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); gap: var(--space-sm); }
.perm-grid fieldset { margin: 0; background: var(--color-surface); border: var(--rule); border-radius: var(--radius-lg); padding: var(--space-sm) var(--space-md); display: flex; flex-direction: column; gap: 2px; }
.perm-grid legend { float: left; width: 100%; display: flex; justify-content: space-between; font-size: var(--text-base); padding: 0; margin-bottom: var(--space-2xs); }
.perm-grid legend span { font-size: var(--text-xs); font-weight: 400; color: var(--color-ink-3); }
.perm-grid label.check { min-height: var(--control-h); margin: 0; clear: both; }
.perm-grid fieldset:disabled label.check { cursor: default; color: var(--color-ink-2); }
.role-delete { margin: 0; }

/* Settings: sections are cards whose rows are split by hairlines. */
.settings-form .panel { gap: 0; overflow: hidden; }
.sec-h { margin: 0; padding: var(--space-sm) var(--space-md); border-bottom: var(--rule); font-size: var(--text-md); }
.sec-h.spread h2 { margin: 0; font-size: var(--text-md); }
.sec-body { padding: var(--space-sm) var(--space-md); }
.sec-note { margin: 0; padding: var(--space-sm) var(--space-md) var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-3); }
.switch-row, .cap-row { display: flex; gap: var(--space-sm); align-items: flex-start; margin: 0; padding: var(--space-sm) var(--space-md); border-bottom: var(--rule); font-size: var(--text-base); font-weight: 400; cursor: pointer; }
.switch-row > input { display: inline-block; width: 1rem; height: 1rem; margin: 2px 0 0; accent-color: var(--color-accent); }
.switch-row b, .cap-row b { display: block; font-weight: 500; }
.switch-row small, .cap-row small { display: block; font-size: var(--text-sm); color: var(--color-ink-3); }
.cap-row { flex-wrap: wrap; align-items: center; border-bottom: 0; cursor: default; }
.cap-row > span { flex: 1 1 15rem; }
.cap-row > input { width: 7.5rem; margin: 0; }
.status-rows { display: flex; flex-direction: column; padding: 0 0 var(--space-2xs); }
.status-rows .r { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); padding: 6px var(--space-md); color: var(--color-ink); text-decoration: none; }
.status-rows .r:hover { background: var(--color-paper-2); }
.status-rows .n { font-size: var(--text-xs); color: var(--color-ink-3); font-variant-numeric: tabular-nums; }
.days { border: 0; padding: 0; margin: 0 0 var(--space-xs); display: flex; flex-wrap: wrap; gap: 0 var(--space-md); }
.days label.check { margin: 0; min-height: var(--control-h); }
.hours { align-items: flex-end; gap: var(--space-xs); }
.hours > label { flex: 0 0 8rem; }
.hours .to { color: var(--color-ink-3); padding-bottom: 6px; }
.settings-form .sec-body > p.small { margin: var(--space-xs) 0 var(--space-md); }

/* Audit log */
.audit-filter { align-items: flex-end; gap: var(--space-xs); }
.audit-filter > label { flex: 0 1 12rem; }
.audit-rows .r { align-items: baseline; gap: 4px 14px; padding-block: 10px; }
.audit-rows .t { width: 8rem; color: var(--color-ink-3); }
.audit-rows .who { width: 9rem; font-weight: 500; overflow-wrap: anywhere; }
.audit-rows .what { flex: 1 1 18rem; min-width: 0; overflow-wrap: anywhere; }
.audit-rows .detail { color: var(--color-ink-3); }
.audit-rows .empty { color: var(--color-ink-3); justify-content: center; }

@media (max-width: 56rem) {
  .col-type, .col-used, .m-role, .m-state { width: auto; }
  .col-name { flex: 1 1 auto; }
  .col-rows .merge { order: 3; flex: 1 1 100%; padding-left: 58px; }
  .col-used { order: 4; padding-left: 58px; }
  .col-act { order: 5; margin-left: auto; min-width: 0; }
  .member-rows .r > .grow { flex-basis: calc(100% - 46px); }
  .m-act { min-width: 0; margin-left: auto; }
  .audit-rows .t, .audit-rows .who { width: auto; }
  .hours > label { flex: 1 1 6rem; }
}
.audit-diff { list-style: none; margin: 2px 0 0; padding: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.audit-diff li { overflow-wrap: anywhere; }
.cap-row + .cap-row { border-top: var(--rule); }
.cap-row > select { width: auto; margin: 0; }

/* A pending invite's role: a link-looking toggle opening the same pop-up as a member's Edit. */
.m-act summary.link { list-style: none; cursor: pointer; color: var(--color-accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.m-act summary.link::-webkit-details-marker { display: none; }

/* ---------- Plan and billing ---------- */
.plan-now { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; justify-content: space-between; padding: 1.375rem; }
.plan-now-id { display: flex; gap: var(--space-md); align-items: center; min-width: 0; flex: 1 1 24rem; }
.plan-ic { flex: none; width: 52px; height: 52px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent); }
.plan-now-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.plan-now-name { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.plan-now-name h2 { margin: 0; font-size: var(--text-xl); }
.plan-now-main p { margin: 0; color: var(--color-ink-2); }
.plan-now form { margin: 0; }
.plan-note { flex-basis: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--color-accent-soft); color: var(--color-accent-text); }
.plan-note .icon { flex: none; margin-top: 1px; }
.plan-note.bad { background: var(--color-bad-soft); color: var(--color-bad); }
.plan-pick { display: flex; flex-direction: column; gap: var(--space-md); }
.plan-pick-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-sm); }
.plan-pick-head h2 { margin: 0; font-size: var(--text-lg); }
.plan-period { display: inline-flex; margin: 0; padding: 4px; border: 0; border-radius: 12px; background: var(--color-paper-2); }
.plan-period label { display: flex; align-items: center; min-height: 36px; margin: 0; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: var(--text-base); color: var(--color-ink-2); cursor: pointer; transition: background var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.plan-period label:hover { color: var(--color-ink); }
.plan-period label:has(input:checked) { background: light-dark(var(--color-surface), var(--color-paper-3)); color: var(--color-ink); box-shadow: var(--shadow-1); }
.plan-period input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan-period label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.plan-pick:has(input[name=period][value=monthly]:checked) .p-y, .plan-pick:not(:has(input[name=period][value=monthly]:checked)) .p-m { display: none; }
.plan-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.plan-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius-lg); border: var(--rule); background: var(--color-surface); }
.plan-card.now { border: 2px solid var(--color-ink); padding: 17px; }
.plan-card-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-xs); }
.plan-card h3 { margin: 0; font-family: var(--font-body); font-size: var(--text-md); font-weight: 700; letter-spacing: 0; }
.plan-mine { font-size: var(--text-xs); font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-surface); white-space: nowrap; }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price b { font-size: 1.625rem; line-height: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-price > span { font-size: var(--text-base); font-weight: 500; color: var(--color-ink-3); }
.plan-billed { margin-top: -6px; font-size: var(--text-sm); color: var(--color-ink-3); }
.plan-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; color: var(--color-ink-2); }
.plan-card li { display: flex; gap: var(--space-xs); }
.plan-card li.intro { color: var(--color-ink-3); font-size: var(--text-sm); }
.plan-card li .icon { flex: none; color: var(--color-ok); margin-top: 3px; }
.plan-card > :is(button, .btn) { width: 100%; min-height: 42px; margin-top: auto; justify-content: center; }
.plan-card > .plan-current { background: var(--color-paper-2); border-color: var(--color-paper-2); color: var(--color-ink-3); pointer-events: none; }
.plan-pick > .hint { margin: 0; }
.plan-news { overflow: hidden; }
.plan-news details { border-top: var(--rule); }
.plan-news summary { display: flex; justify-content: space-between; gap: var(--space-sm); padding: 14px 18px; cursor: pointer; list-style: none; }
.plan-news summary::-webkit-details-marker { display: none; }
.plan-news summary:hover { background: var(--color-paper-2); }
.plan-news summary span { flex: none; }
.plan-news details p { margin: 0; padding: 0 18px 16px; color: var(--color-ink-2); line-height: 1.6; white-space: pre-line; }

/* Table cards (.tcard, shared in app.css): extras used on organisation pages. */
.tcard-head .sub { margin: 2px 0 0; font-size: var(--text-base); }
.tcard th { background: var(--color-paper); }
.tcard .mono-sm { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-2); }
.tcard .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tcard .tags span { font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-ink-2); white-space: nowrap; }
.badge.s-off { background: var(--color-paper-2); color: var(--color-ink-2); }
.row-acts { display: inline-flex; gap: 2px; align-items: center; justify-content: flex-end; }
.row-acts > a, .row-acts > details > summary { display: inline-flex; align-items: center; min-height: 32px; padding: 0 8px; border-radius: var(--radius-sm); font-weight: 600; color: var(--color-accent); text-decoration: none; cursor: pointer; list-style: none; }
.row-acts > details > summary::-webkit-details-marker { display: none; }
.row-acts > a:hover, .row-acts > details > summary:hover { background: var(--color-accent-soft); }

/* Access: a list of groups or policies beside the one being edited. */
.access-layout { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: var(--space-md); align-items: start; }
.access-layout.member { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.access-list { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2xs); background: var(--color-surface); border: var(--rule); border-radius: var(--radius-lg); position: sticky; top: var(--space-md); }
.access-list a { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-md); color: var(--color-ink); text-decoration: none; }
.access-list a span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.access-list a small { color: var(--color-ink-3); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.access-list a:hover { background: var(--color-paper-2); }
.access-list a[aria-current] { background: var(--color-accent-soft); }
.access-list a.add { color: var(--color-accent-text); font-weight: 500; }
.policy-picks { border: 0; margin: 0; padding: 0 var(--space-md) var(--space-sm); display: flex; flex-direction: column; }
.policy-pick { display: flex; gap: var(--space-sm); align-items: flex-start; padding: var(--space-sm) 0; border-bottom: var(--rule); margin: 0; font-weight: 400; cursor: pointer; }
.policy-pick input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--color-accent); }
.policy-pick b { font-weight: 600; }
.policy-pick small { display: block; color: var(--color-ink-3); font-size: var(--text-sm); }
.policy-pick.deny b { color: var(--color-bad); }
.effect-pick, .day-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-md); }
.effect-pick legend, .day-pick legend { font-weight: 500; margin-bottom: var(--space-2xs); padding: 0; width: 100%; }
.chip-check { margin: 0; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--color-rule-strong); cursor: pointer; font-weight: 500; }
.chip-check input:checked + span { background: var(--color-accent-soft); border-color: var(--color-accent); color: var(--color-accent-text); }
.chip-check input:focus-visible + span { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.cond-h { margin: 0; font-size: var(--text-base); }
.all-actions { margin-bottom: var(--space-sm); font-weight: 500; }
.perm-grid label.whole { font-weight: 500; border-bottom: var(--rule); margin-bottom: 2px; }
.eff-list { padding: var(--space-xs) var(--space-md) var(--space-md); display: grid; gap: var(--space-sm); }
.eff-group h3 { margin: var(--space-xs) 0 2px; font-size: var(--text-sm); color: var(--color-ink-3); text-transform: uppercase; letter-spacing: .04em; }
.eff-row { display: flex; gap: var(--space-xs); align-items: flex-start; padding: 6px 0; border-bottom: var(--rule); }
.eff-row small { display: block; color: var(--color-ink-3); font-size: var(--text-xs); }
.eff-row.yes > .icon { color: var(--color-ok); margin-top: 3px; }
.eff-row.no { color: var(--color-ink-3); }
.eff-row.no > .icon { margin-top: 3px; }
@media (max-width: 52rem) { .access-layout, .access-layout.member { grid-template-columns: minmax(0, 1fr); } .access-list { position: static; } }

/* A paused (locked) organisation. */
.locked-banner { display: flex; gap: var(--space-md); align-items: flex-start; padding: var(--space-md) var(--space-lg); margin-bottom: var(--space-md); background: var(--color-sun-soft); border-color: var(--color-sun-rule); }
.locked-banner h2 { margin: 0 0 4px; font-size: var(--text-lg); }
.locked-banner p { margin: 0; color: var(--color-ink-2); }
.lock-ic { flex: none; width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--color-sun); color: var(--color-sun-ink); }
.locked-page { max-width: 35rem; margin: 4.5rem auto var(--space-2xl); }
.locked-card { margin: 0; padding: var(--space-xl); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; border-radius: 18px; box-shadow: var(--shadow-lift); }
.locked-card .lock-ic { width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--color-sun-soft); color: var(--color-sun-ink); }
.locked-card h1 { margin: 0; font-family: var(--font-display); font-size: 1.75rem; line-height: 2.25rem; letter-spacing: -0.02em; }
.locked-card p { margin: 0; color: var(--color-ink-2); line-height: 1.6; }
.locked-card p b { color: var(--color-ink); }
body:has(.locked-page:not(.open)) .sidebar nav { opacity: .5; }

/* Usage and payments. */
.usage-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.usage-top > p { margin: 0; color: var(--color-ink-2); }
.segmented a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: var(--radius-md); color: var(--color-ink-2); text-decoration: none; font-weight: 500; }
.segmented a[aria-current] { background: light-dark(var(--color-surface), var(--color-paper-3)); color: var(--color-ink); box-shadow: var(--shadow-1); }
nav.segmented { display: inline-flex; gap: 2px; padding: 3px; margin: 0; border: 0; border-radius: var(--radius); background: var(--color-paper-2); }
.segmented a { font-size: var(--text-sm); font-weight: 600; }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; margin-bottom: var(--space-md); }
.meter-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--color-surface); border: var(--rule); border-radius: var(--radius-xl); }
.meter-card > span { color: var(--color-ink-2); font-weight: 500; font-size: var(--text-sm); }
.meter-card > b { font-size: 1.625rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.meter-card > b.small-b { font-size: var(--text-md); line-height: 2rem; }
.meter-card small button.link { font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.meter-card .bar { margin: 4px 0 2px; }
.meter-card small { color: var(--color-ink-3); font-size: var(--text-xs); }
.meter-card .bar { height: 6px; border-radius: 3px; background: var(--color-paper-2); overflow: hidden; }
.meter-card .bar i { display: block; height: 100%; background: var(--color-accent); border-radius: 3px; }
.usage-chart { border-radius: var(--radius-xl); }
.usage-chart .panel-head { padding: 18px 20px 0; align-items: flex-start; flex-wrap: wrap; }
.usage-chart .panel-head h2 { font-size: var(--text-lg); }
.usage-chart .panel-head .sub { margin-top: 2px; font-size: var(--text-sm); color: var(--color-ink-3); }
.usage-chart .empty { padding: 2rem 20px; margin: 0; color: var(--color-ink-3); text-align: center; }
.usage-chart .chart { display: flex; align-items: flex-end; gap: 4px; height: 14rem; margin: 14px 20px 34px; padding: 8px 0 0; border-bottom: var(--rule); }
.usage-chart .col { position: relative; }
.usage-chart .col small { position: absolute; bottom: -18px; }
.usage-chart .col { margin-bottom: 0; }
.usage-chart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.usage-chart .stack { width: 100%; max-width: 2.5rem; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 2px 2px; overflow: hidden; min-height: 2px; }
.usage-chart small { font-size: 10px; color: var(--color-ink-3); }
.usage-chart .c0, .legend .c0 { background: var(--color-accent); }
.usage-chart .c1, .legend .c1 { background: var(--color-ok); }
.usage-chart .c2, .legend .c2 { background: var(--color-sun); }
.usage-chart .c3, .legend .c3 { background: var(--color-bad); }
.legend { display: flex; gap: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.section-h { margin: var(--space-lg) 0 var(--space-sm); font-size: var(--text-lg); }
:is(td, th).num { text-align: right; font-variant-numeric: tabular-nums; }

/* Settings: the organisation's logo. */
.logo-field { display: flex; gap: var(--space-md); align-items: flex-start; padding-bottom: var(--space-sm); border-bottom: var(--rule); margin-bottom: var(--space-sm); }
.logo-field b { display: block; }
.logo-field p { margin: 2px 0 var(--space-xs); }
.logo-prev-box { width: 72px; height: 72px; flex: none; border-radius: var(--radius-lg); border: 1px dashed var(--color-rule-strong); background: var(--color-paper-2); display: grid; place-items: center; color: var(--color-ink-3); overflow: hidden; }
.logo-prev-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.file-btn { cursor: pointer; }
.portal-logo { display: block; max-height: 48px; max-width: 200px; object-fit: contain; margin-bottom: var(--space-xs); }

/* Two-step sign-in: status, setup steps, recovery codes */
.mfa-status { display: flex; align-items: center; gap: var(--space-md); }
.mfa-status h2 { margin: 0; }
.mfa-badge { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--color-paper-2); color: var(--color-ink-3); }
.mfa-status.is-on .mfa-badge { background: var(--color-ok-soft); color: var(--color-ok); }
.mfa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-md); }
.mfa-grid h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.mfa-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-md); counter-reset: none; }
.mfa-steps > li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-md); align-items: start; }
.mfa-steps h2 { margin: 0; }
.step-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--color-accent); color: var(--color-accent-ink); font-weight: 700; }
.app-chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.app-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--color-paper-2); font-size: var(--text-sm); color: var(--color-ink-2); }
.mfa-scan { display: flex; gap: var(--space-lg); justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.mfa-scan > .stack-sm { flex: 1 1 18rem; }
.mfa-qr { flex: none; width: 200px; height: 200px; padding: 10px; border-radius: 14px; background: #fff; border: var(--rule); image-rendering: pixelated; }
.mfa-manual summary { cursor: pointer; color: var(--color-accent-text); font-weight: 500; }
.mfa-manual[open] summary { margin-bottom: 8px; }
.mfa-key { font-size: 1rem; letter-spacing: 0.06em; word-break: break-all; }
.code-input { font-family: var(--font-mono, ui-monospace, monospace); font-size: 1.25rem; letter-spacing: 0.3em; max-width: 12rem; }
.codes-grid { list-style: none; margin: 0; padding: var(--space-md); display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 10px 24px; border-radius: var(--radius-md); background: var(--color-paper-2); counter-reset: code; }
.codes-grid li { font-size: 1.0625rem; letter-spacing: 0.04em; counter-increment: code; }
.codes-grid li::before { content: counter(code) "."; display: inline-block; width: 1.8em; color: var(--color-ink-3); font-size: var(--text-sm); }
.codes-actions { flex-wrap: wrap; gap: 8px; }
.center-link { text-align: center; }
@media print { .sidebar, .page-head .eyebrow, .codes-actions, .form-actions, .notice { display: none !important; } }
.account-link { display: flex; align-items: center; gap: var(--space-md); color: var(--color-ink); text-decoration: none; }
.account-link:hover { background: var(--color-paper-2); }
.account-link small { display: block; color: var(--color-ink-3); font-size: var(--text-sm); }

/* Cards that lay themselves out (not the stacked section default above). */
.org-page section.plan-now { flex-direction: row; }
.org-page section:is(.tcard, .plan-news, .usage-chart) { gap: 0; }
.org-page > :is(.meters, .panel, .tablewrap, .notice, .filterbar) { margin-bottom: 0; }
.usage-t th:is(:nth-child(3), :nth-child(4), :nth-child(5)), .pay-t th:nth-child(5), .pay-t td.act { text-align: right; }
.tcard .who-name { font-weight: 600; }

/* Developers */
.org-page section.dev-card { padding: 18px; gap: 12px; }
.dev-card > h2 { display: flex; align-items: center; gap: var(--space-xs); margin: 0; font-size: var(--text-lg); }
.dev-card > h2 .icon { color: var(--color-ink-2); }
.dev-card > p { margin: 0; color: var(--color-ink-2); line-height: 1.6; max-width: 60rem; }
.dev-card > p.muted { color: var(--color-ink-3); }
.dev-rows { display: flex; flex-direction: column; border-top: var(--rule); }
.dev-rows > .r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 12px 0; border-bottom: var(--rule); }
.dev-rows > .r form { margin: 0; }
.dev-rows .grow { flex: 1 1 18rem; min-width: 0; }
.dev-rows .cell-sub { margin-top: 2px; }
.dev-rows > p { margin: 0; padding: 12px 0; border-bottom: var(--rule); }
.dev-rows button.link, .dev-rows button.danger-link { font-weight: 600; text-decoration: none; }
.key-chip { font-size: var(--text-xs); color: var(--color-ink-2); border: 0; padding: 1px 6px; border-radius: var(--radius-sm); }
.hook-url { font-size: var(--text-sm); overflow-wrap: anywhere; }
.dev-card > details > summary.btn { width: fit-content; list-style: none; }
.dev-card > details > summary.btn::-webkit-details-marker { display: none; }
.copyfield.endpoint { max-width: 36rem; padding: 4px 4px 4px 12px; margin: 0; border-radius: var(--radius); background: var(--color-paper-2); border: var(--rule); }
.copyfield.endpoint code { background: none; border: 0; padding: 0; }
.code-block { margin: 0; padding: var(--space-sm) var(--space-md); border: 0; border-radius: var(--radius); background: light-dark(var(--color-ink), var(--color-paper)); color: light-dark(var(--color-paper), var(--color-ink)); line-height: 1.6; overflow-x: auto; white-space: pre; }
.dev-h3 { margin: var(--space-xs) 0 0; font-size: var(--text-md); }
.deliveries { margin: 0; border-radius: var(--radius); }
.deliveries th { background: var(--color-paper); }
.deliveries td { font-size: var(--text-sm); }
.req-t th:nth-child(7) { text-align: right; }

/* Settings (organisation): padded cards, an 18px heading, rows split by hairlines inside the padding. */
.org-page.settings-form { gap: 20px; }
.settings-form > section.panel { padding: 20px; gap: 14px; overflow: visible; border-radius: var(--radius-xl); }
.settings-form .sec-h, .settings-form .sec-h.spread h2 { margin: 0; padding: 0; border: 0; font-size: var(--text-lg); }
.settings-form .sec-h.spread { display: flex; justify-content: space-between; align-items: baseline; }
.settings-form .sec-body { padding: 0; display: flex; flex-direction: column; gap: 14px; }
.settings-form .sec-body label:not(.check):not(.switch-row) { margin: 0; font-weight: 600; font-size: var(--text-base); }
.settings-form .sec-body label > .small { font-size: var(--text-xs); }
.settings-form .sec-note { padding: 0; color: var(--color-ink-3); }
.settings-form .fieldgrid { gap: 14px; }
.settings-form .fieldgrid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.settings-form .fieldgrid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.settings-form .switch-row, .settings-form .cap-row { padding: 12px 0; border: 0; border-top: var(--rule); gap: 12px; }
.settings-form .sec-h + .switch-row, .settings-form .sec-h + .cap-row { margin-top: -6px; }
.settings-form .switch-row > input { width: 18px; height: 18px; }
.settings-form .cap-row { justify-content: space-between; }
.settings-form .cap-row + .cap-row { border-top: var(--rule); }
.settings-form .switch-row:last-child, .settings-form .cap-row:last-child { padding-bottom: 0; }
.settings-form .status-rows { padding: 0; margin: 0 -8px; }
.settings-form .status-rows .r { padding: 6px 8px; border-radius: var(--radius-sm); }
.settings-form .logo-field { margin: 0; padding: 14px; border: 0; border-radius: 12px; background: var(--color-paper-2); gap: var(--space-md); }
.settings-form .logo-field p { margin: 4px 0 8px; font-size: var(--text-sm); color: var(--color-ink-3); line-height: 1.5; }
.settings-form .logo-prev-box { background: var(--color-surface); border: var(--rule); }
.settings-form .logo-prev-box.has-logo img { width: 56px; height: 56px; }
.settings-form .logo-field .row { align-items: center; gap: 10px; }
.settings-form .logo-field button.danger-link { font-weight: 600; text-decoration: none; font-size: var(--text-sm); }
.settings-form .hours { gap: 14px; }
.settings-form .days { margin: 0; }
.settings-form label :is(input, select, textarea) { font-weight: 400; }
.settings-form :is(.switch-row, .cap-row) b { font-weight: 600; }
.settings-form .hours .to { padding-bottom: 10px; }

/* Members */
.invite-form { padding: 18px; gap: 12px; }
.invite-form > label { margin: 0; font-weight: 600; font-size: var(--text-base); }
.invite-form > label:not(.grow-label) { flex: 0 0 10rem; }
.invite-form > label :is(input, select) { font-weight: 400; }
.members-t th:nth-child(5) { text-align: right; }
.members-t .who { font-weight: 600; }
.members-t td:nth-child(3) { color: var(--color-ink-2); }
.org-page .members-h { margin: var(--space-xs) 0 0; font-size: var(--text-lg); }
.member-rows { margin: 0; }
.member-rows .r { padding: 14px 18px; }
.member-rows .m-act { gap: 4px; }
.member-rows .m-act :is(button.link, button.danger-link, summary.link) { padding: 4px 8px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.member-rows .m-act :is(button.link, summary.link):hover { background: var(--color-accent-soft); }
.member-rows .m-role { color: var(--color-ink); }
.member-rows .m-state { font-size: var(--text-sm); }
.member-rows .m-state { width: auto; white-space: nowrap; }
.member-rows .who { font-weight: 600; }
.plan-news .tcard-head { border-bottom: 0; }

/* Access: groups, policies and one member, matched to the boards. */
.access-layout { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; }
.access-layout.policies { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
.access-list { padding: 8px; top: 20px; }
.access-list a { padding: 10px 12px; border-radius: var(--radius); }
.access-list a b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.access-list a b .icon { color: var(--color-sun-ink); }
.access-list a[aria-current] b { color: var(--color-accent-text); }
.access-list a.add { min-height: 44px; margin-top: 6px; border: 1px dashed var(--color-rule-strong); color: var(--color-accent); font-weight: 600; }
.access-list a.add[aria-current] { border-style: solid; border-color: var(--color-accent); }
.access-list .pol-ic { flex: none; width: 28px; height: 28px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--color-ok-soft); color: var(--color-ok); }
.access-list .pol-ic.deny { background: var(--color-bad-soft); color: var(--color-bad); }
.access-edit { margin: 0; }
.ae-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-md); padding: 18px; border-bottom: var(--rule); }
.ae-fields label { margin: 0; font-weight: 600; font-size: var(--text-base); }
.ae-fields label :is(input, select) { font-weight: 400; }
.ae-note { display: flex; gap: 10px; align-items: flex-start; margin: var(--space-md) 18px 0; padding: 12px 14px; border-radius: var(--radius); background: var(--color-sun-soft); border: 1px solid var(--color-sun-rule); color: var(--color-sun-ink); }
.ae-note .icon { flex: none; margin-top: 2px; }
.ae-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); padding: var(--space-md) 18px 6px; }
.ae-h h2 { margin: 0; font-size: var(--text-md); }
.ae-h .muted { font-variant-numeric: tabular-nums; color: var(--color-ink-3); }
.ae-sub { margin: 0; padding: 0 18px 10px; color: var(--color-ink-3); }
.access-edit .policy-picks { padding: 0 10px 10px; }
.access-edit .policy-pick { gap: 10px; padding: 12px 8px; border-bottom: 0; border-radius: var(--radius); }
.access-edit .policy-pick:hover { background: var(--color-paper-2); }
.access-edit .policy-pick input { width: 18px; height: 18px; margin-top: 2px; }
.access-edit .policy-pick .grow { display: flex; flex-direction: column; gap: 3px; }
.access-edit .policy-pick .pp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--space-xs); }
.access-edit .policy-pick small { font-size: var(--text-base); color: var(--color-ink-2); }
.access-edit .policy-pick small.pp-cond { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--color-sun-ink); }
.access-edit .policy-pick small.muted { font-size: var(--text-sm); color: var(--color-ink-3); }
.pp-edit { flex: none; font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.ae-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-top: var(--rule); }
.ae-foot form { margin: 0; }
.ae-people { display: flex; align-items: center; gap: var(--space-xs); margin-right: auto; color: var(--color-ink-2); min-width: 0; }
.ae-people .round { width: 28px; height: 28px; font-size: 11px; border: 2px solid var(--color-surface); }
.ae-people .round + .round { margin-left: -14px; }
.ae-people a { font-weight: 600; text-decoration: none; }
.ae-foot button.danger-link { font-weight: 600; text-decoration: none; }
.ae-foot > button:last-child { margin-left: auto; }
.ae-people ~ button:last-child, .ae-foot button.danger-link ~ button { margin-left: 0; }
.access-edit .policy-pick.deny b { color: var(--color-ink); }
@media (max-width: 52rem) { .ae-fields { grid-template-columns: minmax(0, 1fr); } }
.pp-top > * { flex: none; }

/* Access > Policies: three cards and a sticky save bar. */
.policy-form { display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.org-page .policy-form section.panel { margin: 0; gap: 0; }
.pol-sec { padding: 18px; display: flex; flex-direction: column; gap: var(--space-md); }
.org-page .policy-form section.pol-sec { gap: var(--space-md); }
.pol-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--space-md); }
.pol-fields label, .pol-when-body > label, .pol-times label { margin: 0; font-weight: 600; font-size: var(--text-base); }
.policy-form label :is(input, textarea, select) { font-weight: 400; }
.effect-cards { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.effect-cards legend { padding: 0 0 8px; font-weight: 600; }
.effect-card { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px; border-radius: 12px; border: 1px solid var(--color-rule-strong); background: var(--color-surface); font-weight: 400; cursor: pointer; transition: border-color var(--dur-short) var(--ease-out), background var(--dur-short) var(--ease-out); }
.effect-card input { width: 18px; height: 18px; margin-top: 1px; }
.effect-card span { display: flex; flex-direction: column; gap: 2px; }
.effect-card b { color: var(--color-accent-text); }
.effect-card small { font-size: var(--text-sm); color: var(--color-ink-2); line-height: 1.45; }
.effect-card:has(input:checked) { border: 2px solid var(--color-accent); padding: 13px; background: var(--color-accent-soft); }
.effect-card.deny input { accent-color: var(--color-bad); }
.effect-card.deny b { color: var(--color-bad); }
.effect-card.deny:has(input:checked) { border-color: var(--color-bad); background: var(--color-bad-soft); }
.pol-actions .tcard-head, .pol-when .tcard-head { border-bottom: var(--rule); }
.pol-actions .tcard-head .sub { font-variant-numeric: tabular-nums; }
.every-chip { margin: 0; padding: 8px 12px; border-radius: var(--radius); background: var(--color-paper-2); font-weight: 600; }
.every-note { display: none; margin: 0; padding: 18px; color: var(--color-ink-2); }
.pol-actions:has(input[data-all-actions]:checked) .every-note { display: block; }
.pol-grid { padding: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 12px; }
.pol-grid fieldset { padding: 12px; border-radius: 12px; gap: 4px; }
.pol-grid label.check.whole, .pol-grid .whole-h { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 4px; padding: 0 0 10px; min-height: 0; border-bottom: var(--rule); font-weight: 700; }
.pol-grid .whole-h { padding-left: 26px; }
.pol-grid .whole-h .grow, .pol-grid label.whole .grow { flex: 1; }
.pg-n { font-size: var(--text-xs); font-weight: 600; color: var(--color-ink-3); font-variant-numeric: tabular-nums; }
.pol-grid label.check.act { align-items: flex-start; min-height: 0; padding: 4px 0; }
.pol-grid label.check input { margin-top: 2px; }
.pol-grid label.act span { display: flex; flex-direction: column; gap: 1px; }
.pol-grid label.act code { border: 0; background: none; padding: 0; font-size: 11px; color: var(--color-ink-3); }
.pol-when-body { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.pol-when-body .day-pick { gap: 6px; }
.pol-when-body .day-pick legend { font-weight: 600; padding-bottom: 8px; }
.pol-when-body .day-pick .hint { flex-basis: 100%; }
.pol-times { display: grid; grid-template-columns: repeat(2, minmax(0, 11.25rem)); gap: var(--space-md); }
.pol-ips { max-width: 32.5rem; }
.pol-ips textarea { font-size: var(--text-sm); line-height: 1.6; }
.pol-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--color-surface); border: var(--rule); box-shadow: var(--shadow-lift); }
.pol-bar .grow { margin-right: auto; color: var(--color-ink-2); }
.pol-bar button.danger-link { font-weight: 600; text-decoration: none; }
@media (max-width: 52rem) { .pol-fields, .effect-cards { grid-template-columns: minmax(0, 1fr); } }
.pol-grid legend.visually-hidden { float: none; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Access > one member */
.access-layout.member { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; }
.member-access { display: flex; flex-direction: column; gap: var(--space-md); position: sticky; top: 20px; }
.org-page .member-access section.panel, .org-page section.eff-card { margin: 0; gap: 0; }
.member-access .tcard-head, .eff-card .tcard-head { padding: 14px 16px; border-bottom: var(--rule); }
.member-access .tcard-head h2 { font-size: 0.9375rem; }
.member-access .tcard-head .sub { font-size: var(--text-sm); }
.ma-list { margin: 0; padding: 8px; border: 0; display: flex; flex-direction: column; }
.ma-pick { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 8px; border-radius: var(--radius); font-weight: 400; cursor: pointer; }
.ma-pick:hover { background: var(--color-paper-2); }
.ma-pick input { width: 18px; height: 18px; margin-top: 1px; }
.ma-pick > span:not(.badge) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ma-pick b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ma-pick b .icon { color: var(--color-sun-ink); }
.ma-pick small { font-size: var(--text-xs); color: var(--color-ink-3); }
.ma-pick small.pp-cond { color: var(--color-sun-ink); }
.member-access .ae-foot { padding: 12px 16px; }
.eff-card .tcard-head { padding: 16px 18px; }
.eff-show { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--color-paper-2); }
.eff-show label { margin: 0; display: flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 9px; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); cursor: pointer; }
#eff-all:checked ~ .tcard-head label[for=eff-all], #eff-yes:checked ~ .tcard-head label[for=eff-yes], #eff-no:checked ~ .tcard-head label[for=eff-no] { background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-1); }
#eff-all:focus-visible ~ .tcard-head label[for=eff-all], #eff-yes:focus-visible ~ .tcard-head label[for=eff-yes], #eff-no:focus-visible ~ .tcard-head label[for=eff-no] { outline: 2px solid var(--color-focus); outline-offset: 2px; }
#eff-yes:checked ~ .eff-areas .eff-row:not(.k-yes), #eff-no:checked ~ .eff-areas .eff-row.k-yes, #eff-yes:checked ~ .eff-areas .eff-area.none-yes, #eff-no:checked ~ .eff-areas .eff-area.all-yes { display: none; }
.eff-counts { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 18px; background: var(--color-paper); border-bottom: var(--rule); font-size: var(--text-sm); color: var(--color-ink-2); }
.eff-counts b { font-variant-numeric: tabular-nums; color: var(--color-ink); }
.eff-counts b.yes { color: var(--color-ok); }
.eff-counts b.block { color: var(--color-bad); }
.eff-counts b.later { color: var(--color-sun-ink); }
.eff-areas { padding: 16px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.75rem), 1fr)); gap: 12px; align-items: start; }
.eff-area { border-radius: 12px; border: var(--rule); overflow: hidden; }
.eff-area-h { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: var(--color-paper-2); }
.eff-area-h h3 { margin: 0; font-size: var(--text-sm); font-weight: 700; }
.eff-area-h span { font-size: var(--text-xs); color: var(--color-ink-3); font-variant-numeric: tabular-nums; }
.eff-area ul { margin: 0; padding: 0; list-style: none; }
.eff-area .eff-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 0; border-top: var(--rule); }
.eff-area .eff-row:first-child { border-top: 0; }
.eff-row .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-2); color: var(--color-ink-3); }
.eff-row .mark i { display: block; width: 8px; height: 2px; border-radius: 2px; background: currentColor; }
.eff-row.k-yes .mark { background: var(--color-ok-soft); color: var(--color-ok); }
.eff-row.k-block .mark { background: var(--color-bad-soft); color: var(--color-bad); }
.eff-row.k-later .mark { background: var(--color-sun-soft); color: var(--color-sun-ink); }
.eff-row.k-none > span:last-child { color: var(--color-ink-3); }
.eff-row small { display: block; font-size: var(--text-xs); color: var(--color-ink-3); }
.eff-row.k-block small { color: var(--color-bad); }
@media (max-width: 52rem) { .member-access { position: static; } }
.member-access .ae-foot > button:last-child { margin-left: 0; }

/* Audit log in a table card */
.tcard > .audit-filter { margin: 0; padding: 12px 18px; border-bottom: var(--rule); gap: 8px 12px; }
.tcard > .audit-filter > label { margin: 0; font-weight: 600; }
.tcard > .audit-filter :is(select, input) { font-weight: 400; min-height: 36px; }
.tcard > .audit-filter > button { min-height: 36px; }
.audit-t td { vertical-align: top; }
.audit-t td:last-child { white-space: normal; width: 100%; min-width: 18rem; }
.audit-t td.who-name { font-weight: 600; white-space: nowrap; }
.audit-t td.mono-sm { white-space: nowrap; }
.audit-t .audit-diff { color: var(--color-ink-3); }
.audit-t td:last-child :is(li, span, code) { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }

/* Other organisation pages share the card look: 20px padding, 18px headings, bold labels. */
.org-page section.org-form, .org-page.narrow-page > .panel, .org-page.narrow-page > form.panel { padding: 20px; border-radius: var(--radius-xl); }
.org-form h2, .org-page.narrow-page .panel > h2 { font-size: var(--text-lg); }
.org-page :is(.org-form, .narrow-page .panel) label:not(.check):not(.switch-row) { font-weight: 600; font-size: var(--text-base); }
.org-page :is(.org-form, .narrow-page .panel) label :is(input, select, textarea) { font-weight: 400; }
.org-page .provider-card { padding: 18px; gap: 12px; }
.org-page .provider-top b { font-weight: 600; }
.org-page section > .section-h, .org-page .section-h { font-size: var(--text-lg); }
.col-rows { border-radius: var(--radius-xl); }
@media (max-width: 52rem) {
  .access-layout, .access-layout.member, .access-layout.policies { grid-template-columns: minmax(0, 1fr); }
  .access-list, .member-access { position: static; }
  .eff-card .tcard-head { align-items: flex-start; }
}

/* Plan and billing: the optional discount code under the period switch. */
.plan-code { max-width: 20rem; margin: var(--space-sm) 0 0; }

/* ---------- Company sign-in (SSO): Integrations > Company sign-in (views/org/sso.ejs) ---------- */
.org-page.sso-page { max-width: none; } /* full width, like every page */
.sso-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.sso-title .badge { font-family: var(--font-body); font-size: var(--text-sm); letter-spacing: 0; }
.sso-page :is(.sso-fields, .sso-add, .sso-group) :is(input, select) { width: 100%; max-width: none; }
.sso-page .panel-body { display: flex; flex-direction: column; gap: var(--space-md); }
.sso-page .panel-body > * { margin: 0; }
.sso-page .panel .sub { color: var(--color-ink-3); }
.sso-page fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
.sso-page fieldset.bare > legend { padding: 0; margin-bottom: var(--space-xs); font-weight: 600; font-size: var(--text-base); }
.sso-choices { display: flex; flex-direction: column; gap: var(--space-xs); }
label.sso-choice { display: flex; align-items: flex-start; gap: var(--space-sm); margin: 0; padding: 0.875rem var(--space-md); border: 1px solid var(--color-rule-strong); border-radius: 12px; background: var(--color-surface); cursor: pointer; font-weight: 400; transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
label.sso-choice:hover { border-color: var(--color-accent); }
label.sso-choice:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px var(--color-accent); }
label.sso-choice:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
label.sso-choice > input { width: 18px; height: 18px; margin-top: 7px; flex: none; }
label.sso-choice .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
label.sso-choice b { font-weight: 600; }
label.sso-choice small, .sso-page label.check small, .sso-action small { display: block; font-size: var(--text-sm); color: var(--color-ink-3); line-height: 1.45; }
label.sso-choice.is-off { cursor: not-allowed; background: var(--color-paper-2); }
label.sso-choice.is-off:hover { border-color: var(--color-rule-strong); }
label.sso-choice.is-off b { color: var(--color-ink-2); }
/* Only the chosen provider's fields show */
.sso-fields { display: none; flex-direction: column; gap: var(--space-sm); padding: var(--space-md); border-radius: 12px; background: var(--color-paper-2); }
.sso-fields > * { margin: 0; }
.sso-fields label { display: flex; flex-direction: column; gap: 0.375rem; margin: 0; }
.sso-fields .fieldgrid { margin: 0; }
.sso-fields .how { margin: 0; }
.sso-form:has(input[name="provider"][value="entra"]:checked) .sso-fields[data-for="entra"],
.sso-form:has(input[name="provider"][value="google"]:checked) .sso-fields[data-for="google"],
.sso-form:has(input[name="provider"][value="oidc"]:checked) .sso-fields[data-for="oidc"] { display: flex; }
.sso-copy { margin: var(--space-2xs) 0 0; padding: 4px 4px 4px 12px; border: var(--rule); border-radius: var(--radius); background: var(--color-surface); }
.sso-copy code { background: none; border: 0; padding: 0; font-size: var(--text-sm); }
.sso-page label.check { align-items: flex-start; margin: 0; }
.sso-page label.check > input { margin-top: 3px; }
.sso-group { display: flex; flex-direction: column; gap: 0.375rem; margin: 0 0 0 1.625rem; max-width: 20rem; }
.sso-page .switch-row { border: 0; padding: 0; }
/* domains */
.sso-domains { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.sso-domains:empty { display: none; }
.sso-domains > li { margin: 0; padding: var(--space-sm) var(--space-md); border: var(--rule); border-radius: 12px; display: flex; flex-direction: column; gap: var(--space-xs); }
.sso-domains > li > * { margin: 0; }
.sso-domain-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.sso-domain-head .grow { flex: 1 1 auto; }
.sso-record { display: flex; flex-direction: column; gap: var(--space-2xs); }
.sso-record > * { margin: 0; }
.sso-add { align-items: flex-end; gap: var(--space-sm); flex-wrap: wrap; }
.sso-add label { display: flex; flex-direction: column; gap: 0.375rem; margin: 0; flex: 1 1 14rem; }
.sso-add button { flex: none; }
.sso-page .empty-state { padding: var(--space-lg) var(--space-md); border: 1px dashed var(--color-rule-strong); border-radius: 12px; }
.sso-page .empty-state p { margin: 0; color: var(--color-ink-3); }
/* test, turn off, remove */
.sso-actions { display: flex; flex-direction: column; }
.sso-action { display: flex; align-items: center; gap: var(--space-md); margin: 0; padding: var(--space-sm) 0; border-top: var(--rule); }
.sso-action:first-child { border-top: 0; padding-top: 0; }
.sso-action .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sso-action button { flex: none; }
@media (max-width: 40rem) {
  .sso-action { flex-direction: column; align-items: stretch; gap: var(--space-xs); }
  .sso-action button, .sso-add button { width: 100%; justify-content: center; }
  .sso-group { margin-left: 0; max-width: none; }
  .sso-form .form-actions.end > * { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { label.sso-choice { transition: none; } }
.sso-h { display: flex; flex-direction: column; gap: var(--space-2xs); }
.sso-h > * { margin: 0; }
.sso-page fieldset.bare > legend h2 { margin: 0; }
.sso-page small b.inline { display: inline; font-weight: 600; color: var(--color-ink-2); }
.sso-redirect { display: flex; flex-direction: column; gap: 0.375rem; }
.sso-redirect .copyfield { margin: 0; }
.sso-label { font-weight: 600; font-size: var(--text-base); }
.sso-dns { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xs) var(--space-md); margin: 0; padding: var(--space-sm) var(--space-md); border-radius: var(--radius); background: var(--color-paper-2); }
.sso-dns > div { display: contents; }
.sso-dns dt { font-size: var(--text-sm); color: var(--color-ink-3); align-self: center; }
.sso-dns dd { margin: 0; min-width: 0; align-self: center; overflow-wrap: anywhere; }
.sso-dns dd .copyfield { margin: 0; }
/* The Company sign-in card on Integrations */
.provider-card .sso-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
/* The card on file, beside Payment details and invoices on Plan and billing */
.plan-card { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.plan-card-id { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--color-ink-2); }
.plan-card-id > .icon { color: var(--color-ink-3); }

/* Plan ending: the note keeps its "Keep plan" button at the end, below the words on phones. */
.plan-note > span { flex: 1; }
.plan-note > form { flex: none; margin-left: auto; }
@media (max-width: 640px) { .plan-note:has(> form) { flex-wrap: wrap; } .plan-note > form { margin-left: 28px; } }

/* Plan and billing: add-ons, one row each */
.addon-panel { overflow: hidden; }
.addon-panel .tcard-head + .list-row { border-top: 0; }
.addon-price { min-width: 9rem; font-variant-numeric: tabular-nums; }
.addon-act { margin-left: auto; }
