:root {
  --ink: #17251f;
  --ink-soft: #43524b;
  --forest: #183e32;
  --forest-2: #275f4d;
  --moss: #8aa08d;
  --cream: #f3f0e8;
  --paper: #fbfaf6;
  --white: #fffefa;
  --line: #dcded6;
  --copper: #c86f43;
  --gold: #d7a84f;
  --red: #a54a3e;
  --shadow: 0 18px 45px rgba(24, 62, 50, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { background: var(--cream); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.login-body { background: var(--forest); }
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 8%, rgba(215,168,79,.19), transparent 31rem),
    radial-gradient(circle at 82% 90%, rgba(138,160,141,.18), transparent 34rem),
    var(--forest);
}
.login-card {
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(4,22,16,.36);
}
.login-brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--forest);
}
.login-brand-mark svg {
  width: 31px;
  fill: none;
  stroke: #efc680;
  stroke-width: 1.8;
}
.login-heading { margin: 25px 0 27px; }
.login-heading h1 {
  margin: 6px 0 8px;
  font: 500 36px/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}
.login-heading > p:last-child { margin: 0; color: var(--ink-soft); }
.login-form { display: grid; gap: 18px; }
.login-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.password-input { display: block; position: relative; }
.password-input input { padding-right: 62px; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 4px;
  min-width: 52px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  color: var(--forest-2);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}
