/* DPDP Connect additions on top of the shared design system (site.css): planned-module markers, the organisation
   switcher, the module roadmap page, MFA setup and the dashboard extras. Uses the same tokens, light and dark. */

.auth2-seal .auth2-check { stroke: var(--primary); fill: none; }

.plain-list { margin: 0; padding-left: 18px; }

/* ---------- Organisation switcher (top bar) */

/* ---------- Planned module page */
.module-hero { display: flex; gap: 18px; align-items: flex-start; }
.module-icon {
    width: 48px; height: 48px; border-radius: 12px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-foreground);
}
.module-icon .icon { width: 24px; height: 24px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon { color: var(--success); flex: none; margin-top: 2px; }
.phase-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.phase-track span { height: 6px; border-radius: 999px; background: var(--surface-2); }
.phase-track span.done { background: var(--primary); }
.phase-track span.next { background: var(--accent); }

/* ---------- MFA setup */
.qr-box {
    width: 196px; height: 196px; padding: 8px; flex: none;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.codes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font-family: var(--mono); font-size: calc(15px * var(--ts)); }
.setup-row { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }

/* ---------- Dashboard extras */
.readiness { display: grid; gap: 12px; }
.readiness-item { display: flex; gap: 12px; align-items: flex-start; }
.activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.activity-list li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.activity-list li:last-child { border-bottom: 0; }
.activity-when { margin-left: auto; white-space: nowrap; }
.mail-body { white-space: pre-wrap; font-family: var(--mono); font-size: calc(14px * var(--ts)); margin: 0; }

/* Six KPI tiles fit on one row at laptop width. */
.dash .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.nav-link { white-space: nowrap; }

/* Audit trail filters: one wrapping row (search grows, the rest keep their size). */
.audit-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.audit-filters > .f-search { flex: 1 1 260px; }
.audit-filters > .combo { flex: 0 0 190px; width: 190px; }
.audit-filters > .dp { flex: 0 0 auto; }

/* ---------- Consent pages */
.issue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.issue-list li { display: flex; gap: 10px; align-items: flex-start; font-size: calc(14px * var(--ts)); }
.issue-list .icon { flex: none; margin-top: 2px; width: 16px; height: 16px; }
.issue-list .error .icon { color: var(--destructive); }
.issue-list .warning .icon { color: var(--warning); }

/* ---------- Banner editor (prototype pages/banner-editor.css): section cards in a main column, a sticky side column with the live preview and publishing. */

/* ---------- Layout ---------- */
.banner-editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.banner-main { gap: 18px; min-width: 0; }
.banner-fields { display: flex; flex-direction: column; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.banner-side {
    position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
    max-height: calc(100dvh - 100px); overflow-y: auto;
    margin: -4px; padding: 4px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.banner-side > .card { padding: 16px 18px; flex: none; }
.banner-side .card-title { font-size: calc(15px * var(--ts)); }
.banner-side > .card > .card-title { margin-bottom: 12px; }
.banner-side .card-head { margin-bottom: 12px; }
.side-note { margin-top: 8px; line-height: 1.45; }

@container page (max-width: 959.98px) {
    .banner-editor { grid-template-columns: minmax(0, 1fr); }
    .banner-side {
        position: static; max-height: none; overflow: visible; margin: 0; padding: 0;
        display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start;
    }
    .banner-side > .side-preview { grid-column: 1 / -1; }
}

/* ---------- Section cards ---------- */
.banner-editor .sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.banner-editor .sec-head .card-title { margin: 0; font-size: calc(17px * var(--ts)); }
.banner-editor .sec-head .chip-icon { width: 36px; height: 36px; border-radius: 11px; }
.banner-editor .sec-head .chip-icon .icon { width: 18px; height: 18px; }
.sec-head-tabs { flex-wrap: wrap; }
.sec-head-tabs .tabs-scroll { margin-left: auto; min-width: 0; max-width: 100%; }
.banner-editor .sec-desc { margin: -4px 0 16px; max-width: 74ch; font-size: calc(13.5px * var(--ts)); line-height: 1.55; color: var(--muted); }
.banner-editor .sec-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.banner-editor .sec-split { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.banner-editor .lang-opts { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }

/* ---------- Option rows with a switch ---------- */
.opt-list { display: grid; gap: 10px; }
.opt {
    display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; min-width: 0;
    border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.opt:hover { border-color: var(--border-strong); }
.opt:has(input:checked) { background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 22%, var(--border)); }
.opt:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.opt-text { display: block; min-width: 0; font-size: calc(13.5px * var(--ts)); font-weight: 550; line-height: 1.5; color: var(--text); }
.opt-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: calc(14px * var(--ts)); font-weight: 650; }
.opt-desc { display: block; margin-top: 3px; font-size: calc(12.5px * var(--ts)); font-weight: 450; line-height: 1.5; color: var(--muted); }
.opt-compact { min-height: 42px; padding: 9px 14px; }
.opt-compact .opt-text { font-size: calc(13px * var(--ts)); font-weight: 450; color: var(--text-2); }
.opt code { white-space: nowrap; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text); }
.opt .switch { align-self: center; }

/* ---------- Languages: selectable chips ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; }
.lang-chip {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; min-width: 0;
    padding: 10px 14px 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
    font-size: calc(13.5px * var(--ts)); font-weight: 600; line-height: 1.3;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.lang-chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.lang-chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.lang-chip:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.lang-name { min-width: 0; overflow-wrap: anywhere; }
.lang-native { justify-self: end; font-size: calc(13px * var(--ts)); font-weight: 500; color: var(--muted); white-space: nowrap; }
.lang-chip:has(input:checked) .lang-native { color: var(--primary-text); }

/* ---------- Text ---------- */
.strings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.strings-grid > .span-2 { grid-column: span 2; }
.str-pair {
    grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px 18px; padding: 14px 16px;
    border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2);
}
.str-pair:first-of-type { margin-top: 8px; }

/* ---------- Look ---------- */
.look-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 18px; }
.look-grid > .l-2 { grid-column: span 2; }
.look-grid > .l-3 { grid-column: span 3; }
.look-grid > .l-6 { grid-column: 1 / -1; }

