:root {
    color-scheme: light;
    --ink: #18212f;
    --muted: #657083;
    --line: #dce2ea;
    --surface: #ffffff;
    --canvas: #f4f6f9;
    --brand: #174ea6;
    --brand-dark: #103b7d;
    --danger-bg: #fff1f1;
    --danger: #9b2525;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 0; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: 32px 16px;
}

.auth-card, .welcome-card {
    width: min(100%, 460px);
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 16px 45px rgba(25, 38, 58, .08);
    padding: clamp(24px, 5vw, 42px);
}

.auth-card p { overflow-wrap: anywhere; }

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: var(--brand);
    color: white;
    font-weight: 750;
    letter-spacing: -.02em;
    margin-bottom: 28px;
}

.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.85rem, 6vw, 2.35rem); line-height: 1.12; letter-spacing: -.035em; }
.intro, .muted { color: var(--muted); line-height: 1.6; }
.intro { margin: 12px 0 30px; }
.welcome { margin: 22px 0 4px; font-size: 1.08rem; }

label { display: block; margin: 20px 0 8px; font-weight: 650; font-size: .92rem; }
input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    color: var(--ink);
    border: 1px solid #b9c2cf;
    border-radius: 9px;
    background: #fff;
}
input:focus { outline: 3px solid rgba(23, 78, 166, .18); border-color: var(--brand); }
button {
    min-height: 46px;
    border: 0;
    border-radius: 9px;
    padding: 10px 18px;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}
