/* Deploy 17, app pages lane: layout body (skip link, landmarks, floating feedback) and member pages
   (dashboard, landing, premium/profile, lists, watchlist, loan documents, assignments, library, account,
   billing, team, organization). Loaded by layouts/app.blade.php after site.css; uses the site.css tokens only. */

/* ---- Layout: skip link, wordmark, footer ---- */
.skip-link {
    position: absolute; left: var(--space-4); top: -100px; z-index: 10000;
    padding: var(--space-3) var(--space-4); border-radius: var(--radius-ctl);
    background: var(--surface-1); color: var(--text-strong); font-weight: 700; font-size: var(--fs-table);
    box-shadow: var(--shadow-2); text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible { top: var(--space-3); outline: 2px solid var(--accent); outline-offset: 2px; }
main#main:focus { outline: none; }

/* The wordmark was the page's h1; it is now a span with the same look. */
.brand-copy .brand-name {
    display: block; margin: 0;
    font-family: var(--font-display); font-weight: 600;
    font-size: 2.45rem; line-height: 0.88; letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.98);
}
@media (max-width: 1280px) { .brand-copy .brand-name { font-size: 2.2rem; line-height: 1; } }
@media (max-width: 980px) { .brand-copy .brand-name { font-size: 2rem; } }
@media (max-width: 720px) { .brand-copy .brand-name { font-size: 1.65rem; } }
@media (max-width: 340px) { .brand-copy .brand-name { font-size: 1.4rem; } }
/* Footer brand: the mark and the wordmark side by side at one size; the tagline in the UI face, not italic. */
.footer-brand-col { display: grid; grid-template-columns: auto 1fr; align-items: center; align-content: start; column-gap: var(--space-3); }
.footer-brand-col .footer-brand-mark { width: 40px; height: 40px; margin: 0; border-radius: var(--radius-ctl);
    background: var(--frame); box-shadow: none; border: 0; }
.footer-brand-col .footer-brand-name { margin: 0; max-width: none; font-family: var(--font-display); font-weight: 600;
    font-size: 1.75rem; line-height: 1; letter-spacing: -0.02em; color: var(--text-strong); }
.footer-brand-col > p:not(.footer-brand-name) { grid-column: 1 / -1; margin-top: var(--space-3); }
.footer-base-right { font-style: normal; opacity: 1; color: var(--text-muted); }

/* ---- "Send feedback": in the account menu and the footer's link row (no floating button over content) ---- */
.footer-feedback {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-weight: 600; color: var(--text-strong); text-decoration: underline; text-underline-offset: 2px;
}
.footer-feedback:hover { color: var(--accent-text); }
.footer-feedback:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.feedback-dialog { border-radius: var(--radius-card); box-shadow: var(--shadow-3); }
.feedback-dialog textarea, .feedback-dialog select, .feedback-dialog input[type=text] {
    border-color: var(--line-control); border-radius: var(--radius-sm); font-size: var(--fs-body);
}
.feedback-note { color: var(--text-muted); font-size: var(--fs-small); }
.nav-account-menu a, .nav-account-menu button { min-height: 44px; }

/* Toasts: token colours, no gradients. */
.toast { border-radius: var(--radius-ctl); box-shadow: var(--shadow-2); font-size: var(--fs-small); }
.toast-success { background: var(--accent-text); }
.toast-error { background: var(--bad-text); }
.toast-info { background: var(--info-text); }

/* ---- Landing: the hero headline is the page h1 (serif: the wordmark and landing headlines only) ---- */
.landing-narrative h1.landing-h1 {
    margin: 18px 0 0;
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(3.1rem, 5.6vw, 5.8rem); line-height: 0.92; letter-spacing: -0.045em;
    max-width: 11ch; color: var(--text-strong);
}
@media (max-width: 720px) { .landing-narrative h1.landing-h1 { font-size: clamp(2.2rem, 10vw, 3.1rem); max-width: none; } }
/* Card titles and the sample panel use the UI font; serif stays on section headlines. */
body.body-landing :is(.landing-mosaic-card h4, .landing-process-card h4, .scene-primary-panel h3) {
    font-family: var(--font-ui); font-weight: 700; letter-spacing: 0;
}

