/*
 * Amplify staff portal. Built on the design system's tokens (ds.css, copied
 * from design/_ds at build time): use var(--…), never raw colours, except
 * where the design system's components themselves use fixed values (the
 * Google sign-in button, per Google's branding).
 * Teal and neutrals only. Error red only for things that are actually broken.
 */

/* Status colours and the teal "change up" ground from the design system's data.css (which the portal does not load). */
:root { --status-error: #FF8A80; --status-error-bg: #3A1A17; --change-up-bg: #0F3D42; }
[data-theme="light"] { --status-error: #B3261E; --status-error-bg: #FBE9E7; --change-up-bg: #E6F7F9; }

html { background: var(--amp-near-black); }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; outline: none; }
[hidden] { display: none !important; }
img, svg { display: block; }
.icon { flex-shrink: 0; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 12px 16px; background: var(--amp-teal); color: var(--amp-near-black); font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
.skip:focus { top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type roles */
.display { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; line-height: var(--display-line-height); letter-spacing: var(--display-tracking); color: var(--text-strong); margin: 0; }
.display em { font-style: normal; color: var(--text-accent); }
.eyebrow { font-family: var(--font-body); font-weight: var(--eyebrow-weight); font-size: var(--eyebrow-size); letter-spacing: var(--eyebrow-tracking); text-transform: uppercase; color: var(--text-muted); line-height: 1.4; }
.label { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); margin: 0; }
.muted { color: var(--text-muted); }
.sub { display: block; font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.times-note { margin: 0; font-size: 15px; color: var(--amp-grey-500); }
.times-small { font-size: 14px; color: var(--text-muted); }
/* Page titles on the working screens: normal body type, not display (the design's compact headers). */
.page-title { margin: 0; font-family: var(--font-body); font-weight: 500; font-size: 28px; line-height: 1.2; color: var(--text-strong); overflow-wrap: anywhere; }

/* Bands */
.band { padding: 64px; }
.band-black { background: #000; }
.band-navy { background: var(--amp-navy); }
.band-light { background: var(--bg-page); color: var(--text-body); flex: 1; }

/* Buttons (design system Button) */
.btn { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; line-height: 1; min-height: 48px; min-width: 48px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--text-on-accent); }
.btn-primary:active { background: var(--accent-press); }
.btn-secondary { background: transparent; color: var(--text-strong); border-color: var(--text-strong); }
.btn-secondary:hover { background: var(--text-strong); color: var(--bg-page); }
.btn-ghost { background: transparent; color: var(--text-accent); padding: 0 16px; }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-strong); }
.btn-quiet { background: var(--bg-tile); color: var(--text-strong); border-color: var(--border-default); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--disabled-fill); color: var(--text-disabled); border-color: transparent; cursor: not-allowed; }
.btn-full { width: 100%; }
:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }

/* Header */
.app-header { background: var(--amp-header-black); border-bottom: 1px solid #000; position: relative; z-index: 20; }
.header-desktop, .header-phone { height: var(--header-h); display: flex; align-items: center; gap: 40px; padding: 0 32px; }
.header-phone { display: none; gap: 12px; padding: 0 12px 0 16px; }
.app-header > .brand { height: var(--header-h); display: flex; align-items: center; padding: 0 32px; }
.brand { color: var(--amp-teal); display: flex; align-items: center; text-decoration: none; }
.nav { display: flex; gap: 28px; align-self: stretch; }
.nav-link { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--amp-grey-500); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-link:hover { color: #fff; }
.nav-link.is-current { color: #fff; box-shadow: inset 0 -3px 0 var(--amp-teal); }
.header-spacer { flex: 1; }
.count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--amp-teal); color: var(--amp-near-black); font-family: var(--font-label); font-weight: 700; font-size: 14px; line-height: 24px; text-align: center; letter-spacing: 0; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.account, .phone-menu, .owner-picker { position: relative; }
.account-button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--amp-navy); border: 1px solid var(--border-strong); color: #fff; font-family: var(--font-label); font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.account[open] .account-button { border-color: var(--amp-teal); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; background: var(--amp-header-black); border: 1px solid var(--border-default); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); color: var(--text-body); }
.account-pop { width: 340px; }
.account-who { padding: 18px 16px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--border-default); }
.account-name { color: #fff; font-weight: 500; font-size: 17px; }
.account-email { font-size: 14px; color: var(--amp-grey-500); overflow-wrap: anywhere; }
.account-setting { padding: 16px; border-bottom: 1px solid var(--border-default); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.setting-label { color: #fff; font-weight: 400; font-size: 16px; }
.setting-help { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--amp-grey-500); }
.setting-last { margin: 12px 0 0; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--bg-selected); border-radius: var(--radius-sm); color: var(--text-strong); font-size: 14px; line-height: 1.5; }
.setting-last .icon { color: var(--amp-teal); margin-top: 1px; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 14px; border: none; padding: 0; background: var(--border-strong); cursor: pointer; flex-shrink: 0; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left var(--dur-fast) var(--ease-out); }
.switch[aria-checked="true"] { background: var(--amp-teal); }
.switch[aria-checked="true"] .switch-knob { left: 23px; background: var(--amp-near-black); }
.menu-item { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: none; border: none; color: var(--text-body); font-family: var(--font-body); font-size: 16px; font-weight: 300; cursor: pointer; text-align: left; text-decoration: none; }
.menu-item:hover { background: var(--bg-hover); color: #fff; }

.menu-button { width: 48px; height: 48px; display: grid; place-items: center; position: relative; color: #fff; }
.bars { display: flex; flex-direction: column; gap: 5px; }
.bars span { display: block; width: 22px; height: 2px; background: currentColor; }
.count-menu { position: absolute; top: 2px; left: 26px; }
.phone-nav { left: 0; right: auto; width: 260px; display: flex; flex-direction: column; padding: 8px 0; }
.phone-nav .nav-link { min-height: 48px; padding: 0 16px; }
.phone-nav .nav-link.is-current { box-shadow: inset 3px 0 0 var(--amp-teal); }

/* Toasts */
.toasts { position: fixed; top: 88px; right: 32px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 12px; width: min(420px, calc(100vw - 32px)); padding: 14px 8px 14px 16px; background: var(--amp-header-black); border: 1px solid var(--border-default); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); color: var(--text-body); }
.toast-icon { margin-top: 2px; color: var(--text-accent); }
.toast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.toast-title { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--text-strong); }
.toast-message { font-size: 14px; line-height: 1.5; }
.toast-action { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-accent); min-height: 32px; padding: 0 8px; display: flex; align-items: center; text-decoration: none; margin-top: -4px; }
.toast-close { width: 32px; height: 32px; display: grid; place-items: center; background: none; border: none; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-pill); margin-top: -4px; }

/* Inline messages */
.message { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-selected); }
.message-icon { margin-top: 1px; color: var(--text-accent); }
.message-error { background: var(--status-error-bg); }
.message-error .message-icon { color: var(--status-error); }
.message-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.message-title { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--text-strong); }
.message-body { font-size: 15px; line-height: 1.5; color: var(--text-body); }

