/* Calm theme, after the Delore Care finance portal: warm cream ground, white
 * cards, Figtree for headings and Noto Sans for text, in the group palette
 * (Kokoodi blue, Appnable green, Wingato orange). Scoped to body.calm; every
 * page in the app opts in. */

body.calm {
    --c-bg: #faf7f2;
    --c-card: #ffffff;
    --c-ink: #1f2937;
    --c-ink-2: #4b5563;
    --c-muted: #6b6f76;
    --c-border: #ebe5da;
    --c-border-soft: #f3efe7;
    --c-tint: #f6f2ea;
    /* Group palette: Kokoodi blue leads; Appnable green and Wingato orange
     * mark which company an invoice belongs to. Red is kept for overdue only. */
    --c-accent: #156d99;        /* Kokoodi blue, deepened for 5.7:1 with white text */
    --c-accent-hover: #105a80;
    --c-accent-soft: #e6f2f8;
    --c-chart-accent: #1a84b8;  /* Kokoodi blue as sampled from the logo; passes the palette checks against #c62f2f */
    --c-kokoodi: #1a84b8;
    --c-appnable: #7fb83f;
    --c-appnable-ink: #4d7a1f;
    --c-appnable-soft: #eef6e4;
    --c-wingato: #e47c2a;
    --c-wingato-ink: #a5520f;
    --c-wingato-soft: #fdf0e5;
    --c-critical: #c62f2f;
    --c-critical-soft: #fdf1f0;
    --c-critical-border: #f3cfcb;
    --c-good: #0f8a6a;
    --c-good-soft: #e6f5ef;

    background: var(--c-bg);
    color: var(--c-ink);
    font-family: 'Noto Sans', 'Inter', system-ui, sans-serif;
}

/* ── Frame ─────────────────────────────────────────────────────────────── */
.calm .main-content { background: var(--c-bg); }
.calm .app-header { background: rgba(250, 247, 242, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--c-border); }
.calm .header-left h1 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 18px; font-weight: 600; color: var(--c-ink); }
.calm .content { padding: 28px 32px 48px; }

.calm .btn { border-radius: 10px; font-weight: 600; }
.calm .btn-primary { background: var(--c-accent); color: #fff; }
.calm .btn-primary:hover { background: var(--c-accent-hover); }
.calm .btn-secondary { background: var(--c-card); color: var(--c-ink); border: 1px solid var(--c-border); }
.calm .btn-secondary:hover { background: var(--c-tint); }
.calm .btn-icon { color: var(--c-ink-2); border-radius: 8px; }
.calm .btn-icon:hover { background: var(--c-tint); color: var(--c-accent); }

.calm .card { background: var(--c-card); border: 1px solid var(--c-border); border-radius: 14px; box-shadow: 0 1px 2px rgba(31, 41, 55, 0.04); }
.calm .card-header { border-bottom: 1px solid var(--c-border-soft); }
.calm .card-header h2 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 15px; color: var(--c-ink); }
.calm .muted { color: var(--c-muted); }

.calm .form-input { border-color: var(--c-border); border-radius: 10px; background: #fff; }
.calm .form-input:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); outline: none; }
.calm .form-group label { color: var(--c-muted); letter-spacing: 0.12em; font-size: 10.5px; }

/* ── Dashboard ─────────────────────────────────────────────────────────── */
.dash { margin-bottom: 28px; }
.dash-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin: 0 0 10px;
}
.dash-eyebrow-list { margin-top: 4px; }
.dash-headline {
    font-family: 'Figtree', 'Noto Sans', sans-serif;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--c-ink);
    margin: 0 0 8px;
}
.dash-sub { font-size: 15px; line-height: 1.55; color: var(--c-ink-2); max-width: 720px; margin: 0 0 28px; }
.dash-empty { color: var(--c-muted); font-size: 14px; margin: 4px 0; }

/* Money cards */
.money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; }
.money-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 14px;
    padding: 20px 22px 18px;
    display: flex;
    flex-direction: column;
}
.money-card.has-overdue { background: linear-gradient(180deg, var(--c-critical-soft) 0%, #fff 70%); border-color: var(--c-critical-border); }
.money-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.money-code { font-weight: 700; font-size: 12px; letter-spacing: 0.08em; color: var(--c-ink); background: var(--c-tint); border-radius: 6px; padding: 3px 7px; }
.money-name { font-size: 13px; color: var(--c-muted); }
.money-value { font-family: 'Noto Sans', sans-serif; font-size: 30px; font-weight: 600; line-height: 1.15; color: var(--c-ink); }
.money-caption { font-size: 13px; color: var(--c-muted); margin: 4px 0 16px; }
.money-none { font-size: 13px; color: var(--c-muted); margin: 0 0 16px; }

.flag { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.flag svg { width: 13px; height: 13px; }
.flag-overdue { color: var(--c-critical); background: #fff; border: 1px solid var(--c-critical-border); }

/* Two-part meter: the 2px gap is the spacer between fills. */
.meter { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--c-border-soft); }
.meter-seg { display: block; height: 100%; min-width: 4px; }
.meter-seg:first-child { border-radius: 999px 0 0 999px; }
.meter-seg:last-child { border-radius: 0 999px 999px 0; }
.meter-seg:only-child { border-radius: 999px; }
.meter-overdue { background: var(--c-critical); }
.meter-notdue { background: var(--c-chart-accent); }
.meter-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 13px; color: var(--c-ink-2); }
.meter-legend strong { color: var(--c-ink); font-weight: 600; margin-left: 4px; }
.key { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.key-overdue { background: var(--c-critical); }
.key-notdue { background: var(--c-chart-accent); }

.money-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--c-border-soft); }
.money-foot dt { font-size: 11px; color: var(--c-muted); margin-bottom: 3px; }
.money-foot dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--c-ink); white-space: nowrap; }

/* Panels */
.dash-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-panel { background: var(--c-card); border: 1px solid var(--c-border); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.dash-two .dash-panel { margin-bottom: 0; }
.dash-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-panel-head h3 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 16px; font-weight: 600; color: var(--c-ink); display: flex; align-items: center; gap: 8px; margin: 0; }
.dash-panel-head h3 svg { width: 17px; height: 17px; color: var(--c-accent); }

/* Me: who's off this week and next */
.wo-weeks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wo-week h4 { font-size: 13px; font-weight: 600; color: var(--c-muted); margin: 0 0 8px; text-transform: none; }
.wo-list { list-style: none; margin: 0; padding: 0; }
.wo-item { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--c-border); font-size: 14px; }
.wo-item:last-child { border-bottom: 0; }
.wo-name { color: var(--c-ink); font-weight: 500; overflow-wrap: anywhere; }
.wo-when { color: var(--c-ink-2); white-space: nowrap; text-align: right; }
.wo-when .chip { margin-left: 6px; }
.wo-empty { font-size: 14px; margin: 0; }
.wo-note { margin: 12px 0 0; }
@media (max-width: 640px) { .wo-weeks { grid-template-columns: 1fr; gap: 14px; } .wo-when { white-space: normal; } }
.dash-panel .table-wrap { margin: 0 -20px -18px; }

/* Coming in the next 30 days */
.upcoming ul { list-style: none; margin: 0; padding: 0; }
.upcoming li { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--c-border-soft); }
.upcoming li:first-child { border-top: 0; padding-top: 2px; }
.up-date, .up-who { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.up-date strong { font-weight: 600; }
.up-date .muted, .up-who .muted { font-size: 12px; }
.up-amount { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.calm .invoices-table thead th { background: var(--c-tint); color: var(--c-muted); border-bottom: 1px solid var(--c-border); letter-spacing: 0.1em; font-size: 11px; }
.calm .invoices-table tbody td { border-bottom: 1px solid var(--c-border-soft); color: var(--c-ink); }
.calm .invoices-table tbody tr:hover,
.calm .invoices-table tbody tr:hover td.actions-col { background: #fcfaf6; }
.calm .invoices-table th:last-child { background: var(--c-tint); }
.calm .invoices-table td.actions-col { background: #fff; }
.calm .invoices-table .invoice-number { color: var(--c-ink); }
.calm .owed-clients thead th:last-child { background: var(--c-tint); }
.calm .owed-overdue { color: var(--c-critical) !important; }
.calm .owed-late { color: var(--c-critical); }

.calm .status-pill { font-weight: 600; letter-spacing: 0.04em; border: 1px solid transparent; }
.calm .status-pill.draft { background: var(--c-tint); color: var(--c-ink-2); border-color: var(--c-border); }
.calm .status-pill.sent  { background: var(--c-accent-soft); color: var(--c-accent); }
.calm .status-pill.paid  { background: var(--c-good-soft); color: var(--c-good); }
.calm .status-note.owed-overdue { font-weight: 600; }

@media (max-width: 1100px) {
    .dash-two { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .calm .content { padding: 20px 16px 40px; }
    .dash-headline { font-size: 24px; }
    .money-foot { grid-template-columns: 1fr 1fr; }
    .upcoming li { grid-template-columns: 1fr auto; }
    .up-date { grid-column: 1 / -1; flex-direction: row; gap: 8px; }
    .calm .filter-bar { grid-template-columns: 1fr 1fr; }
    .calm .table-wrap { max-width: 100%; }
}

/* Draft rows carry six icons plus "Mark sent"; keep them inside 1280px. */
.calm #invoicesTbody .row-actions .btn-icon { width: 24px; height: 24px; }

/* ── View tabs ─────────────────────────────────────────────────────────── */
.view-tabs { display: flex; gap: 4px; margin: 0 0 24px; border-bottom: 1px solid var(--c-border); }
.view-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px 12px; margin-bottom: -1px;
    font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 15px; font-weight: 600;
    color: var(--c-muted); text-decoration: none;
    border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0;
}
.view-tab svg { width: 17px; height: 17px; }
/* Pages that share a menu entry (Templates: Contracts and Reference form). */
.page-tabs { margin-bottom: 20px; }
.page-tabs .view-tab[hidden] { display: none; }
.view-tab:hover { color: var(--c-ink); background: var(--c-tint); }
.view-tab.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.view-tab:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.tab-badge { font-family: 'Noto Sans', sans-serif; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--c-tint); color: var(--c-ink-2); }
.tab-badge-alert { background: var(--c-critical-soft); color: var(--c-critical); border: 1px solid var(--c-critical-border); }
.view[hidden] { display: none !important; }

.dash-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--c-accent); text-decoration: none; }
.dash-link:hover { text-decoration: underline; }
.dash-link svg { width: 14px; height: 14px; }

/* ── Sidebar (every page) ──────────────────────────────────────────────── */
.calm .sidebar {
    background: #fdfbf8;
    color: var(--c-ink);
    border-right: 1px solid var(--c-border);
    width: 240px;
}
.calm .main-content { margin-left: 240px; }
.calm .sidebar::before {
    /* The three companies in one thin rule across the top. */
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--c-kokoodi) 0 33.33%, var(--c-appnable) 33.33% 66.66%, var(--c-wingato) 66.66% 100%);
}
.calm .sidebar-brand { border-bottom: 1px solid var(--c-border-soft); padding: 18px 20px; }
.calm .sidebar-title { color: var(--c-ink); font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 14px; }
.calm .sidebar-nav { padding: 14px 12px; }
.calm .nav-section {
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--c-muted); padding: 10px 12px 6px;
}
.calm .nav-item {
    color: var(--c-ink-2);
    align-items: flex-start;
    padding: 9px 12px;
    border-radius: 10px;
    margin-bottom: 2px;
}
.calm .nav-item svg { color: var(--c-muted); margin-top: 1px; flex-shrink: 0; }
.calm .nav-item:hover { background: var(--c-tint); color: var(--c-ink); }
.calm .nav-item.active { background: var(--c-accent-soft); color: var(--c-accent); }
.calm .nav-item.active svg { color: var(--c-accent); }
.calm .nav-text { display: flex; flex-direction: column; gap: 1px; }
.calm .nav-label { font-size: 14px; font-weight: 600; }

/* The menu's groups (GROUPS in access.js): a heading that opens and closes
   each one, the group with the current page always open, Help at the foot.
   Each item is its name alone; what the page is for is its tooltip. */
.calm .sidebar-nav { display: flex; flex-direction: column; }
/* When everything is open on a short screen the menu scrolls; nothing in it
   is squashed to make room (the brand band kept shrinking). */
.calm .sidebar > *, .calm .sidebar::before { flex-shrink: 0; }
.calm .nav-group[hidden] { display: none !important; }
.calm .nav-group + .nav-group { margin-top: 4px; }
.calm .nav-group-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
    margin: 0; padding: 8px 12px 6px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left;
    font-family: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted);
}
.calm .nav-group-head svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform 0.15s ease; }
.calm .nav-group.is-closed .nav-group-head svg { transform: rotate(-90deg); }
.calm .nav-group-head:hover { color: var(--c-ink); background: var(--c-tint); }
.calm .nav-group-head:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.calm .nav-group.is-closed .nav-group-items { display: none; }
/* A page's own actions come after the groups, a little apart from them. */
.calm .sidebar-nav > .nav-page-actions { margin-top: 20px; }
/* Help sits at the foot, however few entries are above it. */
.calm .nav-group-foot { margin-top: auto !important; padding-top: 12px; }
.calm .sidebar .nav-item { align-items: center; padding: 8px 12px; }
.calm .sidebar .nav-item svg { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .calm .nav-group-head svg { transition: none; } }
.calm .nav-divider { background: var(--c-border); margin: 10px 4px; }
.calm .sidebar-footer { border-top: 1px solid var(--c-border-soft); color: var(--c-muted); padding: 14px 20px; }
.calm .group-line { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--c-ink-2); margin-bottom: 6px; }
.calm .group-line span { display: inline-flex; align-items: center; gap: 5px; }
.calm .group-line i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.calm .dot-kokoodi { background: var(--c-kokoodi); }
.calm .dot-appnable { background: var(--c-appnable); }
.calm .dot-wingato { background: var(--c-wingato); }
.calm .sidebar-footer div, .calm .sidebar-footer span { color: var(--c-muted); }

/* ── Issuer tags (invoices) ───────────────────────────────────────────── */
.issuer-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.issuer-tag::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.issuer-tag.appnable { background: var(--c-appnable-soft); color: var(--c-appnable-ink); }
.issuer-tag.appnable::before { background: var(--c-appnable); }
.issuer-tag.wingato { background: var(--c-wingato-soft); color: var(--c-wingato-ink); }
.issuer-tag.wingato::before { background: var(--c-wingato); }

/* ── Shared controls on the other pages ───────────────────────────────── */
.calm .btn-success { background: var(--c-accent); color: #fff; }
.calm .btn-success:hover { background: var(--c-accent-hover); transform: none; box-shadow: none; }
.calm .btn-ghost { color: var(--c-ink-2); }
.calm input[type="checkbox"] { accent-color: var(--c-accent); }
.calm .toast.success { background: var(--c-good); }

/* Figures wear text ink, not green; tabular only where they line up. */
.calm .stat-value { font-family: 'Noto Sans', sans-serif; color: var(--c-ink); }
.calm .stat-value.money { font-family: 'Noto Sans', sans-serif; color: var(--c-ink); font-size: 20px; }
.calm .total-cell, .calm .grand-total { font-family: 'Noto Sans', sans-serif; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.calm .payment-item input, .calm .bonus-person .form-input { font-family: 'Noto Sans', sans-serif; font-variant-numeric: tabular-nums; }
.calm .payment-item select, .calm .payment-item input { border-color: var(--c-border); border-radius: 8px; }
.calm .payment-item select:focus, .calm .payment-item input:focus { border-color: var(--c-accent); }
.calm .btn-add-item { color: var(--c-accent); }
.calm .type-badge.intern { background: var(--c-accent-soft); color: var(--c-accent); }
.calm .type-badge.staff { background: var(--c-good-soft); color: var(--c-good); }
.calm .data-grid thead th { background: var(--c-tint); color: var(--c-muted); border-bottom: 1px solid var(--c-border); letter-spacing: 0.1em; font-size: 11px; }
.calm .data-grid tbody td { border-bottom: 1px solid var(--c-border-soft); }
.calm .data-grid tbody tr:hover td,
.calm .data-grid tbody tr:hover td:last-child { background: #fcfaf6; }
.calm .card-footer { background: var(--c-tint); border-top: 1px solid var(--c-border-soft); }
.calm .card-footer.bulk-bar { background: rgba(246, 242, 234, 0.96); }

/* Recruitment tabs, matched to the invoice tabs */
.calm .tab-bar { border-bottom: 1px solid var(--c-border); }
.calm .tab-btn { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 15px; font-weight: 600; color: var(--c-muted); border-radius: 8px 8px 0 0; }
.calm .tab-btn:hover { color: var(--c-ink); background: var(--c-tint); }
.calm .tab-btn.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.calm .tab-count { background: var(--c-tint); color: var(--c-ink-2); }

/* The printed payslip keeps its own look: no cream behind it. */
@media print {
    body.calm, .calm .main-content { background: #fff !important; }
}

@media (max-width: 900px) {
    .calm .main-content { margin-left: 0; }
    .calm .sidebar { box-shadow: 8px 0 24px rgba(31, 41, 55, 0.12); }
}

/* The main column must not grow to fit a wide table: the table scrolls in
   its own box instead. */
.calm .main-content { min-width: 0; }
@media (min-width: 901px) {
    .calm .content { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 1439px) {
    .calm .invoices-table .col-issued { display: none; }
}

/* ── One grid: a 64px top band across sidebar and header, and one 24px
   left edge for the logo, menu, page title and cards. ───────────────── */
.calm .sidebar::before { height: 4px; }
.calm .sidebar-brand { height: 60px; box-sizing: border-box; padding: 0 24px; border-bottom: 1px solid var(--c-border); }
.calm .app-header { height: 64px; box-sizing: border-box; padding: 0 24px; flex-wrap: nowrap; }
.calm .sidebar-nav { padding: 16px 12px; }
.calm .nav-section { padding: 12px 12px 6px; }
.calm .nav-section:first-child { padding-top: 0; }
.calm .sidebar-footer { padding: 14px 24px; border-top: 1px solid var(--c-border); }
.calm .content { padding-top: 24px; }
.calm .card, .calm .dash-panel, .calm .money-card { border-color: var(--c-border); }
@media (min-width: 901px) {
    .calm .mobile-menu { display: none !important; }
}
.calm .clients-table td.actions-col, .calm .invoices-table td.actions-col { white-space: nowrap; }

/* Clients: long recipient lists wrap inside a fixed width. */
.calm .invoices-table .col-recipients { max-width: 230px; overflow-wrap: anywhere; font-size: 13px; color: var(--c-ink-2); }
@media (max-width: 1439px) {
    .calm .invoices-table .col-project { display: none; }
}
.calm .nowrap { white-space: nowrap; }
.calm .tab-panel .invoices-table tbody td,
.calm .tab-panel .invoices-table thead th { padding-left: 10px; padding-right: 10px; }

/* ── Access ───────────────────────────────────────────────────────────── */
.calm .nav-item[hidden], .calm .tabbar .tab[hidden], .calm .tabbar.is-single, .calm .nav-page-actions[hidden], .calm .header-right[hidden] { display: none !important; }
.access-panel { max-width: 460px; margin: 64px auto; text-align: center; background: var(--c-card); border: 1px solid var(--c-border); border-radius: 14px; padding: 36px 28px; }
.access-panel svg { width: 34px; height: 34px; color: var(--c-accent); margin-bottom: 10px; }
.access-panel h2 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 20px; margin: 0 0 8px; color: var(--c-ink); }
.access-panel p { color: var(--c-ink-2); font-size: 14px; line-height: 1.55; margin: 0 0 20px; }

/* ── Phones: bottom tab bar and a slide-in menu ───────────────────────── */
.tabbar { display: none; }
.sidebar-backdrop { display: none; }
.more-sheet[hidden], .more-backdrop[hidden] { display: none !important; }
@media (min-width: 901px) { .more-sheet, .more-backdrop { display: none !important; } }
@media (max-width: 900px) {
    .calm .mobile-menu { display: inline-flex !important; }
    .calm .app-header { padding: 0 16px; gap: 10px; }
    .calm .header-left h1 { font-size: 17px; }
    .calm .header-right { gap: 6px; }
    .calm .header-right .btn { padding: 8px 12px; font-size: 13px; }
    .calm .user-info-container { display: none; }

    .calm .sidebar { width: 280px; max-width: 86vw; z-index: 300; transform: translateX(-100%); transition: transform 0.25s ease; }
    .calm .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(31, 41, 55, 0.38); z-index: 250; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
    .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
    body.menu-open { overflow: hidden; }

    .tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
        background: rgba(253, 251, 248, 0.97); backdrop-filter: blur(8px);
        border-top: 1px solid var(--c-border);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .tabbar .tab {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 6px 2px; border-radius: 10px; text-decoration: none;
        color: var(--c-muted); font-size: 11px; font-weight: 600;
    }
    .tabbar .tab svg { width: 21px; height: 21px; }
    .tabbar .tab.active { color: var(--c-accent); background: var(--c-accent-soft); }
    .tabbar .tab-more { border: 0; background: none; font-family: inherit; cursor: pointer; }
    .tabbar .tab-more.active { color: var(--c-accent); background: var(--c-accent-soft); }
    .tabbar .tab:focus-visible, .more-item:focus-visible { outline: 3px solid var(--c-accent); outline-offset: -3px; }

    /* More: a bottom sheet over a dimmed page, clear of the home indicator */
    .more-backdrop { position: fixed; inset: 0; background: rgba(31, 41, 55, 0.38); z-index: 400; }
    .more-sheet {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 410; max-height: 80vh; overflow-y: auto;
        background: var(--c-card); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(31, 41, 55, 0.16);
        padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
        padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right));
    }
    .more-sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 6px 6px; }
    .more-sheet-head h2 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 17px; margin: 0; color: var(--c-ink); }
    .more-list { list-style: none; margin: 0; padding: 0; }
    .more-item { display: flex; align-items: center; gap: 14px; padding: 12px 10px; min-height: 48px; border-radius: 12px; text-decoration: none; color: var(--c-ink); }
    .more-item:hover { background: var(--c-tint); }
    .more-item svg { width: 21px; height: 21px; color: var(--c-ink-2); flex-shrink: 0; }
    .more-item .nav-text { display: flex; flex-direction: column; gap: 2px; }
    .more-item .nav-label { font-size: 15px; font-weight: 600; }
    .more-group { margin: 14px 10px 4px; font-family: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-muted); }
    .more-list-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--c-border); }
    /* A finger needs more room than a pointer in the slide-in menu. */
    .calm .sidebar .nav-item, .calm .nav-group-head { min-height: 44px; box-sizing: border-box; }
    .more-item.active { background: var(--c-accent-soft); }
    .more-item.active svg, .more-item.active .nav-label { color: var(--c-accent); }
    body.sheet-open { overflow: hidden; }
    /* Room so the last row is not hidden behind the bar. */
    .calm .content { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
    .calm .card-footer.bulk-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ── Home ─────────────────────────────────────────────────────────────── */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
/* Your work on Me: a row of links (home.js). */
.work-links { display: flex; flex-wrap: wrap; gap: 8px; }
.work-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-card); color: var(--c-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.work-link:hover { border-color: var(--c-accent); color: var(--c-accent); }
.work-link:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.work-link svg { width: 16px; height: 16px; color: var(--c-accent); }
.work-count { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--c-accent-soft); color: var(--c-accent); }
.work-count[hidden] { display: none; }
.me-more { margin-top: 6px; }
.home-tile { background: var(--c-card); border: 1px solid var(--c-border); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; min-height: 210px; }
.home-tile-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.home-tile-head h3 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 16px; font-weight: 600; margin: 0; color: var(--c-ink); }
.home-tile-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--c-accent-soft); color: var(--c-accent); display: inline-flex; align-items: center; justify-content: center; }
.home-tile-icon svg { width: 18px; height: 18px; }
.home-tile-body { flex: 1; }
.home-stat { font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--c-ink); }
.home-stat.is-alert { color: var(--c-critical); }
.home-line { margin: 4px 0 0; font-size: 14px; color: var(--c-ink-2); }
.home-error { color: var(--c-critical); font-size: 13px; }
.home-tile-link { margin-top: 16px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--c-accent); text-decoration: none; }
.home-tile-link svg { width: 15px; height: 15px; }
.home-tile-link:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--c-tint); color: var(--c-ink-2); border: 1px solid var(--c-border); }
.chip strong { color: var(--c-ink); }

/* ── Admin ────────────────────────────────────────────────────────────── */
.seat-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: -8px 0 18px; }
.seat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-ink-2); background: var(--c-card); border: 1px solid var(--c-border); border-radius: 999px; padding: 5px 12px; }
.seat svg { width: 15px; height: 15px; color: var(--c-good); }
.seat.is-full svg { color: var(--c-critical); }
.people { display: flex; flex-direction: column; }
.person { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--c-border-soft); }
.person:first-child { border-top: 0; padding-top: 0; }
.person.is-paused .person-main { opacity: 0.6; }
.person-name { font-weight: 600; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.person-email { font-size: 13px; color: var(--c-muted); margin-top: 2px; overflow-wrap: anywhere; }
.person-meta { font-size: 12px; color: var(--c-muted); margin-top: 8px; }
.person-note { font-size: 12px; color: var(--c-muted); text-align: right; }
.person-actions { display: flex; gap: 8px; flex-shrink: 0; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge-owner { background: var(--c-accent-soft); color: var(--c-accent); }
.badge-admin { background: var(--c-tint); color: var(--c-ink-2); border: 1px solid var(--c-border); }
.badge-paused { background: var(--c-critical-soft); color: var(--c-critical); }
.audit ul { list-style: none; margin: 0; padding: 0; }
.audit li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--c-border-soft); font-size: 13px; }
.audit li:first-child { border-top: 0; }
.audit-when { color: var(--c-muted); }