/* ---- Dashboard (dashboard.blade.php): one card style, page h1, one search box, staged progress ---- */
body.body-dashboard .dashboard-hero-heading h1.dash-title {
    margin: 6px 0 8px; font-family: var(--font-ui); font-weight: 700;
    font-size: clamp(20px, 5vw, var(--fs-h1)); line-height: var(--lh-h1); color: var(--text-strong);
}
body.body-dashboard .dash-h2 {
    margin: 0; font-family: var(--font-ui); font-weight: 700;
    font-size: var(--fs-h2); line-height: var(--lh-h2); color: var(--text-strong);
}
body.body-dashboard .empty-start-card .empty-start-title { margin: 0 0 8px; font-size: var(--fs-h2); font-weight: 700; color: var(--text-strong); }
/* One quiet link to the other search mode (the active mode's own button is hidden). */
body.body-dashboard .search-mode-tabs.search-mode-links {
    display: flex; justify-content: flex-end; border: 0; background: none; padding: 0; margin: 0 0 8px; border-radius: 0;
}
body.body-dashboard .search-mode-links .smt-tab {
    flex: none; min-height: 44px; padding: 0 4px; background: none; box-shadow: none;
    color: var(--accent-text); font-weight: 600; font-size: var(--fs-small); text-decoration: underline; text-underline-offset: 3px;
}
body.body-dashboard .search-mode-links .smt-tab.is-active { display: none; }
body.body-dashboard .step-label-hint { font-weight: 500; font-size: var(--fs-small); color: var(--text-muted); text-transform: none; letter-spacing: 0; }
body.body-dashboard .address-input, body.body-dashboard #county, body.body-dashboard .parcel-textarea {
    border: 1px solid var(--line-control); border-radius: var(--radius-sm); min-height: 44px; font-size: var(--fs-body);
}
@media (max-width: 640px) {
    body.body-dashboard .address-input, body.body-dashboard #county, body.body-dashboard .parcel-textarea,
    body.body-dashboard .new-addr-county-select, body.body-dashboard #asset_use_tag, body.body-dashboard #time_window_months { font-size: 16px; }
}
body.body-dashboard .address-dropdown { border-radius: var(--radius-ctl); border-color: var(--line-strong); box-shadow: var(--shadow-2); }
body.body-dashboard .addr-result { min-height: 44px; }
body.body-dashboard .addr-result.is-pid-option { background: var(--accent-tint); }
body.body-dashboard .btn-generate { border-radius: var(--radius-ctl); background: var(--frame-2); border: 0; font-weight: 700; }
body.body-dashboard .btn-generate:hover { background: var(--frame); }

/* Cards: white, one border, one shadow, no lift, no glow, no coloured top rule. */
body.body-dashboard :is(.search-hero-card, .summary-card, .panel, .kpi-card, .chart-card, .table-card, .empty-start-card, .report-card-v2, .how-steps) {
    background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--radius-card);
    box-shadow: var(--shadow-1); backdrop-filter: none; -webkit-backdrop-filter: none; transform: none;
}
body.body-dashboard :is(.kpi-card, .summary-card) { border-radius: var(--radius-ctl); }
body.body-dashboard :is(.kpi-card, .summary-card, .report-card-v2)::before,
body.body-dashboard :is(.kpi-card, .summary-card)::after { content: none; }
body.body-dashboard .report-card-v2:hover { transform: none; box-shadow: var(--shadow-1); }
body.body-dashboard :is(.metric-value, .summary-value) {
    font-family: var(--font-ui); font-weight: 700; color: var(--text-strong);
    font-variant-numeric: tabular-nums lining-nums; white-space: nowrap;
}
/* 200px minimum: "$55,200,000" needs ~134px at the largest clamp size, so a card never clips a figure
   (one column in the 380px sidebar; two or three when the panel stacks full-width). */