.colour-field {
    display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 7px; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
.colour-field:hover { border-color: var(--faint); }
.colour-field:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.colour-field input[type="color"] {
    appearance: none; -webkit-appearance: none; width: 30px; height: 30px; padding: 0; margin: 0; flex: none;
    border: 0; border-radius: 9px; background: none; cursor: pointer;
}
.colour-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.colour-field input[type="color"]::-webkit-color-swatch { border: 1px solid var(--border-strong); border-radius: 9px; }
.colour-field input[type="color"]::-moz-color-swatch { border: 1px solid var(--border-strong); border-radius: 9px; }
.colour-field input[type="color"]:focus-visible { outline: none; }
.colour-field .mono { font-size: calc(12.5px * var(--ts)); font-weight: 500; color: var(--text-2); }

/* ---------- Live preview ---------- */
.preview-stage {
    display: flex; flex-direction: column; height: 252px; overflow: hidden;
    border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2);
}
.pv-chrome { display: flex; align-items: center; gap: 10px; flex: none; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface-3); }
.pv-dots { display: inline-flex; gap: 5px; flex: none; }
.pv-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.pv-url { flex: 1 1 auto; min-width: 0; height: 16px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.pv-lang { flex: none; font-size: calc(11px * var(--ts)); font-weight: 650; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.pv-viewport { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.pv-page { position: absolute; inset: 16px 16px auto 16px; display: grid; gap: 9px; opacity: .7; }
.pv-page span { height: 8px; border-radius: 4px; background: var(--border); }
.pv-page span:nth-child(1) { width: 52%; height: 13px; background: var(--border-strong); }
.pv-page span:nth-child(2) { width: 100%; }
.pv-page span:nth-child(3) { width: 84%; }
.pv-page span:nth-child(4) { width: 40%; }
.pv-page::after { content: ""; height: 54px; margin-top: 6px; border-radius: 10px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--hairline); }
.pv-viewport:has([data-layout="modal-center"])::before { content: ""; position: absolute; inset: 0; background: rgba(12, 11, 18, .4); }

/* The banner itself is user-configured: colours, radius and font come from the form (inline, set by widgets.js). */
.pv-banner { position: absolute; z-index: 1; display: grid; gap: 7px; max-height: calc(100% - 16px); overflow: auto; scrollbar-width: none; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .22); }
.pv-banner[data-layout="bar-bottom"] { left: 8px; right: 8px; bottom: 8px; }
.pv-banner[data-layout="bar-top"] { left: 8px; right: 8px; top: 8px; }
.pv-banner[data-layout="box-left"] { left: 8px; bottom: 8px; width: 66%; }
.pv-banner[data-layout="box-right"], .pv-banner[data-layout="slide-in"] { right: 8px; bottom: 8px; width: 66%; }
.pv-banner[data-layout="modal-center"] { left: 10%; right: 10%; top: 50%; transform: translateY(-50%); }
.pv-title { font-weight: 650; line-height: 1.3; }
.pv-desc { opacity: .85; font-size: .9em; line-height: 1.45; }
.pv-desc:empty, .pv-link:empty { display: none; }
.pv-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-btn { padding: 5px 11px; font-size: .85em; font-weight: 600; line-height: 1.3; border: 1px solid currentColor; background: transparent; color: inherit; border-radius: inherit; cursor: default; }
.pv-btn.primary { color: #fff; }
.pv-link { font-size: .82em; text-decoration: underline; opacity: .8; }

/* ---------- Side cards ---------- */
.side-checks .alert { padding: 10px 12px; font-size: calc(13px * var(--ts)); line-height: 1.45; }
.side-publish .stack { gap: 10px; }
.banner-side .activity-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; border-top: 1px solid var(--hairline); }
.banner-side .activity-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0 0; }
.banner-side .activity-list li > div { flex: 1; min-width: 0; }
.banner-side .activity-list .badge { flex: none; }
.banner-side .activity-when { margin-left: auto; white-space: nowrap; }

.banner-side .check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.banner-side .check-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
.banner-side .check-list li > .icon { width: 30px; height: 30px; padding: 7px; border-radius: 10px; background: var(--primary-soft-2); color: var(--primary-text); }
.banner-side .check-list li > span { min-width: 0; line-height: 1.45; overflow-wrap: anywhere; }
.banner-side .check-list a { font-weight: 600; }
.banner-side .check-list li > span > span { color: var(--muted); }
.banner-side .check-list li > span > span a { font-weight: 500; }
.banner-side .check-list li > span > span .icon { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; }
.side-archive { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--hairline); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    .banner-fields, .banner-main { gap: 14px; }
    .banner-editor .card, .banner-side > .card { padding: 18px 16px; }
    .banner-side { grid-template-columns: minmax(0, 1fr); }
    .strings-grid { grid-template-columns: minmax(0, 1fr); }
    .strings-grid > .span-2 { grid-column: auto; }
    .str-pair { grid-template-columns: minmax(0, 1fr); padding: 14px; }
    .look-grid { grid-template-columns: minmax(0, 1fr); }
    .look-grid > .l-2, .look-grid > .l-3, .look-grid > .l-6 { grid-column: auto; }
    .lang-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
    .lang-chip { grid-template-columns: auto minmax(0, 1fr); }
    .lang-native { grid-column: 2; justify-self: start; }
    .opt { padding: 13px 14px; gap: 14px; }
    .sec-head-tabs .tabs-scroll { flex: 1 1 100%; margin-left: 0; }
    .preview-stage { height: 276px; }
}

/* ---------- Public rights portal */
.portal { min-height: 100vh; display: flex; flex-direction: column; background: var(--background); }
.portal .honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* The organisation's bar: its initial, its name, and the two things a visitor comes to do. */
.portal-bar { background: var(--card); border-bottom: 1px solid var(--border); }
.portal-bar-inner { max-width: 1200px; margin: 0 auto; min-height: 72px; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.portal-org { display: flex; align-items: center; gap: 14px; min-width: 0; }
.portal-mark { flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--foreground); color: var(--background); font-weight: 700; font-size: calc(17px * var(--ts)); }
.portal-org-name { font-size: calc(17px * var(--ts)); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.portal-org-sub { font-size: calc(14px * var(--ts)); color: var(--muted-foreground); }
.portal-bar-end { display: flex; align-items: center; gap: 8px; }
.portal-tabs { display: flex; gap: 4px; }
.portal-tabs a { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: var(--radius-sm); color: var(--sidebar-foreground); font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
.portal-tabs a:hover { background: var(--surface-2); color: var(--foreground); }
.portal-tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-foreground); }
.portal-main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 40px 32px 56px; display: grid; gap: 16px; align-content: start; }
.portal-foot { margin-top: auto; border-top: 1px solid var(--border); padding: 20px 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; font-size: calc(14px * var(--ts)); color: var(--muted-foreground); }

/* Page grid: the work on the left, a summary that stays in view on the right. */
.pt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px 56px; align-items: start; }
.pt-main { min-width: 0; }
.pt-narrow { max-width: 760px; display: grid; gap: 16px; }
.pt-title { font-size: 30px; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; margin: 0 0 8px; text-wrap: balance; }
.pt-narrow .pt-title { margin: 0; }
.pt-lead { color: var(--muted-foreground); max-width: 64ch; margin: 0 0 28px; }
.pt-narrow .pt-lead { margin: 0 0 8px; }
.pt-lead a { white-space: nowrap; }

/* Numbered sections: an ink circle, then the section's work. Done steps turn blue with a tick. */
.pt-sec { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 18px; padding: 24px 0 28px; margin: 0; border: 0; border-top: 1px solid var(--border); min-width: 0; }
.pt-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--foreground); color: var(--background); font-weight: 600; font-size: calc(14px * var(--ts)); font-variant-numeric: tabular-nums; }
.pt-num svg { width: 16px; height: 16px; }
.pt-sec.is-done .pt-num { background: var(--primary); color: var(--primary-foreground); }
.pt-sec.is-now .pt-num { box-shadow: 0 0 0 5px var(--accent-soft); }
.pt-sec.is-waiting .pt-num { background: var(--card); color: var(--subtle); box-shadow: inset 0 0 0 2px var(--border); }
.pt-sec.is-waiting .pt-sec-title { color: var(--muted-foreground); }
.pt-sec-body { min-width: 0; display: grid; gap: 12px; align-content: start; }
.pt-sec-title { font-size: calc(17px * var(--ts)); font-weight: 600; letter-spacing: -.01em; margin: 4px 0 2px; }
.pt-help { color: var(--muted-foreground); font-size: calc(14px * var(--ts)); margin: 0; max-width: 64ch; }
.pt-sec-body > .field-hint { margin: -6px 0 0; }
.pt-optional { font-weight: 400; color: var(--muted-foreground); }
.portal textarea.input { height: auto; min-height: 132px; padding-top: 10px; padding-bottom: 10px; resize: vertical; }
.pt-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .8fr); gap: 14px; }
.pt-inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pt-inline-form .field { flex: 1 1 280px; max-width: 420px; }
.pt-code { font-family: var(--mono); font-size: calc(17px * var(--ts)); letter-spacing: .3em; max-width: 220px; }
.pt-done-line { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; overflow-wrap: anywhere; }