.admin-modal { width: 560px; max-width: 95vw; max-height: 90vh; display: flex; flex-direction: column; }
.admin-modal .modal-body { overflow-y: auto; }
.admin-modal .modal-header { display: flex; justify-content: space-between; align-items: center; }
.segmented { display: flex; gap: 4px; background: var(--c-tint); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.seg { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--c-ink-2); cursor: pointer; }
.seg.active { background: #fff; color: var(--c-accent); box-shadow: 0 1px 2px rgba(31, 41, 55, 0.08); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--c-ink-2); }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dir-results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dir-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--c-border); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.dir-row:hover:not(:disabled) { border-color: var(--c-accent); }
.dir-row:disabled { opacity: 0.55; cursor: default; }
.dir-row > span:first-child, .chosen { display: flex; flex-direction: column; gap: 2px; }
.chosen { background: var(--c-accent-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.module-checks { border: 0; padding: 0; margin: 4px 0 8px; }
.module-checks legend { font-size: 13px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; }
.check > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.check .muted { font-size: 12px; }
.email-preview { font-size: 13px; color: var(--c-ink-2); margin: -4px 0 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.password-box { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; background: var(--c-tint); border: 1px dashed var(--c-border); border-radius: 10px; padding: 14px; margin: 12px 0; }
.password-box code { font-size: 18px; font-weight: 600; letter-spacing: 0.04em; user-select: all; word-break: break-all; }
.handover { padding-left: 18px; font-size: 13px; color: var(--c-ink-2); line-height: 1.55; }

/* ── Phones: every table becomes a stack of cards ─────────────────────── */
@media (max-width: 720px) {
    .calm .table-wrap { overflow: visible; }
    .calm .invoices-table, .calm .invoices-table tbody, .calm .invoices-table tr,
    .calm .data-grid, .calm .data-grid tbody, .calm .data-grid tr { display: block; width: 100%; }
    .calm .invoices-table thead, .calm .data-grid thead { display: none; }
    .calm .invoices-table tbody tr, .calm .data-grid tbody tr {
        background: #fff; border: 1px solid var(--c-border); border-radius: 12px;
        margin: 0 0 10px; padding: 8px 14px;
    }
    .calm .card .invoices-table tbody tr, .calm .card .data-grid tbody tr { margin: 10px; width: auto; }
    .calm .invoices-table tbody td, .calm .data-grid tbody td {
        display: flex; justify-content: space-between; align-items: center; gap: 12px;
        padding: 6px 0; border: 0; text-align: right; min-height: 28px;
    }
    .calm .invoices-table tbody td::before, .calm .data-grid tbody td::before {
        content: attr(data-label); flex-shrink: 0; text-align: left;
        font-size: 12px; font-weight: 600; color: var(--c-muted);
    }
    .calm .invoices-table tbody td:first-child { font-size: 15px; }
    .calm .invoices-table tbody td.empty-state, .calm .data-grid tbody td.empty-state { display: block; text-align: center; }
    .calm .invoices-table tbody td.empty-state::before, .calm .data-grid tbody td.empty-state::before { display: none; }
    .calm .invoices-table td.actions-col, .calm .data-grid tbody td:last-child {
        position: static; box-shadow: none; background: none;
        border-top: 1px solid var(--c-border-soft); margin-top: 6px; padding-top: 10px;
    }
    .calm .invoices-table td.actions-col::before, .calm .data-grid tbody td:last-child::before { display: none; }
    .calm .row-actions, .calm .action-btns { flex-wrap: wrap; justify-content: flex-start; width: 100%; gap: 8px; }
    .calm .row-actions .btn-icon { width: 36px; height: 36px; }
    .calm .row-actions .btn-sm { padding: 8px 14px; font-size: 13px; }
    .calm td[data-label=""]::before { display: none; }

    .person { flex-direction: column; }
    .person-actions { width: 100%; }
    .person-actions .btn { flex: 1; }
    .person-note { text-align: left; }
    .audit li { grid-template-columns: 1fr; gap: 2px; }
    .form-two { grid-template-columns: 1fr; }
}
.access-panel .btn { text-decoration: none; }

@media (max-width: 720px) {
    /* Header: secondary actions shrink to their icon (the label stays for screen readers); the main action keeps its words. */
    .calm .header-right .btn-secondary { font-size: 0; padding: 9px 10px; gap: 0; }
    .calm .header-right .btn-secondary svg { width: 18px; height: 18px; }
    .calm .header-right { flex-wrap: nowrap; }
    .calm .header-right .btn-primary { white-space: nowrap; }
    /* Cards skip fields with nothing in them. */
    .calm .invoices-table tbody td:empty, .calm .data-grid tbody td:empty { display: none; }
}
@media (max-width: 720px) {
    /* A header with three or more actions shows them all as icons. */
    .calm .header-right:has(> .btn:nth-child(3)) .btn-primary { font-size: 0; padding: 9px 10px; gap: 0; }
    .calm .header-right:has(> .btn:nth-child(3)) .btn-primary svg { width: 18px; height: 18px; }
    .calm .header-left { min-width: 0; }
    .calm .header-left h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 720px) {
    /* Payslip cards: label above each field, since the fields hold editable lines. */
    .calm .data-grid tbody td { flex-direction: column; align-items: stretch; text-align: left; gap: 6px; }
    .calm .data-grid tbody td::before { margin-bottom: 2px; }
    .calm .data-grid tbody td:first-child { flex-direction: row; align-items: center; }
    .calm .data-grid .payment-item { flex-wrap: wrap; }
    .calm .data-grid .payment-item select { flex: 1 1 140px; min-width: 0; }
    .calm .data-grid .payment-item input { flex: 1 1 100px; width: auto; }
    /* The bulk bar: one compact row. */
    .calm .card-footer.bulk-bar { padding: 10px 12px; gap: 8px; }
    .calm .card-footer.bulk-bar .selection-info { font-size: 12px; gap: 10px; width: 100%; }
    .calm .card-footer.bulk-bar .btn-secondary, .calm .card-footer.bulk-bar .btn-ghost { font-size: 0; padding: 9px 10px; gap: 0; }
    .calm .card-footer.bulk-bar .btn-secondary svg, .calm .card-footer.bulk-bar .btn-ghost svg { width: 18px; height: 18px; }
    .calm .card-footer.bulk-bar .btn-primary, .calm .card-footer.bulk-bar .btn-success { padding: 9px 14px; font-size: 13px; }
}

/* ── Overview, tidied ─────────────────────────────────────────────────── */
.year-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--c-ink-2); margin: -4px 0 20px; }
.year-strip strong { color: var(--c-ink); font-weight: 600; margin-right: 4px; }
.year-sep { width: 1px; height: 14px; background: var(--c-border); }
.chase ul { list-style: none; margin: 0; padding: 0; }
.chase li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--c-border-soft); }
.chase li:first-child { border-top: 0; padding-top: 2px; }
.chase-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.chase .owed-late { margin-left: 0; font-weight: 600; }
.dash-more { margin: 10px 0 0; }
.dash-foot { margin: 4px 0 0; }
.dash-fold > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.dash-fold > summary::-webkit-details-marker { display: none; }
.dash-fold[open] > summary { margin-bottom: 14px; }
.dash-fold-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--c-accent); }
.dash-fold-hint svg { width: 15px; height: 15px; transition: transform 0.2s; }
.dash-fold[open] .dash-fold-hint svg { transform: rotate(180deg); }
.dash-fold[open] .dash-fold-hint { font-size: 0; }
.dash-fold[open] .dash-fold-hint svg { font-size: 13px; }
.dash-panel-head h3 .muted { font-family: 'Noto Sans', sans-serif; font-weight: 400; font-size: 13px; }
@media (max-width: 720px) {
    .chase li { grid-template-columns: 1fr auto; }
    .chase li .btn { grid-column: 1 / -1; justify-self: start; }
}

/* ── Phones: purpose-built cards for the main lists ──────────────────────
   The generic "label: value" card (above) is the fallback for any table.
   These four lists get a layout that reads like the thing itself: the name
   and its state first, detail underneath, no labels unless a bare value
   would be unclear. Cells are placed by column position, so if a column is
   added to one of these tables, update its grid here too. */
@media (max-width: 720px) {
    #candidatesTbody tr:not(:has(.empty-state)):not(.sk-row),
    #campaignsTbody tr:not(:has(.empty-state)):not(.sk-row),
    #invoicesTbody tr:not(:has(.empty-state)):not(.sk-row),
    #clientsTbody tr:not(:has(.empty-state)):not(.sk-row) {
        display: grid !important; column-gap: 12px; row-gap: 2px; align-items: center; padding: 14px 16px !important;
    }
    #candidatesTbody td, #campaignsTbody td, #invoicesTbody td, #clientsTbody td {
        display: block !important; padding: 0 !important; min-height: 0 !important; text-align: left !important;
    }
    #candidatesTbody td::before, #campaignsTbody td::before, #invoicesTbody td::before, #clientsTbody td::before { display: none !important; }
    #candidatesTbody td:last-child, #campaignsTbody td:last-child, #invoicesTbody td:last-child, #clientsTbody td:last-child {
        border-top: 1px solid var(--c-border-soft); margin-top: 10px !important; padding-top: 10px !important;
    }

    /* Candidates: ☐ Name ............ [Stage] / role / email / owner · added */
    #candidatesTbody tr { grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas:
        "check name stage" ". role role" ". email email" ". owner added" "actions actions actions"; }
    #candidatesTbody td:nth-child(1) { grid-area: check; }
    #candidatesTbody td:nth-child(2) { grid-area: name; font-size: 16px; font-weight: 600; }
    #candidatesTbody td:nth-child(3) { grid-area: email; font-size: 13px; color: var(--c-muted); overflow-wrap: anywhere; }
    #candidatesTbody td:nth-child(4) { grid-area: role; font-size: 14px; color: var(--c-ink-2); }
    #candidatesTbody td:nth-child(5) { grid-area: stage; justify-self: end; }
    #candidatesTbody td:nth-child(6) { grid-area: owner; font-size: 12px; color: var(--c-muted); margin-top: 6px !important; }
    #candidatesTbody td:nth-child(6)::after { content: ' · owner'; }
    #candidatesTbody td:nth-child(7) { grid-area: added; font-size: 12px; color: var(--c-muted); justify-self: end; margin-top: 6px !important; }
    #candidatesTbody td:nth-child(8) { grid-area: actions; }

    /* Campaigns: Name ............ [Status] / template ... created / from / Sent n ... m recipients */
    #campaignsTbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas:
        "name status" "template created" "from from" "sent recipients" "actions actions"; }
    #campaignsTbody td:nth-child(1) { grid-area: name; font-size: 16px; }
    #campaignsTbody td:nth-child(2) { grid-area: template; font-size: 13px; color: var(--c-ink-2); }
    #campaignsTbody td:nth-child(3) { grid-area: from; font-size: 13px; color: var(--c-muted); }
    #campaignsTbody td:nth-child(4) { grid-area: recipients; justify-self: end; font-size: 13px; color: var(--c-ink-2); margin-top: 6px !important; }
    #campaignsTbody td:nth-child(4)::before { display: inline !important; content: 'Recipients ' !important; font-size: 13px !important; font-weight: 400 !important; color: var(--c-ink-2) !important; }
    #campaignsTbody td:nth-child(5) { grid-area: sent; font-size: 13px; color: var(--c-ink-2); margin-top: 6px !important; }
    #campaignsTbody td:nth-child(5)::before { display: inline !important; content: 'Sent ' !important; font-size: 13px !important; font-weight: 400 !important; color: var(--c-ink-2) !important; }
    #campaignsTbody td:nth-child(6) { grid-area: status; justify-self: end; }
    #campaignsTbody td:nth-child(7) { grid-area: created; justify-self: end; font-size: 12px; color: var(--c-muted); }
    #campaignsTbody td:nth-child(8) { grid-area: actions; }

    /* Invoices: Client ............ £Total / number ... [Status] / [Issuer] ... Due date */
    #invoicesTbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas:
        "client total" "number status" "issuer due" "actions actions"; }
    #invoicesTbody td:nth-child(1) { grid-area: number; font-size: 13px !important; }
    #invoicesTbody td:nth-child(1) .invoice-number { font-weight: 600; color: var(--c-ink-2); }
    #invoicesTbody td:nth-child(2) { grid-area: client; font-size: 16px; font-weight: 600; }
    #invoicesTbody td:nth-child(3) { grid-area: issuer; margin-top: 6px !important; }
    #invoicesTbody td:nth-child(4), #invoicesTbody td:nth-child(5) { display: none !important; }
    #invoicesTbody td:nth-child(6) { grid-area: due; justify-self: end; font-size: 13px; color: var(--c-ink-2); margin-top: 6px !important; }
    #invoicesTbody td:nth-child(6)::before { display: inline !important; content: 'Due ' !important; font-size: 13px !important; font-weight: 400 !important; color: var(--c-muted) !important; }
    #invoicesTbody td:nth-child(7) { grid-area: total; justify-self: end; font-size: 16px; font-weight: 600; }
    #invoicesTbody td:nth-child(8) { grid-area: status; justify-self: end; text-align: right !important; }
    #invoicesTbody td:nth-child(8) .status-note { text-align: right; }
    #invoicesTbody td:nth-child(9) { grid-area: actions; }

    /* Clients: Company ............ [Issuer] / contact ... code / recipients / terms · VAT */
    #clientsTbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas:
        "company issuer" "contact code" "recipients recipients" "terms vat" "actions actions"; }
    #clientsTbody td:nth-child(1) { grid-area: code; justify-self: end; font-size: 12px; color: var(--c-muted); }
    #clientsTbody td:nth-child(2) { grid-area: company; font-size: 16px; font-weight: 600; }
    #clientsTbody td:nth-child(3) { grid-area: contact; font-size: 14px; color: var(--c-ink-2); }
    #clientsTbody td:nth-child(4) { grid-area: issuer; justify-self: end; }
    #clientsTbody td:nth-child(5) { display: none !important; }
    #clientsTbody td:nth-child(6) { grid-area: recipients; font-size: 13px; color: var(--c-muted); max-width: none !important; margin-top: 4px !important; }
    #clientsTbody td:nth-child(7) { grid-area: terms; font-size: 12px; color: var(--c-muted); margin-top: 6px !important; }
    #clientsTbody td:nth-child(7)::before { display: inline !important; content: 'Terms ' !important; font-size: 12px !important; font-weight: 400 !important; color: var(--c-muted) !important; }
    #clientsTbody td:nth-child(8) { grid-area: vat; justify-self: end; font-size: 12px; color: var(--c-muted); margin-top: 6px !important; }
    #clientsTbody td:nth-child(8)::before { display: inline !important; content: 'VAT ' !important; font-size: 12px !important; font-weight: 400 !important; color: var(--c-muted) !important; }
    #clientsTbody td:nth-child(9) { grid-area: actions; }

    /* Long names wrap inside the card rather than widening it. */
    #candidatesTbody td, #campaignsTbody td, #invoicesTbody td, #clientsTbody td { min-width: 0; overflow-wrap: anywhere; }
    #campaignsTbody .invoice-number, #invoicesTbody .invoice-number { white-space: normal; }

    /* Payslips: the name needs no "Person" label. */
    .calm .data-grid tbody td:nth-child(2)::before { display: none; }
    /* Payslips: alternate cards sit on a light cream so each person stands apart. */
    .calm .data-grid tbody tr:nth-child(even) { background: var(--c-tint); }
    .calm .data-grid tbody tr:nth-child(even) td { background: transparent !important; }
}

/* ── Phones: pop-up windows and very small screens ─────────────────────── */
@media (max-width: 720px) {
    /* A window footer with several actions wraps into rows instead of running off the edge. */
    .calm .modal-footer { flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
    .calm .modal-footer .btn { flex: 1 1 calc(50% - 8px); justify-content: center; white-space: nowrap; padding: 11px 12px; }
    .calm .modal-footer .btn:last-child { flex-basis: 100%; }
    .calm .modal-footer .btn:only-child { flex-basis: 100%; }
    .calm .modal { max-height: calc(100dvh - 24px); }
    /* View tabs scroll sideways rather than wrap or widen the page. A fade at
     * an edge says there is more that way (access.js sets the classes). The
     * focus ring sits inside the tab so the scroll box cannot clip it. */
    .calm .view-tabs { position: relative; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline: 16px; }
    .calm .view-tabs::-webkit-scrollbar { display: none; }
    .calm .view-tab { white-space: nowrap; flex-shrink: 0; }
    .calm .view-tab:focus-visible { outline-offset: -2px; }
    .calm .view-tabs.fade-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
    .calm .view-tabs.fade-start { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
    .calm .view-tabs.fade-start.fade-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
}
@media (max-width: 360px) {
    .tabbar .tab { font-size: 10px; min-width: 0; }
    .tabbar .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .calm .view-tab { font-size: 14px; padding: 10px 10px 12px; }
}

/* ── First paint ──────────────────────────────────────────────────────── */
/* A returning visitor sees the app frame at once (see the inline script in
   each page's head); sign-in only appears if the session is not valid. */
html.returning #loginOverlay { display: none !important; }
html.returning #appContainer { display: block !important; }

/* Placeholder shapes where content will appear, instead of a blank page. */
.sk { display: block; height: 12px; border-radius: 6px; margin: 8px 0;
      background: linear-gradient(90deg, #efe9df 25%, #f7f3ec 37%, #efe9df 63%); background-size: 400% 100%;
      animation: sk-shimmer 1.4s ease infinite; }
.sk-title { height: 26px; width: 55%; margin: 0 0 12px; }
.sk-big { height: 30px; width: 45%; }
.sk-short { width: 40%; }
.sk-mid { width: 70%; }
.sk-card { background: var(--c-card); border: 1px solid var(--c-border); border-radius: 14px; padding: 20px 22px; min-height: 150px; }
.sk-row td { padding: 14px 16px !important; }
.sk-row td::before { display: none !important; }
@keyframes sk-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
@media (max-width: 720px) {
    .calm .sk-row { display: block !important; background: #fff; border: 1px solid var(--c-border); border-radius: 12px; margin: 10px !important; padding: 6px 14px !important; }
    .calm .sk-row td { display: block !important; padding: 6px 0 !important; }
}

/* ── Me ───────────────────────────────────────────────────────────────── */
/* Phone first: one column, large touch targets, 16px inputs so iOS does not
   zoom in on focus. Wider screens get the same column, just centred. */
.me { max-width: 760px; }
.me [hidden] { display: none !important; }
.me-role { font-size: 15px; color: var(--c-ink-2); margin: 0 0 22px; }
.me-hint { font-size: 13px; color: var(--c-muted); margin: -4px 0 12px; line-height: 1.5; }
.me-problem { display: flex; gap: 10px; align-items: flex-start; background: var(--c-critical-soft); border: 1px solid var(--c-critical-border); color: var(--c-critical); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.me-problem svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.me .form-input, .admin-modal select.form-input { width: 100%; font-size: 16px; padding: 11px 12px; font-family: inherit; color: var(--c-ink); }
.me textarea.form-input { resize: vertical; min-height: 64px; }
.me .field { font-weight: 600; }
.me-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 4px; }
.me-msg { font-size: 13px; color: var(--c-muted); }
.me-msg.is-ok { color: var(--c-good); font-weight: 600; }
.me-msg.is-error { color: var(--c-critical); font-weight: 600; }

.me-progress { display: block; height: 8px; border-radius: 999px; background: var(--c-tint); border: 1px solid var(--c-border-soft); overflow: hidden; }
.me-progress > span { display: block; height: 100%; width: 0; background: var(--c-accent); border-radius: inherit; transition: width 0.3s ease; }
.is-complete .me-progress > span { background: var(--c-good); }
.me-todo-list { list-style: none; margin: 14px 0 0; padding: 0; }
.me-todo-list li a { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--c-border-soft); color: var(--c-ink); text-decoration: none; font-size: 15px; }
.me-todo-list li:first-child a { border-top: 0; }
.me-todo-list li a:hover span { text-decoration: underline; }
.me-todo-list svg { width: 20px; height: 20px; color: var(--c-muted); flex-shrink: 0; }
.me-todo-list li.is-done a { color: var(--c-muted); }
.me-todo-list li.is-done svg { color: var(--c-good); }
.me-todo-list li.is-pending svg { color: var(--c-wingato-ink); }
.me-todo-list li > .sk { margin: 10px 0; }

.me-section { scroll-margin-top: 80px; }
.me-bank { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0 0 14px; }
.me-bank dt { font-size: 12px; font-weight: 600; color: var(--c-muted); margin-bottom: 2px; }
.me-bank dd { margin: 0; font-size: 15px; color: var(--c-ink); overflow-wrap: anywhere; }
.me-bank .me-masked { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.me-empty { grid-column: 1 / -1; margin: 0; }
.me-pending { display: flex; gap: 10px; align-items: flex-start; background: var(--c-wingato-soft); border: 1px solid #f4d3b5; color: var(--c-wingato-ink); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.me-pending svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.me-pending strong { display: block; }
.me-pending span { color: var(--c-ink-2); }
.me-bank-form { border-top: 1px solid var(--c-border-soft); padding-top: 14px; }
.me-confirm { margin: 0 0 6px; border: 0; padding: 0; }
.me-confirm input { width: 20px; height: 20px; }

/* ── People ───────────────────────────────────────────────────────────── */
.view-tab[hidden] { display: none; }
.chip-missing { background: #fff; border-style: dashed; color: var(--c-muted); }
.chip-pending { background: var(--c-wingato-soft); border-color: #f4d3b5; color: var(--c-wingato-ink); }
.staff-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; max-width: 360px; }
.staff-progress .me-progress { flex: 1; }
.staff-progress-label { font-size: 12px; color: var(--c-ink-2); white-space: nowrap; }
.bank-change .person-email { margin: -8px 0 12px; }
.compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.compare th, .compare td { text-align: left; padding: 9px 10px; border-top: 1px solid var(--c-border-soft); vertical-align: top; overflow-wrap: anywhere; }
.compare thead th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--c-muted); }
.compare tbody th { font-weight: 600; color: var(--c-ink-2); width: 34%; }
.compare tr.is-changed td:last-child { background: var(--c-accent-soft); font-weight: 600; color: var(--c-ink); }
.bank-warning { display: flex; gap: 10px; align-items: flex-start; background: var(--c-critical-soft); border: 1px solid var(--c-critical-border); color: var(--c-ink); border-radius: 12px; padding: 10px 12px; margin: -2px 0 12px; font-size: 13px; line-height: 1.5; }
.bank-warning svg { width: 17px; height: 17px; color: var(--c-critical); flex-shrink: 0; margin-top: 1px; }
.bank-warning strong { color: var(--c-critical); }
.bank-note, .bank-own { font-size: 13px; color: var(--c-ink-2); line-height: 1.5; margin: 12px 0 0; }
.bank-own { display: flex; gap: 8px; align-items: center; color: var(--c-muted); }
.bank-own svg { width: 16px; height: 16px; color: var(--c-accent); }
.bank-actions { margin-top: 12px; }
.admin-modal .modal-actions .me-msg { margin-right: auto; }

@media (max-width: 600px) {
    .me .form-two, .admin-modal .form-two { grid-template-columns: 1fr; gap: 0; }
    .me .dash-headline { font-size: 26px; }
    .me-actions .btn { flex: 1 1 auto; justify-content: center; }
    .me-bank { grid-template-columns: 1fr; }
    .compare thead th:first-child, .compare tbody th { width: auto; }
    .compare th, .compare td { padding: 8px 6px; }
    .bank-actions .btn { flex: 1 1 0; justify-content: center; }
    .person { flex-direction: column; gap: 10px; }
    .person-actions { align-self: flex-start; }
}

/* People: accounts marked "not a person", folded away under the staff list */
.hidden-accounts summary { cursor: pointer; font-size: 13px; }
.hidden-accounts[open] summary { margin-bottom: 12px; }

/* Me: "Your work" tiles (from home.js) below the to-do list */
.me-work { margin: 0 0 16px; }
.me-work .dash-eyebrow { margin-bottom: 6px; }
.me-work-sub { margin: 0 0 12px; font-size: 14px; }
.me-work-sub:empty { display: none; }

/* Me: policies to read and agree to */
.policy-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.policy-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px 16px; border: 1px solid var(--c-border); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--c-ink); }
.policy-card:hover { border-color: var(--c-accent); background: var(--c-accent-soft); }
.policy-card:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.policy-card-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.policy-card-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--c-ink-2); flex-wrap: wrap; }
.policy-card-meta svg { width: 15px; height: 15px; }
.policy-card.is-todo .policy-card-meta svg { color: var(--c-wingato-ink); }
.policy-card.is-done .policy-card-meta svg { color: var(--c-good); }

/* The reader: the policy text scrolls, the agree button stays in view */
.policy-modal { width: 760px; height: 90vh; }
.policy-modal .modal-body { flex: 1; min-height: 0; }
.policy-reader-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--c-border); background: var(--c-card); flex-wrap: wrap; }
.policy-reader-foot .me-msg { margin-right: auto; }
/* Agreeing is deliberate: the statement shows once the end of the text has
   been on screen, and Agree waits for its tick (me.js). */