body.body-dashboard .insight-shell .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
body.body-dashboard .page-ambient-grid, body.body-dashboard .page-ambient-orb { display: none; }

/* Report history: light, like every other card (it was a navy band). */
body.body-dashboard .report-history-section {
    background: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 0; margin-top: var(--space-7);
}
body.body-dashboard .report-history-section::before { content: none; }
body.body-dashboard .report-history-section :is(.section-heading h2, .dash-h2) { color: var(--text-strong); }
body.body-dashboard .report-history-section :is(.section-heading p, .muted, .pagination-shell, .table-subtext) { color: var(--text-muted); }
body.body-dashboard .report-history-section .section-kicker { color: var(--text-muted); }
body.body-dashboard .report-history-section .panel :is(h3, p) { color: var(--text) !important; }
body.body-dashboard .report-history-section .button-ghost { background: var(--surface-1); border-color: var(--line-control); color: var(--text); }
body.body-dashboard .rc-title h3 { font-family: var(--font-ui); font-weight: 700; font-size: var(--fs-h3); color: var(--text-strong); overflow-wrap: break-word; }
body.body-dashboard .rc-parcel-sub { display: block; margin-top: 2px; font-size: var(--fs-micro); color: var(--text-muted); }
body.body-dashboard .rc-meta { color: var(--text-muted); font-size: var(--fs-small); }
body.body-dashboard :is(.btn-view-report, .btn-download-report) {
    min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-ctl); font-weight: 600; font-size: var(--fs-table); transform: none;
}
body.body-dashboard .btn-view-report { background: var(--frame-2); color: #fff; }
body.body-dashboard .btn-download-report { background: var(--surface-1); color: var(--text); border: 1px solid var(--line-control); }
body.body-dashboard :is(.btn-view-report, .btn-download-report):hover { opacity: 1; transform: none; background: var(--surface-2); color: var(--text-strong); }
body.body-dashboard .btn-view-report:hover { background: var(--frame); color: #fff; }
body.body-dashboard .rc-status-ready { background: var(--ok-tint); color: var(--ok-text); border-color: var(--ok-line); }
body.body-dashboard :is(.rc-status-queued, .rc-status-running) { background: var(--warn-tint); color: var(--warn-text); border-color: var(--warn-line); }
body.body-dashboard .rc-status-failed { background: var(--bad-tint); color: var(--bad-text); border-color: var(--bad-line); }

/* Staged progress (Queued, Gathering records, Valuing, Writing brief, Done). */
.rc-progress { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 0 0 var(--space-3); padding: 0; font-size: var(--fs-small); color: var(--text-muted); }
.rc-progress li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.rc-progress li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-control); flex: none; }
.rc-progress li.is-current { color: var(--warn-text); background: var(--warn-tint); border-color: var(--warn-line); font-weight: 600; }
.rc-progress li.is-current::before { border-color: currentColor; background: currentColor; animation: lm-pulse 1.4s ease-in-out infinite; }
.rc-progress li.is-done { color: var(--ok-text); background: var(--ok-tint); border-color: var(--ok-line); }
.rc-progress li.is-done::before { content: "\2713"; width: auto; height: auto; border: 0; font-size: 12px; line-height: 1; }
@keyframes lm-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rc-progress li.is-current::before { animation: none; } }

/* Comp preview: plain right-aligned figures, no pills; never broken mid-number. */
body.body-dashboard .data-table :is(td.num, th.num) { text-align: right; white-space: nowrap; }
body.body-dashboard .billing-strip { flex-wrap: wrap; border-radius: var(--radius-ctl); }
body.body-dashboard .billing-stat .bs-label { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .04em; color: var(--accent-text); }
body.body-dashboard .onboarding-panel .button { min-height: 44px; }
body.body-dashboard .billing-strip-warn .billing-stat .bs-label { color: var(--warn-text); }
body.body-dashboard .billing-strip-danger .billing-stat .bs-label { color: var(--bad-text); }