/* Sign-in */
.signin { display: grid; grid-template-columns: minmax(0, 1fr) 520px; min-height: 100vh; background: #000; }
body:has(.signin) .app-header { display: none; }
.signin-hero { padding: 56px 64px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-width: 0; }
.signin-headline { display: flex; flex-direction: column; gap: 28px; }
.signin-h1 { font-size: 112px; line-height: 1; color: #fff; }
.signin-panel { background: var(--amp-near-black); border-left: 1px solid var(--border-subtle); padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.signin-spacer { height: 30px; }
.signin-form { display: flex; flex-direction: column; gap: 24px; }
.signin-title { display: flex; flex-direction: column; gap: 8px; }
.signin-title p { margin: 0; font-size: 16px; }
.signin-h2 { font-size: 44px; color: #fff; }
.google-button { min-height: 48px; width: 100%; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: #FFFFFF; color: #1F1F1F; border: 1px solid #747775; border-radius: var(--radius-sm); font-family: var(--font-body); font-weight: 500; font-size: 16px; cursor: pointer; }
.google-button:hover { background: #F7F8F8; }
.google-button .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #1F1F1F; border-right-color: transparent; animation: amp-spin .8s linear infinite; }
.google-button[aria-busy="true"] { cursor: progress; }
.google-button[aria-busy="true"] .spinner { display: inline-block; }
.google-button[aria-busy="true"] .google-g { display: none; }
.signin-note { margin: -12px 0 0; font-size: 14px; color: var(--amp-grey-500); }
.signin-client { margin: 0; padding-top: 24px; border-top: 1px solid var(--border-subtle); font-size: 14px; color: var(--amp-grey-500); }

/* Overview */
.overview-hero { display: flex; flex-direction: column; gap: 16px; padding-bottom: 72px; }
.overview-h1 { font-size: 88px; color: #fff; }
.overview-attention { padding: 88px 64px 96px; }
.attention-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 8px 0 0; padding-bottom: 24px; border-bottom: 1px solid var(--border-default); max-width: calc(58.33% - 32px); }
.attention-h2 { font-size: 44px; color: #fff; }
.attention-summary { display: flex; align-items: center; gap: 8px; }
.attention-line { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: #fff; }
.attention-link { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 8px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--amp-teal); text-decoration: none; }
.attention-link:hover { color: #fff; }
.attention-list { list-style: none; margin: 0; padding: 0; max-width: calc(58.33% - 32px); }
.attention-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 80px; padding: 12px 16px; border-top: 1px solid var(--border-default); }
.attention-list .attention-item:first-child { border-top: none; }
.attention-item.is-hot { background: var(--change-up-bg); box-shadow: inset 0 0 0 1px var(--amp-teal); }
.attention-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amp-teal); }
.attention-raced .attention-dot { background: var(--amp-grey-500); }
.attention-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.attention-main { display: flex; align-items: center; gap: 6px; font-size: 17px; color: var(--amp-mid-grey); }
.attention-name { color: #fff; font-weight: 500; text-decoration: none; }
.attention-name:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Mid grey, not the design's grey-500: grey-500 on the teal ground falls short of 4.5:1. */
.attention-sub { margin: 0; font-size: 15px; color: var(--amp-mid-grey); }
.attention-raced .raced { color: #fff; }

/* Compact page header (inbox and pipeline): one row with the title, the time note, the view switch and Add lead */
.band.page-head { flex: 0 0 auto; padding: 20px 64px 0; }
.page-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.page-title-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; min-width: 0; }
.page-head-actions { display: flex; align-items: center; gap: 16px; }
.add-phone { display: none !important; }
.view-switch { display: flex; border: 1px solid var(--border-default); }
.view-option { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--text-body); text-decoration: none; }
.view-option:hover { background: var(--bg-hover); color: var(--text-strong); }
.view-option.is-current { background: var(--amp-near-black); color: #fff; }

/* Leads list */
.band.leads-body { padding: 8px 64px 96px; }
.tabs-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; border-bottom: 1px solid var(--border-subtle); }
.tabs { display: flex; gap: 36px; }
.tab { display: flex; align-items: center; min-height: 48px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 16px; color: var(--text-muted); text-decoration: none; }
.tab:hover { color: var(--text-strong); }
.tab.is-current { color: var(--text-strong); box-shadow: inset 0 -3px 0 var(--accent); }
.tab-note { font-size: 14px; color: var(--text-muted); padding-bottom: 14px; }
.new-arrival { padding: 12px 0 0; }
.new-arrival-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; background: var(--bg-selected); border: 1px solid var(--border-accent); border-radius: var(--radius-sm); color: var(--text-accent); font-family: var(--font-body); font-weight: 500; font-size: 15px; cursor: pointer; }

.leads-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.leads-table { margin-top: 0; }
.leads-table th { text-align: left; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); padding: 12px 16px 8px; border-bottom: 1px solid var(--border-default); white-space: nowrap; }
.leads-table td { height: 64px; padding: 8px 16px; border-bottom: 1px solid var(--border-subtle); font-size: 16px; color: var(--text-strong); vertical-align: middle; }
.leads-table td.cell-source, .leads-table td.cell-arrived { font-size: 15px; }
.lead-link + .sub { line-height: 1.4; }
.leads-table td.cell-source, .leads-table td.cell-source + td { color: var(--text-body); }
.leads-table .row:hover td { background: var(--bg-hover); }
.cell-lead { min-width: 200px; }
.lead-link { font-weight: 500; font-size: 17px; color: var(--text-strong); text-decoration: none; }
.lead-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-wait { white-space: nowrap; }
.wait-wrap { display: flex; align-items: center; gap: 4px; }
.wait { font-weight: 400; font-size: 16px; color: var(--text-strong); white-space: nowrap; }
.wait-line { display: block; font-size: 15px; font-weight: 500; color: var(--text-strong); }
.reminder-line { display: block; font-size: 14px; color: var(--text-muted); }
.cell-wait .info, .prow-wait .info { display: inline-block; }

/* The waiting highlight: teal, never a warning colour. On once an unclaimed lead passes 4 working hours. */
.row.is-hot td { background: var(--bg-selected); box-shadow: inset 0 1px 0 var(--border-accent), inset 0 -1px 0 var(--border-accent); }
.row.is-hot td:first-child { box-shadow: inset 1px 0 0 var(--border-accent), inset 0 1px 0 var(--border-accent), inset 0 -1px 0 var(--border-accent); }
.row.is-hot td:last-child { box-shadow: inset -1px 0 0 var(--border-accent), inset 0 1px 0 var(--border-accent), inset 0 -1px 0 var(--border-accent); }
.leads-table .row.is-hot:hover td { background: var(--bg-selected); }
.is-hot .wait, .is-hot .wait-line { font-weight: 500; color: var(--text-accent); }
.prow.is-hot { background: var(--bg-selected); box-shadow: inset 0 0 0 1px var(--border-accent); }
.is-hot .btn-claim { background: var(--accent); color: var(--text-on-accent); border-color: transparent; }
.is-hot .btn-claim:hover { background: var(--accent-hover); color: var(--text-on-accent); }
.cell-action { text-align: right; width: 1%; white-space: nowrap; }
.claim-form { display: inline-block; }
.row-raced td { border-bottom: none; }
.row-note td { padding: 0 16px 16px; }
.raced { margin: 0; display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--text-strong); }
.raced .icon { color: var(--text-accent); }
.owner { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; color: var(--text-strong); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-tile); color: var(--text-strong); display: inline-grid; place-items: center; font-family: var(--font-label); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.sort.is-on { color: var(--text-strong); }
.sort:hover { color: var(--text-strong); }

.stage-pill { display: inline-block; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; padding: 3px 8px; border-radius: var(--radius-xs); color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--border-strong); }
.stage-new { background: var(--bg-tile); box-shadow: none; }
.stage-won { background: var(--bg-selected); color: var(--text-accent); box-shadow: none; }
.stage-lost { background: var(--bg-tile); color: var(--text-muted); box-shadow: none; }

.leads-phone { display: none; list-style: none; margin: 0; padding: 0; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border-subtle); }
.prow-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prow-wait { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.prow-wait .wait { font-size: 15px; font-weight: 500; }
.prow-open { width: 48px; height: 48px; display: grid; place-items: center; color: var(--text-muted); }

.info { position: relative; display: inline-block; }
.info > summary { width: 24px; height: 24px; display: grid; place-items: center; color: var(--text-muted); border-radius: 50%; }
.info > summary:hover { color: var(--text-strong); }
.info-pop { position: absolute; left: -12px; top: calc(100% + 8px); z-index: 25; width: 290px; padding: 12px 14px; background: var(--amp-header-black); color: var(--amp-mid-grey); border: 1px solid var(--border-default); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 1.5; white-space: normal; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 80px 16px; text-align: center; color: var(--text-muted); }
.empty p { margin: 0; font-size: 18px; color: var(--text-strong); }

.skel { padding-top: 8px; }
.skel-row { display: grid; grid-template-columns: 2fr 1fr 1.6fr .6fr 1.3fr 1.2fr 110px; gap: 24px; align-items: center; padding: 22px 16px; border-bottom: 1px solid var(--border-subtle); }
.skeleton { display: block; height: 14px; background: var(--skeleton); border-radius: var(--radius-xs); animation: amp-pulse 1.4s var(--ease-in-out) infinite; }
.skel-name { height: 16px; } .skel-62 { width: 62%; } .skel-48 { width: 48%; } .skel-56 { width: 56%; }
.skel-70 { width: 70px; } .skel-150 { width: 150px; max-width: 100%; } .skel-36 { width: 36px; } .skel-120 { width: 120px; max-width: 100%; } .skel-110 { width: 110px; max-width: 100%; } .skel-btn { width: 100px; height: 48px; justify-self: end; }

/* Dialogs */
.dialog { border: none; padding: 28px 32px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--bg-raised); color: var(--text-body); border-radius: 0; box-shadow: var(--shadow-pop); position: fixed; top: 120px; margin: 0 auto; z-index: 70; }
.dialog:not([open]) { display: none; }
.dialog-lost { width: min(560px, calc(100vw - 32px)); }
.dialog-add { width: min(680px, calc(100vw - 32px)); top: 120px; }
.dialog::backdrop { background: rgba(0, 0, 0, .64); }
body.has-open-dialog::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .64); z-index: 65; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.dialog-title { font-size: 40px; }
.dialog-sub { margin: 8px 0 0; font-size: 17px; color: var(--text-body); }
.dialog-close { width: 48px; height: 48px; display: grid; place-items: center; color: var(--text-strong); margin: -8px -12px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.dialog .message { margin-bottom: 20px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; border: none; padding: 0; margin: 0; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field-label { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-body); padding: 0; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea { font-family: var(--font-body); font-size: 17px; font-weight: 300; color: var(--text-strong); background: var(--bg-raised); border: 1px solid var(--border-default); border-radius: 0; min-height: 48px; padding: 0 14px; width: 100%; }
textarea { padding: 12px 14px; resize: vertical; min-height: 96px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--status-error); }
.field-problem { font-size: 14px; color: var(--status-error); }
.seg-row { display: flex; }
.seg-option { position: relative; }
.seg-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-option span { display: flex; align-items: center; min-height: 48px; padding: 0 18px; border: 1px solid var(--border-default); font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--text-body); }
.seg-option + .seg-option span { border-left: none; }
.seg-option input:checked + span { background: var(--amp-near-black); color: #fff; border-color: var(--amp-near-black); }
.seg-option input:focus-visible + span { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }

/* Lead page: compact header (breadcrumb, the name as a page title, then stage, owner and waiting on one row) */
.band.lead-head { flex: 0 0 auto; padding: 8px 64px 20px; border-bottom: 1px solid var(--border-subtle); }
.lead-head-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; }
.crumbs { display: flex; gap: 10px; align-items: center; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); min-width: 0; }
.crumbs a { display: flex; align-items: center; min-height: 40px; color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text-strong); }
.crumbs [aria-current] { color: var(--text-strong); }
.lead-title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-top: 2px; }
.lead-company { font-size: 18px; font-weight: 300; color: var(--text-muted); }
.lead-head-note { margin: 8px 0 0; font-size: 15px; color: var(--text-body); }
.lead-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.control-group { position: relative; display: flex; align-items: center; gap: 8px 12px; min-width: 0; }
/* "Stage" and "Owner": hidden visually on desktop, kept for screen readers; shown on phones. */
.control-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stage-control { display: grid; grid-template-columns: repeat(6, auto); border: 1px solid var(--border-default); }
.stage-option { min-height: 46px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: transparent; border: none; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); text-decoration: none; cursor: pointer; }
.stage-option:hover { color: var(--text-strong); background: var(--bg-hover); }
.stage-option.is-current { cursor: default; color: var(--text-strong); background: var(--bg-tile); }
.stage-opt-contacted.is-current, .stage-opt-qualified.is-current, .stage-opt-proposal.is-current { background: transparent; box-shadow: inset 0 0 0 2px var(--amp-near-black); }
.stage-opt-won.is-current { background: var(--bg-selected); color: var(--text-accent); }
.stage-opt-lost.is-current { background: var(--bg-tile); color: var(--text-muted); }
.claim-lead { min-width: 140px; }
.owner-button { min-height: 48px; min-width: 220px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 8px; border: 1px solid var(--border-default); color: var(--text-strong); font-size: 16px; }
.owner-button:hover { border-color: var(--border-strong); }
.owner-button .chev { margin-left: auto; }
.lead-head .menu-pop, .pipeline .menu-pop { background: var(--bg-overlay); color: var(--text-strong); }
.lead-head .menu-item, .pipeline .menu-item { color: var(--text-strong); font-size: 15px; }
.lead-head .menu-item:hover, .pipeline .menu-item:hover { background: var(--bg-hover); color: var(--text-strong); }
.owner-pop { width: 260px; padding: 6px 0; top: calc(100% + 6px); }
.owner-pop .menu-label, .move-pop .menu-label { display: block; padding: 6px 14px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); }
.owner-pop .avatar { width: 28px; height: 28px; }
.owner-pop .check, .move-pop .check { margin-left: auto; color: var(--text-accent); }
.menu-foot { display: block; padding: 8px 14px 6px; border-top: 1px solid var(--border-default); font-size: 14px; color: var(--text-muted); }
.wait-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 12px; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--border-default); color: var(--text-strong); font-size: 15px; white-space: nowrap; }
.wait-chip > .icon { color: var(--text-accent); }
.wait-chip.is-hot { background: var(--bg-selected); box-shadow: inset 0 0 0 1px var(--border-accent); }
.wait-chip .info > summary { width: 32px; height: 32px; }
.closed-line { font-size: 15px; color: var(--text-body); }
.band.lead-body { padding: 12px 64px 96px; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.section-h2 { margin: 0; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 18px; line-height: 48px; color: var(--text-strong); }
.timeline-h2 { margin-bottom: 10px; }
.note-form { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.note-form textarea { min-height: 0; font-size: 16px; line-height: 1.5; }
.note-actions { display: flex; justify-content: flex-end; }
.timeline { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--border-subtle); }
.entry-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-tile); color: var(--text-strong); }
.entry-accent { background: var(--bg-selected); color: var(--text-accent); }
.entry-won { background: var(--accent); color: var(--text-on-accent); }
.entry-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 2px; }
.entry-head { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.entry-head strong { color: var(--text-strong); font-weight: 500; }
.entry-text { margin: 0; font-size: 16px; color: var(--text-strong); white-space: pre-line; overflow-wrap: anywhere; }
.entry-quote { margin: 0; padding: 12px 14px; background: var(--bg-raised); border: 1px solid var(--border-subtle); font-size: 16px; color: var(--text-strong); white-space: pre-line; overflow-wrap: anywhere; }
.entry-sub { margin: 0; font-size: 14px; color: var(--text-muted); }
.entry-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text-link); }
.entry p.muted { margin: 0; font-size: 15px; }
.highlight { margin: 0; padding: 10px 12px; background: var(--bg-selected); box-shadow: inset 0 0 0 1px var(--border-accent); border-radius: var(--radius-sm); color: var(--text-strong); font-size: 15px; }
.sent-by { padding: 10px 12px; font-size: 15px; color: var(--text-strong); }
.sent-by:not(.highlight) { padding-left: 0; }
.sent-by-title { font-weight: 500; }
.sent-by dl { margin: 4px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; }
.sent-by dt { color: var(--text-muted); }
.sent-by dd { margin: 0; overflow-wrap: anywhere; }