.policy-end { height: 1px; }
.policy-statement { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 100%; order: -1; margin: 0; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-tint); font-size: 14px; line-height: 1.45; color: var(--c-ink); cursor: pointer; }
.policy-statement[hidden] { display: none; }
.policy-statement input { flex-shrink: 0; width: 20px; height: 20px; margin: 0; accent-color: var(--c-accent); }
.policy-statement:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.policy-doc { font-size: 15px; line-height: 1.6; color: var(--c-ink); }
.policy-doc h1 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 24px; margin: 0 0 12px; }
.policy-doc h2 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 18px; margin: 24px 0 8px; }
.policy-doc h3, .policy-doc h4 { font-size: 15px; margin: 18px 0 6px; }
.policy-doc p { margin: 0 0 12px; }
.policy-doc ul, .policy-doc ol { margin: 0 0 12px; padding-left: 22px; }
.policy-doc li { margin: 0 0 6px; }
.policy-doc table { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-size: 14px; display: block; overflow-x: auto; }
.policy-doc th, .policy-doc td { border: 1px solid var(--c-border); padding: 6px 10px; text-align: left; vertical-align: top; }
.policy-doc th { background: var(--c-tint); }
.policy-doc hr { border: 0; border-top: 1px solid var(--c-border); margin: 20px 0; }
.policy-doc code { background: var(--c-tint); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.policy-doc pre { background: var(--c-tint); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.policy-doc blockquote { margin: 0 0 12px; padding: 10px 14px; background: var(--c-tint); border-radius: 8px; color: var(--c-ink-2); }
.policy-doc a { color: var(--c-accent); overflow-wrap: anywhere; }
@media (max-width: 720px) {
    .policy-reader .policy-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .policy-reader { padding: 0 !important; }
    .policy-reader-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
    .policy-reader-foot .btn { flex: 1 1 100%; justify-content: center; }
    .policy-reader-foot .me-msg { flex-basis: 100%; }
}

/* People: policy agreement per person */
.policy-chips { margin-top: 8px; }
.policy-chips .policy-remind { margin-left: 2px; }
.policy-chips .policy-remind svg { width: 14px; height: 14px; }
.chip-good { background: var(--c-good-soft); border-color: #bfe3d4; color: var(--c-good); }
.chip-todo { background: var(--c-critical-soft); border-color: var(--c-critical-border); color: var(--c-critical); }
.policy-done summary { cursor: pointer; }
/* The evidence copy in HR Private: a link once filed, otherwise why not */
.policy-filed { margin-left: 6px; font-weight: 600; color: inherit; text-decoration: underline; }
.policy-unfiled { margin-left: 6px; font-weight: 400; color: var(--c-muted, #5b6670); }

/* Policy review: settings, then the markdown beside its preview (tabs on a phone) */
.review-back { margin-bottom: 10px; }
.review-settings { display: grid; grid-template-columns: 2fr 1fr 110px; gap: 12px; }
.review-settings .field { margin: 0; }
/* Agree before opening: the prompt, on any page (access.js). */
.gate-prompt { display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-modal { max-width: 440px; width: 100%; padding: 26px 24px 20px; border-radius: 14px; }
.gate-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--c-accent-soft, #e8f1f6); color: var(--c-accent, #156d99); margin: 0 0 14px; }
.gate-modal h2 { font-size: 19px; margin: 0 0 8px; }
.gate-lead { margin: 0 0 8px; line-height: 1.55; }
.gate-note { margin: 0 0 18px; color: var(--c-muted, #6b7280); font-size: 13.5px; }
.gate-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@media (max-width: 480px) { .gate-actions .btn { flex: 1 1 auto; justify-content: center; } }
/* Agree before opening: the sections a policy stands in front of. */
.review-gates { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.review-gates legend { font-weight: 600; font-size: 13.5px; padding: 0; margin: 0 0 2px; }
.review-gates .me-hint { margin: 0 0 8px; }
.review-gates-list { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.review-gate { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; min-height: 32px; }
.review-gate input { width: 16px; height: 16px; accent-color: var(--c-accent, #156d99); }
.review-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.review-editor .dash-panel { margin-bottom: 16px; display: flex; flex-direction: column; min-width: 0; }
.review-text { flex: 1; min-height: 520px; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; line-height: 1.55; resize: vertical; white-space: pre-wrap; }
.review-hint { font-size: 12px; margin: 8px 0 0; }
.review-preview { max-height: 620px; overflow-y: auto; padding-right: 4px; }
.review-tabs { display: none; }
.review-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.review-actions .me-msg { margin-right: auto; }
@media (max-width: 900px) {
    .review-settings { grid-template-columns: 1fr 1fr; }
    .review-settings .field:first-child { grid-column: 1 / -1; }
    .review-tabs { display: flex; margin-bottom: 12px; }
    .review-editor { grid-template-columns: 1fr; gap: 0; }
    .review-editor .review-pane { display: none; }
    .review-editor .review-pane.is-active { display: flex; }
    .review-text { min-height: 60vh; }
    .review-preview { max-height: none; }
    .review-actions .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
    .review-actions .me-msg { flex-basis: 100%; }
}
/* The reader's header already carries the title */
.policy-modal .policy-doc > h1:first-child { display: none; }
.policy-reader-foot .btn:disabled, .review-actions .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.me-problem[hidden] { display: none; }
.person-actions a.btn { text-decoration: none; }

/* ── Onboarding (People) ─────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.field-hint { font-size: 12px; font-weight: 400; color: var(--c-muted); line-height: 1.45; }
.chip-late { background: var(--c-critical-soft); border-color: var(--c-critical-border); color: var(--c-critical); }
.chip svg { width: 13px; height: 13px; }
.ob-rows { display: flex; flex-direction: column; gap: 10px; }
.ob-row { display: block; padding: 14px 16px; border: 1px solid var(--c-border); border-radius: 12px; background: #fff; color: var(--c-ink); text-decoration: none; }
.ob-row:hover { border-color: var(--c-accent); }
.ob-row:focus-visible { outline: 3px solid var(--c-accent-soft); border-color: var(--c-accent); }
.ob-row.is-paused { background: var(--c-tint); }
.ob-row.is-closed { padding: 10px 14px; }
.ob-row[data-own] { cursor: default; }
.ob-row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ob-days { font-size: 13px; font-weight: 600; color: var(--c-ink-2); text-align: right; white-space: nowrap; display: flex; flex-direction: column; gap: 2px; }
.ob-days span { font-weight: 400; color: var(--c-muted); font-size: 12px; }
.ob-days.is-late { color: var(--c-critical); }
.ob-row-stage { font-size: 13px; margin-top: 6px; }
.ob-blocking { font-size: 13px; color: var(--c-ink-2); margin-top: 6px; line-height: 1.45; }
.ob-blocking.is-clear { color: var(--c-good); font-weight: 600; }

/* The six stages: dots joined by a line, labelled on the starter page */
.ob-bar { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.ob-bar li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.ob-bar li::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--c-border); z-index: 0; }
.ob-bar li:first-child::before { display: none; }
.ob-bar li.is-done::before, .ob-bar li.is-current::before { background: var(--c-accent); }
.ob-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #fff; border: 2px solid var(--c-border); color: var(--c-muted); }
.ob-dot svg { width: 14px; height: 14px; }
.is-done > .ob-dot { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.is-current > .ob-dot { border-color: var(--c-accent); color: var(--c-accent); box-shadow: 0 0 0 4px var(--c-accent-soft); }
.ob-step { font-size: 12px; color: var(--c-muted); text-align: center; line-height: 1.25; overflow-wrap: anywhere; }
.is-current > .ob-step { color: var(--c-ink); font-weight: 600; }
.ob-bar-labelled { margin-top: 18px; }

.ob-head .chips { margin-top: 12px; }
.ob-name { font-family: "Figtree", "Noto Sans", sans-serif; font-size: 20px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ob-head-actions { margin-top: 12px; }
/* Next step: what is waiting now, and on whom. */
.ob-next { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-tint); }
.ob-next h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--c-ink); }
.ob-next h4 svg { width: 16px; height: 16px; color: var(--c-accent); }
.ob-next ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ob-next li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.45; }
.ob-next-who { flex: none; min-width: 92px; font-weight: 600; color: var(--c-ink); }
.ob-next-go { white-space: nowrap; }
@media (max-width: 640px) { .ob-next li { flex-direction: column; gap: 2px; } }
.ob-questions { list-style: none; margin: 0; padding: 0; }
.ob-q { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--c-border-soft); }
.ob-q:first-child { border-top: 0; padding-top: 0; }
.ob-q-main { min-width: 0; flex: 1; }
.ob-q-text { font-size: 15px; font-weight: 600; }
.ob-q-meta { font-size: 12px; color: var(--c-muted); margin-top: 3px; }
.ob-auto { font-style: italic; }
.ob-q-note { font-size: 13px; color: var(--c-ink-2); margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }
.ob-q-note svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--c-muted); }
.ob-q-folder { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ob-folder { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--c-accent); text-decoration: none; overflow-wrap: anywhere; }
.ob-folder:hover { text-decoration: underline; }
.ob-folder.is-missing { color: var(--c-muted); font-weight: 400; }
.ob-folder svg { width: 15px; height: 15px; flex-shrink: 0; }
.ob-note { margin-top: 6px; font-size: 13px; }
.ob-note summary { cursor: pointer; color: var(--c-accent); font-weight: 600; }
.ob-note .form-input { margin-top: 6px; width: 100%; }
.ob-undo { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--c-critical); font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.ob-yn { display: flex; gap: 4px; background: var(--c-tint); border-radius: 10px; padding: 4px; flex-shrink: 0; }
.ob-yn-btn { min-width: 56px; min-height: 40px; border: 0; background: none; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--c-ink-2); cursor: pointer; }
.ob-yn-btn:hover:not(:disabled) { background: #fff; }
.ob-yn-btn.is-on { background: var(--c-good); color: #fff; }
.ob-yn-btn.is-on.is-no { background: var(--c-wingato-ink); }
.ob-yn-btn:disabled { cursor: default; }
.ob-yn-btn:disabled:not(.is-on) { opacity: 0.45; }
.ob-yn-btn:focus-visible { outline: 3px solid var(--c-accent-soft); }
.ob-state { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; flex-shrink: 0; }
.ob-state svg { width: 14px; height: 14px; }
.ob-state.is-yes { background: var(--c-good-soft); color: var(--c-good); }
.ob-state.is-no { background: var(--c-tint); color: var(--c-muted); }
.ob-action { margin-top: 16px; padding: 14px 16px; background: var(--c-tint); border-radius: 12px; font-size: 14px; color: var(--c-ink-2); }
.ob-action p { margin: 0 0 10px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
.ob-action p svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--c-accent); }
.ob-action-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ob-action-row .field { margin: 0; min-width: 180px; }
.ob-move { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-border-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ob-move .btn:disabled, .ob-action .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ob-reason { margin: 0; font-size: 13px; color: var(--c-muted); line-height: 1.45; }
.ob-action p.ob-alert { color: var(--c-critical); font-weight: 600; }
.ob-action p.ob-wait svg { color: var(--c-wingato-ink); }
.ob-action p.ob-alert svg { color: var(--c-critical); }
.ob-manual { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 12px 14px; background: #fff; border: 1px dashed var(--c-border); border-radius: 10px; }
.ob-inline { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.ob-inline .form-input { width: 80px; }
.ob-todo { margin-top: 14px; }
.ob-todo-list { list-style: none; margin: 10px 0 0; padding: 0; font-size: 14px; }
.ob-todo-list li { display: flex; gap: 8px; align-items: center; padding: 5px 0; }
.ob-todo-list svg { width: 17px; height: 17px; color: var(--c-muted); flex-shrink: 0; }
.ob-todo-list li.is-done { color: var(--c-muted); }
.ob-todo-list li.is-done svg { color: var(--c-good); }
.ob-earlier summary { cursor: pointer; font-size: 14px; }
.ob-earlier-title { font-family: "Figtree", "Noto Sans", sans-serif; font-size: 14px; margin: 18px 0 8px; color: var(--c-ink-2); }
.ob-timeline { list-style: none; margin: 0; padding: 0; }
.ob-timeline li { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--c-border-soft); font-size: 13px; line-height: 1.45; }
.ob-timeline li:first-child { border-top: 0; }
.ob-when { color: var(--c-muted); }
.ob-owner { display: flex; gap: 8px; justify-content: flex-end; margin-top: -4px; }
#obList .dash-panel-head { align-items: center; flex-wrap: wrap; }
#obList .dash-panel-head .muted { margin-right: auto; }
@media (max-width: 720px) {
    .ob-q { flex-direction: column; gap: 10px; }
    .ob-yn { align-self: stretch; }
    .ob-yn-btn { flex: 1; }
    .ob-timeline li { grid-template-columns: 1fr; gap: 2px; }
    .ob-step { font-size: 10.5px; }
    .ob-action-row .btn { flex: 1 1 auto; justify-content: center; }
    .ob-action-row .field { flex: 1 1 100%; }
    .ob-move .btn { width: 100%; justify-content: center; }
    .ob-owner { justify-content: center; }
}

/* ── Time off and Approvals ───────────────────────────────────────────── */
/* Me > Time off (me-timeoff.js), People > Approvals (approvals.js) and
   People > Time off (timeoff.js). Type colours: annual blue, sick orange,
   emergency red, other green. Waiting is the same colour, faint and dashed. */
/* Each type colour holds white text at 4.5:1 or better, so its letter reads. */
body.calm { --to-annual: #156d99; --to-sick: #a5520f; --to-emergency: #c62f2f; --to-other: #4d7a1f; }

/* Me: totals, the form, your requests */
.to-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 14px; }
.to-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--c-border-soft); border-radius: 12px; background: var(--c-tint); }
.to-stat strong { font-family: 'Noto Sans', sans-serif; font-size: 20px; font-weight: 600; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.to-stat span { font-size: 12px; color: var(--c-ink-2); line-height: 1.35; }
.to-stat.is-over { background: var(--c-critical-soft); border-color: var(--c-critical-border); }
.to-stat.is-over strong { color: var(--c-critical); }
.to-form { border-top: 1px solid var(--c-border-soft); padding-top: 14px; margin-top: 4px; }
.to-form fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.to-form legend { font-size: 13px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 8px; padding: 0; }
.to-form legend .muted { font-weight: 400; }
.to-type-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.to-type { position: relative; display: flex; }
.to-type input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.to-type span { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; font-size: 14px; font-weight: 600; color: var(--c-ink-2); line-height: 1.25; }
.to-type input:checked + span { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-accent); }
.to-type input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.to-sick-hint { margin: -4px 0 12px; }
.to-dates .field { margin-bottom: 8px; }
.to-half { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--c-ink-2); cursor: pointer; padding: 4px 0; }
.to-half input { width: 18px; height: 18px; }
.to-half[hidden] { display: none; }
.to-days { font-size: 15px; font-weight: 600; color: var(--c-accent); margin: 0 0 12px; min-height: 1em; }
.to-days.is-zero { color: var(--c-critical); }
.to-days:empty { display: none; }
.to-warn, .ap-warn { background: var(--c-wingato-soft); border: 1px solid #f4d3b5; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--c-ink); }
.to-warn p { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.to-warn p + p { margin-top: 6px; }
.to-warn svg, .ap-warn svg { width: 16px; height: 16px; color: var(--c-wingato-ink); flex-shrink: 0; margin-top: 2px; }
.to-handover { border-top: 1px solid var(--c-border-soft) !important; padding-top: 12px !important; }
.to-list { margin-top: 16px; }
.to-list-head { font-size: 13px; font-weight: 600; color: var(--c-muted); margin: 0 0 4px; }
.to-empty { font-size: 14px; margin: 8px 0 0; }
.to-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--c-border-soft); }
.to-item-main { min-width: 0; }
.to-item-dates { font-weight: 600; font-size: 15px; color: var(--c-ink); }
.to-item-meta { font-size: 13px; color: var(--c-ink-2); margin-top: 2px; }
.to-item-note { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--c-ink-2); margin-top: 6px; overflow-wrap: anywhere; }
.to-item-note svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--c-muted); }
.to-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.to-item.is-cancelled .to-item-dates, .to-item.is-declined .to-item-dates { color: var(--c-muted); }
.to-item.is-cancelled .to-item-dates { text-decoration: line-through; }
.to-pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.to-pill.is-pending { background: var(--c-wingato-soft); color: var(--c-wingato-ink); border-color: #f4d3b5; }
.to-pill.is-approved { background: var(--c-good-soft); color: var(--c-good); border-color: #bfe3d4; }
.to-pill.is-declined { background: var(--c-critical-soft); color: var(--c-critical); border-color: var(--c-critical-border); }
.to-pill.is-cancelled { background: var(--c-tint); color: var(--c-muted); border-color: var(--c-border); }

/* Me: "N waiting for you" in Your work */
.me-waiting { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 0 0 12px; border: 1px solid var(--c-critical-border); background: var(--c-critical-soft); border-radius: 12px; color: var(--c-ink); text-decoration: none; font-size: 15px; }
.me-waiting strong { color: var(--c-critical); }
.me-waiting svg { width: 18px; height: 18px; color: var(--c-critical); flex-shrink: 0; }
.me-waiting svg:last-child { margin-left: auto; color: var(--c-ink-2); }
.me-waiting:hover { border-color: var(--c-critical); }

/* The waiting count on the People menu entry */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--c-critical); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 1px; font-variant-numeric: tabular-nums; }
.tabbar .tab { position: relative; }
.tabbar .tab .nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
.more-sheet .nav-label .nav-badge { vertical-align: 1px; }

/* People > Approvals */
.ap-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 14px; }
.ap-filters .field { margin: 0; min-width: 180px; }
.ap-filters .form-input, .to-year .form-input, .to-export .form-input { font-size: 15px; padding: 9px 10px; font-family: inherit; color: var(--c-ink); }
.ap-count { margin-left: auto; font-size: 13px; padding-bottom: 10px; }
.ap-item { scroll-margin-top: 80px; }
.ap-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ap-name { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 17px; font-weight: 600; margin: 0; color: var(--c-ink); }
.ap-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ap-type svg { width: 13px; height: 13px; }
.ap-asked { font-size: 12px; margin: 4px 0 12px; }
.ap-when { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--c-accent-soft); margin: 0 0 12px; }
.ap-when strong { font-size: 16px; color: var(--c-ink); }
.ap-when span { font-size: 13px; color: var(--c-ink-2); }
.ap-step { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--c-ink-2); line-height: 1.5; margin: 0 0 12px; }
.ap-step svg { width: 16px; height: 16px; color: var(--c-accent); flex-shrink: 0; margin-top: 2px; }
.ap-warn { display: flex; gap: 8px; align-items: flex-start; }
.ap-chips { margin: 0 0 12px; }
.ap-chips svg { width: 13px; height: 13px; }
.ap-detail { display: grid; gap: 10px; margin: 0 0 12px; }
.ap-detail dt { font-size: 12px; font-weight: 600; color: var(--c-muted); margin-bottom: 2px; }
.ap-detail dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--c-ink); white-space: pre-line; overflow-wrap: anywhere; }
.ap-history { font-size: 13px; margin: 0 0 12px; }
.ap-history summary { cursor: pointer; color: var(--c-ink-2); }
.ap-history ol { margin: 8px 0 0; padding-left: 20px; color: var(--c-ink-2); }
.ap-history li { margin: 0 0 6px; }
.ap-history li > span:first-child { font-weight: 600; color: var(--c-ink); }
.ap-history-note { margin-top: 2px; color: var(--c-ink); overflow-wrap: anywhere; }
.ap-note { margin: 4px 0 10px; }
.ap-note .muted { font-weight: 400; }
.ap-note textarea { font-size: 15px; padding: 9px 10px; font-family: inherit; resize: vertical; min-height: 44px; }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; }
.ap-actions .me-msg { margin-right: auto; }
.ap-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* People > Time off: the board scrolls sideways inside its own box */
.to-scope { font-size: 13px; margin: 0 0 12px; }
.to-month { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.to-month #toMonthLabel { font-weight: 600; min-width: 120px; text-align: center; }
.board-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px 4px; overscroll-behavior-x: contain; }
.board-scroll:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.board-empty { margin: 4px 0 8px; font-size: 14px; }
.board { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.board th, .board td { padding: 0; text-align: center; }
.board thead th { font-weight: 600; color: var(--c-ink-2); width: 28px; min-width: 28px; height: 34px; line-height: 1.2; border-bottom: 1px solid var(--c-border); }
.board thead th span { display: block; font-weight: 400; color: var(--c-muted); font-size: 10px; }
.board .board-name { position: sticky; left: 0; z-index: 1; background: var(--c-card); text-align: left; padding: 0 12px 0 0; min-width: 132px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13px; color: var(--c-ink); border-right: 1px solid var(--c-border-soft); }
.board thead .board-name { color: var(--c-muted); font-size: 12px; }
.board-group th { position: sticky; left: 0; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); padding: 12px 0 4px; background: var(--c-card); }
.board tbody td { height: 30px; border-bottom: 1px solid var(--c-border-soft); }
.board .is-weekend { background: var(--c-tint); }
.board thead th.is-today { color: var(--c-accent); box-shadow: inset 0 -2px 0 var(--c-accent); }
.board tbody td.is-today { box-shadow: inset 1px 0 0 var(--c-accent-soft), inset -1px 0 0 var(--c-accent-soft); }
.b-mark { display: block; height: 20px; margin: 0 2px; border-radius: 5px; background: var(--to-c, var(--to-annual)); }
.t-annual { --to-c: var(--to-annual); }
.t-sick { --to-c: var(--to-sick); }
.t-emergency { --to-c: var(--to-emergency); }
.t-other { --to-c: var(--to-other); }
.board td.is-pending .b-mark { background: transparent; border: 1.5px dashed var(--to-c, var(--to-annual)); opacity: 0.7; }
.board td.is-half .b-mark { background: linear-gradient(90deg, var(--to-c, var(--to-annual)) 50%, transparent 50%); border: 1px solid var(--to-c, var(--to-annual)); }
.board td.is-half.is-pending .b-mark { border-style: dashed; }
/* The type letter inside each block; hidden where the block is too narrow. */
.b-mark { position: relative; display: flex; align-items: center; justify-content: center; }
.b-mark:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 1px; }
.b-letter { font-size: 10px; font-weight: 700; color: #fff; line-height: 1; letter-spacing: 0; }
.board td.is-pending .b-letter { color: var(--to-c, var(--to-annual)); }
.board td.is-half .b-letter { display: none; }
/* Revoked: recorded, then not accepted. Shown, but plainly not approved. */
.board td.is-revoked .b-mark { background: repeating-linear-gradient(135deg, var(--c-critical-soft) 0 4px, #fff 4px 8px); border: 1.5px solid var(--c-critical); }
.board td.is-revoked .b-letter { color: var(--c-critical); }
.b-key.is-revoked { background: repeating-linear-gradient(135deg, var(--c-critical-soft) 0 3px, #fff 3px 6px); border: 1.5px solid var(--c-critical); }
.b-key.is-revoked[data-letter]::after { color: var(--c-critical); }
.b-key[data-letter]::after { content: attr(data-letter); font-size: 8px; font-weight: 700; color: #fff; font-style: normal; }
.b-key.is-pending[data-letter]::after { color: var(--to-c, var(--to-annual)); }
.board-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 12px; color: var(--c-ink-2); }
.board-legend span { display: inline-flex; align-items: center; gap: 6px; }
.b-key { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 14px; border-radius: 3px; background: var(--to-c, var(--to-annual)); }
.b-key.is-pending { background: transparent; border: 1.5px dashed var(--to-c, var(--to-annual)); }
.b-key.is-half { background: linear-gradient(90deg, var(--to-c, var(--to-annual)) 50%, transparent 50%); border: 1px solid var(--to-c, var(--to-annual)); }
.b-key.is-weekend { background: var(--c-tint); border: 1px solid var(--c-border); }

/* People > Time off: the register */
.to-year { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--c-ink-2); }
.register { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.register th, .register td { padding: 9px 10px; border-top: 1px solid var(--c-border-soft); text-align: left; vertical-align: top; }
.register thead th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--c-muted); white-space: nowrap; }
.register tbody th { font-weight: 400; min-width: 180px; }
.register .num { text-align: right; font-variant-numeric: tabular-nums; }
.register td.is-zero { color: var(--c-muted); }
.register .reg-total { font-weight: 600; }
.reg-name { display: block; font-weight: 600; color: var(--c-ink); }
.reg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--c-muted); margin-top: 2px; }
.to-export { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--c-border-soft); }
.to-export .field { margin: 0; }
.to-export-hint { font-size: 12px; padding-bottom: 10px; }

@media (max-width: 600px) {
    .to-type-options { grid-template-columns: 1fr 1fr; }
    .to-dates.form-two { grid-template-columns: 1fr 1fr; gap: 10px; }
    .to-item { flex-direction: column; gap: 8px; }
    .to-item-side { flex-direction: row; align-items: center; justify-content: space-between; }
    .ap-filters .field { flex: 1 1 100%; min-width: 0; }
    .ap-count { margin-left: 0; padding-bottom: 0; }
    .ap-head { flex-direction: column; gap: 6px; }
    .ap-tags { justify-content: flex-start; }
    .ap-actions .btn { flex: 1 1 0; justify-content: center; }
    .ap-actions .me-msg { flex-basis: 100%; }
    .board-scroll { margin: 0 -16px; padding: 0 16px 4px; }
    .board .board-name { min-width: 104px; max-width: 112px; font-size: 12px; padding-right: 8px; }
    [data-view-panel="timeoff"] .dash-panel-head { flex-wrap: wrap; row-gap: 8px; }
    .to-month { width: 100%; justify-content: space-between; }
    .to-month #toMonthLabel { min-width: 0; flex: 1; }
    .to-export .field { flex: 1 1 calc(50% - 6px); }
    .to-export .btn { flex: 1 1 100%; justify-content: center; }
}

/* The app has no dark theme yet. If the browser asks for dark, keep the
   board itself light so the type colours and letters stay readable, and
   lighten the dashed outlines of waiting blocks. */
@media (prefers-color-scheme: dark) {
    .board-scroll, .board .board-name, .board-group th { color-scheme: light; }
    .board td.is-pending .b-mark { opacity: 0.85; }
}
@media (max-width: 400px) {
    .board .b-letter { font-size: 9px; }
}

/* ── Ops fixes batch: client notes, work summary, VAT, payments, payslip
 * delivery, leavers, Admin with no modules, and Actions ─────────────────── */

/* Clients: billing notes, read-only on the invoice form and in the list */
.client-notes-view { margin: -4px 0 14px; padding: 10px 12px; background: var(--c-tint); border: 1px solid var(--c-border); border-radius: 10px; font-size: 13px; }
.client-notes-view[hidden] { display: none; }
.client-notes-head { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 4px; font-size: 12px; }
.client-notes-head svg { width: 15px; height: 15px; color: var(--c-accent); }
.client-notes-body { white-space: pre-wrap; color: var(--c-ink); line-height: 1.5; max-height: 160px; overflow-y: auto; overflow-wrap: anywhere; }
.client-notes-snippet { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; color: var(--c-muted); max-width: 280px; }
.client-notes-snippet svg { width: 13px; height: 13px; flex-shrink: 0; }
.client-notes-snippet span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-hint { margin: 4px 0 0; font-size: 12px; color: var(--c-muted); }

/* The cover email preview */
.email-preview-meta { font-size: 13px; color: var(--c-ink-2); margin: 0 0 10px; overflow-wrap: anywhere; line-height: 1.6; }
.email-preview-frame { width: 100%; height: min(70vh, 760px); border: 1px solid var(--c-border); border-radius: 10px; background: #f5f5f5; }
.pdf-preview-actions { display: flex; align-items: center; gap: 8px; }
.pdf-preview-box { height: min(78vh, 900px); border: 1px solid var(--c-border); border-radius: 10px; background: #f5f5f5; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pdf-preview-box > p { padding: 24px; text-align: center; }
.pdf-preview-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* Invoices: part-payments */
.calm .status-pill.part-paid { background: var(--c-wingato-soft); color: var(--c-wingato-ink); }
.pay-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.pay-summary > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-card); }
.pay-summary .muted { font-size: 12px; }
.pay-summary strong { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 17px; font-variant-numeric: tabular-nums; }
.pay-summary .is-due { border-color: var(--c-wingato); background: var(--c-wingato-soft); }
.pay-summary .is-settled { border-color: var(--c-good); background: var(--c-good-soft); }
.pay-list { list-style: none; margin: 0 0 12px; padding: 0; }
.pay-list li { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--c-border-soft); font-size: 14px; }
.pay-list li:first-child { border-top: 0; }
.pay-date { color: var(--c-ink-2); white-space: nowrap; }
.pay-note { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.pay-note .muted { font-size: 12px; }
.pay-amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-history { font-size: 12px; margin: 0 0 12px; }
.pay-form { border-top: 1px solid var(--c-border); padding-top: 14px; }
.pay-form h3, .pay-undo h3 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 15px; margin: 0 0 10px; }
.pay-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-undo { border-top: 1px solid var(--c-border); padding-top: 14px; }
.pay-undo p { font-size: 13px; margin: 0 0 10px; }

