/* Property Scout Portal. Tokens, type and controls follow the Sales Portal design system
   (../21PG-Sales-Portal/design.md); keep values in step with it rather than inventing new ones. */
:root {
  color-scheme: light;
  --night: #030d1d;
  --deep-navy: #031b39;
  --field-navy: #0b2d63;
  --brand-navy: #0b2d63;
  --core-navy: #1b2f5e;
  --step-border: #0b4a8f;
  --logo-blue: #7dacd5;
  --muted: #9fb2ce;
  --ice: #f0f4fa;
  --mist: #d6e0ee;
  --slate: #4c4f5b;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --canvas: #ecf1f7;
  --near-black: #1f2430;
  --line-strong: rgba(125, 172, 213, .62);
  --brand-fill: #0b2d63;
  --on-brand: #ffffff;
  --success: #28745a;
  --warning: #9a5b08;
  --danger: #a53a2c;
  --success-soft: #e9f6ef;
  --success-ink: #145d3d;
  --warning-soft: #fff4dc;
  --warning-ink: #714500;
  --danger-soft: #fff0ed;
  --danger-ink: #8b2f20;
  --backdrop: rgba(7, 24, 57, .68);
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 16px 38px rgba(3, 13, 29, .18);
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1rem, 3vw, 2.5rem);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-soft: #030d1d;
  --canvas: #030d1d;
  --surface: #0a1f3c;
  --ice: #112b50;
  --mist: #25436f;
  --line-strong: #4a77ab;
  --near-black: #e6edf7;
  --slate: #9fb2ce;
  --field-navy: #dce6f5;
  --success: #5cc49a;
  --warning: #e3a94b;
  --danger: #f08a7a;
  --brand-fill: #7dacd5;
  --on-brand: #0b2d63;
  --success-soft: #0f2e22;
  --success-ink: #8fdcb8;
  --warning-soft: #33260a;
  --warning-ink: #f2c879;
  --danger-soft: #3a1714;
  --danger-ink: #ffb4a8;
  --backdrop: rgba(0, 0, 0, .72);
  --shadow: 0 16px 38px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--near-black); background: var(--canvas); font: 400 1rem/1.5 var(--font-body); font-synthesis: none; }
