@font-face {
    font-family: "Cash Creek Mono";
    src: url("/fonts/liberation-mono-latin-regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Cash Creek Mono";
    src: url("/fonts/liberation-mono-latin-bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ink: #171612;
    --ink-soft: #37342e;
    --tan: #b79b75;
    --tan-dark: #8d704b;
    --sand: #e7dccb;
    --cream: #f6f1e8;
    --paper: #fffdf9;
    --line: #ddd2c1;
    --muted: #756f65;
    --success: #355d42;
    --danger: #9b302d;
    --shadow: 0 18px 50px rgba(36, 29, 19, .08);
}

html, body { margin: 0; min-height: 100%; background: var(--cream); color: var(--ink); font-family: "Cash Creek Mono", "Courier New", monospace; }
* { box-sizing: border-box; }
a { color: var(--ink); text-decoration-color: var(--tan); text-underline-offset: .22em; }
a:hover { color: var(--tan-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 3.4vw, 3.6rem); line-height: 1.05; letter-spacing: -.045em; }
h2 { font-size: clamp(1.25rem, 2vw, 1.75rem); letter-spacing: -.025em; }
button, input, textarea, select { font: inherit; }

.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 282px minmax(0, 1fr); }
.portal-sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: white; z-index: 20; }
.portal-main { min-width: 0; display: flex; flex-direction: column; }
.portal-topbar { height: 70px; padding: 0 clamp(1.5rem, 4vw, 4.5rem); background: rgba(255,253,249,.88); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; backdrop-filter: blur(12px); }
.topbar-label { color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .15em; }
.topbar-account { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-size: .78rem; }
.portal-content { width: 100%; max-width: 1480px; margin: 0 auto; padding: clamp(2rem, 5vw, 5rem) clamp(1.25rem, 5vw, 5rem); flex: 1; }
.portal-footer { padding: 1.5rem clamp(1.25rem, 5vw, 5rem); border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }

.mobile-brand-row, .nav-toggle { display: none; }
.nav-panel { height: 100%; display: flex; flex-direction: column; }
.brand-lockup { display: block; background: #fff; margin: 22px; padding: 10px; border: 1px solid rgba(255,255,255,.2); }
.brand-lockup img { display: block; width: 100%; height: 148px; object-fit: contain; }
.portal-nav { padding: 14px 18px; }
.nav-section-label { margin: 0 14px 9px; color: #a8a194; font-size: .62rem; text-transform: uppercase; letter-spacing: .16em; }
.nav-section-label.spaced { margin-top: 28px; }
.portal-nav-link { display: flex; align-items: center; gap: 13px; margin: 4px 0; padding: 11px 13px; color: #e9e1d5; border-radius: 3px; text-decoration: none; font-size: .83rem; transition: .18s ease; }
.portal-nav-link:hover { color: white; background: rgba(255,255,255,.07); }
.portal-nav-link.active { color: var(--ink); background: var(--tan); }
.nav-icon { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-footer { margin-top: auto; padding: 20px 22px 25px; border-top: 1px solid rgba(255,255,255,.12); color: #bdb5a8; font-size: .72rem; }
.sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-user div { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user strong { color: white; font-size: .7rem; }
.sidebar-user small { margin-top: 3px; color: #9d9588; }
.logout-button { margin-top: 14px; padding: 0; color: #d5cabc; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .7rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: inline-grid; place-items: center; background: var(--tan); color: var(--ink); font-weight: 700; }
.avatar.small { width: 30px; height: 30px; font-size: .72rem; }

.eyebrow { margin-bottom: .75rem; color: var(--tan-dark); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .17em; }
.breadcrumb-nav { margin-bottom: 1.15rem; overflow: hidden; }
.breadcrumb-trail { display: flex; align-items: center; gap: .55rem; min-width: 0; color: var(--muted); font-size: .64rem; line-height: 1.4; }
.breadcrumb-trail > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-trail > * + *::before { content: "/"; margin-right: .55rem; color: var(--tan-dark); }
.breadcrumb-trail a { flex: 0 1 auto; color: var(--muted); text-decoration: none; }
.breadcrumb-trail a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--tan); }
.breadcrumb-trail [aria-current="page"] { color: var(--ink); font-weight: 700; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 2.25rem; }
.page-heading h1 { margin-bottom: .55rem; }
.page-intro, .hero-copy { max-width: 700px; color: var(--muted); line-height: 1.75; }
.text-link { margin-top: 8px; white-space: nowrap; font-size: .76rem; }

.btn { border-radius: 2px; padding: .75rem 1.15rem; border-width: 1px; font-size: .75rem; font-weight: 700; letter-spacing: .035em; }
.btn-lg { padding: .95rem 1.45rem; }
.btn-primary { color: white; background: var(--ink); border-color: var(--ink); }
.btn-primary:hover, .btn-primary:focus { color: var(--ink); background: var(--tan); border-color: var(--tan); }
.btn-outline-dark { color: var(--ink); border-color: var(--ink); }
.btn-outline-dark:hover { color: white; background: var(--ink); }
.btn:focus, .form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(183,155,117,.25); border-color: var(--tan-dark); }

.hero-panel { min-height: 560px; padding: clamp(2rem, 6vw, 6rem); background: var(--sand); border: 1px solid #d0bea4; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; overflow: hidden; position: relative; }
.hero-panel::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(23,22,18,.13); pointer-events: none; }
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-content h1 { font-size: clamp(2.7rem, 5.5vw, 5.8rem); }
.hero-copy { margin-bottom: 2rem; font-size: .95rem; }
.hero-mark { display: grid; place-items: center; position: relative; }
.hero-mark img { width: min(100%, 470px); mix-blend-mode: multiply; filter: sepia(.15); }
.compact-hero { min-height: 390px; grid-template-columns: 1fr; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 1.5rem; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature-card { min-height: 230px; padding: 2rem; background: var(--paper); }
.feature-card h2 { margin: 1.5rem 0 .7rem; }
.feature-card p { color: var(--muted); font-size: .78rem; line-height: 1.7; }
.feature-number { color: var(--tan-dark); font-size: .64rem; letter-spacing: .15em; text-transform: uppercase; }
.muted-feature { background: #eee5d8; }

.content-card { padding: clamp(1.4rem, 3vw, 2.5rem); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { padding: 1.7rem; background: var(--paper); border: 1px solid var(--line); }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card span { font-size: .64rem; text-transform: uppercase; letter-spacing: .13em; }
.stat-card strong { display: block; margin: .6rem 0 .25rem; font-size: 2rem; line-height: 1.1; }
.stat-card .status-word, .stat-card .date-word { font-size: 1.25rem; }
.stat-card small { font-size: .66rem; }
.action-card { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.action-card p { color: var(--muted); margin-bottom: 0; font-size: .78rem; }
.booking-action-banner { margin: -.75rem 0 1.5rem; padding: 1.15rem 1.3rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; color: white; background: var(--ink); border: 1px solid var(--ink); border-left: 6px solid #e9822d; box-shadow: 0 14px 35px rgba(85, 32, 0, .2); text-decoration: none; transition: .18s ease; }
.booking-action-banner:hover { color: white; border-color: #e9822d; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(85, 32, 0, .26); }
.booking-action-banner:focus-visible { outline: 3px solid #e9822d; outline-offset: 3px; }
.booking-action-count { width: 2.7rem; height: 2.7rem; display: grid; place-items: center; color: #552000; background: #ffc47d; border: 1px solid #e9822d; border-radius: 50%; font-size: 1.05rem; font-weight: 700; }
.booking-action-copy { min-width: 0; }
.booking-action-copy strong, .booking-action-copy small { display: block; }
.booking-action-copy strong { line-height: 1.35; }
.booking-action-copy small { margin-top: .3rem; color: #d8cfc1; font-size: .66rem; line-height: 1.5; }
.booking-action-link { color: #ffc47d; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading h2 { margin-bottom: 0; }
.section-heading a:not(.btn), .section-heading > span { color: var(--muted); font-size: .7rem; }
.property-preview-grid { display: grid; gap: .65rem; }
.property-preview { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: .18s; }
.property-preview:hover { transform: translateX(3px); border-color: var(--tan); color: var(--ink); }
.property-preview strong, .property-preview small { display: block; }
.property-preview small { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.property-icon { width: 35px; height: 35px; display: grid; place-items: center; background: var(--sand); }
.property-icon.large { width: 47px; height: 47px; font-size: 1.3rem; }

.property-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.property-card { padding: 1.6rem; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.property-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.property-card h2 { margin: 1.25rem 0 .35rem; }
.property-card > p { min-height: 2.6rem; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.type-badge, .status-badge { display: inline-block; padding: .35rem .55rem; background: var(--cream); border: 1px solid var(--line); font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; }
.urgency-badge { font-weight: 700; }
.urgency-immediate { color: white; background: #9b302d; border-color: #9b302d; }
.urgency-thirty-days { color: #562607; background: #f3c39f; border-color: #d89260; }
.urgency-three-months { color: #584006; background: #f4dda0; border-color: #d4b55d; }
.urgency-six-months { color: #51491b; background: #e9e1ad; border-color: #c8bb72; }
.urgency-one-year { color: var(--ink); background: var(--sand); border-color: #cdbb9f; }
.urgency-monitor { color: #294552; background: #dce9ed; border-color: #a9c2ca; }
.property-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; padding: 1rem 0; margin: 1.2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.property-card dl div { min-width: 0; }
.property-card dt { color: var(--muted); font-size: .58rem; text-transform: uppercase; }
.property-card dd { margin: .25rem 0 0; font-size: .7rem; }
.card-link { display: flex; justify-content: space-between; font-size: .7rem; font-weight: 700; }
.property-card-actions { display: grid; gap: .75rem; }
.property-card-actions > a:last-child { color: var(--muted); font-size: .62rem; }

.passport-hero { min-height: 270px; padding: clamp(2rem, 5vw, 4rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; color: white; background: var(--ink); border: 1px solid var(--ink); position: relative; overflow: hidden; }
.passport-hero::after { content: ""; width: 320px; height: 320px; position: absolute; right: -80px; bottom: -180px; border: 1px solid rgba(183,155,117,.38); border-radius: 50%; box-shadow: 0 0 0 35px rgba(183,155,117,.06), 0 0 0 70px rgba(183,155,117,.04); }
.passport-hero h1 { margin-bottom: .75rem; color: white; }
.passport-hero p:last-child { margin: 0; color: #d4cabc; font-size: .78rem; }
.passport-hero .eyebrow { color: var(--tan); }
.passport-seal { width: 142px; height: 142px; z-index: 1; flex: 0 0 auto; display: grid; align-content: center; justify-items: center; color: var(--ink); background: var(--tan); border: 5px double var(--ink); border-radius: 50%; text-transform: uppercase; }
.passport-seal span, .passport-seal small { font-size: .52rem; letter-spacing: .12em; }
.passport-seal strong { margin: .25rem 0; font-size: 1.4rem; }
.passport-actions { margin: 1rem 0 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.passport-actions span { color: var(--muted); font-size: .62rem; }
.passport-section { max-width: none; margin-top: 1.25rem; }
.passport-section .section-heading .eyebrow { margin-bottom: .45rem; }
.passport-spec-grid { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.passport-spec-grid > div { min-width: 0; padding: 1.1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.passport-spec-grid dt { color: var(--muted); font-size: .56rem; text-transform: uppercase; letter-spacing: .08em; }
.passport-spec-grid dd { margin: .45rem 0 0; overflow-wrap: anywhere; font-size: .7rem; font-weight: 700; }
.passport-notes { margin-top: 1rem; padding: 1.1rem; background: var(--cream); border-left: 3px solid var(--tan); }
.passport-notes span { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .56rem; text-transform: uppercase; letter-spacing: .08em; }
.passport-notes p { margin: 0; white-space: pre-wrap; font-size: .7rem; line-height: 1.65; }
.exposure-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.exposure-card { min-height: 145px; padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); background: var(--cream); }
.exposure-card > span { color: var(--muted); font-size: .58rem; text-transform: uppercase; letter-spacing: .1em; }
.exposure-card strong { margin: .8rem 0; font-size: 1rem; }
.sun-meter { display: flex; gap: 4px; }
.sun-meter i { width: 28px; height: 5px; background: var(--line); }
.exposure-partial .sun-meter i:nth-child(-n+2), .exposure-high .sun-meter i { background: var(--tan-dark); }
.exposure-low .sun-meter i:first-child { background: var(--tan-dark); }
.priority-filter { min-width: 230px; font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; }
.priority-filter .form-select { margin-top: .35rem; text-transform: none; letter-spacing: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: .75rem; }
.calendar-card { min-width: 0; padding: 1.15rem; display: grid; grid-template-columns: 70px 1fr; gap: 1rem; border: 1px solid var(--line); background: white; }
.calendar-card > time { padding-right: 1rem; display: grid; align-content: start; border-right: 1px solid var(--line); text-align: center; }
.calendar-card > time strong { font-size: 1.65rem; }
.calendar-card > time span { color: var(--muted); font-size: .56rem; text-transform: uppercase; }
.calendar-card h3 { margin: .8rem 0 .45rem; font-size: .9rem; }
.calendar-card p { margin-bottom: .7rem; color: var(--muted); font-size: .64rem; line-height: 1.55; }
.calendar-card small { color: var(--tan-dark); font-size: .58rem; font-weight: 700; text-transform: uppercase; }
.calendar-completed { background: var(--cream); }
.calendar-completed > time { color: var(--muted); }
.calendar-completed .completed-care-status { color: var(--success); }
.completed-care-toggle { margin-top: 1rem; padding: .7rem 0; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--tan); cursor: pointer; font-size: .66rem; font-weight: 700; }
.completed-care-toggle:hover, .completed-care-toggle:focus { color: var(--tan-dark); }
.passport-list { display: grid; gap: .65rem; }
.passport-row { padding: 1rem; display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 1rem; color: var(--ink); background: white; border: 1px solid var(--line); text-decoration: none; }
.passport-row:hover { color: var(--ink); border-color: var(--tan); transform: translateX(3px); }
.passport-row time { color: var(--tan-dark); font-size: .62rem; font-weight: 700; }
.passport-row strong, .passport-row small { display: block; }
.passport-row small { margin-top: .3rem; color: var(--muted); font-size: .58rem; }
.passport-timeline { max-width: 960px; }
.timeline-entry { display: grid; grid-template-columns: 120px 20px minmax(0, 1fr); gap: 1rem; }
.timeline-entry > time { padding-top: .2rem; color: var(--muted); font-size: .62rem; text-align: right; }
.timeline-marker { position: relative; }
.timeline-marker::before { content: ""; width: 11px; height: 11px; position: absolute; top: .18rem; left: 4px; z-index: 1; background: var(--tan); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--tan-dark); border-radius: 50%; }
.timeline-marker::after { content: ""; width: 1px; position: absolute; top: .8rem; bottom: 0; left: 9px; background: var(--line); }
.timeline-entry:last-child .timeline-marker::after { display: none; }
.timeline-content { margin-bottom: 1.6rem; padding: 0 0 1.6rem; border-bottom: 1px solid var(--line); }
.timeline-entry:last-child .timeline-content { margin-bottom: 0; border-bottom: 0; }
.timeline-content h3 { margin: .7rem 0 .4rem; font-size: 1rem; }
.timeline-content p { margin-bottom: .65rem; white-space: pre-wrap; color: var(--ink-soft); font-size: .68rem; line-height: 1.65; }
.timeline-content small { display: block; margin-bottom: .65rem; color: var(--muted); font-size: .58rem; }
.timeline-link { font-size: .64rem; font-weight: 700; }
.checkbox-field { display: flex; align-items: center; gap: .65rem; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--ink); }
.checkbox-field label { margin: 0; }

.form-card { max-width: 980px; }
.form-section-heading { margin-bottom: 1.4rem; }
.form-section-heading h2 { margin-bottom: .35rem; }
.form-section-heading p { color: var(--muted); font-size: .68rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem 1.25rem; }
.field-group { min-width: 0; }
.field-group label, .label-row { display: block; margin-bottom: .45rem; font-size: .68rem; font-weight: 700; }
.label-row { display: flex; justify-content: space-between; }
.label-row a { font-weight: 400; }
.field-group small { display: block; margin-top: .4rem; color: var(--muted); font-size: .6rem; }
.full-field { grid-column: 1 / -1; }
.form-control, .form-select { min-height: 47px; border-radius: 1px; border-color: #cfc3b2; background-color: #fff; color: var(--ink); font-size: .76rem; }
textarea.form-control { min-height: auto; }
.form-divider { margin: 2.4rem 0; border-color: var(--line); opacity: 1; }
.form-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.danger-zone { max-width: 980px; margin-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-color: #dfc0bd; }
.danger-zone h2, .delete-confirmation h2 { margin-bottom: .45rem; }
.danger-zone p:last-child, .delete-confirmation > p { margin-bottom: 0; color: var(--muted); }
.delete-confirmation { max-width: 760px; border-color: #dfc0bd; }
.delete-confirmation form { margin-top: 1.5rem; }
.validation-message, .validation-summary { color: var(--danger); font-size: .64rem; }
.invalid { border-color: var(--danger) !important; }
.valid.modified:not([type=checkbox]) { border-color: var(--success); }
.alert { border-radius: 1px; font-size: .72rem; }
.alert-success { color: #244831; background: #e8f0e8; border-color: #c5d8c8; }
.alert-danger { color: #74211f; background: #f5e5e3; border-color: #dfc0bd; }
.related-section { max-width: 980px; margin-top: 1.25rem; }
.inspection-wide { max-width: none; }
.inspection-list, .issue-list, .file-list { display: grid; gap: .65rem; }
.inspection-row, .issue-row, .file-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); background: white; }
.inspection-row { color: var(--ink); text-decoration: none; transition: .18s ease; }
.inspection-row:hover { border-color: var(--tan); transform: translateX(3px); color: var(--ink); }
.inspection-row strong, .inspection-row small, .file-row small { display: block; }
.inspection-row small, .file-row small { margin-top: .3rem; color: var(--muted); font-size: .6rem; }
.inspection-row-meta, .badge-row { display: flex; align-items: center; gap: .5rem; }
.health-score { min-width: 44px; padding: .45rem; color: white; background: var(--ink); text-align: center; font-weight: 700; }
.moisture-reading-list { display: grid; gap: .65rem; }
.moisture-reading-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; background: white; border: 1px solid var(--line); }
.moisture-reading-row strong, .moisture-reading-row span { display: block; }
.moisture-reading-row strong { margin-bottom: .25rem; font-size: 1rem; }
.moisture-reading-row span { color: var(--muted); font-size: .68rem; }
.moisture-reading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.moisture-reading-card { padding: 1rem; background: white; border: 1px solid var(--line); }
.moisture-reading-card strong, .moisture-reading-card span { display: block; }
.moisture-reading-card strong { margin-bottom: .35rem; font-size: 1.35rem; }
.moisture-reading-card span { color: var(--muted); font-size: .66rem; line-height: 1.5; }
.visibility-control { display: flex; align-items: center; gap: .65rem; padding: .9rem; background: var(--cream); border: 1px solid var(--line); }
.visibility-control label { margin: 0; }
.visibility-control input { width: 18px; height: 18px; accent-color: var(--ink); }
.issue-row h3 { margin: .7rem 0 .35rem; font-size: 1rem; }
.issue-row p { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.upload-panel { margin-bottom: 1.25rem; padding: 1.25rem; background: var(--cream); border: 1px solid var(--line); }
.upload-panel input[type=file] { display: block; width: 100%; padding: .75rem; background: white; border: 1px solid #cfc3b2; font-size: .7rem; }
.visibility-button { padding: .5rem .7rem; color: var(--ink); background: var(--cream); border: 1px solid var(--line); cursor: pointer; font-size: .6rem; }
.visibility-button:hover { background: var(--tan); border-color: var(--tan); }
.file-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
.file-row-actions button { white-space: nowrap; }
.file-delete-button, .file-delete-cancel, .file-delete-confirm { padding: .5rem .7rem; cursor: pointer; font-size: .6rem; }
.file-delete-button { color: var(--danger); background: white; border: 1px solid #dfc0bd; }
.file-delete-button:hover { background: #f5e5e3; }
.file-delete-cancel { color: var(--ink); background: white; border: 1px solid var(--line); }
.file-delete-confirm { color: white; background: var(--danger); border: 1px solid var(--danger); }
.file-row-actions button:disabled { cursor: wait; opacity: .65; }
.file-row a, .customer-file strong { font-size: .7rem; font-weight: 700; }
.customer-file { color: var(--ink); text-decoration: none; }
.customer-file > span { white-space: nowrap; font-size: .65rem; font-weight: 700; }
.inspection-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.inspection-copy { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: none; }
.inspection-copy p:last-child { margin-bottom: 0; white-space: pre-wrap; color: var(--ink-soft); font-size: .75rem; line-height: 1.75; }
.issue-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.issue-card { padding: 1.25rem; border: 1px solid var(--line); background: white; }
.issue-card h3 { margin: 1rem 0 .25rem; }
.issue-card > p { color: var(--ink-soft); font-size: .7rem; line-height: 1.65; }
.issue-card .issue-location { color: var(--tan-dark); font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.issue-card dl { display: grid; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.issue-card dt { color: var(--muted); font-size: .58rem; text-transform: uppercase; letter-spacing: .07em; }
.issue-card dd { margin: .2rem 0 0; white-space: pre-wrap; font-size: .68rem; line-height: 1.5; }
.issue-file-links { display: grid; gap: .35rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.issue-file-links a { font-size: .62rem; }
.inspection-image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: .75rem; margin: 1rem 0; }
.inspection-image-thumbnail { min-width: 0; padding: 0; overflow: hidden; color: var(--ink); background: white; border: 1px solid var(--line); cursor: zoom-in; text-align: left; }
.inspection-image-thumbnail:hover, .inspection-image-thumbnail:focus-visible { border-color: var(--tan-dark); box-shadow: 0 0 0 .2rem rgba(183,155,117,.2); outline: 0; }
.inspection-image-thumbnail img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cream); }
.inspection-image-thumbnail span { display: block; padding: .55rem .65rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.compact-image-gallery { flex: 0 0 92px; grid-template-columns: 1fr; gap: 0; margin: 0; }
.compact-image-gallery .inspection-image-thumbnail img { aspect-ratio: 1; }
.compact-image-gallery .inspection-image-thumbnail span { display: none; }
.file-row-content { min-width: 0; display: flex; align-items: center; gap: .9rem; }
.file-row-content > div:last-child { min-width: 0; }
.file-row-content a { overflow-wrap: anywhere; }
.image-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1.25rem; background: rgba(23,22,18,.88); }
.image-lightbox-panel { position: relative; width: min(100%, 1100px); max-height: calc(100vh - 2.5rem); display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--paper); border: 1px solid var(--tan); box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.image-lightbox-panel > img { display: block; width: 100%; height: 100%; max-height: calc(100vh - 8rem); object-fit: contain; background: var(--ink); }
.image-lightbox-close { position: absolute; top: .75rem; right: .75rem; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; color: white; background: rgba(23,22,18,.85); border: 1px solid rgba(255,255,255,.5); cursor: pointer; font-size: 1.4rem; line-height: 1; }
.image-lightbox-details { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; }
.image-lightbox-details strong, .image-lightbox-details small { display: block; }
.image-lightbox-details strong { overflow-wrap: anywhere; font-size: .7rem; }
.image-lightbox-details small { margin-top: .25rem; color: var(--muted); font-size: .58rem; }

.table-card { padding: 0; overflow: hidden; }
.table-tools { padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); }
.search-box { width: min(100%, 420px); display: flex; align-items: center; gap: .6rem; padding: 0 .8rem; border: 1px solid var(--line); background: white; }
.search-box input { width: 100%; height: 41px; border: 0; outline: 0; font-size: .72rem; }
.result-count { color: var(--muted); font-size: .66rem; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: .8rem 1.2rem; color: var(--muted); background: var(--cream); text-align: left; font-size: .58rem; text-transform: uppercase; letter-spacing: .1em; }
td { padding: 1rem 1.2rem; border-top: 1px solid var(--line); font-size: .7rem; vertical-align: middle; }
td a { text-decoration: none; }
.person-cell { display: flex; align-items: center; gap: .8rem; min-width: 200px; }
.person-cell strong, .person-cell small, .block-small { display: block; }
.person-cell small, .block-small { margin-top: .25rem; color: var(--muted); font-size: .59rem; }
.status-active { color: #28523a; background: #e4efe6; border-color: #bfd3c3; }
.status-inactive { color: #716c64; background: #efede8; }
.status-lead { color: #705024; background: #f2e6d1; border-color: #ddc49d; }
.action-cell { text-align: right; }
.table-action { white-space: nowrap; font-weight: 700; }

.availability-card { max-width: 920px; }
.availability-heading, .availability-row { display: grid; grid-template-columns: minmax(120px, 1fr) 120px minmax(145px, .8fr) minmax(145px, .8fr); align-items: center; gap: 1rem; }
.availability-heading { padding: 0 .75rem .75rem; color: var(--muted); font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; }
.availability-row { padding: .85rem .75rem; border-top: 1px solid var(--line); }
.availability-row strong { font-size: .8rem; }
.availability-toggle { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: .66rem; cursor: pointer; }
.availability-toggle input { width: 18px; height: 18px; accent-color: var(--ink); }
.availability-row .form-control:disabled { color: var(--muted); background: var(--cream); }
.availability-help { margin: 1rem .75rem 0; color: var(--muted); font-size: .63rem; line-height: 1.6; }

.booking-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.booking-card { min-width: 0; padding: 1.5rem; display: flex; flex-direction: column; color: var(--ink); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; transition: .18s ease; }
.booking-card:hover { color: var(--ink); border-color: var(--tan); transform: translateY(-2px); }
.booking-card-heading { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.booking-card-heading > span:last-child { color: var(--muted); font-size: .56rem; }
.booking-card h2 { margin: 1.2rem 0 .3rem; }
.booking-card > p { color: var(--muted); font-size: .68rem; }
.booking-card .card-link { margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.booking-time { min-height: 3.2rem; display: block; margin: .65rem 0 1.1rem; font-size: .68rem; line-height: 1.6; }
.status-large { padding: .55rem .8rem; font-size: .65rem; }
.status-pending { color: #705024; background: #f2e6d1; border-color: #ddc49d; }
.status-action { color: #552000; background: #ffc47d; border-color: #d96d16; box-shadow: 0 0 0 .18rem rgba(217, 109, 22, .16); font-weight: 700; }
.status-confirmed { color: #28523a; background: #e4efe6; border-color: #bfd3c3; }
.status-canceled { color: #716c64; background: #efede8; }

.booking-confirmed { margin-bottom: 1.25rem; padding: clamp(1.5rem, 4vw, 3rem); color: white; background: var(--success); border: 1px solid #274933; }
.booking-confirmed span, .booking-confirmed strong, .booking-confirmed small { display: block; }
.booking-confirmed span { margin-bottom: .8rem; color: #d7e8da; font-size: .6rem; text-transform: uppercase; letter-spacing: .12em; }
.booking-confirmed strong { margin-bottom: .55rem; font-size: clamp(1.15rem, 2.5vw, 2rem); }
.booking-confirmed small { color: #d7e8da; font-size: .65rem; }
.response-panel { margin-bottom: 1.25rem; display: grid; grid-template-columns: minmax(220px, .65fr) minmax(300px, 1.35fr); align-items: center; gap: 2rem; }
.response-panel h2 { margin-bottom: .65rem; }
.response-panel p, .waiting-panel p { margin-bottom: 0; color: var(--muted); font-size: .68rem; line-height: 1.65; }
.slot-button-list { display: grid; align-content: center; gap: .65rem; }
.slot-accept-button { padding: 1rem 1.1rem; display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 1rem; color: var(--ink); background: var(--cream); border: 1px solid var(--tan-dark); box-shadow: 0 2px 0 rgba(35, 30, 24, .08); cursor: pointer; text-align: left; transition: .15s ease; }
.slot-accept-button:hover, .slot-accept-button:focus { background: var(--sand); border-color: var(--ink); box-shadow: 0 0 0 .18rem rgba(183,155,117,.2); transform: translateY(-1px); }
.slot-accept-button strong { white-space: nowrap; font-size: .76rem; }
.slot-accept-button span { white-space: nowrap; color: var(--ink); font-size: .72rem; font-weight: 600; }
.slot-accept-button small { padding: .6rem .85rem; color: white; background: var(--success); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.booking-accept-confirmation { margin-top: .25rem; padding: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--cream); border: 1px solid var(--tan-dark); }
.booking-accept-confirmation strong { display: block; font-size: .72rem; }
.booking-accept-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.booking-accept-actions .btn { white-space: nowrap; font-size: .58rem; }
.waiting-panel { margin-bottom: 1.25rem; border-left: 4px solid var(--tan); }

.proposal-editor { margin-bottom: 1.25rem; }
.proposal-choice-list { display: grid; gap: .65rem; }
.proposal-choice { display: grid; grid-template-columns: 1fr 1fr 36px; align-items: end; gap: .75rem; }
.proposal-remove { width: 36px; height: 47px; color: var(--danger); background: white; border: 1px solid #dfc0bd; cursor: pointer; font-size: 1.2rem; }
.proposal-add-button { margin-top: 1rem; padding: .75rem 1.1rem; display: inline-flex; align-items: center; gap: .65rem; color: white; background: var(--ink); border: 1px solid var(--ink); box-shadow: 0 3px 0 rgba(35, 30, 24, .22); cursor: pointer; font-size: .68rem; font-weight: 700; transition: .15s ease; }
.proposal-add-button span { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink); background: var(--tan); font-size: 1rem; line-height: 1; }
.proposal-add-button:hover, .proposal-add-button:focus { color: white; background: #34302b; border-color: var(--tan-dark); box-shadow: 0 0 0 .18rem rgba(183, 155, 117, .3), 0 3px 0 rgba(35, 30, 24, .22); transform: translateY(-1px); }
.proposal-message { margin-top: 1.25rem; }

.booking-date-picker { position: relative; }
.booking-date-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem; cursor: pointer; text-align: left; }
.booking-date-trigger > span:last-child { color: var(--muted); font-size: 1rem; }
.booking-calendar { position: absolute; z-index: 30; top: calc(100% + .4rem); left: 0; width: min(320px, calc(100vw - 3rem)); padding: 1rem; background: var(--paper); border: 1px solid var(--tan-dark); box-shadow: 0 12px 30px rgba(35, 30, 24, .18); }
.booking-calendar-heading { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.booking-calendar-heading strong { text-align: center; font-size: .72rem; }
.booking-calendar-heading button { width: 36px; height: 36px; color: var(--ink); background: white; border: 1px solid var(--line); cursor: pointer; }
.booking-calendar-heading button:disabled { color: #b8b1a7; background: var(--cream); cursor: default; }
.booking-calendar-weekdays, .booking-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
.booking-calendar-weekdays { margin-bottom: .3rem; color: var(--muted); text-align: center; font-size: .52rem; text-transform: uppercase; }
.booking-calendar-day, .booking-calendar-blank { aspect-ratio: 1; }
.booking-calendar-day { min-width: 0; padding: 0; color: var(--ink); background: white; border: 1px solid var(--line); cursor: pointer; font-size: .62rem; }
.booking-calendar-day:hover, .booking-calendar-day:focus { border-color: var(--tan-dark); box-shadow: inset 0 0 0 1px var(--tan-dark); }
.booking-calendar-day.unavailable { color: #aaa39a; background: #f1eee8; border-color: #e4dfd6; cursor: not-allowed; }
.booking-calendar-day.unavailable:hover { box-shadow: none; }
.booking-calendar-day.selected { color: white; background: var(--ink); border-color: var(--ink); font-weight: 700; }

.booking-history { margin-top: 1.25rem; }
.proposal-round { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.proposal-round-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.proposal-round-meta strong { font-size: .7rem; }
.proposal-round-meta time { color: var(--muted); font-size: .58rem; }
.proposal-slot-list { display: flex; flex-wrap: wrap; gap: .55rem; }
.proposal-slot-list > span { padding: .65rem .75rem; display: flex; align-items: center; gap: .55rem; background: var(--cream); border: 1px solid var(--line); font-size: .64rem; }
.proposal-slot-list > .agreed-slot { background: #e4efe6; border-color: #bfd3c3; }
.proposal-slot-list small { color: var(--success); font-size: .52rem; font-weight: 700; text-transform: uppercase; }
.proposal-round > p, .request-notes p { margin: .8rem 0 0; white-space: pre-wrap; color: var(--muted); font-size: .65rem; line-height: 1.65; }
.request-notes { margin-top: 1rem; padding: 1rem; background: var(--cream); border-left: 3px solid var(--tan); }
.request-notes strong { font-size: .65rem; }

.auth-shell { min-height: min(650px, calc(100vh - 190px)); display: grid; grid-template-columns: 1fr 1fr; background: var(--sand); border: 1px solid #d0bea4; }
.auth-brand { display: grid; align-content: center; justify-items: center; padding: 3rem; border-right: 1px solid #d0bea4; text-align: center; }
.auth-brand img { width: min(100%, 390px); mix-blend-mode: multiply; }
.auth-brand p { max-width: 350px; color: var(--muted); font-size: .72rem; }
.auth-card { align-self: center; width: min(100% - 3rem, 460px); margin: 3rem auto; padding: clamp(1.5rem, 4vw, 3.5rem); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(2rem, 3.4vw, 3.2rem); }
.auth-intro, .auth-card > p { color: var(--muted); font-size: .72rem; line-height: 1.6; }
.auth-help { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); text-align: center; }

.loading-state, .empty-state, .empty-inline { padding: 3rem; color: var(--muted); background: var(--paper); border: 1px solid var(--line); text-align: center; }
.empty-state { padding: clamp(3rem, 8vw, 7rem) 2rem; }
.empty-inline { padding: 2rem; font-size: .72rem; }

#blazor-error-ui { display: none; position: fixed; right: 1rem; bottom: 1rem; z-index: 1000; padding: 1rem 1.2rem; background: #fff3cd; border: 1px solid #d6b862; box-shadow: var(--shadow); font-size: .72rem; }
#blazor-error-ui .dismiss { margin-left: 1rem; cursor: pointer; }
.blazor-error-boundary { padding: 1rem; color: white; background: var(--danger); }
h1:focus { outline: none; }

@media (max-width: 900px) {
    .portal-shell { display: block; }
    .portal-sidebar { position: sticky; height: auto; }
    .mobile-brand-row { height: 65px; padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; }
    .mobile-brand { color: white; text-decoration: none; text-transform: uppercase; letter-spacing: .12em; }
    .mobile-brand span, .mobile-brand small { display: block; }
    .mobile-brand span { font-size: .8rem; }
    .mobile-brand small { color: var(--tan); font-size: .5rem; }
    .menu-button { width: 30px; display: grid; gap: 5px; cursor: pointer; }
    .menu-button span { height: 1px; background: white; }
    .nav-panel { display: none; position: absolute; top: 65px; left: 0; right: 0; height: calc(100vh - 65px); background: var(--ink); overflow-y: auto; }
    .nav-toggle:checked + .nav-panel { display: flex; }
    .brand-lockup { display: none; }
    .portal-topbar { display: none; }
    .portal-content { padding-top: 2.25rem; }
    .hero-panel { min-height: auto; grid-template-columns: 1fr; }
    .hero-mark { margin-top: 2rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .passport-spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .exposure-grid { grid-template-columns: 1fr 1fr; }
    .inspection-summary-grid { grid-template-columns: 1fr 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .response-panel { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
}

@media (max-width: 620px) {
    .breadcrumb-trail > * { display: none; }
    .breadcrumb-trail > *:nth-last-child(-n+2) { display: block; }
    .breadcrumb-trail > *:nth-last-child(2)::before,
    .breadcrumb-trail > *:only-child::before { content: none; margin: 0; }
    .page-heading, .action-card { display: block; }
    .page-heading .btn, .page-heading .text-link, .action-card .btn { display: inline-block; margin-top: 1rem; }
    .booking-action-banner { grid-template-columns: auto minmax(0, 1fr); }
    .booking-action-link { grid-column: 2; white-space: normal; }
    .form-grid { grid-template-columns: 1fr; }
    .availability-heading { display: none; }
    .availability-row { grid-template-columns: 1fr 1fr; padding: 1rem 0; }
    .availability-row .form-control { grid-column: span 1; }
    .proposal-choice { grid-template-columns: 1fr 36px; }
    .proposal-choice .field-group { grid-column: 1; }
    .proposal-remove { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; height: auto; }
    .slot-accept-button { grid-template-columns: 1fr; }
    .booking-accept-confirmation { align-items: stretch; flex-direction: column; }
    .booking-accept-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .proposal-add-button { width: 100%; justify-content: center; }
    .booking-calendar { position: static; width: 100%; margin-top: .4rem; }
    .full-field { grid-column: auto; }
    .form-actions { justify-content: stretch; }
    .form-actions .btn { flex: 1; }
    .table-tools { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .portal-footer { display: block; }
    .portal-footer span { display: block; margin-bottom: .4rem; }
    .inspection-summary-grid { grid-template-columns: 1fr; }
    .inspection-row, .issue-row, .file-row { align-items: flex-start; }
    .file-row { flex-direction: column; }
    .file-row-actions { width: 100%; justify-content: stretch; }
    .file-row-actions button { flex: 1; }
    .compact-image-gallery { flex-basis: 76px; }
    .inspection-image-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inspection-image-gallery.compact-image-gallery { grid-template-columns: 1fr; }
    .image-lightbox { padding: .5rem; }
    .image-lightbox-panel { max-height: calc(100vh - 1rem); }
    .image-lightbox-panel > img { max-height: calc(100vh - 7rem); }
    .image-lightbox-details { align-items: stretch; flex-direction: column; }
    .hero-panel { padding: 2.3rem 1.5rem; }
    .hero-panel::before { inset: 8px; }
    .passport-hero { min-height: auto; align-items: flex-start; }
    .passport-seal { width: 96px; height: 96px; }
    .passport-seal strong { font-size: 1rem; }
    .passport-actions { align-items: flex-start; flex-direction: column; }
    .passport-spec-grid, .exposure-grid { grid-template-columns: 1fr; }
    .passport-section .section-heading { flex-direction: column; }
    .priority-filter { width: 100%; }
    .passport-row { grid-template-columns: 1fr; }
    .passport-row .inspection-row-meta { flex-wrap: wrap; }
    .timeline-entry { grid-template-columns: 1fr 16px; gap: .65rem; }
    .timeline-entry > time { grid-column: 1; text-align: left; }
    .timeline-entry .timeline-marker { grid-column: 2; grid-row: 1 / span 2; }
    .timeline-content { grid-column: 1; }
    .timeline-marker::before { left: 2px; }
    .timeline-marker::after { left: 7px; }
}

.hold-note { color: #b06d1f; }

.hold-countdown {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: #6b6350;
}

.hold-countdown.hold-lapsed { color: #b06d1f; font-weight: 600; }