/* Payslips: sent with problems, Retry email, leavers */
.status-badge.status-problem { background: var(--c-wingato-soft, #fdf0e5); color: var(--c-wingato-ink, #a5520f); border: 1px solid #f3d3b5; }
.status-badge.status-problem svg { width: 13px; height: 13px; }
.status-badge.status-problem { letter-spacing: 0; white-space: normal; text-align: left; max-width: 170px; }
.delivery-detail { white-space: normal; font-size: 12px; color: var(--c-ink-2, #4b5563); margin-top: 6px; text-align: right; max-width: 170px; margin-left: auto; overflow-wrap: anywhere; line-height: 1.4; }
.delivery-retry { margin-top: 6px; }
.leaver-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-ink-2, #4b5563); cursor: pointer; white-space: nowrap; }
.leaver-toggle[hidden] { display: none; }
.data-grid tr.is-left .person-name, .data-grid tr.is-left .person-role { opacity: 0.6; }
.left-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }

/* Recruitment: the Left stage */
.stage-pill.left { background: #f3f4f6; color: #4b5563; }

/* Admin: no modules is allowed for a new starter */
.no-module-hint { margin-top: -4px; font-size: 12px; }

/* Actions: Your actions on Me, and the Actions tab on People */
.me-actions[hidden] { display: none; }
.action-list, .action-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.action-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--c-border-soft); }
.action-item:first-child { border-top: 0; padding-top: 0; }
.action-item.is-done .action-title { text-decoration: line-through; color: var(--c-muted); }
.action-tick { display: flex; padding-top: 2px; cursor: pointer; }
.action-tick input { width: 20px; height: 20px; accent-color: var(--c-good); cursor: pointer; }
.action-main { flex: 1; min-width: 0; }
.action-title { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.action-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; font-size: 13px; color: var(--c-ink-2); }
.action-meta svg { width: 14px; height: 14px; }
.action-who { display: inline-flex; align-items: center; gap: 4px; }
.action-due.is-overdue { color: var(--c-critical); font-weight: 600; }
.action-link { display: inline-flex; align-items: center; gap: 4px; color: var(--c-accent); text-decoration: none; font-weight: 600; }
.action-link:hover { text-decoration: underline; }
.action-notes { margin-top: 6px; font-size: 13px; }
.action-notes summary { cursor: pointer; color: var(--c-muted); list-style: none; display: grid; gap: 2px; }
.action-notes summary::-webkit-details-marker { display: none; }
.action-notes-label { color: var(--c-accent, #1a5f8f); font-weight: 600; }
.action-notes-label::after { content: ' \25B8'; }
.action-notes[open] .action-notes-label::after { content: ' \25BE'; }
.action-notes-preview { color: var(--c-muted); line-height: 1.4; }
.action-notes[open] .action-notes-preview { display: none; }
.action-notes p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--c-ink); line-height: 1.5; }
.actions-head { align-items: center; flex-wrap: wrap; }
.actions-head .muted { margin-right: auto; }
.actions-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.actions-filters .field { min-width: 180px; margin-bottom: 8px; }

@media (max-width: 720px) {
    .pay-summary { grid-template-columns: 1fr; }
    .pay-form-row { grid-template-columns: 1fr; }
    .pay-list li { grid-template-columns: 1fr auto; }
    .pay-list .pay-note { grid-column: 1 / -1; grid-row: 2; }
    .delivery-detail { max-width: none; }
    .action-item .btn { flex-shrink: 0; }
    .actions-filters .field { flex: 1 1 140px; min-width: 0; }
    .email-preview-frame { height: 65vh; }
    .card-header-actions:has(.leaver-toggle) { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
    .delivery-detail { text-align: left; margin-left: 0; }
    /* The invoice form's totals stacked: three across cut the total off on a phone */
    .totals-preview { grid-template-columns: 1fr; gap: 6px; }
}

/* ── Pre-hire panel on the starter page ─────────────────────────────────
   The form, the contract, references and documents, as four blocks: one
   column on a phone, two from 900px. */
.ph-panel .ob-reason { margin-bottom: 10px; }
.ph-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ph-block { border: 1px solid var(--c-border); border-radius: 10px; padding: 14px; background: var(--c-card); min-width: 0; }
.ph-block-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 8px; }
.ph-block-head h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--c-ink); }
.ph-block p.muted { margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.ph-lines { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; color: var(--c-ink-2); }
.ph-lines li { padding: 2px 0; overflow-wrap: anywhere; }
.ph-lines a, .ph-docs a, .ph-ref-meta a { color: var(--c-accent); }
.ph-contract-line { font-size: 13px; }
.ph-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--c-ink-2); margin: 4px 0 0; }
.ph-check input { width: 16px; height: 16px; accent-color: var(--c-accent); }
.ph-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* A generated contract's two ways out: online, or by hand. */
.ph-routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.ph-route { border: 1px solid var(--c-border); border-radius: 10px; padding: 12px 14px; background: var(--c-card); display: flex; flex-direction: column; gap: 4px; }
.ph-route-title { margin: 0; font-weight: 600; font-size: 14px; }
.ph-route .muted { margin: 0 0 6px; font-size: 13px; line-height: 1.45; }
.ph-route-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
/* Contracts on a People record (people-contracts.js). */
.sc-modal { max-width: 760px; width: calc(100% - 32px); }
.sc-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 18px; margin: 4px 0 10px; }
.sc-folder { font-size: 13px; margin: 0 0 8px; }
.sc-empty { padding: 6px 0 4px; }
.sc-empty p { margin: 0 0 8px; }
.sc-history, .sc-past { margin-top: 12px; font-size: 13px; }
.sc-history ul, .sc-past-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.sc-history li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sc-past summary { cursor: pointer; font-weight: 600; }
.sc-check { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; font-size: 14px; }
.sc-md { font-family: Consolas, 'Courier New', monospace; font-size: 13px; line-height: 1.5; min-height: 360px; }
.ph-docs, .ph-refs { list-style: none; margin: 0; padding: 0; }
.ph-docs li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--c-border-soft); overflow-wrap: anywhere; }
.ph-docs li:first-child { border-top: 0; padding-top: 0; }
.ph-docs li > svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; color: var(--c-muted); }
/* Documents open in the page (View, Read reference), never on their SharePoint page. */
.ph-doc-text { flex: 1 1 auto; min-width: 0; }
.ph-docs .ph-view { flex: 0 0 auto; margin-top: -2px; }
.ph-lines .ph-view { margin-left: 8px; padding-top: 2px; padding-bottom: 2px; vertical-align: baseline; }
.ph-ref-read { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.ph-ref-read .ph-ref-meta { margin-top: 0; }
.ph-ref { padding: 10px 0; border-top: 1px solid var(--c-border-soft); }
.ph-ref:first-child { border-top: 0; padding-top: 0; }
.ph-ref-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 14px; }
.ph-ref-head .chip { flex: 0 0 auto; }
.ph-ref-meta { font-size: 12.5px; color: var(--c-muted); margin-top: 3px; overflow-wrap: anywhere; }
.ph-ref .ph-actions { margin-top: 8px; }
.ph-missing { background: var(--c-wingato-soft); border: 1px solid #f4d3b5; color: var(--c-wingato-ink); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.ph-missing ul { margin: 6px 0 0; padding-left: 20px; }
.ph-missing .muted { color: var(--c-wingato-ink); opacity: 0.8; }
.admin-modal.ph-preview-modal { width: 920px; }
.modal.ph-terms-modal { width: 760px; }
.ph-terms-modal textarea { resize: vertical; min-height: 120px; }
/* The term, at the top of Contract details: a section, not a box */
.ph-term { border: 0; margin: 0 0 6px; padding: 0 0 14px; min-width: 0; border-bottom: 1px solid var(--c-border); }
.ph-term legend { font-size: 13px; font-weight: 600; color: var(--c-ink-2); padding: 0; margin-bottom: 8px; }
.ph-term-sum { margin: 2px 0 0; font-size: 14px; color: var(--c-ink); }
.ph-term-sum:empty { display: none; }
.ph-term-sum strong { font-weight: 600; }
#phTerms .modal-actions { flex-wrap: wrap; }
#phTerms .modal-actions .btn { justify-content: center; white-space: nowrap; }
@media (max-width: 720px) {
    #phTerms .modal-actions .me-msg { flex: 1 1 100%; }
}
/* Check my changes, under the wording box */
.ph-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -4px 0 14px; font-size: 13px; }
.ph-proof-out { flex-basis: 100%; }
.ph-proof-out:empty { display: none; }
.ph-proof-list { list-style: none; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--c-border); }
.ph-proof-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--c-border); font-size: 13.5px; }
.ph-proof-list li > span { overflow-wrap: anywhere; min-width: 0; }
.ph-proof-list li > .btn { flex-shrink: 0; white-space: nowrap; }
.ph-proof-list del { background: var(--c-critical-soft); color: var(--c-critical); border-radius: 3px; padding: 0 2px; }
.ph-proof-list ins { text-decoration: none; font-weight: 600; }
.ph-proof-list svg { width: 14px; height: 14px; vertical-align: -2px; }
/* Send for approval: Kodi's typo check (typo-check.js) */
.tc-check { margin: 0 0 14px; font-size: 13.5px; }
.tc-check .tc-busy svg { width: 14px; height: 14px; vertical-align: -2px; animation: tc-spin 1s linear infinite; }
@keyframes tc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tc-check .tc-busy svg { animation: none; } }
.tc-lead { margin: 0 0 6px; }
.tc-list { max-height: 45vh; overflow-y: auto; }
.tc-list li { justify-content: flex-start; }
.tc-item { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; min-width: 0; }
.tc-item input { margin-top: 3px; flex-shrink: 0; }
.tc-item > span { overflow-wrap: anywhere; min-width: 0; }
.tc-where { display: block; font-size: 12px; color: var(--c-ink-2); }
.ph-preview { display: block; width: 100%; height: 65vh; border: 1px solid var(--c-border); border-radius: 8px; background: #fff; }
/* A contract or letter drawn in the page (doc-preview.js): as tall as it is, scrolling with the pop-up, never a scroll box inside one */
.ph-preview.ph-doc { height: auto; overflow: hidden; }
@media (min-width: 900px) {
    .ph-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .ph-actions .btn { flex: 1 1 auto; justify-content: center; }
    .ph-preview { height: 60vh; }
}

/* Me: Payslips (src/js/me-payslips.js). A table on a wide screen, a card per payslip on a phone. */
.ps-head, .ps-item { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 140px; gap: 12px; align-items: center; }
.ps-head { font-size: 12px; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.4px; padding: 0 0 8px; border-bottom: 1px solid var(--c-border-soft); }
.ps-list { list-style: none; margin: 0; padding: 0; }
.ps-item { padding: 12px 0; border-bottom: 1px solid var(--c-border-soft); }
.ps-month { font-weight: 600; color: var(--c-ink); }
.ps-net { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--c-ink); }
.ps-paid { color: var(--c-ink-2); font-size: 14px; }
.ps-act { justify-self: end; }
.ps-act .btn { min-height: 40px; }
.ps-act .btn svg { width: 15px; height: 15px; }
.ps-label { display: none; }
.ps-none { font-size: 13px; }
.ps-hint { margin: 12px 0 0; }

@media (max-width: 720px) {
    .ps-head { display: none; }
    .ps-list { display: flex; flex-direction: column; gap: 10px; }
    .ps-item { grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-tint); }
    .ps-month { grid-column: 1 / -1; font-size: 16px; }
    .ps-label { display: block; font-size: 12px; font-weight: 400; color: var(--c-muted); }
    .ps-act { grid-column: 1 / -1; justify-self: stretch; margin-top: 6px; }
    .ps-act .btn { width: 100%; justify-content: center; min-height: 44px; }
}

/* Payslips: the pay run panel (src/js/payrun.js) */
.payrun-panel[hidden] { display: none; }
.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pr-head h2 { display: flex; align-items: center; gap: 8px; }
.pr-state { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--c-tint); color: var(--c-ink-2); border: 1px solid var(--c-border); }
.pr-state.is-approved, .pr-state.is-sent { background: var(--c-good-soft); color: var(--c-good); border-color: #bfe5d6; }
.pr-state.is-changed { background: var(--c-critical-soft); color: var(--c-critical); border-color: var(--c-critical-border); }
.pr-state.is-sending, .pr-state.is-draft { background: var(--c-accent-soft); color: var(--c-accent); border-color: #c6e1ee; }
.pr-body { display: flex; flex-direction: column; gap: 14px; }
.pr-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--c-tint); border: 1px solid var(--c-border-soft); font-size: 13px; line-height: 1.5; color: var(--c-ink-2); }
.pr-note.is-shadow { background: var(--c-accent-soft); border-color: #c6e1ee; color: var(--c-ink); }
.pr-note svg, .pr-warn svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.pr-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pr-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--c-border); border-radius: 12px; background: #fff; min-width: 0; }
.pr-step.is-done { background: var(--c-good-soft); border-color: #cfeadf; }
.pr-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--c-tint); color: var(--c-ink-2); border: 1px solid var(--c-border); }
.pr-step.is-done .pr-num { background: var(--c-good); color: #fff; border-color: var(--c-good); }
.pr-num svg { width: 15px; height: 15px; }
.pr-step-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pr-step-main strong { font-size: 14px; color: var(--c-ink); }
.pr-step-main p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--c-ink-2); overflow-wrap: anywhere; }
.pr-step-main .btn { align-self: flex-start; }
.pr-warn { display: flex; gap: 6px; color: var(--c-critical) !important; font-weight: 600; }
.pr-sched { display: flex; flex-direction: column; gap: 6px; }
.pr-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-ink); cursor: pointer; }
.pr-radio input { width: 16px; height: 16px; }
.pr-sched .form-input { font-size: 13px; padding: 6px 8px; max-width: 220px; }
.pr-summary { padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; border: 1px solid var(--c-border); }
.pr-summary.is-good { background: var(--c-good-soft); border-color: #cfeadf; }
.pr-summary.is-warn { background: var(--c-wingato-soft); border-color: #f4d3b5; }
.pr-summary.is-shadow { background: var(--c-accent-soft); border-color: #c6e1ee; }
.pr-summary ul { margin: 6px 0 4px 18px; padding: 0; }
.pr-table { display: flex; flex-direction: column; border-top: 1px solid var(--c-border-soft); }
.pr-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1.2fr) 40px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--c-border-soft); font-size: 14px; }
.pr-row.has-would, .pr-row-head:has(+ .pr-row.has-would), .pr-table:has(.has-would) .pr-row-total { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 1.6fr) 40px; }
.pr-row-head { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--c-muted); padding-top: 8px; }
.pr-row-total { font-weight: 600; border-bottom: 0; }
.pr-name { font-weight: 600; color: var(--c-ink); overflow-wrap: anywhere; }
.pr-net { font-variant-numeric: tabular-nums; }
.pr-status, .pr-shadow { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; min-width: 0; }
.pr-chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--c-tint); color: var(--c-ink-2); border: 1px solid var(--c-border); }
.pr-chip.is-good { background: var(--c-good-soft); color: var(--c-good); border-color: #cfeadf; }
.pr-chip.is-warn { background: var(--c-wingato-soft); color: var(--c-wingato-ink); border-color: #f4d3b5; }
.pr-chip.is-bad { background: var(--c-critical-soft); color: var(--c-critical); border-color: var(--c-critical-border); }
.pr-chip.is-muted { color: var(--c-muted); }
.pr-sub { font-size: 12px; color: var(--c-muted); line-height: 1.4; overflow-wrap: anywhere; }
.pr-would { font-size: 13px; color: var(--c-ink); line-height: 1.4; overflow-wrap: anywhere; }
.pr-would.is-bad { color: var(--c-critical); }
.pr-would.is-muted { color: var(--c-muted); }
.pr-pdf { justify-self: end; }
.pr-history summary { cursor: pointer; font-size: 13px; color: var(--c-muted); }
.pr-history ul { margin: 8px 0 0; padding: 0 0 0 18px; font-size: 13px; color: var(--c-ink-2); line-height: 1.6; }
.pr-history li span { color: var(--c-muted); font-variant-numeric: tabular-nums; }
.pay-status .pdf-open { margin-left: 4px; vertical-align: middle; }

@media (max-width: 1100px) {
    .pr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .pr-steps { grid-template-columns: 1fr; }
    .pr-row-head { display: none; }
    .pr-row, .pr-row.has-would, .pr-table:has(.has-would) .pr-row-total { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; }
    .pr-row .pr-name { grid-column: 1; }
    .pr-row .pr-net { grid-column: 2; grid-row: 1; text-align: right; }
    .pr-row .pr-status, .pr-row .pr-shadow { grid-column: 1 / -1; }
    .pr-row .pr-pdf { grid-column: 2; grid-row: 1; display: none; }
    .pr-row-total span:empty { display: none; }
    .pr-sched .form-input { max-width: none; }
}
.pr-name .pr-sub { display: block; font-weight: 400; }
.pr-link-fix { margin-top: 4px; }
.pr-held { color: var(--c-wingato-ink) !important; font-weight: 600; }
.pr-row-held { color: var(--c-wingato-ink); border-bottom: 0; }

/* Expenses: the claim form and claims on Me, receipts, and People > Expenses */
.ex-form { border-top: 1px solid var(--c-border-soft); padding-top: 14px; margin-top: 4px; }
.ex-form fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.ex-form legend, .ex-label { font-size: 13px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 8px; padding: 0; }
.ex-cats .to-type-options { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ex-money-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
.ex-money-row .form-input { min-width: 0; }
.ex-errors { background: var(--c-critical-soft); border: 1px solid var(--c-critical-border); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; color: var(--c-ink); }
.ex-errors[hidden] { display: none; }
.ex-errors p { margin: 0 0 4px; color: var(--c-critical); }
.ex-errors ul { margin: 0; padding-left: 18px; }
.ex-errors:focus { outline: 2px solid var(--c-critical); outline-offset: 2px; }
.ex-field-error { font-size: 13px; font-weight: 600; color: var(--c-critical); }
.ex-field-error:empty { display: none; }
.has-error .form-input, .has-error .ex-drop, .has-error .to-type span { border-color: var(--c-critical); }
.ex-late { display: flex; gap: 8px; align-items: flex-start; background: var(--c-wingato-soft); border: 1px solid #f4d3b5; border-radius: 12px; padding: 10px 12px; margin: -4px 0 12px; font-size: 13px; line-height: 1.5; color: var(--c-ink); }
.ex-late[hidden] { display: none; }
.ex-late svg { width: 16px; height: 16px; color: var(--c-wingato-ink); flex-shrink: 0; margin-top: 2px; }
.ex-drop { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--c-border); border-radius: 12px; background: var(--c-tint); cursor: pointer; font-size: 13px; font-weight: 400; color: var(--c-ink-2); }
.ex-drop strong { display: block; color: var(--c-accent); font-size: 14px; }
.ex-drop svg { width: 20px; height: 20px; color: var(--c-accent); flex-shrink: 0; }
.ex-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ex-drop:focus-within { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.ex-files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ex-files:empty { display: none; }
.ex-files li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 10px; font-size: 14px; font-weight: 400; color: var(--c-ink); }
.ex-files li.is-error { border-color: var(--c-critical-border); background: var(--c-critical-soft); }
.ex-files li > svg { width: 16px; height: 16px; color: var(--c-muted); flex-shrink: 0; }
.ex-file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ex-file-error { flex-basis: 100%; font-size: 13px; font-weight: 600; color: var(--c-critical); }
.ex-files .btn-icon { margin-left: auto; }
.ex-urgent { margin: 0 0 12px; }
.ex-list { margin-top: 16px; }
.ex-desc { font-size: 14px; color: var(--c-ink); margin-top: 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.ex-chips { margin-top: 8px; }
.ex-question { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--c-accent-soft); }
.ex-question p { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; font-size: 14px; color: var(--c-ink); overflow-wrap: anywhere; }
.ex-question svg { width: 16px; height: 16px; color: var(--c-accent); flex-shrink: 0; margin-top: 2px; }
.ex-reply .field { margin-bottom: 8px; }
.ex-reply .me-actions { margin: 0; }
.ex-receipts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.ex-receipt { padding: 0; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; cursor: pointer; overflow: hidden; }
.ex-receipt:hover { border-color: var(--c-accent); }
.ex-receipt:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.ex-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 64px; height: 64px; background: var(--c-tint); color: var(--c-muted); font-size: 11px; font-weight: 600; }
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-thumb svg { width: 20px; height: 20px; }
.ex-thumb.is-pdf { color: var(--c-critical); }
.ex-thumb.is-error { background: var(--c-critical-soft); }
.ex-item .to-item-main { flex: 1; }
.ex-totals { font-size: 14px; margin: -4px 0 12px; color: var(--c-ink); }
.ex-totals:empty { display: none; }
.ex-paid-form { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 10px; align-items: end; border-top: 1px solid var(--c-border-soft); padding-top: 12px; margin-top: 12px; }
.ex-paid-form .field { margin: 0; }
.ex-paid-form .ap-actions { margin: 0; }
.ex-own { font-size: 13px; margin: 12px 0 0; }

@media (max-width: 720px) {
    .ex-cats .to-type-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ex-paid-form { grid-template-columns: 1fr; }
    .ex-item { flex-direction: column; }
    .ex-item .to-item-side { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Expenses: the settings panel on People > Expenses */
.ex-settings { margin-bottom: 14px; }
.ex-set-table { width: 100%; border-collapse: collapse; min-width: 460px; }
.ex-set-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--c-muted); padding: 0 8px 6px 0; }
.ex-set-table td { padding: 0 8px 8px 0; vertical-align: middle; }
.ex-set-table td:last-child { width: 36px; padding-right: 0; }
.ex-set-table .form-input { width: 100%; font-size: 15px; padding: 9px 10px; }
.ex-set-table .ex-code { width: 76px; text-transform: uppercase; }
.ex-set-head { margin-top: 18px; }
.ex-set-cats { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ex-set-cats li { display: flex; align-items: center; gap: 6px; }
.ex-set-cats .form-input { flex: 1; min-width: 0; font-size: 15px; padding: 9px 10px; }
.ex-set-days { margin-top: 16px; }
.ex-set-days .muted { font-weight: 400; font-size: 12px; }
.ex-settings .ap-history ul { margin: 4px 0 8px; padding-left: 18px; }

@media (max-width: 720px) {
    .ex-set-cats { grid-template-columns: 1fr; }
    .ex-set-table { min-width: 0; table-layout: fixed; }
    .ex-set-table th:first-child, .ex-set-table td:first-child { width: 62px; }
    .ex-set-table .ex-code { width: 100%; }
    .ex-set-table .form-input { padding: 9px 6px; font-size: 14px; }
}

/* Expenses: decimals, limits and the paid override (security review) */
.ex-set-table .ex-dec { width: 64px; }
.ex-set-check { margin: 22px 0 0; }
.ex-paid-form .ex-override { grid-column: 1 / -1; margin: 0; }

@media (max-width: 720px) {
    .ex-set-table th:nth-child(2), .ex-set-table td:nth-child(2) { width: 56px; }
    .ex-set-table .ex-dec { width: 100%; padding: 9px 4px; }
    .ex-set-check { margin: 0 0 12px; }
}
@media (max-width: 720px) {
    .ex-set-table th:first-child, .ex-set-table td:first-child { width: 50px; }
    .ex-set-table th:nth-child(2), .ex-set-table td:nth-child(2) { width: 46px; }
    .ex-set-table td:last-child { width: 28px; }
    .ex-set-table .form-input { padding: 9px 4px; font-size: 13px; }
}
@media (max-width: 720px) {
    .ex-set-table th { font-size: 11px; padding-right: 4px; line-height: 1.25; vertical-align: bottom; overflow-wrap: anywhere; }
}

/* ── Contract templates (/contracts) ────────────────────────────────────
   Settings, then the markdown with its merge-field palette beside the
   preview (tabs on a phone, as on Policy review). */
.ct-settings { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 12px; align-items: start; }
.ct-settings .field { margin: 0; }
.ct-entities { border: 0; padding: 0; margin: 0; min-width: 0; }
.ct-entities legend { padding: 0; margin-bottom: 6px; }
.ct-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 4px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--c-ink); min-height: 32px; cursor: pointer; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--c-accent); }
.check-inline .muted { font-size: 12px; }
.ct-palette { border: 1px solid var(--c-border); border-radius: 8px; margin: 0 0 10px; background: var(--c-card); }
.ct-palette > summary { cursor: pointer; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--c-ink); list-style-position: inside; }
.ct-palette > summary .muted { font-weight: 400; margin-left: 6px; }
.ct-palette[open] > summary { border-bottom: 1px solid var(--c-border-soft); }
#paletteBody { max-height: 260px; overflow-y: auto; padding: 8px 10px 10px; }
.ct-group + .ct-group { margin-top: 8px; }
.ct-group-title { font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--c-muted); font-weight: 600; margin: 0 0 4px; }
.ct-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.ct-field { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--c-border); background: #fff; border-radius: 6px; padding: 6px 8px; cursor: pointer; min-height: 44px; font: inherit; color: var(--c-ink-2); }
.ct-field:hover, .ct-field:focus-visible { border-color: var(--c-accent); background: var(--c-accent-soft); outline: none; }
.ct-field code { font-size: 12px; color: var(--c-accent); font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; overflow-wrap: anywhere; }
.ct-field span { font-size: 11.5px; line-height: 1.3; color: var(--c-muted); }
.ct-block code { color: var(--c-wingato-ink, #9a3412); }
.ct-text { min-height: 420px; }
.ct-preview-head { flex-wrap: wrap; gap: 8px; }
.ct-seg { display: inline-flex; border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden; }
.ct-seg-btn { border: 0; background: #fff; padding: 6px 14px; min-height: 36px; font: inherit; font-size: 13px; font-weight: 600; color: var(--c-ink-2); cursor: pointer; }
.ct-seg-btn + .ct-seg-btn { border-left: 1px solid var(--c-border); }
.ct-seg-btn.is-on { background: var(--c-accent); color: #fff; }
.ct-seg-btn:disabled { color: var(--c-muted); cursor: not-allowed; opacity: 0.55; }
.ct-preview-note { font-size: 12.5px; margin: 0 0 8px; }
.ct-problems { font-size: 13px; }
.ct-frame { height: 640px; flex: none; }
.ct-version-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12.5px; line-height: 1.5; max-height: 60vh; overflow-y: auto; background: var(--c-bg, #faf8f4); border: 1px solid var(--c-border); border-radius: 8px; padding: 12px; margin: 0 0 12px; }
.ct-new .field { margin-bottom: 12px; }
@media (max-width: 900px) {
    .ct-settings { grid-template-columns: 1fr 1fr; }
    .ct-settings .field:first-child, .ct-settings .ct-entities { grid-column: 1 / -1; }
    .ct-text { min-height: 55vh; }
    .ct-frame { height: 70vh; }
}
@media (max-width: 600px) {
    .ct-settings { grid-template-columns: 1fr; }
    .ct-fields { grid-template-columns: 1fr 1fr; }
}

/* The Contract block on the starter page: which template and which entity */
.ph-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
.ph-pickers .field { margin: 0; font-size: 12.5px; }
.ph-pickers .form-input { min-height: 40px; font-size: 14px; }
.ph-warn { background: var(--c-wingato-soft); border: 1px solid #f4d3b5; color: var(--c-wingato-ink); border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.ph-warn ul { margin: 4px 0 0; padding-left: 18px; }
.ph-ok { font-size: 13px; color: var(--c-ink-2); margin: 0 0 8px; }
@media (max-width: 420px) {
    .ph-pickers { grid-template-columns: 1fr; }
}

/* The Contract block: who signs, and the owner's check before generating */
.ph-pickers .ph-signer { grid-column: 1 / -1; margin: 0; }
p.ph-signer { font-size: 13px; }
.ph-summary { margin: 0 0 12px; display: grid; gap: 6px; }
.ph-summary div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; font-size: 14px; }
.ph-summary dt { color: var(--c-muted); font-weight: 600; }
.ph-summary dd { margin: 0; color: var(--c-ink); overflow-wrap: anywhere; }

/* The contract's wording changed for one person, and the owner's approval */
.ph-auto { margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 8px; font-size: 14px; color: var(--c-ink); min-height: 44px; }
.ph-review { border: 1px solid var(--c-border); border-radius: 8px; padding: 10px 12px; margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; background: var(--c-card); }
.ph-review p { margin: 0 0 4px; }
.ph-review p:last-child { margin-bottom: 0; }
.ph-review.is-back { border-color: #f4d3b5; background: var(--c-wingato-soft); }
.ph-review-note { color: var(--c-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ph-review-note::before { content: '\201C'; }
.ph-review-note::after { content: '\201D'; }
textarea.ph-wording { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; line-height: 1.55; min-height: 320px; resize: vertical; }
.ph-diff-head { font-size: 13px; margin: 14px 0 6px; color: var(--c-ink-2); }
.ph-diff-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--c-border); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; background: var(--c-card); }
.ph-diff { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--c-ink-2); }
.ph-diff del { background: var(--c-critical-soft); color: var(--c-critical); text-decoration: line-through; text-decoration-thickness: 1.5px; border-radius: 3px; padding: 0 2px; }
.ph-diff ins { background: var(--c-good-soft); color: var(--c-good); text-decoration: underline; text-underline-offset: 2px; border-radius: 3px; padding: 0 2px; }
.ph-confirm { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #f4d3b5; background: var(--c-wingato-soft); border-radius: 8px; font-size: 14px; color: var(--c-ink); min-height: 44px; }
#phGenerate [type="submit"]:disabled { opacity: 0.45; cursor: not-allowed; }
.ph-ok svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; color: var(--c-good, #15803d); }

/* Inside Teams (auth.js adds .in-teams to <html>): Teams' own bar already
   shows the app and who is signed in, so ours drops the logo, the name and
   Sign Out, and the sign-in screen drops its brand half. */
.in-teams .user-info-container,
.in-teams .sidebar-brand,
.in-teams .login-brand-side { display: none !important; }
.in-teams .calm .sidebar-nav { padding-top: 20px; }
@media (max-width: 900px) {
    .in-teams .calm .app-header { height: 52px; }
}

/* Offboarding (offboarding.js): the onboarding look, seven stages */
.ob-bar.of-bar { grid-template-columns: repeat(7, 1fr); }
.of-progress { margin-top: 14px; }
.ob-row .staff-progress { margin-top: 8px; }
.of-steps { margin: 0 0 10px; padding-left: 22px; font-size: 14px; line-height: 1.5; color: var(--c-ink-2); }
.of-steps li { margin: 0 0 6px; }
.of-claims { list-style: none; margin: 0 0 10px; padding: 0; font-size: 14px; }
.of-claims li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px solid var(--c-border-soft); overflow-wrap: anywhere; }
.of-claims li:first-child { border-top: 0; }
.of-tools { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.of-tools li { background: #fff; border: 1px solid var(--c-border); border-radius: 10px; }
.of-tools li.is-done { border-color: #bfe3d4; background: var(--c-good-soft); }
.of-tick { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; min-height: 44px; cursor: pointer; font-size: 14px; color: var(--c-ink); }
.of-tick input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; }
.of-tick > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.of-m365 { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--c-border); }
.of-hold { margin: 12px 0 0; background: var(--c-wingato-soft); }
.of-owner-q .badge { vertical-align: 1px; }
.ob-owner { flex-wrap: wrap; }

/* Tools and access (tools.js, me-tools.js) */
.tl-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--c-tint); color: var(--c-ink-2); font-size: 13px; line-height: 1.45; }
.tl-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--c-accent); }
.tl-note-small { margin: 12px 0 0; }
#toolsPanel .dash-panel-head { align-items: center; flex-wrap: wrap; }
#toolsPanel .dash-panel-head .muted { margin-right: auto; }
.tl-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tl-card { border: 1px solid var(--c-border); border-radius: 12px; padding: 12px 14px; background: #fff; min-width: 0; }
.tl-card.is-retired { background: var(--c-tint); }
.tl-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tl-card .chips { margin-top: 8px; }
.tl-links { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 8px; font-size: 13px; }
.tl-links a, .tl-copy { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; color: var(--c-accent); font-weight: 600; text-decoration: none; }
.tl-links a:hover, .tl-copy:hover { text-decoration: underline; }
.tl-links svg { width: 14px; height: 14px; }
.tl-copy { background: none; border: 0; padding: 0; font-size: 13px; cursor: pointer; font-family: inherit; }
.tl-notes { margin: 8px 0 0; font-size: 13px; color: var(--c-ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.tl-items { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.tl-items li { padding: 4px 0; border-top: 1px solid var(--c-border-soft); overflow-wrap: anywhere; }
.tl-items li:first-child { border-top: 0; }
.tl-retired { margin-top: 12px; }
.tl-retired summary { cursor: pointer; margin-bottom: 8px; }
.tl-history { margin: 0 0 12px; font-size: 13px; }
.tl-history summary { cursor: pointer; color: var(--c-accent); font-weight: 600; }
.tl-history ul { margin: 6px 0 0; padding-left: 18px; color: var(--c-ink-2); }
.tl-rows { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.tl-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) auto auto; gap: 8px; align-items: center; }
.tl-req { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; }
@media (max-width: 600px) {
    .tl-row { grid-template-columns: 1fr auto; padding: 10px; border: 1px solid var(--c-border); border-radius: 10px; }
    .tl-row select, .tl-row input.form-input { grid-column: 1 / -1; }
}
.tl-apply { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 12px; }
.tl-apply .field { margin: 0; min-width: 200px; flex: 1; }
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--c-border-soft); }
.tl-item:first-child { border-top: 0; }
.tl-item-main { min-width: 0; flex: 1 1 260px; }
.tl-item-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 15px; }
.tl-item-name svg { width: 17px; height: 17px; color: var(--c-muted); }
.tl-item.is-granted .tl-item-name svg { color: var(--c-good); }
.tl-item.is-requested .tl-item-name svg { color: var(--c-wingato-ink); }
.tl-status { display: flex; flex-wrap: wrap; gap: 4px; background: var(--c-tint); border-radius: 10px; padding: 4px; align-self: flex-start; }
.tl-st { min-height: 36px; padding: 0 10px; border: 0; background: none; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--c-ink-2); cursor: pointer; font-family: inherit; }
.tl-st:hover:not(:disabled) { background: #fff; }
.tl-st.is-on { background: var(--c-accent); color: #fff; }
.tl-item.is-granted .tl-st.is-on { background: var(--c-good); }
.tl-st:disabled { cursor: default; }
.tl-st:disabled:not(.is-on) { opacity: 0.55; }
.tl-st:focus-visible { outline: 3px solid var(--c-accent-soft); }
@media (max-width: 600px) {
    .tl-status { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); }
}
/* Me: your Asana tasks (me-asana.js) */
.asn-group h4 { display: flex; gap: 6px; align-items: baseline; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); margin: 14px 0 2px; }
.asn-group:first-child h4 { margin-top: 4px; }
.asn-list { list-style: none; margin: 0; padding: 0; }
.asn-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--c-border-soft); }
.asn-item:first-child { border-top: 0; }
.asn-item a { color: var(--c-ink); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; min-height: 24px; }
.asn-item a:hover, .asn-item a:focus-visible { text-decoration: underline; }
.asn-meta { grid-column: 1; font-size: 12.5px; color: var(--c-muted); }
.asn-due { font-size: 12.5px; color: var(--c-ink-2); white-space: nowrap; }
.asn-due.is-over { color: var(--c-critical); font-weight: 600; }
.asn-more { margin-top: 2px; }
.asn-stale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--c-ink-2); margin: 4px 0 6px; }
.asn-foot { margin: 10px 0 0; }
@media (max-width: 600px) { .asn-item { grid-template-columns: minmax(0, 1fr); } .asn-due { grid-row: 2; } }
.mt-list { list-style: none; margin: 0; padding: 0; }
.mt-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--c-border-soft); }
.mt-item:first-child { border-top: 0; }
.mt-name { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.mt-name > span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.mt-name .muted { font-size: 13px; }
.mt-name svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--c-muted); }
.mt-item.is-granted .mt-name svg { color: var(--c-good); }
.mt-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) {
    .mt-item { grid-template-columns: minmax(0, 1fr) auto; }
    .mt-links { grid-column: 1 / -1; justify-content: flex-start; }
}