::selection { color: var(--on-brand); background: var(--brand-fill); }
a { color: var(--field-navy); text-underline-offset: .18em; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--field-navy); font-family: var(--font-display); font-weight: 800; letter-spacing: .01em; text-transform: uppercase; line-height: 1; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, .lane, .month-tab { transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
:focus-visible { outline: 2px solid var(--field-navy); outline-offset: 2px; }
.theme-switching, .theme-switching * { transition: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile-label { font-family: var(--font-display); font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.count { font-family: var(--font-display); font-style: italic; font-weight: 800; font-variant-numeric: tabular-nums; line-height: .9; }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }

/* Buttons (design.md → Buttons). */
.primary-action, .secondary-action, .quiet-action { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: var(--radius); text-decoration: none; cursor: pointer; white-space: nowrap; }
.primary-action, .secondary-action { min-height: 44px; padding: .7rem 1rem; font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.primary-action { border: 1px solid var(--brand-fill); color: var(--on-brand); background: var(--brand-fill); }
.primary-action:hover { background: color-mix(in srgb, var(--brand-fill), black 18%); }
.secondary-action { border: 1px solid var(--field-navy); color: var(--field-navy); background: var(--surface); }
.secondary-action:hover { background: var(--ice); }
.quiet-action { min-height: 38px; padding: .45rem .7rem; border: 1px solid var(--mist); color: var(--field-navy); background: var(--surface); font-size: .82rem; font-weight: 700; }
.quiet-action:hover { border-color: var(--field-navy); background: var(--ice); }
.quiet-action.danger { color: var(--danger-ink); border-color: color-mix(in srgb, var(--danger), transparent 60%); }
.quiet-action.danger:hover { background: var(--danger-soft); }
button:disabled, .primary-action[aria-disabled="true"] { cursor: not-allowed; border-color: var(--mist); color: var(--slate); background: var(--ice); }
button:not(:disabled):active, a.primary-action:active { transform: translateY(1px); }

/* Fields. */
input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea { width: 100%; min-height: 44px; padding: .6rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--near-black); background: var(--surface); font-size: 1rem; }
textarea { min-height: 76px; resize: vertical; line-height: 1.45; field-sizing: content; }
select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237dacd5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 18px; }
input::placeholder, textarea::placeholder { color: var(--slate); opacity: .8; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--brand-fill); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field { display: grid; gap: .4rem; }
.field > label, .field > .label { color: var(--field-navy); font-weight: 700; font-size: .92rem; }
.field .hint { color: var(--slate); font-size: .84rem; }

/* Notices. */
.notice { padding: .75rem 1rem; border-radius: var(--radius); font-size: .92rem; }
.notice.error { color: var(--danger-ink); background: var(--danger-soft); }
.notice.success { color: var(--success-ink); background: var(--success-soft); }
.notice.warning { color: var(--warning-ink); background: var(--warning-soft); }
.env-banner { padding: .4rem var(--gutter); color: var(--warning-ink); background: var(--warning-soft); font-size: .82rem; font-weight: 700; text-align: center; }

/* Top bar (Sales Portal .topbar). */
.topbar { position: sticky; top: 0; z-index: 50; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 var(--gutter); border-bottom: 4px solid var(--logo-blue); background: var(--surface); }
.brand { min-width: 0; display: flex; align-items: center; gap: .75rem; color: var(--field-navy); text-decoration: none; }
.brand img { width: 42px; height: 42px; flex: none; border-radius: var(--radius); object-fit: cover; }
.brand em { padding-left: 1rem; border-left: 1px solid var(--mist); font-family: var(--font-display); font-size: 1rem; font-style: normal; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: .25rem; margin-right: auto; margin-left: 1.5rem; }
.main-nav a { white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .8rem; border-radius: var(--radius); color: var(--field-navy); font-family: var(--font-display); font-size: .98rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.main-nav a:hover { background: var(--ice); }
.main-nav a[aria-current="page"] { color: var(--on-brand); background: var(--brand-fill); }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.theme-switch { min-height: 40px; display: inline-flex; align-items: center; padding: 0 .3rem; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.theme-switch-track { display: inline-grid; grid-template-columns: 28px 28px; gap: 2px; padding: 2px; border-radius: 5px; background: var(--ice); }
.theme-switch-track > span { display: grid; place-items: center; height: 26px; border-radius: 4px; color: var(--slate); }
.theme-switch-track > span.on { color: var(--on-brand); background: var(--brand-fill); }
.theme-switch .icon { width: 15px; height: 15px; }
.viewer { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .3rem .4rem .3rem .35rem; border: 1px solid var(--mist); border-radius: var(--radius); }
.viewer-avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--brand-navy); background: var(--logo-blue); font-family: var(--font-display); font-size: .95rem; font-weight: 800; letter-spacing: .04em; }
.viewer-name { display: grid; min-width: 0; line-height: 1.2; }
.viewer-name strong { color: var(--field-navy); font-family: var(--font-display); font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.viewer-name span { color: var(--slate); font-size: .75rem; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius); color: var(--field-navy); background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--ice); }

/* Help button and guides (Sales Portal .help-button). */
.help-button { min-height: 40px; display: inline-flex; align-items: center; gap: .42rem; padding: 0 .72rem; border: 1px solid var(--mist); border-radius: var(--radius); color: var(--field-navy); background: var(--surface); font-family: var(--font-display); font-size: .95rem; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.help-button:hover { border-color: var(--logo-blue); background: var(--ice); }
.help-button[aria-current="page"] { color: var(--on-brand); border-color: var(--brand-fill); background: var(--brand-fill); }
.guide-list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.guide-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; align-items: center; padding: .75rem; border: 1px solid var(--mist); border-radius: var(--radius); color: inherit; background: var(--surface); text-decoration: none; }
.guide-card:hover { border-color: var(--line-strong); }
.guide-poster { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--ice); }
.guide-poster img { width: 100%; height: 100%; object-fit: cover; }
.guide-play { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--brand-navy); background: var(--logo-blue); }
.guide-play .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.guide-text { display: grid; gap: .3rem; min-width: 0; }
.guide-text strong { color: var(--field-navy); font-size: 1.05rem; }
.guide-meta { display: flex; align-items: center; gap: .6rem; color: var(--slate); font-size: .86rem; font-variant-numeric: tabular-nums; }
.guide-summary { color: var(--slate); font-size: .92rem; line-height: 1.45; }
.guide-player { overflow: hidden; border-radius: var(--radius); background: var(--night); }
.guide-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--night); }
.guide-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .4rem; line-height: 1.5; }

