:root {
  --canvas: #f7f9f8;
  --surface: #ffffff;
  --surface-subtle: #f1f5f3;
  --ink: #14211c;
  --muted: #65716c;
  --rule: #d7dfdc;
  --rule-strong: #becac5;
  --evergreen: #07583f;
  --evergreen-strong: #03452f;
  --sage: #dfece6;
  --blue: #dce9f8;
  --blue-strong: #23609a;
  --amber: #f6dfb8;
  --amber-strong: #a45b00;
  --coral: #f8d6d4;
  --danger: #bd2e2e;
  --radius-sm: 6px;
  --radius-md: 10px;
  --sidebar-width: 236px;
  --topbar-height: 70px;
  color: var(--ink);
  font-family: Inter, "SF Pro Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; background: var(--canvas); }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
.icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.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; }

:focus-visible { outline: 3px solid rgba(7, 88, 63, .28); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: var(--sidebar-width); flex-direction: column; border-right: 1px solid var(--rule); background: #fafcfb; }
.brand { display: flex; height: var(--topbar-height); align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--rule); font-size: 17px; font-weight: 720; letter-spacing: -.03em; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 6px; background: var(--evergreen); color: #fff; }
.brand-mark .icon { width: 22px; height: 22px; stroke-width: 1.65; }
.nav-list { flex: 1; padding: 4px 8px 16px; overflow-y: auto; }
.nav-item { position: relative; display: flex; min-height: 48px; align-items: center; gap: 14px; padding: 0 12px; border-radius: 2px; color: #26332e; font-size: 14px; font-weight: 520; transition: background-color 140ms ease, color 140ms ease; }
.nav-item:hover { background: var(--surface-subtle); }
.nav-item.is-active { background: #e9f0ed; color: var(--evergreen-strong); font-weight: 650; }
.nav-item.is-active::before { position: absolute; inset: 0 auto 0 -8px; width: 4px; background: var(--evergreen); content: ""; }
.nav-item .icon { width: 21px; height: 21px; }
.account-menu { display: flex; min-height: 88px; align-items: center; gap: 11px; padding: 16px; border-top: 1px solid var(--rule); }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--evergreen); color: #fff; font-size: 12px; font-weight: 700; }
.account-copy { display: grid; min-width: 0; flex: 1; }
.account-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu form { display: flex; }

.app-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; height: var(--topbar-height); align-items: center; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--rule); background: rgba(255,255,255,.96); }
.topbar h1 { margin: 0; font-size: 25px; font-weight: 730; letter-spacing: -.035em; }
.topbar-actions { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: flex-end; gap: 12px; }
.topbar-actions { scrollbar-width: none; }
.topbar-actions::-webkit-scrollbar { display: none; }
.mobile-menu { display: none; border: 0; background: transparent; }
.workspace-form { position: relative; }
.workspace-form select { width: 184px; height: 40px; appearance: none; padding: 0 38px 0 40px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2314211c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; font-size: 13px; font-weight: 550; }
.select-icon { position: absolute; z-index: 1; top: 10px; left: 13px; pointer-events: none; }
.select-icon .icon { width: 18px; height: 18px; }
.period-control { display: flex; height: 40px; align-items: center; gap: 16px; padding: 0 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.period-control .icon { width: 17px; height: 17px; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 13px; font-weight: 650; white-space: nowrap; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.button .icon { width: 17px; height: 17px; }
.button-primary { border-color: var(--evergreen); background: var(--evergreen); color: #fff; }
.button-primary:hover { border-color: var(--evergreen-strong); background: var(--evergreen-strong); }
.button-secondary, .button-quiet { border-color: var(--rule-strong); background: #fff; }
.button-secondary:hover, .button-quiet:hover { border-color: #8fa099; background: var(--surface-subtle); }
.button-quiet { min-height: 34px; padding-inline: 13px; }
.icon-button, .row-action { display: inline-grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink); }
.icon-button:hover, .row-action:hover { background: var(--surface-subtle); }
.icon-button.bordered { width: 46px; border: 1px solid var(--rule-strong); background: #fff; }
.icon-button .icon, .row-action .icon { width: 18px; height: 18px; }

.flash { display: flex; align-items: center; gap: 10px; margin: 14px 24px 0; padding: 11px 14px; border: 1px solid; border-radius: var(--radius-sm); font-size: 13px; font-weight: 550; }
.flash-success { border-color: #b9d5c8; background: #eef7f2; color: #174f3d; }
.flash-error { border-color: #e4b4b2; background: #fff1f0; color: #852323; }

.dashboard-canvas { background: var(--canvas); }
.metric-band { display: grid; min-height: 147px; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); background: #fbfcfc; }
.metric-item { display: flex; min-width: 0; gap: 18px; padding: 25px 28px 22px; border-right: 1px solid var(--rule); }
.metric-item:last-child { border-right: 0; }
.metric-icon, .attention-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 50%; }
.metric-icon .icon { width: 25px; height: 25px; }
.tone-sage { background: var(--sage); color: var(--evergreen); }
.tone-blue { background: var(--blue); color: var(--blue-strong); }
.tone-amber { background: var(--amber); color: var(--amber-strong); }
.tone-coral { background: var(--coral); color: var(--danger); }
.metric-copy { min-width: 0; flex: 1; }
.metric-copy h2 { display: flex; align-items: center; gap: 5px; margin: 0 0 8px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.metric-copy h2 .icon { width: 13px; height: 13px; }
.metric-value { display: grid; grid-template-columns: 40px auto 1fr; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; }
.metric-value span { font-size: 13px; font-weight: 550; }
.metric-value strong { font-size: 25px; line-height: 1.2; letter-spacing: -.025em; }
.metric-value small { color: var(--muted); font-size: 11px; }
.metric-copy p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; min-height: 390px; grid-template-columns: minmax(500px, 1.25fr) minmax(350px, .85fr) minmax(265px, .58fr); border-bottom: 1px solid var(--rule); }
.panel { min-width: 0; padding: 20px 26px; border-right: 1px solid var(--rule); background: #fbfcfc; }
.panel:last-child { border-right: 0; }
.section-heading { display: flex; min-height: 34px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 0; font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.section-heading h2 span { color: var(--muted); font-size: 12px; font-weight: 500; }
.segmented { display: flex; overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 4px; }
.segmented a { min-width: 68px; padding: 6px 10px; border-right: 1px solid var(--rule); color: #35423d; text-align: center; font-size: 11px; }
.segmented a:last-child { border-right: 0; }
.segmented a.is-active { background: #e9f0ed; color: var(--evergreen-strong); font-weight: 650; }
.timeline { margin: 11px 0 10px; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; min-height: 52px; grid-template-columns: 84px 16px minmax(100px,1.3fr) minmax(65px,.7fr) minmax(78px,.75fr) minmax(112px,1fr); align-items: center; gap: 8px; }
.timeline li:not(:last-child)::after { position: absolute; z-index: 0; top: 31px; bottom: -21px; left: 91px; width: 1px; background: var(--rule-strong); content: ""; }
.timeline-date, .timeline-main, .timeline-money { display: grid; min-width: 0; }
.timeline-date strong, .timeline-main strong, .timeline-money strong { overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.timeline-date span, .timeline-main span, .timeline-money span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-marker { z-index: 1; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--evergreen); box-shadow: 0 0 0 3px #fbfcfc; }
.timeline-marker.tone-amber { background: #c7750a; }
.timeline-marker.tone-coral { background: var(--danger); }
.timeline-kind { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-payment { display: flex; min-width: 0; align-items: center; gap: 7px; }
.timeline-payment .icon { width: 14px; height: 14px; }
.timeline-payment span { display: grid; min-width: 0; }
.timeline-payment strong, .timeline-payment small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-payment strong { font-size: 9px; font-weight: 600; }
.timeline-payment small { color: var(--muted); font-size: 8px; }
.empty-row { color: var(--muted); font-size: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--evergreen); font-size: 11px; font-weight: 650; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon { width: 14px; height: 14px; }

.select-quiet { display: inline-flex; align-items: center; gap: 7px; color: #35423d; font-size: 11px; }
.select-quiet .icon { width: 14px; height: 14px; }
.chart-filter select { max-width: 138px; border: 0; background: transparent; color: #35423d; font-size: 11px; cursor: pointer; }
.chart-wrap { height: 275px; margin: 1px -8px 0; }
.bar-chart { width: 100%; height: 100%; overflow: visible; }
.chart-grid line { stroke: var(--rule); stroke-width: 1; }
.chart-y text, .chart-bar text { fill: #46524d; font-size: 10px; font-variant-numeric: tabular-nums; }
.chart-bar rect { fill: #6b9485; }
.chart-bar.is-active rect { fill: var(--evergreen); }
.chart-bar.is-active text { fill: var(--ink); font-weight: 700; }
.chart-label { font-size: 9px !important; }

.attention-panel { padding-inline: 24px; }
.attention-list { margin: 10px 0 12px; padding: 0; list-style: none; }
.attention-list li a { display: grid; min-height: 64px; grid-template-columns: 44px minmax(0,1fr) 16px; align-items: center; gap: 12px; }
.attention-icon { width: 42px; height: 42px; }
.attention-icon .icon { width: 22px; height: 22px; }
.attention-list li a > span:nth-child(2) { display: grid; min-width: 0; }
.attention-list strong { overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.attention-list small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.attention-list > li > a > .icon { width: 15px; height: 15px; }
.all-clear { display: flex; align-items: center; gap: 8px; padding: 24px 0; color: var(--muted); font-size: 12px; }

.recent-panel { min-height: 355px; padding: 18px 26px 20px; background: #fafcfb; }
.table-actions { display: flex; gap: 8px; }
.table-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; contain: inline-size layout paint; }
table { width: 100%; margin-top: 5px; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
th { height: 29px; color: #26332e; font-size: 9px; font-weight: 650; text-align: left; }
th, td { overflow: hidden; padding: 0 10px; border-bottom: 1px solid var(--rule); text-overflow: ellipsis; white-space: nowrap; }
td { height: 35px; color: #3c4944; }
tbody tr { transition: background-color 120ms ease; }
tbody tr:hover { background: #eef3f1; }
th:nth-child(1) { width: 11%; } th:nth-child(2) { width: 21%; } th:nth-child(3) { width: 19%; } th:nth-child(4) { width: 22%; } th:nth-child(5) { width: 13%; } th:nth-child(6) { width: 11%; } th:nth-child(7) { width: 36px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.vendor-cell { display: flex; align-items: center; gap: 9px; }
.vendor-mark { display: grid; width: 20px; height: 20px; place-items: center; color: var(--evergreen); font-size: 10px; font-weight: 800; }
.vendor-copy { display: grid; min-width: 0; }
.vendor-copy > span, .vendor-copy small { overflow: hidden; text-overflow: ellipsis; }
.vendor-copy small { color: var(--muted); font-size: 9px; }
.status { display: inline-flex; min-height: 22px; align-items: center; padding: 2px 7px; border-radius: 3px; font-size: 9px; font-weight: 600; }
.status-positive { border: 1px solid #c5ded1; background: #e9f4ee; color: #15543e; }
.status-pending { border: 1px solid #ead3ad; background: #fff0d8; color: #8c5005; }
.status-void { border: 1px solid #d5d8d7; background: #f0f2f1; color: #59635f; }
.status-sage { border: 1px solid #c5ded1; background: #e9f4ee; color: #15543e; }
.status-blue { border: 1px solid #b9cfe6; background: #eef4fb; color: #285b89; }
.empty-table { height: 100px; color: var(--muted); text-align: center; white-space: normal; }
.table-footer-link { margin-top: 15px; }

/* Authentication */
.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 32px; background: #eef3f1; }
.auth-shell { width: min(100%, 430px); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; font-size: 20px; font-weight: 740; letter-spacing: -.03em; }
.auth-card { padding: 32px; border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--surface); }
.auth-card h1 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.03em; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); }
.auth-card form > .button { width: 100%; margin-top: 18px; }
.auth-provider-form .button { margin-top: 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--rule); content: ""; }
.auth-divider span { white-space: nowrap; }
.auth-card > .auth-recovery-note { margin: 18px 0 0; font-size: 10px; text-align: center; }

/* Forms and list pages */
.content-canvas { padding: 26px; }
.content-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.content-header p { max-width: 680px; margin: 5px 0 0; color: var(--muted); }
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-control { position: relative; width: min(340px, 100%); }
.search-control .icon { position: absolute; top: 10px; left: 11px; width: 18px; height: 18px; color: var(--muted); }
.search-control input { width: 100%; height: 39px; padding: 0 12px 0 38px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; }
.data-panel { border: 1px solid var(--rule); background: #fff; }
.data-panel table { margin: 0; font-size: 12px; }
.data-panel th { height: 40px; padding-inline: 14px; background: #f5f7f6; font-size: 10px; }
.data-panel td { height: 52px; padding-inline: 14px; }
.recurring-name { display: grid; }
.recurring-name strong { font-size: 12px; }
.recurring-name span { color: var(--muted); font-size: 10px; }
.form-shell { max-width: 860px; margin: 0 auto; }
.form-title { margin-bottom: 24px; }
.form-title h2 { margin: 0 0 5px; font-size: 21px; }
.form-title p { margin: 0; color: var(--muted); }
.form-section { margin-bottom: 22px; padding: 24px; border: 1px solid var(--rule); background: #fff; }
.form-section h3 { margin: 0 0 18px; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; }
.field { display: grid; align-content: start; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 650; }
.field-link { float: right; color: var(--evergreen); font-size: 10px; font-weight: 650; }
.field-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.field label span { color: var(--danger); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; }
.field input, .field select { height: 42px; padding: 0 12px; }
.field textarea { min-height: 96px; padding: 10px 12px; resize: vertical; }
.field small { color: var(--muted); font-size: 10px; }
.field .field-error { color: var(--danger); font-size: 11px; font-weight: 550; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.inline-fields { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.allocation-row { display: grid; grid-template-columns: minmax(0,1fr) 130px; gap: 10px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.compact-form { max-width: 680px; }
.safety-note { margin: -8px 0 20px; padding: 12px 14px; border-left: 3px solid var(--amber-strong); background: #fff7e9; color: #6f470e; font-size: 12px; }
.placeholder-state { display: grid; max-width: 560px; justify-items: start; gap: 12px; padding: 48px 0; }
.placeholder-state h2, .placeholder-state p { margin: 0; }
.placeholder-state p { color: var(--muted); }
.detail-header { margin-bottom: 20px; }
.detail-header h2 { margin: 12px 0 2px; font-size: 26px; letter-spacing: -.03em; }
.detail-header p { margin: 0; color: var(--muted); }
.detail-ledger { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 24px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.detail-ledger > div { display: grid; min-height: 116px; align-content: center; gap: 4px; padding: 18px 22px; border-right: 1px solid var(--rule); }
.detail-ledger > div:last-child { border-right: 0; }
.detail-ledger span, .detail-ledger small { color: var(--muted); font-size: 11px; }
.detail-ledger strong { font-size: 18px; }
.split-detail { display: grid; grid-template-columns: minmax(280px,.7fr) minmax(480px,1.3fr); gap: 22px; align-items: start; }
.definition-list { margin: 0; }
.definition-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; font-weight: 650; }
.detail-section-heading { padding: 16px 18px 8px; }
.detail-section-heading > span { color: var(--muted); font-size: 10px; }
.detail-notes { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); white-space: pre-wrap; }

/* Read-only RDAP observation */
.domain-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.rdap-panel { margin-bottom: 24px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; box-shadow: 0 8px 24px rgba(20,33,28,.05); }
.rdap-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px 8px; }
.rdap-panel-heading h3 { margin: 3px 0 0; font-size: 17px; }
.rdap-panel-heading .eyebrow { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.rdap-summary { max-width: 860px; margin: 0; padding: 0 20px 17px; color: #46524d; font-size: 11px; line-height: 1.55; }
.rdap-comparison { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--rule); background: #fbfcfc; }
.rdap-comparison > div { display: grid; min-height: 104px; align-content: center; gap: 4px; padding: 16px 20px; border-right: 1px solid var(--rule); }
.rdap-comparison > div:last-child { border-right: 0; }
.rdap-comparison dt, .rdap-comparison small { color: var(--muted); font-size: 9px; }
.rdap-comparison dd { margin: 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.rdap-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 14px 20px; }
.rdap-panel-footer > div { display: grid; gap: 3px; }
.rdap-panel-footer strong { font-size: 10px; }
.rdap-panel-footer span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.rdap-panel-footer form { flex: none; }

/* Effective-dated recurring plans */
.recurring-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.plan-change-form .form-title > .text-link { margin-bottom: 13px; }
.plan-change-form .form-section > h3 { margin-bottom: 18px; }
.plan-section-heading { min-height: 0; align-items: center; margin-bottom: 18px; }
.plan-section-heading h3 { margin: 0 0 3px; }
.plan-section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.plan-impact-note { display: flex; min-height: 78px; align-items: flex-start; gap: 11px; padding: 13px 14px; border: 1px solid #c8d8e8; border-radius: var(--radius-sm); background: #f3f7fc; color: #244f78; }
.plan-impact-note > .icon { width: 19px; height: 19px; margin-top: 1px; }
.plan-impact-note > div { display: grid; gap: 3px; }
.plan-impact-note strong { font-size: 11px; }
.plan-impact-note span { color: #526d84; font-size: 9px; }
.plan-allocation-list { display: grid; gap: 10px; }
.plan-allocation-list .allocation-row select,
.plan-allocation-list .allocation-row input { width: 100%; height: 42px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; }
.plan-allocation-list .allocation-row select { padding: 0 12px; }
.percent-input { position: relative; }
.percent-input input { padding: 0 34px 0 12px; font-variant-numeric: tabular-nums; }
.percent-input span { position: absolute; top: 12px; right: 12px; color: var(--muted); font-size: 11px; pointer-events: none; }
.plan-confirmation { margin-bottom: 22px; padding: 17px 20px; border: 1px solid var(--rule-strong); background: #fbfcfc; }
.plan-confirmation label { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.plan-confirmation input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--evergreen); }
.plan-confirmation label span { display: grid; gap: 3px; }
.plan-confirmation strong { font-size: 12px; }
.plan-confirmation small { color: var(--muted); font-size: 10px; }
.plan-confirmation > .field-error,
.plan-form-error,
.plan-change-form .form-section > .field-error { display: block; margin-top: 9px; color: var(--danger); font-size: 11px; font-weight: 550; }
.plan-history-panel { min-width: 0; }
.plan-history-table { min-width: 690px; }
.plan-history-table th:nth-child(1) { width: 13%; }
.plan-history-table th:nth-child(2) { width: 17%; }
.plan-history-table th:nth-child(3) { width: 30%; }
.plan-history-table th:nth-child(4) { width: 25%; }
.plan-history-table th:nth-child(5) { width: 15%; }
.plan-history-table td strong,
.plan-history-table td small,
.recurring-occurrences-panel td strong,
.recurring-occurrences-panel td small { display: block; overflow: hidden; text-overflow: ellipsis; }
.plan-history-table td small,
.recurring-occurrences-panel td small { color: var(--muted); font-size: 9px; }
.recurring-occurrences-panel { margin-top: 22px; }
.recurring-occurrences-panel table { min-width: 620px; }
.lifecycle-pending-banner { display: flex; align-items: flex-start; gap: 10px; margin: -4px 0 22px; padding: 13px 15px; border: 1px solid #c8d8e8; background: #f3f7fc; color: #244f78; font-size: 11px; }
.lifecycle-pending-banner .icon { width: 18px; height: 18px; margin-top: 1px; }
.lifecycle-pending-banner strong { margin-right: 4px; }
.lifecycle-history-panel { margin-top: 22px; }
.lifecycle-history-table { min-width: 820px; }
.lifecycle-history-table th:nth-child(1) { width: 17%; }
.lifecycle-history-table th:nth-child(2) { width: 12%; }
.lifecycle-history-table th:nth-child(3) { width: 18%; }
.lifecycle-history-table th:nth-child(4) { width: 15%; }
.lifecycle-history-table th:nth-child(5) { width: 23%; }
.lifecycle-history-table th:nth-child(6) { width: 15%; }
.lifecycle-history-table td strong,
.lifecycle-history-table td small { display: block; overflow: hidden; text-overflow: ellipsis; }
.lifecycle-history-table td small { color: var(--muted); font-size: 9px; }
.lifecycle-change-form .form-title > .text-link { margin-bottom: 13px; }
.lifecycle-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.lifecycle-form-heading > div { min-width: 0; }
.lifecycle-form-heading > .status { flex: 0 0 auto; margin-top: 2px; }
.lifecycle-form-field-error { display: block; margin: -11px 0 18px; color: var(--danger); font-size: 11px; font-weight: 550; }
.lifecycle-section-heading { min-height: 0; align-items: center; margin-bottom: 18px; }
.lifecycle-section-heading h3 { margin: 0 0 3px; }
.lifecycle-section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.lifecycle-state-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--rule); }
.lifecycle-state-grid > div { display: grid; gap: 4px; padding: 14px 16px; border-right: 1px solid var(--rule); }
.lifecycle-state-grid > div:last-child { border-right: 0; }
.lifecycle-state-grid dt { color: var(--muted); font-size: 10px; }
.lifecycle-state-grid dd { margin: 0; font-size: 12px; font-weight: 650; }
.lifecycle-impact-note { display: flex; min-height: 88px; align-items: flex-start; gap: 11px; padding: 14px 15px; border: 1px solid #c8d8e8; border-radius: var(--radius-sm); background: #f3f7fc; color: #244f78; }
.lifecycle-impact-note > .icon { width: 19px; height: 19px; margin-top: 1px; }
.lifecycle-impact-note > div { display: grid; gap: 4px; }
.lifecycle-impact-note strong { font-size: 11px; }
.lifecycle-impact-note span { color: #526d84; font-size: 9px; }
.lifecycle-impact-note-wide { min-height: 0; margin-top: 17px; }
.lifecycle-confirmation { margin-top: 0; }
.lifecycle-blocker { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 13px; margin-bottom: 22px; padding: 18px; border: 1px solid #ead3ad; background: #fff8ec; color: #70480b; }
.lifecycle-blocker > div:first-child { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #ffedcd; }
.lifecycle-blocker .icon { width: 18px; height: 18px; }
.lifecycle-blocker h3 { margin: 0 0 4px; font-size: 13px; }
.lifecycle-blocker p { margin: 0; font-size: 10px; line-height: 1.5; }

/* Expense ledger, forms, and detail */
.expenses-canvas { min-height: calc(100vh - var(--topbar-height)); background: #fafcfb; }
.expense-metric-band { min-height: 162px; }
.expense-metric-band .metric-item { gap: 24px; padding-inline: 34px; }
.expenses-topbar .topbar-actions { position: relative; justify-content: center; }
.expenses-topbar .topbar-actions > .button { position: absolute; right: 0; }
.expense-history { min-height: 560px; padding: 29px 24px 36px; }
.expense-history-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 6px 21px; }
.expense-history-header h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.025em; }
.expense-history-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.expense-filters { position: relative; margin: 0 5px 26px; }
.expense-filter-primary { display: grid; grid-template-columns: minmax(260px, 1.75fr) minmax(132px, .62fr) minmax(145px, .68fr) minmax(176px, .85fr) minmax(132px, .62fr); gap: 14px; align-items: start; }
.expense-search { width: 100%; }
.expense-search input { height: 43px; font-size: 12px; }
.expense-search .icon { top: 12px; }
.filter-select select, .expense-filter-menu summary { width: 100%; height: 43px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background-color: #fff; font-size: 12px; font-weight: 550; }
.filter-select select { appearance: none; padding: 0 38px 0 13px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2314211c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.expense-filter-menu { position: relative; min-width: 0; }
.expense-filter-menu summary { display: flex; align-items: center; gap: 10px; padding: 0 12px; list-style: none; cursor: pointer; user-select: none; }
.expense-filter-menu summary::-webkit-details-marker { display: none; }
.expense-filter-menu summary span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-filter-menu summary .icon { width: 17px; height: 17px; }
.expense-filter-menu summary .icon:last-child { width: 14px; height: 14px; transition: transform 140ms ease; }
.expense-filter-menu[open] summary { border-color: #8fa099; background: var(--surface-subtle); }
.expense-filter-menu[open] summary .icon:last-child { transform: rotate(180deg); }
.filter-popover { position: absolute; z-index: 12; top: calc(100% + 8px); display: grid; gap: 15px; padding: 17px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; }
.date-filter-popover { right: 0; width: 390px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.date-filter-popover .button { grid-column: 1 / -1; justify-self: end; }
.advanced-filter-popover { right: 0; width: min(530px, calc(100vw - 32px)); }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.filter-popover-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 2px; }

.expense-data-panel { border: 0; border-top: 1px solid var(--rule-strong); background: transparent; }
.expense-data-panel table { background: transparent; }
.expense-data-panel th { height: 41px; background: transparent; font-size: 9px; }
.expense-data-panel td { height: 55px; }
.expenses-table { min-width: 1100px; }
.expenses-table th:nth-child(1) { width: 9%; }
.expenses-table th:nth-child(2) { width: 18%; }
.expenses-table th:nth-child(3) { width: 9%; }
.expenses-table th:nth-child(4) { width: 15%; }
.expenses-table th:nth-child(5) { width: 15%; }
.expenses-table th:nth-child(6) { width: 12%; }
.expenses-table th:nth-child(7) { width: 12%; }
.expenses-table th:nth-child(8) { width: 9%; }
.expenses-table th:nth-child(9) { width: 40px; }
.expense-name, .base-amount { display: grid; min-width: 0; }
.expense-name strong, .base-amount strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-name strong { color: var(--ink); font-size: 11px; font-weight: 650; }
.expense-name span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.expense-type { color: #34413c; font-weight: 550; }
.base-amount { justify-items: end; }
.base-amount small { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; overflow: hidden; color: var(--amber-strong); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.base-amount small .icon { width: 11px; height: 11px; }
.status-danger, .status-attention { border: 1px solid #efb5b2; background: #fff0ef; color: #9c2828; }
.expense-pagination { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 5px 0; color: #3c4944; font-size: 11px; }
.pagination-controls { display: flex; gap: 9px; }
.pagination-controls .icon-button.bordered { width: 36px; height: 36px; }
.pagination-controls .is-disabled { opacity: .38; cursor: not-allowed; }

.expense-form { max-width: 900px; }
.refund-context { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: -7px 0 22px; padding: 15px 18px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.refund-context span, .refund-context small { color: var(--muted); font-size: 11px; }
.refund-context strong { font-size: 13px; }
.field-readonly { display: flex; height: 42px; align-items: center; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface-subtle); font-weight: 600; }
.expense-money-fields { grid-template-columns: 120px minmax(0, 1fr); }
.currency-code-input { text-transform: uppercase; letter-spacing: .08em; font-weight: 650; }
.form-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.form-section-heading h3 { margin-bottom: 2px; }
.form-section-heading p, .transfer-context p { margin: 0; color: var(--muted); font-size: 11px; }
.conditional-region[hidden], .fx-section[hidden] { display: none !important; }
.transfer-context { border-left: 3px solid var(--blue-strong); }
.transfer-context > p { margin: -10px 0 16px; }
.fx-section { border-left: 3px solid var(--amber-strong); }
.expense-allocation-list { border-top: 1px solid var(--rule); }
.expense-allocation-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 70px; align-items: end; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.percent-control { position: relative; }
.percent-control input { padding-right: 34px; font-variant-numeric: tabular-nums; }
.percent-control > span { position: absolute; top: 11px; right: 12px; color: var(--muted); font-size: 12px; pointer-events: none; }
.allocation-remove { height: 42px; padding: 0; border: 0; background: transparent; color: var(--danger); font-size: 11px; font-weight: 650; }
.allocation-remove:hover { text-decoration: underline; text-underline-offset: 3px; }
.allocation-summary { display: flex; align-items: center; justify-content: flex-end; gap: 28px; padding: 14px 0 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.allocation-summary strong { margin-left: 5px; color: var(--ink); font-size: 12px; }
.allocation-summary.is-over strong { color: var(--danger); }
.allocation-error { display: block; margin-top: 9px; color: var(--danger); font-size: 11px; font-weight: 550; text-align: right; }
.form-help { margin: 10px 0 0; color: var(--muted); font-size: 10px; }
.posting-note { margin: -4px 0 14px; color: var(--muted); font-size: 11px; text-align: right; }

.expense-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.expense-detail-title { display: flex; align-items: center; gap: 12px; }
.expense-detail-title h2 { min-width: 0; }
.detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.detail-actions form { display: flex; }
.button-danger { border-color: #df9c99; background: #fff; color: var(--danger); }
.button-danger:hover { border-color: var(--danger); background: #fff0ef; }
.detail-action-menu { position: relative; }
.detail-action-menu > summary { list-style: none; cursor: pointer; }
.detail-action-menu > summary::-webkit-details-marker { display: none; }
.detail-action-popover { position: absolute; z-index: 10; top: calc(100% + 8px); right: 0; display: grid !important; width: 340px; gap: 10px; padding: 16px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; }
.detail-action-popover label { font-size: 12px; font-weight: 650; }
.detail-action-popover textarea { min-height: 90px; padding: 9px 11px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); resize: vertical; }
.detail-action-popover p { margin: 0; color: var(--muted); font-size: 10px; }
.detail-action-popover .button { justify-self: end; }
.detail-ledger small.detail-warning { display: flex; align-items: center; gap: 4px; color: var(--amber-strong); }
.detail-ledger small.detail-warning .icon { width: 13px; height: 13px; }
.expense-detail-grid { display: grid; grid-template-columns: minmax(290px, .78fr) minmax(500px, 1.22fr); gap: 22px; align-items: start; }
.expense-detail-section { margin-bottom: 0; }
.expense-detail-section .detail-section-heading { padding-bottom: 12px; }
.expense-detail-section .detail-section-heading > div { display: grid; gap: 2px; }
.expense-detail-section .detail-section-heading span { color: var(--muted); font-size: 10px; }
.expense-allocation-table th:nth-child(1) { width: 52%; }
.expense-allocation-table th:nth-child(2) { width: 20%; }
.expense-allocation-table th:nth-child(3) { width: 28%; }
.expense-subsection { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--rule); }
.expense-subsection-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.expense-subsection-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.expense-subsection-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.refund-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 15px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.refund-summary > div { display: grid; gap: 3px; padding: 14px 18px; border-right: 1px solid var(--rule); }
.refund-summary > div:last-child { border-right: 0; }
.refund-summary span { color: var(--muted); font-size: 10px; }
.refund-summary strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.expense-refunds-table th:nth-child(1) { width: 16%; }
.expense-refunds-table th:nth-child(2) { width: 43%; }
.expense-refunds-table th:nth-child(3) { width: 18%; }
.expense-refunds-table th:nth-child(4) { width: 16%; }
.expense-refunds-table th:nth-child(5) { width: 40px; }
.match-action { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(220px, .8fr) auto; align-items: end; gap: 14px; margin-bottom: 16px; padding: 18px; border: 1px solid var(--rule); background: #fff; }
.unmatch-action { grid-template-columns: minmax(220px, .7fr) minmax(260px, 1fr) auto; }
.match-current { display: grid; align-self: center; gap: 3px; }
.match-current span { color: var(--muted); font-size: 10px; }
.match-current strong { font-size: 12px; }
.match-history-panel { margin-top: 15px; }
.match-history-table th:nth-child(1) { width: 20%; }
.match-history-table th:nth-child(2) { width: 18%; }
.match-history-table th:nth-child(3) { width: 22%; }
.match-history-table th:nth-child(4) { width: 40%; }

/* Shared expense and recurring-item documents */
.document-section { margin-top: 30px; }
.document-upload { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 14px; margin-bottom: 24px; padding: 18px; border: 1px solid var(--rule); background: #fff; }
.document-file-field input[type="file"] { height: auto; min-height: 48px; padding: 5px; background: var(--surface-subtle); }
.document-file-field input[type="file"]::file-selector-button { min-height: 36px; margin-right: 12px; padding: 0 13px; border: 1px solid var(--rule-strong); border-radius: 4px; background: #fff; color: var(--ink); font-weight: 650; cursor: pointer; }
.document-list-block { margin-top: 18px; }
.document-list-heading { display: flex; min-height: 30px; align-items: baseline; justify-content: space-between; gap: 16px; }
.document-list-heading h3 { margin: 0; font-size: 13px; }
.document-list-heading span { color: var(--muted); font-size: 10px; }
.document-archive-block { margin-top: 24px; }
.document-archive-panel { background: #fbfcfc; }
.document-table { min-width: 760px; }
.document-table th:nth-child(1) { width: 38%; }
.document-table th:nth-child(2) { width: 10%; }
.document-table th:nth-child(3) { width: 11%; }
.document-table th:nth-child(4) { width: 19%; }
.document-table th:nth-child(5) { width: 22%; }
.document-table td:first-child strong { display: block; max-width: 360px; overflow-wrap: anywhere; }
.document-table td:nth-child(4) small { display: block; color: var(--muted); font-size: 9px; }
.document-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.document-actions form { display: flex; }
.document-actions .text-link, .document-actions .text-button, .document-delete-menu > summary { color: var(--evergreen); font-size: 11px; font-weight: 650; }
.document-actions .text-link:hover, .document-actions .text-button:hover, .document-delete-menu > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.document-actions .text-button { padding: 0; border: 0; background: transparent; }
.document-delete-menu > summary { color: var(--danger); cursor: pointer; list-style: none; }
.document-delete-menu > summary::-webkit-details-marker { display: none; }
.document-delete-menu[open] { width: 100%; }
.document-delete-menu form { display: grid; gap: 9px; margin-top: 8px; padding: 12px; border: 1px solid #dfb0ad; background: #fff7f6; }
.document-delete-menu p { margin: 0; color: #7a2929; font-size: 10px; line-height: 1.4; }
.document-delete-menu .button { min-height: 34px; justify-self: start; padding-inline: 10px; font-size: 10px; }

/* Expense import history, upload, review, and durable result */
.import-canvas { min-height: calc(100vh - var(--topbar-height)); background: #fafcfb; }
.import-flow-shell { width: 100%; max-width: 1280px; margin: 0 auto; }
.import-page-header h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.025em; }
.import-history-filters { display: flex; min-height: 44px; align-items: center; gap: 14px; margin-bottom: 18px; }
.import-status-filter { width: 220px; }
.import-status-filter select { height: 40px; }
.import-history-panel { border: 0; border-top: 1px solid var(--rule-strong); background: transparent; }
.import-history-panel table { background: transparent; }
.import-history-panel th { background: transparent; }
.import-history-table { min-width: 1060px; }
.import-history-table th:nth-child(1) { width: 12%; }
.import-history-table th:nth-child(2) { width: 19%; }
.import-history-table th:nth-child(3) { width: 16%; }
.import-history-table th:nth-child(4) { width: 13%; }
.import-history-table th:nth-child(5) { width: 7%; }
.import-history-table th:nth-child(6) { width: 22%; }
.import-history-table th:nth-child(7) { width: 10%; }
.import-history-table th:last-child { width: 42px; }
.import-file, .import-source, .import-preview-name { display: grid; min-width: 0; }
.import-file strong, .import-source strong, .import-preview-name strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.import-file small, .import-source small, .import-preview-name small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.import-outcome { display: grid; grid-template-columns: repeat(2, max-content); gap: 2px 13px; font-variant-numeric: tabular-nums; }
.import-outcome small { color: var(--muted); font-size: 9px; }
.import-outcome b { color: var(--ink); }
.import-empty span { display: block; margin-bottom: 5px; }
.import-empty .text-link { justify-content: center; }
.import-pagination { padding-inline: 14px; }

.import-rules-header { align-items: flex-start; }
.import-rule-guidance { display: flex; align-items: flex-start; gap: 9px; margin: -4px 0 18px; padding: 12px 14px; border-block: 1px solid var(--rule); background: #fbfcfc; color: var(--muted); font-size: 10px; }
.import-rule-guidance .icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--evergreen); }
.import-rule-guidance strong { color: var(--ink); }
.import-rule-filters { flex-wrap: wrap; }
.import-rule-counts { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.import-rule-permission { margin: -3px 0 16px; color: var(--muted); font-size: 10px; }
.import-rules-table { min-width: 1180px; }
.import-rules-table th:nth-child(1) { width: 7%; }
.import-rules-table th:nth-child(2) { width: 16%; }
.import-rules-table th:nth-child(3) { width: 17%; }
.import-rules-table th:nth-child(4) { width: 18%; }
.import-rules-table th:nth-child(5) { width: 25%; }
.import-rules-table th:nth-child(6) { width: 10%; }
.import-rules-table th:last-child { width: 150px; }
.import-rules-table td { height: auto; min-height: 58px; padding-block: 11px; overflow: visible; white-space: normal; }
.import-rule-priority { font-variant-numeric: tabular-nums; }
.import-rule-name { display: grid; }
.import-rule-name strong { font-size: 11px; }
.import-rule-name small { color: var(--muted); font-size: 9px; }
.import-rule-source, .import-rule-match { color: #3c4944; font-size: 10px; overflow-wrap: anywhere; }
.import-rule-suggestions { display: flex; flex-wrap: wrap; gap: 3px 10px; margin: 0; padding: 0; color: #3c4944; font-size: 9px; list-style: none; }
.import-rule-suggestions li { overflow-wrap: anywhere; }
.import-rule-archive summary { cursor: pointer; list-style: none; }
.import-rule-archive summary::-webkit-details-marker { display: none; }
.import-rule-archive form { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--rule-strong); background: #fff; }
.import-rule-archive label { display: flex; align-items: center; gap: 7px; font-size: 9px; white-space: nowrap; }
.import-rule-archive input { accent-color: var(--evergreen); }
.import-rule-archive .button { min-height: 32px; padding-inline: 8px; font-size: 10px; white-space: normal; }
.import-rule-form { max-width: 900px; }
.import-form-back { margin-bottom: 12px; }
.import-rule-suggestion-error { display: block; margin-top: 13px; color: var(--danger); font-size: 11px; font-weight: 550; }

.import-step-nav { margin: 0 0 28px; overflow-x: auto; scrollbar-width: thin; }
.import-steps { display: grid; min-width: 540px; grid-template-columns: repeat(3, minmax(160px, 1fr)); margin: 0; padding: 0; list-style: none; }
.import-step { margin-top: 8px; border-top: 2px solid var(--rule); }
.import-step > a, .import-step > span { display: flex; min-height: 52px; align-items: center; gap: 10px; padding: 13px 10px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.import-step > a:hover .import-step-label { text-decoration: underline; text-underline-offset: 3px; }
.import-step-number { display: inline-grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid var(--rule-strong); border-radius: 50%; background: #fff; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.import-step-number .icon { width: 13px; height: 13px; }
.import-step.is-current { border-top-color: var(--evergreen); }
.import-step.is-current > a, .import-step.is-current > span { color: var(--ink); }
.import-step.is-current .import-step-number { border-color: var(--evergreen); background: var(--evergreen); color: #fff; }
.import-step.is-complete { border-top-color: #82a999; }
.import-step.is-complete > a, .import-step.is-complete > span { color: var(--evergreen); }
.import-step.is-complete .import-step-number { border-color: #9cbcad; background: #e9f4ee; color: var(--evergreen); }

.import-form { max-width: 900px; }
.import-workspace-context { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: -6px 0 22px; padding: 15px 18px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.import-workspace-context span, .import-workspace-context small, .import-upload-limit { color: var(--muted); font-size: 10px; }
.import-workspace-context strong { font-size: 13px; }
.import-file-field input[type="file"] { height: auto; min-height: 48px; padding: 5px; background: var(--surface-subtle); }
.import-file-field input[type="file"]::file-selector-button { min-height: 36px; margin-right: 12px; padding: 0 13px; border: 1px solid var(--rule-strong); border-radius: 4px; background: #fff; color: var(--ink); font-weight: 650; cursor: pointer; }
.import-checkbox { display: flex; min-height: 58px; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fbfcfc; cursor: pointer; }
.import-checkbox input { width: 17px !important; height: 17px !important; flex: 0 0 auto; accent-color: var(--evergreen); }
.import-checkbox > span { display: grid; color: inherit !important; }
.import-checkbox strong { color: var(--ink); font-size: 12px; }
.import-checkbox small { color: var(--muted); font-size: 10px; font-weight: 400; }
.import-retention-note { margin: -4px 0 15px; color: var(--muted); font-size: 10px; text-align: right; }

.import-review-canvas, .import-detail-canvas { padding-bottom: 42px; }
.import-review-header, .import-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.import-title-line { display: flex; align-items: center; gap: 12px; }
.import-title-line h2 { min-width: 0; overflow-wrap: anywhere; }
.import-summary-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 28px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.import-summary-item { display: grid; min-height: 108px; align-content: center; gap: 3px; padding: 18px 22px; border-right: 1px solid var(--rule); background: #fbfcfc; color: var(--ink); }
.import-summary-item:last-child { border-right: 0; }
.import-summary-item > span, .import-summary-item > small { color: var(--muted); font-size: 10px; }
.import-summary-item > strong { font-size: 21px; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.import-summary-item.tone-sage { box-shadow: inset 0 3px 0 #6f9d89; }
.import-summary-item.tone-blue { box-shadow: inset 0 3px 0 #6e9aca; }
.import-summary-item.tone-amber { box-shadow: inset 0 3px 0 #d09545; }
.import-summary-item.tone-coral { box-shadow: inset 0 3px 0 #cf6f6b; }
.import-review-section, .import-detail-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--rule); }
.import-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.import-section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.import-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.import-section-actions { display: flex; justify-content: flex-end; padding-top: 12px; }
.import-inline-empty { margin: 0; padding: 22px 0; color: var(--muted); }
.import-mapping-panel { border-color: var(--rule-strong); }
.import-mapping-table { min-width: 780px; }
.import-mapping-table th:nth-child(1) { width: 25%; }
.import-mapping-table th:nth-child(2) { width: 30%; }
.import-mapping-table th:nth-child(3) { width: 30%; }
.import-mapping-table th:nth-child(4) { width: 15%; }
.import-mapping-table td { height: 64px; }
.import-mapping-field { gap: 3px; }
.import-mapping-field select { height: 36px; font-size: 11px; }
.import-mapping-field .field-error { font-size: 9px; }
.import-sample-value { display: block; overflow: hidden; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.import-optional { color: var(--muted); font-size: 10px; }

.import-decisions { border-top: 1px solid var(--rule); }
.import-decision { border-bottom: 1px solid var(--rule); border-left: 3px solid var(--rule-strong); background: #fff; color: var(--ink); }
.import-decision.tone-amber { border-left-color: var(--amber-strong); background: #fff; color: var(--ink); }
.import-decision.tone-coral { border-left-color: var(--danger); background: #fff; color: var(--ink); }
.import-decision.tone-blue { border-left-color: var(--blue-strong); background: #fff; color: var(--ink); }
.import-decision fieldset { margin: 0; padding: 20px 22px; border: 0; }
.import-decision-header span { color: var(--muted); font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.import-decision-header h3 { margin: 3px 0 2px; font-size: 15px; }
.import-decision-header p { margin: 0; color: var(--muted); font-size: 11px; }
.import-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0; border-block: 1px solid var(--rule); background: #fbfcfc; }
.import-comparison > div { display: grid; min-height: 76px; align-content: center; gap: 2px; padding: 12px 15px; border-right: 1px solid var(--rule); }
.import-comparison > div:last-child { border-right: 0; }
.import-comparison span, .import-comparison small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.import-comparison strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.import-decision-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); }
.import-decision-options label { display: flex; min-height: 67px; align-items: flex-start; gap: 9px; padding: 12px; border-right: 1px solid var(--rule); cursor: pointer; }
.import-decision-options label:last-child { border-right: 0; }
.import-decision-options label:hover { background: var(--surface-subtle); }
.import-decision-options input { margin-top: 3px; accent-color: var(--evergreen); }
.import-decision-options span { display: grid; }
.import-decision-options strong { font-size: 11px; }
.import-decision-options small { color: var(--muted); font-size: 9px; }
.import-decision-error { display: block; margin-top: 10px; color: var(--danger); font-size: 11px; font-weight: 550; }
.import-decision-actions { display: flex; justify-content: flex-end; padding-top: 12px; }
.import-suggestion-decision { scroll-margin-top: calc(var(--topbar-height) + 18px); }
.import-suggestion-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 16px 0; border: 1px solid var(--rule); background: #fbfcfc; }
.import-suggestion-values > div { display: grid; min-height: 62px; align-content: center; gap: 2px; padding: 10px 13px; border-right: 1px solid var(--rule); }
.import-suggestion-values > div:last-child { border-right: 0; }
.import-suggestion-values dt { color: var(--muted); font-size: 9px; }
.import-suggestion-values dd { margin: 0; font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.import-suggestion-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.import-preview-heading { align-items: center; }
.import-preview-filter select { min-width: 180px; height: 39px; padding: 0 34px 0 11px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; font-size: 11px; }
.import-bulk-form { display: grid; grid-template-columns: auto minmax(180px, 240px) auto 1fr; align-items: center; gap: 10px; margin-bottom: 14px; padding: 13px 15px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.import-bulk-form label { font-size: 11px; font-weight: 650; }
.import-bulk-form select { height: 38px; padding: 0 11px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; font-size: 11px; }
.import-bulk-form small { color: var(--muted); font-size: 9px; text-align: right; }
.import-preview-panel { border: 0; border-top: 1px solid var(--rule-strong); background: transparent; }
.import-preview-panel th { background: transparent; }
.import-preview-table { min-width: 1120px; }
.import-preview-table th:nth-child(1) { width: 5%; }
.import-preview-table th:nth-child(2) { width: 10%; }
.import-preview-table th:nth-child(3) { width: 23%; }
.import-preview-table th:nth-child(4) { width: 12%; }
.import-preview-table th:nth-child(5) { width: 9%; }
.import-preview-table th:nth-child(6) { width: 11%; }
.import-preview-table th:nth-child(7) { width: 13%; }
.import-preview-table th:nth-child(8) { width: 12%; }
.import-preview-table th:last-child { width: 52px; }
.import-commit-bar { position: sticky; z-index: 8; bottom: 0; display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 20px; margin: 34px 0 -42px; padding: 14px 18px; border: 1px solid var(--rule-strong); background: rgba(255,255,255,.97); backdrop-filter: blur(8px); }
.import-commit-bar > div:first-child { display: grid; min-width: 0; }
.import-commit-bar strong { font-size: 12px; }
.import-commit-bar span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.import-commit-bar form { display: flex; flex: 0 0 auto; gap: 10px; }
.import-commit-bar > .import-commit-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 10px; }
.import-commit-actions form { display: flex; }
.provider-discard-button { border-color: #d5aaa8; color: #8b2929; }
.provider-discard-button:hover { border-color: #c27b78; background: #fff2f1; }
.import-commit-bar button:disabled { border-color: var(--rule-strong); background: #cfd7d4; color: #68736f; cursor: not-allowed; }

.import-detail-grid { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.28fr); gap: 22px; align-items: start; }
.import-metadata { margin: 0; }
.import-metadata code { font-size: 10px; }
.import-retention-status { display: flex; align-items: center; gap: 7px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--amber-strong); font-size: 10px; }
.import-retention-status.is-complete { color: var(--evergreen); }
.import-retention-status .icon { width: 15px; height: 15px; }
.import-result-panel { min-width: 0; }
.import-result-table { min-width: 580px; }
.import-result-table th:nth-child(1) { width: 10%; }
.import-result-table th:nth-child(2) { width: 56%; }
.import-result-table th:nth-child(3) { width: 26%; }
.import-result-table th:last-child { width: 42px; }
.import-failure-table { min-width: 760px; }
.import-failure-table th:nth-child(1) { width: 9%; }
.import-failure-table th:nth-child(2) { width: 35%; }
.import-failure-table th:nth-child(3) { width: 56%; }
.import-error-cell { color: var(--danger); }
.import-audit-table { min-width: 820px; }
.import-audit-table th:nth-child(1) { width: 8%; }
.import-audit-table th:nth-child(2) { width: 22%; }
.import-audit-table th:nth-child(3) { width: 31%; }
.import-audit-table th:nth-child(4) { width: 19%; }
.import-audit-table th:nth-child(5) { width: 20%; }

/* Registry CSV staging and review */
.registry-import-canvas .calendar-tabs { margin-inline: 0; }
.domain-provider-section { margin: 4px 0 28px; padding-top: 22px; border-top: 1px solid var(--rule-strong); }
.domain-provider-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 15px; }
.domain-provider-heading .eyebrow, .provider-review-notice .eyebrow { color: var(--evergreen); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.domain-provider-heading h3 { margin: 3px 0 3px; font-size: 17px; letter-spacing: -.015em; }
.domain-provider-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.domain-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--rule-strong); background: #fff; }
.domain-provider-card { display: grid; min-width: 0; align-content: start; gap: 13px; padding: 19px; border-right: 1px solid var(--rule); }
.domain-provider-card:last-child { border-right: 0; }
.domain-provider-card.is-sensitive { box-shadow: inset 0 3px 0 #d09545; }
.domain-provider-card-heading { display: flex; align-items: center; gap: 12px; }
.domain-provider-mark { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--sage); color: var(--evergreen); }
.domain-provider-mark .icon { width: 19px; height: 19px; }
.domain-provider-card-heading > div { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 12px; }
.domain-provider-card h4 { margin: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.domain-provider-inventory { min-height: 31px; margin: 0; color: #46524d; font-size: 10px; line-height: 1.5; }
.domain-provider-meta { margin: 0; padding-block: 10px; border-block: 1px solid var(--rule); }
.domain-provider-meta > div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.domain-provider-meta dt { color: var(--muted); font-size: 9px; }
.domain-provider-meta dd { min-width: 0; margin: 0; overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.domain-provider-notice, .domain-provider-warning { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.domain-provider-notice .icon, .domain-provider-warning .icon { width: 14px; height: 14px; margin-top: 1px; }
.domain-provider-warning { padding: 10px 11px; border: 1px solid #ead3ad; background: #fff8ec; color: #70480b; }
.domain-provider-warning span { display: grid; gap: 2px; }
.domain-provider-warning strong { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.domain-provider-actions { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; }
.domain-provider-actions form { display: flex; }
.domain-provider-actions .text-link { flex: 0 0 auto; font-size: 10px; }
.domain-provider-actions .text-link .icon { width: 12px; height: 12px; }
.domain-provider-permission { color: var(--muted); font-size: 9px; }
.provider-review-notice { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; margin: 0 0 30px; padding: 17px 18px; border: 1px solid #b9d5c8; background: #f1f8f4; }
.provider-review-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--sage); color: var(--evergreen); }
.provider-review-icon .icon { width: 18px; height: 18px; }
.provider-review-notice h3 { margin: 2px 0 4px; font-size: 14px; }
.provider-review-notice p { margin: 2px 0 0; color: #46524d; font-size: 10px; line-height: 1.5; }
.registry-import-filters { flex-wrap: wrap; }
.registry-import-history-table { min-width: 1180px; }
.registry-import-history-table th:nth-child(1) { width: 11%; }
.registry-import-history-table th:nth-child(2) { width: 15%; }
.registry-import-history-table th:nth-child(3) { width: 14%; }
.registry-import-history-table th:nth-child(4) { width: 15%; }
.registry-import-history-table th:nth-child(5) { width: 11%; }
.registry-import-history-table th:nth-child(6) { width: 6%; }
.registry-import-history-table th:nth-child(7) { width: 17%; }
.registry-import-history-table th:nth-child(8) { width: 9%; }
.registry-import-history-table th:last-child { width: 42px; }
.registry-kind-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--rule); }
.registry-kind-option { display: flex; min-height: 78px; align-items: flex-start; gap: 10px; padding: 15px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); cursor: pointer; }
.registry-kind-option:nth-child(2n) { border-right: 0; }
.registry-kind-option:nth-last-child(-n+2) { border-bottom: 0; }
.registry-kind-option:hover { background: var(--surface-subtle); }
.registry-kind-option[aria-current="true"] { background: #eaf2ee; box-shadow: inset 3px 0 0 var(--evergreen); }
.registry-kind-option span { display: grid; gap: 3px; }
.registry-kind-option strong { font-size: 12px; }
.registry-kind-option small { color: var(--muted); font-size: 9px; }
.registry-mapping-table { min-width: 980px; }
.registry-mapping-table th:nth-child(1) { width: 20%; }
.registry-mapping-table th:nth-child(2) { width: 23%; }
.registry-mapping-table th:nth-child(3) { width: 24%; }
.registry-mapping-table th:nth-child(4) { width: 33%; }
.registry-field-contract { display: grid; gap: 3px; color: #46524d; font-size: 10px; white-space: normal; }
.registry-field-contract small { color: var(--muted); font-size: 9px; }
.registry-review-table { min-width: 1160px; margin: 0; }
.registry-review-table th:nth-child(1) { width: 5%; }
.registry-review-table th:nth-child(2) { width: 10%; }
.registry-review-table th:nth-child(3) { width: 34%; }
.registry-review-table th:nth-child(4) { width: 17%; }
.registry-review-table th:nth-child(5) { width: 12%; }
.registry-review-table th:nth-child(6) { width: 22%; }
.registry-review-record { display: grid; min-width: 0; gap: 2px; }
.registry-review-record strong { margin-bottom: 2px; overflow-wrap: anywhere; }
.registry-review-record small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.registry-review-record b { color: #46524d; font-weight: 650; }
.registry-identity { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.registry-target { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.registry-row-errors { display: grid; gap: 3px; margin: 0; padding-left: 15px; color: var(--danger); font-size: 9px; white-space: normal; }
.registry-row-valid { display: inline-flex; align-items: center; gap: 5px; color: var(--evergreen); font-size: 10px; font-weight: 650; }
.registry-row-valid .icon { width: 13px; height: 13px; }
.registry-result-table { min-width: 920px; }
.registry-result-table th:nth-child(1) { width: 6%; }
.registry-result-table th:nth-child(2) { width: 12%; }
.registry-result-table th:nth-child(3) { width: 34%; }
.registry-result-table th:nth-child(4) { width: 14%; }
.registry-result-table th:nth-child(5) { width: 28%; }
.registry-result-table th:last-child { width: 42px; }

/* Settings and portable data export */
.settings-canvas { min-height: calc(100vh - var(--topbar-height)); background: #fafcfb; }
.backup-health-section { scroll-margin-top: calc(var(--topbar-height) + 18px); }
.settings-header h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.025em; }
.settings-section { margin-top: 14px; border-top: 1px solid var(--rule-strong); }
.settings-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 26px 0 22px; }
.settings-section-heading h3 { margin: 3px 0 5px; font-size: 19px; letter-spacing: -.02em; }
.settings-section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.settings-ledger { margin: 0; border-block: 1px solid var(--rule); background: #fbfcfc; }
.settings-ledger > div { display: grid; grid-template-columns: minmax(150px,.34fr) minmax(0,1fr); border-bottom: 1px solid var(--rule); }
.settings-ledger > div:last-child { border-bottom: 0; }
.settings-ledger dt { padding: 17px 18px; color: var(--muted); font-size: 10px; font-weight: 650; }
.settings-ledger dd { display: grid; gap: 3px; margin: 0; padding: 17px 18px; border-left: 1px solid var(--rule); }
.settings-ledger strong, .settings-ledger code { font-size: 12px; }
.settings-ledger small { color: var(--muted); font-size: 10px; }
.account-security-section .settings-section-heading { align-items: center; }
.identity-security-state { display: flex; align-items: flex-start; gap: 12px; padding: 17px 18px; border: 1px solid #c5ded1; background: #f1f8f4; color: #15543e; }
.identity-security-state > .icon { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.identity-security-state strong { font-size: 12px; }
.identity-security-state p { margin: 3px 0 0; color: #356b58; font-size: 10px; }
.identity-link-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 14px; padding: 17px 18px; border: 1px solid var(--rule); background: #fff; }
.identity-link-form .button { min-width: 190px; }
.identity-link-note { margin: 9px 0 0; color: var(--muted); font-size: 10px; }
.reminder-settings-form, .reminder-email-form { padding-bottom: 4px; }
.reminder-window-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.reminder-window-card { min-width: 0; margin: 0; padding: 19px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; }
.reminder-window-card legend { padding: 0 5px; font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.reminder-window-card > p { min-height: 31px; margin: 0 0 15px; color: var(--muted); font-size: 10px; }
.reminder-days-field input { font-variant-numeric: tabular-nums; }
.reminder-check { display: flex; min-height: 54px; align-items: flex-start; gap: 11px; margin-top: 15px; padding: 11px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fbfcfc; cursor: pointer; }
.reminder-check input { width: 17px; height: 17px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--evergreen); }
.reminder-check span { display: grid; gap: 2px; }
.reminder-check strong { font-size: 11px; }
.reminder-check small { color: var(--muted); font-size: 9px; font-weight: 400; }
.reminder-settings-actions { margin-top: 16px; }
.reminder-email-section .settings-section-heading { align-items: center; }
.reminder-email-form { display: grid; gap: 15px; }
.reminder-availability-note { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border-left: 3px solid var(--amber-strong); background: #fff7e9; color: #6f470e; }
.reminder-availability-note > .icon { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.reminder-availability-note strong { font-size: 11px; }
.reminder-availability-note p { margin: 2px 0 0; font-size: 10px; }
.reminder-email-controls { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 14px; align-items: stretch; }
.reminder-email-toggle { display: flex; min-height: 84px; align-items: flex-start; gap: 12px; padding: 17px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.reminder-email-toggle input { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--evergreen); }
.reminder-email-toggle input:disabled { cursor: not-allowed; }
.reminder-email-toggle:has(input:disabled) { background: #f5f7f6; cursor: not-allowed; }
.reminder-email-toggle span { display: grid; gap: 3px; }
.reminder-email-toggle strong { font-size: 12px; }
.reminder-email-toggle small { color: var(--muted); font-size: 10px; font-weight: 400; }
.reminder-email-controls > .field { padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; }
.native-notification-forms { display: grid; gap: 15px; padding-bottom: 4px; }
.notification-target-state { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fbfcfc; }
.notification-target-state > div { display: grid; gap: 2px; }
.notification-target-state strong { font-size: 11px; }
.notification-target-state small, .notification-test-form small { color: var(--muted); font-size: 10px; }
.notification-test-form { display: flex; align-items: center; gap: 12px; }
.notification-privacy-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-left: 3px solid var(--blue-strong); background: #f1f6fc; color: #244f78; }
.notification-privacy-note .icon { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.notification-privacy-note p { margin: 0; font-size: 10px; }
.button:disabled { border-color: var(--rule); background: #eef1f0; color: #7d8783; cursor: not-allowed; }
.reminder-permission-note { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 17px 18px; border: 1px solid var(--rule); background: #fbfcfc; }
.reminder-permission-note > div { display: grid; gap: 2px; }
.reminder-permission-note strong { font-size: 12px; }
.reminder-permission-note small, .reminder-permission-note p { color: var(--muted); font-size: 10px; }
.reminder-permission-note p { max-width: 430px; margin: 0; text-align: right; }

/* Workspace API credentials and durable signed webhooks */
.automation-canvas { width: min(1240px, 100%); margin: 0 auto; }
.automation-header .text-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 650; }
.automation-header .text-link .icon { width: 14px; height: 14px; }
.automation-header h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.automation-header p { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.automation-contract { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; border-block: 1px solid var(--rule-strong); background: #fbfcfc; }
.automation-contract > div { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 16px 18px; border-right: 1px solid var(--rule); }
.automation-contract > div:last-child { border-right: 0; }
.automation-contract .icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--evergreen); }
.automation-contract span, .automation-primary { display: grid; min-width: 0; gap: 3px; }
.automation-contract strong, .automation-primary strong { font-size: 11px; }
.automation-contract small, .automation-primary small { color: var(--muted); font-size: 9px; }
.automation-section code { overflow-wrap: anywhere; }
.automation-create-form { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(210px, .55fr) auto; align-items: end; gap: 14px; padding: 18px; border: 1px solid var(--rule); background: #fff; }
.automation-create-form > .button { min-width: 190px; }
.automation-table-shell { margin-top: 16px; }
.automation-table { min-width: 940px; margin: 0; }
.automation-table th, .automation-table td { vertical-align: middle; }
.automation-table td { font-size: 10px; }
.automation-primary code { display: block; max-width: 440px; overflow: hidden; color: #46524d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.button-small { min-height: 31px; padding: 6px 10px; font-size: 9px; }
.button:disabled { opacity: .52; cursor: not-allowed; }
.automation-webhook-form { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--rule); background: #fff; }
.automation-endpoint-fields { display: grid; grid-template-columns: minmax(240px, .65fr) minmax(360px, 1.35fr); gap: 14px; }
.automation-event-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.automation-event-fieldset legend { margin-bottom: 9px; font-size: 11px; font-weight: 700; }
.automation-event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); }
.automation-event-option { display: flex; min-height: 74px; align-items: flex-start; gap: 10px; padding: 13px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: #fbfcfc; cursor: pointer; }
.automation-event-option:nth-child(3n) { border-right: 0; }
.automation-event-option:nth-last-child(-n+3) { border-bottom: 0; }
.automation-event-option input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--evergreen); }
.automation-event-option span { display: grid; gap: 3px; }
.automation-event-option strong { font-size: 10px; }
.automation-event-option small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.automation-event-summary { display: block; max-width: 410px; color: #46524d; font-size: 9px; line-height: 1.5; white-space: normal; }
.automation-endpoint-table { min-width: 990px; }
.automation-row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.automation-empty-history { margin: 0; padding: 28px 18px; border-block: 1px solid var(--rule); background: #fbfcfc; color: var(--muted); font-size: 10px; text-align: center; }
.automation-secret-canvas { width: min(980px, 100%); margin: 0 auto; }
.automation-secret-panel { margin-top: 18px; border-block: 1px solid var(--rule-strong); background: #fff; }
.automation-secret-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 20px; border-bottom: 1px solid var(--rule); }
.automation-secret-heading h3 { margin: 3px 0 4px; font-size: 19px; }
.automation-secret-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.automation-secret-value { padding: 22px 20px; background: #f2f7f4; }
.automation-secret-value code { display: block; overflow-wrap: anywhere; color: #0b513a; font-size: 13px; line-height: 1.6; user-select: all; }
.automation-secret-warning { display: flex; align-items: flex-start; gap: 11px; padding: 14px 20px; border-block: 1px solid #ead3ad; background: #fff7e9; color: #6f470e; }
.automation-secret-warning .icon { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.automation-secret-warning p { margin: 0; font-size: 10px; line-height: 1.5; }
.automation-usage { display: grid; gap: 8px; padding: 20px; }
.automation-usage strong { font-size: 11px; }
.automation-usage pre { max-width: 100%; margin: 0; padding: 14px; overflow: auto; border: 1px solid var(--rule); background: #fbfcfc; white-space: pre-wrap; word-break: break-word; }
.automation-usage code { font-size: 10px; line-height: 1.6; }
.automation-secret-panel > .form-actions { padding: 0 20px 22px; }

/* Per-record reminder inheritance and overrides */
.reminder-preferences-canvas { width: min(1100px, 100%); min-height: calc(100vh - var(--topbar-height)); margin: 0 auto; background: #fafcfb; }
.reminder-preferences-header { margin-bottom: 24px; }
.reminder-preferences-header .text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 650; }
.reminder-preferences-header .text-link .icon { width: 14px; height: 14px; }
.reminder-preferences-header p strong { color: var(--ink); }
.reminder-preferences-form { display: grid; gap: 18px; }
.reminder-preference-list { display: grid; gap: 14px; }
.reminder-preference-card { padding: 20px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; }
.reminder-preference-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.reminder-preference-heading h3 { margin: 0; font-size: 15px; letter-spacing: -.015em; }
.reminder-preference-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.reminder-preference-heading .status { flex: 0 0 auto; }
.reminder-mode-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.reminder-mode-group > legend { margin-bottom: 7px; padding: 0; font-size: 11px; font-weight: 650; }
.reminder-mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; }
.reminder-mode-options label { display: flex; min-width: 0; min-height: 70px; align-items: flex-start; gap: 10px; padding: 13px; border-right: 1px solid var(--rule); background: #fbfcfc; cursor: pointer; }
.reminder-mode-options label:last-child { border-right: 0; }
.reminder-mode-options label:has(input:checked) { background: var(--sage); }
.reminder-mode-options input { width: 16px; height: 16px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--evergreen); }
.reminder-mode-options span { display: grid; min-width: 0; gap: 2px; }
.reminder-mode-options strong { font-size: 11px; }
.reminder-mode-options small { color: var(--muted); font-size: 9px; font-weight: 400; }
.reminder-preference-custom { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, .8fr); gap: 14px; align-items: end; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--rule); }
.reminder-preference-custom > .reminder-check { margin-top: 0; }
.reminder-preferences-actions { padding-top: 2px; }

/* Projected versus actual reports */
.reports-canvas { min-height: calc(100vh - var(--topbar-height)); background: #fafcfb; }
.report-metric-band { min-height: 162px; }
.report-metric-band .metric-item { gap: 24px; padding-inline: 34px; }
.report-content { min-height: 560px; padding: 29px 24px 36px; }
.report-content-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 6px 21px; }
.report-content-header h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.025em; }
.report-content-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.report-drilldown-header { align-items: flex-start; }
.report-back-link { margin-bottom: 12px; }
.report-export { flex: 0 0 auto; }

.report-filters { display: grid; grid-template-columns: minmax(170px,.8fr) minmax(180px,.9fr) minmax(150px,.7fr) minmax(150px,.7fr) auto; align-items: end; gap: 14px; margin: 0 5px 24px; }
.report-filter-field { display: grid; min-width: 0; gap: 6px; }
.report-filter-field > span { font-size: 11px; font-weight: 650; }
.report-filter-field select, .report-filter-field input { width: 100%; height: 43px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background-color: #fff; font-size: 12px; }
.report-filter-field select { appearance: none; padding: 0 38px 0 13px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2314211c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.report-filter-field input { padding: 0 12px; }
.report-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.report-filters > small { grid-column: 4; margin-top: -9px; color: var(--muted); font-size: 9px; }

.report-notices { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 13px; margin: 0 5px 24px; padding: 14px 16px; border-block: 1px solid #ead3ad; background: #fff8ec; color: #61430e; }
.report-notice-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--amber); color: var(--amber-strong); }
.report-notice-icon .icon { width: 18px; height: 18px; }
.report-notices ul { display: grid; align-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.report-notices li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 11px; }
.report-notices li.tone-info { color: #365467; }
.report-notices a { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: var(--evergreen); font-weight: 650; }
.report-notices a:hover { text-decoration: underline; text-underline-offset: 3px; }
.report-notices a .icon { width: 13px; height: 13px; }

.report-data-section { margin: 0 5px; }
.report-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.report-section-heading h3 { margin: 0; font-size: 17px; font-weight: 720; letter-spacing: -.02em; }
.report-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.report-data-panel { border: 0; border-top: 1px solid var(--rule-strong); background: transparent; }
.report-data-panel table { background: transparent; }
.report-data-panel th { height: 41px; background: transparent; font-size: 9px; }
.report-data-panel td, .report-data-panel tbody th { height: 57px; }
.report-data-panel tbody th { overflow: hidden; padding: 0 14px; border-bottom: 1px solid var(--rule); color: #3c4944; font-size: 11px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.report-table-scroll:focus-visible { outline-offset: 4px; }
.report-breakdown-table { min-width: 1080px; }
.report-breakdown-table .report-group-column { width: 20%; }
.report-breakdown-table .report-workspace-column { width: 12%; }
.report-breakdown-table .report-currency-column { width: 8%; }
.report-breakdown-table .report-amount-column { width: 12%; }
.report-breakdown-table .report-exception-column { width: 12%; }
.report-breakdown-table .report-action-column { width: 42px; }
.report-detail-table { min-width: 1180px; }
.report-detail-table th:nth-child(1) { width: 12%; }
.report-detail-table th:nth-child(2) { width: 20%; }
.report-detail-table th:nth-child(3), .report-detail-table th:nth-child(4), .report-detail-table th:nth-child(5), .report-detail-table th:nth-child(6) { width: 10%; }
.report-detail-table th:nth-child(7) { width: 12%; }
.report-detail-table th:nth-child(8) { width: 15%; }
.report-detail-table th:last-child { width: 42px; }
.report-row-label, .report-date, .report-money, .report-variance { display: grid; min-width: 0; }
.report-row-label strong, .report-row-label small, .report-date strong, .report-date small, .report-money strong, .report-money small, .report-variance strong, .report-variance small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-row-label strong { color: var(--ink); font-size: 11px; font-weight: 650; }
.report-row-label small, .report-date small, .report-money small, .report-variance small { color: var(--muted); font-size: 9px; }
.report-date strong, .report-money strong, .report-variance strong { font-size: 11px; font-weight: 650; }
.report-money, .report-variance { justify-items: end; font-variant-numeric: tabular-nums; }
.report-variance.tone-over strong, .report-variance.tone-danger strong { color: var(--danger); }
.report-variance.tone-under strong, .report-variance.tone-positive strong { color: var(--evergreen); }
.report-exceptions { color: var(--muted); font-size: 10px; }
.report-exceptions.tone-warning, .report-exceptions.tone-attention { color: var(--amber-strong); }
.report-exceptions.tone-danger { color: var(--danger); }
.report-inclusion-note { margin: 18px 5px 0; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 10px; }

@media (max-width: 1400px) {
  :root { --sidebar-width: 210px; }
  .brand { font-size: 15px; }
  .metric-item { gap: 12px; padding-inline: 18px; }
  .expense-metric-band .metric-item { gap: 12px; padding-inline: 18px; }
  .report-metric-band .metric-item { gap: 12px; padding-inline: 18px; }
  .metric-icon { width: 42px; height: 42px; }
  .metric-value strong { font-size: 21px; }
  .dashboard-grid { grid-template-columns: minmax(500px, 1.25fr) minmax(320px, .8fr) minmax(220px, .55fr); }
  .panel { padding-inline: 18px; }
  .attention-panel { padding-inline: 16px; }
  .timeline li { gap: 6px; }
}

@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: 1.2fr .85fr; }
  .attention-panel { grid-column: 1 / -1; border-top: 1px solid var(--rule); }
  .attention-list { display: grid; grid-template-columns: repeat(4, 1fr); }
  .attention-list li a { padding-right: 15px; }
  .expense-filter-primary { grid-template-columns: minmax(250px, 1.4fr) minmax(140px, .7fr) minmax(150px, .75fr); }
  .expense-detail-header { align-items: flex-start; flex-direction: column; }
  .detail-actions { justify-content: flex-start; flex-wrap: wrap; }
  .recurring-detail-header { align-items: flex-start; flex-direction: column; }
  .report-filters { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .report-filter-actions { grid-column: 1 / -1; grid-row: 4; justify-content: flex-start; }
  .report-filters > small { grid-column: 2; grid-row: 3; align-self: center; margin: 0; }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform 160ms ease; box-shadow: 8px 0 30px rgba(20,33,28,.12); }
  .nav-open .sidebar { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .mobile-menu { display: inline-grid; width: 38px; height: 38px; place-items: center; }
  .topbar { padding-inline: 16px; }
  .period-control { display: none; }
  .metric-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-item:nth-child(2) { border-right: 0; }
  .metric-item:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 1px solid var(--rule); }
  .attention-panel { grid-column: auto; }
  .attention-list { grid-template-columns: repeat(2, 1fr); }
  .detail-ledger { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-ledger > div:nth-child(2) { border-right: 0; }
  .detail-ledger > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .split-detail { grid-template-columns: 1fr; }
  .expense-detail-grid { grid-template-columns: 1fr; }
  .match-action, .unmatch-action { grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); }
  .match-action .button { justify-self: start; }
  .import-summary-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-summary-item:nth-child(2n) { border-right: 0; }
  .import-summary-item:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .import-detail-grid { grid-template-columns: 1fr; }
  .import-bulk-form { grid-template-columns: auto minmax(180px, 1fr) auto; }
  .import-bulk-form small { grid-column: 1 / -1; text-align: left; }
  .domain-provider-grid { grid-template-columns: 1fr; }
  .domain-provider-card { border-right: 0; border-bottom: 1px solid var(--rule); }
  .domain-provider-card:last-child { border-bottom: 0; }
  .report-notices li { align-items: flex-start; flex-direction: column; gap: 3px; }
}

@media (max-width: 680px) {
  .topbar { height: auto; min-height: 62px; flex-wrap: wrap; padding-block: 10px; }
  .topbar h1 { font-size: 21px; }
  .topbar-actions { width: 100%; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .workspace-form select { width: 160px; }
  .topbar-actions .button { padding-inline: 12px; }
  .expenses-topbar .topbar-actions { justify-content: flex-start; }
  .expenses-topbar .topbar-actions > .button { position: static; }
  .metric-band { grid-template-columns: 1fr; }
  .metric-item { border-right: 0; border-bottom: 1px solid var(--rule); }
  .dashboard-grid { min-height: 0; }
  .panel, .recent-panel, .content-canvas, .expense-history { padding: 18px 16px; }
  .timeline li { grid-template-columns: 72px 14px minmax(0,1fr) minmax(82px,.6fr); gap: 7px; }
  .timeline li:not(:last-child)::after { left: 79px; }
  .timeline-kind, .timeline-payment { display: none; }
  .attention-list { grid-template-columns: 1fr; }
  .chart-wrap { height: 240px; }
  .recent-panel { min-height: 300px; }
  table { min-width: 760px; }
  .content-header { align-items: flex-start; flex-direction: column; }
  .filter-bar { align-items: stretch; flex-wrap: wrap; }
  .filter-bar .search-control { flex: 1 0 100%; width: 100%; }
  .filter-bar > label:not(.search-control) { flex: 1 1 150px; min-width: 0; }
  .filter-bar > label:not(.search-control) select { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .form-section { padding: 18px 16px; }
  .recurring-detail-header .detail-actions { width: 100%; }
  .recurring-detail-header .detail-actions .button { flex: 1 1 190px; white-space: normal; }
  .plan-section-heading { align-items: flex-start; flex-direction: column; }
  .lifecycle-form-heading, .lifecycle-section-heading { align-items: flex-start; flex-direction: column; }
  .lifecycle-state-grid { grid-template-columns: 1fr; }
  .lifecycle-state-grid > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .lifecycle-state-grid > div:last-child { border-bottom: 0; }
  .plan-impact-note { min-height: 0; }
  .lifecycle-impact-note { min-height: 0; }
  .plan-allocation-list .allocation-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .plan-confirmation { padding: 15px 16px; }
  .detail-ledger { grid-template-columns: 1fr; }
  .detail-ledger > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .auth-body { padding: 16px; }
  .auth-card { padding: 24px 20px; }
  .expense-history-header, .expense-subsection-heading { align-items: flex-start; flex-direction: column; }
  .expense-history-header { margin-inline: 0; }
  .expense-filters { margin-inline: 0; }
  .expense-filter-primary { grid-template-columns: 1fr; }
  .filter-popover { position: static; width: 100%; margin-top: 8px; }
  .date-filter-popover, .advanced-filter-grid { grid-template-columns: 1fr; }
  .date-filter-popover .button { grid-column: auto; justify-self: stretch; }
  .filter-popover-actions { align-items: stretch; flex-direction: column-reverse; }
  .filter-popover-actions .button { width: 100%; }
  .expense-allocation-row { grid-template-columns: minmax(0, 1fr) 105px; }
  .allocation-remove { grid-column: 1 / -1; width: max-content; height: 28px; }
  .allocation-summary { align-items: flex-end; flex-direction: column; gap: 4px; }
  .refund-context { grid-template-columns: 1fr; gap: 3px; }
  .form-section-heading { align-items: flex-start; flex-direction: column; }
  .expense-form-actions { position: sticky; z-index: 8; bottom: 0; margin: 0 -16px -18px; padding: 12px 16px; border-top: 1px solid var(--rule); background: rgba(247,249,248,.97); overflow-x: auto; }
  .expense-form-actions .button { flex: 0 0 auto; }
  .posting-note { text-align: left; }
  .detail-action-popover { position: fixed; inset: auto 16px 16px; width: auto; }
  .refund-summary { grid-template-columns: 1fr; }
  .refund-summary > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .refund-summary > div:last-child { border-bottom: 0; }
  .match-action, .unmatch-action { grid-template-columns: 1fr; }
  .match-action .button { width: 100%; }
  .document-upload { grid-template-columns: 1fr; padding: 16px; }
  .document-upload .button { width: 100%; }
  .document-list-heading { align-items: flex-start; flex-direction: column; gap: 2px; margin-bottom: 8px; }
  .import-canvas { padding: 18px 16px; }
  .import-step-nav { margin-bottom: 22px; }
  .import-workspace-context { grid-template-columns: 1fr; gap: 3px; }
	.import-rules-header { align-items: stretch; }
	.import-rules-header .button { width: 100%; }
	.import-rule-filters { align-items: stretch; flex-direction: column; }
	.import-rule-filters .import-status-filter { width: 100%; }
  .import-form-actions { position: sticky; z-index: 8; bottom: 0; margin: 0 -16px -18px; padding: 12px 16px; border-top: 1px solid var(--rule); background: rgba(247,249,248,.97); overflow-x: auto; }
  .import-form-actions .button { flex: 0 0 auto; }
  .import-review-header, .import-detail-header, .import-section-heading, .import-preview-heading { align-items: flex-start; flex-direction: column; }
  .import-title-line { align-items: flex-start; flex-direction: column; gap: 6px; }
  .import-summary-item { min-height: 92px; padding: 14px 16px; }
  .import-comparison { grid-template-columns: 1fr; }
  .import-comparison > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .import-comparison > div:last-child { border-bottom: 0; }
  .import-decision fieldset { padding: 17px 14px; }
  .import-decision-options { grid-template-columns: 1fr; }
  .import-decision-options label { border-right: 0; border-bottom: 1px solid var(--rule); }
  .import-decision-options label:last-child { border-bottom: 0; }
	.import-suggestion-values { grid-template-columns: 1fr; }
	.import-suggestion-values > div { border-right: 0; border-bottom: 1px solid var(--rule); }
	.import-suggestion-values > div:last-child { border-bottom: 0; }
  .import-preview-filter, .import-preview-filter select { width: 100%; }
  .import-bulk-form { grid-template-columns: 1fr; }
  .import-bulk-form .button { width: 100%; }
  .import-bulk-form small { grid-column: auto; }
  .import-commit-bar { align-items: stretch; flex-direction: column; margin-inline: -16px; padding: 12px 16px; }
  .import-commit-bar span { white-space: normal; }
  .import-commit-bar form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-commit-bar .button { min-width: 0; white-space: normal; }
  .import-commit-bar > .import-commit-actions { display: grid; width: 100%; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .import-commit-actions form, .import-commit-actions .button { width: 100%; }
  .import-detail-header .detail-actions { width: 100%; }
  .domain-provider-heading { align-items: stretch; flex-direction: column; }
  .domain-provider-heading .button { width: 100%; }
  .domain-provider-card-heading > div, .domain-provider-actions { align-items: flex-start; flex-direction: column; }
  .domain-provider-inventory { min-height: 0; }
  .provider-review-notice { grid-template-columns: 32px minmax(0, 1fr); padding: 14px; }
  .provider-review-icon { width: 30px; height: 30px; }
  .report-content { padding: 18px 16px; }
  .report-content-header, .report-section-heading { align-items: flex-start; flex-direction: column; margin-inline: 0; }
  .report-export { width: 100%; }
  .report-filters, .report-data-section, .report-notices, .report-inclusion-note { margin-inline: 0; }
  .report-filters { grid-template-columns: 1fr; }
  .report-filter-actions { grid-column: auto; grid-row: auto; display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filter-actions .button { width: 100%; }
  .report-filters > small { grid-column: auto; grid-row: auto; margin-top: -6px; }
  .report-notices { grid-template-columns: 32px minmax(0,1fr); padding-inline: 13px; }
  .report-notice-icon { width: 30px; height: 30px; }
  .report-breakdown-table { min-width: 1080px; }
  .report-detail-table { min-width: 1180px; }
}

/* Payment-method detail and card replacement */
.payment-method-detail-header, .payment-method-replace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.payment-method-title { display: flex; min-width: 0; align-items: center; gap: 12px; }
.payment-method-title h2 { min-width: 0; overflow-wrap: anywhere; }
.payment-method-detail-actions { flex-wrap: wrap; }
.payment-method-ledger small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-method-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.payment-method-overview { min-width: 0; margin: 0; }
.payment-method-section-intro { margin: -8px 0 18px; color: var(--muted); font-size: 11px; }
.payment-method-assignment-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.payment-method-assignment-list li { display: flex; min-height: 38px; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--rule); background: #fbfcfc; font-size: 12px; font-weight: 600; }
.payment-method-assignment-list .icon { width: 15px; height: 15px; color: var(--evergreen); }
.payment-method-retention-note { display: grid; gap: 3px; margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--blue-strong); background: #f1f6fb; color: #365467; }
.payment-method-retention-note strong { font-size: 12px; }
.payment-method-retention-note span { font-size: 10px; line-height: 1.45; }
.payment-method-detail-section { min-width: 0; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--rule); }
.payment-method-section-heading { display: flex; min-height: 44px; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.payment-method-section-heading h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.payment-method-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.payment-method-impact-table th:nth-child(1) { width: 34%; }
.payment-method-impact-table th:nth-child(2) { width: 23%; }
.payment-method-impact-table th:nth-child(3) { width: 20%; }
.payment-method-impact-table th:nth-child(4) { width: 16%; }
.payment-method-impact-table th:nth-child(5) { width: 42px; }
.payment-method-upcoming-table th:nth-child(1) { width: 18%; }
.payment-method-upcoming-table th:nth-child(2) { width: 31%; }
.payment-method-upcoming-table th:nth-child(3) { width: 22%; }
.payment-method-upcoming-table th:nth-child(4) { width: 18%; }
.payment-method-upcoming-table th:nth-child(5) { width: 15%; }
.payment-method-domains-table th:nth-child(1) { width: 25%; }
.payment-method-domains-table th:nth-child(2) { width: 20%; }
.payment-method-domains-table th:nth-child(3), .payment-method-domains-table th:nth-child(4) { width: 16%; }
.payment-method-domains-table th:nth-child(5) { width: 20%; }
.payment-method-domains-table th:nth-child(6) { width: 42px; }
.payment-method-expenses-table th:nth-child(1) { width: 13%; }
.payment-method-expenses-table th:nth-child(2) { width: 28%; }
.payment-method-expenses-table th:nth-child(3) { width: 19%; }
.payment-method-expenses-table th:nth-child(4) { width: 12%; }
.payment-method-expenses-table th:nth-child(5) { width: 15%; }
.payment-method-expenses-table th:nth-child(6) { width: 12%; }
.payment-method-expenses-table th:nth-child(7) { width: 42px; }
.payment-method-audit-table th:nth-child(1) { width: 18%; }
.payment-method-audit-table th:nth-child(2) { width: 22%; }
.payment-method-audit-table th:nth-child(3) { width: 18%; }
.payment-method-audit-table th:nth-child(4) { width: 42%; }

.payment-method-replace-canvas { min-height: calc(100vh - var(--topbar-height)); background: #fafcfb; }
.payment-method-replace-form { max-width: 1080px; margin: 0 auto; }
.payment-method-replace-header h2 { margin-top: 12px; }
.payment-method-form-error { margin: 0 0 22px; }
.payment-method-replacement-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.payment-method-replacement-summary > div { display: grid; min-height: 104px; align-content: center; gap: 4px; padding: 16px 19px; border-right: 1px solid var(--rule); }
.payment-method-replacement-summary > div:last-child { border-right: 0; }
.payment-method-replacement-summary span, .payment-method-replacement-summary small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.payment-method-replacement-summary strong { min-width: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.payment-method-replace-section fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.payment-method-replace-section legend { margin: 0 0 18px; padding: 0; font-size: 15px; font-weight: 700; }
.payment-method-replace-section .safety-note { margin: 0 0 20px; }
.payment-method-fixed-label { font-size: 12px; font-weight: 650; }
.payment-method-fixed-value { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #f5f7f6; }
.payment-method-fixed-value strong { font-size: 12px; }
.payment-method-selection-list { display: grid; gap: 8px; }
.payment-method-selection-card { display: grid; min-height: 62px; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid var(--rule); background: #fff; cursor: pointer; }
.payment-method-selection-card:hover { border-color: #a9b5b0; background: #f8faf9; }
.payment-method-selection-card:has(input:checked) { border-color: #a9c8bb; background: #f2f8f5; }
.payment-method-selection-card input, .payment-method-confirmation-check input { width: 18px; height: 18px; accent-color: var(--evergreen); }
.payment-method-selection-copy { display: grid; min-width: 0; gap: 2px; }
.payment-method-selection-copy strong, .payment-method-selection-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-method-selection-copy strong { font-size: 12px; }
.payment-method-selection-copy small { color: var(--muted); font-size: 10px; }
.payment-method-empty-selection { padding: 24px 14px; border: 1px dashed var(--rule-strong); color: var(--muted); font-size: 11px; text-align: center; }
.payment-method-impact-error { margin: -6px 0 12px; }
.payment-method-domain-warning { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; margin-bottom: 22px; padding: 16px 18px; border: 1px solid #ead3ad; background: #fff8ec; color: #70480b; }
.payment-method-domain-warning > div:first-child { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #ffedcd; }
.payment-method-domain-warning .icon { width: 16px; height: 16px; }
.payment-method-domain-warning h3 { margin: 0 0 3px; font-size: 13px; }
.payment-method-domain-warning p { margin: 0; font-size: 10px; line-height: 1.45; }
.payment-method-domain-warning ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; }
.payment-method-domain-warning li { display: flex; min-width: 0; justify-content: space-between; gap: 10px; font-size: 10px; }
.payment-method-domain-warning li a, .payment-method-domain-warning li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-method-domain-warning li span { color: #8c6328; }
.payment-method-confirmation { margin-bottom: 24px; padding: 20px; border: 1px solid var(--rule-strong); background: #fff; }
.payment-method-confirmation h3 { margin: 0 0 12px; font-size: 15px; }
.payment-method-confirmation-check { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 11px; cursor: pointer; }
.payment-method-confirmation-check input { margin-top: 2px; }
.payment-method-confirmation-check span { display: grid; gap: 3px; }
.payment-method-confirmation-check strong { font-size: 12px; }
.payment-method-confirmation-check small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.payment-method-confirmation > .field-error { display: block; margin: 9px 0 0 33px; color: var(--danger); font-size: 11px; font-weight: 550; }
.payment-method-replace-actions { position: sticky; z-index: 8; bottom: 0; display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 20px; margin: 34px 0 -26px; padding: 14px 18px; border: 1px solid var(--rule-strong); background: rgba(255,255,255,.97); backdrop-filter: blur(8px); }
.payment-method-replace-actions > div:first-child { display: grid; min-width: 0; }
.payment-method-replace-actions > div:last-child { display: flex; flex: 0 0 auto; gap: 10px; }
.payment-method-replace-actions strong { font-size: 12px; }
.payment-method-replace-actions span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 980px) {
  .payment-method-detail-header { align-items: flex-start; flex-direction: column; }
  .payment-method-detail-actions { justify-content: flex-start; }
  .payment-method-replacement-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-method-replacement-summary > div:nth-child(2n) { border-right: 0; }
  .payment-method-replacement-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 680px) {
  .payment-method-detail-canvas, .payment-method-replace-canvas { padding: 18px 16px; }
  .payment-method-detail-actions { width: 100%; }
  .payment-method-detail-actions .button { width: 100%; }
  .payment-method-title { align-items: flex-start; flex-direction: column; gap: 6px; }
  .payment-method-ledger small { white-space: normal; }
  .payment-method-overview-grid { grid-template-columns: 1fr; }
  .payment-method-section-heading { align-items: flex-start; flex-direction: column; }
  .payment-method-section-heading .button { width: 100%; }
  .payment-method-replacement-summary { grid-template-columns: 1fr; }
  .payment-method-replacement-summary > div { min-height: 86px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .payment-method-replacement-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .payment-method-replacement-summary > div:last-child { border-bottom: 0; }
  .payment-method-replacement-summary span, .payment-method-replacement-summary small, .payment-method-replacement-summary strong { white-space: normal; }
  .payment-method-selection-card { min-height: 76px; grid-template-columns: 24px minmax(0, 1fr); }
  .payment-method-selection-card > .status { grid-column: 2; width: max-content; }
  .payment-method-selection-copy small { white-space: normal; }
  .payment-method-domain-warning ul { grid-template-columns: 1fr; }
  .payment-method-replace-actions { align-items: stretch; flex-direction: column; margin-inline: -16px; padding: 12px 16px; }
  .payment-method-replace-actions span { white-space: normal; }
  .payment-method-replace-actions > div:last-child { display: grid; grid-template-columns: minmax(90px, .55fr) minmax(0, 1.45fr); }
  .payment-method-replace-actions .button { min-width: 0; padding-inline: 10px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Ownership registry: clients and projects */
.ownership-canvas, .ownership-detail-canvas, .ownership-form-canvas { min-height: calc(100vh - var(--topbar-height)); background: #fafcfb; }
.ownership-content-header { margin: 0 5px 22px; }
.ownership-content-header h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.025em; }
.ownership-filters { display: grid; align-items: end; gap: 14px; margin: 0 5px 25px; }
.ownership-client-filters { grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .65fr) minmax(170px, .75fr) auto; }
.ownership-project-filters { grid-template-columns: minmax(230px, 1.35fr) repeat(4, minmax(135px, .72fr)) auto; }
.ownership-search { width: 100%; }
.ownership-search input { height: 43px; font-size: 12px; }
.ownership-search .icon { top: 12px; }
.ownership-filter-field { display: grid; min-width: 0; gap: 6px; }
.ownership-filter-field > span, .ownership-static-label { font-size: 10px; font-weight: 650; }
.ownership-filter-field select, .ownership-filter-field input { width: 100%; height: 43px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background-color: #fff; font-size: 12px; }
.ownership-filter-field select { appearance: none; padding: 0 38px 0 13px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2314211c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.ownership-filter-field input { padding: 0 12px; }
.ownership-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.ownership-data-panel { border: 0; border-top: 1px solid var(--rule-strong); background: transparent; }
.ownership-data-panel table { background: transparent; }
.ownership-data-panel th { height: 41px; background: transparent; font-size: 9px; }
.ownership-data-panel td { height: 57px; }
.ownership-table-scroll:focus-visible { outline-offset: 4px; }
.ownership-table { margin: 0; table-layout: fixed; }
.clients-table { min-width: 900px; }
.clients-table th:nth-child(1) { width: 24%; }
.clients-table th:nth-child(2) { width: 14%; }
.clients-table th:nth-child(3) { width: 25%; }
.clients-table th:nth-child(4) { width: 20%; }
.clients-table th:nth-child(5) { width: 12%; }
.clients-table th:nth-child(6) { width: 42px; }
.projects-table { min-width: 1080px; }
.projects-table th:nth-child(1) { width: 21%; }
.projects-table th:nth-child(2) { width: 12%; }
.projects-table th:nth-child(3) { width: 17%; }
.projects-table th:nth-child(4), .projects-table th:nth-child(5) { width: 10%; }
.projects-table th:nth-child(6) { width: 16%; }
.projects-table th:nth-child(7) { width: 9%; }
.projects-table th:nth-child(8) { width: 42px; }
.ownership-primary, .ownership-count { display: grid; min-width: 0; }
.ownership-primary strong, .ownership-primary small, .ownership-count strong, .ownership-count small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ownership-primary strong { color: var(--ink); font-size: 12px; font-weight: 650; }
.ownership-primary small, .ownership-count small { color: var(--muted); font-size: 9px; }
.ownership-count strong { font-size: 11px; font-weight: 650; }
.ownership-tags-text { color: #46524d; font-size: 10px; }
.ownership-empty-value { color: var(--muted); }
.ownership-external-link { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ownership-pagination { padding-inline: 5px; }

.ownership-form-back { margin-bottom: 13px; }
.ownership-form-error { margin: 0 0 22px; }
.ownership-form .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.ownership-static-label { display: block; }
.ownership-lock-note { display: flex; align-items: flex-start; gap: 8px; margin: -2px 0 0; padding: 11px 13px; border-left: 3px solid var(--blue-strong); background: #f1f6fb; color: #365467; font-size: 11px; }
.ownership-lock-note .icon { width: 15px; height: 15px; margin-top: 1px; }

.ownership-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ownership-detail-title { display: flex; min-width: 0; align-items: center; gap: 12px; }
.ownership-detail-title h2 { min-width: 0; overflow-wrap: anywhere; }
.ownership-detail-actions { flex-wrap: wrap; }
.ownership-archive-popover { width: 380px; }
.ownership-archive-popover > strong { font-size: 13px; }
.ownership-archive-popover .button:disabled { opacity: .45; cursor: not-allowed; }
.ownership-archive-blocker { display: flex; align-items: flex-start; gap: 8px; padding: 10px 11px; border: 1px solid #ead3ad; background: #fff8ec; color: #70480b; font-size: 10px; }
.ownership-archive-blocker .icon { width: 15px; height: 15px; flex: 0 0 auto; }
.ownership-period-filter { display: grid; grid-template-columns: 170px 170px auto 1fr; align-items: end; gap: 11px; margin: 0 0 18px; padding: 13px 16px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.ownership-period-filter .ownership-filter-field select, .ownership-period-filter .ownership-filter-field input { height: 38px; }
.ownership-period-filter .button { min-height: 38px; }
.ownership-period-filter > small { align-self: center; color: var(--muted); font-size: 9px; }
.ownership-metric-band { min-height: 140px; margin-bottom: 28px; border-top: 1px solid var(--rule); background: #fbfcfc; }
.ownership-metric-band .metric-item { padding: 22px 24px; }
.ownership-metric-empty { color: var(--muted); font-size: 22px; font-weight: 650; }
.ownership-client-detail-grid { display: grid; grid-template-columns: minmax(280px, .56fr) minmax(660px, 1.44fr); align-items: start; gap: 22px; }
.ownership-overview-section { margin: 0; }
.ownership-detail-section { min-width: 0; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--rule); }
.ownership-client-detail-grid .ownership-detail-section, .ownership-asset-grid .ownership-detail-section { margin-top: 0; padding-top: 0; border-top: 0; }
.ownership-section-heading { display: flex; min-height: 45px; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.ownership-section-heading h3 { margin: 0; font-size: 17px; font-weight: 720; letter-spacing: -.02em; }
.ownership-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.ownership-notes { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); }
.ownership-notes > span { color: var(--muted); font-size: 11px; }
.ownership-notes p { margin: 7px 0 0; white-space: pre-wrap; }
.ownership-project-overview { display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(280px, .85fr); gap: 28px; }
.ownership-project-overview > .ownership-notes { margin-top: 0; padding: 0 0 0 28px; border-top: 0; border-left: 1px solid var(--rule); }
.ownership-money-stack, .ownership-cost { display: grid; justify-items: end; gap: 2px; font-variant-numeric: tabular-nums; }
.ownership-money-stack > span { display: flex; justify-content: flex-end; gap: 6px; }
.ownership-money-stack small, .ownership-cost small { color: var(--muted); font-size: 8px; }
.ownership-money-stack strong, .ownership-cost strong { font-size: 10px; }
.ownership-cost.cost-tone-warning strong, .ownership-cost.cost-tone-attention strong { color: var(--amber-strong); }
.ownership-cost.cost-tone-danger strong { color: var(--danger); }
.ownership-cost.cost-tone-positive strong { color: var(--evergreen); }
.client-project-rollup-table { min-width: 1180px; }
.client-project-rollup-table th:nth-child(1) { width: 18%; }
.client-project-rollup-table th:nth-child(2) { width: 12%; }
.client-project-rollup-table th:nth-child(3), .client-project-rollup-table th:nth-child(4), .client-project-rollup-table th:nth-child(5), .client-project-rollup-table th:nth-child(6) { width: 13%; }
.client-project-rollup-table th:nth-child(7) { width: 10%; }
.client-project-rollup-table th:nth-child(8) { width: 42px; }
.project-dependencies-table { min-width: 900px; }
.project-dependencies-table th:nth-child(1) { width: 28%; }
.project-dependencies-table th:nth-child(2) { width: 14%; }
.project-dependencies-table th:nth-child(3) { width: 16%; }
.project-dependencies-table th:nth-child(4) { width: 22%; }
.project-dependencies-table th:nth-child(5) { width: 13%; }
.project-dependencies-table th:nth-child(6) { width: 42px; }
.ownership-asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--rule); }
.project-domains-table, .project-methods-table { min-width: 720px; }
.project-domains-table th:nth-child(1) { width: 25%; }
.project-domains-table th:nth-child(2) { width: 18%; }
.project-domains-table th:nth-child(3) { width: 24%; }
.project-domains-table th:nth-child(4) { width: 24%; }
.project-domains-table th:nth-child(5), .project-methods-table th:nth-child(5) { width: 42px; }
.project-methods-table th:nth-child(1) { width: 24%; }
.project-methods-table th:nth-child(2) { width: 27%; }
.project-methods-table th:nth-child(3) { width: 21%; }
.project-methods-table th:nth-child(4) { width: 19%; }
.project-upcoming-table { min-width: 800px; }
.project-upcoming-table th:nth-child(1) { width: 19%; }
.project-upcoming-table th:nth-child(2) { width: 25%; }
.project-upcoming-table th:nth-child(3) { width: 29%; }
.project-upcoming-table th:nth-child(4) { width: 20%; }
.project-upcoming-table th:nth-child(5) { width: 42px; }
.ownership-event-date { display: flex; align-items: center; gap: 9px; }
.ownership-event-date > span:last-child { display: grid; }
.ownership-event-date strong { font-size: 10px; }
.ownership-event-date small { color: var(--muted); font-size: 8px; }
.ownership-event-marker { display: block; width: 8px; height: 8px; flex: 0 0 auto; padding: 0; border-radius: 50%; }
.project-expenses-table { min-width: 850px; }
.project-expenses-table th:nth-child(1) { width: 13%; }
.project-expenses-table th:nth-child(2) { width: 29%; }
.project-expenses-table th:nth-child(3) { width: 20%; }
.project-expenses-table th:nth-child(4) { width: 20%; }
.project-expenses-table th:nth-child(5) { width: 12%; }
.project-expenses-table th:nth-child(6) { width: 42px; }

@media (max-width: 1200px) {
  .ownership-client-filters { grid-template-columns: minmax(250px, 1.2fr) repeat(2, minmax(150px, .7fr)); }
  .ownership-client-filters .ownership-filter-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .ownership-project-filters { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .ownership-project-filters .ownership-search { grid-column: span 2; }
  .ownership-project-filters .ownership-filter-actions { justify-content: flex-start; }
  .ownership-client-detail-grid { grid-template-columns: 1fr; }
  .ownership-asset-grid { grid-template-columns: 1fr; }
  .ownership-asset-grid .ownership-detail-section + .ownership-detail-section { margin-top: 8px; padding-top: 26px; border-top: 1px solid var(--rule); }
}

@media (max-width: 980px) {
  .ownership-detail-header { align-items: flex-start; flex-direction: column; }
  .ownership-detail-actions { justify-content: flex-start; }
  .ownership-period-filter { grid-template-columns: 160px 160px auto; }
  .ownership-period-filter > small { grid-column: 1 / -1; }
  .ownership-project-overview { grid-template-columns: 1fr; }
  .ownership-project-overview > .ownership-notes { padding: 20px 0 0; border-top: 1px solid var(--rule); border-left: 0; }
}

@media (max-width: 680px) {
  .ownership-canvas, .ownership-detail-canvas, .ownership-form-canvas { padding: 18px 16px; }
  .ownership-content-header, .ownership-filters { margin-inline: 0; }
  .ownership-client-filters, .ownership-project-filters { grid-template-columns: 1fr; }
  .ownership-project-filters .ownership-search { grid-column: auto; }
  .ownership-filter-actions, .ownership-client-filters .ownership-filter-actions, .ownership-project-filters .ownership-filter-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ownership-filter-actions .button { width: 100%; }
  .ownership-filter-actions .button:only-child { grid-column: 2; }
  .ownership-form-actions { position: sticky; z-index: 8; bottom: 0; margin: 0 -16px -18px; padding: 12px 16px; border-top: 1px solid var(--rule); background: rgba(247,249,248,.97); overflow-x: auto; }
  .ownership-form-actions .button { flex: 1 0 auto; }
  .ownership-detail-actions { width: 100%; }
  .ownership-detail-title { align-items: flex-start; flex-direction: column; gap: 6px; }
  .ownership-period-filter { grid-template-columns: 1fr; padding: 13px; }
  .ownership-period-filter > small { grid-column: auto; }
  .ownership-period-filter .button { width: 100%; }
  .ownership-metric-band { margin-inline: 0; }
  .ownership-section-heading { align-items: flex-start; flex-direction: column; }
  .ownership-section-heading .button { width: 100%; }
  .ownership-project-overview { padding: 18px 16px; }
  .ownership-archive-popover { width: auto; }
}

/* Calendar schedule and reminder delivery */
.calendar-canvas, .reminder-canvas { min-height: calc(100vh - var(--topbar-height)); background: #fafcfb; }
.calendar-tabs { display: flex; gap: 25px; margin: 0 5px 25px; border-bottom: 1px solid var(--rule); }
.calendar-tabs a { position: relative; padding: 0 1px 11px; color: var(--muted); font-size: 12px; font-weight: 650; }
.calendar-tabs a:hover { color: var(--ink); }
.calendar-tabs a[aria-current="page"] { color: var(--evergreen-strong); }
.calendar-tabs a[aria-current="page"]::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--evergreen); content: ""; }

.calendar-content-header, .reminder-content-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin: 0 5px 20px; }
.calendar-content-header h2, .reminder-content-header h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.025em; }
.calendar-content-header p, .reminder-content-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.calendar-month-navigation { display: flex; align-items: center; gap: 8px; }
.calendar-month-navigation .icon-button.bordered { width: 40px; height: 40px; }

.calendar-filters { display: grid; grid-template-columns: repeat(2, minmax(180px, 230px)) 1fr; align-items: end; gap: 12px; margin: 0 5px 24px; }
.calendar-filter-field { display: grid; min-width: 0; gap: 6px; }
.calendar-filter-field > span { font-size: 10px; font-weight: 650; }
.calendar-filter-field select, .calendar-filter-field input { width: 100%; height: 40px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background-color: #fff; font-size: 12px; }
.calendar-filter-field select { appearance: none; padding: 0 38px 0 13px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2314211c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.calendar-filter-field input { padding: 0 12px; }
.calendar-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }

.calendar-board { display: grid; grid-template-columns: minmax(720px, 1fr) minmax(290px, 340px); border-block: 1px solid var(--rule); background: #fbfcfc; }
.calendar-month-region { min-width: 0; background: #fbfcfc; }
.calendar-month-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.calendar-month-scroll:focus-visible { outline-offset: -3px; }
.calendar-scroll-help { display: none; margin: 0; color: var(--muted); font-size: 10px; }
.calendar-month { width: 100%; min-width: 720px; margin: 0; table-layout: fixed; background: #fbfcfc; }
.calendar-month th, .calendar-month td { width: 14.285% !important; border-right: 1px solid var(--rule); }
.calendar-month th:last-child, .calendar-month td:last-child { border-right: 0; }
.calendar-month th { height: 39px; padding: 0 9px; background: #f5f7f6; color: #46524d; font-size: 9px; font-weight: 650; }
.calendar-month td { height: 120px; padding: 8px; overflow: visible; vertical-align: top; white-space: normal; }
.calendar-month tbody tr:last-child td { border-bottom: 0; }
.calendar-month tbody tr:hover { background: transparent; }
.calendar-day { position: relative; background: #fff; }
.calendar-day.is-outside { background: #f7f9f8; }
.calendar-day.is-outside .calendar-day-link, .calendar-day.is-outside .calendar-cell-events, .calendar-day.is-outside .calendar-more-link { opacity: .48; }
.calendar-day.is-selected { background: #eef4f1; box-shadow: inset 0 0 0 1px #a9c3b8; }
.calendar-day-link { display: inline-flex; min-width: 24px; min-height: 24px; align-items: center; justify-content: center; margin-bottom: 5px; color: #46524d; font-size: 11px; font-weight: 650; }
.calendar-day-link:hover { color: var(--evergreen); }
.calendar-day.is-today .calendar-day-link { color: var(--evergreen-strong); box-shadow: inset 0 -2px 0 var(--evergreen); }
.calendar-cell-events { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.calendar-cell-event { display: grid; min-width: 0; gap: 1px; padding: 4px 5px 4px 7px; border-left: 3px solid var(--evergreen); border-radius: 2px; background: var(--surface-subtle); color: var(--ink); }
.calendar-cell-event:hover { filter: brightness(.975); }
.calendar-cell-event strong, .calendar-cell-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-cell-event strong { font-size: 9px; font-weight: 650; }
.calendar-cell-event span { color: var(--muted); font-size: 8px; }
.calendar-cell-event.tone-sage { border-color: var(--evergreen); background: #edf4f1; color: var(--ink); }
.calendar-cell-event.tone-blue { border-color: var(--blue-strong); background: #eef4fb; color: var(--ink); }
.calendar-cell-event.tone-amber { border-color: var(--amber-strong); background: #fff7e9; color: var(--ink); }
.calendar-cell-event.tone-coral { border-color: var(--danger); background: #fff0ef; color: var(--ink); }
.calendar-more-link { display: inline-flex; margin-top: 5px; color: var(--evergreen); font-size: 8px; font-weight: 650; }
.calendar-more-link:hover { text-decoration: underline; text-underline-offset: 2px; }

.calendar-rail { min-width: 0; border-left: 1px solid var(--rule); background: #fbfcfc; }
.calendar-rail-section { padding: 20px 20px 22px; }
.calendar-rail-section + .calendar-rail-section { border-top: 1px solid var(--rule); }
.calendar-rail-heading { display: flex; min-height: 41px; align-items: flex-start; justify-content: space-between; gap: 14px; }
.calendar-rail-heading h3 { margin: 0; font-size: 15px; font-weight: 720; letter-spacing: -.015em; }
.calendar-rail-heading p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.calendar-rail-heading > .icon { width: 19px; height: 19px; color: var(--evergreen); }
.calendar-reminder-list, .calendar-agenda-list { margin: 5px 0 0; padding: 0; list-style: none; }
.calendar-reminder-item { padding: 13px 0; border-bottom: 1px solid var(--rule); }
.calendar-reminder-item:last-child { border-bottom: 0; }
.calendar-reminder-summary { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px; }
.calendar-reminder-summary > span:last-child, .calendar-agenda-copy { display: grid; min-width: 0; }
.calendar-reminder-summary strong, .calendar-reminder-summary small, .calendar-agenda-copy strong, .calendar-agenda-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-reminder-summary strong, .calendar-agenda-copy strong { font-size: 10px; font-weight: 650; }
.calendar-reminder-summary small, .calendar-agenda-copy small { color: var(--muted); font-size: 8px; }
.calendar-event-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; }
.calendar-event-icon .icon { width: 16px; height: 16px; }
.calendar-reminder-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 9px 0 0 42px; }
.calendar-reminder-actions .text-link { margin-right: auto; }
.calendar-reminder-actions .button { min-height: 30px; padding-inline: 10px; font-size: 9px; }
.calendar-action-menu { position: relative; }
.calendar-action-menu > summary { list-style: none; cursor: pointer; }
.calendar-action-menu > summary::-webkit-details-marker { display: none; }
.calendar-dismiss-summary { color: var(--danger); }
.calendar-action-popover { position: absolute; z-index: 12; top: calc(100% + 7px); right: 0; display: grid; width: 300px; gap: 10px; padding: 15px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; }
.calendar-action-popover label { font-size: 11px; font-weight: 650; }
.calendar-action-popover label span, .reminder-action-popover label span { color: var(--muted); font-size: 9px; font-weight: 550; }
.calendar-action-popover input, .reminder-action-popover input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; font-size: 11px; }
.calendar-action-popover p { margin: 0; color: var(--muted); font-size: 9px; }
.calendar-action-popover .button { justify-self: end; min-height: 36px; }
.calendar-action-popover > strong { font-size: 12px; }
.calendar-agenda-list li { border-bottom: 1px solid var(--rule); }
.calendar-agenda-list li:last-child { border-bottom: 0; }
.calendar-agenda-list li > a { display: grid; min-height: 60px; grid-template-columns: 32px minmax(0, 1fr) auto 15px; align-items: center; gap: 9px; }
.calendar-agenda-list li > a:hover .calendar-agenda-copy strong { color: var(--evergreen); }
.calendar-agenda-list li > a > .icon { width: 14px; height: 14px; }
.calendar-agenda-amount { padding-left: 5px; font-size: 9px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calendar-rail-empty { display: flex; min-height: 72px; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.calendar-rail-empty .icon { width: 16px; height: 16px; color: var(--evergreen); }

.calendar-feeds-canvas { width: min(1240px, 100%); margin: 0 auto; }
.calendar-feed-header { align-items: center; }
.calendar-feed-contract { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 5px 26px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.calendar-feed-contract > div { display: grid; min-width: 0; min-height: 84px; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 11px; padding: 15px 18px; border-right: 1px solid var(--rule); }
.calendar-feed-contract > div:last-child { border-right: 0; }
.calendar-feed-contract .icon { width: 20px; height: 20px; color: var(--evergreen); }
.calendar-feed-contract span { display: grid; min-width: 0; }
.calendar-feed-contract strong { font-size: 11px; font-weight: 680; }
.calendar-feed-contract small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-feed-section, .calendar-feed-disclosure { margin: 0 5px 27px; border-top: 1px solid var(--rule-strong); background: #fff; }
.calendar-feed-section-heading { display: flex; min-height: 83px; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 18px; border-bottom: 1px solid var(--rule); }
.calendar-feed-section-heading h3, .calendar-feed-disclosure h3 { margin: 3px 0 0; font-size: 17px; font-weight: 720; letter-spacing: -.018em; }
.calendar-feed-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.calendar-feed-section-heading > span { color: var(--muted); font-size: 10px; font-weight: 650; }
.calendar-feed-create { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: end; gap: 14px; padding: 18px; }
.calendar-feed-create .field { gap: 6px; }
.calendar-feed-create input { height: 40px; }
.calendar-feed-create > .button { min-height: 40px; }
.calendar-feed-table-shell { width: 100%; }
.calendar-feed-table { min-width: 900px; margin: 0; }
.calendar-feed-table th { background: #f7f9f8; font-size: 9px; }
.calendar-feed-table td { height: 62px; font-size: 10px; }
.calendar-feed-primary { display: grid; min-width: 0; }
.calendar-feed-primary strong, .calendar-feed-primary code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-feed-primary strong { font-size: 11px; font-weight: 680; }
.calendar-feed-primary code { margin-top: 3px; color: var(--muted); font-size: 9px; }
.calendar-feed-revoke-menu { position: relative; display: inline-block; }
.calendar-feed-revoke-menu > summary { list-style: none; cursor: pointer; }
.calendar-feed-revoke-menu > summary::-webkit-details-marker { display: none; }
.calendar-feed-revoke-menu > form { position: absolute; z-index: 15; top: calc(100% + 8px); right: 0; display: grid; width: 300px; gap: 9px; padding: 15px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-soft); }
.calendar-feed-revoke-menu form strong { font-size: 12px; }
.calendar-feed-revoke-menu form p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.calendar-feed-revoke-menu form .button { justify-self: end; }
.calendar-feed-permission { display: flex; align-items: flex-start; gap: 13px; padding: 21px 18px; }
.calendar-feed-permission > .icon { width: 22px; height: 22px; color: var(--evergreen); }
.calendar-feed-permission h3 { margin: 0; font-size: 16px; }
.calendar-feed-permission p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.calendar-feed-disclosure { display: grid; grid-template-columns: minmax(220px, .6fr) minmax(0, 1.4fr); }
.calendar-feed-disclosure > div { padding: 20px 18px; }
.calendar-feed-disclosure dl { margin: 0; border-left: 1px solid var(--rule); }
.calendar-feed-disclosure dl > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); min-height: 58px; border-bottom: 1px solid var(--rule); }
.calendar-feed-disclosure dl > div:last-child { border-bottom: 0; }
.calendar-feed-disclosure dt, .calendar-feed-disclosure dd { margin: 0; padding: 13px 15px; font-size: 10px; }
.calendar-feed-disclosure dt { color: var(--muted); font-weight: 650; }
.calendar-feed-disclosure dd { border-left: 1px solid var(--rule); line-height: 1.5; }

.calendar-feed-secret-canvas { width: min(980px, 100%); margin: 0 auto; }
.calendar-feed-secret-canvas .calendar-content-header { align-items: center; }
.calendar-feed-secret-canvas .calendar-content-header .text-link { margin-bottom: 12px; }
.calendar-feed-secret-panel { margin: 0 5px; border-block: 1px solid var(--rule-strong); background: #fff; }
.calendar-feed-secret-heading { padding: 20px; border-bottom: 1px solid var(--rule); }
.calendar-feed-secret-heading h3 { margin: 3px 0 4px; font-size: 19px; }
.calendar-feed-secret-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.calendar-feed-secret-value { padding: 22px 20px; background: #f2f7f4; }
.calendar-feed-secret-value code { display: block; overflow-wrap: anywhere; color: #0b513a; font-size: 12px; line-height: 1.65; user-select: all; }
.calendar-feed-secret-warning { display: flex; align-items: flex-start; gap: 11px; padding: 15px 20px; border-block: 1px solid #ead3ad; background: #fff7e9; color: #6f470e; }
.calendar-feed-secret-warning .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.calendar-feed-secret-warning strong { font-size: 11px; }
.calendar-feed-secret-warning p { margin: 3px 0 0; font-size: 9px; line-height: 1.5; }
.calendar-feed-secret-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.calendar-feed-secret-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 18px 20px; border-right: 1px solid var(--rule); }
.calendar-feed-secret-steps li:last-child { border-right: 0; }
.calendar-feed-secret-steps li > span { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #a9c3b8; border-radius: 50%; color: var(--evergreen-strong); font-size: 9px; font-weight: 700; }
.calendar-feed-secret-steps p { display: grid; gap: 3px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.calendar-feed-secret-steps strong { color: var(--ink); font-size: 10px; }
.calendar-feed-secret-panel > .form-actions { padding: 2px 20px 22px; }

.status-info { border: 1px solid #b9cfe6; background: #eef4fb; color: #285b89; }
.reminder-content-header { margin-bottom: 22px; }
.reminder-health-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 5px 26px; border-block: 1px solid var(--rule); background: #fbfcfc; }
.reminder-health-item { display: flex; min-width: 0; min-height: 108px; align-items: center; gap: 14px; padding: 17px 20px; border-right: 1px solid var(--rule); }
.reminder-health-item:last-child { border-right: 0; }
.reminder-health-item .metric-icon { width: 40px; height: 40px; }
.reminder-health-item .metric-icon .icon { width: 21px; height: 21px; }
.reminder-health-item > span:last-child { display: grid; min-width: 0; }
.reminder-health-item small { color: var(--muted); font-size: 9px; font-weight: 650; }
.reminder-health-item strong { overflow: hidden; font-size: 20px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.reminder-health-item > span:last-child > span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.reminder-filters { display: grid; grid-template-columns: minmax(210px, 1.3fr) repeat(3, minmax(125px, .72fr)) repeat(2, 145px) auto; align-items: end; gap: 11px; margin: 0 5px 27px; }
.reminder-search { width: 100%; }
.reminder-search input { height: 40px; font-size: 12px; }
.reminder-filter-actions { align-self: end; }
.reminder-filters > small { grid-column: 5 / span 2; color: var(--muted); font-size: 9px; }
.reminder-delivery-section { margin: 0 5px; }
.reminder-section-heading { display: flex; min-height: 47px; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.reminder-section-heading h3 { margin: 0; font-size: 17px; font-weight: 720; letter-spacing: -.02em; }
.reminder-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.reminder-data-panel { border-top: 1px solid var(--rule-strong); background: transparent; }
.reminder-table-scroll:focus-visible { outline-offset: 4px; }
.reminder-data-panel table { margin: 0; background: transparent; }
.reminder-data-panel th { height: 41px; background: transparent; font-size: 9px; }
.reminder-data-panel td { height: 57px; }
.reminder-delivery-table { min-width: 1120px; }
.reminder-delivery-table th:nth-child(1) { width: 14%; }
.reminder-delivery-table th:nth-child(2) { width: 22%; }
.reminder-delivery-table th:nth-child(3) { width: 10%; }
.reminder-delivery-table th:nth-child(4) { width: 12%; }
.reminder-delivery-table th:nth-child(5) { width: 15%; }
.reminder-delivery-table th:nth-child(6) { width: 8%; }
.reminder-delivery-table th:nth-child(7) { width: 11%; }
.reminder-delivery-table th:nth-child(8) { width: 42px; }
.reminder-date, .reminder-primary { display: grid; min-width: 0; }
.reminder-date strong, .reminder-date small, .reminder-primary strong, .reminder-primary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-date strong, .reminder-primary strong { color: var(--ink); font-size: 10px; font-weight: 650; }
.reminder-date small, .reminder-primary small { color: var(--muted); font-size: 8px; }
.reminder-channel { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 600; }
.reminder-channel .icon { width: 15px; height: 15px; }
.reminder-pagination { padding-inline: 0; }

.reminder-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 5px 24px; }
.reminder-detail-title { display: flex; min-width: 0; align-items: center; gap: 11px; margin-top: 12px; }
.reminder-detail-title h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 25px; letter-spacing: -.03em; }
.reminder-detail-header p { margin: 3px 0 0; color: var(--muted); }
.reminder-detail-actions { flex-wrap: wrap; }
.reminder-action-popover input { margin-top: 1px; }
.reminder-detail-grid { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(620px, 1.28fr); align-items: start; gap: 24px; margin: 0 5px; }
.reminder-facts { margin: 0; }
.reminder-facts .definition-list dd { max-width: 62%; text-align: right; overflow-wrap: anywhere; }
.reminder-detail-section { min-width: 0; }
.reminder-attempts-table { min-width: 780px; }
.reminder-attempts-table th:nth-child(1) { width: 9%; }
.reminder-attempts-table th:nth-child(2), .reminder-attempts-table th:nth-child(3) { width: 21%; }
.reminder-attempts-table th:nth-child(4) { width: 14%; }
.reminder-attempts-table th:nth-child(5) { width: 35%; }
.reminder-attempt-detail { color: var(--muted); font-size: 10px; }
.reminder-audit-section { margin: 30px 5px 0; padding-top: 25px; border-top: 1px solid var(--rule); }
.reminder-audit-list { margin: 3px 0 0; padding: 0; list-style: none; }
.reminder-audit-list li { position: relative; display: grid; min-height: 65px; grid-template-columns: 34px 150px minmax(0, 1fr); align-items: start; gap: 13px; padding: 10px 0; }
.reminder-audit-list li:not(:last-child)::after { position: absolute; z-index: 0; top: 40px; bottom: -25px; left: 16px; width: 1px; background: var(--rule-strong); content: ""; }
.reminder-audit-marker { z-index: 1; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; box-shadow: 0 0 0 4px #fafcfb; }
.reminder-audit-marker .icon { width: 16px; height: 16px; }
.reminder-audit-time { padding-top: 7px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.reminder-audit-copy { display: grid; min-width: 0; padding-top: 5px; }
.reminder-audit-copy strong { font-size: 11px; font-weight: 650; }
.reminder-audit-copy small { color: var(--muted); font-size: 9px; }
.reminder-audit-copy p { margin: 4px 0 0; color: #46524d; font-size: 10px; overflow-wrap: anywhere; }

@media (max-width: 1200px) {
  .calendar-board { grid-template-columns: minmax(660px, 1fr) 300px; }
  .calendar-month { min-width: 660px; }
  .reminder-filters { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  .reminder-search { grid-column: span 2; }
  .reminder-filter-actions { justify-content: flex-start; }
  .reminder-filters > small { grid-column: span 2; }
  .reminder-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
	.domain-detail-header { align-items: flex-start; flex-direction: column; }
	.rdap-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rdap-comparison > div:nth-child(2) { border-right: 0; }
	.rdap-comparison > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .calendar-board { grid-template-columns: 1fr; }
  .calendar-month { min-width: 720px; }
  .calendar-rail { border-top: 1px solid var(--rule); border-left: 0; }
  .calendar-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-rail-section + .calendar-rail-section { border-top: 0; border-left: 1px solid var(--rule); }
  .reminder-health-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-health-item:nth-child(2) { border-right: 0; }
  .reminder-health-item:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .reminder-detail-header { align-items: flex-start; flex-direction: column; }
  .reminder-detail-actions { justify-content: flex-start; }
  .calendar-feed-contract { grid-template-columns: 1fr; }
  .calendar-feed-contract > div { min-height: 68px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .calendar-feed-contract > div:last-child { border-bottom: 0; }
  .calendar-feed-disclosure { grid-template-columns: 1fr; }
  .calendar-feed-disclosure dl { border-top: 1px solid var(--rule); border-left: 0; }
}

@media (max-width: 680px) {
	.domain-detail-header .button { width: 100%; }
	.rdap-panel-heading { align-items: flex-start; flex-direction: column; }
	.rdap-comparison { grid-template-columns: 1fr; }
	.rdap-comparison > div { min-height: 90px; border-right: 0; border-bottom: 1px solid var(--rule); }
	.rdap-comparison > div:nth-child(2) { border-right: 0; }
	.rdap-comparison > div:last-child { border-bottom: 0; }
	.rdap-panel-footer { align-items: stretch; flex-direction: column; }
	.rdap-panel-footer .button { width: 100%; }
  .calendar-canvas, .reminder-canvas { padding: 18px 16px; }
  .calendar-tabs, .calendar-content-header, .reminder-content-header, .reminder-health-band, .reminder-filters, .reminder-delivery-section, .reminder-detail-header, .reminder-detail-grid, .reminder-audit-section { margin-inline: 0; }
  .calendar-tabs { gap: 22px; margin-bottom: 22px; overflow-x: auto; white-space: nowrap; }
  .calendar-content-header { align-items: flex-start; flex-direction: column; }
  .calendar-month-navigation { width: 100%; }
  .calendar-month-navigation .button { flex: 1; }
  .calendar-filters, .reminder-filters { grid-template-columns: 1fr; margin-inline: 0; }
  .calendar-filter-actions, .reminder-filter-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-filter-actions .button { width: 100%; }
  .calendar-filter-actions .button:only-child { grid-column: 2; }
  .calendar-scroll-help { display: block; padding: 9px 0; }
  .calendar-month { min-width: 720px; }
  .calendar-month td { height: 112px; }
  .calendar-rail { display: block; }
  .calendar-rail-section { padding: 18px 14px; }
  .calendar-rail-section + .calendar-rail-section { border-top: 1px solid var(--rule); border-left: 0; }
  .calendar-reminder-actions { margin-left: 0; }
  .calendar-action-popover, .reminder-action-popover { position: fixed; inset: auto 16px 16px; width: auto; }
  .reminder-health-band { grid-template-columns: 1fr; }
  .reminder-health-item { min-height: 88px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .reminder-health-item:nth-child(2) { border-right: 0; }
  .reminder-health-item:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .reminder-health-item:last-child { border-bottom: 0; }
  .reminder-search { grid-column: auto; }
  .reminder-filters > small { grid-column: auto; margin-top: -5px; }
  .reminder-delivery-table { min-width: 1120px; }
  .reminder-detail-actions { width: 100%; justify-content: flex-start; }
  .reminder-detail-title { align-items: flex-start; flex-direction: column; gap: 6px; }
  .reminder-detail-title h2 { font-size: 22px; }
  .reminder-facts { padding: 18px 16px; }
  .reminder-facts .definition-list > div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .reminder-facts .definition-list dd { max-width: 100%; text-align: left; }
  .reminder-audit-list li { grid-template-columns: 34px minmax(0, 1fr); gap: 11px; }
  .reminder-audit-time { grid-column: 2; padding: 0; }
  .reminder-audit-copy { grid-column: 2; margin-top: -25px; padding-top: 24px; }
  .registry-import-canvas .calendar-tabs { margin-inline: 0; }
  .registry-import-filters { align-items: stretch; flex-direction: column; }
  .registry-import-filters .import-status-filter { width: 100%; }
  .registry-kind-options { grid-template-columns: 1fr; }
  .registry-kind-option { border-right: 0; border-bottom: 1px solid var(--rule) !important; }
  .registry-kind-option:last-child { border-bottom: 0 !important; }
  .calendar-feed-contract, .calendar-feed-section, .calendar-feed-disclosure, .calendar-feed-secret-panel { margin-inline: 0; }
  .calendar-feed-create { grid-template-columns: 1fr; padding: 16px; }
  .calendar-feed-create > .button { width: 100%; }
  .calendar-feed-section-heading { align-items: flex-start; flex-direction: column; gap: 8px; padding: 16px; }
  .calendar-feed-revoke-menu > form { position: fixed; inset: auto 16px 16px; width: auto; }
  .calendar-feed-disclosure dl > div { grid-template-columns: 1fr; }
  .calendar-feed-disclosure dd { padding-top: 0; border-left: 0; }
  .calendar-feed-secret-steps { grid-template-columns: 1fr; }
  .calendar-feed-secret-steps li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .calendar-feed-secret-steps li:last-child { border-bottom: 0; }
  .calendar-feed-secret-panel > .form-actions .button { width: 100%; }
  .settings-section-heading { align-items: stretch; flex-direction: column; }
  .settings-section-heading .button { width: 100%; }
  .settings-ledger > div { grid-template-columns: 1fr; }
  .settings-ledger dt { padding-bottom: 5px; }
  .settings-ledger dd { padding-top: 5px; border-left: 0; }
}

@media (max-width: 980px) {
  .reminder-window-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-email-controls { grid-template-columns: 1fr; }
  .notification-test-form { align-items: stretch; flex-direction: column; }
  .notification-test-form .button { width: 100%; }
  .automation-create-form { grid-template-columns: 1fr 1fr; }
  .automation-create-form > .button { grid-column: 1 / -1; width: 100%; }
  .automation-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-event-option:nth-child(3n) { border-right: 1px solid var(--rule); }
  .automation-event-option:nth-child(2n) { border-right: 0; }
  .automation-event-option:nth-last-child(-n+3) { border-bottom: 1px solid var(--rule); }
  .automation-event-option:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 680px) {
  .reminder-window-grid { grid-template-columns: 1fr; }
  .reminder-window-card > p { min-height: 0; }
  .reminder-email-section .settings-section-heading { align-items: flex-start; }
  .account-security-section .settings-section-heading { align-items: flex-start; }
  .identity-link-form { grid-template-columns: 1fr; padding: 16px; }
  .identity-link-form .button { width: 100%; }
  .reminder-permission-note { align-items: flex-start; flex-direction: column; gap: 8px; }
  .reminder-permission-note p { text-align: left; }
  .automation-contract { grid-template-columns: 1fr; }
  .automation-contract > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .automation-contract > div:last-child { border-bottom: 0; }
  .automation-create-form, .automation-endpoint-fields { grid-template-columns: 1fr; padding: 16px; }
  .automation-event-grid { grid-template-columns: 1fr; }
  .automation-event-option, .automation-event-option:nth-child(2n), .automation-event-option:nth-child(3n), .automation-event-option:nth-last-child(-n+2), .automation-event-option:nth-last-child(-n+3) { border-right: 0; border-bottom: 1px solid var(--rule); }
  .automation-event-option:last-child { border-bottom: 0; }
  .automation-row-actions { align-items: stretch; flex-direction: column; }
  .automation-row-actions .button { width: 100%; }
  .automation-secret-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .automation-secret-panel > .form-actions .button { width: 100%; }
  .reminder-preferences-header { margin-bottom: 19px; }
  .reminder-preference-card { padding: 17px 14px; }
  .reminder-preference-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .reminder-mode-options { grid-template-columns: 1fr; }
  .reminder-mode-options label { min-height: 62px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .reminder-mode-options label:last-child { border-bottom: 0; }
  .reminder-preference-custom { grid-template-columns: 1fr; align-items: stretch; }
  .reminder-preferences-actions { display: grid; grid-template-columns: 1fr; }
  .reminder-preferences-actions .button { width: 100%; }
}