/* People has eight tabs: they scroll sideways at every width, not only on a
   phone, so a desktop with the sidebar open never scrolls the whole page. */
.calm .view-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.calm .view-tabs::-webkit-scrollbar { display: none; }
.calm .view-tab { white-space: nowrap; flex-shrink: 0; }
.calm .view-tabs.fade-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.calm .view-tabs.fade-start { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.calm .view-tabs.fade-start.fade-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }

/* The leaver message: the editor, and the text as sent on the timeline */
.of-message { font-family: inherit; line-height: 1.5; }
.of-sent { display: inline; }
.of-sent summary { display: inline; cursor: pointer; color: var(--c-accent); font-weight: 600; }
.of-sent div { white-space: pre-wrap; margin-top: 6px; padding: 8px 10px; background: var(--c-tint); border-radius: 8px; color: var(--c-ink-2); overflow-wrap: anywhere; }

/* Choosing a leaver's HR folder */
.of-folders { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.of-folders li { background: #fff; border: 1px solid var(--c-border); border-radius: 10px; }
.of-folders input { accent-color: var(--c-accent); }

/* A confirmation that quotes a link (the folder to move) wraps it, never overflows */
.calm .modal-body { overflow-wrap: anywhere; }

/* Help (/help): sections of folded topics, a search box, and the small "?"
   beside a page title that opens the page's topic */
.help-search { position: relative; max-width: 560px; margin: 4px 0 6px; }
.help-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--c-muted); pointer-events: none; }
.help-search .form-input { width: 100%; min-height: 44px; padding-left: 40px; font-size: 16px; }
.help-body { max-width: 760px; }
.help-section { margin: 22px 0 0; }
.help-section h3 { font-size: 17px; margin: 0 0 4px; }
.help-intro { margin: 0 0 10px; font-size: 14px; }
.help-topic { background: var(--c-card); border: 1px solid var(--c-border); border-radius: 12px; margin: 0 0 8px; scroll-margin-top: 76px; }
.help-topic > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 48px; padding: 10px 16px; cursor: pointer; font-weight: 600; color: var(--c-ink); list-style: none; }
.help-topic > summary::-webkit-details-marker { display: none; }
.help-topic > summary::after { content: '+'; margin-left: auto; color: var(--c-muted); font-weight: 400; font-size: 20px; line-height: 1; }
.help-topic[open] > summary::after { content: '\2212'; }
.help-topic > summary:focus-visible { outline: 3px solid var(--c-accent-soft); outline-offset: -3px; border-radius: 12px; }
.help-topic-title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.help-aud { font-size: 12px; font-weight: 600; color: var(--c-accent); background: var(--c-accent-soft); border-radius: 999px; padding: 2px 8px; }
.help-topic-body { padding: 0 16px 14px; border-top: 1px solid var(--c-border-soft); }
.help-answer { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--c-ink); overflow-wrap: anywhere; }
.help-answer + .help-steps { margin-top: 8px; }
.help-more { margin: 10px 0 0; border-top: 1px dashed var(--c-border-soft); padding-top: 6px; }
.help-more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--c-accent); list-style: none; }
.help-more > summary::-webkit-details-marker { display: none; }
.help-more > summary::before { content: '+'; font-weight: 400; font-size: 18px; line-height: 1; }
.help-more[open] > summary::before { content: '\2212'; }
.help-more > summary:focus-visible { outline: 3px solid var(--c-accent-soft); border-radius: 6px; }
.help-more ul { margin: 4px 0 0; padding-left: 20px; line-height: 1.5; font-size: 14px; color: var(--c-ink-2); }
.help-more li { margin: 0 0 6px; overflow-wrap: anywhere; }
.help-more strong, .help-answer strong { color: var(--c-ink); }
.help-steps { margin: 12px 0 0; padding-left: 22px; line-height: 1.55; color: var(--c-ink-2); }
.help-steps li { margin: 0 0 6px; overflow-wrap: anywhere; }
.help-steps strong, .help-tip strong, .help-ask strong { color: var(--c-ink); }
.help-tip, .help-ask { margin: 10px 0 0; padding: 8px 12px; background: var(--c-tint); border-radius: 8px; font-size: 14px; color: var(--c-ink-2); overflow-wrap: anywhere; }
.help-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.help-actions .btn { min-height: 40px; }
.help-copy { font-size: 13px; color: var(--c-accent); }
.help-none { margin-top: 18px; }
.help-link { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-left: 8px; border-radius: 50%; border: 1px solid var(--c-border); background: var(--c-card); color: var(--c-accent); font-weight: 700; font-size: 14px; text-decoration: none; flex-shrink: 0; }
.help-link:hover { background: var(--c-accent-soft); }
.help-link:focus-visible { outline: 3px solid var(--c-accent-soft); }
@media (max-width: 600px) {
    .help-link { width: 32px; height: 32px; }
    .help-topic > summary { padding: 10px 12px; }
    .help-topic-body { padding: 0 12px 12px; }
}