/* Page frame. */
.page { width: min(1240px, 100%); margin: 0 auto; padding: 1.75rem var(--gutter) 6rem; }
.page.narrow { width: min(820px, 100%); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 2.5rem; }
.page-head .sub { margin-top: .45rem; color: var(--slate); font-size: .95rem; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pickers { display: flex; flex-wrap: wrap; gap: .5rem; }
.pickers select { width: auto; min-height: 38px; padding-top: .35rem; padding-bottom: .35rem; font-family: var(--font-display); font-size: .95rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--field-navy); }
.back-link { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .9rem; color: var(--field-navy); font-family: var(--font-display); font-size: .9rem; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.back-link:hover { text-decoration: underline; }
.card { border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }

/* Month tabs. */
.month-tabs { display: flex; gap: .35rem; margin: 0 0 1rem; padding: 0 0 .25rem; overflow-x: auto; scrollbar-width: none; }
.month-tabs::-webkit-scrollbar { display: none; }
.month-tab { min-width: 64px; min-height: 44px; display: grid; place-items: center; align-content: center; gap: .1rem; padding: .35rem .7rem; border: 1px solid var(--mist); border-radius: var(--radius); color: var(--field-navy); background: var(--surface); text-decoration: none; font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.month-tab small { color: var(--slate); font-family: var(--font-body); font-size: .75rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.month-tab:hover { border-color: var(--logo-blue); }
.month-tab[aria-current="page"] { border-color: var(--brand-fill); color: var(--on-brand); background: var(--brand-fill); }
.month-tab[aria-current="page"] small { color: inherit; opacity: .85; }

/* Status lanes: the month as a pipeline. */
.lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.25rem; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.lane { position: relative; display: grid; gap: .35rem; padding: .9rem 1rem 1rem; color: var(--field-navy); text-decoration: none; }
.lane + .lane { border-left: 1px solid var(--mist); }
.lane + .lane::before { content: ""; position: absolute; top: 50%; left: -7px; width: 12px; height: 12px; border-top: 1px solid var(--mist); border-right: 1px solid var(--mist); background: inherit; transform: translateY(-50%) rotate(45deg); }
.lane .tile-label { color: var(--slate); }
.lane .count { font-size: 2.6rem; }
.lane:hover { background: var(--ice); }
.lane[aria-current="page"] { color: var(--on-brand); background: var(--brand-fill); }
.lane[aria-current="page"] .tile-label { color: inherit; opacity: .9; }
.lane[aria-current="page"] + .lane::before { border-color: var(--brand-fill); background: var(--brand-fill); }

/* Walk list. */
.walk-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.walk { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: .9rem 1.1rem; padding: .75rem; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); }
.walk:hover { border-color: var(--line-strong); }
.walk.saved { box-shadow: 0 0 0 2px var(--logo-blue); }
.thumb { width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); color: var(--logo-blue); background: var(--ice); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .icon { width: 26px; height: 26px; stroke-width: 1.6; }
.walk-main { min-width: 0; display: grid; gap: .3rem; }
.walk-address { color: var(--field-navy); font-size: 1.05rem; font-weight: 700; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.walk-address:hover { text-decoration: underline; }
.walk-address::after { content: ""; }
.walk-meta { display: flex; flex-wrap: wrap; gap: .2rem .9rem; color: var(--slate); font-size: .86rem; }
.walk-meta .repeat { color: var(--warning-ink); font-weight: 700; }
.scope-count { color: var(--field-navy); font-family: var(--font-display); font-size: 1rem; font-style: italic; font-weight: 800; font-variant-numeric: tabular-nums; }
.walk-head { display: none; }
.walk-side { display: grid; justify-items: end; gap: .55rem; }
.steps { display: grid; grid-template-columns: repeat(4, 54px); gap: 3px; }
.steps > span { display: grid; gap: 4px; color: var(--slate); font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.steps > span::before { content: ""; height: 6px; border-radius: 3px; background: var(--ice); box-shadow: inset 0 0 0 1px var(--line-strong); }
.steps > span.done { color: var(--field-navy); }
.steps > span.done::before { background: var(--logo-blue); box-shadow: none; }
.steps > span.no::before { background: repeating-linear-gradient(-45deg, var(--mist) 0 3px, transparent 3px 6px); }
.steps.large { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 4px; }
.steps.large > span { font-size: .82rem; }
.panel .inline-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: stretch; gap: .8rem; }
.panel .inline-status label { width: auto; }
.panel .inline-status select, .panel .inline-status input { width: 100%; min-height: 44px; }
.panel form.inline-status + form.inline-status { margin-top: -.2rem; }
.steps.large > span::before { height: 10px; border-radius: 5px; }
.walk-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: .4rem; }
.inline-status { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: .4rem; }
.inline-status label { display: grid; gap: .15rem; color: var(--slate); font-family: var(--font-display); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.inline-status select, .inline-status input { width: auto; min-width: 96px; min-height: 36px; padding: .3rem 2rem .3rem .55rem; font-family: var(--font-body); font-size: .88rem; letter-spacing: 0; text-transform: none; background-position: right .4rem center; }
.inline-status input[type="date"] { padding-right: .4rem; }
.auto-save { position: relative; }
.save-state { color: var(--success); font-size: .8rem; font-weight: 700; }
.auto-save .save-state { position: absolute; right: 0; bottom: -1.15rem; white-space: nowrap; }
.save-state.error { color: var(--danger); }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 .5rem; border: 1px solid var(--mist); border-radius: 3px; color: var(--field-navy); font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.chip.filled { border-color: var(--brand-fill); color: var(--on-brand); background: var(--brand-fill); }
.chip.pending { color: var(--slate); border-style: dashed; }
.empty { display: grid; justify-items: start; gap: .9rem; padding: 2rem 1.5rem; border: 1px dashed var(--mist); border-radius: var(--radius); background: var(--surface); }
.empty p { color: var(--slate); }
.mobile-cta { display: none; }

/* Walk detail. */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
.panel { display: grid; gap: 1rem; padding: 1.25rem; }
.panel h2 { font-size: 1.35rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.status-grid .value { color: var(--field-navy); font-weight: 700; }
.answers { display: grid; gap: 0; margin: 0; }
.answers > div { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: .3rem 1.25rem; padding: .7rem 0; border-top: 1px solid var(--mist); }
.answers dt { color: var(--slate); font-size: .9rem; }
.answers dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.answers dd.missing { color: var(--slate); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .5rem; }
.photo-grid .photo, .photo-grid .pending-photo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--ice); }
.photo-grid .photo a { display: block; width: 100%; height: 100%; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .remove-photo { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(3, 13, 29, .72); cursor: pointer; }
.photo-grid .pending-photo span { position: absolute; inset: auto 0 0; padding: .2rem .4rem; color: #fff; background: rgba(3, 13, 29, .72); font-size: .75rem; }
.links { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.links a { display: inline-flex; align-items: center; gap: .4rem; overflow-wrap: anywhere; }
.history { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; font-size: .88rem; }
.history li { display: grid; gap: .1rem; }
.history time { color: var(--slate); font-size: .8rem; }

/* Walk form. */
.form { display: grid; gap: 1.25rem; }
.form-section { display: grid; gap: 1rem; padding: 1.25rem; }
.form-section h2 { font-size: 1.35rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.choice-row label { position: relative; }
.choice-row input { position: absolute; opacity: 0; inset: 0; }
.choice-row span { min-width: 96px; min-height: 44px; display: inline-grid; place-items: center; padding: 0 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--field-navy); background: var(--surface); font-weight: 700; cursor: pointer; }
.choice-row input:checked + span { border-color: var(--brand-fill); color: var(--on-brand); background: var(--brand-fill); }
.choice-row input:focus-visible + span { outline: 2px solid var(--field-navy); outline-offset: 2px; }
.uploader { display: grid; gap: .8rem; }
.uploader input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-button { justify-self: start; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.progress { color: var(--field-navy); font-weight: 700; }

/* Guide. */
.prose { display: grid; gap: .9rem; max-width: 70ch; }
.prose h2 { margin-top: .8rem; font-size: 1.5rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .35rem; }
.prose p, .prose li { line-height: 1.6; }

/* Admin tables. */
.table { width: 100%; border-collapse: collapse; }
.table th { padding: .7rem .9rem; color: var(--field-navy); background: var(--ice); font-family: var(--font-display); font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-align: left; text-transform: uppercase; }
.table td { padding: .8rem .9rem; border-top: 1px solid var(--mist); vertical-align: top; }
.table td strong { color: var(--field-navy); }
.table .emails { color: var(--slate); font-size: .86rem; overflow-wrap: anywhere; }
.table td:first-child { min-width: 15rem; }
.market-checks { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.market-checks label { display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; font-size: .9rem; }
.needs { color: var(--warning-ink); font-weight: 700; font-size: .84rem; }
.section-title { margin: 2rem 0 .8rem; font-size: 1.35rem; }

/* Sign-in (Sales Portal .auth-shell). */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--brand-fill); }
:root[data-theme="dark"] .auth-shell { background: var(--night); }
.auth-panel { width: min(440px, 100%); display: grid; justify-items: center; gap: 18px; padding: 34px; border: 1px solid var(--mist); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.auth-logo { width: 104px; height: 104px; border-radius: var(--radius); object-fit: cover; }
.auth-panel h1 { font-size: 2.1rem; }
.auth-panel p { color: var(--slate); line-height: 1.55; }
.signin-button { width: 100%; }
.auth-footnote { color: var(--slate); font-size: .8rem; }

@media (min-width: 1100px) {
  .walk-head, .walk { grid-template-columns: 56px minmax(0, 1fr) 210px var(--controls-w, 272px); gap: 1rem; }
  .walk-head.admin, .walk-list.admin .walk { --controls-w: 506px; }
  .walk-head { display: grid; align-items: end; padding: 0 .75rem .45rem; color: var(--slate); font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .steps-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; text-align: center; }
  .controls-head { display: flex; gap: .4rem; }
  .walk { padding: .55rem .75rem; }
  .walk-list { gap: .4rem; }
  .thumb { width: 56px; height: 56px; }
  .walk-side { display: contents; }
  .walk .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .walk .steps > span { font-size: 0; gap: 0; }
  .walk-controls { flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
  .walk-list .inline-status { flex-wrap: nowrap; justify-content: flex-start; }
  .walk-list .field-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .w-sold, .w-closed { width: 104px; }
  .w-date { width: 150px; }
  .w-paid { width: 124px; }
  .w-status { width: 140px; }
  .walk-list .inline-status select, .walk-list .inline-status input { width: 100%; min-width: 0; }
  .walk-list .w-status { justify-content: flex-start; }
}

@media (max-width: 1180px) { .viewer-name { display: none; } }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .phone-nav { display: flex; gap: .25rem; padding: .5rem var(--gutter); overflow-x: auto; border-bottom: 1px solid var(--mist); background: var(--surface); }
  .phone-nav a { flex: none; min-height: 38px; display: inline-flex; align-items: center; padding: 0 .75rem; border-radius: var(--radius); color: var(--field-navy); font-family: var(--font-display); font-size: .95rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
  .phone-nav a[aria-current="page"] { color: var(--on-brand); background: var(--brand-fill); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (min-width: 901px) { .phone-nav { display: none; } }

@media (max-width: 640px) {
  .topbar { min-height: 60px; }
  .brand em { padding-left: .7rem; font-size: .9rem; letter-spacing: .12em; }
  .brand img { width: 36px; height: 36px; }
  .viewer-name, .viewer, .help-button { display: none; }
  .guide-card { grid-template-columns: 1fr; }
  .page { padding-top: 1.1rem; padding-bottom: 7rem; }
  .page-head { margin-bottom: 1rem; }
  .page-head h1 { font-size: 2rem; }
  .head-actions .log-walk { display: none; }
  .lane { padding: .6rem .5rem .7rem; }
  .lane .tile-label { font-size: .75rem; letter-spacing: .08em; }
  .lane .count { font-size: 1.9rem; }
  .lane + .lane::before { display: none; }
  .walk { grid-template-columns: 64px minmax(0, 1fr); gap: .7rem; }
  .thumb { width: 64px; height: 64px; }
  .walk-side { grid-column: 1 / -1; justify-items: stretch; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .inline-status, .walk-controls { justify-content: flex-start; }
  .walk-controls > * { flex: 1 1 100%; }
  .inline-status label { flex: 1 1 120px; }
  .inline-status select, .inline-status input { width: 100%; }
  .mobile-cta { position: fixed; inset: auto 0 0; z-index: 40; display: block; padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--mist); background: color-mix(in srgb, var(--surface), transparent 6%); backdrop-filter: blur(8px); }
  .mobile-cta .primary-action { width: 100%; min-height: 52px; font-size: 1.1rem; }
  .form-row, .status-grid { grid-template-columns: 1fr; }
  .answers > div { grid-template-columns: 1fr; }
  .form-actions.sticky { position: sticky; bottom: 0; z-index: 30; margin: 0 calc(-1 * var(--gutter)); padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--mist); background: var(--surface); }
  .form-actions.sticky .primary-action { flex: 1; min-height: 52px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: .4rem 0; border-top: 1px solid var(--mist); }
  .table td { border: 0; padding: .35rem .9rem; }
}

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

.progress:empty, .photo-grid:empty { display: none; }