.details-summary { display: none; }
.details-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--border-subtle); }
.details-edit-phone { display: none; }
.dl-group { padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.dl-group dl { margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.dl-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.dl-row dt { font-size: 15px; color: var(--text-muted); }
.dl-row dd { margin: 0; font-size: 16px; color: var(--text-strong); overflow-wrap: anywhere; }
.dl-row input, .dl-row select { min-height: 44px; }
.edit-form > .message { margin-top: 16px; }
.edit-actions { display: flex; gap: 12px; padding-top: 24px; }

.band.conversation-body { padding-top: 24px; }
.conversation { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.bubble { padding: 14px 16px; border: 1px solid var(--border-subtle); background: var(--bg-raised); }
.bubble-visitor { margin-left: 48px; background: var(--bg-selected); border-color: transparent; }
.bubble p { margin: 4px 0 0; font-size: 17px; color: var(--text-strong); white-space: pre-line; }
.bubble-who { font-size: 14px; color: var(--text-muted); }

/* Pipeline (desktop only) */
.band.pipeline-body { padding: 16px 64px 96px; }
.pipeline-phone { display: none; margin: 0; font-size: 16px; color: var(--text-strong); }
.pipeline-phone a { color: var(--text-link); font-weight: 500; }
.pipeline-bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 16px; }
.pipeline-note { font-size: 15px; color: var(--text-muted); }
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.column { display: flex; flex-direction: column; gap: 10px; min-height: 620px; padding: 12px; background: var(--bg-sunken); border-radius: var(--radius-sm); min-width: 0; }
.column.is-drop { box-shadow: inset 0 0 0 2px var(--border-accent); }
.column-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; margin: 0; padding: 0 2px; }
.column-head .stage-pill { font-size: 15px; }
.column-count { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1; color: var(--text-strong); }
.column-note { font-size: 14px; color: var(--text-muted); padding: 0 2px; }
.column-all { align-self: flex-start; display: flex; align-items: center; min-height: 40px; padding: 0 2px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-accent); text-decoration: none; }
/* The darker teal: the accent on the light-grey column falls just short of 4.5:1. */
[data-theme="light"] .column-all { color: var(--amp-deep-teal-hover); }
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 10px; background: var(--bg-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); cursor: grab; }
.card.is-dragging { opacity: .4; }
.card.is-hot { background: var(--bg-selected); box-shadow: inset 0 0 0 1px var(--border-accent); }
.card-who { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.card-name { font-weight: 500; font-size: 16px; color: var(--text-strong); text-decoration: none; overflow-wrap: anywhere; }
.card-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-company { font-size: 14px; color: var(--text-muted); }
.card-service { font-size: 15px; color: var(--text-strong); }
.card-since { font-size: 14px; line-height: 1.4; color: var(--text-muted); }
.card-wait { display: none; font-size: 14px; font-weight: 500; color: var(--text-accent); }
.card.is-hot .card-wait { display: block; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; border-top: 1px solid var(--border-subtle); padding-top: 8px; }
.card-unclaimed { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); }
.card-owner { display: inline-flex; }
.card-actions { display: flex; align-items: center; gap: 2px; }
.btn-small { min-height: 40px; min-width: 0; padding: 0 10px; font-size: 14px; }
.move { position: relative; }
.move-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text-muted); }
.move-button:hover, .move[open] .move-button { border-color: var(--border-default); color: var(--text-strong); }
.move-pop { width: 190px; padding: 6px 0; top: calc(100% + 4px); right: 0; }
.move-pop .menu-item { min-height: 44px; padding: 0 14px; justify-content: space-between; }
.move-pop .menu-item.is-current { cursor: default; }