/* Request types as pills. The chosen one takes the selection blue. */
.pt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-choice { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.pt-choice-label { padding: 0; margin-bottom: 8px; font-weight: 500; }
.pt-contact-form { display: grid; gap: 14px; }
.pt-pill { position: relative; display: inline-flex; }
.pt-pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pt-pill span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); font-weight: 500; transition: background .15s, border-color .15s, color .15s; }
.pt-pill:hover span { border-color: var(--input); }
.pt-pill input:checked + span { background: var(--accent-soft); border-color: var(--primary); color: var(--accent-foreground); }
.pt-pill input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
.pt-declare { display: flex; gap: 12px; align-items: flex-start; font-size: calc(15px * var(--ts)); cursor: pointer; margin-top: 12px; max-width: 64ch; }
.pt-declare .cb { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--primary); }

/* Plain blocks for signed-in pages, separated by hairlines rather than boxed. */
.pt-block { display: grid; gap: 12px; padding: 24px 0; border-top: 1px solid var(--border); min-width: 0; }
.pt-block:first-of-type { padding-top: 0; border-top: 0; }
.pt-block-title { font-size: calc(17px * var(--ts)); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.pt-block > p { margin: 0; }
.pt-pre { white-space: pre-wrap; }

/* The summary card: what you are sending or holding, what happens next, and the one main action. */
.pt-side { position: sticky; top: 24px; }
.pt-summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; display: grid; gap: 16px; }
.pt-summary-title { font-size: calc(17px * var(--ts)); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.pt-dl { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px 12px; margin: 0; font-size: calc(14px * var(--ts)); }
.pt-dl dt { color: var(--muted-foreground); }
.pt-dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.pt-dl dd.is-empty { color: var(--subtle); font-weight: 400; }
.pt-next { background: var(--accent-soft); color: var(--foreground); border-radius: 12px; padding: 14px 16px; }
.pt-next h3 { font-size: calc(14px * var(--ts)); font-weight: 600; color: var(--accent-foreground); margin: 0 0 6px; }
.pt-next ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: calc(14px * var(--ts)); }
.pt-due { font-size: calc(17px * var(--ts)); font-weight: 600; margin: 0; color: var(--accent-foreground); font-variant-numeric: tabular-nums; }
.pt-send { width: 100%; height: 46px; }
.pt-contact { font-size: calc(14px * var(--ts)); color: var(--muted-foreground); margin: 0; overflow-wrap: anywhere; }
.pt-who { margin: -8px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.pt-actions { display: grid; gap: 8px; }
.pt-actions .btn, .pt-actions form .btn { width: 100%; }
.pt-dl-wide { grid-template-columns: 96px minmax(0, 1fr); }
.pt-dl-wide dd { font-weight: 400; }

@media (max-width: 1023.98px) {
    .pt-layout { grid-template-columns: minmax(0, 1fr); }
    .pt-side { position: static; }
}
@media (max-width: 767.98px) {
    .portal-bar-inner { padding: 12px 16px; }
    .portal-bar-end { width: 100%; justify-content: space-between; }
    .portal-tabs a { padding: 0 12px; }
    .portal-main { padding: 24px 16px 40px; }
    .portal-foot { padding: 18px 16px; justify-content: flex-start; }
    .pt-title { font-size: 26px; }
    .pt-fields { grid-template-columns: minmax(0, 1fr); }
    /* On phones the number sits beside the title, so fields and pills get the full width. */
    .pt-sec { grid-template-columns: minmax(0, 1fr); position: relative; }
    .pt-num { position: absolute; left: 0; top: 24px; width: 28px; height: 28px; }
    .pt-sec-title { margin: 0; min-height: 28px; display: flex; align-items: center; padding-left: 40px; }
    .pt-pill span { white-space: nowrap; padding: 0 14px; }
}
/* ---------- Case pages (rights, incidents) */
@container page (max-width: 879.98px) { .case-grid { grid-template-columns: 1fr; } .case-side { position: static; } }
.draft-box { white-space: pre-wrap; font: calc(14px * var(--ts))/1.55 var(--mono); background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; max-height: 320px; overflow: auto; }
@media print {
    .sidenav, .topbar, .no-print, .actions { display: none !important; }
    .main, .content { margin: 0 !important; padding: 0 !important; }
}

/* Live updates */
.live-wrap { position: relative; }
.live-item { color: inherit; text-decoration: none; }
.live-refresh { display: block; width: 100%; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--accent); font: inherit; font-size: calc(14px * var(--ts)); font-weight: 600; cursor: pointer; }
.live-pulse { animation: live-pulse .9s ease-out; }
@keyframes live-pulse { 0% { color: var(--accent); } 100% { color: inherit; } }
@media (prefers-reduced-motion: reduce) { .live-pulse { animation: none; } }

/* ---------- Layout fixes across pages */

/* Filter rows stay on one line when they fit and wrap when they don't. Every control grows, so each row, the wrapped one too,
   fills the bar's width evenly instead of leaving a gap at the end. Search takes a double share; buttons keep their size. */
.filter-bar.filter-bar-wrap { flex-wrap: wrap; }
.filter-bar.filter-bar-wrap > .f-search { flex: 2 1 280px; max-width: none; min-width: 0; }
.filter-bar.filter-bar-wrap > .combo, .filter-bar.filter-bar-wrap > .select { flex: 1 1 145px; width: auto; max-width: none; min-width: 0; }
.filter-bar.filter-bar-wrap > .dp { flex: 1 1 120px; }
.filter-bar.filter-bar-wrap > .btn { flex: none; }

/* A bar too long for one row splits into balanced rows, so no single control is left alone on the last row to stretch
   across it. The split depends on how many controls the bar has (counted with :has) and on the page's content width.
   The first row's shares add up to just under the full width, which is what pushes the next control down. */