.password-toggle:hover { background: #edf0eb; }
.login-submit { width: 100%; min-height: 44px; margin-top: 2px; }
.login-error {
  margin: -2px 0 0;
  padding: 10px 12px;
  border: 1px solid #e3b8b1;
  border-radius: 8px;
  color: #843b33;
  background: #f7e7e4;
  font-size: 11px;
  line-height: 1.45;
}
.login-error[hidden] { display: none; }
.login-security-note {
  margin: 23px 0 0;
  color: #75817b;
  font-size: 9px;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { background: var(--forest); color: #eef4ef; padding: 28px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.09); }
.brand-mark svg { width: 27px; fill: none; stroke: #efc680; stroke-width: 1.8; }
.brand strong { display: block; letter-spacing: .02em; font-family: Georgia, serif; font-size: 19px; }
.brand small { display: block; color: #aabdb3; font-size: 10px; text-transform: uppercase; letter-spacing: .16em; margin-top: 3px; }
.nav { display: grid; gap: 7px; margin-top: 30px; }
.nav a { display: flex; gap: 13px; align-items: center; padding: 12px 14px; border-radius: 10px; color: #b8c9c0; font-size: 14px; font-weight: 650; }
.nav a span { color: #e7bd77; font-size: 19px; width: 20px; text-align: center; }
.nav a:hover, .nav a.active { color: white; background: rgba(255,255,255,.09); }
.nav a.active { box-shadow: inset 3px 0 #d7a84f; }
.sidebar-context { margin-top: auto; margin-bottom: 24px; padding: 18px; border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.035)); border: 1px solid rgba(255,255,255,.09); }
.sidebar-context p:not(.eyebrow) { margin: 8px 0 18px; line-height: 1.5; color: #d9e3dc; font-family: Georgia, serif; font-size: 15px; }
.context-route { display: flex; align-items: center; gap: 7px; color: #9eb3a8; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.context-route i { flex: 1; height: 1px; background: #718e7e; position: relative; }
.context-route i::after { content: ""; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: #e2b86f; }
.sidebar-footer { padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.1); color: #94aa9e; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; display: grid; gap: 12px; }
.sidebar-footer > span { display: flex; gap: 8px; align-items: center; }
.sidebar-footer form, .sidebar-footer button { width: 100%; }
.sidebar-footer button { justify-content: flex-start; padding: 7px 0; border: 0; color: #c7d5cd; background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-footer button:hover { color: white; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #75bd8d; box-shadow: 0 0 0 4px rgba(117,189,141,.12); }

.main-column { min-width: 0; }
.topbar { height: 86px; padding: 0 clamp(24px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; background: rgba(251,250,246,.84); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; }
.topbar p { margin: 0; }
.topbar-title { font-family: Georgia, serif; font-size: 14px; color: var(--ink-soft); margin-top: 3px !important; }
.topbar-actions { display: flex; gap: 18px; align-items: center; }
.quiet-link { font-size: 13px; color: var(--ink-soft); font-weight: 650; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }

.page { max-width: 1500px; padding: 44px clamp(24px, 4vw, 58px) 72px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-bottom: 32px; }
.page-heading h1, .detail-hero h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 4vw, 58px); font-weight: 500; letter-spacing: -.035em; margin: 4px 0 10px; }
.compact-heading h1 { font-size: clamp(34px, 3.4vw, 48px); }
.lede { color: var(--ink-soft); font-size: 16px; max-width: 670px; line-height: 1.6; margin: 0; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 800; color: var(--copper); }
.sidebar .eyebrow { color: #e0b875; }
.date-card { width: 150px; padding: 18px 20px; color: white; border-radius: 16px; background: var(--forest); box-shadow: var(--shadow); }
.date-card span, .date-card small { display: block; color: #b8c9c0; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.date-card strong { display: block; font: 500 34px Georgia, serif; margin: 6px 0; color: #f4d99d; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { background: var(--white); border: 1px solid var(--line); border-radius: 15px; padding: 21px 22px; min-height: 126px; position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -22px; bottom: -38px; width: 95px; height: 95px; border: 1px solid rgba(39,95,77,.12); border-radius: 50%; box-shadow: 0 0 0 13px rgba(39,95,77,.025), 0 0 0 25px rgba(39,95,77,.02); }
.metric-card strong { display: block; font: 500 35px Georgia, serif; margin: 10px 0 7px; }
.metric-card strong em { font: 500 13px Inter, sans-serif; color: var(--ink-soft); }
.metric-card small { color: #718078; font-size: 11px; }
.metric-kicker { color: var(--ink-soft); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.accent-card { background: var(--forest); color: white; border-color: var(--forest); }
.accent-card .metric-kicker, .accent-card small { color: #b8c9c0; }
.accent-card strong { color: #f5d69a; }
.warning-card strong { color: var(--red); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .8fr); gap: 18px; margin-bottom: 18px; }
.lower-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 18px rgba(24,62,50,.035); padding: 25px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 19px; }
.section-head h2, .panel > h2 { font: 500 23px Georgia, serif; margin: 4px 0 0; }
.section-head > a, .text-link { color: var(--forest-2); font-size: 12px; font-weight: 750; }

.property-stack { display: grid; }
.property-row { display: grid; grid-template-columns: 48px minmax(160px, 1fr) 150px 90px 16px; gap: 15px; align-items: center; padding: 13px 5px; border-top: 1px solid #e7e8e2; }
.property-row:first-child { border-top: 0; }
.property-row:hover .property-main strong { color: var(--copper); }
.property-monogram { width: 46px; height: 46px; border-radius: 12px; background: #e9eee9; color: var(--forest); display: grid; place-items: center; font: 600 16px Georgia, serif; }
.property-main strong, .property-main span { display: block; }
.property-main strong { font: 600 15px Georgia, serif; }
.property-main span { margin-top: 5px; color: #77837d; font-size: 10px; }
.property-facts { display: flex; gap: 16px; color: var(--ink-soft); font-size: 12px; }
.score-chip { display: flex; flex-direction: column; align-items: center; border-left: 1px solid var(--line); }
.score-chip strong { font: 500 23px Georgia, serif; color: var(--forest-2); }
.score-chip small { font-size: 8px; text-transform: uppercase; color: #7e8983; letter-spacing: .07em; }
.score-chip.unscored strong { color: #a9afa9; }
.row-arrow { color: #95a19a; font-size: 24px; }

.rubric-list { display: grid; gap: 11px; }
.rubric-row { display: grid; grid-template-columns: 110px 1fr 22px; align-items: center; gap: 9px; font-size: 10px; color: var(--ink-soft); }
.rubric-track { height: 5px; background: #e8ebe6; border-radius: 99px; overflow: hidden; }
.rubric-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--forest-2), var(--gold)); }
.rubric-row strong { text-align: right; color: var(--ink); }
.thesis-panel blockquote { margin: 23px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); font: italic 16px/1.45 Georgia, serif; color: var(--forest); }
.tour-route { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); align-items: stretch; }
.tour-route > div { padding: 0 14px; border-left: 1px solid var(--line); }
.tour-route > div:first-child { padding-left: 0; border-left: 0; }
.tour-route > div span, .tour-route > div strong, .tour-route > div small { display: block; }
.tour-route > div span { color: var(--copper); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; font-weight: 800; }
.tour-route > div strong { margin: 7px 0 5px; font: 500 17px Georgia, serif; }
.tour-route > div small { color: #78847e; font-size: 10px; }
.tour-route strong a { color: inherit; text-decoration: none; }
.tour-route strong a:hover { text-decoration: underline; }
.tour-route small a { color: var(--accent); font-weight: 700; }
.communications-panel { margin-top: 1.35rem; }
.communication-list { display: grid; gap: .65rem; }
.communication-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: center;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}
.communication-list article:last-child { border-bottom: 0; }
.communication-list article div { display: grid; gap: .18rem; min-width: 0; }
.communication-list article strong { overflow-wrap: anywhere; }
.communication-list article small { color: var(--muted); }
.communication-list article a { white-space: nowrap; }
.risk-panel { background: #f1e9dc; border-color: #eadbc8; }
.risk-panel > p { color: #594e42; font: 16px/1.55 Georgia, serif; }

.status-pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 5px 9px; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); background: #dfe9e1; }
.status-pill.planned, .status-pill.visit { color: #79501a; background: #f3e1b8; }
.status-pill.reject { color: #8b3f37; background: #f4d8d4; }
.status-pill.strong_candidate { color: #fff; background: var(--forest-2); }
.status-pill.hold, .status-pill.neutral { color: #5d625e; background: #e8e8e3; }

.filter-bar { display: grid; grid-template-columns: minmax(240px, 1fr) 170px 180px auto auto; gap: 10px; margin: 28px 0 14px; padding: 12px; border: 1px solid var(--line); background: var(--white); border-radius: 14px; }
.search-field { position: relative; }
.search-field span { position: absolute; left: 13px; top: 9px; color: #78857e; font-size: 18px; }
.search-field input { padding-left: 38px; }
input, select, textarea { width: 100%; border: 1px solid #d6d9d2; border-radius: 9px; background: #fdfcf8; color: var(--ink); padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(39,95,77,.09); }
textarea { resize: vertical; }
.button { border: 1px solid transparent; border-radius: 9px; min-height: 40px; padding: 0 15px; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.button-primary { background: var(--forest); color: white; box-shadow: 0 7px 16px rgba(24,62,50,.14); }
.button-primary:hover { background: #22523f; }
.button-secondary { border-color: #cfd5ce; background: var(--white); color: var(--forest); }
.button-ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.button-wide { width: 100%; }
.button:disabled { opacity: .45; cursor: default; }
.compare-selection span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: #e5e9e4; }
.register-head { display: flex; justify-content: space-between; color: #77847d; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; margin: 19px 2px 12px; }
.property-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 6px 20px rgba(24,62,50,.04); }
.property-table { width: 100%; min-width: 1050px; border-collapse: collapse; }
.property-table th { padding: 11px 13px; color: #748079; background: #f4f3ed; border-bottom: 1px solid var(--line); font-size: 8px; font-weight: 850; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.property-table td { padding: 13px; border-top: 1px solid #e7e8e2; color: var(--ink-soft); font-size: 11px; vertical-align: middle; }
.property-table tbody tr:first-child td { border-top: 0; }
.property-table tbody tr:hover td { background: #faf9f4; }
.property-table .select-column { width: 42px; padding-left: 15px; padding-right: 6px; }
.property-table .numeric-column { text-align: right; white-space: nowrap; }
.property-table .property-name-cell { min-width: 225px; }
.property-name-cell a { color: inherit; text-decoration: none; }
.property-name-cell strong, .property-name-cell small { display: block; }
.property-name-cell strong { color: var(--ink); font: 600 15px Georgia, serif; }
.property-name-cell small { margin-top: 4px; color: #7c8881; font-size: 9px; }
.register-compare { display: inline-grid; cursor: pointer; }
.register-compare input { position: absolute; opacity: 0; pointer-events: none; }
.register-compare span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #cbd0ca; border-radius: 6px; background: #fff; }
.register-compare input:focus-visible + span { outline: 2px solid var(--forest-2); outline-offset: 2px; }
.register-compare input:checked + span { border-color: var(--forest-2); background: #e1ebe5; }
.register-compare input:checked + span::after { content: "✓"; color: var(--forest); font-weight: 900; }
.status-column { min-width: 135px; }
.status-column small { display: block; max-width: 170px; margin-top: 5px; color: #858f89; line-height: 1.3; }
.property-table .score-column { width: 72px; text-align: center; }
.score-column strong, .score-column small { display: block; }
.score-column strong { color: var(--forest); font: 600 18px Georgia, serif; }
.score-column strong.unscored { color: #a1aaa4; }
.score-column small { margin-top: 2px; color: #89938d; font-size: 8px; }
.property-table .action-column { width: 92px; text-align: right; }
.action-column a { display: block; color: var(--accent); font-size: 9px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.action-column a + a { margin-top: 6px; }
.action-column a:hover, .property-name-cell a:hover strong { text-decoration: underline; }

.breadcrumb { display: flex; gap: 8px; color: #75827b; font-size: 11px; margin-bottom: 24px; }
.breadcrumb a { color: var(--forest-2); font-weight: 700; }
.detail-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.detail-hero h1 { font-size: clamp(38px, 4vw, 54px); margin-bottom: 5px; }
.detail-hero p { margin: 0; color: var(--ink-soft); }
.detail-badges { display: flex; gap: 7px; }
.hero-score { display: grid; grid-template-columns: auto auto; column-gap: 9px; align-items: end; min-width: 120px; }
.hero-score strong { grid-row: 1 / 3; font: 500 53px Georgia, serif; color: var(--forest-2); line-height: .9; }
.hero-score span { font-size: 10px; font-weight: 800; }
.hero-score small { color: #7e8983; font-size: 9px; }
.hero-score.unscored strong { color: #aeb5af; }
.detail-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; }
.detail-facts > div { padding: 17px 20px; border-left: 1px solid var(--line); }
.detail-facts > div:first-child { border-left: 0; }
.detail-facts span, .detail-facts strong, .detail-facts small { display: block; }
.detail-facts span { color: #7b8880; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; }
.detail-facts strong { font: 500 20px Georgia, serif; margin: 6px 0 2px; }
.detail-facts small { color: #909991; font-size: 9px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .65fr); gap: 18px; }
.detail-primary, .detail-secondary { display: grid; gap: 18px; align-content: start; }
.land-test { background: var(--forest); color: white; }
.land-test > div { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.land-test h2 { font-size: 25px; max-width: 500px; }
.land-test p:last-child { color: #bbcbc1; line-height: 1.55; font-size: 12px; margin-bottom: 0; }
.land-answer { text-transform: capitalize; color: #f1cc87; font: 500 22px Georgia, serif; }
.score-bars { display: grid; gap: 10px; }
.score-bar-row { display: grid; grid-template-columns: 125px minmax(100px, 1fr) 28px 32px; gap: 10px; align-items: center; font-size: 10px; }
.score-bar-row > div { height: 7px; background: #e9ebe6; border-radius: 99px; overflow: hidden; }
.score-bar-row i, .mini-score i { height: 100%; display: block; background: linear-gradient(90deg, var(--forest-2), var(--gold)); border-radius: 99px; }
.bar-width-0 { width: 0%; }
.bar-width-5 { width: 5%; }
.bar-width-10 { width: 10%; }
.bar-width-15 { width: 15%; }
.bar-width-20 { width: 20%; }
.bar-width-25 { width: 25%; }
.bar-width-30 { width: 30%; }
.bar-width-35 { width: 35%; }
.bar-width-40 { width: 40%; }
.bar-width-45 { width: 45%; }
.bar-width-50 { width: 50%; }
.bar-width-55 { width: 55%; }
.bar-width-60 { width: 60%; }
.bar-width-65 { width: 65%; }
.bar-width-70 { width: 70%; }
.bar-width-75 { width: 75%; }
.bar-width-80 { width: 80%; }
.bar-width-85 { width: 85%; }
.bar-width-90 { width: 90%; }
.bar-width-95 { width: 95%; }
.bar-width-100 { width: 100%; }
.score-bar-row small { color: #87928b; }
.evaluation-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 9px; color: #7c8881; text-transform: uppercase; letter-spacing: .07em; }
.issue-list { display: grid; }
.issue-list article { display: grid; grid-template-columns: 63px 1fr auto; gap: 13px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.issue-list article:first-child { border-top: 0; }
.issue-list h3 { font-size: 12px; margin: 0 0 5px; }
.issue-list p { margin: 0; color: #7c8881; font-size: 9px; text-transform: capitalize; }
.issue-priority { border-radius: 5px; padding: 4px 5px; text-align: center; font-size: 7px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; background: #e8e9e4; }
.issue-priority.critical { color: #8f3a32; background: #f2d7d2; }
.issue-priority.material { color: #73501f; background: #f3e3bf; }
.issue-status { color: #7f8983; text-transform: uppercase; font-size: 8px; }
.fact-list { margin: 17px 0 0; }
.fact-list div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.fact-list dt { color: #7c8881; font-size: 10px; }
.fact-list dd { margin: 0; font-size: 10px; text-align: right; }
.source-list { display: grid; margin-top: 15px; }
.source-list > div { display: grid; gap: 4px; padding: 13px 0; border-top: 1px solid var(--line); }
.source-list span { color: var(--copper); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.source-list strong { font-size: 11px; }
.source-list small { color: #7e8983; font-size: 9px; }
.source-list code { color: #8d9690; font-size: 8px; }

.comparison-picker { padding: 15px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 19px; }
.comparison-picker > div { display: flex; flex-wrap: wrap; gap: 8px; }
.comparison-picker label input { position: absolute; opacity: 0; }
.comparison-picker label span { display: block; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; cursor: pointer; }
.comparison-picker label span small { display: block; color: #839088; margin-top: 3px; }
.comparison-picker input:checked + span { color: white; background: var(--forest); border-color: var(--forest); }
.comparison-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.comparison-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 11px; }
.comparison-table th, .comparison-table td { min-width: 170px; padding: 15px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); text-align: left; }
.comparison-table th:first-child, .comparison-table td:first-child { border-left: 0; min-width: 180px; }
.comparison-table thead th { border-top: 0; background: #f5f3ec; vertical-align: bottom; }
.comparison-table thead a { display: block; font: 600 16px Georgia, serif; }
.comparison-table thead small, .comparison-table td small, .comparison-table tbody th small { display: block; color: #7f8a83; font-size: 8px; margin-top: 4px; }
.comparison-table tbody th { color: #647169; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.comparison-highlight td strong { font: 500 30px Georgia, serif; color: var(--forest-2); }
.mini-score { width: 75px; height: 5px; border-radius: 99px; overflow: hidden; background: #e8ebe6; display: inline-block; margin-right: 7px; }

.dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 40px); overflow: auto; border: 0; border-radius: 19px; padding: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 90px rgba(11,28,22,.35); }
.wide-dialog { width: min(800px, calc(100vw - 28px)); }
.dialog::backdrop { background: rgba(14,31,25,.58); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.dialog-head h2 { margin: 4px 0 0; font: 500 28px Georgia, serif; }
.icon-button { border: 0; background: transparent; font-size: 25px; color: #69766f; }
.muted { color: #77837d; font-size: 11px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.form-grid label, .score-form-grid label { display: grid; gap: 6px; color: #526159; font-size: 10px; font-weight: 750; }
.span-2 { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.score-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.score-form-grid label { padding: 10px; background: #eeeee8; border-radius: 9px; }
.score-form-grid label span { display: flex; justify-content: space-between; }
.score-form-grid label small { color: #8a948e; font-size: 8px; }
.score-form-grid input { background: var(--white); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: 360px; padding: 13px 16px; border-radius: 10px; color: white; background: var(--forest); box-shadow: var(--shadow); font-size: 11px; transform: translateY(90px); opacity: 0; transition: .25s; }
.toast.show { transform: none; opacity: 1; }
.toast.error { background: var(--red); }
.empty-state { text-align: center; padding: 35px 20px; color: #7b8880; }
.empty-state > span { font-size: 28px; color: var(--moss); }
.empty-state h3 { color: var(--ink); font: 500 19px Georgia, serif; margin: 7px 0; }
.empty-state p { font-size: 11px; }
.empty-state.large { padding: 70px 20px; border: 1px dashed #cbd0ca; border-radius: var(--radius); }
.empty-state.compact { padding: 15px; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-left: 15px; padding-right: 15px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr 150px 160px auto; }
  .compare-selection { grid-column: 1 / -1; }
  .property-row { grid-template-columns: 45px 1fr 80px 16px; }
  .property-facts { display: none; }
}

@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -260px; width: 240px; transition: left .2s; box-shadow: 15px 0 40px rgba(0,0,0,.2); }
  body.menu-open .sidebar { left: 0; }
  .mobile-menu { display: block; }
  .topbar { height: 75px; padding: 0 18px; gap: 12px; }
  .topbar > div:nth-child(2) { flex: 1; }
  .topbar-title, .quiet-link { display: none; }
  .topbar-actions .button { padding: 0 10px; }
  .page { padding: 30px 18px 55px; }
  .dashboard-grid, .lower-grid, .detail-layout { grid-template-columns: 1fr; }
  .detail-facts { grid-template-columns: repeat(2, 1fr); }
  .detail-facts > div { border-top: 1px solid var(--line); }
  .detail-facts > div:nth-child(odd) { border-left: 0; }
  .detail-facts > div:first-child, .detail-facts > div:nth-child(2) { border-top: 0; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field, .compare-selection { grid-column: 1 / -1; }
  .comparison-picker { align-items: stretch; flex-direction: column; }
  .score-form-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .topbar .eyebrow { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { padding: 16px; min-height: 112px; }
  .metric-card strong { font-size: 28px; }
  .dashboard-heading .date-card { display: none; }
  .property-row { grid-template-columns: 42px 1fr 65px; }
  .row-arrow { display: none; }
  .tour-route { grid-template-columns: 1fr; gap: 17px; }
  .tour-route > div { padding: 0; border-left: 0; }
  .form-grid, .score-form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .detail-hero { align-items: flex-start; }
  .hero-score { min-width: 80px; }
  .hero-score strong { font-size: 39px; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .score-bar-row { grid-template-columns: 100px 1fr 25px; }
  .score-bar-row small { display: none; }
  .issue-list article { grid-template-columns: 58px 1fr; }
  .issue-status { display: none; }
}
.listing-gallery-panel { overflow: hidden; }
.capture-complete, .fact-count { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.listing-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.listing-gallery a, .floor-plan-strip a { color: inherit; text-decoration: none; min-width: 0; }
.listing-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .65rem; background: var(--surface-2); }
.listing-gallery span, .floor-plan-strip span { display: block; padding-top: .3rem; color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-more { margin-top: 1rem; }
.gallery-more summary, .fact-register summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.all-photos { margin-top: 1rem; }
.floor-plan-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.floor-plan-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: .65rem; background: #fff; }
.fact-register dl { margin: 1rem 0 0; }
.fact-register dl div { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.5fr); gap: 1rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.fact-register dt { color: var(--muted); text-transform: capitalize; }
.fact-register dd { margin: 0; overflow-wrap: anywhere; }
.fact-register small { color: var(--muted); }
.source-list a { display: inline-block; margin-top: .35rem; color: var(--accent); font-size: .78rem; font-weight: 700; }
.detail-actions { display: flex; justify-content: flex-end; margin: -1rem 0 1.25rem; }

@media (max-width: 760px) {
  .listing-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floor-plan-strip { grid-template-columns: 1fr; }
  .fact-register dl div { grid-template-columns: 1fr; gap: .2rem; }
}