/* Claim pages (from the email) */
.claim-band { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 64px 64px 80px; }
.claim-h1 { font-size: 88px; color: #fff; }
.claim-sub { margin: 0; font-size: 18px; color: var(--amp-mid-grey); }
.claim-sub strong { color: #fff; font-weight: 400; }
.claim-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--amp-navy); color: var(--amp-teal); display: grid; place-items: center; }
.claim-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.fake-band { flex: 1; display: flex; flex-direction: column; gap: 24px; }
.fake-list { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }

/* Inputs added for the client record */
input[type="date"], input[type="search"] { font-family: var(--font-body); font-size: 17px; font-weight: 300; color: var(--text-strong); background: var(--bg-raised); border: 1px solid var(--border-default); border-radius: 0; min-height: 48px; padding: 0 14px; width: 100%; }
.field-hint { font-size: 14px; color: var(--text-muted); }
/* Tick boxes (services; "Add <service> to <client>'s services") */
.ticks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.tick { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: 16px; color: var(--text-strong); cursor: pointer; }
.tick input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.tick-box { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); color: transparent; background: var(--bg-raised); flex-shrink: 0; }
.tick input:checked + .tick-box { background: var(--amp-near-black); border-color: var(--amp-near-black); color: #fff; }
.tick input:focus-visible + .tick-box { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }
/* The client ID: shown, never an input */
.fixed-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px; background: var(--bg-tile); font-family: var(--font-label); font-weight: 700; letter-spacing: .04em; font-size: 17px; color: var(--text-strong); }
.fixed-note { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-weight: 400; letter-spacing: 0; font-size: 14px; color: var(--text-muted); }

/* The Won dialog */
/* Placed higher than other dialogs: the create form is tall, and should fit a 900px-high screen. */
.dialog-won { width: min(640px, calc(100vw - 32px)); top: 64px; padding-top: 24px; padding-bottom: 24px; }
.dialog-won .dialog-head { margin-bottom: 16px; }
.dialog-won .field-grid { gap: 14px 20px; }
.dialog-won .tick { min-height: 36px; }
.won-match { margin: 0 0 16px; display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--bg-selected); color: var(--text-strong); font-size: 16px; line-height: 1.5; }
.won-match .icon { color: var(--text-accent); }
.choices { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border: 1px solid var(--border-default); background: var(--bg-tile); font-size: 16px; color: var(--text-strong); cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg-raised); display: grid; place-items: center; flex-shrink: 0; }
.choice:has(input:checked) { border-color: var(--amp-near-black); }
.choice input:checked + .choice-dot { border-color: var(--text-accent); box-shadow: inset 0 0 0 4px var(--bg-raised); background: var(--text-accent); }
.choice:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }
/* Which part shows follows the checked choice, with or without the script. */
.won-section { display: none; margin-top: 20px; }
.won-form:has(input[data-won-mode][value="create"]:checked) .won-create { display: block; }
.won-form:has(input[data-won-mode][value="link"]:checked) .won-link { display: block; }
.won-form-wrap:has(input[data-won-mode][value="create"]:checked) .won-go-link { display: none; }
.won-form-wrap:has(input[data-won-mode][value="link"]:checked) .won-go-create { display: none; }
/* The service tick: in the suggestion; under the search only for a chosen client that lacks the service. */
.won-choose .won-svc { display: none; }
.won-choose:has(input[name="clientId"][data-lacks-service]:checked) .won-svc { display: inline-flex; margin-top: 12px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border-default); background: var(--bg-raised); color: var(--text-muted); }
.search[hidden] { display: none; }
.search input { border: none; padding: 0; min-height: 46px; background: transparent; }
.search input:focus-visible { outline: none; }
.search:focus-within { outline: var(--focus-width) solid var(--focus-ring); }
.client-picks { border: 1px solid var(--border-subtle); border-top: none; margin: 0; padding: 0; max-height: 296px; overflow: auto; }
.search[hidden] + .client-picks { border-top: 1px solid var(--border-subtle); }
.client-picks > .muted { margin: 0; padding: 14px; }
.client-pick { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-bottom: 1px solid var(--border-subtle); cursor: pointer; }
.client-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.client-pick:hover { background: var(--bg-hover); }
.client-pick:has(input:checked) { background: var(--bg-selected); }
.client-pick:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus-ring); outline-offset: -2px; }
.client-pick-id { min-width: 80px; font-family: var(--font-label); font-weight: 700; letter-spacing: .04em; font-size: 15px; color: var(--text-body); }
.client-pick-name { flex: 1; font-size: 16px; color: var(--text-strong); }
.client-pick-check { color: var(--text-accent); visibility: hidden; }
.client-pick:has(input:checked) .client-pick-check { visibility: visible; }