/* Eight controls (consent register): search + three menus, then the fourth menu + both dates + the button. */
@container page (min-width: 680px) and (max-width: 1269.98px) {
    .filter-bar.filter-bar-wrap:has(> :nth-child(8):last-child) > :first-child { flex: 2 1 calc((100% - 30px) * .39); }
    .filter-bar.filter-bar-wrap:has(> :nth-child(8):last-child) > :nth-child(n+2):nth-child(-n+4) { flex: 1 1 calc((100% - 30px) * .2); }
    .filter-bar.filter-bar-wrap:has(> :nth-child(8):last-child) > :nth-child(n+5):not(.btn) { flex: 1 1 24%; }
}
/* Six controls (audit trail, cookie register): search + two, then the other three. */
@container page (min-width: 560px) and (max-width: 1049.98px) {
    .filter-bar.filter-bar-wrap:has(> :nth-child(6):last-child) > :first-child { flex: 2 1 calc((100% - 20px) * .48); }
    .filter-bar.filter-bar-wrap:has(> :nth-child(6):last-child) > :nth-child(2), .filter-bar.filter-bar-wrap:has(> :nth-child(6):last-child) > :nth-child(3) { flex: 1 1 calc((100% - 20px) * .255); }
    .filter-bar.filter-bar-wrap:has(> :nth-child(6):last-child) > :nth-child(n+4):not(.btn) { flex: 1 1 30%; }
}
/* Five or four controls: search takes the first row, the menus and the button share the second. */
@container page (max-width: 894.98px) {
    .filter-bar.filter-bar-wrap:has(> :nth-child(5):last-child) > .f-search { flex: 1 1 100%; }
}
@container page (max-width: 808.98px) {
    .filter-bar.filter-bar-wrap:has(> :nth-child(4):last-child):not(:has(> .btn)) > .f-search { flex: 1 1 100%; }
}
@container page (max-width: 739.98px) {
    .filter-bar.filter-bar-wrap:has(> :nth-child(4):last-child):has(> .btn) > .f-search { flex: 1 1 100%; }
}
/* Narrower still: search on its own row, menus two to a row, then the dates and the button. A button that would be
   left alone after the menus fills its row. */
@container page (max-width: 679.98px) {
    .filter-bar.filter-bar-wrap:has(> :nth-child(8):last-child) > .f-search { flex: 1 1 100%; }
    .filter-bar.filter-bar-wrap:has(> :nth-child(8):last-child) > :is(.combo, .select) { flex: 1 1 calc(50% - 5px); }
}
@container page (max-width: 559.98px) {
    .filter-bar.filter-bar-wrap:has(> :nth-child(6):last-child) > .f-search { flex: 1 1 100%; }
    .filter-bar.filter-bar-wrap:has(> :nth-child(6):last-child) > :is(.combo, .select) { flex: 1 1 calc(50% - 5px); }
    .filter-bar.filter-bar-wrap:has(> :nth-child(6):last-child) > :is(.combo, .select) + .btn { flex: 1 1 100%; }
    .filter-bar.filter-bar-wrap:has(> :nth-child(5):last-child) > :is(.combo, .select) { flex: 1 1 calc(50% - 5px); }
}
/* Phones: the button ends the bar as a full row instead of sitting alone at the left. */
@container page (max-width: 419.98px) {
    .filter-bar.filter-bar-wrap > .btn { flex: 1 1 100%; }
}

@media (max-width: 767.98px) {
    .filter-bar.filter-bar-wrap > .f-search { flex: 1 1 100%; }
    .filter-bar.filter-bar-wrap > .combo { flex: 1 1 calc(50% - 5px); width: auto; max-width: none; }
}

@media (max-width: 479.98px) {
    .filter-bar.filter-bar-wrap > .combo, .filter-bar.filter-bar-wrap > .dp { flex: 1 1 100%; width: auto; }
}

/* Page headings: words on the left, actions on the right. The description stays a readable width. */
@media (min-width: 768px) {
    .page-head { flex-wrap: nowrap; align-items: flex-end; }
    .page-head > :first-child { flex: 1 1 auto; min-width: 0; }
    .page-head > .actions { flex: none; justify-content: flex-end; max-width: 55%; }
}


/* Summary tiles (.stat-row) are the stat cards in site.css. */

/* Card grids: a card is as tall as its content, and a last card on its own takes the full width. */
.grid-2 { align-items: start; }
.grid-2 > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* A sticky header inside its own scrolling wrapper sits at the wrapper's top. */
.table-wrap .data-table thead th { top: 0; }

/* Long column lists wrap; references elsewhere stay on one line. */
.table .cell-meta.mono { white-space: normal; overflow-wrap: anywhere; }

/* A long deadline note wraps, so the Rights table fits a small laptop. The date under it stays on one line. */
.data-table td[data-label="Deadline"].nowrap { white-space: normal; min-width: 170px; }
.data-table td[data-label="Deadline"] .cell-meta { white-space: nowrap; }

/* Grid tracks may shrink, so wide tables scroll inside their own wrapper. */
@container page (max-width: 879.98px) {
    .case-grid { grid-template-columns: minmax(0, 1fr); }
}

.case-side { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.roles-grid { min-width: 0; }

@media (max-width: 1023.98px) {
    .roles-grid { grid-template-columns: minmax(0, 1fr); }
}

.row > .file-field { flex: 1 1 100%; min-width: 0; }
.file-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Tabs stay on one line and scroll, instead of sometimes wrapping and sometimes clipping. */
.tabs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
/* Top bar: the notification count sits on the bell's corner, not over it. Icon buttons keep their size. */
@media (max-width: 479.98px) {
    .crumb-parent { display: none; }
}

/* Portal pages have short tables in a scrolling page, so headings stay with their table. */
.portal-main .data-table thead, .portal-main .data-table thead th { position: static; top: auto; }

/* Tables with long text wrap inside the page instead of widening it. */
.wrap-table td { white-space: normal; }

/* ---------- Incident form (Incidents/Edit): one sheet of sections beside a sticky clock preview. */
.inc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.inc-main { min-width: 0; container-type: inline-size; }
.inc-sheet { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.inc-sec { display: grid; gap: 18px; padding: 24px; border-top: 1px solid var(--border); min-width: 0; }
.inc-sec:first-child { border-top: 0; }
.inc-sec-title { font-size: calc(17px * var(--ts)); font-weight: 600; letter-spacing: -.01em; line-height: 1.4; margin: 0; }
.inc-sec-help { font-size: calc(14px * var(--ts)); color: var(--muted-foreground); margin: 4px 0 0; max-width: 46ch; text-wrap: pretty; }
.inc-sec-body { display: grid; gap: 18px; min-width: 0; align-content: start; }
.inc-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.inc-narrow { max-width: 260px; }
.inc-opt { font-weight: 400; color: var(--muted-foreground); margin-left: 4px; }
.inc-sheet .field-label { display: block; }

@container (min-width: 760px) {
    .inc-sec { grid-template-columns: 210px minmax(0, 1fr); gap: 40px; padding: 28px 32px; }
}
@container (max-width: 559.98px) {
    .inc-pair { grid-template-columns: minmax(0, 1fr); }
    .inc-narrow { max-width: none; }
}

/* Severity: a segmented control; the dots match the incident list badges. */
.inc-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.inc-legend { padding: 0; margin: 0 0 6px; font-size: calc(var(--fs-label) * var(--ts)); font-weight: 500; color: var(--foreground); }
.inc-seg { display: inline-grid; grid-template-columns: repeat(4, auto); gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 10px; }
.inc-seg-opt { position: relative; display: flex; }
.inc-seg-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.inc-seg-opt span { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border-radius: 7px; font-size: calc(15px * var(--ts)); font-weight: 500; color: var(--muted-foreground); transition: background .15s, color .15s, box-shadow .15s; }
.inc-seg-opt:hover span { color: var(--foreground); }
.inc-seg-opt input:checked + span { background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgba(22, 24, 29, .08), 0 0 0 1px var(--border); }
.inc-seg-opt input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 1px; }
.inc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.inc-dot-grey { background: var(--subtle); }
.inc-dot-amber { background: var(--warning); }
.inc-dot-red { background: var(--destructive); }
@container (max-width: 559.98px) {
    .inc-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reporting duties: whole-row toggles that say what they start. */
.inc-flag { display: flex; align-items: flex-start; gap: 20px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.inc-flag:hover { border-color: var(--input); }
.inc-flag:has(input:checked) { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); background: color-mix(in srgb, var(--accent-soft) 45%, var(--card)); }
.inc-flag input { margin-top: 2px; }
.inc-flag-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.inc-flag-title { font-size: calc(15px * var(--ts)); font-weight: 600; color: var(--foreground); }
.inc-flag-desc { font-size: calc(14px * var(--ts)); line-height: 1.5; color: var(--muted-foreground); max-width: 68ch; }
.inc-drill { display: flex; align-items: flex-start; gap: 12px; font-size: calc(14px * var(--ts)); line-height: 1.5; color: var(--muted-foreground); cursor: pointer; padding: 2px 2px 0; }
.inc-drill strong { color: var(--foreground); font-weight: 600; }
.inc-drill .cb { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); }

/* Timeline: the four times on one rail, in the order they happen, with the clock start marked. */
.inc-tl { list-style: none; margin: 0; padding: 0; display: grid; --dot-y: 50%; }
.inc-tl-row { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(210px, 250px); gap: 0 16px; align-items: center; padding: 12px 0; }
.inc-tl-row::before { content: ''; position: absolute; left: 9.5px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.inc-tl-row:first-child::before { top: var(--dot-y); }
.inc-tl-row:last-child::before { bottom: auto; height: var(--dot-y); }
.inc-tl-dot { position: relative; z-index: 1; justify-self: center; width: 11px; height: 11px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--input); }
.inc-tl-row.is-start .inc-tl-dot { background: var(--primary); box-shadow: 0 0 0 4px var(--accent-soft); }
.inc-tl-text { min-width: 0; }
.inc-tl-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: calc(15px * var(--ts)); font-weight: 500; color: var(--foreground); }
.inc-tl-label .inc-opt { margin-left: 0; font-size: calc(14px * var(--ts)); }
.inc-tl-hint { margin: 2px 0 0; font-size: calc(14px * var(--ts)); line-height: 1.45; color: var(--muted-foreground); max-width: 48ch; }
.inc-tl-input, .inc-tl-row > .dp { width: 100%; font-variant-numeric: tabular-nums; }
@container (max-width: 619.98px) {
    .inc-tl { --dot-y: 17px; }
    .inc-tl-row { grid-template-columns: 20px minmax(0, 1fr); align-items: start; }
    .inc-tl-dot { margin-top: 11.5px; }
    .inc-tl-input, .inc-tl-row > .dp { grid-column: 2; margin-top: 10px; }
}

