:root {
    --ink: #14283b;
    --muted: #4a5c68;
    --accent: #0d6657;
    --mist: #edf6f1;
    --canvas: #f7f6f1;
    --line: #d6e1de;
    --paper: #fff;
    --danger: #a72930;
    color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; font: 15px/1.55 Inter, "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--canvas); }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .22em; }
a:hover { color: #08473d; }
button, input, select, textarea { font: inherit; }
button, a.button { cursor: pointer; }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #b7cac4; border-radius: 7px; color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #4a9e89; outline-offset: 2px; }
input[type=checkbox] { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
label { display: grid; gap: 5px; font-weight: 630; }
label small { font-weight: 400; color: var(--muted); }
label + label, label + .button { margin-top: 12px; }
h1, h2, h3, p { margin: 0 0 .6em; }
h1 { font-size: clamp(29px, 4.2vw, 50px); line-height: 1.06; letter-spacing: -.055em; overflow-wrap: anywhere; }
h2 { font-size: clamp(19px, 2.4vw, 25px); letter-spacing: -.025em; line-height: 1.22; }
h3 { font-size: 18px; letter-spacing: -.02em; line-height: 1.25; }
p:last-child { margin-bottom: 0; }
.shell { width: min(1216px, calc(100% - 40px)); margin-inline: auto; }
.topbar { background: #102c39; color: #fff; }
.topbar .shell { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar a, .topbar .link-button { color: #fff; }
.topbar nav { display: flex; align-items: center; gap: 20px; }
.brand { font-size: 19px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.brand::before { content: ""; display: inline-block; width: 9px; height: 14px; margin-right: 8px; border-radius: 1px; background: #69c4a9; vertical-align: -1px; }
main { min-height: calc(100vh - 125px); padding: 34px 0 52px; }
.site-footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; border-top: 1px solid var(--line); padding: 14px 0 26px; color: var(--muted); }
.site-footer nav { display: flex; gap: 14px; }
.muted { color: var(--muted); }
.caption { font-size: 13px; margin: 7px 0; }
.eyebrow { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .11em; font-weight: 750; overflow-wrap: anywhere; }
.hero { padding: 22px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 25px; }
.heading-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px; margin-bottom: 14px; }
.heading-row h1, .heading-row h2, .heading-row p { margin-bottom: 6px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #b6cdc2; background: #fff; color: var(--accent); border-radius: 7px; text-decoration: none; padding: 9px 14px; font-weight: 700; }
.button:hover { background: var(--mist); }
.button.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.button.primary:hover { background: #0a5246; }
.link-button { border: 0; background: transparent; color: var(--accent); text-decoration: underline; padding: 1px 0; text-underline-offset: .22em; }
.button.danger, .link-button.danger { color: var(--danger); }
.panel { padding: clamp(15px, 2.2vw, 25px); border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 0 0 18px; }
.narrow { max-width: 620px; }
.login-panel { max-width: 450px; margin: 35px auto; padding: 27px; }
.feedback { margin-bottom: 14px; }
.alert { padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: white; overflow-wrap: anywhere; }
.alert.ok { background: #edf8f1; color: #114e3b; }
.alert.error { background: #fceef0; border-color: #e5afba; color: #842532; }
.back { display: inline-block; margin: 0 0 13px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 16px; }
.form-grid label { margin: 0; align-content: start; }
.form-grid .full { grid-column: 1 / -1; }
fieldset { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 14px; min-width: 0; }
legend { font-weight: 780; padding-inline: 5px; }
fieldset .muted { margin-top: 10px; }
.form-grid + .button { margin-top: 16px; }
.check { display: flex; align-items: center; gap: 9px; }
.field-value { min-height: 45px; padding: 10px 0; overflow-wrap: anywhere; }
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; white-space: normal; }
td, th { padding: 10px; border-bottom: 1px solid var(--line); }
thead th { color: var(--accent); background: var(--mist); }
.office-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.office-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: #fff; border-radius: 12px; }
.office-card .cover { width: 100%; height: 150px; display: block; object-fit: cover; }
.office-content { padding: 15px; overflow-wrap: anywhere; }
.office-content h3 { margin-bottom: 4px; }
.office-content h3 a { color: var(--ink); }
.office-content .muted { font-size: 14px; }
.card-facts { margin: 10px 0; padding: 10px 0; border-block: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.card-facts div { min-width: 0; }
.card-facts dt { color: var(--muted); font-size: 12px; }
.card-facts dd { margin: 1px 0 0; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card-links { display: flex; flex-wrap: wrap; gap: 11px; font-weight: 650; font-size: 13px; }
#plan-visit { margin-top: 25px; scroll-margin-top: 12px; }
.route-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 20px; }
.route-grid form > .actions { margin: 7px 0; }
.small-actions { font-size: 13px; gap: 15px; }
.visit-option { margin-top: 8px; font-weight: 520; }
.route-grid .check + button { margin: 12px 0 0; }
.map, .map-alternative { border: 1px solid var(--line); border-radius: 9px; background: var(--mist); }
.map { height: 350px; }
.map:empty { padding: 0; }
.map-alternative { padding: 14px; }
.map-alternative ul { padding-left: 20px; }
.map-error { height: auto; padding: 12px; }
.route-result { margin-top: 12px; }
.route-order { padding-left: 23px; }

.gallery,.spec-grid,.proposal-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.proposal-list .all-shortlists { grid-column: 1 / -1; background: var(--mist); }
.all-property-details > summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.all-property-details[open] > summary { margin-bottom: 14px; }
.gallery img, .gallery video { width: 100%; max-height: 370px; object-fit: contain; border-radius: 8px; background: #102c39; }
.gallery figure { margin: 0; overflow-wrap: anywhere; }
.cost-facts { grid-template-columns: repeat(4,minmax(0,1fr)); }
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 0; gap: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 630; }
.attachment-list { padding: 0; list-style: none; }
.attachment-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.attachment-list img { width: 55px; height: 42px; object-fit: cover; border-radius: 5px; }
@media (max-width: 920px) { .office-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 660px) {
    .shell { width: calc(100% - 26px); }
    main { padding-top: 21px; }
    .topbar nav { gap: 11px; font-size: 13px; }
    .office-grid, .route-grid, .form-grid, .gallery, .spec-grid, .proposal-list { grid-template-columns: minmax(0,1fr); }
    .cost-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .heading-row { gap: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Staff attachment gallery */
.gallery-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 28px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}
.gallery-heading h3 { margin-bottom: 0; }
.saved-media {
    list-style: none;
    padding: 0;
    margin: 14px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
}
.saved-media li {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.saved-media .media-preview { display: block; width: 100%; height: 168px; background: var(--mist); object-fit: contain; }
.saved-media .media-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.saved-media .media-card-info { padding: 0 12px 12px; margin-top: auto; overflow-wrap: anywhere; }
.saved-media .media-card-info .actions { margin-top: 6px; }
.saved-media .alert { margin: 10px 10px 0; }
.form-upload-check { margin: 6px 0 0; }

.inventory-selection,
.inventory-pagination,
.inventory-submit { margin-top: 16px; }
.inventory-selection summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.inventory-selected-list { margin: 8px 0 10px; padding-left: 20px; }
.inventory-selected-list li { padding: 4px 0; overflow-wrap: anywhere; }
.inventory-selected-list .link-button { margin-left: 12px; white-space: nowrap; }
.inventory-selection + .table-wrap { margin-top: 14px; }

.pdf-selection-heading { align-items: flex-end; }
.pdf-selection-heading [hidden] { display: none; }
.pdf-selection-heading .button:disabled { opacity: .58; cursor: default; }
.pdf-option-check {
    width: fit-content;
    margin-top: 13px;
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
}

.form-section { margin-top: 16px; }
.topbar nav { flex-wrap: wrap; row-gap: 6px; }
.topbar .shell { padding-block: 10px; }
[data-listing-fields][hidden], [data-listing-form] label[hidden] { display: none; }
[data-specialization-editor] [hidden] { display: none; }
[data-location-matches] [hidden], .location-pin-dialog [hidden] { display: none; }
.location-pin-dialog { width: min(700px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: clamp(16px, 4vw, 28px); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); }
.location-pin-dialog::backdrop { background: rgba(16, 44, 57, .64); }

.call-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.call-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 12px 16px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; }
.call-total.current { background: var(--mist); border-color: var(--accent); }
.call-total strong { color: var(--ink); font-size: 25px; line-height: 1; }
.call-total span { font-weight: 600; }
.call-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.call-history { padding: 0; margin: 0; list-style: none; }
.call-history li + li { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
[data-call-for][hidden] { display: none; }
@media (max-width: 600px) {
    .call-totals { grid-template-columns: 1fr; gap: 8px; }
}