/* The lead's client link (any stage) */
.client-line { font-size: 15px; }
.client-link { color: var(--text-accent); font-weight: 500; text-decoration: none; }
.client-link:hover { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }

/* Clients list */
.page-count { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 16px; color: var(--text-accent); }
.filter-row { padding: 8px 0 16px; border-bottom: 1px solid var(--border-subtle); }
.client-filter { display: inline-flex; }
.client-filter .view-option { padding: 0 20px; }
.clients-table td { height: 60px; }
.cell-client-id { font-family: var(--font-label); font-weight: 700; letter-spacing: .04em; font-size: 15px; color: var(--text-body); white-space: nowrap; }
.leads-table td.cell-plain { color: var(--text-body); font-size: 15px; }
.client-status { display: inline-block; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; padding: 3px 8px; border-radius: var(--radius-xs); background: var(--bg-tile); color: var(--text-body); }
.client-status-active { background: var(--bg-selected); color: var(--text-accent); }

/* The client page: compact header, the views bar, then the record and linked leads */
.client-head .lead-title-row { align-items: center; }
.client-head .client-status { align-self: center; }
.strong { color: var(--text-strong); }
.band.client-views { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; padding: 0 64px; border-bottom: 1px solid var(--border-subtle); }
.client-tabs { display: flex; gap: 32px; }
.client-tab { display: flex; align-items: center; gap: 8px; min-height: 56px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 16px; color: var(--text-muted); text-decoration: none; }
.client-tab.is-current { color: var(--text-strong); box-shadow: inset 0 -3px 0 var(--accent); }
.no-reports { flex: 1; margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-body); }
.no-reports .icon { color: var(--text-muted); }
.band.client-body { padding: 24px 64px 96px; }
.client-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.record { margin: 0; display: flex; flex-direction: column; }
.record .dl-row { grid-template-columns: 180px minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.record .dl-row dt { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; }
.record-id { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.client-edit { padding-top: 16px; }
.linked-leads { list-style: none; margin: 0; padding: 0; }
.linked-lead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); text-decoration: none; }
.linked-lead:hover .linked-name { text-decoration: underline; text-underline-offset: 3px; }
.linked-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.linked-name { font-weight: 500; font-size: 17px; color: var(--text-strong); }
.linked-sub { font-size: 15px; color: var(--text-body); }
.linked-stage.is-won { color: var(--text-accent); font-weight: 500; }
.no-linked { margin: 16px 0 0; font-size: 16px; }

/* Phone and narrow screens */
/* Clients page menu (only while there are no clients) and the empty state's two actions */
.page-menu { position: relative; }
.page-menu-button .icon { margin-left: 2px; }
.page-menu[open] .page-menu-button .icon { transform: rotate(180deg); }
.page-menu-pop { width: 300px; padding: 6px 0; background: var(--bg-overlay); color: var(--text-strong); }
.page-menu-pop .menu-item { color: var(--text-strong); font-size: 15px; }
.page-menu-pop .menu-item:hover { background: var(--bg-hover); color: var(--text-strong); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* The audit-form import dialog */
.dialog-import { width: min(760px, calc(100vw - 32px)); top: 64px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; }
.dialog-import:not([open]) { display: none; }
.dialog-import .dialog-head { margin-bottom: 16px; }
.import-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.import-step { display: flex; flex-direction: column; gap: 8px; }
.import-step-bar { height: 4px; border-radius: 2px; background: var(--bg-tile); }
.import-step.is-reached .import-step-bar { background: var(--accent); }
.import-step-label { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); }
.import-step.is-current .import-step-label { color: var(--text-strong); }
.import-form { display: flex; flex-direction: column; gap: 20px; }
.import-line { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-strong); }
.import-refusal { font-weight: 400; padding: 14px 16px; background: var(--bg-tile); border-left: 3px solid var(--border-strong); }
.import-drop { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-page); }
.import-drop.has-file, .import-drop.is-over { background: var(--bg-selected); }
.import-drop-icon { color: var(--text-accent); }
.import-drop-title { margin: 0; font-size: 17px; font-weight: 400; color: var(--text-strong); }
.import-drop-hint { margin: 0; font-size: 14px; color: var(--text-muted); max-width: 46ch; }
.import-file input[type="file"] { font-family: var(--font-body); font-size: 15px; color: var(--text-strong); max-width: 100%; }
.import-file input[type="file"]::file-selector-button { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; min-height: 48px; padding: 0 20px; margin-right: 14px; border: 1px solid var(--text-strong); background: transparent; color: var(--text-strong); cursor: pointer; }
.import-file input[type="file"]::file-selector-button:hover { background: var(--text-strong); color: var(--bg-page); }
.import-found { font-size: 32px; }
.import-label { margin: 0; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); }
.import-reading, .import-notes { list-style: none; margin: -8px 0 0; padding: 0; }
.import-reading li { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); align-items: center; gap: 16px; min-height: 48px; border-top: 1px solid var(--border-subtle); font-size: 16px; }
.import-arrow { color: var(--text-muted); }
.import-notes li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border-subtle); font-size: 15px; line-height: 1.5; color: var(--text-strong); }
.import-note-icon { flex-shrink: 0; margin-top: 2px; color: var(--text-accent); }
.import-cards { display: flex; flex-direction: column; gap: 12px; }
.import-card { margin: 0; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.import-card.is-open { border-color: var(--border-strong); }
.import-card-text { padding: 0; font-size: 16px; line-height: 1.5; color: var(--text-strong); float: left; width: 100%; }
.import-card-text + * { clear: both; }
.import-card-left { font-size: 14px; color: var(--text-muted); }
.import-choices { flex-direction: row; flex-wrap: wrap; }
.import-choices .choice { min-height: 48px; }
.import-manager, .import-date { max-width: 320px; }
.import-date { display: none; }
.import-card:has(input[value="date"]:checked) .import-date, .import-date:has([aria-invalid]) { display: flex; }
.import-not { margin: 0; font-size: 15px; color: var(--text-body); }
.import-another { margin: 0; font-size: 15px; }
.import-another a { color: var(--text-strong); }
.import-table-wrap { overflow-x: auto; }
.import-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border-subtle); font-size: 15px; }
.import-table th { background: var(--bg-tile); font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); text-align: left; padding: 10px 14px; }
.import-table td { padding: 0 14px; height: 44px; border-top: 1px solid var(--border-subtle); color: var(--text-body); }
.import-table .import-id { font-family: var(--font-label); font-weight: 700; color: var(--text-accent); white-space: nowrap; }
.import-table .strong { color: var(--text-strong); font-weight: 400; }
.import-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.import-go { display: flex; gap: 12px; margin-left: auto; }