/* The clock preview: what logging the incident starts, and when each clock falls due. */
.inc-side { position: sticky; top: 88px; min-width: 0; }
.inc-summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; display: grid; gap: 18px; }
.inc-summary-title { font-size: calc(17px * var(--ts)); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.inc-summary-sub { font-size: calc(14px * var(--ts)); color: var(--muted-foreground); margin: 4px 0 0; }
.inc-clocks { list-style: none; margin: 0; padding: 0; display: grid; }
.inc-clock { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.inc-clock:first-child { border-top: 0; padding-top: 0; }
.inc-clock:last-child { padding-bottom: 0; }
.inc-clock-mark { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--border); }
.inc-clock.is-on .inc-clock-mark { background: var(--primary); }
.inc-clock-main { display: grid; gap: 2px; min-width: 0; }
.inc-clock-name { font-size: calc(14px * var(--ts)); font-weight: 500; line-height: 1.45; color: var(--foreground); }
.inc-clock-meta, .inc-clock-why { font-size: calc(14px * var(--ts)); line-height: 1.45; color: var(--muted-foreground); }
.inc-clock.is-on .inc-clock-why { display: none; }
.inc-clock-at { font-size: calc(14px * var(--ts)); font-weight: 600; line-height: 1.45; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--foreground); }
.inc-clock:not(.is-on) .inc-clock-name { color: var(--muted-foreground); }
.inc-clock:not(.is-on) .inc-clock-at { font-weight: 500; color: var(--muted-foreground); }
.inc-note { font-size: calc(14px * var(--ts)); line-height: 1.5; color: var(--muted-foreground); margin: 0; padding-top: 14px; border-top: 1px solid var(--border); }
.inc-drill-note { font-size: calc(14px * var(--ts)); line-height: 1.5; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); }
.inc-actions { display: grid; gap: 8px; }
.inc-actions .btn { width: 100%; }
.inc-submit { height: 46px; }

@media (max-width: 1023.98px) {
    .inc-layout { grid-template-columns: minmax(0, 1fr); }
    .inc-side { position: static; }
}

/* ---------- Domain overview (prototype pages/domain.css): status strip, settings sections as cards, switch rows, code blocks with copy, "Your data" preview. */
.dom-page { gap: 20px; }
.dom-page fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.dom-page legend { padding: 0; }
.dom-overview { gap: 20px; }

/* ---------- Tab bar ---------- */
.dom-tabbar { min-width: 0; }

/* ---------- Status strip ---------- */
/* The cards share one row when there is room. When there isn't, they regroup into full rows (five cards go 3 + 2, four go
   2 + 2) rather than dropping one card to a row of its own and stretching it. Widths are the page's content width. */