/* Sign-in: the note shown after an account outside Appnable was refused */
.login-refused { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--c-critical-border, #f3cfcb); background: var(--c-critical-soft, #fdf1f0); border-radius: 10px; color: var(--c-ink, #1f2937); font-size: 14px; line-height: 1.45; text-align: left; overflow-wrap: anywhere; }
.login-refused strong { display: block; color: var(--c-critical, #c62f2f); margin-bottom: 4px; }
.login-refused p { margin: 0 0 4px; }
.login-refused p:last-child { margin: 0; }

/* Hide amounts (access.js): the eye in the top bar blurs every figure marked
   .money or [data-money]. Blur keeps each figure's size, so nothing moves. */
.amounts-toggle { flex-shrink: 0; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.amounts-toggle .amounts-icon-on { display: none; }
.hide-amounts .amounts-toggle .amounts-icon-on { display: inline-block; }
.hide-amounts .amounts-toggle .amounts-icon-off { display: none; }
.hide-amounts .amounts-toggle { color: var(--c-accent); background: var(--c-accent-soft); }
.amounts-toggle:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.hide-amounts .money:not(.money-shown), .hide-amounts [data-money]:not(.money-shown):not(input):not(textarea) { filter: blur(max(6px, 0.4em)); -webkit-user-select: none; user-select: none; cursor: pointer; }
/* A box keeps its edges sharp; only the amount in it is blurred. */
.hide-amounts input[data-money]:not(.money-shown) { color: transparent; text-shadow: 0 0 8px var(--c-ink, #1f2937); }
.hide-amounts .money.money-shown, .hide-amounts [data-money].money-shown:not(input) { cursor: pointer; }
.hide-amounts .money:focus-visible, .hide-amounts [data-money]:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 900px) {
    .amounts-toggle { width: 36px; height: 36px; }
}
/* A narrow phone: with the eye beside two actions, the main action shows its
   icon too (the label stays for screen readers), so the page title fits. */
@media (max-width: 480px) {
    .calm .app-header:has(.amounts-toggle) .header-right:has(> .btn:nth-child(2)) .btn-primary { font-size: 0; padding: 9px 10px; gap: 0; }
    .calm .app-header:has(.amounts-toggle) .header-right:has(> .btn:nth-child(2)) .btn-primary svg { width: 18px; height: 18px; }
}
/* Printed while hidden: every figure stays hidden, even one shown on screen. */
@media print {
    .hide-amounts .money, .hide-amounts [data-money] { filter: blur(max(6px, 0.4em)) !important; }
    .hide-amounts input[data-money] { color: transparent !important; text-shadow: 0 0 8px #1f2937 !important; }
}
/* Add document: the button on every stage, the dialog's kinds, notes on the list */
.ob-doc-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; font-size: 13px; }
.ph-kinds { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.ph-kinds legend { font-size: 13px; font-weight: 600; margin: 0 0 6px; padding: 0; }
.ph-kind { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--c-border); border-radius: 8px; padding: 8px 10px; cursor: pointer; min-height: 44px; }
.ph-kind:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.ph-kind input { margin-top: 3px; accent-color: var(--c-accent); flex: 0 0 auto; }
.ph-kind > span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
.ph-kind .muted { font-size: 12px; line-height: 1.35; }
.ph-doc-note { display: block; font-size: 12px; color: var(--c-ink-2); margin-top: 2px; }
.ph-ref-preview { align-items: center; margin-top: 6px; }
.ph-ref-preview .muted { font-size: 12px; }
.ph-prev-tabs { margin: 4px 0 10px; }
.ph-prev-subject, .rf-subject { font-size: 13px; margin: 0 0 8px; overflow-wrap: anywhere; }

/* The Reference form page */
.rf-merge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 12.5px; }
.rf-field { flex-direction: row; min-height: 36px; padding: 4px 8px; }
.rf-body { min-height: 180px; }
.rf-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--c-border-soft); }
.rf-questions { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.rf-q { border: 1px solid var(--c-border); border-radius: 10px; padding: 10px 12px; background: var(--c-card, #fff); min-width: 0; }
.rf-q-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; }
.rf-q-moves { display: inline-flex; gap: 2px; }
.rf-q-moves .btn-icon:disabled { opacity: 0.35; cursor: not-allowed; }
.rf-q-flags { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 6px; }
.references .ct-frame { height: 720px; }
@media (max-width: 760px) {
    .references .ct-frame { height: 70vh; }
    .rf-q .form-two { grid-template-columns: 1fr; }
}
#phAddDoc [hidden] { display: none; }
.rf-q [hidden] { display: none; }
@media (min-width: 761px) {
    .references .review-editor { align-items: start; }
    .references .review-pane[data-pane-panel="preview"] { position: sticky; top: 16px; }
}
.references .ph-preview[hidden], .references .rf-subject[hidden] { display: none; }


/* Policy review: the Policy Assistant beside the editor, and About Kokoodi
   (review-assist.js). Proposed edits are tracked changes: what goes is struck
   through on red, what comes is underlined on green, so neither relies on
   colour alone. */
.review-head-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.assist-summary { margin: 0 0 10px; color: var(--c-ink); }
.assist-edits-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; }
.assist-edits-head h4 { margin: 0; font-size: 15px; }
.assist-edit, .assist-issue { border: 1px solid var(--c-border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--c-card); min-width: 0; }
.assist-edit.is-accepted { border-color: #bfe3d4; background: var(--c-good-soft); }
.assist-edit.is-rejected, .assist-edit.is-stale { opacity: 0.6; }
.assist-diff { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.assist-diff del { background: var(--c-critical-soft); color: var(--c-critical); text-decoration: line-through; text-decoration-thickness: 1.5px; border-radius: 3px; padding: 0 2px; }
.assist-diff ins { background: var(--c-good-soft); color: var(--c-good); text-decoration: underline; text-underline-offset: 2px; border-radius: 3px; padding: 0 2px; }
.assist-edit.is-rejected .assist-diff del, .assist-edit.is-rejected .assist-diff ins { background: none; }
.assist-reason { font-size: 13px; color: var(--c-ink-2); margin: 8px 0 0; }
.assist-edit-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.assist-state { margin-right: auto; font-size: 13px; color: var(--c-muted); }
.assist-edit.is-accepted .assist-state { color: var(--c-good); font-weight: 600; }
.assist-dropped { font-size: 13px; color: var(--c-muted); margin: 6px 0 4px; }
.assist-dropped ul { margin: 6px 0 0; padding-left: 18px; }
.assist-dropped q { font-style: italic; }
.assist-issue .chips { margin-bottom: 8px; }
.assist-quote { margin: 8px 0; }
.assist-quote-label { display: block; font-size: 12px; font-weight: 600; color: var(--c-muted); margin: 0 0 3px; }
.assist-quote blockquote { margin: 0; padding: 6px 10px; background: var(--c-tint); border-radius: 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.assist-quote.is-source blockquote { border-left-color: var(--c-accent); background: var(--c-accent-soft); }
.assist-suggestion { font-size: 13.5px; margin: 8px 0 0; }
.assist-history { margin-top: 12px; font-size: 13px; }
.assist-history summary { cursor: pointer; color: var(--c-ink-2); }
.assist-turn { border-top: 1px solid var(--c-border-soft); padding: 8px 0; }
.assist-turn p { margin: 4px 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
    .assist-edit-actions .btn { flex: 1 1 auto; justify-content: center; }
}
.review-head-actions a.btn { text-decoration: none; }
.review .dash-panel-head:has(.review-head-actions) { flex-wrap: wrap; align-items: center; }
/* The policy set labels are long: Applies to gets the room to show them. */
@media (min-width: 901px) { .review-settings { grid-template-columns: 1.2fr 1fr 96px; } }
/* Title on its own row, then Applies to, Needs agreement and Order. */
.review-settings .field:first-child { grid-column: 1 / -1; }

/* ── Collapse the menu (access.js) ────────────────────────────────────────
   Wherever the full sidebar shows, the button at its top shrinks it to a
   64px rail of icons (html.sidebar-collapsed) and the page takes the room.
   Labels are hidden from sight only, so each link keeps its full name; a
   tooltip (.rail-tip) shows it on hover or focus. Phones are unchanged. */
.sidebar-mark, .sidebar-collapse { display: none; }
.rail-tip {
    position: fixed; z-index: 500; transform: translateY(-50%); pointer-events: none;
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
    background: var(--c-ink); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3;
    padding: 6px 10px; border-radius: 8px; box-shadow: 0 6px 18px rgba(31, 41, 55, 0.18);
    opacity: 0; visibility: hidden; transition: opacity 0.12s ease;
}
.rail-tip.is-shown { opacity: 1; visibility: visible; }
.rail-tip-main { display: inline-flex; align-items: center; gap: 8px; }
.rail-tip.has-desc { flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; max-width: 260px; }
.rail-tip-desc { font-weight: 400; font-size: 12.5px; opacity: 0.85; }
.rail-tip-desc:only-child { opacity: 1; }
.rail-tip kbd { font-family: inherit; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); color: #fff; }
@media (max-width: 900px) { .rail-tip { display: none; } }

@media (min-width: 901px) {
    .calm .sidebar { overflow-x: hidden; overflow-y: auto; transition: width 0.2s ease; }
    .calm .main-content { transition: margin-left 0.2s ease; }
    .calm .sidebar-collapse {
        display: inline-flex; align-items: center; justify-content: center;
        position: absolute; top: 18px; right: 12px; width: 32px; height: 32px; padding: 0;
        border: 0; border-radius: 8px; background: none; color: var(--c-muted); cursor: pointer;
    }
    .calm .sidebar-collapse svg { width: 18px; height: 18px; }
    .calm .sidebar-collapse:hover { background: var(--c-tint); color: var(--c-ink); }
    .calm .sidebar-collapse:focus-visible, .calm .sidebar .nav-item:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
    .calm .sidebar-collapse .collapse-icon-open { display: none; }
    .sidebar-collapsed .calm .sidebar-collapse .collapse-icon-open { display: inline-block; }
    .sidebar-collapsed .calm .sidebar-collapse .collapse-icon-close { display: none; }

    /* The rail */
    .sidebar-collapsed .calm .sidebar { width: 64px; }
    .sidebar-collapsed .calm .main-content { margin-left: 64px; }
    .sidebar-collapsed .calm .sidebar-brand { padding: 0; justify-content: center; }
    .sidebar-collapsed .calm .sidebar-logo, .sidebar-collapsed .calm .sidebar-title { display: none; }
    .sidebar-collapsed .calm .sidebar-mark { display: block; height: 28px; width: auto; }
    .sidebar-collapsed .calm .sidebar-collapse { position: static; display: flex; width: 40px; height: 40px; margin: 12px auto 0; }
    .sidebar-collapsed .calm .sidebar-nav { padding: 12px; }
    .sidebar-collapsed .calm .nav-item { position: relative; justify-content: center; align-items: center; padding: 10px 0; }
    .sidebar-collapsed .calm .nav-item svg { margin-top: 0; }
    .sidebar-collapsed .calm .nav-text,
    .sidebar-collapsed .calm .nav-label-plain,
    .sidebar-collapsed .calm .nav-section {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
    }
    .sidebar-collapsed .calm .nav-page-actions { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--c-border); }
    /* Groups: icons only, every group open, a hairline between them. */
    .sidebar-collapsed .calm .nav-group-head { display: none; }
    .sidebar-collapsed .calm .nav-group.is-closed .nav-group-items { display: block; }
    .sidebar-collapsed .calm .nav-group:not([hidden]) ~ .nav-group:not([hidden]) { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--c-border); }
    /* The count that sits beside a label sits on the icon instead. */
    .sidebar-collapsed .calm .nav-item[data-badge]::after {
        /* The count is already in the name, beside the label: say it once. */
        content: attr(data-badge); content: attr(data-badge) / ""; position: absolute; top: 2px; right: 1px;
        min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px;
        display: flex; align-items: center; justify-content: center;
        background: var(--c-critical); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
        font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px #fdfbf8;
    }
    .sidebar-collapsed .calm .sidebar-footer { padding: 14px 0; }
    .sidebar-collapsed .calm .group-line { flex-direction: column; align-items: center; gap: 6px; margin: 0; font-size: 0; }
    .sidebar-collapsed .calm .group-line i { width: 8px; height: 8px; }
    .sidebar-collapsed .calm .sidebar-footer > :not(.group-line) { display: none; }

    /* Teams hides our brand band: the button takes its own row. */
    .in-teams .calm .sidebar-collapse { position: static; display: flex; margin: 12px 12px 0 auto; }
    .in-teams.sidebar-collapsed .calm .sidebar-collapse { margin: 12px auto 0; }
    .in-teams .calm .sidebar-nav { padding-top: 8px; }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
    .calm .sidebar, .calm .main-content, .rail-tip { transition: none; }
}

/* Policy Assistant: a conflict note on a proposed edit is advice, never a block. */
body.calm .assist-warning { margin: 6px 0 0; padding: 6px 10px; border: 1px solid #f0dcae; background: #fdf6e7; color: #6b4a12; border-radius: 6px; font-size: 13px; line-height: 1.45; }
/* ── Visual editor (rich-editor.js): policies, About Kokoodi, contract
   templates and the reference email ──────────────────────────────────── */
.re { position: relative; display: flex; flex-direction: column; min-width: 0; flex: 1; }
.re-toolbar, .re-tablebar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--c-border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--c-tint); }
.re-tablebar { border-radius: 0; background: var(--c-accent-soft); padding: 4px 6px; }
.re-tablebar[hidden] { display: none; }
.re-tablebar-label { font-size: 12px; font-weight: 600; color: var(--c-ink-2); margin: 0 4px; }
.re-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; min-height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--c-ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; touch-action: manipulation; }
.re-btn svg { width: 17px; height: 17px; }
.re-btn:hover:not(:disabled) { background: #fff; border-color: var(--c-border); }
.re-btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.re-btn[aria-pressed="true"] { background: #fff; border-color: var(--c-accent); color: var(--c-accent); }
.re-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.re-sep { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--c-border); }
.re-notice { margin: 0; padding: 8px 12px; font-size: 13px; background: #fff7e6; border: 1px solid #f3dfb3; border-bottom: 0; color: #7a4d00; }
.re-notice[hidden] { display: none; }
.re-surface { flex: 1; min-height: 480px; max-height: 72vh; overflow-y: auto; padding: 16px 18px; border: 1px solid var(--c-border); border-radius: 0 0 10px 10px; background: #fff; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; caret-color: var(--c-accent); }
.re-surface:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); }
.re-surface[hidden] { display: none; }
.re-surface-plain { min-height: 200px; max-height: none; font-size: 15px; line-height: 1.6; color: var(--c-ink); }
.re-surface-plain p { margin: 0 0 12px; }
.re-surface > :last-child { margin-bottom: 0; }
.re-surface.policy-doc table { display: table; table-layout: fixed; }
.re-surface td, .re-surface th { min-width: 60px; }
.re-surface li.re-task { list-style: none; position: relative; }
.re-surface li.re-task::before { content: ""; position: absolute; left: -20px; top: 0.35em; width: 12px; height: 12px; border: 1.5px solid var(--c-muted); border-radius: 3px; }
.re-textview { min-height: 480px; border-radius: 0 0 10px 10px; }
.re.is-textview .re-toolbar { border-bottom: 1px solid var(--c-border); }
.re-chip { display: inline-block; padding: 0 7px; margin: 0 1px; border-radius: 999px; background: var(--c-accent-soft); color: var(--c-accent); border: 1px solid #c6dfec; font-size: 0.86em; font-weight: 600; line-height: 1.55; white-space: nowrap; user-select: all; cursor: default; vertical-align: baseline; }
.re-chip-tag { background: var(--c-wingato-soft); border-color: #f4d3b6; color: var(--c-wingato-ink); }
.re-entity { margin: 0 0 14px; border: 1.5px dashed var(--c-appnable); border-radius: 10px; background: #fbfdf8; }
.re-entity[data-entity="wingato"] { border-color: var(--c-wingato); background: #fffaf5; }
.re-entity-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; color: var(--c-appnable-ink); background: var(--c-appnable-soft); border-radius: 8px 8px 0 0; user-select: none; }
.re-entity[data-entity="wingato"] .re-entity-label { color: var(--c-wingato-ink); background: var(--c-wingato-soft); }
.re-entity-remove { border: 0; background: transparent; color: inherit; font: inherit; font-size: 11px; text-transform: none; letter-spacing: 0; text-decoration: underline; cursor: pointer; padding: 6px 2px; }
.re-entity-body { padding: 10px 12px 2px; }
.re-linkblock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border: 1.5px dashed var(--c-accent); border-radius: 10px; background: var(--c-accent-soft); user-select: none; }
.re-linkblock-note { font-size: 13px; color: var(--c-ink-2); }
.re-details { margin: 0; padding: 10px 12px; border: 1px solid var(--c-border); border-bottom: 0; background: #fcfbf8; }
.re-details[hidden] { display: none; }
.re-details-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.re-details-head .muted { font-size: 12px; }
.re-details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.re-detail { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--c-ink-2); min-width: 0; }
.re-detail .form-input { font-weight: 400; padding: 6px 8px; font-size: 13px; }
.re-menu { position: absolute; z-index: 40; width: min(320px, 100%); max-height: 360px; overflow-y: auto; padding: 6px; background: #fff; border: 1px solid var(--c-border); border-radius: 10px; box-shadow: 0 10px 30px rgba(31, 41, 55, 0.14); }
.re-menu[hidden] { display: none; }
.re-menu-head { font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--c-muted); font-weight: 600; padding: 8px 8px 4px; }
.re-menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; padding: 8px; min-height: 44px; border: 0; border-radius: 7px; background: transparent; font: inherit; cursor: pointer; color: var(--c-ink); }
.re-menu-item strong { font-size: 13px; }
.re-menu-item span { font-size: 12px; color: var(--c-muted); line-height: 1.3; }
.re-menu-item:hover:not(:disabled), .re-menu-item:focus-visible { background: var(--c-accent-soft); outline: none; }
.re-menu-item:disabled { opacity: 0.5; cursor: not-allowed; }
.re-dialog-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(31, 41, 55, 0.35); }
.re-dialog-backdrop[hidden] { display: none; }
.re-dialog { width: min(440px, 100%); padding: 18px; background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(31, 41, 55, 0.25); }
.re-dialog h3 { margin: 0 0 12px; font-size: 17px; }
.re-dialog .field { margin-bottom: 10px; }
.re-dialog-error { margin: 0 0 8px; min-height: 1em; font-size: 13px; color: var(--c-critical); }
.re-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.re-dialog-actions [hidden] { display: none; }
/* Proposed edits from the Policy Assistant, in place */
.re-sugg { position: relative; display: inline; white-space: normal; user-select: none; }
.re-sugg ins { text-decoration: none; background: #e3f4ea; color: #0b5d45; border-bottom: 2px solid var(--c-good); padding: 0 2px; margin-left: 3px; border-radius: 3px; cursor: pointer; }
.re-sugg ins.re-sugg-remove { background: var(--c-critical-soft); color: var(--c-critical); border-bottom-color: var(--c-critical); font-style: italic; }
.re-sugg-acts { display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; gap: 6px; padding: 6px; background: #fff; border: 1px solid var(--c-border); border-radius: 8px; box-shadow: 0 8px 20px rgba(31, 41, 55, 0.15); white-space: nowrap; }
.re-sugg:focus-within .re-sugg-acts, .re-sugg.is-open .re-sugg-acts { display: inline-flex; }
/* Opened by hover or a click (rich-editor.js places it once, under or over the edit).
   The bridge is an invisible strip between the edit and the buttons, so the
   pointer never leaves the edit on its way to Accept. */
.re-sugg-acts::before { content: ''; position: absolute; left: -12px; right: -12px; top: -14px; height: 14px; }
.re-sugg.is-above .re-sugg-acts::before { top: auto; bottom: -14px; }
.re-sugg-btn { min-height: 34px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--c-border); background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--c-ink); }
.re-sugg-btn.is-accept { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
@media (max-width: 900px) {
    .re-toolbar { gap: 2px; padding: 4px; }
    .re-btn { min-width: 40px; min-height: 40px; }
    .re-surface { min-height: 55vh; max-height: none; padding: 14px; }
    .re-sugg-acts { position: fixed; left: 16px; right: 16px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); justify-content: center; }
    .re-sugg-btn { flex: 1; min-height: 44px; }
    /* The editor looks like what staff read, so on a phone the preview folds into it. */
    .review-editor.has-visual { display: block; }
    .review-editor.has-visual .review-pane[data-pane-panel="preview"] { display: none; }
    .review-editor.has-visual .review-pane[data-pane-panel="write"] { display: flex; }
    .review-tabs.has-visual { display: none; }
}
@media (max-width: 420px) {
    .re-sep { display: none; }
    .re-btn[data-cmd="field"] span, .re-btn[data-cmd="entity"] span, .re-btn[data-cmd="textview"] span { display: none; }
}
.re-host { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.assist-quote-link { cursor: pointer; }
.assist-quote-link:hover, .assist-quote-link:focus-visible { background: var(--c-accent-soft); outline: none; }
/* The toolbar stays in reach under the page header while a long document scrolls. */
.re-toolbar { position: sticky; top: 64px; z-index: 6; }
.re-tablebar { position: sticky; top: 112px; z-index: 6; }
.in-teams .re-toolbar { top: 52px; }
@media (max-width: 900px) { .re-tablebar { position: static; } }
.re-details-head { cursor: pointer; list-style-position: inside; }
.re-details-box:not([open]) .re-details-head { margin-bottom: 0; }
@media (max-width: 420px) {
    .re-plain .re-btn[data-cmd="field"] span { display: inline; }
}
.re-toolbar, .re-tablebar { position: static; }
.re-bars { position: sticky; top: 64px; z-index: 6; }
.in-teams .re-bars { top: 52px; }

/* ── The calm policy editor (review.html #editView and About Kokoodi) ─────
   One writing column, about 720px, with no boxes round the text: the title
   in a serif, Details folded under it, a quiet one-row toolbar that stays at
   the top while the text scrolls, and the Policy Assistant bar pinned to the
   bottom of the window (review-assist.js). */
.calm-doc { max-width: 720px; margin: 0 auto; min-width: 0; }
.calm-doc .review-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 14px; }
.calm-title { font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif; font-size: 34px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; color: var(--c-ink); margin: 0 0 6px; overflow-wrap: anywhere; }
.calm-status { font-size: 13px; color: var(--c-muted); margin: 0 0 16px; line-height: 1.5; }
.calm-intro { font-size: 14.5px; line-height: 1.65; color: var(--c-ink-2); margin: 0 0 16px; }
.calm-doc .me-problem { margin-bottom: 14px; }

/* Details and Versions: a quiet disclosure line with a chevron */
.calm-details, .calm-versions { border-top: 1px solid var(--c-border); }
.calm-details { border-bottom: 1px solid var(--c-border); margin: 0 0 14px; }
.calm-details > summary, .calm-versions > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--c-ink-2); border-radius: 8px; }
.calm-details > summary::-webkit-details-marker, .calm-versions > summary::-webkit-details-marker { display: none; }
.calm-details > summary::after, .calm-versions > summary::after { content: ""; flex-shrink: 0; width: 7px; height: 7px; margin: 0 6px 3px auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s ease; }
.calm-details[open] > summary::after, .calm-versions[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.calm-details > summary svg, .calm-versions > summary svg { width: 16px; height: 16px; flex-shrink: 0; }
.calm-details > summary:focus-visible, .calm-versions > summary:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.calm-details-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--c-muted); font-size: 13px; }
.calm-details-body { padding: 2px 0 16px; }
.calm-field-error { margin: 6px 0 0; font-size: 13px; color: var(--c-critical); }
.calm-field-error[hidden] { display: none; }
.calm-doc .form-input[aria-invalid="true"] { border-color: var(--c-critical); box-shadow: 0 0 0 3px var(--c-critical-soft); }
.calm-doc .re-details.re-details-out { margin: 14px 0 0; padding: 12px; border: 1px solid var(--c-border); border-radius: 10px; background: #fcfbf8; }
.calm-doc .re-details-out .re-details-head { cursor: default; }
.calm-versions { margin: 8px 0 0; }
.calm-versions .people { padding-bottom: 12px; }

/* Save and publish: one quiet row under Details */
.calm-actions { justify-content: flex-end; margin: 0 0 6px; }
.calm-actions .me-msg:empty { display: none; }
.calm-hint { font-size: 12.5px; margin: 6px 0 20px; }

/* The editor without its boxes, in a generous measure */
.calm-editor { position: relative; min-width: 0; }
.calm-editor .re-bars { background: var(--c-bg); }
.re-compact .re-toolbar { flex-wrap: nowrap; gap: 2px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--c-border); border-radius: 0; background: var(--c-bg); }
.re-compact .re-tablebar { border-radius: 8px; border: 0; margin-top: 6px; }
.re-compact .re-btn { color: var(--c-ink-2); }
.re-compact .re-btn:hover:not(:disabled) { background: var(--c-card); color: var(--c-ink); }
.re-compact .re-btn[aria-pressed="true"] { background: var(--c-accent-soft); border-color: transparent; color: var(--c-accent); }
.re-compact .re-more { display: none; margin-left: auto; }
.re-compact .re-surface { min-height: 50vh; max-height: none; overflow: visible; padding: 24px 0 40px; border: 0; border-radius: 0; background: transparent; font-size: 16px; line-height: 1.75; }
.re-compact .re-surface:focus { border: 0; box-shadow: none; }
.re-compact .re-surface.policy-doc h1 { font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif; font-size: 27px; line-height: 1.25; }
.re-compact .re-surface.policy-doc h2 { font-size: 19px; margin-top: 30px; }
.re-compact .re-surface.policy-doc li { margin-bottom: 8px; }
.re-compact .re-notice { margin-top: 8px; border: 1px solid #f3dfb3; border-radius: 8px; }
.re-compact .re-textview { min-height: 60vh; margin-top: 12px; border-radius: 10px; }
@media (max-width: 600px) {
    .re-compact .re-overflow { display: none; }
    .re-compact .re-more { display: inline-flex; }
    .re-compact .re-sep { display: none; }
    .re-compact .re-btn { min-width: 40px; }
}

/* Preview as staff: the server's rendering in a dialog */
.calm-preview { padding: 16px; }
.calm-preview .modal { width: min(780px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.calm-preview .modal-header { gap: 10px; }
.calm-preview .modal-header h2 { margin-right: auto; }
.calm-preview .modal-body { overflow-y: auto; }
.calm-preview .review-preview { max-height: none; overflow: visible; }
body.preview-open { overflow: hidden; }
@media (max-width: 600px) {
    .calm-preview { padding: 0; align-items: stretch; }
    .calm-preview .modal { width: 100%; max-height: none; height: 100%; border-radius: 0; }
}

/* ── The Policy Assistant bar ─────────────────────────────────────────── */
.ab-host { position: sticky; bottom: 16px; z-index: 30; margin-top: 24px; }
.ab-host[hidden] { display: none; }
.ab { position: relative; }
.ab-box { background: var(--c-card); border: 1px solid var(--c-border); border-radius: 18px; padding: 8px 8px 6px 12px; box-shadow: 0 12px 32px rgba(31, 41, 55, 0.12), 0 1px 3px rgba(31, 41, 55, 0.06); transition: border-color 0.15s ease; }
.ab-box:focus-within { border-color: #c6dfec; }
.ab.is-selection .ab-box { border-color: var(--c-accent); }
.ab-row { display: flex; align-items: flex-end; gap: 8px; }
.ab-mark { width: 18px; height: 18px; flex-shrink: 0; color: var(--c-accent); margin-bottom: 9px; }
.ab-input { flex: 1; min-width: 0; min-height: 36px; max-height: 132px; padding: 7px 0; border: 0; outline: none; resize: none; background: transparent; font: inherit; font-size: 15px; line-height: 1.45; color: var(--c-ink); }
.ab-input::placeholder { color: var(--c-muted); }
.ab-input:disabled { cursor: not-allowed; }
.ab-send { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--c-accent); color: #fff; cursor: pointer; touch-action: manipulation; }
.ab-send:hover:not(:disabled) { background: var(--c-accent-hover); }
.ab-send:disabled { opacity: 0.5; cursor: not-allowed; }
.ab-send svg { width: 18px; height: 18px; }
.ab-send:focus-visible, .ab-chip:focus-visible, .ab-link:focus-visible, .ab-scope-clear:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.ab.is-busy .ab-send { opacity: 1; background: var(--c-accent-soft); color: var(--c-accent); }
.ab.is-busy .ab-send svg { animation: ab-spin 0.9s linear infinite; }
@keyframes ab-spin { to { transform: rotate(360deg); } }
.ab-chips { display: flex; align-items: center; gap: 6px; padding: 6px 0 2px; overflow-x: auto; scrollbar-width: none; }
.ab-chips::-webkit-scrollbar { display: none; }
.ab-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-tint); color: var(--c-ink-2); font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
.ab-chip:hover:not(:disabled) { background: var(--c-accent-soft); border-color: #c6dfec; color: var(--c-accent); }
.ab-chip:disabled { opacity: 0.5; cursor: not-allowed; }
.ab-chip svg { width: 14px; height: 14px; }
.ab-chip[aria-expanded="true"] { background: var(--c-accent-soft); color: var(--c-accent); }
.ab-scope { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 0 0 4px; padding: 2px 2px 2px 10px; border-radius: 999px; background: var(--c-accent-soft); color: var(--c-accent); font-size: 12.5px; font-weight: 600; }
.ab-scope[hidden] { display: none; }
.ab-scope svg { width: 14px; height: 14px; flex-shrink: 0; }
.ab-scope-clear { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.ab-scope-clear:hover { background: rgba(21, 109, 153, 0.12); }
.ab-msg { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 4px 2px 2px; font-size: 13px; line-height: 1.45; color: var(--c-ink-2); }
.ab-msg[hidden], .ab-off[hidden] { display: none; }
.ab-msg.is-error { color: var(--c-critical); }
.ab-msg.is-ok { color: var(--c-good); }
.ab-msg.is-thinking { color: var(--c-accent); font-weight: 600; }
.ab-off { margin: 4px 2px 2px; font-size: 13px; color: var(--c-critical); }
.ab-link { min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--c-accent); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ab-msg.is-error .ab-link { color: var(--c-critical); }
.ab-pending { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 8px; padding: 6px 8px 6px 14px; border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-card); box-shadow: 0 6px 18px rgba(31, 41, 55, 0.1); font-size: 13.5px; }
.ab-pending[hidden] { display: none; }
.ab-pending-warn { color: #8a5a12; font-weight: 600; }
.ab-pending-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.ab-tray { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); display: flex; flex-direction: column; max-height: min(56vh, 480px); border: 1px solid var(--c-border); border-radius: 16px; background: var(--c-card); box-shadow: 0 18px 44px rgba(31, 41, 55, 0.18); }
.ab-tray[hidden] { display: none; }
.ab-tray-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 12px 10px 10px 16px; border-bottom: 1px solid var(--c-border-soft); }
.ab-tray-head h3 { margin: 0; font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 15px; }
.ab-tray-head p { margin: 2px 0 0; font-size: 12.5px; }
.ab-tray-body { overflow-y: auto; padding: 12px 16px 14px; min-height: 0; }
.ab-tray-body .assist-issue:last-child, .ab-tray-body .assist-edit:last-child { margin-bottom: 0; }
.ab-warnings { margin: 0 0 10px; }
.ab-warnings .assist-warning { margin: 0 0 6px; }
.ab-warnings .ab-link { min-height: 0; padding: 0; color: #6b4a12; }
.ab-edit-list { margin: 0 0 10px; }
.ab-edit-list > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--c-ink-2); min-height: 32px; display: flex; align-items: center; }
.ab-edit-list .assist-edits { margin-top: 6px; }
.assist-turn-acts { display: flex; flex-wrap: wrap; gap: 6px; }
body.has-assist-bar .kodi-fab { bottom: calc(var(--ab-h, 0px) + 32px); }
@media (max-width: 900px) {
    .ab-host { bottom: calc(72px + env(safe-area-inset-bottom)); }
    .ab-chip { min-height: 36px; }
    .ab-tray { max-height: min(52vh, 440px); }
    body.has-assist-bar .kodi-fab { bottom: calc(var(--ab-h, 0px) + 88px + env(safe-area-inset-bottom)); }
    /* An edit's Accept and Reject sit just over the bar. */
    .calm-doc .re-sugg-acts { bottom: calc(var(--ab-h, 0px) + 84px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
    .calm-title { font-size: 28px; }
    .calm-doc .review-back { margin-bottom: 12px; }
    .re-compact .re-surface { padding-top: 18px; }
    .ab-box { border-radius: 16px; }
    .ab-pending-acts { margin-left: 0; width: 100%; }
    .ab-pending-acts .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .ab.is-busy .ab-send svg { animation: none; }
    .calm-details > summary::after, .calm-versions > summary::after, .ab-box { transition: none; }
}

/* An edit in place: its reason and any warning sit with Accept and Reject. */
.re-sugg-acts { flex-direction: column; align-items: stretch; gap: 8px; width: max-content; max-width: min(340px, 80vw); white-space: normal; }
.re-sugg-btns { display: flex; gap: 6px; }
.re-sugg-note { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.45; color: var(--c-ink-2); font-weight: 400; }
.re-sugg-warning { padding: 4px 8px; border: 1px solid #f0dcae; border-radius: 6px; background: #fdf6e7; color: #6b4a12; }
.re-sugg.has-warning ins { border-bottom-style: dashed; border-bottom-color: #b7791f; }
@media (max-width: 900px) {
    .re-sugg-acts { width: auto; max-width: none; }
    .re-sugg-btns .re-sugg-btn { flex: 1; }
}
.ab-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--c-muted); cursor: pointer; }
.ab-icon:hover:not(:disabled), .ab-icon[aria-expanded="true"] { background: var(--c-accent-soft); color: var(--c-accent); }
.ab-icon:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.ab-icon svg { width: 18px; height: 18px; }
.calm-visibility { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.calm-visibility[hidden] { display: none; }
@media (max-width: 900px) {
    .calm-actions .btn { flex: 0 1 auto; }
    .calm-actions .me-msg { flex-basis: 100%; }
}
@media (max-width: 600px) {
    /* One row on a phone: Preview as an icon (its name stays for screen readers), Save, Publish. */
    .calm-actions { flex-wrap: nowrap; }
    .calm-actions:has(.me-msg:not(:empty)) { flex-wrap: wrap; }
    .calm-actions .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
    .calm-actions #previewBtn { flex: 0 0 auto; width: 40px; padding: 0; }
    .calm-actions .calm-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.ab-input:placeholder-shown { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-msg > span:first-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

/* ── The bar on a phone: one card, one line for the waiting edits ──────
   The waiting edits fold into the bar as "2 edits · 1 heads up" with
   compact Accept all and Reject all (the list is behind a tap on the
   count), and the quick actions show only while the bar is in use and
   no edits are waiting. Desktop is unchanged. */
.ab-pending-count { display: none; }
@media (max-width: 900px) {
    .ab { background: var(--c-card); border: 1px solid var(--c-border); border-radius: 16px; box-shadow: 0 12px 32px rgba(31, 41, 55, 0.12), 0 1px 3px rgba(31, 41, 55, 0.06); }
    .ab.is-selection { border-color: var(--c-accent); }
    .ab-box, .ab.is-selection .ab-box { border: 0; box-shadow: none; background: transparent; }
    .ab-pending { flex-wrap: nowrap; margin: 0; padding: 6px 8px 0 12px; border: 0; border-radius: 0; box-shadow: none; background: transparent; gap: 6px; }
    .ab-pending-text, .ab-pending-list { display: none; }
    .ab-pending-count { display: inline-flex; align-items: center; min-width: 0; min-height: 36px; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--c-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: underline; text-decoration-color: var(--c-border); text-underline-offset: 3px; cursor: pointer; }
    .ab-pending-count .ab-pending-warn { font-weight: 600; margin-left: 4px; }
    .ab-pending-count:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
    .ab-pending-acts, .ab-pending-acts.ab-pending-acts { width: auto; margin-left: auto; flex-wrap: nowrap; gap: 6px; }
    .ab-pending-acts .btn { flex: 0 0 auto; min-height: 36px; padding: 0 10px; font-size: 13px; }
    .ab-pending-acts .btn svg { display: none; }
    .ab .ab-chips { display: none; }
    .ab.is-engaged:not(.has-pending) .ab-chips { display: flex; }
    /* Room under the text while an edit is open, so any edit can come up above its buttons. */
    .calm-doc.has-open-edit .calm-editor { padding-bottom: 45vh; }
}
@media (max-width: 900px) {
    /* A touch shows :hover at once; the buttons wait for the tap to open the edit, so the tap never lands on them. */
    .re-sugg:not(.is-open) .re-sugg-acts { display: none; }
    .re-sugg-acts::before { display: none; }
}

/* Policy review: the buttons share the status line, so the text starts higher,
   and the text sits on a white page so it is plainly something you can type in. */
.calm-headrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 12px; }
.calm-headrow .calm-status { margin: 0; }
.calm-headrow .calm-actions { margin: 0 0 0 auto; }
.calm-doc .calm-details { margin: 18px 0 0; }
.calm-doc .calm-hint { margin-top: 10px; }
.re-compact .re-surface { margin-top: 10px; padding: 28px 36px 40px; border: 1px solid var(--c-border); border-radius: 12px; background: #fff; cursor: text; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.re-compact .re-surface:hover { border-color: var(--c-accent-soft); }
.re-compact .re-surface:focus { border: 1px solid var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); }
@media (max-width: 640px) {
    .re-compact .re-surface { padding: 18px 16px 32px; border-radius: 10px; }
    .calm-headrow .calm-actions { margin-left: 0; width: 100%; justify-content: flex-start; }
}

/* Policy review: "Applies to" on the status line, a chip that opens a short
   menu of the three choices (review.js), and "Publish to" in the publish dialog. */
.calm-statusline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.calm-applies { position: relative; }
.calm-applies-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 4px 8px 4px 11px; border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-card); font: inherit; font-size: 13px; line-height: 1.3; color: var(--c-muted); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.calm-applies-btn strong { color: var(--c-ink); font-weight: 600; }
.calm-applies-btn svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--c-muted); }
.calm-applies-btn:hover { border-color: var(--c-accent); background: var(--c-accent-soft); }
.calm-applies-btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.calm-applies-btn[aria-expanded="true"] { border-color: var(--c-accent); background: var(--c-accent-soft); }
.calm-applies-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 250px; max-width: calc(100vw - 32px); padding: 6px; background: var(--c-card); border: 1px solid var(--c-border); border-radius: 12px; box-shadow: 0 10px 28px rgba(31, 41, 55, 0.14); }
.calm-applies-menu[hidden] { display: none; }
.calm-applies-opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; text-align: left; color: var(--c-ink); cursor: pointer; }
.calm-applies-opt svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--c-accent); }
.calm-applies-opt[aria-checked="false"] svg { visibility: hidden; }
.calm-applies-opt[aria-checked="true"] { font-weight: 600; }
.calm-applies-opt:hover, .calm-applies-opt:focus-visible { background: var(--c-tint); outline: none; }
.calm-applies-opt:focus-visible { box-shadow: inset 0 0 0 2px var(--c-accent); }
.calm-pubto { margin: 4px 0 16px; padding: 0; border: 0; min-width: 0; }
.calm-pubto legend { padding: 0; margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--c-ink); }
.calm-pubto-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; margin: 0 0 6px; border: 1px solid var(--c-border); border-radius: 10px; font-size: 14px; color: var(--c-ink); cursor: pointer; }
.calm-pubto-opt:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.calm-pubto-opt input { margin: 0; flex-shrink: 0; accent-color: var(--c-accent); }
.calm-pubto-opt .calm-reach { margin-left: auto; font-size: 13px; white-space: nowrap; }
.calm-pubto-note { margin: 4px 0 0; font-size: 13px; color: var(--c-wingato-ink); }
.calm-pubto-note[hidden] { display: none; }
.calm-pubto-needs { margin: 8px 0 14px; font-size: 14px; }
@media (max-width: 640px) {
    .calm-applies-btn { min-height: 40px; }
    .calm-applies-menu { min-width: 0; width: max-content; }
}