/* Team screen (admins only): the Clients list and Add client patterns */
.team-table td { height: 60px; }
.team-table .cell-email { word-break: break-all; }
.team-table .cell-action { overflow: visible; }
.row.is-suspended td, .row.is-suspended td.cell-plain { color: var(--text-muted); }
.prow.is-suspended .team-name { color: var(--text-muted); }
.staff-status-suspended { background: var(--bg-tile); color: var(--text-body); }
.you-chip { display: inline-block; margin-left: 8px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; padding: 2px 7px; border-radius: var(--radius-xs); background: var(--bg-selected); color: var(--text-accent); vertical-align: 2px; }
.team-prow { align-items: flex-start; }
.team-name { font-size: 17px; color: var(--text-strong); }
.team-email { word-break: break-all; }
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-button { width: 48px; height: 48px; display: grid; place-items: center; color: var(--text-strong); cursor: pointer; border-radius: var(--radius-sm); }
.row-menu-button:hover { background: var(--bg-hover); }
.row-menu-pop { width: 200px; text-align: left; }
.row-menu-pop form { margin: 0; }
.dialog-note { margin: 20px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-body); }
.dialog-body { margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: var(--text-body); }
.dialog-holdings { color: var(--text-strong); }
.fixed-email { flex-wrap: wrap; padding: 10px 14px; font-family: var(--font-body); font-weight: 400; letter-spacing: 0; font-size: 16px; overflow-wrap: anywhere; }
.fixed-email .fixed-note { white-space: nowrap; }
/* A checkbox announced as a switch, drawn like the account menu's switch */
.switch-row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; cursor: pointer; }
.switch-label { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-body); }
.switch-input { position: absolute; right: 0; width: 48px; height: 28px; margin: 0; opacity: 0; cursor: pointer; }
.switch-drawn { display: inline-block; }
.switch-input:checked + .switch-drawn { background: var(--amp-teal); }
.switch-input:checked + .switch-drawn .switch-knob { left: 23px; background: var(--amp-near-black); }
.switch-input:focus-visible + .switch-drawn { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }

@media (max-width: 959px) {
  .header-desktop { display: none; }
  .header-phone { display: flex; }
  .account-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .band { padding: 28px 16px; }
  .toasts { top: auto; bottom: 16px; left: 16px; right: 16px; }
  .toast { width: 100%; }
  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin-hero { padding: 24px 16px 32px; gap: 32px; }
  .signin-h1 { font-size: 44px; }
  .signin-panel { padding: 28px 16px 32px; border-left: none; border-top: 1px solid var(--border-subtle); }
  .signin-spacer { display: none; }
  .signin-h2 { font-size: 32px; }
  .signin-brand svg { height: 22px; width: auto; }
  .overview-h1 { font-size: 44px; }
  .overview-attention { padding: 40px 16px 48px; }
  .attention-head { max-width: none; flex-direction: column; align-items: flex-start; }
  .attention-h2 { font-size: 32px; }
  .band.page-head { padding: 16px 16px 0; }
  .page-title { font-size: 24px; }
  .page-head-row { flex-wrap: nowrap; }
  .page-head .view-switch { display: none; }
  .add-desk { display: none !important; }
  .add-phone { display: inline-flex !important; }
  .band.leads-body { padding: 0 0 48px; }
  .tabs-row { padding: 0 16px; }
  .tabs { width: 100%; gap: 0; justify-content: space-between; }
  .tab { font-size: 15px; }
  .tab-note { display: none; }
  .new-arrival { padding: 12px 16px 0; }
  .leads-table { display: none; }
  .leads-phone { display: block; }
  .empty { padding: 48px 16px; }
  .skel-row { grid-template-columns: 1fr 100px; padding: 18px 16px; }
  .skel-row .skeleton:nth-child(n+2):not(.skel-btn) { display: none; }
  .dialog { padding: 20px 16px; top: 88px; }
  .dialog-title { font-size: 30px; }
  .import-steps { gap: 4px; }
  .import-step-label { font-size: 12px; }
  .import-found { font-size: 24px; }
  .import-reading li { grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); gap: 8px; font-size: 15px; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .band.lead-head { padding: 8px 16px 16px; }
  .lead-company { font-size: 16px; }
  .lead-row { gap: 12px; }
  .control-group { flex: 1 1 100%; flex-direction: column; align-items: stretch; }
  .control-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
  .stage-control { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage-option { padding: 0 10px; }
  .claim-lead, .owner-button { width: 100%; }
  .owner-pop { left: 0; right: 0; width: auto; }
  .band.lead-body { padding: 16px 16px 48px; }
  .attention-list { max-width: none; }
  .attention-item { grid-template-columns: 10px minmax(0, 1fr); padding: 16px 12px; align-items: start; }
  .attention-dot { margin-top: 7px; }
  .attention-main { font-size: 16px; }
  .attention-sub { display: none; }
  .attention-claim { grid-column: 2; }
  .band.pipeline-body { padding: 24px 16px 48px; }
  .pipeline { display: none; }
  .pipeline-phone { display: block; }
  .lead-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .timeline-h2 { display: none; }
  .details-summary { display: flex; justify-content: space-between; align-items: center; min-height: 56px; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
  .details-summary .label { color: var(--text-strong); font-size: 18px; }
  .details-fold[open] .details-summary .chev { transform: rotate(180deg); }
  .details-head { display: none; }
  .details-edit-phone { display: block; padding-top: 16px; }
  .dl-row { grid-template-columns: 96px minmax(0, 1fr); }
  .claim-band { padding: 28px 16px 40px; }
  .claim-h1 { font-size: 44px; }
  .claim-actions .btn { width: 100%; }
  .clients-body .filter-row { padding: 12px 16px; }
  .client-filter { width: 100%; }
  .client-filter .view-option { flex: 1; justify-content: center; padding: 0 8px; }
  .band.client-views { padding: 0 16px 12px; }
  .staff-only { display: none; }
  .band.client-body { padding: 16px 16px 48px; }
  .client-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .record .dl-row { grid-template-columns: 112px minmax(0, 1fr); }
  .client-head .details-head { display: flex; }
  .client-body .details-head { display: flex; }
  .choice { min-height: 48px; }
}

/* ---------------------------------------------------------------------------
   Reporting: the Paid performance view (design/PaidViewDesktop, PaidViewPhone,
   in the ClientDashboard frame). Teal and neutrals only; no error red, no
   warning colours. Sizes of bars and charts are SVG attributes (no inline
   styles), colours are these classes. */
/* The chart tokens the views use, from the design system's data.css (which the
   portal doesn't load: it also holds the coral and saffron platform colours). */
:root {
  --chart-grid: #262626; --chart-label: var(--amp-grey-500); --chart-line: var(--amp-teal); --chart-area: rgba(28, 200, 208, .16); --chart-compare: #6B6B6B;
  --cat-1: #1CC8D0;
  --funnel-1: #8FE3E7; --funnel-2: #1CC8D0; --funnel-3: #14A1A8; --funnel-4: #0E7C80; --funnel-5: #0E5E63;
  --change-up: #1CC8D0; --change-down: #C4C4C4; --change-down-bg: #262626; --change-flat-bg: #262626;
}
[data-theme="light"] {
  --chart-grid: #ECECEC; --chart-label: #6B6B6B; --chart-line: var(--amp-deep-teal); --chart-area: rgba(28, 200, 208, .18); --chart-compare: #A6A6A6;
  --cat-1: #0E7C80;
  --change-up: #0E7C80; --change-up-bg: #E6F7F9; --change-down: #4A4A4A; --change-down-bg: #F0F0F0; --change-flat-bg: #F0F0F0;
}
.on-phone, .on-phone-block { display: none; }
.on-desk-block { display: block; }
.on-desk-grid { display: grid; }
.report { display: flex; flex-direction: column; color: var(--text-body); background: var(--bg-page); }
.report-bar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 64px; background: var(--bg-page); border-bottom: 1px solid var(--border-subtle); position: relative; z-index: 8; }
.report-bar .crumbs { font-size: 15px; color: var(--amp-grey-500); }
.report-bar .crumbs a { color: var(--amp-grey-500); }
.report-bar .crumbs [aria-current] { color: #fff; }
.period { display: inline-flex; align-items: center; gap: 8px; }
.period-step { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-strong); }
.period-step:hover { background: var(--bg-hover); }
.period-step.is-off { color: var(--text-disabled); }
.period-menu { position: relative; }
.period-button { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--text-strong); cursor: pointer; list-style: none; }
.period-button::-webkit-details-marker { display: none; }
.period-button:hover { background: var(--bg-hover); }
.period-menu[open] .period-button { background: var(--bg-selected); border-color: var(--border-accent); }
.period-icon { color: var(--text-accent); }
.period-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.period-compare { font-family: var(--font-body); font-weight: 300; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text-muted); }
.period-pop { right: 0; left: auto; width: 240px; padding: 6px 0; }
.period-pop-head { display: block; padding: 8px 16px 4px; font-size: 14px; color: var(--text-muted); }
.period-pop .menu-item.is-current { color: var(--text-accent); }
.report-tabs { background: #000; border-bottom: 1px solid var(--border-subtle); padding: 0 64px; }
.report-tabs .client-tabs { gap: 40px; }
.report-tabs .client-tab { min-height: 80px; font-size: 22px; color: var(--amp-grey-500); gap: 10px; }
.report-tabs .client-tab:hover { color: #fff; }
.report-tabs .client-tab.is-current { color: #fff; box-shadow: inset 0 -4px 0 var(--amp-teal); }
.report-tabs .client-tab.is-current .icon { color: var(--amp-teal); }
.report-failed .icon { color: var(--text-muted); }

.report .band { padding: 96px 64px 104px; }
.report .band.report-top { padding: 64px 64px 80px; }
.report .band-light { flex: 0 0 auto; }
.report-eyebrow-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.report-eyebrow-side { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.report .eyebrow { color: var(--amp-grey-500); }
.report [data-theme="light"] .eyebrow { color: var(--text-muted); }
.sample-chip { font-family: var(--font-label); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--amp-grey-500); border: 1px solid var(--border-default); border-radius: 3px; padding: 3px 8px; white-space: nowrap; }
.report [data-theme="light"] .sample-chip { color: var(--text-muted); }
.may-change { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--amp-mid-grey); box-shadow: inset 0 0 0 1px var(--border-strong); border-radius: 3px; padding: 3px 8px; white-space: nowrap; vertical-align: middle; }
.report [data-theme="light"] .may-change { color: var(--text-muted); }
.arriving { margin-top: 32px; max-width: 940px; }
.market-row { margin-top: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.market-filter { display: flex; border: 1px solid var(--border-default); }
.market-option { min-height: 48px; display: flex; align-items: center; padding: 0 22px; white-space: nowrap; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--amp-grey-500); text-decoration: none; }
.market-option:hover { color: #fff; background: var(--bg-hover); }
.market-option.is-current { background: var(--amp-teal); color: var(--amp-near-black); }
.market-note { font-size: 15px; color: var(--amp-grey-500); }
.report-h2 { margin: 40px 0 20px; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle); border-top: 1px solid var(--border-subtle); }
.stat { position: relative; background: #000; padding: 32px 32px 28px 32px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stat-first { padding-left: 0; }
.stat-head { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.stat-label { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--amp-grey-500); }
.stat-info > summary { width: 28px; height: 28px; color: var(--amp-grey-500); }
.stat-info .info-pop { width: 300px; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; }
.stat:nth-child(n+3) .stat-info .info-pop { left: auto; right: -12px; }
.info-text { font-size: 16px; line-height: 1.5; color: #fff; }
.stat-value { font-family: var(--font-display); font-size: 66px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-value.is-accent { color: var(--amp-teal); }
.stat-unit { font-size: .45em; margin-right: 8px; }
.stat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-changes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sparkline { flex-shrink: 0; overflow: visible; }
.change { display: inline-flex; align-items: center; gap: 8px; }
.change-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 4px; border-radius: var(--radius-sm); font-family: var(--font-label); font-weight: 700; letter-spacing: .04em; font-size: 14px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.change-up { background: var(--change-up-bg); color: var(--change-up); }
.change-down { background: var(--change-down-bg); color: var(--change-down); }
.change-flat { background: var(--change-flat-bg); color: var(--text-muted); }
.change-neutral { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-label); font-weight: 700; letter-spacing: .04em; font-size: 15px; color: var(--amp-mid-grey); }
.change-label { font-weight: 300; font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.first-chip { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--amp-mid-grey); border: 1px solid var(--border-strong); border-radius: 3px; padding: 4px 8px; }

.report-section { background: var(--bg-page); }
.report-head { display: flex; flex-direction: column; gap: 8px; }
.report-title { margin: 0; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 64px; line-height: 1.04; letter-spacing: .01em; color: var(--text-strong); max-width: 1100px; }
.report-note { margin: 0; font-size: 15px; color: var(--amp-grey-500); }
.report [data-theme="light"] .report-note { color: var(--text-muted); }

.funnel-desk { margin-top: 56px; display: grid; grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr)); }
.funnel-desk[data-steps="5"] { grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr) 128px minmax(0, 1fr) 128px minmax(0, 1fr) 128px minmax(0, 1fr); }
.funnel-desk[data-steps="4"] { grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr) 128px minmax(0, 1fr) 128px minmax(0, 1fr); }
.funnel-desk[data-steps="3"] { grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr) 128px minmax(0, 1fr); }
.funnel-desk[data-steps="2"] { grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr); }
.funnel-step, .funnel-link { display: flex; flex-direction: column; min-width: 0; }
.funnel-head { height: 132px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.funnel-label { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--amp-mid-grey); white-space: nowrap; }
.funnel-num { font-family: var(--font-display); font-size: 50px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.funnel-num.is-accent { color: var(--amp-teal); }
.funnel-bar { display: block; }
.funnel-1 { fill: var(--funnel-1); } .funnel-2 { fill: var(--funnel-2); } .funnel-3 { fill: var(--funnel-3); } .funnel-4 { fill: var(--funnel-4); } .funnel-5 { fill: var(--funnel-5); }
.funnel-wedge-box { position: relative; height: 320px; }
.funnel-wedge { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fill-grid { fill: var(--chart-grid); }
.funnel-rate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; text-align: center; }
.funnel-rate-num { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--amp-teal); font-variant-numeric: tabular-nums; }
.funnel-rate-text { font-size: 14px; line-height: 1.35; color: #fff; }
.report-funnel .report-head { flex-direction: column; }

.six-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; }
.panel { display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--border-default); padding-top: 20px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 28px; flex-wrap: wrap; }
.panel-head-stack { flex-direction: column; align-items: flex-start; gap: 4px; }
.panel-title { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 16px; color: var(--text-strong); }
.panel-sub { font-size: 15px; color: var(--amp-grey-500); }
.panel-text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--amp-mid-grey); }
.line-chart { position: relative; height: 300px; }
.line-chart-plot, .line-chart-labels { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.chart-area { fill: var(--chart-area); }
.chart-line { stroke: var(--chart-line); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.sparkline .chart-line { stroke-width: 2; }
.chart-dot { fill: var(--chart-line); }
.chart-dot-latest { fill: var(--amp-teal); stroke: var(--amp-navy); stroke-width: 3; }
.chart-tick, .chart-month { font-family: var(--font-label); font-weight: 700; letter-spacing: .04em; font-size: 14px; fill: var(--chart-label); text-transform: uppercase; }
.chart-latest { font-family: var(--font-display); font-size: 32px; fill: #fff; paint-order: stroke; stroke: var(--amp-navy); stroke-width: 6px; stroke-linejoin: round; }
.six-single { height: 300px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; }
.six-single-dot { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.six-single-dot .dot { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--amp-teal); }
.six-single-month { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--amp-grey-500); }
.six-single-text { display: flex; flex-direction: column; gap: 12px; }
.six-single-num { font-family: var(--font-display); font-size: 72px; line-height: 1; color: #fff; }
.six-single-text p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--amp-mid-grey); max-width: 360px; }

.markets-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px; }
.market-panel { gap: 24px; }
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
.bar-chart.bars-wide .bar-row { grid-template-columns: 120px minmax(0, 1fr); }
.bar-label { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--amp-mid-grey); }
.bar-label.is-strong { color: #fff; text-decoration: underline; text-decoration-color: var(--amp-teal); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.bar-svg { display: block; overflow: visible; }
.bar-text { font-family: var(--font-label); font-weight: 700; letter-spacing: .04em; font-size: 15px; fill: #fff; }
.bar-text.is-accent { fill: var(--amp-teal); }
.fill-accent { fill: var(--amp-teal); }
.fill-compare { fill: var(--chart-compare); }
.fill-muted { fill: var(--amp-grey-500); }
.fill-cat-1 { fill: var(--cat-1); }
/* Light grey for the parents bar: the design's bone fails the portal's colour guard. */
.fill-light { fill: var(--amp-mid-grey); }

.platform-table { margin-top: 48px; }
.platform-row { display: grid; grid-template-columns: 240px minmax(0, 1fr) 120px 340px; gap: 32px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--border-default); }
.platform-heads { padding: 0 0 12px; border-bottom: 1px solid var(--border-strong); font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--text-muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.platform-name { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-weight: 500; font-size: 18px; color: var(--text-strong); }
.platform-bars { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.platform-bar { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 12px; }
.platform-bar-text { font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.platform-bar-text strong, .platform-count strong { font-weight: 500; color: var(--text-strong); }
.platform-count { font-size: 18px; }
.hbar { display: block; }

.table-scroll { margin-top: 40px; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 16px 16px 16px 0; text-align: left; border-bottom: 1px solid var(--border-subtle); font-size: 16px; color: var(--text-body); font-weight: 300; }
.data-table tbody th { font-weight: 500; color: var(--text-strong); }
.data-table thead th { padding-bottom: 12px; border-bottom: 1px solid var(--border-strong); font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; }
.data-table .num { text-align: right; }
.data-table th:last-child, .data-table td:last-child { padding-right: 0; }
.data-table .sort { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; color: var(--text-muted); text-decoration: none; }
.data-table .sort:hover, .data-table .sort.is-on { color: var(--text-strong); }
.data-table .may-change { margin-left: 8px; }

.who-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.who-col { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.who-col .table-scroll { margin-top: 0; }
.split-bar { display: block; }
.seg { stroke: var(--seg-gap, var(--bg-page)); stroke-width: 2px; }
.report-who { --seg-gap: var(--amp-navy); }
.seg-text { font-size: 15px; }
.seg-strong { font-weight: 500; }
.seg-text-dark { fill: var(--amp-near-black); }
.seg-text-light { fill: #fff; }
.split-legend { display: flex; gap: 28px; font-size: 15px; color: var(--amp-mid-grey); font-variant-numeric: tabular-nums; }
.split-legend strong { font-weight: 500; color: #fff; }
.split-legend-small { margin-top: 8px; }
.audience-row .split-legend-small { grid-column: 2; margin-top: 0; }
.across-grid { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.audience-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; }
.audience-market { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: #fff; }

@media (max-width: 959px) {
  .on-desk, .on-desk-block, .on-desk-grid { display: none; }
  .on-phone { display: inline; }
  .on-phone-block { display: block; }
  .report-bar { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 16px 12px; }
  .period { width: 100%; }
  .period-menu { flex: 1; min-width: 0; }
  .period-button { width: 100%; }
  .period-pop { left: 0; right: 0; width: auto; }
  .report-tabs { padding: 0; }
  .report-tabs .client-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .report-tabs .client-tab { min-height: 60px; font-size: 17px; justify-content: center; box-shadow: inset 0 -1px 0 var(--border-default); }
  .report .band { padding: 56px 16px 64px; }
  .report .band.report-top { padding: 36px 16px 48px; }
  .report-eyebrow-row { align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
  .report-eyebrow-side { flex-wrap: wrap; flex-shrink: 1; gap: 8px; }
  .report .eyebrow { line-height: 1.5; }
  .market-row { margin: 36px -16px 0; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .market-filter { border: none; gap: 8px; }
  .market-option { border: 1px solid var(--border-default); padding: 0 18px; }
  .report-h2 { margin: 32px 0 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 20px 12px 20px 14px; gap: 10px; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat-value { font-size: 40px; }
  .stat-foot { flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
  .stat-info { position: static; }
  .stat-info .info-pop, .stat:nth-child(n+3) .stat-info .info-pop { left: 0; right: 0; top: auto; width: auto; margin-top: 8px; }
  .stat { position: static; }
  .stats { position: relative; }
  .report-title { font-size: 40px; margin-top: 4px; }
  .funnel-phone { margin-top: 28px; }
  .funnel-phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 10px; }
  .funnel-plabel { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
  .funnel-phone .funnel-num { font-size: 36px; }
  .funnel-pwedge { position: relative; height: 76px; margin-bottom: 12px; }
  .funnel-pwedge .funnel-rate { flex-direction: row; gap: 10px; }
  .funnel-pwedge .funnel-rate-num { font-size: 26px; }
  .funnel-pwedge .funnel-rate-text { font-size: 15px; }
  .report-funnel > .report-note { margin-top: 20px; font-size: 14px; }
  .six-grid { margin-top: 28px; grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .line-chart { height: 220px; }
  .chart-latest { font-size: 24px; }
  .six-single { height: auto; gap: 24px; padding: 12px 0; }
  .six-single-num { font-size: 48px; }
  .markets-grid { margin-top: 28px; grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .market-panel .panel-head-stack { flex-direction: row; justify-content: space-between; align-items: baseline; }
  .bar-row { grid-template-columns: 56px minmax(0, 1fr); }
  .bar-chart.bars-wide .bar-row { grid-template-columns: 100px minmax(0, 1fr); }
  .platform-table { margin-top: 28px; }
  .platform-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name count" "bars bars" "diff diff"; gap: 12px; padding: 18px 0; border-bottom: none; border-top: 1px solid var(--border-default); }
  .platform-name { grid-area: name; font-size: 17px; }
  .platform-count { grid-area: count; font-size: 15px; }
  .platform-bars { grid-area: bars; gap: 6px; }
  .platform-bar { grid-template-columns: minmax(0, 1fr) 140px; }
  .platform-bar-text { font-size: 14px; }
  .platform-diff { grid-area: diff; }
  .table-scroll { margin: 20px -16px 0; padding: 0 16px; }
  .campaigns-table { min-width: 720px; }
  .terms-table { min-width: 480px; }
  .who-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .who-col { gap: 28px; }
  .split-legend { gap: 20px; }
  .split-legend-small { margin-top: 8px; }
.audience-row .split-legend-small { grid-column: 2; margin-top: 0; }
.across-grid { margin-top: 24px; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .audience-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