.dom-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; }
@container page (min-width: 560px) and (max-width: 1039.98px) {
    .dom-strip { grid-auto-flow: row; grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .dom-strip > .dom-stat { grid-column: span 2; }
    .dom-strip:has(> :nth-child(5):last-child) > :nth-child(n+4),
    .dom-strip:has(> :nth-child(4):last-child) > .dom-stat { grid-column: span 3; }
}
@container page (max-width: 559.98px) {
    .dom-strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dom-strip > .dom-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.dom-stat {
    flex: 1 1 188px; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px 15px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.dom-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dom-stat-label { font-size: calc(13px * var(--ts)); font-weight: 550; color: var(--muted); line-height: 1.3; }
.dom-stat-value {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 30px;
    font-size: calc(17px * var(--ts)); font-weight: 650; letter-spacing: -.015em; line-height: 1.3; overflow-wrap: anywhere;
}
.dom-stat-value a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-decoration-thickness: 1.5px; }
.dom-stat-value a:hover { color: var(--primary-text); text-decoration-color: currentColor; }
.dom-stat-meta { font-size: calc(12.5px * var(--ts)); line-height: 1.45; color: var(--muted); }
.dom-stat-meta.is-warn { color: var(--warning-text); }
.dom-live { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.dom-live.is-on { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); animation: dom-pulse 2.4s ease-out infinite; }
@keyframes dom-pulse { 0%, 100% { box-shadow: 0 0 0 3px var(--success-soft); } 50% { box-shadow: 0 0 0 6px transparent; } }

/* ---------- Sections (cards) ---------- */
.dom-main { min-width: 0; container-type: inline-size; display: flex; flex-direction: column; gap: 20px; }
.dom-sec { display: grid; gap: 22px; padding: 24px 26px 26px; }
.dom-sec-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; align-items: start; min-width: 0; }
.dom-sec-icon { width: 38px; height: 38px; border-radius: 12px; }
.dom-sec-icon .icon { width: 19px; height: 19px; }
.dom-sec-text { min-width: 0; }
.dom-sec-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 38px; font-size: calc(17px * var(--ts)); font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.dom-sec-help { margin-top: 2px; max-width: 88ch; font-size: calc(13.5px * var(--ts)); line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.dom-sec-body { display: grid; gap: 16px; min-width: 0; align-content: start; }
.dom-state { font-size: calc(12px * var(--ts)); letter-spacing: 0; }

/* Section with a "what visitors see" preview beside its settings */
@container (min-width: 880px) {
    .dom-sec-aside { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 28px; }
    .dom-sec-aside > .dom-sec-head { grid-column: 1 / -1; }
    .dom-sec-aside > .dom-aside { align-self: start; position: sticky; top: 88px; }
}

/* ---------- Notes, inline code ---------- */
.dom-note { max-width: 78ch; font-size: calc(13.5px * var(--ts)); line-height: 1.6; color: var(--muted); }
.dom-note strong { color: var(--text); font-weight: 650; }
.dom-note code, .dom-note .mono, .dom-opt-desc code, .dom-sec-help code {
    padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text); font-size: .9em; overflow-wrap: anywhere;
}
.dom-page .inc-opt {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 6px; border-radius: var(--r-pill);
    background: var(--surface-3); color: var(--muted); font-size: calc(11.5px * var(--ts)); font-weight: 600; vertical-align: 1px;
}

/* ---------- Code blocks (dark, with the copy button in the header) ---------- */
.dom-code { --code-bg: var(--ink-900); --code-line: var(--ink-700); min-width: 0; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--code-line); background: var(--code-bg); }
:root[data-theme="dark"] .dom-code { --code-bg: var(--ink-950); --code-line: var(--border); }
.dom-code-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px;
    border-bottom: 1px solid var(--hero-line); font-size: calc(12.5px * var(--ts)); font-weight: 600; color: var(--hero-muted);
}
.dom-code-head > span { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.dom-code-head > span::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.dom-code-head .btn { flex: none; height: 30px; background: var(--hero-glass); border-color: var(--hero-line); color: var(--hero-text); box-shadow: none; }
.dom-code-head .btn:hover { background: color-mix(in srgb, var(--hero-text) 16%, transparent); border-color: var(--hero-line); }
.dom-code-body {
    margin: 0; padding: 14px 16px 16px; font: calc(12.5px * var(--ts))/1.7 var(--mono); tab-size: 2; color: var(--hero-text);
    white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---------- A linked thing (banner, verified site) ---------- */
.dom-item {
    display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 16px;
    border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2);
}
.dom-item-icon { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft-2); color: var(--primary-text); }
.dom-item-icon .icon { width: 20px; height: 20px; }
.dom-item-icon.is-ok { background: var(--success-soft); color: var(--success-text); }
.dom-item-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.dom-item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: calc(14.5px * var(--ts)); font-weight: 650; line-height: 1.4; }
.dom-item-meta { font-size: calc(13px * var(--ts)); line-height: 1.45; color: var(--muted); }
.dom-item-actions { flex: none; display: flex; gap: 8px; }

.dom-callout {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--info) 18%, transparent); border-radius: var(--r-md);
    background: var(--info-soft); color: var(--info-text);
}
.dom-callout > .icon { grid-row: 1 / span 2; margin-top: 2px; }
.dom-callout > p { font-size: calc(13.5px * var(--ts)); line-height: 1.6; }
.dom-callout > form { grid-column: 2; justify-self: start; margin: 0; }

/* ---------- Settings forms ---------- */
.dom-form { display: grid; min-width: 0; }
.dom-fieldset { display: grid; gap: 20px; }
.dom-opt { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.dom-opt-text { display: grid; gap: 3px; min-width: 0; }
.dom-opt-title { font-size: calc(14.5px * var(--ts)); font-weight: 650; line-height: 1.4; }
.dom-opt-desc { max-width: 68ch; font-size: calc(13px * var(--ts)); font-weight: 450; line-height: 1.55; color: var(--muted); }
.dom-opt-aside { font-weight: 450; color: var(--muted); }
.dom-opt-master {
    padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2);
    transition: border-color .15s, background-color .15s;
}
.dom-opt-master:hover { border-color: var(--border-strong); }
.dom-opt-master:has(input[type="checkbox"]:checked) { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); background: var(--primary-soft); }
.dom-opt-master:has(:focus-visible) { box-shadow: var(--ring); }
.dom-dependent { display: grid; gap: 20px; min-width: 0; transition: opacity .15s; }
.dom-fieldset:has(> .dom-opt-master [data-dom-master]:not(:checked)) > .dom-dependent { opacity: .55; }
.dom-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; align-items: start; }
.dom-pair .field-label { display: block; }

.dom-opts { display: grid; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.dom-opts .dom-opt { padding: 15px 18px; }
.dom-opts .dom-opt + .dom-opt { border-top: 1px solid var(--hairline); }

.dom-form-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
    margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--hairline);
}
.dom-form-foot .dom-note { flex: 1 1 280px; }
.dom-form-foot .btn { margin-left: auto; }

.dom-group { display: block; }
.dom-group > legend { margin: 0 0 10px; font-size: calc(13px * var(--ts)); font-weight: 600; }
.dom-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.dom-check {
    display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 13px 14px; cursor: pointer;
    border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
    transition: border-color .15s, background-color .15s;
}
.dom-check:hover { border-color: var(--border-strong); }
.dom-check:has(input:checked) { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--primary-soft); }
.dom-check:has(:focus-visible) { box-shadow: var(--ring); }
.dom-check .cb { margin-top: 1px; }
.dom-check-text { display: grid; gap: 2px; min-width: 0; }
.dom-check-name { font-size: calc(13.5px * var(--ts)); font-weight: 600; line-height: 1.4; }
.dom-check-hint { font-size: calc(12.5px * var(--ts)); line-height: 1.4; color: var(--muted); }

.dom-links { display: grid; gap: 10px; }
.dom-link-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 10px; }
.dom-link-row[hidden], .dom-add[hidden] { display: none; }
.dom-add { margin-top: 12px; border: 1px dashed var(--border-strong); color: var(--text-2); }
.dom-add:hover { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }

/* ---------- Expandable extras ---------- */
.dom-disclosure { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.dom-disclosure > summary {
    display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--r-md);
    font-size: calc(14px * var(--ts)); font-weight: 650; list-style: none; user-select: none; transition: background-color .15s;
}
.dom-disclosure > summary::-webkit-details-marker { display: none; }
.dom-disclosure > summary:hover { background: var(--surface-2); }
.dom-disclosure > summary > .icon { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); transition: transform .18s, background-color .15s; }
.dom-disclosure[open] > summary { border-bottom: 1px solid var(--hairline); border-radius: var(--r-md) var(--r-md) 0 0; }
.dom-disclosure[open] > summary > .icon { transform: rotate(90deg); background: var(--primary-soft-2); color: var(--primary-text); }
.dom-disclosure-body { display: grid; gap: 16px; min-width: 0; padding: 18px; }