/* Page titles promoted to h1 (billing, sign-in pages, team join) now that the wordmark is a span: same look as before. */
.auth-panel h1.page-title {
    margin: 0 0 8px; font-family: var(--font-display); font-weight: 600;
    font-size: 1.5rem; line-height: var(--lh-h1); color: var(--text-strong); overflow-wrap: anywhere;
}
.dashboard-hero-heading h1.page-title {
    margin: 10px 0 0; font-family: var(--font-ui); font-weight: 700;
    font-size: clamp(20px, 5vw, 28px); line-height: var(--lh-h1); max-width: 32ch; color: var(--text-strong); overflow-wrap: anywhere;
}

/* Links inside the muted intro lines read as links (the global `a` inherits the muted colour). */
:is(.in-sub, .lb-intro, .fl-intro) a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Dashboard, visual review: the paper look (no glow, no gradient bands or buttons), one bar colour, no 800/900,
   KPI values that wrap inside their tile, and both columns starting on one line. ---- */
body.body-dashboard :is(.market-shell, .insight-shell)::before,
body.body-dashboard :is(.market-shell, .insight-shell)::after,
body.body-dashboard .summary-card::before,
body.body-dashboard .summary-card::after,
body.body-dashboard .module-pill::before { content: none; }
body.body-dashboard :is(.market-shell, .insight-shell) { background: var(--surface-1); }
body.body-dashboard .insight-shell { position: static; top: auto; }
body.body-dashboard .analytics-grid-2col { align-items: start; }
body.body-dashboard .summary-card { background: var(--surface-1); min-width: 0; }
body.body-dashboard .summary-value { white-space: normal; overflow-wrap: break-word; font-weight: 700; }
body.body-dashboard .module-pill {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-ctl);
    box-shadow: none; font-weight: 600; color: var(--text); transition: none;
}
body.body-dashboard .trend-position-panel { background: var(--surface-1); border-color: var(--line-strong); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
body.body-dashboard .trend-position-header { background: var(--surface-1); color: var(--text-strong); border-bottom: 1px solid var(--line); }
body.body-dashboard .trend-position-header h4 { color: var(--text-strong); }
body.body-dashboard .coverage-fill, body.body-dashboard .quota-bar-fill { background: var(--accent); }
body.body-dashboard .quota-bar-fill.is-low { background: var(--warn-text); }
body.body-dashboard .view-pill.is-active { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-text); }
body.body-dashboard .report-card-v2 { background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: var(--radius-card); box-shadow: var(--shadow-1); }
body.body-dashboard :is(h1, h2, h3, h4, strong, b, .stat-label, .summary-label, .metric-value) { font-weight: 700; }

/* ---- Controls and card edges, visual review: one checkbox colour, a styled file picker, one card edge ---- */
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
input[type="file"] { font: inherit; font-size: var(--fs-small); color: var(--text); }
input[type="file"]::file-selector-button {
    margin-right: var(--space-2); min-height: 32px; padding: 0 var(--space-3);
    border: 1px solid var(--line-control); border-radius: var(--radius-ctl);
    background: var(--surface-1); color: var(--text-strong); font: inherit; font-weight: 600; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--surface-2); }
input[type="file"].lc-input { padding: var(--space-1) var(--space-2); min-width: 0; text-overflow: ellipsis; }
.as-panel { border: 1px solid var(--line-strong); box-shadow: var(--shadow-1); }
[data-watch-alerts] form > .button { margin-right: var(--space-3); margin-top: var(--space-2); }
/* The map's figure callout sits above the map tiles (Leaflet panes go to z-index 400), on the frame colour. */
body.body-dashboard .map-callout { z-index: 450; background: var(--frame); border-radius: var(--radius-ctl); }
body.body-dashboard .nowrap-token { white-space: nowrap; }