button:hover { background: var(--brand-dark); }
.auth-card form > button { width: 100%; margin-top: 28px; }
.alert { padding: 12px 14px; border: 1px solid #efb7b7; border-radius: 9px; background: var(--danger-bg); color: var(--danger); line-height: 1.45; font-size: .92rem; }

.topbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px clamp(16px, 5vw, 64px);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.wordmark { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.topbar form { margin: 0; }
.button-secondary { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid #cbd4df; border-radius: 9px; background: #eef2f7; color: var(--ink); font-weight: 700; text-decoration: none; }
.button-secondary:hover { background: #e1e7ef; }
.button-danger { background: #a33a35; }
.button-danger:hover { background: #842e2a; }
.button-primary { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; }
.button-primary:hover { background: var(--brand-dark); }
.page-shell { padding: clamp(28px, 7vw, 84px) 16px; }
.welcome-card { margin: 0 auto; width: min(100%, 720px); }

@media (max-width: 374px) {
    .auth-shell { padding: 16px 10px; }
    .auth-card, .welcome-card { border-radius: 12px; padding: 22px 18px; }
    .topbar { align-items: stretch; flex-direction: column; padding: 14px 16px; }
    .topbar form, .topbar button { width: 100%; }
}

/* Internal portal */
.portal-body { background: #f5f7fa; }
.portal-shell { min-height: 100vh; min-width: 0; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: 248px;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 18px;
    background: #111c2d;
    color: #dfe7f3;
}
.portal-brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-size: 1.08rem; font-weight: 800; }
.brand-mark-small { width: 38px; height: 38px; margin: 0; border-radius: 9px; font-size: .82rem; flex: 0 0 auto; }
.sidebar-nav { min-height: 0; display: grid; flex: 1 1 auto; align-content: start; gap: 18px; margin-top: 28px; overflow-y: auto; }
.nav-section { display: grid; gap: 4px; }
.nav-section-label { padding: 0 12px 4px; color: #718299; font-size: .63rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.nav-link { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 9px; color: #bdc9d9; text-decoration: none; font-size: .92rem; font-weight: 650; }
.nav-link:hover, .nav-link.is-active { color: #fff; background: rgba(255,255,255,.1); }
.nav-link.is-disabled { cursor: default; opacity: .55; }
.nav-link small { margin-left: auto; font-size: .65rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.nav-dot { width: 7px; height: 7px; flex: 0 0 auto; border: 1.5px solid currentColor; border-radius: 50%; }
.nav-link.is-active .nav-dot { border-color: #62a3ff; background: #62a3ff; }
.sidebar-account { display: grid; grid-template-columns: 38px minmax(0,1fr) 34px; align-items: center; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #2d4260; color: white; font-weight: 800; }
.account-copy { min-width: 0; display: grid; gap: 2px; }
.account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.account-copy small { color: #9baabc; font-size: .73rem; }
.sidebar-account form { margin: 0; }
.logout-button { width: 34px; min-height: 34px; padding: 0; background: transparent; color: #bdc9d9; font-size: 1.2rem; }
.logout-button:hover { background: rgba(255,255,255,.1); }
.mobile-header { display: none; }
.portal-main { min-width: 0; margin-left: 248px; padding: 42px clamp(24px, 4vw, 64px) 72px; }
.portal-main > * { width: min(100%, 1380px); margin-inline: auto; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.page-heading h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-intro { max-width: 700px; margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.page-heading-list { align-items: center; }
.result-count { flex: 0 0 auto; display: grid; min-width: 96px; padding: 13px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; }
.result-count strong { font-size: 1.45rem; }
.result-count span { color: var(--muted); font-size: .75rem; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 14px; }
.section-heading h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.015em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: .88rem; }
.section-note { padding: 5px 9px; border-radius: 999px; background: #e9eef5; color: #566477; font-size: .72rem; font-weight: 700; }
.dashboard-section { margin-top: 38px; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 19px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 5px 16px rgba(25,38,58,.035); }
.metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #8793a5; }
.metric-card > span { align-self: center; font-size: .84rem; font-weight: 700; color: #465468; }
.metric-card > strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 2rem; letter-spacing: -.04em; }
.metric-card > small { color: var(--muted); font-size: .72rem; }
.metric-card:hover { border-color: #b9c6d8; box-shadow: 0 9px 24px rgba(25,38,58,.07); }
.metric-new::before { background: #2b6cb0; }
.metric-contact-attempt::before { background: #8b6b28; }
.metric-callback::before { background: #7657a6; }
.metric-qualified::before { background: #2d7a5a; }
.metric-rejected::before { background: #8a5260; }
.metric-unassigned::before { background: #53647b; }

.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(25,38,58,.035); }
.table-wrap { min-width: 0; overflow-x: auto; }
.lead-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.lead-table th { padding: 12px 15px; background: #f7f9fb; color: #657083; font-size: .7rem; text-align: left; text-transform: uppercase; letter-spacing: .055em; white-space: nowrap; }
.lead-table td { max-width: 260px; padding: 14px 15px; border-top: 1px solid #edf0f4; vertical-align: middle; }
.lead-table tbody tr:hover { background: #fafbfd; }
/* Keep admin tables intact on tablets; only their own container may scroll. */
.record-table-wrap, .lead-overview-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.record-table { word-break: normal; overflow-wrap: normal; }
.lead-overview-table { min-width: 1060px; }
.agency-lead-table { min-width: 1100px; }
.recipient-table { min-width: 1120px; }
.recipient-group-table { min-width: 820px; }
.agencies-table { min-width: 1150px; }
.user-table { min-width: 980px; }
.callback-table { min-width: 1030px; }
.record-table .contact-cell { overflow-wrap: normal; }
.record-table .break-anywhere { overflow-wrap: normal; word-break: normal; }
.recipient-table .recipient-card-email, .user-table .user-card-email { min-width: 240px; }
.record-table .record-action-label, .user-table .user-card-role,
.lead-overview-table .lead-card-project, .lead-overview-table .lead-card-postal { white-space: nowrap; }
.callback-table .is-overdue, .callback-table .is-overdue:hover { background: #fff8f7; }
.callback-table .is-overdue td { border-color: #f3dedb; }
.callback-table time { display: grid; gap: 3px; white-space: nowrap; }
.callback-table time span { color: var(--muted); }
.callback-table .callback-work-contact strong { display: block; }
.callback-table .callback-phone { display: inline-block; margin-top: 4px; }
.groups-more { position: relative; z-index: 3; min-height: 32px; padding: 3px 5px; background: transparent; color: var(--brand); font-size: inherit; white-space: nowrap; }
.groups-more:hover { background: #eaf0f8; }
.groups-popover { width: min(340px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 18px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 12px 36px rgba(25,38,58,.18); }
.groups-popover > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.groups-popover h3 { margin: 0; font-size: 1rem; }
.groups-popover button { min-height: 34px; padding: 4px 9px; background: #eef2f7; color: var(--ink); }
.groups-popover ul { margin: 14px 0 0; padding-left: 20px; line-height: 1.6; overflow-wrap: anywhere; }
.recipient-filter-panel { grid-template-columns: repeat(2,minmax(0,1fr)) max-content; }
.record-link-row { position: relative; cursor: pointer; }
.record-primary-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.record-primary-link:focus { outline: 2px solid #2b6cb0; outline-offset: 3px; border-radius: 3px; }
.record-primary-link:focus::after { outline: 3px solid #2b6cb0; outline-offset: -3px; box-shadow: inset 0 0 0 3px #2b6cb0; }
.record-link-row:hover { background: #fafbfd; }
.record-secondary-action, .record-actions { position: relative; z-index: 3; }
.record-chevron { display: none; }
.lead-contact-name { font-weight: 650; }
.contact-cell { min-width: 170px; overflow-wrap: anywhere; font-weight: 650; }
.price-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 999px; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.status-new { background: #e8f1fb; color: #245b93; }
.status-contact-attempt { background: #f6f0e2; color: #76591d; }
.status-callback { background: #f0eafa; color: #684b91; }
.status-qualified { background: #e5f3ec; color: #276348; }
.status-rejected { background: #f4e9ec; color: #784552; }
.empty-state { display: grid; place-items: center; gap: 6px; min-height: 150px; padding: 28px; text-align: center; }
.empty-state span { color: var(--muted); font-size: .88rem; }

.callback-list { padding: 0 18px; }
.callback-row { display: grid; grid-template-columns: 150px 70px minmax(170px,1.5fr) minmax(130px,1fr) minmax(140px,1fr); gap: 18px; align-items: center; padding: 16px 4px; border-bottom: 1px solid #edf0f4; }
.callback-row:last-child { border-bottom: 0; }
.callback-row > div { min-width: 0; display: grid; gap: 3px; }
.callback-row small { color: var(--muted); font-size: .69rem; text-transform: uppercase; letter-spacing: .04em; }
.callback-row strong { overflow-wrap: anywhere; font-size: .82rem; }
.callback-time span { width: fit-content; padding: 3px 7px; border-radius: 999px; background: #edf2f7; color: #546276; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.callback-row.is-overdue { margin-inline: -18px; padding-inline: 22px; background: #fff8f7; }
.callback-row.is-overdue .callback-time span { background: #f9dfdc; color: #9a3f35; }

.callback-filter { max-width: 680px; display: grid; gap: 7px; margin: 0 0 28px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.callback-filter label { color: #566477; font-size: .73rem; font-weight: 750; }
.callback-filter > div { display: flex; gap: 9px; }
.callback-filter select { min-width: 220px; min-height: 43px; padding: 9px 11px; border: 1px solid #bcc6d3; border-radius: 8px; background: #fff; color: var(--ink); }
.callback-filter .button-secondary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.callback-groups { display: grid; gap: 32px; }
.callback-group { min-width: 0; }
.callback-group-today .section-heading h2 { color: #203b66; }
.callback-group-overdue .section-heading h2 { color: #8b423c; }
.callback-worklist { padding: 0 18px; }
.callback-work-item { min-width: 0; display: grid; grid-template-columns: 118px 68px minmax(170px,1.5fr) minmax(120px,.8fr) 92px auto; gap: 16px; align-items: center; padding: 17px 4px; border-bottom: 1px solid #edf0f4; }
.callback-work-item.has-assignee { grid-template-columns: 118px 68px minmax(170px,1.5fr) minmax(120px,.8fr) 92px minmax(120px,.8fr) auto; }
.callback-work-item:last-child { border-bottom: 0; }
.callback-work-item > div { min-width: 0; display: grid; gap: 4px; }
.callback-work-item small { color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.callback-work-item strong, .callback-phone { overflow-wrap: anywhere; }
.callback-work-time time { display: grid; gap: 2px; }
.callback-work-time strong { font-size: .88rem; }
.callback-work-time span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.callback-work-contact strong { font-size: .86rem; }
.callback-phone { width: fit-content; color: var(--brand); font-size: .78rem; text-decoration: none; }
.callback-phone:hover { text-decoration: underline; }
.callback-open { white-space: nowrap; color: var(--brand); font-size: .78rem; font-weight: 750; text-decoration: none; }
.callback-open:hover { text-decoration: underline; }
.callback-work-item.is-overdue { margin-inline: -18px; padding-inline: 22px; background: #fff8f7; border-color: #f3dedb; }
.callback-empty { margin-top: 12px; }

.deletion-request-list { display: grid; gap: 16px; }
.deletion-request-item { padding: 20px; }
.deletion-request-summary { display: grid; grid-template-columns: 80px minmax(160px,1.25fr) minmax(190px,1.35fr) minmax(130px,.8fr) minmax(150px,.9fr); gap: 18px; }
.deletion-request-summary > div { min-width: 0; display: grid; gap: 4px; }
.deletion-request-summary small, .deletion-request-comment small { color: var(--muted); font-size: .67rem; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.deletion-request-summary strong { overflow-wrap: anywhere; font-size: .84rem; }
.deletion-request-comment { margin-top: 16px; padding-top: 15px; border-top: 1px solid #edf0f4; }
.deletion-request-comment p { margin: 6px 0 0; overflow-wrap: anywhere; line-height: 1.55; }
.deletion-request-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.deletion-request-actions form { margin: 0; }
.deletion-confirm { position: relative; }
.deletion-confirm > summary { min-height: 46px; display: inline-flex; align-items: center; padding: 10px 18px; border: 1px solid #d9a6a2; border-radius: 9px; color: #8d302c; cursor: pointer; font-weight: 700; list-style: none; }
.deletion-confirm > summary::-webkit-details-marker { display: none; }
.deletion-confirm[open] > summary { background: #fff4f3; }
.deletion-confirm > div { max-width: 620px; margin-top: 12px; padding: 18px; border: 1px solid #edc3c0; border-radius: 11px; background: #fff8f7; }
.deletion-confirm p { overflow-wrap: anywhere; line-height: 1.55; }
.deletion-confirm form { display: grid; gap: 14px; }
.deletion-confirm form > div { display: flex; flex-wrap: wrap; gap: 9px; }
.confirmation-check { display: flex; align-items: flex-start; gap: 9px; margin: 0; font-size: .86rem; }
.confirmation-check input { flex: 0 0 auto; width: 18px; min-height: 18px; margin: 1px 0 0; }

.filter-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.search-panel, .filter-panel { display: grid; align-items: end; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.search-panel { grid-template-columns: minmax(220px, 1fr) auto auto; }
.filter-panel { grid-template-columns: repeat(3, minmax(150px, 1fr)) auto; }
.filter-panel:has(#assigned) { grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(150px,1fr) auto; }
.filter-panel:has(#mediation) { grid-template-columns: repeat(4, minmax(0, 1fr)) max-content; }
.search-panel label, .filter-panel label { display: block; margin: 0 0 6px; color: #566477; font-size: .73rem; font-weight: 750; }
.search-panel input, .filter-panel select { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #bcc6d3; border-radius: 8px; background: #fff; color: var(--ink); }
.filter-actions { display: flex; align-items: center; gap: 12px; }
.filter-panel button, .search-panel button { min-height: 43px; }
.filter-actions button { height: 43px; padding-block: 9px; white-space: nowrap; }
.text-link { color: var(--brand); font-size: .82rem; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.list-panel { overflow: visible; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.pagination div { display: flex; gap: 8px; }
.pagination a { padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); text-decoration: none; font-weight: 700; }
.forbidden { max-width: 680px; padding: 42px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.forbidden p:last-child { color: var(--muted); line-height: 1.6; }
.full-width { width: 100%; }
.lead-link { color: var(--ink); text-decoration-color: #a9b5c5; text-underline-offset: 3px; }
.lead-link:hover { color: var(--brand); text-decoration-color: currentColor; }

/* Brokerage */
.mediation-entry { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 22px 24px; }
.mediation-entry h2 { margin: 0; font-size: 1.12rem; }
.mediation-entry p:last-child { margin-bottom: 0; }
.release-preview-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.7fr); gap: 20px; }
.privacy-notice { margin: 22px 0 0; }
.recipient-preview-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.recipient-preview-list li { min-width: 0; display: grid; gap: 3px; padding: 13px 0; border-top: 1px solid #edf0f4; }
.recipient-preview-list span, .recipient-preview-list small { color: var(--muted); overflow-wrap: anywhere; }
.group-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.choice-card { min-width: 0; display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f9fafc; cursor: pointer; }
.choice-card input { flex: 0 0 auto; width: 18px; min-height: 18px; margin: 1px 0 0; }
.choice-card span { min-width: 0; display: grid; gap: 3px; }
.choice-card strong,.choice-card small { overflow-wrap: anywhere; }
.choice-card small { color: var(--muted); font-weight: 500; line-height: 1.4; }
.user-form .choice-card input[type="checkbox"] { flex: 0 0 18px; width: 18px; min-width: 18px; min-height: 18px; margin: 1px 0 0; padding: 0; }
.user-form .choice-card span { flex: 1 1 auto; width: auto; }
.compact-tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; padding: 0; list-style: none; }
.compact-tag-list li { padding: 5px 9px; border-radius: 999px; background: #eaf0f8; color: #36516f; font-size: .76rem; font-weight: 700; }
.recipient-count { margin-top: 20px; }
.recipient-disclosure { margin-top: 16px; border-top: 1px solid #edf0f4; padding-top: 14px; }
.recipient-disclosure summary { cursor: pointer; color: var(--brand); font-weight: 750; }
.group-selection-card { margin-bottom: 20px; }
.release-limit-field { display: grid; gap: 7px; max-width: 420px; margin: 20px 0; font-weight: 700; }
.release-limit-field select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #bcc6d3; border-radius: 8px; background: #fff; color: var(--ink); }
.release-limit-field select:focus { outline: 3px solid rgba(23,78,166,.18); border-color: var(--brand); }
.release-limit-field small { font-weight: 400; color: var(--muted); line-height: 1.5; }
.checkout-entry { display: grid; gap: 8px; align-items: start; }
.agency-checkout { overflow: hidden; }
.checkout-summary-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr); gap: 20px; margin: 24px 0; }
.checkout-summary-grid > section, .checkout-block { min-width: 0; padding: 20px; border: 1px solid #dce2ea; border-radius: 12px; background: #f9fbfd; }
.checkout-summary-grid h2, .checkout-block h2 { margin-top: 0; }
.checkout-summary-grid address { font-style: normal; line-height: 1.65; overflow-wrap: anywhere; }
.checkout-confirm-form { display: grid; gap: 20px; }
.checkout-legal-document { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid #dce2ea; }
.checkout-legal-document:first-of-type { border-top: 0; padding-top: 0; }
.checkout-legal-document > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.checkout-legal-document p { margin: 0; color: var(--muted); }
.checkout-confirmation { display: grid; gap: 12px; justify-items: start; padding: 20px; border: 1px solid #b8d5c4; border-radius: 12px; background: #f2faf5; }
.checkout-confirmation p, .checkout-confirmation small { margin: 0; }
.checkout-legal-summary { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checkout-legal-summary li { display: grid; gap: 3px; padding-bottom: 12px; border-bottom: 1px solid #dce2ea; overflow-wrap: anywhere; }
.checkout-legal-summary li:last-child { padding-bottom: 0; border-bottom: 0; }
.agency-summary-grid { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); gap: 20px; }
.email-preview { margin-top: 20px; }
.release-audience-summary { margin-top: 20px; }
.release-group-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(220px,100%),1fr)); gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.release-group-list li { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #f9fafc; }
.release-group-list strong { overflow-wrap: anywhere; }
.delivery-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.delivery-summary-grid > div { min-width: 0; display: grid; gap: 2px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.delivery-summary-grid strong { color: var(--ink); font-size: 1.35rem; }
.delivery-summary-grid span { color: var(--muted); font-size: .78rem; font-weight: 650; overflow-wrap: anywhere; }
.delivery-summary-grid .is-sent { border-color: #b9dfcc; background: #f2faf6; }
.delivery-summary-grid .is-failed { border-color: #efc4c4; background: #fff5f5; }
.delivery-error-notice { margin: 14px 0 0; color: #9b3232; font-size: .84rem; }
.delivery-disclosure { margin-top: 20px; padding: 0; overflow: hidden; }
.delivery-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; cursor: pointer; color: var(--ink); font-weight: 800; list-style: none; }
.delivery-disclosure > summary::-webkit-details-marker { display: none; }
.delivery-disclosure > summary::before { content: '›'; color: var(--brand); font-size: 1.35rem; line-height: 1; transform: rotate(0deg); transition: transform .15s ease; }
.delivery-disclosure[open] > summary::before { transform: rotate(90deg); }
.delivery-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.delivery-disclosure-content { padding: 20px 24px 24px; }
.delivery-error-badge { margin-left: auto; padding: 4px 8px; border-radius: 999px; background: #fbe4e4; color: #9b3232; font-size: .72rem; white-space: nowrap; }
.delivery-list article.is-failed { border-color: #efc4c4; background: #fffafa; }
.email-preview h2 { margin-bottom: 12px; }
.preview-button { pointer-events: none; }
.release-confirm-form { display: grid; gap: 18px; margin-top: 20px; }
.release-confirm-form button { justify-self: start; }
.release-confirm-form button:disabled { cursor: not-allowed; opacity: .55; }
.delivery-list { display: grid; gap: 0; }
.delivery-list article { min-width: 0; display: grid; grid-template-columns: minmax(180px,1.2fr) minmax(130px,.6fr) minmax(180px,1fr) auto; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid #edf0f4; }
.delivery-list article > div { min-width: 0; display: grid; gap: 4px; }
.delivery-list small { color: var(--muted); font-size: .67rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.delivery-list span { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.delivery-list form { margin: 0; }
.public-offer-body { min-width: 0; background: #f4f6f9; }
.public-offer-shell { min-height: 100vh; display: grid; place-items: center; padding: 36px 16px; }
.public-offer-card { width: min(100%, 820px); min-width: 0; padding: clamp(24px,5vw,48px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 16px 45px rgba(25,38,58,.08); }
.public-offer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 34px; }
.public-offer-data { grid-template-columns: 1fr; max-width: none; }
.payment-pending { margin-top: 28px; padding: 22px; border: 1px solid #d5dde8; border-radius: 12px; background: #f7f9fc; }
.payment-pending h2 { margin: 0 0 8px; font-size: 1.15rem; }
.payment-pending p { color: var(--muted); line-height: 1.55; }
.payment-pending .is-disabled { cursor: not-allowed; opacity: .7; }
.public-offer-footnote { margin: 22px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }

/* User administration */
.user-status { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 999px; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.user-status.is-active { background: #e5f3ec; color: #276348; }
.user-status.is-inactive { background: #edf0f4; color: #596575; }
.user-form { width: min(100%, 900px); padding: clamp(20px, 3vw, 30px); }
.user-form section + section { margin-top: 28px; padding-top: 26px; border-top: 1px solid #edf0f4; }
.user-form h2 { margin: 0 0 4px; font-size: 1.08rem; }
.seller-settings-form .form-field + h2 { margin-top: 28px; }
.user-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px 22px; }
.user-form label { min-width: 0; color: #4b596c; font-size: .78rem; font-weight: 750; }
.user-form input, .user-form select, .user-form textarea { width: 100%; min-width: 0; min-height: 46px; margin-top: 7px; padding: 10px 12px; border: 1px solid #bcc6d3; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.user-form input:focus, .user-form select:focus { outline: 3px solid rgba(23,78,166,.18); border-color: var(--brand); }
.user-active-check { display: flex !important; align-items: flex-start; gap: 10px; align-self: end; min-height: 46px; margin-bottom: 0; padding: 9px 0; }
.user-active-check input { flex: 0 0 auto; width: 19px; min-height: 19px; margin: 1px 0 0; }
.user-active-check span { display: grid; gap: 2px; }
.user-active-check small, .field-note { color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.45; }
.field-note { margin: 12px 0 0; }
.user-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 30px; padding-top: 22px; border-top: 1px solid #edf0f4; }
.invitation-panel { margin-top: 20px; padding: clamp(20px, 3vw, 30px); }
.invitation-panel .section-heading { flex-wrap: wrap; gap: 12px 16px; }
.invitation-panel .section-heading > div { flex: 1 1 10rem; min-width: 0; }
.invitation-panel .section-heading > .user-status { flex: 0 1 auto; max-width: 100%; white-space: normal; text-align: center; }
.agency-filter-panel { grid-template-columns: minmax(180px, .5fr) auto; }
.agency-admin-card-recipient { display: grid; gap: 3px; }
.agency-admin-card-recipient small { color: var(--muted); font-size: .78rem; }
.agency-detail-status { flex: 0 0 auto; align-self: center; }
.agency-admin-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.agency-status-confirm { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 15px; }
.agency-status-confirm summary { cursor: pointer; color: var(--accent); font-weight: 750; }
.agency-status-confirm form { display: grid; justify-items: start; gap: 14px; margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.agency-user-list, .legal-acceptance-list { display: grid; gap: 10px; }
.agency-user-list article, .legal-acceptance-list article { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.agency-user-list article > div, .legal-acceptance-list article > div { min-width: 0; display: grid; align-content: start; gap: 4px; }
.agency-user-list small, .legal-acceptance-list small { color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.legal-acceptance-list article { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,.8fr); }
.legal-acceptance-list details { grid-column: 1 / -1; min-width: 0; }
.legal-acceptance-list summary { cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 700; }
.legal-acceptance-list code { display: block; margin-top: 7px; font-size: .72rem; }
.invitation-facts { margin-top: 16px; }
.invitation-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #edf0f4; }
.invitation-actions form { margin: 0; }
.agency-public-body { min-width: 0; background: var(--canvas); }
.agency-registration-shell { width: 100%; min-width: 0; padding: clamp(12px, 4vw, 48px); }
.agency-registration-card { width: min(100%, 980px); min-width: 0; margin: 0 auto; padding: clamp(22px, 5vw, 46px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 16px 45px rgba(25,38,58,.08); }
.agency-registration-card > .intro { max-width: 720px; }
.agency-registration-form { display: grid; gap: 28px; }
.agency-registration-form fieldset { min-width: 0; margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
.agency-registration-form legend { padding: 0 8px; font-size: 1.05rem; font-weight: 800; }
.agency-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
.agency-form-grid label { min-width: 0; }
.agency-form-grid input, .agency-form-grid select { width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; border: 1px solid #b9c2cf; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.agency-form-grid input:focus, .agency-form-grid select:focus { outline: 3px solid rgba(23,78,166,.18); border-color: var(--brand); }
.agency-field-wide { grid-column: 1 / -1; }
.readonly-value { min-height: 48px; display: flex; align-items: center; margin-top: 8px; padding: 11px 13px; border: 1px solid #d6dde6; border-radius: 9px; background: #f4f6f9; color: #465468; font-weight: 500; }
.field-error { display: block; margin-top: 6px; color: var(--danger); font-size: .8rem; line-height: 1.4; }
.agency-legal-grid { display: grid; gap: 16px; margin-top: 12px; }
.agency-legal-card { min-width: 0; padding: 20px; border: 1px solid #dce3eb; border-radius: 11px; background: #fafbfd; }
.agency-legal-card > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.agency-legal-card h2 { margin: 0; font-size: 1rem; }
.agency-legal-card > div:first-child span { flex: 0 0 auto; color: var(--muted); font-size: .76rem; font-weight: 700; }
.agency-legal-content { margin: 14px 0; overflow-wrap: anywhere; color: #3f4d61; line-height: 1.65; }
.agency-legal-card > a { color: var(--brand); font-size: .84rem; font-weight: 700; }
.agency-consent { min-width: 0; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 10px; align-items: start; margin: 18px 0 0; }
.agency-consent input { width: 20px; min-height: 20px; margin: 1px 0 0; }
.agency-consent span { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.agency-register-submit { width: 100%; }
.agency-registration-success { max-width: 720px; }
.agency-auth-shell { min-height: 100vh; display: grid; place-items: center; width: 100%; padding: clamp(12px,4vw,48px); }
.agency-auth-card { width: min(100%,480px); min-width: 0; padding: clamp(24px,5vw,42px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 16px 45px rgba(25,38,58,.08); }
.agency-auth-card form { display: grid; gap: 10px; }
.agency-auth-card form button { margin-top: 10px; }
.agency-auth-secondary { margin: 16px 0 0; text-align: center; }
.agency-auth-note { margin: 24px 0 0; color: var(--muted); font-size: .92rem; }
.agency-area-body { min-width: 0; background: var(--canvas); }
.agency-area-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; padding: 12px clamp(16px,4vw,48px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }
.agency-area-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.agency-area-brand > span:last-child { display: grid; }
.agency-area-brand small { color: var(--muted); font-size: .78rem; }
.agency-menu-toggle { display: none; }
.agency-area-header nav, .agency-area-header nav form { display: flex; align-items: center; gap: 18px; margin: 0; }
.agency-area-header nav > a { color: var(--ink); font-weight: 700; text-decoration: none; }
.agency-area-main { width: min(100%,960px); margin: 0 auto; padding: clamp(20px,4vw,48px); }
.agency-area-card { min-width: 0; padding: clamp(22px,5vw,46px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 14px 38px rgba(25,38,58,.07); }
.agency-password-card { max-width: 640px; margin: 0 auto; }
.agency-password-form { display: grid; gap: 10px; margin-top: 24px; }
.agency-password-form button { justify-self: start; margin-top: 10px; }
.agency-profile-card { max-width: 860px; margin: 0 auto; }
.agency-profile-form { display: grid; gap: 24px; margin-top: 26px; }
.agency-profile-form fieldset { min-width: 0; margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
.agency-profile-form legend { padding: 0 8px; font-size: 1.05rem; font-weight: 800; }
.agency-profile-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.agency-coming-soon { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fb; }
.agency-coming-soon h2 { margin-top: 0; }
.agency-empty-state { margin-top: 28px; padding: 28px; border: 1px dashed #c8d1dd; border-radius: 12px; background: #f9fafc; text-align: center; }
.agency-empty-state h2 { margin-top: 0; }
.agency-offer-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 28px; }
.agency-offer-card { position: relative; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 8px 22px rgba(25,38,58,.05); }
.agency-offer-card:hover { border-color: #aebed2; box-shadow: 0 10px 28px rgba(25,38,58,.09); }
.agency-offer-card:focus-within { outline: 3px solid rgba(23,78,166,.24); outline-offset: 2px; }
.agency-offer-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.agency-offer-card h2 { margin: 7px 0 0; overflow-wrap: anywhere; }
.agency-offer-chevron { color: #64748b; font-size: 1.8rem; line-height: 1; }
.agency-offer-status { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #e8f0fd; color: #174ea6; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.agency-offer-card dl { display: grid; gap: 11px; margin: 20px 0; }
.agency-offer-card dl > div { min-width: 0; display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 12px; }
.agency-offer-card dt { color: var(--muted); font-size: .78rem; }
.agency-offer-card dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.agency-offer-card-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--brand); font-weight: 800; text-decoration: none; }
.agency-offer-card-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.agency-offer-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.agency-offer-title-row h1 { margin-top: 0; overflow-wrap: anywhere; }
.agency-offer-data { margin-top: 26px; }
.agency-offer-detail .payment-pending { margin-top: 28px; }
.agency-document-page { max-width: 820px; }
.agency-document-content { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfd; }

/* Lead detail */
.detail-page { min-width: 0; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--brand); font-size: .84rem; font-weight: 750; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.detail-alert { margin-bottom: 18px; padding: 12px 14px; border: 1px solid; border-radius: 10px; font-size: .9rem; }
.detail-alert.is-success { border-color: #add4c0; background: #edf8f2; color: #245f43; }
.detail-alert.is-error { border-color: #efb7b7; background: var(--danger-bg); color: var(--danger); }
.deletion-request-card.is-pending { border-color: #d8c8a5; background: #fffdf8; }
.deletion-request-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 26px; margin: 0 0 16px; }
.deletion-request-details div { min-width: 0; padding: 11px 0; border-top: 1px solid #eee7d8; }
.deletion-request-details dt { color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.deletion-request-details dd { margin: 5px 0 0; overflow-wrap: anywhere; line-height: 1.5; }
.deletion-request-form-wrap summary { width: fit-content; padding: 10px 15px; border: 1px solid #cbd4df; border-radius: 9px; background: #eef2f7; cursor: pointer; font-weight: 700; list-style: none; }
.deletion-request-form-wrap summary::-webkit-details-marker { display: none; }
.deletion-request-form { max-width: 680px; display: grid; gap: 8px; margin-top: 16px; padding: 18px; border: 1px solid #dce3eb; border-radius: 11px; background: #f9fafc; }
.deletion-request-form label { margin: 7px 0 0; color: #4b596c; font-size: .76rem; font-weight: 750; }
.deletion-request-form select, .deletion-request-form textarea { width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid #bcc6d3; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.deletion-request-form select { min-height: 43px; }
.deletion-request-form textarea { resize: vertical; line-height: 1.5; }
.deletion-request-form small { color: var(--muted); line-height: 1.45; }
.deletion-request-form button { width: fit-content; margin-top: 7px; }
.detail-hero { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px 28px; align-items: start; margin-bottom: 20px; padding: clamp(22px,3vw,34px); border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(25,38,58,.035); }
.detail-hero h1 { margin: 2px 0 0; font-size: clamp(1.65rem,3vw,2.35rem); }
.detail-subtitle { margin: 8px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.detail-hero > .status-badge { margin-top: 4px; }
.hero-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-facts div { min-width: 0; }
.hero-facts dt, .detail-list dt, .structured-list dt { color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.hero-facts dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: .9rem; font-weight: 700; }
.detail-columns { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(300px,.75fr); gap: 20px; align-items: start; }
.detail-primary, .detail-secondary { min-width: 0; display: grid; gap: 20px; }
.detail-card { min-width: 0; padding: clamp(20px,2.5vw,28px); border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(25,38,58,.03); }
.detail-card h2 { margin: 0 0 20px; font-size: 1.08rem; }
.detail-list, .structured-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; margin: 0; }
.calculator-answers { grid-template-columns: minmax(0,1fr); max-width: 780px; }
.detail-list div, .structured-list div { min-width: 0; padding: 12px 0; border-top: 1px solid #edf0f4; }
.detail-list dd, .structured-list dd { margin: 5px 0 0; overflow-wrap: anywhere; line-height: 1.5; }
.detail-list a { color: var(--brand); }
.structured-list.compact { margin-top: 18px; }
.structured-list .is-unknown { border-left: 3px solid #d9e0e9; padding-left: 12px; }
.value-list, .result-list { display: grid; gap: 7px; margin: 0; padding-left: 19px; }
.value-list li, .result-list li { overflow-wrap: anywhere; line-height: 1.5; }
.result-notice { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
.result-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid #edf0f4; }
.result-block h3, .service-grid h3 { margin: 0 0 11px; font-size: .86rem; }
.result-list { color: #445268; font-size: .84rem; }
.result-list.is-positive li::marker { color: #2d7a5a; }
.service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #edf0f4; }
.price-highlight { margin: 0; color: #203b66; font-size: clamp(1.6rem,3vw,2.25rem); font-weight: 800; letter-spacing: -.035em; }
.quiet-note, .muted-copy { color: var(--muted); font-size: .82rem; line-height: 1.55; }
.description-copy { overflow-wrap: anywhere; line-height: 1.72; white-space: normal; }
.break-anywhere { overflow-wrap: anywhere; word-break: break-word; }
.edit-card { position: sticky; top: 20px; }
.edit-form { display: grid; gap: 9px; margin: 0; padding: 18px 0; border-top: 1px solid #edf0f4; }
.edit-form:first-of-type { padding-top: 0; border-top: 0; }
.edit-form label, .note-form > label, .date-time-grid label { color: #4b596c; font-size: .76rem; font-weight: 750; }
.edit-form select, .edit-form input, .note-form textarea { width: 100%; min-width: 0; min-height: 43px; padding: 9px 11px; border: 1px solid #bcc6d3; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.inline-control { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.inline-control button { min-height: 43px; padding-inline: 13px; }
.edit-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.edit-form legend { margin-bottom: 9px; color: #4b596c; font-size: .76rem; font-weight: 750; }
.date-time-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.75fr); gap: 8px; }
.date-time-grid label { min-width: 0; display: grid; gap: 6px; }
.remove-form { display: grid; gap: 8px; margin: -10px 0 0; }
.remove-form label { color: #4b596c; font-size: .76rem; font-weight: 750; }
.remove-form select { width: 100%; min-width: 0; min-height: 43px; padding: 9px 11px; border: 1px solid #bcc6d3; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.detail-wide { margin-top: 20px; }
.detail-wide + .detail-columns { margin-top: 20px; }
.sales-dashboard { margin-bottom: 36px; }
.sales-kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; margin-bottom: 20px; }
.sales-kpi { min-width: 0; display: grid; gap: 8px; padding: 22px; color: var(--ink); text-decoration: none; }
.sales-kpi > span { color: var(--muted); font-weight: 700; }
.sales-kpi > strong { font-size: clamp(1.6rem, 3vw, 2.2rem); overflow-wrap: anywhere; }
.sales-kpi > small, .sales-chart > p { color: var(--muted); }
.sales-chart { padding: 22px; }
.sales-chart h3 { margin: 0; }
.sales-chart-row { display: grid; grid-template-columns: 90px minmax(0,1fr) 130px; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.sales-chart-row meter { width: 100%; height: 18px; }
.sales-chart-row meter::-webkit-meter-bar { background: #edf2f8; border: 0; border-radius: 5px; }
.sales-chart-row meter::-webkit-meter-optimum-value { background: var(--brand); border-radius: 5px; }
.sales-chart-row meter::-moz-meter-bar { background: var(--brand); }
.sales-chart-row > div { display: grid; gap: 3px; text-align: right; }
.sales-chart-row small { color: var(--muted); }
.note-form { display: grid; gap: 9px; margin: 0 0 24px; padding: 16px; border: 1px solid #dce3eb; border-radius: 11px; background: #f9fafc; }
.note-form textarea { resize: vertical; line-height: 1.55; }
.note-form > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.note-form small { color: var(--muted); }
.timeline { display: grid; gap: 0; }
.timeline article { min-width: 0; padding: 16px 0; border-top: 1px solid #edf0f4; }
.timeline-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.timeline-meta strong { overflow-wrap: anywhere; font-size: .86rem; }
.timeline-meta time { flex: 0 0 auto; color: var(--muted); font-size: .74rem; }
.timeline article p { margin: 8px 0 0; overflow-wrap: anywhere; line-height: 1.6; }
.technical-details summary { cursor: pointer; font-weight: 750; }
.technical-details[open] summary { margin-bottom: 20px; }
.technical-list { margin-top: 0; }

@media (max-width: 1359px) {
    .filter-panel:has(#mediation) { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-panel, .filter-panel:has(#assigned) { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .filter-actions { align-self: end; min-height: 43px; }
    .callback-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .callback-row > div:last-child { display: grid; }
    .callback-work-item, .callback-work-item.has-assignee { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .deletion-request-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .detail-columns { grid-template-columns: 1fr; }
    .edit-card { position: static; }
    .release-preview-grid { grid-template-columns: 1fr; }
    .delivery-list article { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .agency-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
    .checkout-summary-grid { grid-template-columns: 1fr; }
    .checkout-legal-document > div { display: grid; gap: 4px; }
    .sidebar { display: none; }
    .portal-main { margin-left: 0; padding: 32px 20px 60px; }
    .mobile-header { position: sticky; top: 0; z-index: 100; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #26364c; background: #111c2d; color: #fff; }
    .mobile-menu { position: static; }
    .mobile-menu summary { cursor: pointer; list-style: none; padding: 9px 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; font-size: .84rem; font-weight: 750; }
    .mobile-menu summary::-webkit-details-marker { display: none; }
    .mobile-menu-panel { display: none; position: absolute; top: 100%; left: 0; right: 0; min-height: calc(100vh - 66px); max-height: calc(100vh - 66px); overflow-y: auto; padding: 14px 16px 22px; background: #18263a; box-shadow: 0 14px 28px rgba(5,12,23,.3); }
    .mobile-menu[open] .mobile-menu-panel { display: block; }
    .mobile-menu-panel nav { display: grid; gap: 18px; }
    .mobile-menu-panel .nav-section-label { color: #91a2b8; }
    .mobile-account { margin-top: 18px; padding: 16px 12px; border-top: 1px solid rgba(255,255,255,.12); color: #fff; }
    .mobile-account strong, .mobile-account small { display: block; }
    .mobile-account small { margin-top: 3px; color: #aebcce; }
    .mobile-menu-panel > form { margin: 0 12px; }
    .callback-row { grid-template-columns: 135px 60px minmax(150px,1fr) minmax(120px,1fr); }
}

/* Cards use the portal's existing handset breakpoint, not notebook widths. */
@media (max-width: 767px) {
    .lead-overview-wrap { overflow: visible; }
    .lead-overview-table, .lead-overview-table tbody { display: block; width: 100%; }
    .lead-overview-table thead { display: none; }
    .lead-overview-table tbody { padding: 10px; }
    .lead-overview-table .lead-overview-row { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 18px; margin: 0 0 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(25,38,58,.035); }
    .lead-overview-table .lead-overview-row td { display: block; width: auto; min-width: 0; max-width: none; padding: 0; border: 0; word-break: normal; overflow-wrap: break-word; }
    .lead-overview-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
    .lead-overview-table .lead-overview-row:last-child { margin-bottom: 0; border-bottom: 1px solid var(--line); }
    .lead-overview-table .lead-overview-row:nth-child(even) { background: #f7f9fb; }
    .lead-overview-table .lead-overview-row:hover { border-color: #c7d1de; background: #f5f8fc; }
    .lead-overview-table .lead-overview-row:active { box-shadow: inset 0 0 0 2px rgba(43,108,176,.16); }
    .lead-overview-table .lead-card-id { grid-column: 1; grid-row: 1; align-self: center; }
    .lead-overview-table .lead-overview-row .lead-card-status { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; padding-right: 30px; }
    .lead-overview-table .lead-card-contact { grid-column: 1 / -1; grid-row: 2; }
    .lead-overview-table .lead-card-project { grid-column: 1; grid-row: 3; }
    .lead-overview-table .lead-card-price { grid-column: 2; grid-row: 3; }
    .lead-overview-table .lead-card-postal { grid-column: 1; grid-row: 4; }
    .lead-overview-table .lead-card-created { grid-column: 2; grid-row: 4; }
    .lead-overview-table .lead-card-mediation { grid-column: 1 / -1; grid-row: 5; }
    .lead-overview-table .lead-card-assignee { grid-column: 1 / -1; grid-row: 6; }
    .lead-overview-table .lead-card-id::before,
    .lead-overview-table .lead-card-status::before,
    .lead-overview-table .lead-card-contact::before { display: none; }
    .lead-overview-table .lead-card-id strong { font-size: .9rem; }
    .lead-overview-table .lead-contact-name,
    .lead-overview-table .lead-contact-company { display: block; max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
    .lead-overview-table .lead-contact-name { font-size: .98rem; line-height: 1.4; }
    .lead-overview-table .lead-contact-company { margin-top: 3px; color: #566477; font-weight: 500; line-height: 1.42; }
    .lead-overview-table .lead-contact-separator { display: none; }
    .lead-overview-table .lead-card-chevron { display: block; position: absolute; top: 14px; right: 16px; z-index: 2; color: #64748b; font-size: 1.6rem; font-weight: 400; line-height: 1; pointer-events: none; }
    .lead-overview-table .lead-row-link:focus::after { border-radius: 12px; }
}

@media (max-width: 767px) {
    .portal-main { padding: 26px 14px 50px; }
    .page-heading { align-items: flex-start; margin-bottom: 26px; }
    .page-heading-list { flex-direction: column; }
    .result-count { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding: 8px 12px; }
    .result-count strong { font-size: 1.1rem; }
    .metric-grid { grid-template-columns: 1fr; gap: 10px; }
    .metric-card { padding: 16px 17px; }
    .section-heading { align-items: flex-start; }
    .search-panel, .filter-panel, .filter-panel:has(#assigned), .filter-panel:has(#mediation) { grid-template-columns: 1fr; }
    .search-panel .button-secondary { order: 3; }
    .filter-actions { flex-wrap: wrap; }
    .list-panel, .panel { border-radius: 11px; }
    .table-wrap { overflow: visible; }
    .lead-table, .lead-table tbody, .lead-table tr, .lead-table td { display: block; width: 100%; }
    .record-table { min-width: 0; }
    .recipient-filter-panel { grid-template-columns: 1fr; }
    .lead-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .lead-table tbody { padding: 0 14px; }
    .lead-table tr { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
    .lead-table tr:last-child { border-bottom: 0; }
    .lead-table td { max-width: none; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
    .lead-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
    .contact-cell { min-width: 0; }
    .price-cell { white-space: normal; }
    .callback-list { padding: 0 14px; }
    .callback-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; padding: 16px 0; }
    .callback-row > div:last-child { display: grid; }
    .callback-row.is-overdue { margin-inline: -14px; padding-inline: 14px; }
    .callback-worklist { padding: 0 14px; }
    .callback-work-item, .callback-work-item.has-assignee { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 17px 0; }
    .callback-work-item.is-overdue { margin-inline: -14px; padding-inline: 14px; }
    .callback-open { align-self: end; }
    .pagination { align-items: flex-start; flex-direction: column; }
    .pagination div, .pagination a { width: 100%; }
    .pagination a { text-align: center; }
}

@media (max-width: 767px) {
    .record-table-wrap { overflow: visible; }
    .record-table tbody { padding: 10px; }
    .record-table .record-link-row { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 18px; margin: 0 0 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(25,38,58,.035); }
    .record-table .record-link-row:last-child { margin-bottom: 0; border-bottom: 1px solid var(--line); }
    .record-table .record-link-row:nth-child(even) { background: #f7f9fb; }
    .record-table .record-link-row:hover { border-color: #c7d1de; background: #f5f8fc; }
    .record-table .record-link-row td { min-width: 0; overflow-wrap: anywhere; }
    .record-table .break-anywhere { overflow-wrap: anywhere; }
    .callback-table .callback-work-contact { grid-column: 1 / -1; }
    .callback-table .is-overdue, .callback-table .is-overdue:nth-child(even) { background: #fff8f7; }
    .record-table .record-link-row:active, .callback-work-item.record-link-row:active, .callback-row.record-link-row:active { box-shadow: inset 0 0 0 2px rgba(43,108,176,.16); }
    .record-table .record-card-title { grid-column: 1; grid-row: 1; align-self: center; padding-right: 8px; }
    .record-table .record-card-status { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; padding-right: 30px; }
    .record-table .record-card-status .user-status { max-width: 100%; white-space: normal; text-align: center; }
    .record-table .record-card-title::before, .record-table .record-card-status::before, .record-table .record-action-cell::before { display: none; }
    .record-table .record-card-title { overflow-wrap: anywhere; font-size: .94rem; }
    .record-table .record-action-cell { position: static; grid-column: 1; grid-row: 1; width: 0; height: 0; padding: 0; overflow: visible; }
    .record-action-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .record-table .record-chevron, .callback-work-item .record-chevron, .callback-row .record-chevron, .deletion-request-item .record-chevron { display: block; position: absolute; top: 14px; right: 16px; z-index: 2; color: #64748b; font-size: 1.6rem; font-weight: 400; line-height: 1; pointer-events: none; }
    .record-primary-link:focus::after { border-radius: 12px; }

    .agency-lead-table .agency-card-project { grid-column: 1; grid-row: 2; }
    .agency-lead-table .agency-card-recipients { grid-column: 2; grid-row: 2; }
    .agency-lead-table .agency-card-groups { grid-column: 1 / -1; grid-row: 3; }
    .agency-lead-table .agency-card-released { grid-column: 1; grid-row: 4; }
    .agency-lead-table .agency-card-admin { grid-column: 2; grid-row: 4; }
    .agency-lead-table .agency-card-delivery { grid-column: 1 / -1; grid-row: 5; }

    .recipient-table .recipient-card-company { grid-column: 1 / -1; grid-row: 2; }
    .recipient-table .recipient-card-email { grid-column: 1 / -1; grid-row: 3; }
    .recipient-table .recipient-card-groups { grid-column: 1 / -1; grid-row: 4; }
    .recipient-table .recipient-card-account { grid-column: 1 / -1; grid-row: 5; }
    .recipient-table .recipient-card-updated { grid-column: 1 / -1; grid-row: 6; }
    .recipient-group-table .group-card-description { grid-column: 1 / -1; grid-row: 2; }
    .recipient-group-table .group-card-recipients { grid-column: 1; grid-row: 3; }
    .recipient-group-table .group-card-updated { grid-column: 2; grid-row: 3; }
    .user-table .user-card-email { grid-column: 1 / -1; grid-row: 2; }
    .user-table .user-card-role { grid-column: 1; grid-row: 3; }
    .user-table .user-card-login { grid-column: 2; grid-row: 3; }
    .user-table .user-card-created { grid-column: 1 / -1; grid-row: 4; }
    .agencies-table .agency-admin-card-user { grid-column: 1 / -1; grid-row: 2; }
    .agencies-table .agency-admin-card-email { grid-column: 1 / -1; grid-row: 3; }
    .agencies-table .agency-admin-card-recipient { grid-column: 1 / -1; grid-row: 4; }
    .agencies-table .agency-admin-card-registered { grid-column: 1; grid-row: 5; }
    .agencies-table .agency-admin-card-login { grid-column: 2; grid-row: 5; }
    .agencies-table .agency-admin-card-offers { grid-column: 1 / -1; grid-row: 6; }

    .callback-worklist { padding: 10px; }
    .callback-worklist .callback-work-item, .callback-worklist .callback-work-item.has-assignee { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 18px; margin: 0 0 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    .callback-worklist .callback-work-item:last-child { margin-bottom: 0; border-bottom: 1px solid var(--line); }
    .callback-worklist .callback-work-item.is-overdue { margin-inline: 0; padding-inline: 16px; background: #fff8f7; }
    .callback-work-item .callback-work-time { grid-column: 1; grid-row: 1; }
    .callback-work-item .callback-card-lead { grid-column: 2; grid-row: 1; padding-right: 28px; }
    .callback-work-item .callback-work-contact { grid-column: 1 / -1; grid-row: 2; }
    .callback-work-item .callback-open { position: static; width: 0; height: 0; padding: 0; overflow: visible; }
    .callback-work-item .callback-open-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

    .callback-list { padding: 10px; }
    .callback-list .callback-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 18px; margin-bottom: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    .callback-list .callback-row:last-child { margin-bottom: 0; border-bottom: 1px solid var(--line); }
    .callback-list .callback-row.is-overdue { margin-inline: 0; padding-inline: 16px; background: #fff8f7; }

    .deletion-request-item { padding-right: 46px; }
}

@media (max-width: 480px) {
    .sales-kpis { grid-template-columns: 1fr; gap: 10px; }
    .sales-kpi, .sales-chart { padding: 16px; }
    .sales-chart-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
    .sales-chart-row meter { grid-column: 1 / -1; grid-row: 2; }
    .sales-chart-row > div { grid-column: 2; grid-row: 1; }
}

@media (max-width: 767px) {
    .agency-admin-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .agency-admin-detail-grid { grid-template-columns: 1fr; }
    .agency-user-list article, .legal-acceptance-list article { grid-template-columns: 1fr; }
    .legal-acceptance-list details { grid-column: auto; }
    .lead-table tbody tr:nth-child(even) { background: #f7f9fb; }
    .user-form-grid { grid-template-columns: 1fr; }
    .mediation-entry { align-items: stretch; flex-direction: column; }
    .mediation-entry .button-primary { width: 100%; }
    .delivery-list article { grid-template-columns: 1fr; }
    .delivery-list article form, .delivery-list article button { width: 100%; }
    .public-offer-shell { padding: 12px 8px; }
    .public-offer-card { padding: 22px 16px; border-radius: 12px; }
    .group-choice-grid { grid-template-columns: 1fr; }
    .delivery-disclosure > summary { align-items: flex-start; flex-wrap: wrap; padding: 18px; }
    .delivery-disclosure-content { padding: 18px; }
    .agency-registration-shell { padding: 10px 8px; }
    .agency-registration-card { padding: 22px 16px; border-radius: 12px; }
    .agency-registration-form fieldset { padding: 18px 14px; }
    .agency-form-grid { grid-template-columns: 1fr; }
    .agency-field-wide { grid-column: auto; }
    .agency-legal-card { padding: 16px 14px; }
    .agency-legal-card > div:first-child { align-items: flex-start; flex-direction: column; gap: 4px; }
    .agency-auth-shell { padding: 10px 8px; }
    .agency-auth-card { padding: 24px 18px; border-radius: 12px; }
    .agency-area-header { align-items: stretch; flex-direction: column; gap: 10px; padding: 10px 12px; }
    .agency-area-header nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 8px; }
    .agency-area-header nav > a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 7px 9px; border-radius: 8px; background: #f1f4f8; font-size: .85rem; text-align: center; }
    .agency-area-header nav > a[aria-current="page"] { background: #e4ecf8; color: var(--brand); }
    .agency-area-header nav form, .agency-area-header nav form button { width: 100%; }
    .agency-password-form button { justify-self: stretch; width: 100%; }
    .agency-profile-form fieldset { padding: 18px 14px; }
    .agency-profile-actions { align-items: stretch; flex-direction: column-reverse; }
    .agency-profile-actions > * { width: 100%; }
    .agency-area-main { padding: 16px 10px; }
    .agency-area-card { padding: 24px 18px; border-radius: 12px; }
    .agency-offer-list { grid-template-columns: 1fr; }
    .agency-offer-title-row { flex-direction: column-reverse; gap: 10px; }
}

@media print {
    .agency-public-body { background: #fff; }
    .agency-registration-shell { padding: 0; }
    .agency-registration-card { width: 100%; max-width: none; padding: 0; border: 0; box-shadow: none; }
    .print-hint { display: none; }
}

@media (max-width: 374px) {
    .mobile-header { padding-inline: 12px; }
    .portal-main { padding-inline: 10px; }
    .mobile-header .portal-brand > span:last-child { display: none; }
    .lead-table tr { grid-template-columns: 1fr; }
    .callback-row { grid-template-columns: 1fr; }
    .callback-filter > div { align-items: stretch; flex-direction: column; }
    .callback-filter select { min-width: 0; width: 100%; }
    .callback-work-item, .callback-work-item.has-assignee { grid-template-columns: 1fr; }
    .deletion-request-summary, .deletion-request-details { grid-template-columns: 1fr; }
    .deletion-request-actions, .deletion-confirm form > div { align-items: stretch; flex-direction: column; }
    .deletion-request-actions > *, .deletion-request-actions form, .deletion-request-actions button, .deletion-confirm, .deletion-confirm > summary, .deletion-confirm form > div > * { width: 100%; }
    .deletion-request-form { padding: 14px; }
    .deletion-request-form button { width: 100%; }
    .detail-hero { grid-template-columns: 1fr; padding: 18px 16px; }
    .detail-hero > .status-badge { justify-self: start; }
    .hero-facts, .detail-list, .structured-list { grid-template-columns: 1fr; }
    .detail-card { padding: 18px 15px; }
    .inline-control, .date-time-grid { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr; }
    .note-form > div, .timeline-meta { align-items: stretch; flex-direction: column; }
    .timeline-meta time { flex: auto; }
    .user-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .user-form-actions > * { width: 100%; }
    .invitation-actions { align-items: stretch; flex-direction: column; }
    .invitation-actions form, .invitation-actions button { width: 100%; }
    .delivery-summary-grid { grid-template-columns: 1fr; }
    .delivery-summary-grid > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
    .agency-area-header nav { grid-template-columns: 1fr 1fr; }
    .agency-offer-card dl > div { grid-template-columns: 1fr; gap: 3px; }
    .agency-lead-table .record-card-status { grid-column: 1 / -1; grid-row: 2; justify-self: start; padding-right: 0; }
    .agency-lead-table .agency-card-project, .agency-lead-table .agency-card-recipients { grid-row: 3; }
    .agency-lead-table .agency-card-groups { grid-row: 4; }
    .agency-lead-table .agency-card-released, .agency-lead-table .agency-card-admin { grid-row: 5; }
    .agency-lead-table .agency-card-delivery { grid-row: 6; }
    .agencies-table .agency-admin-row > td { grid-column: 1 / -1; }
    .agencies-table .record-card-title { grid-row: 1; }
    .agencies-table .record-card-status { grid-row: 2; justify-self: start; padding-right: 0; }
    .agencies-table .agency-admin-card-user { grid-row: 3; }
    .agencies-table .agency-admin-card-email { grid-row: 4; }
    .agencies-table .agency-admin-card-recipient { grid-row: 5; }
    .agencies-table .agency-admin-card-registered { grid-row: 6; }
    .agencies-table .agency-admin-card-login { grid-row: 7; }
    .agencies-table .agency-admin-card-offers { grid-row: 8; }
    .agencies-table .record-action-cell { grid-row: 1; }
}

.agency-checkout .checkout-summary-grid > section,
.agency-checkout .checkout-block,
.agency-checkout .structured-list,
.agency-checkout .structured-list dd { min-width: 0; max-width: 100%; }
.agency-checkout .structured-list dd { overflow-wrap: anywhere; word-break: normal; }
@media (max-width: 900px) {
    .agency-area-header { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; }
    .agency-area-brand { min-width: 0; gap: 8px; }
    .agency-menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 10px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
    .agency-menu-toggle[aria-expanded="false"],
    .agency-menu-toggle[aria-expanded="false"]:hover,
    .agency-menu-toggle[aria-expanded="false"]:focus,
    .agency-menu-toggle[aria-expanded="false"]:active { background: #fff; color: var(--ink); }
    .agency-menu-toggle[aria-expanded="true"],
    .agency-menu-toggle[aria-expanded="true"]:hover,
    .agency-menu-toggle[aria-expanded="true"]:focus,
    .agency-menu-toggle[aria-expanded="true"]:active { background: var(--brand); color: #fff; border-color: var(--brand); }
    .agency-menu-toggle:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
    .agency-menu-icon { position: relative; width: 20px; height: 2px; background: currentColor; }
    .agency-menu-icon::before, .agency-menu-icon::after { content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; }
    .agency-menu-icon::before { top: -6px; }
    .agency-menu-icon::after { top: 6px; }
    .agency-menu-toggle[aria-expanded="true"] .agency-menu-icon { background: transparent; }
    .agency-menu-toggle[aria-expanded="true"] .agency-menu-icon::before { top: 0; transform: rotate(45deg); }
    .agency-menu-toggle[aria-expanded="true"] .agency-menu-icon::after { top: 0; transform: rotate(-45deg); }
    .agency-area-header nav { display: none; flex-basis: 100%; width: 100%; }
    .agency-area-header nav.is-open { display: grid; grid-template-columns: 1fr; gap: 8px; max-height: calc(100dvh - 90px); overflow-y: auto; }
    .agency-area-header nav > a { display: flex; align-items: center; min-height: 44px; padding: 9px 12px; background: #f1f4f8; border-radius: 8px; font-size: .9rem; text-align: left; }
    .agency-area-header nav > a[aria-current="page"] { background: #e4ecf8; color: var(--brand); }
    .agency-area-header nav form, .agency-area-header nav form button { width: 100%; }
}

.agency-checkout .lead-contact-email { overflow-wrap: anywhere; word-break: normal; }
.lead-contact-email .email-part { white-space: nowrap; }
@media (max-width: 480px) {
    .agency-checkout .lead-contact-card { padding-inline: 12px; }
    .agency-checkout .lead-contact-email { font-size: .9rem; }
}