.dom-attrs {
    display: grid; grid-template-columns: max-content minmax(0, 1fr); padding: 0 16px;
    border: 1px solid var(--hairline); border-radius: var(--r-md); font-size: calc(13.5px * var(--ts)); line-height: 1.55;
}
.dom-attrs dt, .dom-attrs dd { padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.dom-attrs dt { padding-right: 28px; font-family: var(--mono); font-size: calc(12.5px * var(--ts)); font-weight: 500; color: var(--primary-text); overflow-wrap: anywhere; }
.dom-attrs dd { color: var(--text-2); overflow-wrap: anywhere; }
.dom-attrs dt:last-of-type, .dom-attrs dd:last-of-type { border-bottom: 0; }

/* ---------- "Your data" preview ---------- */
.dom-aside {
    display: grid; gap: 14px; min-width: 0; align-content: start; padding: 18px; border-radius: var(--r-lg);
    background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
}
.dom-preview-label { font-size: calc(11.5px * var(--ts)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-text); }
.dom-preview { padding: 16px 16px 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.dom-preview-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 12px; }
.dom-preview-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-soft-2); color: var(--primary-text); }
.dom-preview-icon .icon { width: 19px; height: 19px; }
.dom-preview-title { font-size: calc(14.5px * var(--ts)); font-weight: 700; line-height: 1.35; }
.dom-preview-sub { margin-top: 2px; font-size: calc(12.5px * var(--ts)); line-height: 1.45; color: var(--muted); }
.dom-preview-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px; border-top: 1px solid var(--hairline); font-size: calc(13.5px * var(--ts)); font-weight: 550; }
.dom-preview-link .icon { width: 15px; height: 15px; color: var(--faint); }
.dom-preview-foot { padding: 10px 2px 0; border-top: 1px solid var(--hairline); font-size: calc(12.5px * var(--ts)); line-height: 1.45; color: var(--muted); }
.dom-preview-btn-row { display: flex; align-items: center; gap: 12px; }
.dom-preview-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-pill);
    background: var(--primary); color: var(--on-primary); font-size: calc(13.5px * var(--ts)); font-weight: 600; box-shadow: 0 10px 22px -12px var(--primary);
}
.dom-preview-btn .icon { width: 16px; height: 16px; }
.dom-preview-btn.is-off { background: var(--surface); color: var(--muted); border: 1px dashed var(--border-strong); box-shadow: none; }
.dom-preview-btn-row .dom-note { font-size: calc(12.5px * var(--ts)); font-weight: 600; }

/* ---------- Ownership: other verification methods ---------- */
.verify-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.verify-method { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.verify-method h3 { font-size: calc(14.5px * var(--ts)); font-weight: 700; }
.verify-method form { margin-top: auto; }
.verify-method .dl-tight { grid-template-columns: minmax(0, 1fr); }
.verify-method .dl-tight dt { padding: 0 0 4px; font-size: calc(12px * var(--ts)); font-weight: 650; color: var(--muted); }
.verify-method .dl-tight dd { padding: 8px 10px; margin-bottom: 10px; border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--surface); font-size: calc(12px * var(--ts)); line-height: 1.5; }
.verify-method .dl-tight dd:last-of-type { margin-bottom: 0; }
.verify-method .code-block { background: var(--surface); }

/* ---------- Trackers and scans (empty states) ---------- */
.dom-page .empty .chip-icon { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px; }
.dom-page .empty .chip-icon .icon { width: 22px; height: 22px; }

/* ---------- Settings tab ---------- */
.dom-settings { padding: 24px 26px 26px; }
.dom-settings > .card-title { font-size: calc(17px * var(--ts)); font-weight: 700; margin-bottom: 18px; }
.dom-settings .form-grid { gap: 20px; align-items: start; }
.dom-settings-foot { justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--hairline); }

/* ---------- Narrow containers ---------- */
@container (max-width: 640px) {
    .dom-pair, .dom-link-row { grid-template-columns: minmax(0, 1fr); }
    .dom-item { flex-wrap: wrap; }
    .dom-item-actions { width: 100%; padding-left: 56px; }
    .dom-attrs { grid-template-columns: minmax(0, 1fr); }
    .dom-attrs dt { padding-bottom: 2px; border-bottom: 0; }
    .dom-attrs dd { padding-top: 0; }
}

@media (max-width: 640px) {
    .dom-strip { gap: 10px; }
    .dom-stat { flex-basis: calc(50% - 5px); padding: 14px 14px 13px; }
    .dom-stat:last-child:nth-child(odd) { flex-basis: 100%; }
    .dom-stat-value { font-size: calc(15.5px * var(--ts)); }
    .dom-sec, .dom-settings { padding: 18px 16px 20px; border-radius: var(--r-lg); }
    .dom-sec { gap: 18px; }
    .dom-sec-head { gap: 0 12px; }
    .dom-sec-text { display: contents; }
    .dom-sec-help { grid-column: 1 / -1; margin-top: 8px; }
    .dom-sec-icon { width: 34px; height: 34px; border-radius: 11px; }
    .dom-sec-title { min-height: 34px; font-size: calc(16px * var(--ts)); }
    .dom-opt-master { padding: 14px; }
    .dom-opts .dom-opt { padding: 14px; }
    .dom-disclosure-body { padding: 14px; }
    .dom-code-body { padding: 12px 14px 14px; font-size: calc(12px * var(--ts)); }
    .dom-form-foot .btn, .dom-settings-foot .btn { width: 100%; margin-left: 0; }
    .dom-settings-foot { flex-direction: column-reverse; align-items: stretch; }
}
@media (max-width: 480px) {
    .dom-tabbar .tabs { gap: 2px; }
    .dom-tabbar .tab { padding: 0 11px; gap: 6px; }
    .dom-tabbar .tab > .icon { display: none; }
}

/* App adapters for the prototype domain page: the "Your data" settings sit beside their preview in .dom-split,
   the warning line, the "Recent checks" heading, and the full-width section stack. */
.dom-main > .dom-sec { width: 100%; }
.dom-split { display: grid; gap: 22px; min-width: 0; }
@container (min-width: 880px) {
    .dom-split { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 28px; align-items: start; }
    .dom-split > .dom-aside { position: sticky; top: 88px; }
}
.dom-warn { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warning-soft); color: var(--warning-text); font-size: calc(13.5px * var(--ts)); line-height: 1.5; }
    .dom-warn .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.dom-sub { margin: 4px 0 0; font-size: calc(14.5px * var(--ts)); font-weight: 650; }
.dom-settings-foot { display: flex; align-items: center; }


/* ---------- Rights request detail (DESIGN.md "Rights Request Detail"): progress card beside the ink response clock */
.rd-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: stretch; }
.rd-progress { display: flex; flex-direction: column; gap: 20px; container-type: inline-size; }
    .rd-progress .status-steps { margin: auto 0; }
.rd-clock { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 22px 24px; }
.rd-clock-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rd-clock-title { margin: 0; font-size: calc(11.5px * var(--ts)); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--signal); }
.rd-clock-ico { width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; border-radius: 12px; background: var(--hero-glass); border: 1px solid var(--hero-line); color: var(--hero-text); }
    .rd-clock-ico .icon { width: 18px; height: 18px; }
.rd-clock .clock { padding: 0; border: 0; border-radius: 0; background: none; color: var(--hero-text); }
    .rd-clock .clock-big { display: flex; align-items: center; font-size: 34px; letter-spacing: -.035em; line-height: 1.1; }
    .rd-clock .state-dot { width: 12px; height: 12px; margin-right: 12px; }
    .rd-clock .clock .muted { text-wrap: pretty; margin-top: 8px; color: var(--hero-muted); opacity: 1; font-size: calc(12.5px * var(--ts)); line-height: 1.5; }