/* Policy review: calm notes over the text. Who else is editing, unsaved
   changes to restore, and changes combined after someone else saved, with
   any places both people changed to choose between. */
.calm-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #cfe3ee; border-radius: 12px; background: var(--c-accent-soft); color: var(--c-ink); font-size: 14px; line-height: 1.5; }
.calm-note[hidden] { display: none; }
.calm-note > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--c-accent); }
.calm-note-text { flex: 1 1 auto; min-width: 0; }
.calm-note-text > p { margin: 0; }
.calm-note-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
#restoreNote { flex-wrap: wrap; }
#restoreNote .calm-note-acts { flex-basis: 100%; margin-top: 2px; padding-left: 28px; }
.calm-note-done { margin: 10px 0 0; font-weight: 600; color: var(--c-good); }
.calm-clashes { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.calm-clash { padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-card); }
.calm-clash.is-chosen { border-color: #bfe3d4; }
.calm-clash-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.calm-clash-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calm-clash-side { min-width: 0; }
.calm-clash-label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.calm-clash-text { margin: 0; padding: 8px 10px; border-radius: 8px; background: #f7f8fa; font: inherit; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.calm-clash-text.is-empty { font-style: italic; color: var(--c-muted); }
.calm-clash-acts { display: flex; gap: 8px; margin-top: 8px; }
.calm-clash-acts .btn[aria-pressed="true"] { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
@media (max-width: 640px) {
    .calm-note > svg { display: none; }
    .calm-clash-sides { grid-template-columns: 1fr; }
    .calm-clash-acts .btn { flex: 1 1 0; justify-content: center; }
    #restoreNote .calm-note-acts { padding-left: 0; }
    #restoreNote .calm-note-acts .btn { flex: 1 1 auto; justify-content: center; white-space: normal; }
}

/* ── Kokoodi Ops lives in Teams (access.js teamsFirst) ─────────────────
 * Staff who open the web address in a browser: a calm page over Ops, with
 * Open in Teams and a quiet Continue in the browser. */
.teams-first {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; background: var(--c-bg, #faf7f2); overflow-y: auto;
}
body.teams-first-open { overflow: hidden; }
.teams-first-card {
    width: 100%; max-width: 460px; text-align: center;
    background: var(--c-card, #fff); border: 1px solid var(--c-border, #ebe5da); border-radius: 14px;
    padding: 36px 28px 28px; box-shadow: 0 1px 2px rgba(31, 41, 55, 0.04);
}
.teams-first-card svg { width: 36px; height: 36px; color: var(--c-accent, #156d99); margin-bottom: 12px; }
.teams-first-card h2 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 21px; line-height: 1.3; margin: 0 0 10px; color: var(--c-ink, #1f2937); }
.teams-first-card p { color: var(--c-ink-2, #4b5563); font-size: 15px; line-height: 1.55; margin: 0 0 24px; }
.teams-first-card .btn-primary {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px;
    font-size: 15px; font-weight: 600; text-decoration: none; border-radius: 10px;
    background: var(--c-accent, #156d99); color: #fff;
}
.teams-first-card .btn-primary:hover { background: var(--c-accent-hover, #105a80); }
.teams-first-continue {
    margin-top: 14px; min-height: 44px; padding: 8px 12px; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 14px; color: var(--c-muted, #6b6f76); text-decoration: underline; text-underline-offset: 3px;
}
.teams-first-continue:hover { color: var(--c-ink, #1f2937); }
.teams-first-card a:focus-visible, .teams-first-continue:focus-visible { outline: 2px solid var(--c-accent, #156d99); outline-offset: 3px; }
@media (max-width: 480px) {
    .teams-first { align-items: flex-start; padding-top: 48px; }
    .teams-first-card { padding: 28px 20px 20px; }
}
/* Who in the pay run has no confirmed bank details (owners and People holders only). */
.pr-bank { padding: 10px 12px; border-radius: 10px; background: var(--c-wingato-soft); border: 1px solid #f4d3b5; color: var(--c-wingato-ink); font-size: 13px; line-height: 1.5; }
.pr-bank p { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.pr-bank svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.pr-bank ul { margin: 6px 0 0 42px; padding: 0; }
.pr-name .pr-chip { display: inline-block; margin-top: 4px; font-weight: 600; }

/* People > Staff: Details, a person's details from HR Private (people.js) */
.person-actions { flex-wrap: wrap; }
.pd-modal { max-width: 760px; width: 100%; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-block { border: 1px solid var(--c-border); border-radius: 10px; padding: 12px 14px; background: var(--c-card); min-width: 0; }
.pd-block h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--c-ink); }
.pd-block dl { margin: 0; }
.pd-row { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 8px; padding: 4px 0; font-size: 14px; }
.pd-row dt { color: var(--c-muted); font-size: 13px; }
.pd-row dd { margin: 0; color: var(--c-ink); overflow-wrap: anywhere; }
.pd-full { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: 0.04em; }
.pd-reveal { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--c-tint); border: 1px dashed var(--c-border); }
.pd-actions[hidden], .pd-reveal[hidden] { display: none; }
.pd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; }
.pd-pending { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: 13px; color: var(--c-ink-2); line-height: 1.45; }
.pd-pending svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.pd-updated { margin: 10px 0 0; font-size: 12px; }
.pd-log { margin-top: 10px; font-size: 13px; }
.pd-log ul { margin: 6px 0 0; padding-left: 18px; }
.pd-foot { flex-wrap: wrap; }
.pd-foot .btn, #phFill .modal-actions .btn { justify-content: center; white-space: nowrap; }
#phFill .modal-actions { flex-wrap: wrap; }
@media (max-width: 720px) {
    .pd-grid { grid-template-columns: 1fr; }
    .pd-foot .btn { flex: 1 1 100%; }
}

/* Onboarding > Pre-hire: Fill in for them (onboarding.js) */
.ph-fill-ref { border: 1px solid var(--c-border); border-radius: 10px; padding: 10px 12px 2px; margin: 4px 0 12px; }
.ph-fill-ref legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.ph-field-error { display: block; font-size: 12px; font-weight: 600; color: var(--c-critical); margin-top: 4px; }
.ph-field-error:empty { display: none; }
.form-input.is-invalid { border-color: var(--c-critical); background: var(--c-critical-soft); }
.ph-fill-problems { margin: 8px 0 0; padding: 10px 12px 10px 28px; border-radius: 8px; background: var(--c-critical-soft); border: 1px solid var(--c-critical-border); font-size: 13px; }
@media (max-width: 720px) {
    .ph-fill-ref .form-two { grid-template-columns: 1fr; gap: 0; }
    #phFill .modal-actions .me-msg { flex: 1 1 100%; }
}

/* Meetings (meetings.js, me-meetings.js): the Kokoodi Meetings calendar */
.mtg-toolbar { display: flex; gap: 10px; margin: -12px 0 16px; }
.mtg-toolbar [hidden] { display: none; }
.mtg-list { list-style: none; margin: 0; padding: 0; }
.mtg-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--c-border-soft); }
.mtg-item:first-child { border-top: 0; padding-top: 2px; }
.mtg-main { min-width: 0; }
.mtg-title { font-weight: 600; color: var(--c-ink); text-decoration: none; overflow-wrap: anywhere; }
.mtg-title:hover { color: var(--c-accent); text-decoration: underline; }
.mtg-when { font-size: 13px; color: var(--c-ink-2); margin-top: 2px; }
.mtg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; }
.mtg-meta .chip svg { width: 12px; height: 12px; }
.mtg-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mtg-empty { color: var(--c-muted); font-size: 14px; margin: 0 0 8px; }
.chip-private { background: #fff; }
.mtg-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-accent); text-decoration: none; margin-bottom: 10px; }
.mtg-back svg { width: 15px; height: 15px; }
.mtg-error-back { margin: 12px 0 0; }
.mtg-when-lg { font-size: 15px; color: var(--c-ink); margin: -6px 0 8px; }
.mtg-desc { font-size: 14px; color: var(--c-ink-2); line-height: 1.55; margin: 12px 0 0; overflow-wrap: anywhere; }
.mtg-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 16px 0; font-size: 14px; }
.mtg-facts dt { color: var(--c-muted); }
.mtg-facts dd { margin: 0; color: var(--c-ink); overflow-wrap: anywhere; }
.mtg-sub { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 14px; margin: 22px 0 8px; color: var(--c-ink); }
.mtg-timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.mtg-timeline li { padding: 6px 0; border-top: 1px solid var(--c-border-soft); overflow-wrap: anywhere; }
.mtg-suggest { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--c-border-soft); }
.mtg-form .field-hint { display: block; }
.mtg-fieldset { border: 0; padding: 0; margin: 4px 0 14px; min-width: 0; }
.mtg-fieldset legend { font-size: 13px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 8px; padding: 0; }
.mtg-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; background: #fff; }
.mtg-seg label { position: relative; }
.mtg-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mtg-seg span { display: block; padding: 9px 14px; font-size: 14px; color: var(--c-ink-2); border-left: 1px solid var(--c-border-soft); }
.mtg-seg label:first-child span { border-left: 0; }
.mtg-seg input:checked + span { background: var(--c-accent); color: #fff; font-weight: 600; }
.mtg-seg input:focus-visible + span, .mtg-day input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.mtg-days { display: flex; flex-wrap: wrap; gap: 6px; }
.mtg-day { position: relative; }
.mtg-day input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mtg-day span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--c-border); background: #fff; font-size: 14px; color: var(--c-ink-2); }
.mtg-day input:checked + span { background: var(--c-accent-soft); border-color: var(--c-accent); color: var(--c-accent); font-weight: 600; }
/* Meetings › Recordings (meeting-recordings.js) */
.rec-filter { max-width: 320px; margin: 0 0 8px; }
.rec-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--c-ink-2); margin: 12px 0 0; line-height: 1.5; }
.rec-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--c-muted); }
.rec-player { margin: 8px 0 4px; max-width: 880px; }
.rec-video { display: block; width: 100%; max-height: 70vh; aspect-ratio: 16 / 9; background: #111; border-radius: 10px; }
.rec-video-wait { aspect-ratio: 16 / 9; border-radius: 10px; background: var(--c-tint); display: flex; align-items: center; justify-content: center; padding: 24px; }
.rec-search { max-width: 420px; margin: 0 0 4px; }
.rec-tools { margin: 0 0 8px; }
.rec-note.is-error { color: var(--c-danger, #b42318); }
.rec-summary { margin: 12px 0 16px; padding: 4px 0 0; border-top: 1px solid var(--c-border-soft); max-width: 760px; }
.rec-summary h5 { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 14px; margin: 14px 0 4px; color: var(--c-ink); }
.rec-summary p, .rec-summary li { font-size: 14px; line-height: 1.55; color: var(--c-ink); margin: 0 0 6px; }
.rec-summary ul { margin: 0 0 6px; padding-left: 20px; }
.rec-summary-by { display: flex; gap: 6px; align-items: center; font-size: 12px !important; color: var(--c-muted) !important; margin: 10px 0 0 !important; }
.rec-summary-by svg { width: 13px; height: 13px; }
.rec-count { font-size: 13px; min-height: 1.2em; margin: 0 0 6px; }
.rec-lines { list-style: none; margin: 0; padding: 0; }
.rec-lines li { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--c-border-soft); }
.rec-lines li[hidden] { display: none; }
.rec-lines p { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: var(--c-ink); overflow-wrap: anywhere; }
.rec-speaker { font-size: 13px; font-weight: 600; color: var(--c-ink-2); }
.rec-time { border: 0; background: none; padding: 0; line-height: 1.5; font: inherit; font-size: 13px; color: var(--c-accent); cursor: pointer; text-align: left; font-variant-numeric: tabular-nums; }
.rec-time:hover { text-decoration: underline; }
.rec-time:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 600px) { .rec-lines li { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; } }
.mtg-week { max-width: 220px; }
.mtg-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mtg-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin: 8px 0 12px; }
.mtg-check { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; font-size: 14px; color: var(--c-ink); cursor: pointer; min-width: 0; }
.mtg-check > span:first-of-type { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mtg-check .muted { font-size: 12px; }
.mtg-check input { width: 18px; height: 18px; accent-color: var(--c-accent); flex-shrink: 0; margin: 0; }
.mtg-check:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.mtg-check[hidden] { display: none; }
/* The people picker: chips for the picked, a box to type in, the matches as a plain list under it (no floating menu: it works on a phone). */
.mtg-picker { margin: 0 0 14px; }
.mtg-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mtg-picked:empty { display: none; }
.mtg-pick { padding-right: 4px; font-size: 13px; color: var(--c-ink); }
.mtg-unpick { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 2px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--c-muted); cursor: pointer; }
.mtg-unpick:hover, .mtg-unpick:focus-visible { background: var(--c-border); color: var(--c-ink); }
.mtg-unpick svg { width: 12px; height: 12px; }
.mtg-picker-value[hidden] { display: none; }
.mtg-options { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; max-height: 232px; overflow-y: auto; }
.mtg-options li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--c-ink); cursor: pointer; }
.mtg-options li .muted { font-size: 12px; flex-shrink: 0; }
.mtg-options li[aria-selected="true"], .mtg-options li:hover { background: var(--c-accent-soft); }
.mtg-options .mtg-none { color: var(--c-muted); cursor: default; }
.mtg-options .mtg-none:hover { background: none; }
.mtg-toggle { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 12px; font-size: 14px; color: var(--c-ink); cursor: pointer; }
.mtg-toggle input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--c-accent); flex-shrink: 0; }
.mtg-toggle > span { display: flex; flex-direction: column; gap: 2px; }
.mtg-warn { margin: 6px 0 10px; padding: 9px 12px; border-radius: 10px; background: var(--c-wingato-soft); border: 1px solid #f4d3b5; color: var(--c-wingato-ink); font-size: 13px; line-height: 1.45; }
.mtg-warn[hidden] { display: none; }
.mtg-rules { margin: -6px 0 14px; padding-left: 18px; color: var(--c-muted); font-size: 12.5px; line-height: 1.5; }
.mtg-rules li { margin: 2px 0; }
.mtg-summary { margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--c-border-soft); font-size: 14px; }
.mtg-summary .mtg-warn { font-weight: 400; }
@media (max-width: 720px) {
    .mtg-toolbar { margin-top: -16px; }
    .mtg-toolbar .btn { width: 100%; justify-content: center; }
    .mtg-item { grid-template-columns: minmax(0, 1fr); }
    .mtg-act { justify-content: flex-start; }
    /* The heading keeps to one line; its note ("You see private meetings too") goes under it. */
    .meetings .dash-panel-head { flex-wrap: wrap; row-gap: 2px; }
    .meetings .dash-panel-head h3 { white-space: nowrap; }
    .meetings .dash-panel-head > .muted { flex-basis: 100%; }
    .mtg-three { grid-template-columns: 1fr 1fr; }
    .mtg-three .field:last-child { grid-column: 1 / -1; }
    .mtg-form .form-two { grid-template-columns: 1fr; gap: 0; }
    .mtg-seg { display: flex; }
    .mtg-seg label { flex: 1; }
    .mtg-seg span { text-align: center; padding: 10px 6px; }
    .mtg-day span { min-width: 44px; min-height: 44px; }
    .mtg-teams, .mtg-people { grid-template-columns: 1fr; }
    .mtg-facts { grid-template-columns: 1fr; gap: 2px; }
    .mtg-facts dd { margin-bottom: 8px; }
}

/* ── Kudos and the Noticeboard (me-noticeboard.js, admin-kodi.js) ──────── */
#kudosPanel .dash-panel-head, #noticeboardPanel .dash-panel-head { align-items: center; flex-wrap: wrap; }
.kudos-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kudos-item { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: 12px; background: #fff; min-width: 0; }
.kudos-item.is-hidden { background: var(--c-tint); }
.kudos-item.is-hidden .kudos-text { color: var(--c-muted); }
.kudos-value { justify-self: start; font-size: 12px; font-weight: 600; color: var(--c-accent); background: var(--c-accent-soft); border-radius: 999px; padding: 3px 10px; }
.kudos-text { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--c-ink); overflow-wrap: anywhere; }
.kudos-from { font-size: 13px; color: var(--c-ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kudos-item .btn { justify-self: start; margin-top: 4px; }
.kudos-empty { margin: 0; font-size: 14px; }
.nb-welcome { margin-bottom: 14px; }
.nb-announce { margin-bottom: 6px; }
/* The one optional picture on an announcement: the drop, then a preview with Remove, then its description. */
.nb-pic .ex-drop[hidden], .nb-pic-chosen[hidden], .nb-pic-alt[hidden] { display: none; }
.nb-pic-chosen { display: grid; gap: 8px; }
.nb-pic-chosen img { display: block; width: 100%; max-height: 260px; object-fit: contain; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-tint); }
.nb-pic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-weight: 400; }
.nb-pic-name { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--c-ink); overflow-wrap: anywhere; }
.nb-pic-name .muted { font-size: 13px; }
.nb-pic-meta .btn { min-height: 44px; }
.nb-pic-alt.has-error .form-input { border-color: var(--c-critical); }
.nb-pic-alt .field-hint { font-weight: 400; }
.nb-announce .me-msg a { color: var(--c-accent); }
.nb-week { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--c-border-soft); }
.nb-week-head { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 15px; font-weight: 600; margin: 0 0 6px; color: var(--c-ink); }
.nb-values { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nb-values legend { font-size: 13px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 6px; padding: 0; }
.nb-value { display: flex; gap: 8px; align-items: center; padding: 9px 11px; border: 1px solid var(--c-border); border-radius: 10px; cursor: pointer; font-size: 14px; min-height: 44px; }
.nb-value:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.nb-value input { accent-color: var(--c-accent); flex: 0 0 auto; }
.kodi-values { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.kodi-values .btn { justify-content: center; white-space: normal; text-align: center; }
.kt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.kt-box { border: 1px solid var(--c-border); border-radius: 12px; padding: 12px 14px; background: #fff; min-width: 0; }
.kt-box h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.kt-box h4 svg { width: 16px; height: 16px; }
.kt-box.is-ok h4 svg { color: var(--c-good); }
.kt-box.is-missing h4 svg { color: var(--c-critical); }
.kt-box p { margin: 0; font-size: 13px; color: var(--c-ink-2); overflow-wrap: anywhere; }
.kt-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.kt-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--c-border-soft); overflow-wrap: anywhere; }
.kt-list .muted { font-size: 12px; }
@media (max-width: 720px) {
    .nb-values, .kt-grid, .kodi-values { grid-template-columns: 1fr; }
    #kudosPanel .dash-panel-head .btn { width: 100%; justify-content: center; }
}

/* ── The Friday Five and the gift wheel (me-fridayfive.js, fridayfive.js) ─ */
.ff-panel { border: 1px solid var(--c-accent-soft); background: linear-gradient(180deg, var(--c-accent-soft), var(--c-card, #fff) 60%); }
.ff-head { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--c-ink); }
.ff-open, .ff-last, .ff-win { margin-bottom: 16px; }
.ff-last { padding-top: 14px; border-top: 1px solid var(--c-border-soft); }
.ff-q { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ff-q legend { font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 8px; padding: 0; line-height: 1.45; }
.ff-q legend .chip { font-weight: 500; margin-left: 4px; }
.ff-n { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 4px; border-radius: 50%; background: var(--c-accent); color: #fff; font-size: 12px; }
.ff-answers summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--c-accent); min-height: 32px; display: flex; align-items: center; }
.ff-answers ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.ff-answers li span { display: block; color: var(--c-ink-2); }
.ff-answers li strong { color: var(--c-good); }
.ff-note { margin-top: 4px; }
.ff-win { padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--c-border); text-align: center; overflow: hidden; }
.ff-win .me-actions { justify-content: center; }
.ff-wheel-wrap { position: relative; width: min(260px, 72vw); aspect-ratio: 1; margin: 14px auto 16px; }
.ff-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 20px solid var(--c-wingato); z-index: 2; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2)); }
.ff-wheel { position: absolute; inset: 0; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 0 0 1px var(--c-border), 0 8px 24px rgba(21, 109, 153, 0.18);
    background: conic-gradient(var(--c-accent) 0 45deg, var(--c-appnable) 45deg 90deg, var(--c-wingato) 90deg 135deg, var(--c-kokoodi) 135deg 180deg, var(--c-accent) 180deg 225deg, var(--c-appnable) 225deg 270deg, var(--c-wingato) 270deg 315deg, var(--c-kokoodi) 315deg 360deg); }