.rd-clock-law { margin: 0; padding-top: 14px; border-top: 1px solid var(--hero-line); color: var(--hero-muted); line-height: 1.5; }
.rd-clock .clock.Overdue .clock-big, .rd-clock .clock.OVERDUE .clock-big { color: var(--danger); }
.rd-clock .clock.DueSoon .clock-big { color: var(--warning); }
.rd-clock .clock.OnTrack .clock-big { color: var(--signal); }
.rd-clock .clock.Met .clock-big, .rd-clock .clock.MET .clock-big { color: var(--success); }
.rd-clock:has(.clock.Overdue)::before, .rd-clock:has(.clock.OVERDUE)::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--danger) 40%, transparent), transparent 100%); }
.rd-clock:has(.clock.DueSoon)::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--warning) 36%, transparent), transparent 100%); }
.rd-clock:has(.clock.Met)::before, .rd-clock:has(.clock.MET)::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--success) 36%, transparent), transparent 100%); }
@container page (max-width: 879.98px) {
    .rd-top { grid-template-columns: minmax(0, 1fr); }
}
@container page (min-width: 580px) and (max-width: 879.98px) {
    .rd-clock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 28px; align-items: center; }
    .rd-clock-head { grid-column: 1 / -1; }
    .rd-clock-law { align-self: stretch; display: flex; align-items: center; padding: 0 0 0 28px; border-top: 0; border-left: 1px solid var(--hero-line); }
}
@media (max-width: 640px) {
    .rd-clock { padding: 20px; }
    .rd-clock .clock-big { font-size: 30px; }
}

/* Rights request detail, continued (prototype pages/rights-detail.css): header meta, request facts, tasks, activity, action rail. */
.rd { display: flex; flex-direction: column; gap: 20px; }
.rd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
    .rd-meta .rd-sep { color: var(--faint); }
.rd-progress > .card-title { margin: 0; }

.rd-request { container-type: inline-size; container-name: rdr; }
.rd-message { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--hairline); }
    .rd-message p { margin: 0; padding-top: 7px; font-size: calc(15px * var(--ts)); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.rd-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.rd-fact { min-width: 0; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--surface); }
.rd-fact-2 { grid-column: span 2; }
.rd-fact-3 { grid-column: 1 / -1; }
    .rd-fact dt { font-size: calc(var(--fs-xs) * var(--ts)); font-weight: 600; color: var(--muted); }
    .rd-fact dd { margin: 5px 0 0; font-size: calc(14px * var(--ts)); font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
    .rd-fact dd .muted { font-weight: 450; }
.rd-person { display: flex; align-items: center; gap: 10px; }
    .rd-person > span:last-child { min-width: 0; }
@container rdr (max-width: 460px) {
    .rd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rd-fact-2, .rd-fact-3, .rd-fact-s2 { grid-column: 1 / -1; }
}
@container rdr (max-width: 340px) { .rd-fact { padding: 10px 12px; } }

.rd-tasks .card-head { margin-bottom: 14px; gap: 4px 12px; }
.rd-empty { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); }
    .rd-empty p { margin: 0; min-width: 0; line-height: 1.5; }

.rd-activity .timeline-list li > div { flex: 1; min-width: 0; }
.rd-activity .tl-meta { line-height: 1.5; }
.rd-activity .tl-time { color: var(--text-2); font-weight: 650; }
.rd-activity .tl-body { margin-top: 8px; padding: 11px 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.rd-activity li.requester .tl-body { background: var(--primary-soft); border-color: var(--primary-soft-2); }
.rd-activity li.internal .tl-body { border-style: dashed; border-color: var(--border-strong); }

.rd .case-side { max-height: calc(100dvh - 104px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; margin: -2px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.rd-actions { padding: 20px 18px 18px; }
    .rd-actions > .card-title { padding: 0 6px; }
.rd .action-stack { gap: 6px; }
    .rd .action-stack > details { background: var(--surface); border-color: var(--hairline); border-radius: var(--r-md); transition: border-color .15s, box-shadow .2s, background-color .15s; }
        .rd .action-stack > details:hover { border-color: var(--border-strong); background: var(--surface-2); }
        .rd .action-stack > details[open] { background: var(--surface); border-color: color-mix(in srgb, var(--primary) 38%, var(--border)); box-shadow: var(--shadow-sm); }
        .rd .action-stack > details > summary { gap: 12px; padding: 9px 12px 9px 9px; border-radius: var(--r-md); cursor: pointer; }
        .rd .action-stack > details[open] > summary { background: var(--surface); border-bottom-color: var(--hairline); border-radius: var(--r-md) var(--r-md) 0 0; }
.rd-act-ico { width: 30px; height: 30px; flex: none; display: inline-grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary-text); }
    .rd .action-stack > details > summary .rd-act-ico .icon { width: 16px; height: 16px; }
    .rd .action-stack > details > summary .rd-act-chev { width: 16px; height: 16px; margin-left: auto; color: var(--faint); transition: transform .2s; }
    .rd .action-stack > details[open] > summary .rd-act-chev { transform: rotate(180deg); color: var(--primary-text); }
.rd .action-stack > details > form, .rd .action-stack > details > div { display: grid; gap: 10px; padding: 14px; }
.rd .action-stack > details > div { gap: 16px; }
.rd .action-stack p { margin: 0; line-height: 1.5; }
.rd .action-stack .check-row { display: flex; align-items: flex-start; font-size: calc(var(--fs-sm) * var(--ts)); font-weight: 500; color: var(--text-2); line-height: 1.45; }
    .rd .action-stack .check-row input { margin-top: 1px; }
.rd .action-stack .input, .rd .action-stack .select { height: 40px; }
.rd .action-stack textarea.input { height: auto; min-height: 84px; }
.rd .action-stack .btn { height: 38px; }
.rd-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rd-inline { display: flex; align-items: center; gap: 8px; }
    .rd-inline .select { flex: 1 1 auto; min-width: 0; }
    .rd-inline .btn { flex: none; }
.rd-form { display: grid; gap: 10px; }
.rd .action-stack .input.mono::placeholder { font-family: var(--font); font-size: calc(12.5px * var(--ts)); }
.rd .action-stack > details > div > form + form { padding-top: 16px; border-top: 1px solid var(--hairline); }

@container page (max-width: 879.98px) {
    .rd .case-side { position: static; max-height: none; overflow: visible; padding: 0; margin: 0; }
}
@container page (min-width: 580px) and (max-width: 879.98px) {
    .rd .action-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .rd .action-stack > details[open] { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .rd { gap: 16px; }
    .rd-meta .rd-sep { display: none; }
    .rd-message { padding: 14px; }
    .rd .card { padding: 20px 18px; }
    .rd-actions.card { padding: 18px 14px 14px; }
}

/* Dashboard-style stacked rows for a compact table inside a card on phones */
@media (max-width: 760px) {
    .dash-panel .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .dash-panel .stack-table, .dash-panel .stack-table tbody, .dash-panel .stack-table tr, .dash-panel .stack-table td { display: block; width: 100%; }
    .dash-panel .stack-table tr { padding: 12px 8px; border-bottom: 1px solid var(--hairline); }
    .dash-panel .stack-table td { padding: 4px 0; border: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; min-width: 0; }
        .dash-panel .stack-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: calc(var(--fs-xs) * var(--ts)); font-weight: 650; padding-top: 2px; }
        .dash-panel .stack-table td:not([data-label]) { display: block; }
        .dash-panel .stack-table td > * { grid-column: 2; }
        .dash-panel .stack-table td[data-label]::before { grid-column: 1; grid-row: 1; }
    .dash-panel .table-scroll .table { min-width: 0; }
}