.ff-wheel.is-spinning { transition: transform 5s cubic-bezier(0.16, 0.84, 0.2, 1); }
.ff-seg { position: absolute; inset: 0; display: flex; justify-content: center; padding-top: 14%; transform: rotate(calc(var(--i) * 360deg / var(--n) + 180deg / var(--n))); color: #fff; }
.ff-seg svg { width: 24px; height: 24px; stroke-width: 2.4; }
.ff-gift { display: flex; gap: 12px; align-items: center; justify-content: center; text-align: left; margin: 8px auto 0; padding: 12px 16px; max-width: 420px; border-radius: 12px; background: var(--c-good-soft); border: 1px solid #bfe3d4; }
.ff-gift svg { width: 28px; height: 28px; color: var(--c-good); flex: 0 0 auto; }
.ff-gift strong { display: block; font-size: 15px; color: var(--c-ink); }
.ff-gift .muted { font-size: 13px; }
.ff-settings .check { margin-bottom: 10px; }
.ff-birthday { margin: -2px 0 12px 28px; max-width: 360px; }
.ff-birthday[hidden] { display: none; }
.ff-week { margin-bottom: 14px; }
.ff-edit-q { border: 1px solid var(--c-border); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; background: #fff; }
.ff-edit-q legend { font-size: 13px; font-weight: 600; color: var(--c-ink-2); padding: 0 4px; }
.ff-edit-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ff-edit-opt { display: flex; gap: 8px; align-items: center; }
.ff-edit-opt input[type="radio"] { accent-color: var(--c-good); width: 20px; height: 20px; flex: 0 0 auto; }
.ff-gift-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-border-soft); }
@media (max-width: 720px) {
    .ff-q, .ff-edit-opts { grid-template-columns: 1fr; }
    .ff-birthday { margin-left: 0; }
    .ff-win .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .ff-wheel.is-spinning { transition: none; }
}

/* Welcome messages on the starter page */
.wm-intro { margin: 0 0 10px; font-size: 14px; }
.wm-list { list-style: none; margin: 0; padding: 0; }
.wm-row { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--c-border-soft); }
.wm-row:first-child { border-top: 0; }
.wm-main { min-width: 0; flex: 1 1 auto; }
.wm-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; }
.wm-text { margin-top: 4px; font-size: 14px; color: var(--c-ink-2); line-height: 1.5; }
.wm-meta { margin-top: 2px; font-size: 13px; overflow-wrap: anywhere; }
.wm-approved { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--c-good); }
.wm-approved.is-no { color: var(--c-critical); }
.wm-approved svg, .wm-title .chip svg { width: 14px; height: 14px; }
.wm-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: 0 0 auto; max-width: 50%; }
.wm-head { display: grid; gap: 4px; margin: 0 0 12px; font-size: 14px; }
.wm-head div { display: flex; gap: 10px; }
.wm-head dt { width: 64px; flex-shrink: 0; color: var(--c-muted); }
.wm-head dd { margin: 0; overflow-wrap: anywhere; }
.wm-textpart { margin-top: 10px; font-size: 13px; }
.wm-textpart pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--c-tint); padding: 10px; border-radius: 8px; max-height: 30vh; overflow: auto; }
.wm-card { border: 1px solid var(--c-border); border-radius: 10px; padding: 14px 16px; background: #fff; max-width: 420px; }
.wm-card p { margin: 6px 0; font-size: 14px; }
.wm-tpl-body { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
@media (max-width: 640px) {
    .wm-row { flex-direction: column; }
    .wm-actions { max-width: none; justify-content: flex-start; }
}

/* Me: the first-day panel */
.me-firstday { border: 1px solid var(--c-good-soft); background: linear-gradient(180deg, var(--c-good-soft), var(--c-card, #fff) 70%); }
.me-firstday-intro { margin: 0 0 12px; color: var(--c-ink-2); }
.me-firstday-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.me-firstday h4 { margin: 8px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.me-firstday-list { list-style: none; margin: 0; padding: 0; }
.me-firstday-list a, .me-firstday-fact { display: flex; gap: 10px; align-items: center; padding: 7px 2px; color: var(--c-ink); text-decoration: none; font-size: 15px; }
.me-firstday-list a:hover span { text-decoration: underline; }
.me-firstday-list svg { width: 18px; height: 18px; color: var(--c-accent); flex-shrink: 0; }
@media (max-width: 640px) { .me-firstday-grid { grid-template-columns: 1fr; } }

/* Policy review: everything above the text on one line, so the text starts
   high. At 1024 and up, in the 720px column: the status (version and date
   first, cut short with an ellipsis and in full in its tooltip), the chips
   ("Applies to: Everyone", "Agree: Yes", their full names for screen
   readers), then Preview and Save draft as icons (Save shows a dot while
   there are unsaved changes) and Approve and publish. On a phone, two
   lines: the status and the chip values, then the buttons. The save
   message ("Unsaved changes", "Saving...") takes the status's place while
   there is one. */
#editView .calm-headrow { flex-wrap: nowrap; gap: 6px; margin: 0 0 10px; }
#editView .calm-statusline { flex: 1 1 auto; flex-wrap: nowrap; gap: 5px; min-width: 0; }
#editView .calm-status, #editView #saveMsg { flex: 0 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
#editView #saveMsg:empty { display: none; }
#editView .calm-statusline:has(#saveMsg:not(:empty)) .calm-status { display: none; }
#editView #saveMsg.is-error { white-space: normal; }
#editView .calm-applies { flex: 0 0 auto; min-width: 0; }
#editView .calm-applies-btn { white-space: nowrap; max-width: 210px; padding: 4px 6px 4px 9px; }
#editView .calm-applies-btn strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#editView .calm-k-short { display: none; }
#editView #needsBtn .calm-k-long { display: none; }
#editView #needsBtn .calm-k-short { display: inline; }
#editView .calm-headrow .calm-actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; margin: 0; width: auto; }
#editView .calm-headrow .calm-actions .btn { flex: 0 0 auto; white-space: nowrap; padding: 7px 11px; min-height: 32px; }
#editView .calm-headrow .calm-actions .calm-icon-btn { width: 34px; padding: 0; justify-content: center; }
#editView .calm-icon-btn svg { width: 16px; height: 16px; }
#editView #saveBtn { position: relative; }
#editView #saveBtn.is-dirty::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-wingato); box-shadow: 0 0 0 2px var(--c-card); }
@media (max-width: 640px) {
    #editView .calm-headrow { flex-wrap: wrap; gap: 6px; }
    #editView .calm-statusline { flex: 1 1 100%; }
    #editView .calm-applies-btn { max-width: 130px; min-height: 32px; padding: 3px 6px 3px 9px; font-size: 12.5px; }
    #editView .calm-headrow .calm-actions { flex: 1 1 100%; }
    #editView .calm-headrow .calm-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 36px; }
    #editView .calm-headrow .calm-actions .calm-icon-btn { flex: 0 0 44px; width: 44px; }
    #editView .calm-k-long { display: none; }
    #editView .calm-k-short { display: inline; }
}

/* Audit (owners): the trail, flags and their settings. audit.html */
.au-filters .field { min-width: 150px; flex: 1 1 150px; }
.au-filters .au-text { flex: 2 1 240px; }
.au-buttons { display: flex; gap: 8px; padding-bottom: 12px; }
.au-panel { padding: 6px 0; }
.au-rows { list-style: none; margin: 0; padding: 0; }
.au-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 14px; padding: 10px 20px; border-bottom: 1px solid var(--c-border-soft); }
.au-row:last-child { border-bottom: 0; }
.au-row.is-refused, .au-row.is-failed { background: var(--c-critical-soft); }
.au-when { font-size: 12px; color: var(--c-muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.au-main { min-width: 0; }
.au-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.au-action { font-size: 14px; color: var(--c-ink); overflow-wrap: anywhere; }
.au-who { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; color: var(--c-ink-2); margin-top: 3px; overflow-wrap: anywhere; }
.au-target { color: var(--c-ink); }
.au-detail { font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.au-kind { font-size: 11px; padding: 1px 8px; }
.au-out-refused, .au-out-failed { background: var(--c-critical-soft); border-color: var(--c-critical-border); color: var(--c-critical); }
.au-empty { padding: 14px 20px; margin: 0; }
.au-more { display: flex; justify-content: center; padding: 10px 0 6px; }
.view-tab .nav-badge { margin-left: 4px; }
.au-flags { display: flex; flex-direction: column; }
.au-flag.is-resolved, .au-flag.is-dismissed { opacity: 0.85; }
.au-flag-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.au-flag-rule { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); }
.au-flag-title { font-family: 'Figtree', 'Noto Sans', sans-serif; font-size: 16px; font-weight: 600; margin: 2px 0 0; color: var(--c-ink); overflow-wrap: anywhere; }
.au-flag-when { font-size: 13px; margin: 8px 0; overflow-wrap: anywhere; }
.au-flag-note { font-size: 13px; margin: 0 0 10px; color: var(--c-ink-2); }
.au-flag-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.au-set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; margin-top: 12px; }
.au-set-grid .form-input { font-size: 15px; padding: 9px 10px; }
.au-set-kinds { border: 0; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.au-set-kinds legend { font-size: 13px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 8px; }
.au-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.au-set-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
@media (max-width: 700px) {
    .au-row { grid-template-columns: minmax(0, 1fr); padding: 10px 14px; }
    .au-buttons { width: 100%; }
    .au-buttons .btn { flex: 1; justify-content: center; }
    .au-flag-head { flex-direction: column; }
}

/* ── Network and the standard states (docs/ui-states.md; api.js) ───────── */
.net-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; padding: 10px 16px; text-align: center; font-size: 14px; font-weight: 500; color: #fff; background: #5b4a1f; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.net-banner.off { background: #7a4b00; }
.net-banner.back { background: var(--c-good, #0f8a6a); }
.net-slow { position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; bottom: 84px; z-index: 9998; max-width: calc(100% - 32px); padding: 9px 14px 9px 36px; border-radius: 999px; background: #1f2a33; color: #fff; font-size: 13.5px; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5); }
.net-slow::before { content: ''; position: absolute; left: 13px; top: 50%; width: 13px; height: 13px; margin-top: -7.5px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: net-spin 0.9s linear infinite; }
@keyframes net-spin { to { transform: rotate(360deg); } }
.ops-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 32px 20px; border: 1px dashed var(--c-border, #ebe5da); border-radius: 14px; background: var(--c-card, #fff); color: var(--c-ink-2, #4b5563); }
.ops-state svg { width: 30px; height: 30px; color: var(--c-muted, #6b6f76); margin-bottom: 4px; }
.ops-state h3 { margin: 0; font-size: 16px; color: var(--c-ink, #1f2937); }
.ops-state p { margin: 0; max-width: 460px; font-size: 14px; }
.ops-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.ops-state-error { border-style: solid; border-color: var(--c-critical-border, #f3cfcb); background: var(--c-critical-soft, #fdf1f0); }
.ops-state-error svg { color: var(--c-critical, #c62f2f); }
@media (prefers-reduced-motion: reduce) { .net-slow::before { animation: none; } }

/* A sign-in that has ended mid-work (auth.js): the page and its work stay. */
.signin-again { position: fixed; left: 0; right: 0; top: 0; z-index: 10000; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 12px 16px; background: #fff8e8; border-bottom: 1px solid #f3e0b2; color: #533900; font-size: 14px; box-shadow: 0 4px 16px -8px rgba(0, 0, 0, 0.25); }
.signin-again-actions { display: inline-flex; align-items: center; gap: 12px; }
.signin-again .btn-link { background: none; border: 0; padding: 0; color: #533900; text-decoration: underline; cursor: pointer; font: inherit; }
.signin-again[hidden], .net-banner[hidden], .net-slow[hidden] { display: none; }

/* Me: your email signature (me-signature.js). The form beside the preview;
   stacked on a phone. */
.sig-layout { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 24px; align-items: start; }
.sig-form input[type="text"], .sig-form input:not([type]) { font: inherit; font-weight: 400; padding: 9px 12px; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; color: var(--c-ink); }
.sig-form input:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.sig-form .field .muted { font-weight: 400; }
.sig-brand { display: flex; gap: 4px; background: var(--c-tint); border-radius: 10px; padding: 4px; font-weight: 600; }
.sig-brand .seg { position: relative; text-align: center; }
.sig-brand .seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sig-brand .seg:has(input:checked) { background: #fff; color: var(--c-accent); box-shadow: 0 1px 2px rgba(31, 41, 55, 0.08); }
.sig-brand .seg:has(input:focus-visible) { outline: 2px solid var(--c-accent); }
.sig-msg { font-size: 13px; min-height: 18px; margin: 0; color: var(--c-muted); }
.sig-msg.is-ok { color: var(--c-good); font-weight: 600; }
.sig-msg.is-error { color: #b42318; }
.sig-preview iframe { width: 100%; height: 200px; border: 1px solid var(--c-border); border-radius: 12px; background: #fff; display: block; }
.sig-actions { margin: 12px 0; }
.sig-how summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--c-ink-2); }
.sig-how ol { margin: 8px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.6; color: var(--c-ink-2); }
@media (max-width: 760px) { .sig-layout { grid-template-columns: 1fr; } }

/* Me: your meeting background (me-background.js). The words and the look on
   one row, then the designs side by side (stacked on a phone), then the steps. */
.bg-form { display: grid; grid-template-columns: 1fr 1fr minmax(160px, 200px); gap: 12px 16px; align-items: end; margin-bottom: 8px; }
.bg-form input:not([type]) { font: inherit; font-weight: 400; padding: 9px 12px; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; color: var(--c-ink); width: 100%; box-sizing: border-box; }
.bg-form input:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.bg-form .sig-brand .seg { flex: 1; }
/* Three across (the three companies), then two across (the partner and the
   group): six columns, the first three items span two, the rest span three.
   Two columns on a narrow screen with an odd last one full width; one on a phone. */
.bg-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; margin: 12px 0 4px; }
.bg-item { margin: 0; min-width: 0; grid-column: span 2; }
.bg-item:nth-child(n+4) { grid-column: span 3; }
/* Four designs (Wingato is not offered to everyone): two by two. */
.bg-grid[data-count="4"] .bg-item { grid-column: span 3; }
.bg-item[hidden] { display: none; }
.bg-frame { aspect-ratio: 16 / 9; border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; background: var(--c-tint); }
.bg-frame canvas, .bg-frame img { display: block; width: 100%; height: 100%; }
.bg-frame [hidden] { display: none; }
.bg-sk { width: 100%; height: 100%; margin: 0; border-radius: 0; }
.bg-frame.is-failed { display: flex; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; background: #fff; }
.bg-failed { text-align: center; font-size: 13px; color: var(--c-ink-2); }
.bg-failed p { margin: 0 0 8px; }
.bg-item figcaption { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 8px; font-size: 13px; }
.bg-item figcaption strong { font: 600 14px 'Figtree', 'Noto Sans', sans-serif; color: var(--c-ink); }
.bg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-actions .btn { min-height: 36px; }
.bg-actions[hidden], .bg-actions [hidden] { display: none; }
.bg-actions .btn:disabled { opacity: 0.5; cursor: default; }
.bg-how { border-top: 1px solid var(--c-border); margin-top: 16px; padding-top: 12px; }
.bg-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--c-border); margin-bottom: 8px; }
.bg-tabs [role="tab"] { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 0; min-height: 40px; font: 600 13px 'Figtree', 'Noto Sans', sans-serif; color: var(--c-muted); cursor: pointer; }
.bg-tabs [role="tab"][aria-selected="true"] { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.bg-tabs [role="tab"]:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.bg-how ol { margin: 8px 0 12px; padding-left: 20px; font-size: 13px; line-height: 1.6; color: var(--c-ink-2); }
.bg-how ol[hidden] { display: none; }
.bg-how .me-hint { margin: 0; }
.bg-how a { color: var(--c-accent); }
@media (max-width: 760px) { .bg-form { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .bg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bg-item, .bg-item:nth-child(n+4) { grid-column: auto; } .bg-item:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 560px) { .bg-grid { grid-template-columns: 1fr; } }

/* A button's display rule must not beat hidden: Publish, Send for approval and Retire are shown by who you are. */
.review-actions [hidden] { display: none !important; }

/* What changed, and the AI review, for whoever approves a change (approval-review.js). */
.ar-legend { font-size: 12.5px; margin: 0 0 6px; display: flex; gap: 10px; }
.ar-legend ins, .ar-legend del { border-radius: 3px; padding: 0 4px; }
.ar-legend ins { background: var(--c-good-soft); color: var(--c-good); text-decoration: underline; text-underline-offset: 2px; }
.ar-legend del { background: var(--c-critical-soft); color: var(--c-critical); text-decoration: line-through; }
.ar-diff { max-height: 360px; }
.ar-card { border: 1px solid var(--c-border); border-radius: 10px; padding: 12px 14px; background: var(--c-card); margin: 10px 0 0; }
.ar-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.ar-title svg { width: 16px; height: 16px; }
.ar-intro { margin: 4px 0 10px; font-size: 13px; }
.ar-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; }
.ar-head .chip svg { width: 14px; height: 14px; vertical-align: -2px; }
.ar-when { font-size: 12.5px; }
.ar-summary { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
.ar-summary li { margin: 0 0 3px; }
.ar-group { margin: 0 0 8px; }
.ar-group-title { margin: 0 0 3px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-muted); }
.ar-issues { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.ar-issues li { margin: 0 0 4px; }
.ar-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin: 8px 0 0; font-size: 12.5px; }


/* ── Me as a home page (src/js/me-home.js) ───────────────────────────────
   Your week first (a greeting, what is waiting, who is off as a grid), the
   everyday panels side by side, everything else folded. A soft wave in a tint
   of Ops blue rises from the bottom of the screen behind it. */
.calm .home-wave { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 44vh; min-height: 300px; pointer-events: none; z-index: 0; }
.calm .home-wave .w1 { fill: rgba(21, 109, 153, 0.10); }
.calm .home-wave .w2 { fill: rgba(21, 109, 153, 0.08); }
.calm .dash.me { position: relative; z-index: 1; }
.calm .home-week-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.calm .home-hello { font: 600 24px/1.2 'Figtree', 'Noto Sans', sans-serif; margin: 0 0 4px; color: var(--c-ink); }
.calm .home-week-line { margin: 0; }
.calm .home-waiting { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: var(--c-accent); color: #fff; font-weight: 600; text-decoration: none; }
.calm .home-waiting:hover { background: var(--c-accent-hover); }
.calm .home-waiting svg { width: 16px; height: 16px; }
.calm .dash.me .is-moved { display: none !important; }
.calm .home-role { margin: 0 0 2px; color: var(--c-ink-2); }
.calm .home-week-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.calm .wk-week h4 { font: 600 13px 'Figtree', 'Noto Sans', sans-serif; margin: 0 0 6px; color: var(--c-ink); }
.calm .wk-grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font-size: 12.5px; }
.calm .wk-grid thead th { font-weight: 500; color: var(--c-muted); text-align: center; padding: 2px 0 4px; }
.calm .wk-grid thead th span { display: block; font-size: 11px; }
.calm .wk-grid thead th:first-child { width: 34%; }
.calm .wk-grid tbody th { text-align: left; font-weight: 500; color: var(--c-ink); padding: 0 6px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calm .wk-grid td { height: 26px; background: #f3efe7; border-radius: 6px; text-align: center; }
.calm .wk-grid .is-today { color: var(--c-accent); font-weight: 600; }
.calm .wk-grid td.is-today { box-shadow: inset 0 0 0 1.5px rgba(21, 109, 153, 0.45); }
.calm .wk-off { display: block; height: 100%; line-height: 26px; border-radius: 6px; background: var(--c-accent-soft); color: var(--c-accent); font-size: 11px; font-weight: 600; }
.calm .wk-none { background: none !important; color: var(--c-muted); text-align: left !important; padding-left: 2px; }
.calm .me-todo.is-done { display: none; }
.calm .home-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.calm .home-row > .dash-panel { margin: 0; }
.calm .home-more > summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; list-style: none; }
.calm .home-more > summary::-webkit-details-marker { display: none; }
.calm .home-more > summary > span:first-child { display: inline-flex; align-items: center; gap: 8px; font: 600 15px 'Figtree', 'Noto Sans', sans-serif; color: var(--c-ink); }
.calm .home-more > summary > span:first-child::after { content: '›'; margin-left: auto; transition: transform 0.2s; font-size: 18px; color: var(--c-muted); }
.calm .home-more[open] > summary > span:first-child::after { transform: rotate(90deg); }
.calm .home-more > summary svg { width: 16px; height: 16px; }
.calm .home-more-body { margin-top: 14px; display: grid; gap: 14px; }
.calm .home-more-body > .dash-panel, .calm .home-more-body > form { margin: 0; }
.calm .home-pair > .dash-panel { margin: 0 0 16px; }
/* A wide screen uses its width: Me grows to 1360px, actions and Asana sit
   side by side, the everyday panels go three across and the folded details
   two across. A hidden panel takes no column, so one panel fills the row. */
@media (min-width: 1280px) {
    .calm .dash.me { max-width: 1360px; }
    .calm .home-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
    .calm .home-pair > .dash-panel { margin: 0; }
    .calm .home-row { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
    .calm .home-more-body { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 760px) {
    .calm .home-week-grid, .calm .home-row { grid-template-columns: minmax(0, 1fr); }
    .calm .wk-grid thead th:first-child { width: 40%; }
    .calm .wk-grid { border-spacing: 2px; }
    .calm .home-wave { height: 22vh; }
}

/* ── The Ops look, after David's "Kokoodi Resource" (7 November 2026) ──────
   A dark sidebar in deep Kokoodi blue that frames every page in the browser
   (not in Teams, which frames the app itself), the current page as a filled
   tab, softer panels that lift a little off the cream, and people shown with
   their initials. Same calm ground and one colour (Kokoodi blue)
   for what you act on. */
/* In the browser only: inside Teams, Teams frames the app and Ops keeps its light sidebar. */
html:not(.in-teams) .calm .sidebar { background: #0f3247; color: #e6eff5; border-right: 0; }
html:not(.in-teams) .calm .sidebar-brand { border-bottom-color: rgba(255, 255, 255, 0.08); }
html:not(.in-teams) .calm .sidebar-title { color: #ffffff; }
html:not(.in-teams) .calm .sidebar-logo, html:not(.in-teams) .calm .sidebar-mark { filter: brightness(0) invert(1); }
html:not(.in-teams) .calm .nav-section { color: #8fb0c2; }
html:not(.in-teams) .calm .nav-item { color: #dbe8f0; }
html:not(.in-teams) .calm .nav-item svg { color: #9db8c8; }
html:not(.in-teams) .calm .nav-group-head { color: #8fb0c2; }
html:not(.in-teams) .calm .nav-group-head:hover { background: rgba(255, 255, 255, 0.07); color: #ffffff; }
html:not(.in-teams) .calm .sidebar .nav-group-head:focus-visible { outline-color: #8fd0f0; }
html:not(.in-teams) .calm .nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #ffffff; }
html:not(.in-teams) .calm .nav-item:hover svg { color: #ffffff; }
html:not(.in-teams) .calm .nav-item.active { background: #1a84b8; color: #ffffff; box-shadow: 0 6px 16px -10px rgba(26, 132, 184, 0.9); }
html:not(.in-teams) .calm .nav-item.active svg { color: #ffffff; opacity: 1; }
html:not(.in-teams) .calm .nav-divider { background: rgba(255, 255, 255, 0.1); }
html:not(.in-teams) .calm .sidebar-footer { border-top-color: rgba(255, 255, 255, 0.08); }
html:not(.in-teams) .calm .sidebar-footer div, html:not(.in-teams) .calm .sidebar-footer span, html:not(.in-teams) .calm .group-line { color: #9db8c8; }
html:not(.in-teams) .calm .sidebar .sidebar-collapse { color: #9db8c8; }
html:not(.in-teams) .calm .sidebar .sidebar-collapse:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
html:not(.in-teams) .calm .sidebar .nav-item:focus-visible, html:not(.in-teams) .calm .sidebar .sidebar-collapse:focus-visible { outline-color: #8fd0f0; }
html.sidebar-collapsed:not(.in-teams) .calm .nav-item[data-badge]::after { box-shadow: 0 0 0 2px #0f3247; }
html.sidebar-collapsed:not(.in-teams) .calm .nav-page-actions,
html.sidebar-collapsed:not(.in-teams) .calm .nav-group:not([hidden]) ~ .nav-group:not([hidden]) { border-top-color: rgba(255, 255, 255, 0.1); }
/* Panels lift a little off the page. */
.calm .dash-panel { border-radius: 16px; border-color: #eee8de; box-shadow: 0 1px 2px rgba(31, 41, 55, 0.04), 0 10px 26px -20px rgba(15, 50, 71, 0.35); }
/* People by their initials (who's off). */
.calm .wk-grid tbody th { display: flex; align-items: center; gap: 8px; height: 26px; }
.calm .wk-av { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 10.5px 'Figtree', 'Noto Sans', sans-serif; color: #1f2937; background: var(--av, #e6f2f8); }
.calm .wk-name { overflow: hidden; text-overflow: ellipsis; }
.calm .wk-av[data-av="0"] { --av: #e6f2f8; } .calm .wk-av[data-av="1"] { --av: #e9f3dc; } .calm .wk-av[data-av="2"] { --av: #f6e7f0; }
.calm .wk-av[data-av="3"] { --av: #ece7fa; } .calm .wk-av[data-av="4"] { --av: #fbf0d4; } .calm .wk-av[data-av="5"] { --av: #e3f1ee; }

/* ── Teams on a phone: no second bottom bar ─────────────────────────────
   Teams' own bar is already at the bottom of the screen, so Ops' tab bar
   stays out of the way there; the menu button at the top opens every page.
   What sat above the tab bar comes down to the edge. */
@media (max-width: 900px) {
    .in-teams .tabbar, .in-teams .more-sheet, .in-teams .more-backdrop { display: none !important; }
    .in-teams .calm .content { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
    .in-teams .calm .card-footer.bulk-bar, .in-teams .lm-bar { bottom: env(safe-area-inset-bottom); }
    .in-teams .kodi-fab { bottom: calc(16px + env(safe-area-inset-bottom)); }
    .in-teams .ab-host { bottom: calc(8px + env(safe-area-inset-bottom)); }
    .in-teams.calm .re-sugg-acts, .in-teams .re-sugg-acts { bottom: calc(12px + env(safe-area-inset-bottom)); }
    .in-teams body.has-assist-bar .kodi-fab { bottom: calc(var(--ab-h, 0px) + 24px + env(safe-area-inset-bottom)); }
}

/* ── A file shown on the page (file-viewer.js) ───────────────────────────
 * PDF pages drawn by PDF.js, a picture, or a Word document's text in a
 * sandboxed frame. The pages sit on the cream ground as white sheets with a
 * hairline: no shadow, no box round them. One scroller: the .fv itself. */
.fv { width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; background: #f4f1eb; position: relative; outline: none; }
.fv:focus-visible { box-shadow: inset 0 0 0 2px var(--c-accent); }
.fv-pages { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; box-sizing: border-box; }
.fv-page { width: 100%; aspect-ratio: 210 / 297; background: #fff; border: 1px solid var(--c-border); border-radius: 2px; overflow: hidden; }
.fv-page canvas { display: block; width: 100%; height: 100%; }
.fv-page-error { padding: 16px; margin: 0; }
.fv-more { text-align: center; margin: 4px 0 8px; }
.fv.is-image .fv-pages { align-items: center; }
.fv-img { display: block; max-width: 100%; height: auto; background: #fff; border: 1px solid var(--c-border); border-radius: 2px; }
.fv.is-html { overflow: hidden; }
.fv.is-html .fv-pages { padding: 0; height: 100%; }
.fv-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.fv-status:empty { display: none; }
.fv-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 20px; text-align: center; }
.fv-sheet { width: min(320px, 80%); aspect-ratio: 210 / 297; background: #fff; border: 1px solid var(--c-border); border-radius: 2px; padding: 22px 20px; box-sizing: border-box; text-align: left; }
.fv-note { margin: 0; color: var(--c-muted); font-size: 13.5px; line-height: 1.5; max-width: 42ch; }
.fv-error > svg { width: 28px; height: 28px; color: var(--c-muted); }
.fv-error-title { margin: 0; font-weight: 600; color: var(--c-ink); }
.fv-error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }

/* The window: wide on a desk, the whole screen on a phone. */
.fv-overlay { z-index: 1050; padding: 20px; }
.fv-overlay .fv-modal { width: min(980px, 100%); max-width: 100%; height: calc(100vh - 40px); height: calc(100dvh - 40px); max-height: none; }
.fv-head { gap: 12px; padding: 14px 18px; }
.fv-title { margin: 0 auto 0 0; font-size: 17px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.fv-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.fv-body { padding: 0; flex: 1; min-height: 0; overflow: hidden; }
@media (max-width: 600px) {
    .fv-overlay { padding: 0; align-items: stretch; }
    .fv-overlay .fv-modal { width: 100%; height: 100%; max-height: none; border-radius: 0; }
    .fv-head { padding: 10px 12px; }
    .fv-title { font-size: 15.5px; }
    .fv-actions .btn span { display: none; }
    .fv-pages { gap: 8px; padding: 8px; }
}
