﻿:root {
  color-scheme: light;
  --ink: #16212f;
  --muted: #5d6b7d;
  --soft: #8792a3;
  --line: #d8e1eb;
  --paper: #ffffff;
  --panel: #f3f6fa;
  --panel-strong: #e9eff6;
  --subject: #b42318;
  --comp: #147a24;
  --brand: #165d55;
  --brand-dark: #0d463f;
  --brand-soft: #e5f2ef;
  --accent: #165d55;
  --accent-dark: #0d463f;
  --focus: #bd9451;
  --gold-soft: #f6efe1;
  --canvas: #eaf5f0;
  --sidebar-dark: #d9efe7;
  --sidebar-deep: #cfe8df;
  --report-panel: #edf7f2;
  --shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
  --shadow-strong: 0 18px 42px rgba(16, 24, 40, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, #d9efe7 0 30%, var(--canvas) 30% 72%, var(--report-panel) 72% 100%),
    var(--canvas);
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
}

button,
a.home-action-link,
input,
select {
  font: inherit;
}

button,
input,
select,
.paste-zone {
  outline-color: var(--focus);
}

.shell {
  min-height: 100vh;
}

.app-top-nav {
  position: sticky;
  top: 0;
  z-index: 620;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(96, 117, 125, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 249, 0.92)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(16, 47, 53, 0.08);
  backdrop-filter: blur(12px);
}

.app-nav-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  min-height: 54px;
  min-width: 106px;
  padding: 6px 16px 6px 10px;
  border-right: 1px solid rgba(96, 117, 125, 0.16);
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.app-nav-brand img {
  width: 86px;
  height: 40px;
  object-fit: contain;
}

.app-nav-button {
  min-height: 54px;
  padding: 13px 18px;
  border: 1px solid rgba(96, 117, 125, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbfb);
  color: #536973;
  font-size: 14px;
  font-weight: 900;
  box-shadow:
    0 7px 14px rgba(16, 24, 40, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.app-nav-button .button-icon {
  width: 22px;
  height: 22px;
  color: #6d858b;
}

.app-nav-button .button-icon svg {
  stroke-width: 2.35;
}

.app-nav-button:hover {
  border-color: rgba(22, 93, 85, 0.24);
  background:
    linear-gradient(180deg, #ffffff, #f3faf8);
  color: var(--brand-dark);
  box-shadow:
    0 10px 20px rgba(16, 47, 53, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.app-nav-button.active {
  border-color: rgba(11, 108, 98, 0.78);
  background:
    linear-gradient(180deg, #10998d 0%, #08796f 100%);
  color: #ffffff;
  box-shadow:
    0 12px 24px rgba(7, 121, 111, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.app-nav-button.active .button-icon {
  color: #ffffff;
}

.app-nav-button.active:hover {
  background:
    linear-gradient(180deg, #10a398 0%, #087c73 100%);
  color: #ffffff;
}
.app-logout-button {
  margin-left: auto;
  border-color: rgba(180, 35, 24, 0.22);
  background: linear-gradient(180deg, #ffffff, #fff7f6);
  color: #a7372f;
}

.app-logout-button .button-icon {
  color: #b4433a;
}

.app-logout-button:hover {
  border-color: rgba(180, 35, 24, 0.34);
  background: linear-gradient(180deg, #ffffff, #fff1ef);
  color: #8f2c25;
}

body.home-active {
  overflow: hidden;
}

body.home-active .shell {
  display: none;
}

.home-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(20px, 3vw, 42px);
  background: #f6fbff;
  color: #0b1f3a;
}

.home-screen[hidden] {
  display: none;
}

.home-hero-photo,
.home-hero-shade {
  position: absolute;
  inset: 0;
}

.home-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  filter: saturate(1.02) contrast(1.01);
}

.home-hero-shade {
  background:
    linear-gradient(90deg, rgba(248, 252, 255, 0.98) 0%, rgba(248, 252, 255, 0.94) 27%, rgba(248, 252, 255, 0.55) 48%, rgba(248, 252, 255, 0.08) 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 18% 82%, rgba(15, 159, 154, 0.14), transparent 34%);
}

.home-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 30px);
  width: 100%;
  max-width: 1260px;
  min-height: calc(100vh - clamp(40px, 6vw, 84px));
  margin: 0 auto;
}

.home-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.home-brand {
  display: grid;
  align-content: center;
  justify-self: start;
  gap: 22px;
  max-width: 610px;
  padding: clamp(22px, 7vh, 72px) 0 clamp(34px, 10vh, 108px);
  text-shadow: none;
}

.home-kicker {
  margin: 0 0 8px;
  color: #0f9f9a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-brand h1 {
  margin: 0;
  color: #061b3a;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: 0;
}

.home-copy {
  max-width: 560px;
  margin: 16px 0 0;
  color: #475569;
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 700;
  line-height: 1.4;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-primary,
.home-secondary {
  min-height: 48px;
  padding: 12px 17px;
  font-weight: 900;
}

.home-primary {
  border-color: rgba(15, 159, 154, 0.18);
  background: linear-gradient(135deg, #0f9f9a, #0d665f);
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(15, 159, 154, 0.22);
}

.home-primary:hover {
  border-color: rgba(15, 159, 154, 0.28);
  background: linear-gradient(135deg, #13ada7, #0f756d);
}

.home-secondary {
  border-color: rgba(11, 31, 58, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.home-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.home-highlights span {
  padding: 8px 11px;
  border: 1px solid rgba(15, 159, 154, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #0b1f3a;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.home-feature-strip {
  display: grid;
  grid-template-columns: minmax(280px, 1.28fr) minmax(220px, 0.86fr) minmax(220px, 0.86fr);
  gap: 14px;
  align-items: stretch;
}

.home-feature-card {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 24px 60px rgba(2, 18, 25, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.home-feature-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.98) contrast(1.02);
}

.home-feature-wide img {
  object-position: center;
}

.home-feature-card::after {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  content: "";
  background: linear-gradient(180deg, rgba(4, 22, 29, 0), rgba(4, 22, 29, 0.72));
  pointer-events: none;
}

.home-feature-card div {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
  z-index: 1;
  display: grid;
  gap: 4px;
}

.home-feature-card span {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(16, 151, 139, 0.86);
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.home-feature-card strong {
  max-width: 420px;
  color: #ffffff;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.28;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.38);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 372px) minmax(0, 1fr);
  min-height: calc(100vh - 58px);
  transition: grid-template-columns 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.market-trend-screen {
  min-height: calc(100vh - 58px);
  padding: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(20, 184, 166, 0.09), transparent 34%),
    linear-gradient(180deg, #f4fbf8 0%, #eef7f3 100%);
}

.trend-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto 18px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.trend-header h2 {
  margin: 0;
  color: #102a43;
  font-size: 34px;
  line-height: 1.1;
}

.trend-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.trend-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(520px, 1.08fr);
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
}

.trend-card {
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  padding: 20px;
}

.trend-card h3 {
  margin: 0 0 12px;
  color: #102a43;
  font-size: 18px;
}

.trend-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.trend-summary-head h3 {
  margin: 0;
}

.trend-summary-city {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(233, 249, 245, 0.86);
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.trend-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.trend-card-head h3 {
  margin: 0;
}

.trend-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trend-data-note {
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(189, 148, 81, 0.3);
  border-radius: 12px;
  background: rgba(255, 248, 235, 0.86);
  color: #6e562c;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.42;
}

.trend-featured-metric {
  margin-top: 14px;
}

.trend-featured-metric .trend-metric.featured {
  grid-column: auto;
  min-height: 132px;
}

.trend-featured-metric .trend-metric.featured em {
  margin-top: 8px;
  color: #334155;
  font-size: 15px;
  font-weight: 900;
}

.trend-hpi-helper,
.time-hpi-helper,
.time-hpi-period-note {
  padding: 10px 11px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 10px;
  background: rgba(244, 250, 247, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.trend-hpi-helper {
  margin: 0 0 12px;
}

.time-hpi-helper {
  max-width: 1560px;
  margin: 0 auto 10px;
}

.time-data-import-panel {
  max-width: 1560px;
  margin: 0 auto 10px;
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(260px, 0.9fr);
  gap: 10px;
}

.time-screenshot-paste-zone,
.time-shared-data-actions {
  border: 1px dashed rgba(16, 119, 107, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 55, 50, 0.06);
}

.time-screenshot-paste-zone {
  min-height: 86px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  cursor: text;
}

.time-screenshot-paste-zone:focus {
  outline: 3px solid rgba(16, 119, 107, 0.18);
  border-color: rgba(16, 119, 107, 0.62);
}

.time-screenshot-paste-zone strong,
.time-screenshot-paste-zone span,
.time-shared-data-actions p {
  display: block;
}

.time-screenshot-paste-zone strong {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.time-screenshot-paste-zone span,
.time-shared-data-actions p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.time-screenshot-paste-zone img {
  max-width: 220px;
  max-height: 92px;
  border-radius: 8px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  object-fit: contain;
  background: #fff;
}

.time-shared-data-actions {
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.time-shared-data-actions p {
  flex: 1 1 260px;
  margin: 0;
}

.time-shared-data-actions p.is-error {
  color: #b42318;
}

.time-hpi-period-note {
  margin: 10px 0 0;
  color: #6e562c;
  background: rgba(246, 239, 225, 0.74);
  border-color: rgba(189, 148, 81, 0.3);
}

.trend-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trend-metric {
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 247, 0.94));
}

.trend-metric.featured {
  grid-column: span 2;
  min-height: 132px;
  padding: 18px 20px;
  border-color: rgba(15, 118, 110, 0.34);
  background: linear-gradient(135deg, rgba(233, 249, 245, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.12);
}

.trend-metric.featured span {
  color: #0f766e;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.trend-metric.featured strong {
  margin-top: 10px;
  font-size: 34px;
}

.trend-metric[data-tone="positive"] strong {
  color: #087f5b;
}

.trend-metric[data-tone="negative"] strong {
  color: #b42318;
}

.trend-metric[data-tone="neutral"] strong {
  color: #102a43;
}

.trend-metric span,
.trend-metric em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.trend-metric strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.trend-comment-card {
  grid-column: 1 / -1;
}

.trend-table-card {
  display: grid;
  align-content: start;
}

.trend-direction-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(22, 93, 85, 0.1);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.trend-direction-badge[data-tone="up"] {
  background: rgba(20, 122, 36, 0.12);
  color: #11631f;
}

.trend-direction-badge[data-tone="down"] {
  background: rgba(180, 35, 24, 0.1);
  color: #9d2118;
}

.trend-chart {
  overflow: hidden;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 14px;
  background: #ffffff;
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.trend-chart-bg {
  fill: #ffffff;
}

.trend-grid-line {
  stroke: rgba(22, 93, 85, 0.12);
  stroke-width: 1;
}

.trend-axis-label,
.trend-month-label,
.trend-chart-note {
  fill: #5d6b7d;
  font-size: 12px;
  font-weight: 800;
}

.trend-chart-note {
  font-size: 11px;
}

.trend-line-shadow {
  fill: none;
  stroke: rgba(16, 24, 40, 0.13);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.trend-line {
  fill: none;
  stroke: #0f766e;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.trend-point circle {
  fill: #ffffff;
  stroke: #187568;
  stroke-width: 3;
}

.trend-point.is-effective circle {
  fill: #187568;
  stroke: #0f5f56;
  stroke-width: 4;
}

.trend-point.is-compare circle {
  fill: #bd9451;
  stroke: #8c682f;
  stroke-width: 4;
}

.trend-monthly-table {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.trend-month-row {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) minmax(130px, 1.1fr) minmax(92px, 0.8fr) minmax(132px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(22, 93, 85, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  color: #102a43;
  font-size: 13px;
}

.trend-month-row strong,
.trend-month-row em {
  font-style: normal;
  font-weight: 900;
}

.trend-month-row em {
  color: var(--muted);
}

.trend-month-row em[data-tone="positive"] {
  color: #087f5b;
}

.trend-month-row em[data-tone="negative"] {
  color: #b42318;
}

.trend-month-row em[data-tone="neutral"] {
  color: #5d6b7d;
}

.trend-month-head {
  background: rgba(22, 93, 85, 0.09);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trend-history-link {
  justify-self: start;
  margin-top: 5px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.trend-comment-card {
  display: grid;
  gap: 12px;
}

.trend-comment-output {
  width: 100%;
  resize: vertical;
  min-height: 156px;
  padding: 16px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.65;
}

.trend-source-text {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trend-footer-cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.trend-info-card {
  min-height: 136px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.trend-info-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
}

.trend-info-card span::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 4px;
  box-shadow: inset 0 -5px 0 rgba(15, 118, 110, 0.16);
}

.trend-info-card h4 {
  margin: 0 0 7px;
  color: #102a43;
  font-size: 14px;
}

.trend-info-card p {
  margin: 0;
  color: #52616f;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.ai-safety-notice {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(189, 148, 81, 0.28);
  border-radius: 12px;
  background: rgba(255, 248, 235, 0.82);
  color: #765821;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.ai-safety-notice strong {
  color: #6b4c18;
  font-size: 12px;
  font-weight: 950;
}

.ai-safety-notice span {
  color: #765821;
}

.ai-output-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.ai-output-metadata-slot:empty,
.ai-output-metadata:empty {
  display: none;
}

.ai-output-metadata-slot {
  margin-top: 9px;
}

.ai-output-metadata div {
  min-height: 64px;
  padding: 9px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px;
  background: rgba(244, 250, 247, 0.78);
}

.ai-output-metadata span {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.ai-output-metadata ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.ai-output-metadata p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ai-verification-checklist {
  margin-top: 9px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
}

.ai-verification-checklist summary {
  cursor: pointer;
  padding: 9px 10px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 950;
}

.ai-verification-checklist ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 0;
  padding: 0 12px 11px 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grid-overall-summary > .ai-safety-notice,
.grid-overall-summary > .ai-output-metadata,
.grid-overall-summary > .ai-verification-checklist {
  grid-column: 1 / -1;
}

.time-adjustment-screen {
  min-height: calc(100vh - 58px);
  padding: 14px 18px 18px;
}

.time-adjustment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: 1560px;
  margin: 0 auto 10px;
}

.time-adjustment-header h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
}

.time-adjustment-header p {
  max-width: 820px;
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 750;
  font-size: 13px;
}

.time-adjustment-header-actions,
.time-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.time-filter-bar,
.time-summary-grid,
.time-dashboard-grid,
.time-warning-panel,
.time-help-panel {
  max-width: 1560px;
  margin-right: auto;
  margin-left: auto;
}

.time-help-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(229, 242, 239, 0.86);
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}

.time-help-panel strong {
  margin-right: 4px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.time-help-panel span {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.time-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(170px, 1fr) minmax(145px, 0.85fr) minmax(145px, 0.85fr) minmax(132px, 0.72fr) minmax(150px, 0.8fr);
  gap: 10px;
  align-items: end;
  padding: 11px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.time-hidden-control {
  display: none !important;
}

.time-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 10px;
  background: rgba(229, 242, 239, 0.72);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.time-warning-panel {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(189, 148, 81, 0.32);
  border-radius: 12px;
  background: rgba(246, 239, 225, 0.88);
  color: #725927;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.time-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.time-hpi-disclaimer {
  max-width: 1560px;
  margin: 10px auto 0;
}

.time-hpi-disclaimer details {
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.82);
  box-shadow: 0 12px 30px rgba(11, 45, 41, 0.05);
}

.time-hpi-disclaimer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  color: var(--brand-dark);
  cursor: pointer;
  list-style: none;
}

.time-hpi-disclaimer summary::-webkit-details-marker {
  display: none;
}

.time-hpi-disclaimer summary span {
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.time-hpi-disclaimer summary strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.time-hpi-disclaimer p {
  margin: 0;
  padding: 0 12px 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.48;
}

.time-hpi-disclaimer p + p {
  padding-top: 0;
}

.time-summary-card,
.time-card,
.time-secondary-panel {
  border: 1px solid rgba(22, 93, 85, 0.16);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.time-summary-card {
  min-height: 96px;
  padding: 11px 12px;
  border-radius: 14px;
}

.time-summary-card span,
.time-summary-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.time-summary-card strong {
  display: block;
  margin: 5px 0 5px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.05;
}

.time-summary-card[data-number-tone="positive"] strong {
  color: #1d4ed8;
}

.time-summary-card[data-number-tone="negative"] strong {
  color: #c1121f;
}

.time-summary-card[data-number-tone="neutral"] strong {
  color: var(--ink);
}

.time-summary-card[data-tone="up"] strong,
.time-summary-card[data-tone="high"] strong {
  color: #11631f;
}

.time-summary-card[data-tone="down"] strong,
.time-summary-card[data-tone="low"] strong {
  color: #9d2118;
}

.time-summary-card[data-tone="medium"] strong,
.time-summary-card[data-tone="stable"] strong {
  color: #8a641f;
}

.time-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.time-card {
  border-radius: 14px;
  padding: 12px;
}

.time-card h3 {
  margin: 0;
  font-size: 17px;
}

.time-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.42;
}

.time-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.time-chart-card {
  grid-column: span 5;
}

.time-comment-card {
  grid-column: span 7;
}

.time-source-card,
.time-comp-card,
.time-calculator-card {
  grid-column: 1 / -1;
}

.time-hpi-chart {
  overflow: hidden;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 14px;
  background: #ffffff;
}

.time-hpi-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.time-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.time-card summary::-webkit-details-marker {
  display: none;
}

.time-card summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.time-card summary strong {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 950;
  text-align: right;
}

.time-card summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(22, 93, 85, 0.1);
  color: var(--brand-dark);
  font-weight: 950;
}

.time-card[open] summary {
  margin-bottom: 10px;
}

.time-card[open] summary::after {
  content: "-";
}

.time-source-panel dl {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.time-source-panel div {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(22, 93, 85, 0.1);
  border-radius: 10px;
  background: rgba(244, 250, 247, 0.72);
}

.time-source-panel dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.time-source-panel dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.time-source-panel a {
  color: var(--brand-dark);
}

.time-table-wrap {
  overflow-x: auto;
}

.time-adjustment-table {
  width: 100%;
  min-width: 1380px;
  border-collapse: separate;
  border-spacing: 0 7px;
  font-size: 13px;
}

.time-adjustment-table th {
  padding: 8px 10px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.time-adjustment-table td {
  padding: 10px;
  border-top: 1px solid rgba(22, 93, 85, 0.12);
  border-bottom: 1px solid rgba(22, 93, 85, 0.12);
  background: rgba(255, 255, 255, 0.88);
  vertical-align: top;
}

.time-adjustment-table td:first-child {
  border-left: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px 0 0 10px;
}

.time-adjustment-table td:last-child {
  border-right: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 0 10px 10px 0;
}

.time-adjustment-table td strong,
.time-adjustment-table td span {
  display: block;
}

.time-adjustment-table td span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.time-sale-date-input,
.time-sale-price-input,
.time-override-input,
.time-note-input {
  width: 100%;
  min-width: 96px;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.time-sale-price-input {
  min-width: 118px;
  font-weight: 800;
}

.time-note-input {
  min-width: 190px;
}

.time-confidence-pill {
  display: inline-flex !important;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(22, 93, 85, 0.1);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 950;
}

tr[data-confidence="low"] .time-confidence-pill {
  background: rgba(180, 35, 24, 0.1);
  color: #9d2118;
}

.time-comparable-card[data-confidence="low"] .time-confidence-pill,
tr[data-confidence="low"] .time-confidence-pill {
  background: rgba(180, 35, 24, 0.1);
  color: #9d2118;
}

.time-comparable-card[data-confidence="medium"] .time-confidence-pill,
tr[data-confidence="medium"] .time-confidence-pill {
  background: rgba(189, 148, 81, 0.18);
  color: #765821;
}


.time-comparable-card-shell {
  display: grid;
  gap: 14px;
}

.time-comparable-card-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.9);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.time-comparable-card-summary strong {
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.time-comparable-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.time-comparable-card {
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.time-comparable-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.1);
}

.time-comparable-card-head strong,
.time-comparable-card-head span {
  display: block;
}

.time-comparable-card-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.time-comparable-card-head span:not(.time-confidence-pill) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.time-comparable-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.time-comparable-field,
.time-comparable-metric {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.time-comparable-field span,
.time-comparable-metric span {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.time-comparable-metric {
  padding: 9px 10px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 10px;
  background: rgba(248, 252, 251, 0.94);
}

.time-comparable-metric strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.time-comparable-metric em,
.time-comparable-field small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.time-comparable-wide {
  grid-column: 1 / -1;
}


.time-comparable-fields-compact {
  align-items: start;
}

.time-adjustment-amount-metric {
  border-color: rgba(15, 118, 110, 0.22);
  background: rgba(232, 246, 242, 0.88);
}

.time-adjustment-amount-metric strong {
  color: #0f766e;
}

.time-comparable-advanced {
  border-top: 1px solid rgba(15, 118, 110, 0.1);
  padding-top: 8px;
}

.time-comparable-advanced summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.time-comparable-advanced .time-comparable-field {
  margin-top: 9px;
}

.time-comparable-mini-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.time-comparable-mini-metrics span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.time-comparable-adjustment-note {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.92);
  color: #38556a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
.time-comparable-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding-top: 2px;
}

.time-comparable-pagination button {
  min-width: 92px;
  min-height: 38px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: var(--brand-dark);
  font-weight: 950;
}

.time-comparable-pagination button:not(:disabled):hover {
  background: rgba(15, 118, 110, 0.08);
}

.time-comparable-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.time-comparable-pagination span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.time-calculator-panel {
  display: grid;
  gap: 9px;
}

.time-formula-box,
.time-formula-row {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 11px;
  background: rgba(244, 250, 247, 0.82);
}

.time-formula-box span,
.time-formula-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.time-formula-box code,
.time-formula-row code {
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 850;
  white-space: normal;
}

.time-formula-row {
  grid-template-columns: 120px 1fr auto;
  align-items: center;
}

.time-market-comment {
  width: 100%;
  resize: vertical;
  min-height: 268px;
  padding: 13px 14px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.68;
}

.time-evidence-summary {
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.84);
}

.time-evidence-summary h4 {
  margin: 0 0 9px;
  font-size: 15px;
}

.time-evidence-summary ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.time-secondary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.time-secondary-panel {
  min-height: 132px;
  padding: 13px;
  border-radius: 12px;
}

.time-secondary-panel span {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(189, 148, 81, 0.14);
  color: #765821;
  font-size: 11px;
  font-weight: 950;
}

.time-secondary-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
}

.time-secondary-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.time-empty-state {
  padding: 28px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(22, 93, 85, 0.14), transparent 34%),
    rgba(243, 246, 250, 0.9);
  backdrop-filter: blur(7px);
}

.access-gate[hidden] {
  display: none;
}

body.access-checking .access-gate {
  display: none;
}

.access-card {
  display: grid;
  gap: 16px;
  width: min(100%, 438px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 249, 0.92)),
    var(--paper);
  box-shadow:
    0 22px 58px rgba(5, 18, 28, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.access-brand {
  justify-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.access-visual,
.brand-photo {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 10px;
  background: #dde5ef;
}

.access-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(16, 24, 40, 0) 42%, rgba(16, 24, 40, 0.38) 100%);
  pointer-events: none;
}

.visual-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  max-width: calc(100% - 24px);
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(13, 70, 63, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.16);
}

.social-login {
  display: grid;
  gap: 10px;
}

.social-login[hidden] {
  display: none;
}

.social-login.is-busy {
  opacity: 0.7;
  pointer-events: none;
}

.social-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.social-divider::before,
.social-divider::after {
  height: 1px;
  content: "";
  background: var(--line);
}

.google-signin-slot {
  min-height: 42px;
  display: grid;
  place-items: center;
}

.google-signin-slot[hidden] {
  display: none;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 10px;
  border: 1px solid rgba(24, 119, 242, 0.2);
  border-radius: 999px;
  background: #1877f2;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(24, 119, 242, 0.2);
}

.social-button:hover {
  background: #166fe5;
}

.social-button[hidden] {
  display: none;
}

.social-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #1877f2;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.access-visual {
  height: 164px;
}

.access-visual img,
.brand-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.access-visual img {
  object-fit: cover;
}

.brand-photo {
  height: 218px;
  background:
    linear-gradient(180deg, rgba(246, 239, 225, 0.42), rgba(248, 250, 252, 0.92)),
    #f8fafc;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.brand-photo img {
  object-fit: contain;
}

.access-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.access-message.error {
  color: var(--subject);
}

body.access-checking,
body.access-locked {
  overflow: hidden;
}

body.access-checking .workspace,
body.access-locked .workspace {
  pointer-events: none;
  user-select: none;
  filter: blur(2px);
}

body.access-unlocked .access-gate {
  display: none;
}

.panel,
.results-panel {
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.panel {
  position: relative;
  z-index: 20;
  gap: 15px;
  padding: 18px;
  border-right: 1px solid rgba(22, 93, 85, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, var(--sidebar-dark), var(--sidebar-deep));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.52);
}

.panel:has(.import-help-wrap.is-open) {
  overflow: visible;
  z-index: 1200;
}

.results-panel {
  gap: 16px;
  padding: 18px;
  border-left: 1px solid rgba(16, 47, 53, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(229, 242, 239, 0.42)),
    #f4f8f7;
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.74),
    inset 10px 0 22px rgba(16, 47, 53, 0.035);
}

.results-panel {
  display: none !important;
}

body.print-map-mode .workspace {
  grid-template-columns: minmax(0, 1fr);
}

.brand {
  display: grid;
  gap: 5px;
  justify-items: start;
  padding: 2px 0 8px;
}

.panel > .brand {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 247, 0.92)),
    #f8fbfb;
  box-shadow:
    0 16px 30px rgba(5, 18, 28, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.brand-logo {
  display: block;
  width: min(100%, 250px);
  max-height: 112px;
  object-fit: contain;
  object-position: left center;
}

.panel .brand-logo {
  width: min(100%, 282px);
  max-height: 124px;
}

.access-brand .brand-logo {
  width: min(100%, 284px);
  max-height: 132px;
  object-position: center;
}

.brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(189, 148, 81, 0.44);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    var(--brand-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(13, 70, 63, 0.18);
}

.brand-mark::after {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--focus);
  content: "";
}

.brand h1,
.results-panel h2,
.tool-section h2 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 21px;
  line-height: 1.12;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel > .brand p {
  color: var(--brand-dark);
}

.access-brand p {
  margin-top: 0;
}

.tool-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    #fbfcfe;
  box-shadow:
    0 16px 30px rgba(5, 18, 28, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tool-section h2 {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.municipal-gis-section {
  gap: 10px;
}

.municipal-gis-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.municipal-gis-actions {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.municipal-gis-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.municipal-gis-status.warning {
  color: #9a3412;
  font-weight: 800;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 700;
}

.import-help-wrap {
  position: relative;
  z-index: 40;
}

.import-help-wrap.is-open {
  z-index: 920;
}

.import-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.import-input-title {
  color: #4a5868;
  font-size: 12px;
  font-weight: 700;
}

.import-help-button {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-color: rgba(11, 127, 134, 0.22);
  border-radius: 999px;
  background: #eef9fa;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  box-shadow: none;
}

.import-help-button:hover,
.import-help-button:focus-visible {
  border-color: rgba(11, 127, 134, 0.42);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(11, 127, 134, 0.12);
}

.import-help-popover {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 12px);
  z-index: 930;
  width: min(760px, calc(100vw - 48px));
  max-width: none;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  visibility: hidden;
}

.import-help-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.import-help-wrap.is-open .import-help-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.import-help-popover::before {
  position: absolute;
  top: -7px;
  left: 18px;
  width: 14px;
  height: 14px;
  border-left: 1px solid rgba(15, 23, 42, 0.12);
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  content: "";
  transform: rotate(45deg);
}

.import-help-intro {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.import-help-intro strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}

.import-help-intro span,
.import-help-tip {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.import-help-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.import-help-step {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  padding: 11px;
  border: 1px solid rgba(11, 127, 134, 0.13);
  border-radius: 12px;
  background: #f8fcfc;
}

.import-step-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
}

.import-help-step strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
}

.import-help-step p {
  margin: 0;
  color: #475467;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.import-shortcuts {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.import-shortcuts span,
.import-mini-icon {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #eef9fa;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 900;
}

.import-mini-icon {
  justify-content: center;
  width: 22px;
  padding: 0;
  margin-right: 4px;
}

.import-help-tip {
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--brand-dark);
}

.field[hidden] {
  display: none;
}

.field span,
.comps-head span {
  color: #4a5868;
  font-size: 12px;
}

input {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #cbd7e4;
  border-radius: 7px;
  background: #fbfdff;
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(16, 24, 40, 0.02),
    0 1px 0 rgba(255, 255, 255, 0.72);
}

input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(189, 148, 81, 0.18);
}

input::placeholder {
  color: #98a2b3;
}

input[type="file"] {
  min-height: 42px;
  padding: 7px;
  color: #475467;
}

input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 10px;
  padding: 4px 10px;
  border: 1px solid #cbd7e4;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 800;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.import-actions {
  grid-template-columns: 1fr;
}

button,
a.home-action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #cbd7e4;
  border-radius: 7px;
  background: #fff;
  color: #263445;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.button-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: currentColor;
}

.button-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke-width: 2.25;
}

.button-label {
  min-width: 0;
}

button.icon-only {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

button.icon-only .button-icon {
  width: 18px;
  height: 18px;
}

button.icon-only .button-label,
.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;
}

.visually-hidden-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
}

button:hover {
  border-color: #acb9c9;
  background: #f8fbfc;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.07);
}

button:active {
  transform: translateY(1px);
}

a.home-action-link:hover {
  border-color: #acb9c9;
  background: #f8fbfc;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.07);
}

a.home-action-link:active {
  transform: translateY(1px);
}
button:disabled {
  cursor: wait;
  opacity: 0.64;
}

button.primary {
  border-color: var(--brand);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    var(--brand);
  color: #fff;
  box-shadow: 0 10px 20px rgba(22, 93, 85, 0.2);
}

button.primary:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.status {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(229, 242, 239, 0.92)),
    #eff8f4;
  color: #24413d;
  font-size: 13px;
  line-height: 1.35;
  box-shadow:
    0 8px 18px rgba(22, 93, 85, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.status.error {
  border-color: #f0aaa4;
  background: #fff5f4;
  color: #9f1d14;
}

.status.warning {
  border-color: #e5c17a;
  background: #fffaf0;
  color: #75521d;
}

.import-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.22);
  opacity: 1;
  transition: opacity 180ms ease;
  backdrop-filter: blur(2px);
}

.import-progress-overlay[hidden] {
  display: none;
}

.import-progress-overlay.is-dismissing {
  opacity: 0;
}

.import-progress-card {
  width: min(420px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(16, 119, 107, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.import-progress-indicator {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 950;
  background: var(--brand);
}

.import-progress-indicator.active {
  border: 4px solid rgba(16, 119, 107, 0.14);
  border-top-color: var(--brand);
  background: #ffffff;
  animation: importProgressSpin 0.85s linear infinite;
}

.import-progress-indicator.success::before {
  content: "?";
}

.import-progress-indicator.warning {
  background: #b7791f;
}

.import-progress-indicator.warning::before {
  content: "!";
}

.import-progress-indicator.error {
  background: #b42318;
}

.import-progress-indicator.error::before {
  content: "×";
}

.import-progress-copy h2 {
  margin: 1px 0 5px;
  color: #102a35;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
}

.import-progress-copy p {
  margin: 0;
  color: #526370;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.import-progress-bar {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 119, 107, 0.12);
}

.import-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b7f86, #14b8a6);
  transition: width 220ms ease;
}

@keyframes importProgressSpin {
  to {
    transform: rotate(360deg);
  }
}


.map-export-progress-overlay {
  z-index: 2600;
}

.map-export-progress-card {
  width: min(430px, calc(100vw - 32px));
}
@media (prefers-reduced-motion: reduce) {
  .import-progress-overlay,
  .import-progress-bar span {
    transition: none;
  }

  .import-progress-indicator.active {
    animation: none;
    border-style: dashed;
  }
}

body.capture-map-mode .import-progress-overlay,
body.print-map-mode .import-progress-overlay {
  display: none;
}

.paste-zone {
  display: grid;
  gap: 8px;
  min-height: 110px;
  padding: 12px;
  border: 1px dashed rgba(22, 93, 85, 0.38);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(229, 242, 239, 0.48), rgba(248, 250, 252, 0.98)),
    #f7fbfc;
  cursor: pointer;
}

.paste-zone:focus,
.paste-zone:hover {
  border-color: var(--accent);
  background: #f1f8f6;
}

.paste-zone-warning {
  border-color: #d69b32;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(255, 248, 231, 0.98)),
    #fff8e7;
}

.paste-zone-error {
  border-color: #d92d20;
  background:
    linear-gradient(180deg, rgba(255, 245, 244, 0.94), rgba(255, 251, 250, 0.98)),
    #fff5f4;
}

.paste-zone-warning .paste-help {
  color: #8a5a00;
  font-weight: 800;
}

.paste-zone-error .paste-help {
  color: #9f1d14;
  font-weight: 800;
}

#mapWorkspace .panel {
  gap: 9px;
  padding: 10px;
  overflow: hidden;
  min-width: 0;
  transform: translateX(0);
  will-change: transform, opacity;
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

#mapWorkspace .panel > * {
  transition:
    opacity 180ms ease,
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 240ms ease;
}

#mapWorkspace.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

#mapWorkspace.sidebar-collapsed > .panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

#mapWorkspace.sidebar-collapsed > .panel > * {
  opacity: 0;
  filter: blur(1px);
  transform: translateX(-18px);
}

#mapWorkspace .tool-section {
  gap: 8px;
  padding: 10px;
  border-radius: 9px;
}

#mapWorkspace .tool-section h2 {
  font-size: 11px;
  line-height: 1;
}

#mapWorkspace .field {
  gap: 4px;
}

#mapWorkspace .field span,
#mapWorkspace .comps-head span,
#mapWorkspace .import-input-title {
  font-size: 11px;
}

#mapWorkspace input {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 6px;
}

#mapWorkspace input[type="file"] {
  min-height: 36px;
  padding: 5px;
  font-size: 12px;
}

#mapWorkspace input[type="file"]::file-selector-button {
  min-height: 24px;
  padding: 3px 8px;
}

#mapWorkspace .paste-zone {
  gap: 5px;
  min-height: 76px;
  padding: 9px 10px;
  border-radius: 9px;
}

#mapWorkspace .paste-title {
  font-size: 13px;
  line-height: 1.15;
}

#mapWorkspace .paste-help {
  font-size: 11px;
  line-height: 1.25;
}

#mapWorkspace .image-preview {
  max-height: 46px;
  border-radius: 6px;
}

#mapWorkspace .import-actions button {
  min-height: 34px;
  padding: 6px 9px;
}

#mapWorkspace .status {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.25;
}

#mapWorkspace .comps-head {
  gap: 6px;
}

#mapWorkspace .comps-head button {
  min-height: 30px;
  padding: 5px 8px;
}

#mapWorkspace .comps {
  gap: 6px;
}

#mapWorkspace .comp-row {
  grid-template-columns: 56px minmax(0, 1fr) 30px;
  gap: 5px;
}

#mapWorkspace .comp-row button {
  width: 30px;
  min-height: 34px;
}

.sidebar-toggle-button {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-left-color: rgba(15, 23, 42, 0.08);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-dark);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
  transform: translateY(-50%);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  overflow: visible;
  transition:
    left 200ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
  backdrop-filter: blur(10px);
}

.sidebar-toggle-button::before {
  content: "";
  position: absolute;
  inset: -10px -8px -10px -4px;
  border-radius: 14px;
  pointer-events: auto;
}

.sidebar-toggle-button > * {
  pointer-events: none;
}

.sidebar-toggle-button:hover,
.sidebar-toggle-button:focus-visible {
  border-color: rgba(11, 127, 134, 0.42);
  background: #ffffff;
  color: var(--brand);
  box-shadow: 0 12px 28px rgba(11, 127, 134, 0.18);
  outline: none;
}

.sidebar-toggle-button .button-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}

.sidebar-toggle-button::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  padding: 5px 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.98);
  color: #32424c;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.sidebar-toggle-button:hover::after,
.sidebar-toggle-button:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

#mapWorkspace.sidebar-collapsed .sidebar-toggle-button {
  left: 12px;
}

.paste-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-dark);
}

.paste-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.image-preview {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.comps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.comps-head button {
  width: auto;
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.comps {
  display: grid;
  gap: 8px;
}

.comp-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  gap: 7px;
  align-items: start;
}

.comp-row button {
  width: 34px;
  min-height: 40px;
  padding: 0;
  color: #667085;
}

.comp-row button:hover {
  color: var(--subject);
}

.comp-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.comp-flags label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: #40514e;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.comp-flags input {
  width: 13px;
  min-height: 13px;
  margin: 0;
  accent-color: var(--brand);
}

.comp-flags .comp-sale-date-field {
  border-radius: 8px;
  padding-right: 5px;
}

.comp-flags .comp-sale-date {
  width: 112px;
  min-height: 24px;
  padding: 2px 4px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.address-control {
  position: relative;
  min-width: 0;
}

.address-suggestions {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 900;
  max-height: 240px;
  overflow: auto;
  border: 1px solid #cfd8e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.address-suggestion {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  line-height: 1.3;
  font-weight: 700;
}

.address-suggestion:last-child {
  border-bottom: 0;
}

.address-suggestion:hover,
.address-suggestion:focus,
.address-suggestion.active {
  background: var(--brand-soft);
}

.address-suggestion-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.options {
  display: grid;
  gap: 8px;
}

.options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.options input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.map-area {
  --map-top-offset: 14px;
  --map-frame-gap: 12px;
  --map-display-gap: 0px;
  --map-display-height: 0px;
  position: relative;
  min-width: 0;
  padding: var(--map-top-offset) var(--map-frame-gap) var(--map-frame-gap);
  background:
    linear-gradient(180deg, #d5ece3 0, #e5f1ec 54px, var(--canvas) 100%);
  border-left: 1px solid rgba(22, 93, 85, 0.14);
  border-right: 1px solid rgba(22, 93, 85, 0.1);
}

.map-shell {
  position: relative;
  width: 100%;
  height: calc(100vh - 58px - var(--map-top-offset, 0px) - var(--map-frame-gap, 0px) - var(--map-display-gap, 0px) - var(--map-display-height, 0px));
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  background: #edf1f5;
  box-shadow:
    0 22px 46px rgba(22, 93, 85, 0.13),
    0 0 0 1px rgba(22, 93, 85, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.google-map-background,
#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.google-map-background {
  z-index: 1;
  display: none;
  background: #edf1f5;
}

#map {
  z-index: 2;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.export-selection-overlay {
  position: absolute;
  inset: 0;
  z-index: 505;
  pointer-events: none;
}

.export-selection-overlay[hidden] {
  display: none;
}

.export-selection-rect {
  position: absolute;
  min-width: 80px;
  min-height: 80px;
  border: 2px solid rgba(24, 117, 104, 0.96);
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    0 0 0 9999px rgba(10, 28, 32, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.82),
    0 12px 30px rgba(10, 28, 32, 0.24);
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}

.export-selection-label {
  position: absolute;
  left: 10px;
  top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 4px 12px rgba(10, 28, 32, 0.12);
  pointer-events: none;
}

.export-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 2px 8px rgba(10, 28, 32, 0.24);
}

.export-handle-n,
.export-handle-s {
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.export-handle-e,
.export-handle-w {
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.export-handle-n {
  top: -8px;
}

.export-handle-s {
  bottom: -8px;
}

.export-handle-e {
  right: -8px;
}

.export-handle-w {
  left: -8px;
}

.export-handle-ne,
.export-handle-nw {
  top: -8px;
}

.export-handle-se,
.export-handle-sw {
  bottom: -8px;
}

.export-handle-ne,
.export-handle-se {
  right: -8px;
}

.export-handle-nw,
.export-handle-sw {
  left: -8px;
}

.export-handle-ne,
.export-handle-sw {
  cursor: nesw-resize;
}

.export-handle-nw,
.export-handle-se {
  cursor: nwse-resize;
}

body.google-map-active .google-map-background {
  display: block;
}

body.google-map-active #map.leaflet-container {
  background: transparent;
}

body.google-map-active .leaflet-tile-pane {
  opacity: 0;
}

body.google-map-active .leaflet-control-attribution {
  display: none;
}

body.capture-map-mode.google-map-active .google-map-background {
  display: none;
}

body.capture-map-mode.google-map-active .leaflet-tile-pane {
  opacity: 1;
}

body.capture-map-mode.google-map-active .leaflet-control-attribution {
  display: block;
}

.map-quick-actions {
  position: absolute;
  top: calc(var(--map-top-offset, 0px) + 12px);
  right: calc(var(--map-frame-gap, 0px) + 12px);
  z-index: 510;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
  gap: 7px;
  width: 40px;
  transition: width 160ms ease;
}

.map-quick-actions:hover,
.map-quick-actions:focus-within {
  width: 150px;
}

.map-quick-actions button {
  width: 40px;
  justify-content: flex-start;
  min-height: 34px;
  overflow: hidden;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 10px 22px rgba(16, 24, 40, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(6px);
  font-size: 13px;
  white-space: nowrap;
  transition: width 160ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.map-quick-actions:hover button,
.map-quick-actions:focus-within button,
.map-quick-actions button:hover,
.map-quick-actions button:focus-visible {
  width: 150px;
}

.map-quick-actions .button-label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: max-width 160ms ease, opacity 120ms ease;
}

.map-quick-actions:hover .button-label,
.map-quick-actions:focus-within .button-label,
.map-quick-actions button:hover .button-label,
.map-quick-actions button:focus-visible .button-label {
  max-width: 104px;
  opacity: 1;
}

.export-review-actions {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 260px;
  max-height: calc(100vh - 32px);
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(22, 93, 85, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 20px 48px rgba(16, 24, 40, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
}

.export-review-actions[hidden] {
  display: none;
}

.export-review-panel-title {
  width: 100%;
  padding: 2px 2px 5px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.export-review-actions button {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-color: rgba(22, 93, 85, 0.18);
  background: #ffffff;
  color: var(--brand-dark);
  box-shadow: none;
}

.export-review-actions #resetExportAreaButton,
.export-review-actions #fitExportAreaButton,
.export-review-actions #fullExportAreaButton,
.export-review-actions #cancelExportButton {
  background: #ffffff;
  color: var(--brand-dark);
}

.export-review-actions #copySelectedExportButton,
.export-review-actions #downloadSelectedExportButton,
.export-review-actions #printSelectedExportButton {
  background: linear-gradient(180deg, #187568, #0f5f56);
  color: #ffffff;
}

.export-review-actions .button-label {
  display: inline;
}

.export-review-label-size,
.export-review-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 10px;
  background: rgba(246, 250, 248, 0.92);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.export-review-label-size input {
  width: 112px;
  accent-color: var(--brand);
}

.export-review-select select {
  min-width: 112px;
  height: 30px;
  padding: 3px 28px 3px 10px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 800;
}


@media (max-width: 760px) {
  .export-review-actions {
    left: auto;
    right: 10px;
    top: 10px;
    width: min(260px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .export-review-label-size,
  .export-review-select {
    justify-content: space-between;
  }

  .export-review-select select {
    min-width: 0;
    width: 100%;
  }
}

.map-display-bar {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 520;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 6px;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
}

.map-display-title {
  display: none;
  margin-right: 0;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.export-orientation-title {
  margin-left: auto;
}

.map-display-bar label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  user-select: none;
  transition:
    width 170ms ease,
    padding 170ms ease,
    gap 170ms ease,
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.map-display-bar .map-icon-toggle:hover,
.map-display-bar .map-icon-toggle:focus-within {
  width: 136px;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 13px 0 7px;
}

.map-display-bar .map-style-control {
  width: 108px;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  border-radius: 10px;
  cursor: default;
}

.map-style-dock {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 520;
  padding: 6px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
}

.map-style-dock .map-style-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px 6px 10px;
  border: 1px solid rgba(11, 127, 134, 0.16);
  border-radius: 999px;
  background: rgba(238, 249, 250, 0.88);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.map-style-dock .map-style-control span {
  display: inline;
  color: var(--brand-dark);
}

.map-style-dock .map-style-control select {
  width: 138px;
  min-height: 26px;
  font-size: 12px;
}

.overlay-clarity-control {
  position: absolute;
  right: 18px;
  top: 50%;
  z-index: 521;
  width: 64px;
  padding: 10px 8px;
  border: 1px solid rgba(11, 127, 134, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.overlay-clarity-control[hidden] {
  display: none;
}

.overlay-clarity-control label {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
}

.overlay-clarity-title {
  text-transform: uppercase;
  letter-spacing: 0;
}

.overlay-clarity-value {
  min-width: 42px;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(11, 127, 134, 0.1);
  color: var(--brand);
  text-align: center;
  font-size: 11px;
}

.overlay-clarity-control input[type="range"] {
  width: 104px;
  height: 24px;
  accent-color: var(--brand);
  transform: rotate(-90deg);
  margin: 36px 0;
}

.map-display-bar .export-select-control {
  min-width: 176px;
}

.export-custom-size {
  min-height: 38px;
  padding: 7px 9px;
}

.export-custom-size input {
  width: 74px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.map-style-control span {
  display: none;
  color: var(--brand-dark);
}

.map-style-control::after {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(13, 70, 63, 0.72);
  border-bottom: 2px solid rgba(13, 70, 63, 0.72);
  content: "";
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
}

.map-style-control select {
  width: 94px;
  min-height: 30px;
  padding: 4px 22px 4px 8px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 999px;
  appearance: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 251, 248, 0.94)),
    #ffffff;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.map-style-control select:focus-visible {
  border-color: rgba(189, 148, 81, 0.74);
  box-shadow: 0 0 0 3px rgba(189, 148, 81, 0.2);
}

.map-style-control option {
  color: var(--ink);
  background: #ffffff;
}

.map-display-bar label:hover {
  border-color: rgba(22, 93, 85, 0.34);
  box-shadow: 0 8px 18px rgba(22, 93, 85, 0.12);
  transform: translateY(-1px);
}

.map-display-bar label.disabled-option {
  cursor: not-allowed;
  opacity: 0.48;
}

.map-display-bar label.disabled-option:hover {
  border-color: rgba(22, 93, 85, 0.16);
  box-shadow: none;
  transform: none;
}

.map-display-bar label:has(input:checked) {
  border-color: rgba(11, 127, 134, 0.72);
  background: var(--brand);
  color: #ffffff;
}

.map-display-bar label:has(input:focus-visible) {
  outline: 3px solid rgba(189, 148, 81, 0.28);
  outline-offset: 2px;
}

.map-display-bar .map-style-control:has(select:focus-visible) {
  outline: 3px solid rgba(189, 148, 81, 0.28);
  outline-offset: 2px;
}

.map-display-bar input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.map-display-bar input::before {
  display: none;
}

.map-display-bar input:checked {
  box-shadow: none;
}

.map-display-bar input:checked::before {
  display: none;
}

.map-display-bar input[type="radio"]::before {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  transform: scale(0);
}

.map-display-bar input[type="radio"]:checked::before {
  transform: scale(1);
}

.map-display-bar .export-custom-size input[type="number"] {
  display: block;
  width: 74px;
  min-height: 24px;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 999px;
  appearance: auto;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.map-display-bar .export-custom-size input[type="number"]::before {
  display: none;
}

.map-display-bar .map-icon-toggle > span:not(.map-toggle-icon) {
  width: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition:
    max-width 170ms ease,
    opacity 130ms ease;
}

.map-display-bar .map-icon-toggle:hover > span:not(.map-toggle-icon),
.map-display-bar .map-icon-toggle:focus-within > span:not(.map-toggle-icon) {
  width: auto;
  max-width: 112px;
  opacity: 1;
}

.map-display-bar .map-toggle-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(11, 127, 134, 0.08);
  color: currentColor;
}

.map-display-bar .map-toggle-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-display-bar .map-icon-toggle:has(input:checked) .map-toggle-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.map-display-bar .map-icon-toggle.disabled-option .map-toggle-icon {
  background: rgba(11, 127, 134, 0.06);
}

.map-display-bar .map-icon-toggle:has(input:checked)::after {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.contour-overlay-layer {
  filter: contrast(1.12) saturate(0.68);
  mix-blend-mode: multiply;
}

.floodplain-overlay-layer {
  filter: saturate(1.12) contrast(1.04);
  mix-blend-mode: multiply;
}

.alr-overlay-layer {
  filter: saturate(1.2) contrast(1.04);
  mix-blend-mode: multiply;
}

.capture-map-mode .leaflet-control-zoom,
body.capture-map-mode .map-quick-actions,
body.capture-map-mode .map-display-bar,
body.capture-map-mode .map-style-dock,
body.capture-map-mode .overlay-clarity-control,
body.capture-map-mode .sidebar-toggle-button {
  display: none;
}

body.capture-map-mode .map-area {
  --map-top-offset: 0px;
  --map-frame-gap: 0px;
  --map-display-gap: 0px;
  --map-display-height: 0px;
  width: var(--capture-map-width, 2400px);
  height: var(--capture-map-height, 3000px);
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #ffffff;
}

body.capture-map-mode .app-top-nav,
body.print-map-mode .app-top-nav {
  display: none;
}

body.capture-map-mode .map-shell {
  width: var(--capture-map-width, 2400px);
  height: var(--capture-map-height, 3000px);
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.capture-map-mode {
  overflow: hidden;
  background: #ffffff;
}

body.capture-map-mode .workspace {
  display: block;
  width: var(--capture-map-width, 2400px);
  min-height: 0;
}

body.capture-map-mode .panel,
body.capture-map-mode .results-panel {
  display: none;
}

body.capture-map-mode.capture-landscape-mode .map-area {
  width: var(--capture-map-width, 3200px);
  height: var(--capture-map-height, 2000px);
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: #ffffff;
}

body.capture-map-mode.capture-landscape-mode .map-shell {
  width: var(--capture-map-width, 3200px);
  height: var(--capture-map-height, 2000px);
  min-height: 0;
  border: 0;
}

.capture-map-mode .leaflet-callout-arrow,
.capture-map-mode .leaflet-label-leader-line {
  opacity: 0 !important;
}

body.export-review-mode .leaflet-label-leader-line {
  opacity: 1 !important;
  filter: drop-shadow(0 1px 1px rgba(16, 24, 40, 0.08));
  mix-blend-mode: normal;
}

body.final-image-capture-mode .leaflet-callout-arrow,
body.final-image-capture-mode .leaflet-label-leader-line {
  opacity: 0 !important;
}

.capture-arrow-overlay {
  position: absolute;
  inset: 0;
  z-index: 520;
  pointer-events: none;
}

.capture-arrow-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.capture-arrow {
  opacity: 0.96;
  shape-rendering: geometricPrecision;
}

.capture-arrow-halo {
  fill: none;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-linejoin: round;
  stroke-width: 3.2px;
}

.leaflet-label-leader-line {
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.08));
}

.leaflet-bubble-tail-leader-line {
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.08));
  stroke-linecap: round;
  stroke-linejoin: round;
}

.leaflet-bubble-tail-leader-shadow {
  filter: blur(3px) drop-shadow(0 4px 8px rgba(14, 116, 144, 0.2));
}

.leaflet-bubble-tail-leader-beam {
  filter: drop-shadow(0 2px 3px rgba(14, 116, 144, 0.16));
}

.results-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #12353c, #165d55);
  box-shadow:
    0 16px 30px rgba(16, 47, 53, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.results-header::after {
  position: absolute;
  right: -24px;
  top: -34px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  content: "";
}

.results-panel h2 {
  position: relative;
  z-index: 1;
  font-size: 17px;
  color: #ffffff;
}

.legend {
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 12px;
}

.legend:empty {
  min-height: 188px;
  place-items: center;
  align-content: center;
  padding: 20px;
  border: 1px dashed rgba(22, 93, 85, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48)),
    rgba(255, 255, 255, 0.44);
  color: #5f706d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 24px rgba(16, 47, 53, 0.06);
  text-align: center;
}

.legend:empty::before {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(22, 93, 85, 0.2);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 38%, rgba(22, 93, 85, 0.2) 0 5px, transparent 6px),
    linear-gradient(180deg, rgba(229, 242, 239, 0.94), rgba(255, 255, 255, 0.94));
  box-shadow: 0 8px 18px rgba(16, 47, 53, 0.08);
  content: "";
}

.legend:empty::after {
  max-width: 190px;
  color: #5f706d;
  content: "No mapped addresses";
  font-size: 13px;
  font-weight: 800;
}

.legend-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 251, 0.96)),
    #ffffff;
  box-shadow:
    0 10px 20px rgba(16, 47, 53, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.legend-item.geocode-warning {
  border-color: #e5c17a;
  background: #fffaf0;
}

.legend-item.manual-adjusted {
  border-color: rgba(22, 93, 85, 0.34);
}

.legend-key {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--legend-color, var(--brand-dark));
  color: #ffffff;
  box-shadow:
    0 7px 15px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  font-weight: 950;
  line-height: 1;
}

.legend-address {
  line-height: 1.35;
}

.legend-distance {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.legend-geocode-warning,
.legend-manual-note {
  margin-top: 6px;
  font-weight: 800;
  line-height: 1.35;
}

.legend-geocode-warning {
  color: #76521d;
}

.legend-manual-note {
  color: var(--brand-dark);
}

.legend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.legend-adjust-button {
  min-height: 28px;
  padding: 5px 8px;
  border-color: rgba(22, 93, 85, 0.28);
  color: var(--brand-dark);
  font-size: 11px;
}

.legend-adjust-button .button-icon {
  width: 14px;
  height: 14px;
}

.leaflet-container.is-adjusting-pin {
  cursor: crosshair;
}

.map-pin-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  transform: translate(calc(-17px + var(--pin-offset-x, 0px)), calc(-100% + var(--pin-offset-y, 0px)));
  color: var(--pin-color, var(--comp));
  pointer-events: auto;
  cursor: grab;
}

.map-pin-marker.pin-subject {
  gap: 9px;
  transform: translate(calc(-22px + var(--pin-offset-x, 0px)), calc(-100% + var(--pin-offset-y, 0px)));
}

.map-pin-shape {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: currentColor;
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  transform: rotate(-45deg);
}

.pin-subject .map-pin-shape {
  width: 44px;
  height: 44px;
  border-width: 4px;
  box-shadow:
    0 11px 24px rgba(15, 23, 42, 0.32),
    0 0 0 4px rgba(15, 159, 154, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.08);
}

.map-pin-shape::after {
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: #fff;
  content: "";
}

.pin-subject .map-pin-shape::after {
  display: none;
}

.map-pin-house,
.property-pin-house {
  position: absolute;
  inset: 0;
  margin: auto;
  color: #ffffff;
  transform: rotate(45deg);
}

.map-pin-house {
  width: 22px;
  height: 22px;
}

.map-pin-text {
  max-width: 240px;
  padding: 5px 8px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #0b1f3a;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.15);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: normal;
}

.pin-subject .map-pin-text {
  color: #0f9f9a;
}

.pin-subject {
  color: var(--pin-color, #0f9f9a);
}

.pin-comp {
  color: var(--pin-color, #334155);
}

.property-pin-marker {
  position: relative;
  width: 36px;
  height: 46px;
  color: var(--property-pin-color, var(--comp));
  filter: drop-shadow(0 8px 17px rgba(15, 23, 42, 0.28));
  cursor: grab;
}

.leaflet-marker-draggable .map-pin-marker:active,
.leaflet-marker-draggable .property-pin-marker:active {
  cursor: grabbing;
}

.property-pin-subject {
  width: 46px;
  height: 58px;
}

.property-pin-shape {
  position: absolute;
  left: 4px;
  top: 0;
  width: 28px;
  height: 28px;
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  transform: rotate(-45deg);
}

.property-pin-subject .property-pin-shape {
  left: 5px;
  width: 36px;
  height: 36px;
  border-width: 4px;
  box-shadow:
    0 0 0 4px rgba(15, 159, 154, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.08);
}

.property-pin-shape::after {
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.property-pin-subject .property-pin-shape::after {
  display: none;
}

.property-pin-house {
  width: 18px;
  height: 18px;
}

.property-pin-subject {
  color: var(--property-pin-color, #0f9f9a);
}

.property-pin-comp {
  color: var(--property-pin-color, #334155);
}

body.capture-map-mode .property-pin-marker {
  width: 78px;
  height: 98px;
  filter: drop-shadow(0 11px 24px rgba(16, 24, 40, 0.34));
}

body.capture-map-mode .property-pin-shape {
  left: 8px;
  width: 62px;
  height: 62px;
  border-width: 6px;
}

body.capture-map-mode .property-pin-subject .property-pin-shape {
  left: 7px;
  width: 76px;
  height: 76px;
}

body.capture-map-mode .property-pin-shape::after {
  inset: 17px;
}

body.capture-map-mode .property-pin-house {
  width: 38px;
  height: 38px;
}

body.capture-map-mode .map-pin-marker {
  gap: 17px;
  transform: translate(calc(-38px + var(--pin-offset-x, 0px)), calc(-100% + var(--pin-offset-y, 0px)));
}

body.capture-map-mode .map-pin-marker.pin-subject {
  transform: translate(calc(-45px + var(--pin-offset-x, 0px)), calc(-100% + var(--pin-offset-y, 0px)));
}

body.capture-map-mode .map-pin-shape {
  width: 76px;
  height: 76px;
  border-width: 6px;
  box-shadow:
    0 12px 28px rgba(16, 24, 40, 0.32),
    0 0 0 2px rgba(16, 24, 40, 0.08);
}

body.capture-map-mode .pin-subject .map-pin-shape {
  width: 90px;
  height: 90px;
}

body.capture-map-mode .map-pin-shape::after {
  inset: 19px;
}

body.capture-map-mode .map-pin-house {
  width: 45px;
  height: 45px;
}

body.capture-map-mode .map-pin-text {
  width: max-content;
  max-width: 760px;
  padding: 11px 17px;
  border-radius: 12px;
  font-size: 30px;
}

body.export-review-mode .map-pin-text {
  max-width: 520px;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 18px;
}

.map-callout {
  width: 300px;
  padding: 11px 13px;
  border: 2px solid var(--callout-color, #334155);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.25;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.map-callout strong,
.map-callout span,
.map-callout em {
  display: block;
}

.map-callout > span {
  color: #475569;
  font-weight: 650;
}

.map-callout strong {
  margin-bottom: 6px;
  color: #0b1f3a;
  font-size: 16px;
  letter-spacing: 0;
}

.map-callout-title {
  cursor: text;
  border-radius: 4px;
  user-select: text;
}

.map-callout-title:hover,
.map-callout-title.is-editing {
  background: color-mix(in srgb, var(--callout-color, var(--comp)) 10%, transparent);
}

.map-callout-title.is-editing {
  outline: 2px solid color-mix(in srgb, var(--callout-color, var(--comp)) 36%, transparent);
  outline-offset: 2px;
}

.map-callout em {
  margin-top: 5px;
  color: #0f9f9a;
  font-style: normal;
  font-weight: 900;
}

.map-callout-subject {
  border-color: #0f9f9a;
}

.map-callout-subject strong {
  color: #0f9f9a;
}

.map-callout-moved {
  box-shadow:
    0 0 0 2px rgba(189, 148, 81, 0.16),
    0 6px 18px rgba(16, 24, 40, 0.18);
}

.leaflet-marker-draggable .map-callout:active,
.leaflet-container.is-dragging-label .map-callout {
  cursor: grabbing;
}

body.capture-map-mode .map-callout {
  width: 600px;
  padding: 20px 23px;
  border-width: 4px;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  font-size: 32px;
  line-height: 1.22;
}

body.capture-map-mode .map-callout strong {
  margin-bottom: 8px;
  font-size: 35px;
}

body.capture-map-mode .map-callout em {
  margin-top: 8px;
  font-size: 29px;
}

body.export-review-mode .map-callout {
  width: calc(300px * var(--export-review-label-scale, 1.08));
  padding: calc(10px * var(--export-review-label-scale, 1.08)) calc(12px * var(--export-review-label-scale, 1.08));
  border-width: 3px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  font-size: calc(15px * var(--export-review-label-scale, 1.08));
  line-height: 1.22;
}

body.export-review-mode .map-callout strong {
  margin-bottom: calc(5px * var(--export-review-label-scale, 1.08));
  font-size: calc(16px * var(--export-review-label-scale, 1.08));
}

body.export-review-mode .map-callout em {
  margin-top: calc(5px * var(--export-review-label-scale, 1.08));
  font-size: calc(14px * var(--export-review-label-scale, 1.08));
}

.leaflet-label-leader-line {
  display: none !important;
}

.marker-offset-leader-line {
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.map-pin-marker,
.property-pin-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: auto !important;
  height: auto !important;
  transform: none !important;
  filter: none;
  color: var(--pin-color, var(--property-pin-color, #0e7490));
  pointer-events: auto;
}

.map-pin-marker.pin-subject,
.property-pin-subject {
  transform: none !important;
  color: var(--pin-color, var(--property-pin-color, #c62828));
}

.map-number-marker,
.map-subject-marker {
  display: grid;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: var(--pin-color, var(--property-pin-color, #0e7490));
  color: #ffffff;
  box-shadow:
    0 7px 15px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  font-weight: 950;
  line-height: 1;
}

.map-number-marker {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.map-subject-marker {
  width: 34px;
  height: 34px;
  background: var(--pin-color, var(--property-pin-color, #c62828));
  font-size: 0;
}

.map-subject-marker-icon {
  width: 17px;
  height: 17px;
  color: #ffffff;
}

body.capture-map-mode .map-number-marker,
body.capture-map-mode .property-pin-marker .map-number-marker {
  width: calc(28px * var(--export-render-scale, 1));
  height: calc(28px * var(--export-render-scale, 1));
  border-width: calc(3px * var(--export-render-scale, 1));
  font-size: calc(12px * var(--export-render-scale, 1));
}

body.capture-map-mode .map-subject-marker,
body.capture-map-mode .property-pin-marker .map-subject-marker {
  width: calc(34px * var(--export-render-scale, 1));
  height: calc(34px * var(--export-render-scale, 1));
  border-width: calc(3px * var(--export-render-scale, 1));
}

body.capture-map-mode .map-subject-marker-icon {
  width: calc(17px * var(--export-render-scale, 1));
  height: calc(17px * var(--export-render-scale, 1));
}

.map-callout,
.map-bubble-label {
  position: relative;
  box-sizing: border-box;
  width: 178px;
  max-width: min(178px, calc(100vw - 34px));
  padding: 7px 9px 8px;
  border: 2px solid var(--callout-color, #0e7490);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.985);
  color: #0f172a;
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.18;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.map-callout strong,
.map-callout span,
.map-callout em {
  display: block;
}

.map-bubble-title,
.map-callout strong {
  margin: 0 0 4px;
  color: var(--callout-color, #0e7490);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

.map-callout-title::before {
  content: "";
  display: inline-block;
  width: 0.68em;
  height: 0.68em;
  margin-right: 0.42em;
  border-radius: 999px;
  background: var(--callout-color, #0e7490);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--callout-color, #0e7490) 18%, transparent);
  vertical-align: -0.04em;
}

.map-bubble-address,
.map-bubble-body {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-bubble-address {
  color: #334155;
  font-weight: 700;
}

.map-bubble-body {
  margin-top: 2px;
  color: #475569;
  font-weight: 850;
}

.map-callout-title {
  cursor: text;
  border-radius: 4px;
  user-select: text;
}

.map-callout-title:hover,
.map-callout-title.is-editing {
  background: color-mix(in srgb, var(--callout-color, var(--comp)) 10%, transparent);
}

.map-callout-title.is-editing {
  outline: 2px solid color-mix(in srgb, var(--callout-color, var(--comp)) 36%, transparent);
  outline-offset: 2px;
}

.map-callout-subject {
  border-color: var(--callout-color, #c62828);
}

.map-callout-moved {
  box-shadow:
    0 0 0 2px rgba(189, 148, 81, 0.16),
    0 8px 18px rgba(16, 24, 40, 0.18);
}

.leaflet-marker-draggable .map-callout:active,
.leaflet-container.is-dragging-label .map-callout {
  cursor: grabbing;
}

body.capture-map-mode .map-callout {
  width: calc(178px * var(--export-render-scale, 1));
  max-width: none;
  padding: calc(7px * var(--export-render-scale, 1)) calc(9px * var(--export-render-scale, 1)) calc(8px * var(--export-render-scale, 1));
  border-width: calc(2px * var(--export-render-scale, 1));
  border-radius: calc(9px * var(--export-render-scale, 1));
  box-shadow: 0 calc(8px * var(--export-render-scale, 1)) calc(18px * var(--export-render-scale, 1)) rgba(15, 23, 42, 0.14);
  font-size: calc(12px * var(--export-render-scale, 1));
}

body.capture-map-mode .map-callout strong {
  margin-bottom: calc(4px * var(--export-render-scale, 1));
  font-size: calc(13px * var(--export-render-scale, 1));
}

body.export-review-mode .map-callout {
  width: calc(178px * var(--export-review-label-scale, 1.08));
  max-width: none;
  padding: calc(7px * var(--export-review-label-scale, 1.08)) calc(9px * var(--export-review-label-scale, 1.08)) calc(8px * var(--export-review-label-scale, 1.08));
  border-width: calc(2px * var(--export-review-label-scale, 1.08));
  border-radius: calc(9px * var(--export-review-label-scale, 1.08));
  font-size: calc(12px * var(--export-review-label-scale, 1.08));
  line-height: 1.18;
}

body.export-review-mode .map-callout strong {
  margin-bottom: calc(4px * var(--export-review-label-scale, 1.08));
  font-size: calc(13px * var(--export-review-label-scale, 1.08));
}

@media (max-width: 720px) {
  .import-help-popover {
    left: 50%;
    width: min(620px, calc(100vw - 32px));
    padding: 8px;
    transform: translate(-50%, -4px);
  }

  .import-help-wrap.is-open .import-help-popover {
    transform: translate(-50%, 0);
  }

  .import-help-popover::before {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
  }

  .import-help-steps {
    grid-template-columns: 1fr;
  }

  .import-help-step {
    min-height: 0;
  }

  .map-callout,
  .map-bubble-label {
    width: 152px;
    max-width: min(152px, calc(100vw - 28px));
    padding: 6px 8px 7px;
    font-size: 11.5px;
  }

  .map-bubble-title,
  .map-callout strong {
    font-size: 12.5px;
  }
}

.map-address-label {
  max-width: 390px;
  border: 1px solid rgba(16, 24, 40, 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.16);
  font-size: 16px;
  line-height: 1.28;
  white-space: normal;
}

body.capture-map-mode .map-address-label {
  max-width: 644px;
  border-width: 2px;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.18);
  font-size: 28px;
  line-height: 1.25;
}

body.export-review-mode .map-address-label {
  max-width: 460px;
  border-width: 2px;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.18);
  font-size: 18px;
  line-height: 1.24;
}

.leaflet-tooltip.map-address-label::before {
  display: none;
}

@media (max-width: 1060px) {
  .home-hero-shade {
    background:
      linear-gradient(90deg, rgba(248, 252, 255, 0.98), rgba(248, 252, 255, 0.72) 64%, rgba(248, 252, 255, 0.28)),
      linear-gradient(0deg, rgba(248, 252, 255, 0.62), rgba(248, 252, 255, 0.1) 52%);
  }

  .home-brand {
    justify-self: start;
    max-width: 650px;
  }

  .home-copy {
    max-width: 560px;
  }

  .home-feature-strip {
    grid-template-columns: 1fr 1fr;
  }

  .home-feature-wide {
    grid-column: 1 / -1;
  }

  .workspace {
    grid-template-columns: minmax(320px, 380px) minmax(420px, 1fr);
  }

  .trend-grid {
    grid-template-columns: 1fr;
  }

  .trend-metric-grid,
  .trend-footer-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-panel {
    grid-column: 1 / -1;
    max-height: 40vh;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}


@media (max-width: 760px) {
  body.home-active {
    overflow: auto;
  }

  .home-screen {
    align-items: start;
    padding: 18px;
  }

  .home-shell {
    min-height: calc(100vh - 36px);
    gap: 18px;
  }

  .home-hero-photo img {
    object-position: 68% center;
  }

  .home-hero-shade {
    background:
      linear-gradient(180deg, rgba(248, 252, 255, 0.94), rgba(248, 252, 255, 0.82)),
      linear-gradient(90deg, rgba(248, 252, 255, 0.98), rgba(248, 252, 255, 0.56));
  }

  .home-nav {
    align-items: center;
  }

  .home-brand h1 {
    font-size: 44px;
  }

  .home-brand {
    align-content: center;
    gap: 18px;
    padding: 2vh 0 0;
  }

  .home-copy {
    font-size: 17px;
  }

  .home-actions {
    display: grid;
  }

  .home-primary,
  .home-secondary {
    width: 100%;
  }

  .home-nav .home-primary,
  .home-nav .home-secondary {
    width: auto;
    min-height: 46px;
    padding: 11px 14px;
  }

  .home-highlights {
    gap: 7px;
  }

  .home-highlights span {
    font-size: 11px;
  }

  .home-feature-strip {
    grid-template-columns: 1fr;
  }

  .home-feature-card {
    min-height: 152px;
    border-radius: 12px;
  }

  .map-area {
    --map-top-offset: 0px;
    --map-frame-gap: 0px;
    padding-top: 0;
  }

  .map-quick-actions {
    top: 12px;
    right: 12px;
  }

  .workspace {
    display: block;
    position: relative;
    min-height: calc(100vh - 58px);
  }

  .app-top-nav {
    overflow-x: auto;
    padding: 9px 12px;
  }

  .app-nav-button {
    white-space: nowrap;
  }

  .app-nav-brand {
    min-height: 44px;
    min-width: 86px;
    padding: 5px 10px 5px 6px;
    font-size: 13px;
  }

  .app-nav-brand img {
    width: 70px;
    height: 34px;
  }

  .app-logout-button {
    margin-left: 0;
  }

  #mapWorkspace .panel {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 545;
    width: min(86vw, 340px);
    max-width: calc(100vw - 42px);
    overflow-y: auto;
    transform: translateX(0);
    box-shadow: 16px 0 34px rgba(15, 23, 42, 0.14);
  }

  #mapWorkspace.sidebar-collapsed > .panel {
    padding: 10px;
    opacity: 1;
    visibility: visible;
    transform: translateX(calc(-100% - 18px));
  }

  #mapWorkspace.sidebar-collapsed > .panel > * {
    opacity: 1;
    filter: none;
    transform: none;
  }

  #mapWorkspace .map-area {
    min-height: calc(100vh - 58px);
  }

  #mapWorkspace .sidebar-toggle-button {
    left: min(86vw, 340px);
    top: 24px;
    transform: translate(-1px, 0);
    border-radius: 0 10px 10px 0;
  }

  #mapWorkspace.sidebar-collapsed .sidebar-toggle-button {
    left: 12px;
  }

  .market-trend-screen {
    padding: 14px;
  }

  .trend-header {
    display: grid;
  }

  .trend-header h2 {
    font-size: 24px;
  }

  .trend-form-grid,
  .trend-metric-grid {
    grid-template-columns: 1fr;
  }

  .trend-metric.featured {
    grid-column: 1;
  }

  .trend-footer-cards {
    grid-template-columns: 1fr;
  }

  .ai-output-metadata,
  .ai-verification-checklist ul {
    grid-template-columns: 1fr;
  }

  .trend-month-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .results-panel {
    max-height: none;
  }

  .access-visual {
    height: 132px;
  }

  .brand-photo {
    height: 178px;
  }

  .map-shell {
    height: 64vh;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .time-filter-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .time-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .time-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .time-chart-card,
  .time-comment-card,
  .time-source-card,
  .time-comp-card,
  .time-calculator-card {
    grid-column: 1 / -1;
  }

  .time-source-panel dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .time-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


@media (max-width: 760px) {
  .time-adjustment-screen {
    padding: 14px;
  }

  .time-adjustment-header,
  .time-card-head {
    display: grid;
  }

  .time-adjustment-header h2 {
    font-size: 24px;
  }

  .time-adjustment-header-actions,
  .time-inline-actions {
    justify-content: start;
  }

  .time-filter-bar,
  .time-data-import-panel,
  .time-summary-grid,
  .time-secondary-grid,
  .time-source-panel dl,
  .time-evidence-summary ul {
    grid-template-columns: 1fr;
  }

  .time-hpi-disclaimer summary {
    align-items: flex-start;
    display: grid;
  }


  .time-comparable-card-grid {
    grid-template-columns: 1fr;
  }

  .time-comparable-card-summary,
  
.time-comparable-fields-compact {
  align-items: start;
}

.time-adjustment-amount-metric {
  border-color: rgba(15, 118, 110, 0.22);
  background: rgba(232, 246, 242, 0.88);
}

.time-adjustment-amount-metric strong {
  color: #0f766e;
}

.time-comparable-advanced {
  border-top: 1px solid rgba(15, 118, 110, 0.1);
  padding-top: 8px;
}

.time-comparable-advanced summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.time-comparable-advanced .time-comparable-field {
  margin-top: 9px;
}

.time-comparable-mini-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.time-comparable-mini-metrics span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.time-comparable-adjustment-note {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.92);
  color: #38556a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
.time-comparable-pagination {
    align-items: stretch;
    flex-direction: column;
  }
  .time-formula-row {
    grid-template-columns: 1fr;
  }
}

.grid-review-screen {
  min-height: calc(100vh - 58px);
  padding: 18px 22px 92px;
}

.grid-review-header,
.grid-help-panel,
.grid-upload-card,
.grid-review-loading,
.grid-review-results {
  max-width: 1480px;
  margin-right: auto;
  margin-left: auto;
}

.grid-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.grid-review-header h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 28px;
  line-height: 1.08;
}

.grid-review-header p {
  max-width: 780px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.grid-help-panel {
  margin-bottom: 12px;
  padding: 0;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}

.grid-help-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  color: var(--brand-dark);
  cursor: pointer;
  list-style: none;
}

.grid-help-panel summary::-webkit-details-marker {
  display: none;
}

.grid-help-panel summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 999px;
  background: rgba(244, 250, 247, 0.9);
  color: var(--brand-dark);
  font-weight: 950;
}

.grid-help-panel[open] summary::after {
  content: "-";
}

.grid-help-panel summary span {
  font-size: 14px;
  font-weight: 950;
}

.grid-help-panel summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.grid-help-content {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 14px;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(22, 93, 85, 0.1);
}

.grid-help-content p,
.grid-help-content li {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.42;
}

.grid-help-content p {
  margin: 9px 0 0;
}

.grid-help-content ol {
  margin: 10px 0 0;
  padding-left: 19px;
}

.grid-help-content li + li {
  margin-top: 4px;
}

.grid-review-header-actions,
.grid-upload-actions,
.grid-upload-options,
.grid-grammar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.grid-upload-card,
.grid-review-card,
.grid-review-loading,
.grid-summary-tile,
.grid-issue-card {
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.grid-upload-card {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
}

.grid-drop-zone {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 150px;
  padding: 20px;
  border: 2px dashed rgba(22, 93, 85, 0.26);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(229, 242, 239, 0.78), rgba(255, 255, 255, 0.92));
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}

.grid-drop-zone strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.grid-drop-zone span {
  font-size: 13px;
  font-weight: 850;
}

.grid-drop-zone:hover,
.grid-drop-zone:focus,
.grid-drop-zone.is-dragging {
  border-color: rgba(22, 117, 104, 0.62);
  background: #eef8f5;
  outline: none;
}

.grid-drop-zone.is-paste-ready {
  border-color: rgba(15, 159, 154, 0.78);
  background: linear-gradient(135deg, rgba(217, 247, 242, 0.94), rgba(255, 255, 255, 0.98));
  box-shadow: 0 0 0 4px rgba(15, 159, 154, 0.12);
}

.grid-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 10px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.grid-file-chip input {
  width: 170px;
  min-height: 30px;
  padding: 3px;
}

.grid-upload-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.grid-upload-inline-actions button.active {
  border-color: rgba(22, 117, 104, 0.55);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.grid-paste-textarea {
  width: 100%;
  min-height: 116px;
  padding: 12px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.grid-extraction-preview[hidden] {
  display: none;
}

.grid-extraction-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(244, 250, 247, 0.82);
}

.grid-extraction-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.grid-extraction-preview-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 15px;
}

.grid-extraction-preview-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grid-extraction-preview-head span {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 950;
}

.grid-extraction-preview-list {
  display: grid;
  gap: 8px;
}

.grid-extraction-preview-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(22, 93, 85, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.grid-extraction-preview-row[data-tone="review"] {
  border-color: rgba(189, 148, 81, 0.38);
  background: rgba(255, 249, 238, 0.92);
}

.grid-extraction-preview-row header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.grid-extraction-preview-row strong,
.grid-extraction-preview-row span {
  display: block;
}

.grid-extraction-preview-row strong {
  color: var(--ink);
  font-size: 13px;
}

.grid-extraction-preview-row span,
.grid-extraction-preview-row p,
.grid-extraction-warnings {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grid-extraction-preview-row dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.grid-extraction-preview-row dl div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(22, 93, 85, 0.1);
  border-radius: 9px;
  background: rgba(244, 250, 247, 0.62);
}

.grid-extraction-preview-row dt {
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.grid-extraction-preview-row dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-extraction-warnings {
  margin: 0;
  padding-left: 18px;
}

.grid-upload-list {
  display: grid;
  gap: 7px;
}

.grid-upload-empty,
.grid-review-message {
  padding: 10px 11px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px;
  background: rgba(244, 250, 247, 0.82);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.grid-upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(22, 93, 85, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
}

.grid-screenshot-item {
  grid-template-columns: 70px minmax(0, 1fr) auto;
}

.grid-screenshot-item img,
.grid-screenshot-placeholder {
  width: 70px;
  height: 52px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 9px;
  background: #f4faf7;
  object-fit: cover;
}

.grid-screenshot-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.grid-upload-item.warning {
  border-color: rgba(189, 148, 81, 0.36);
  background: rgba(246, 239, 225, 0.7);
}

.grid-upload-item strong,
.grid-upload-item span {
  display: block;
}

.grid-upload-item strong {
  color: var(--ink);
  font-size: 13px;
}

.grid-upload-item span,
.grid-upload-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.grid-screenshot-item em {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-source-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(229, 242, 239, 0.78), rgba(255, 255, 255, 0.94));
}

.grid-source-summary strong {
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.grid-source-summary span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.grid-date-basis-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(244, 250, 247, 0.78);
}

.grid-date-basis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.grid-date-basis-head h4 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 16px;
}

.grid-date-basis-head p {
  max-width: 820px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.grid-date-basis-head label,
.grid-date-basis-fields label,
.grid-custom-date-fields label {
  display: grid;
  gap: 5px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.grid-date-basis-head input,
.grid-date-basis-fields input,
.grid-date-basis-fields select,
.grid-custom-date-fields input {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  font: 850 13px/1.2 Inter, "Segoe UI", Arial, sans-serif;
  text-transform: none;
}

.grid-date-basis-list {
  display: grid;
  gap: 10px;
}

.grid-date-basis-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(22, 93, 85, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

.grid-date-basis-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.grid-date-basis-card h5 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 15px;
}

.grid-date-basis-card header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.grid-date-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.grid-date-tags span {
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(22, 117, 104, 0.08);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.grid-date-tags span[data-found="false"] {
  background: #eef2f6;
  color: var(--muted);
}

.grid-date-basis-fields,
.grid-custom-date-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.grid-custom-date-fields {
  grid-template-columns: minmax(160px, 0.42fr) minmax(240px, 1fr);
}

.grid-date-basis-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.grid-date-basis-note[data-tone="review"],
.grid-date-basis-warnings p[data-tone="review"] {
  background: rgba(189, 148, 81, 0.18);
  color: #765821;
}

.grid-date-basis-warnings {
  display: grid;
  gap: 6px;
}

.grid-date-basis-warnings p {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.grid-review-loading {
  display: grid;
  place-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 26px;
  color: var(--brand-dark);
  text-align: center;
}

.grid-review-loading[hidden] {
  display: none;
}

.grid-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(22, 93, 85, 0.14);
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: grid-spin 850ms linear infinite;
}

@keyframes grid-spin {
  to {
    transform: rotate(360deg);
  }
}

.grid-overall-summary,
.grid-issue-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.grid-summary-tile,
.grid-issue-card {
  padding: 13px;
}

.grid-summary-tile span,
.grid-summary-tile em,
.grid-issue-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.grid-summary-tile strong,
.grid-issue-card strong {
  display: block;
  margin: 5px 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.grid-summary-tile[data-tone="good"] strong,
.grid-issue-card[data-tone="good"] strong {
  color: #11631f;
}

.grid-summary-tile[data-tone="review"] strong,
.grid-issue-card[data-tone="review"] strong {
  color: #8a641f;
}

.grid-summary-tile[data-tone="important"] strong,
.grid-issue-card[data-tone="important"] strong,
.grid-issue-card[data-tone="critical"] strong {
  color: #9d2118;
}

.grid-review-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
}

.grid-review-section-nav {
  position: sticky;
  top: 70px;
  align-self: start;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.grid-review-section-nav button {
  justify-content: flex-start;
  min-height: 34px;
  border-radius: 9px;
  font-size: 12px;
}

.grid-review-section-stack {
  display: grid;
  gap: 12px;
}

.grid-review-card {
  padding: 14px;
  scroll-margin-top: 74px;
}

.grid-section-head {
  margin-bottom: 12px;
}

.grid-section-head h3,
.grid-comp-review-card h4,
.grid-short-issue h4 {
  margin: 0;
  color: var(--brand-dark);
}

.grid-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grid-overview-layout,
.grid-comp-review-grid,
.grid-market-review dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grid-top-issues,
.grid-category-scores,
.grid-review-rules,
.grid-practical-review-block,
.grid-comp-review-card,
.grid-short-issue,
.grid-market-review,
.grid-final-review,
.grid-missing-list article {
  padding: 12px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.72);
}

.grid-top-issues h4 {
  margin: 0 0 8px;
  color: var(--ink);
}

.grid-top-issues ol,
.grid-top-issues ul,
.grid-review-rules ul,
.grid-practical-review-block ul,
.grid-final-review ol {
  margin: 0 0 10px;
  padding-left: 20px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

.grid-top-issues strong,
.grid-review-rules h4,
.grid-practical-review-block h4 {
  display: block;
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 950;
}

.grid-top-issues li,
.grid-review-rules li,
.grid-practical-review-block li {
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.42;
}

.grid-top-issues p,
.grid-final-review p,
.grid-market-review p,
.grid-comp-review-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.42;
}

.grid-review-summary-note {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px solid rgba(22, 93, 85, 0.12);
}

.grid-score-row {
  display: grid;
  grid-template-columns: 170px 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(22, 93, 85, 0.08);
  font-size: 13px;
  font-weight: 850;
}

.grid-score-row:last-child {
  border-bottom: 0;
}

.grid-score-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 93, 85, 0.12);
}

.grid-score-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f9f9a, #11631f);
}

.grid-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.grid-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.grid-two-col span {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.grid-two-col ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.42;
}

.grid-comp-review-card em,
.grid-short-issue em,
.grid-market-review em,
.grid-final-review em {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.38;
}

.grid-qa-review-list {
  display: grid;
  gap: 12px;
}

.grid-qa-card,
.grid-address-match,
.grid-qa-summary-block,
.grid-qa-list-block,
.grid-qa-overall-comment,
.grid-direct-qa article {
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.72);
}

.grid-qa-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.grid-qa-card.compact {
  gap: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.grid-comparable-issue-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 19px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
}

.grid-detailed-review {
  margin-top: 12px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 26px rgba(15, 82, 74, 0.06);
}

.grid-detailed-review summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 950;
}

.grid-detailed-review summary::marker {
  color: var(--brand);
}

.grid-detailed-review .grid-qa-review-list {
  padding: 0 12px 12px;
}

.grid-qa-summary-grid,
.grid-qa-detail-grid,
.grid-direct-qa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grid-qa-summary-block,
.grid-qa-list-block,
.grid-address-match,
.grid-qa-overall-comment,
.grid-direct-qa article {
  padding: 11px;
}

.grid-qa-summary-block h5,
.grid-qa-list-block h5,
.grid-address-match h5,
.grid-direct-qa h4 {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 950;
}

.grid-qa-summary-block dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin: 0;
}

.grid-qa-summary-block div {
  min-width: 0;
}

.grid-qa-summary-block dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.grid-qa-summary-block dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.grid-address-match[data-tone="good"] {
  border-color: rgba(17, 99, 31, 0.24);
  background: rgba(232, 246, 234, 0.7);
}

.grid-address-match[data-tone="important"] {
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(255, 244, 242, 0.74);
}

.grid-address-match p,
.grid-address-match em,
.grid-qa-overall-comment p,
.grid-direct-qa p,
.grid-direct-qa li,
.grid-qa-list-block li {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.42;
}

.grid-address-match p + p,
.grid-address-match em {
  margin-top: 5px;
}

.grid-address-match em {
  display: block;
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
}

.grid-qa-list-block ul,
.grid-direct-qa ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.grid-qa-overall-comment strong {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 13px;
}

.grid-review-table.grid-qa-table {
  min-width: 1080px;
}

.grid-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475467;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.grid-status-badge[data-tone="good"] {
  background: rgba(17, 99, 31, 0.1);
  color: #11631f;
}

.grid-status-badge[data-tone="review"] {
  background: rgba(189, 148, 81, 0.18);
  color: #765821;
}

.grid-status-badge[data-tone="important"],
.grid-status-badge[data-tone="critical"] {
  background: rgba(180, 35, 24, 0.1);
  color: #9d2118;
}

.grid-status-badge[data-tone="not_checked"] {
  background: #eef2f6;
  color: #667085;
}

.grid-table-wrap {
  overflow-x: auto;
}

.grid-review-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0 7px;
  font-size: 13px;
}

.grid-review-table.compact {
  min-width: 520px;
}

.grid-review-table th {
  padding: 7px 9px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.grid-review-table td {
  padding: 9px;
  border-top: 1px solid rgba(22, 93, 85, 0.12);
  border-bottom: 1px solid rgba(22, 93, 85, 0.12);
  background: rgba(255, 255, 255, 0.88);
  vertical-align: top;
}

.grid-review-table td:first-child {
  border-left: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px 0 0 10px;
}

.grid-review-table td:last-child {
  border-right: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 0 10px 10px 0;
}

.grid-issue-list,
.grid-missing-list {
  display: grid;
  gap: 8px;
}

.grid-short-issue > div {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.grid-short-issue p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.grid-market-review dl {
  margin: 10px 0;
}

.grid-market-review div {
  padding: 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.grid-market-review dt,
.grid-final-review span,
.grid-missing-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.grid-market-review dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.grid-grammar-actions {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.grid-missing-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-missing-list article {
  display: grid;
  gap: 7px;
  align-content: start;
}

.grid-missing-list strong {
  color: var(--ink);
  font-size: 13px;
}

.grid-missing-list span {
  text-transform: none;
  line-height: 1.35;
}

.grid-final-review {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
}

.grid-final-review strong {
  display: block;
  margin: 5px 0;
  color: var(--brand-dark);
  font-size: 22px;
}

.grid-final-review p {
  grid-column: 1 / -1;
}

body.grid-review-active .workspace,
body.grid-review-active .results-panel {
  display: none;
}

.ai-grid-review-screen {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto 48px;
  color: #1f2933;
}

.ai-grid-review-header,
.ai-grid-input-panel,
.ai-grid-check-panel,
.ai-grid-review-card,
.ai-grid-summary-card,
.ai-grid-rule-banner {
  background: #ffffff;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
}

.ai-grid-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 16px;
}

.ai-grid-review-header h2 {
  margin: 4px 0 8px;
  font-size: 2rem;
  line-height: 1.15;
}

.ai-grid-testing-label {
  color: #b42318;
  font-size: 0.95rem;
  font-weight: 900;
  vertical-align: middle;
}

.ai-grid-review-header p {
  max-width: 760px;
  margin: 0;
  color: #52616f;
}

.ai-grid-review-actions,
.ai-grid-submit-row,
.ai-grid-upload-row {
  display: flex;
  gap: 12px;
}

.ai-grid-review-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ai-grid-review-actions button.is-confirmed {
  border-color: rgba(15, 118, 110, 0.36);
  background: #e6f6f3;
  color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.ai-grid-rule-banner {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) 1fr;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border-left: 4px solid #0f766e;
}

.ai-grid-rule-banner span {
  color: #52616f;
}

.ai-grid-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.ai-grid-input-panel,
.ai-grid-check-panel,
.ai-grid-review-card {
  padding: 20px;
}

.ai-grid-upload-row {
  align-items: stretch;
}

.ai-grid-upload-box {
  flex: 1 1 0;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(15, 118, 110, 0.42);
  border-radius: 8px;
  background: #f8fbfb;
  cursor: pointer;
}

.ai-grid-upload-box:hover,
.ai-grid-upload-box:focus,
.ai-grid-upload-box.is-dragging {
  border-color: #0f766e;
  background: #eef8f7;
  outline: none;
}

.ai-grid-upload-box.is-dragging {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.ai-grid-upload-box span,
.ai-grid-summary-card span,
.ai-grid-mini-list span {
  color: #52616f;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ai-grid-upload-box strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.ai-grid-upload-box small,
.ai-grid-status {
  color: #697986;
}

.ai-grid-file-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.ai-grid-file-preview[hidden] {
  display: none;
}

.ai-grid-preview-item {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 78px;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.ai-grid-preview-item img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  display: block;
}

.ai-grid-preview-item small {
  display: block;
  padding: 5px 7px;
  overflow: hidden;
  color: #334155;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-grid-preview-item.is-file {
  align-content: center;
  justify-items: center;
  padding: 12px 8px 0;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.ai-grid-preview-more {
  display: grid;
  place-items: center;
  min-height: 78px;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f766e;
  font-weight: 900;
}

.ai-grid-notes-field {
  margin-top: 16px;
}

.ai-grid-notes-field textarea {
  min-height: 104px;
  resize: vertical;
}

.ai-grid-submit-row {
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.ai-grid-reading-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #eef8f7;
  color: #1f2933;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.ai-grid-reading-indicator[hidden] {
  display: none;
}

.ai-grid-reading-spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid rgba(15, 118, 110, 0.2);
  border-top-color: #0f766e;
  border-radius: 999px;
  animation: ai-grid-reading-spin 0.85s linear infinite;
}

.ai-grid-reading-copy {
  display: grid;
  gap: 2px;
}

.ai-grid-reading-copy strong {
  font-size: 0.95rem;
}

.ai-grid-reading-copy span {
  color: #52616f;
  font-size: 0.9rem;
}

.ai-grid-status.error {
  color: #b42318;
  font-weight: 700;
}

.ai-grid-status.success {
  color: #0f766e;
  font-weight: 700;
}

@keyframes ai-grid-reading-spin {
  to {
    transform: rotate(360deg);
  }
}


@media (prefers-reduced-motion: reduce) {
  .ai-grid-reading-spinner {
    animation: none;
    border-style: dashed;
  }
}

.ai-grid-check-panel h3,
.ai-grid-review-card h3 {
  margin: 0 0 12px;
}

.ai-grid-check-panel ul,
.ai-grid-issue-list ul,
.ai-grid-checklist ul,
.ai-grid-mini-list ul {
  margin: 0;
  padding-left: 20px;
}

.ai-grid-check-panel li,
.ai-grid-issue-list li,
.ai-grid-checklist li,
.ai-grid-mini-list li {
  margin: 8px 0;
}

.ai-grid-results {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.ai-grid-summary-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.ai-grid-summary-card div {
  min-width: 0;
}

.ai-grid-summary-card strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 1.35rem;
}

.ai-grid-review-text,
.ai-grid-empty {
  color: #40505d;
  line-height: 1.55;
}

.ai-grid-comparable-list {
  display: grid;
  gap: 12px;
}

.ai-grid-reference-list {
  display: grid;
  gap: 10px;
}

.ai-grid-comp-card {
  padding: 16px;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  background: #fbfcfd;
}

.ai-grid-comp-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ai-grid-comp-card header span {
  color: #0f766e;
  font-weight: 700;
  text-align: right;
}

.ai-grid-comp-card p {
  margin: 0 0 12px;
  color: #40505d;
  line-height: 1.55;
}

.ai-grid-extraction-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-grid-extraction-fields span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: #f5f8fa;
  color: #52616f;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ai-grid-extraction-fields strong {
  color: #1f2933;
  font-size: 1rem;
  text-transform: none;
}

.ai-grid-reference-row {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.ai-grid-reference-row span,
.ai-grid-reference-row small {
  overflow-wrap: anywhere;
  color: #52616f;
}

.ai-grid-mini-list {
  margin-top: 12px;
}

.ai-grid-review-screen.is-running .ai-grid-upload-box {
  opacity: 0.64;
  cursor: wait;
}

body.ai-grid-review-active .workspace,
body.ai-grid-review-active .results-panel {
  display: none;
}

@media (max-width: 1180px) {
  .ai-grid-review-layout {
    grid-template-columns: 1fr;
  }

  .grid-overall-summary,
  .grid-issue-cards,
  .grid-missing-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-review-layout {
    grid-template-columns: 1fr;
  }

  .grid-review-section-nav {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    overflow-x: auto;
  }

  .grid-review-section-nav button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}


@media (max-width: 760px) {
  .ai-grid-review-screen {
    width: min(100%, calc(100vw - 24px));
  }

  .ai-grid-review-header,
  .ai-grid-upload-row {
    flex-direction: column;
  }

  .ai-grid-review-actions {
    justify-content: flex-start;
  }

  .ai-grid-rule-banner,
  .ai-grid-summary-card,
  .ai-grid-extraction-fields {
    grid-template-columns: 1fr;
  }

  .grid-review-screen {
    padding: 14px;
  }

  .grid-review-header,
  .grid-review-header-actions,
  .grid-help-content,
  .grid-upload-options,
  .grid-upload-actions,
  .grid-upload-inline-actions,
  .grid-overview-layout,
  .grid-comp-review-grid,
  .grid-extraction-preview-head,
  .grid-extraction-preview-row header,
  .grid-extraction-preview-row dl,
  .grid-market-review dl,
  .grid-qa-summary-grid,
  .grid-qa-detail-grid,
  .grid-direct-qa,
  .grid-two-col,
  .grid-final-review {
    display: grid;
    grid-template-columns: 1fr;
  }

  .grid-qa-summary-block dl {
    grid-template-columns: 1fr;
  }

  .grid-overall-summary,
  .grid-issue-cards,
  .grid-missing-list {
    grid-template-columns: 1fr;
  }

  .grid-review-header h2 {
    font-size: 24px;
  }

  .grid-help-panel summary {
    align-items: flex-start;
  }

  .grid-help-panel summary em {
    display: none;
  }

  .grid-file-chip {
    display: grid;
  }

  .grid-file-chip input {
    width: 100%;
  }

  .grid-date-basis-head,
  .grid-date-basis-card header,
  .grid-date-basis-fields,
  .grid-custom-date-fields {
    display: grid;
    grid-template-columns: 1fr;
  }

  .grid-screenshot-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .grid-screenshot-item button {
    grid-column: 1 / -1;
  }

  .grid-screenshot-item img,
  .grid-screenshot-placeholder {
    width: 56px;
    height: 44px;
  }

  .grid-score-row {
    grid-template-columns: 1fr auto;
  }

  .grid-score-row div {
    grid-column: 1 / -1;
  }

  .grid-final-review p {
    grid-column: auto;
  }
}

.floor-plan-screen {
  min-height: calc(100vh - 58px);
  padding: 22px;
}

.floor-plan-header,
.floor-plan-toolbar,
.floor-plan-warning-panel,
.floor-plan-layout,
.floor-table-card {
  max-width: 1480px;
  margin-right: auto;
  margin-left: auto;
}

.floor-plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.floor-plan-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.floor-plan-header p {
  max-width: 850px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.floor-plan-header-actions,
.floor-inline-actions,
.floor-tool-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.floor-plan-header-actions {
  justify-content: flex-end;
  max-width: 620px;
}

.floor-plan-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.floor-tool-group {
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(22, 93, 85, 0.1);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.84);
}

.floor-plan-toolbar button,
.floor-plan-header-actions button,
.floor-inline-actions button,
.floor-table-actions button,
.floor-manual-dimensions button {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
}

.floor-plan-toolbar button:hover,
.floor-plan-header-actions button:hover,
.floor-inline-actions button:hover,
.floor-table-actions button:hover,
.floor-manual-dimensions button:hover {
  border-color: rgba(22, 93, 85, 0.36);
  background: var(--brand-soft);
}

.floor-plan-header-actions .floor-page-primary-action {
  border-color: rgba(22, 93, 85, 0.34);
  background: linear-gradient(180deg, #187568, #0f5f56);
  color: #ffffff;
}

.floor-plan-header-actions .floor-page-primary-action:hover {
  border-color: rgba(11, 63, 58, 0.5);
  background: linear-gradient(180deg, #1b8375, #11685e);
}

.floor-tool-button.active {
  border-color: var(--brand);
  background: linear-gradient(180deg, #187568, #0f5f56);
  color: #ffffff;
}

.floor-plan-toolbar 
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.floor-plan-warning-panel {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(189, 148, 81, 0.32);
  border-radius: 12px;
  background: rgba(246, 239, 225, 0.9);
  color: #725927;
  font-size: 12px;
  font-weight: 850;
}

.floor-plan-layout {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) minmax(320px, 390px);
  gap: 14px;
}

.floor-plan-canvas-card,
.floor-side-card,
.floor-table-card {
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.floor-plan-canvas-card {
  overflow: hidden;
}

.floor-level-bar {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-bottom: 1px solid rgba(22, 93, 85, 0.12);
  background: rgba(237, 247, 242, 0.82);
}

.floor-scale-status {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 10px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.floor-canvas-shell {
  position: relative;
  min-height: 640px;
  background:
    radial-gradient(circle at 20% 10%, rgba(22, 93, 85, 0.06), transparent 32%),
    #f8fbfa;
}

.floor-plan-svg {
  display: block;
  width: 100%;
  height: min(68vh, 720px);
  min-height: 560px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 29l5-2L29 6l-3-3L5 24z' fill='%23111111' stroke='%23ffffff' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M22 7l3 3M5 24l3 3' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E") 3 29, crosshair;
  touch-action: none;
  user-select: none;
}

.floor-canvas-help {
  position: absolute;
  right: 14px;
  bottom: 14px;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  box-shadow: var(--shadow);
}

.floor-grid-bg {
  fill: url(#floorGridLarge);
}

.floor-area-group {
  cursor: pointer;
}

.floor-area-shape {
  fill-opacity: 0.2;
  stroke: #163b35;
  stroke-width: 2.5;
  transition: fill-opacity 0.15s ease, stroke-width 0.15s ease;
}

.floor-area-shape.low {
  stroke-dasharray: 9 6;
}

.floor-area-shape.medium {
  stroke-dasharray: 0;
}

.floor-area-group.selected .floor-area-shape {
  fill-opacity: 0.32;
  stroke-width: 4;
  filter: drop-shadow(0 8px 14px rgba(16, 24, 40, 0.18));
}

.floor-area-point {
  fill: #ffffff;
  stroke: var(--brand-dark);
  stroke-width: 2;
}

.floor-area-label {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 950;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.84);
  stroke-width: 4px;
}

.floor-area-sub-label {
  fill: var(--muted);
  font-size: 14px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.84);
  stroke-width: 4px;
}

.floor-preview-shape,
.floor-preview-line {
  fill: rgba(189, 148, 81, 0.12);
  stroke: var(--focus);
  stroke-width: 3;
  stroke-dasharray: 8 5;
}

.floor-preview-point {
  fill: var(--focus);
  stroke: #ffffff;
  stroke-width: 2;
}

.floor-plan-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.floor-side-card,
.floor-table-card {
  padding: 14px;
}

.floor-side-card h3,
.floor-table-card h3,
.floor-manual-dimensions h4,
.floor-summary-panel h4 {
  margin: 0;
  color: var(--brand-dark);
}

.floor-card-note {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.floor-scale-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.floor-selected-panel,
.floor-summary-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.floor-empty-panel,
.floor-selected-readout,
.floor-summary-total,
.floor-manual-dimensions {
  padding: 11px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.86);
}

.floor-empty-panel strong,
.floor-selected-readout span,
.floor-summary-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.floor-selected-readout strong,
.floor-summary-total strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.08;
}

.floor-selected-readout em,
.floor-summary-total em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.floor-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.floor-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.floor-checkbox-grid input {
  accent-color: var(--brand);
}

.floor-manual-dimensions {
  display: grid;
  gap: 9px;
}

.floor-selected-warnings {
  display: grid;
  gap: 6px;
}

.floor-selected-warnings div {
  padding: 8px 9px;
  border: 1px solid rgba(189, 148, 81, 0.24);
  border-radius: 9px;
  background: rgba(246, 239, 225, 0.78);
  color: #725927;
  font-size: 12px;
  font-weight: 850;
}

.floor-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(22, 93, 85, 0.1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.floor-summary-row strong {
  color: var(--ink);
}

.floor-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.floor-dimension-page-card {
  display: grid;
  gap: 12px;
}

.floor-saved-sketch-list {
  display: grid;
  gap: 8px;
}

.floor-saved-empty,
.floor-page-empty,
.floor-saved-sketch {
  padding: 10px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.86);
}

.floor-saved-empty,
.floor-page-empty {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.floor-saved-empty strong,
.floor-page-empty strong,
.floor-saved-sketch strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.floor-saved-sketch {
  display: grid;
  gap: 9px;
}

.floor-saved-sketch span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.floor-saved-sketch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.floor-saved-sketch-actions button {
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 9px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.floor-saved-sketch-actions button:hover {
  border-color: rgba(22, 93, 85, 0.34);
  background: var(--brand-soft);
}

.floor-dimension-page-preview {
  display: grid;
}

.floor-page-sheet {
  display: grid;
  gap: 12px;
  aspect-ratio: 8.5 / 11;
  padding: 14px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(16, 24, 40, 0.12);
}

.floor-page-sheet.one-sketch {
  align-content: center;
}

.floor-page-sheet.two-sketches {
  grid-template-rows: 1fr 1fr;
}

.floor-page-sketch-preview {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 8px;
  background: #fbfdfc;
}

.floor-page-sketch-preview h4 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.1;
}

.floor-page-sketch-preview svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  border-radius: 6px;
  background: #f8fbfa;
}

.floor-page-grid-bg {
  fill: rgba(22, 93, 85, 0.035);
}

.floor-table-card {
  margin-top: 14px;
}

.floor-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.floor-table-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.floor-area-table-wrap {
  overflow-x: auto;
}

.floor-area-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: separate;
  border-spacing: 0 7px;
  font-size: 13px;
}

.floor-area-table th {
  padding: 8px 10px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.floor-area-table td {
  padding: 10px;
  border-top: 1px solid rgba(22, 93, 85, 0.12);
  border-bottom: 1px solid rgba(22, 93, 85, 0.12);
  background: rgba(255, 255, 255, 0.9);
  vertical-align: top;
}

.floor-area-table tr.selected td {
  background: rgba(229, 242, 239, 0.95);
}

.floor-area-table td:first-child {
  border-left: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px 0 0 10px;
}

.floor-area-table td:last-child {
  border-right: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 0 10px 10px 0;
}

.floor-area-table td strong,
.floor-area-table td span {
  display: block;
}

.floor-area-table td span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.floor-confidence-pill {
  display: inline-flex !important;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(22, 93, 85, 0.1);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 950;
}

.floor-confidence-pill.low {
  background: rgba(180, 35, 24, 0.1);
  color: #9d2118;
}

.floor-confidence-pill.medium {
  background: rgba(189, 148, 81, 0.18);
  color: #765821;
}

.floor-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.floor-plan-active .workspace,
body.floor-plan-active .results-panel {
  display: none;
}

.building-footprint-screen {
  min-height: calc(100vh - 58px);
  padding: 18px 22px 92px;
}

.footprint-topbar,
.footprint-status-panel,
.footprint-layout,
.footprint-table-card {
  max-width: 1480px;
  margin-right: auto;
  margin-left: auto;
}

.footprint-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.footprint-title-block h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 26px;
  line-height: 1.08;
}

.footprint-title-block p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.footprint-top-actions,
.footprint-canvas-toolbar,
.footprint-form-actions,
.footprint-angle-snaps,
.footprint-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.footprint-top-actions:empty {
  display: none;
}

.footprint-topbar button,
.footprint-canvas-toolbar button,
.footprint-form-actions button,
.footprint-angle-snaps button,
.footprint-table-actions button,
.footprint-bottom-summary button {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
}

.footprint-topbar button:hover,
.footprint-canvas-toolbar button:hover,
.footprint-form-actions button:hover,
.footprint-angle-snaps button:hover,
.footprint-table-actions button:hover {
  border-color: rgba(22, 93, 85, 0.36);
  background: var(--brand-soft);
}

.footprint-topbar .footprint-page-primary-action {
  border-color: rgba(22, 93, 85, 0.34);
  background: linear-gradient(180deg, #187568, #0f5f56);
  color: #ffffff;
}

.footprint-topbar .footprint-page-primary-action:hover {
  border-color: rgba(11, 63, 58, 0.5);
  background: linear-gradient(180deg, #1b8375, #11685e);
}

.footprint-canvas-toolbar button.active {
  border-color: rgba(22, 117, 104, 0.44);
  background: #e5f5f1;
  color: #0b3f3a;
  box-shadow: 0 10px 22px rgba(22, 117, 104, 0.16);
}

.footprint-status-panel {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(189, 148, 81, 0.3);
  border-radius: 12px;
  background: rgba(246, 239, 225, 0.9);
  color: #725927;
  font-size: 12px;
  font-weight: 850;
}

.footprint-status-panel.error {
  border-color: rgba(180, 35, 24, 0.3);
  background: rgba(255, 241, 240, 0.92);
  color: #9d2118;
}

.footprint-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(310px, 380px);
  gap: 14px;
  transition: grid-template-columns 200ms ease, gap 200ms ease;
}

.footprint-layout.is-side-collapsed {
  grid-template-columns: minmax(620px, 1fr) 0px;
  gap: 0;
}

.footprint-canvas-card,
.footprint-card,
.footprint-table-card {
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.footprint-canvas-card {
  overflow: hidden;
}

.footprint-canvas-toolbar {
  padding: 12px;
  border-bottom: 1px solid rgba(22, 93, 85, 0.12);
  background: rgba(237, 247, 242, 0.84);
}

.footprint-deduction-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(180, 83, 9, 0.2);
  border-radius: 10px;
  background: #fffaf0;
}

.footprint-deduction-controls select,
.footprint-deduction-controls button {
  min-height: 36px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.footprint-deduction-controls select {
  border: 1px solid rgba(180, 83, 9, 0.25);
  background: #ffffff;
  color: #7c2d12;
  padding: 0 9px;
}

.footprint-deduction-controls button.active {
  border-color: #b45309;
  background: #b45309;
  color: #ffffff;
}

.footprint-canvas-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.footprint-snap-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 950;
}

.footprint-snap-toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--brand);
}


.footprint-canvas-toolbar .footprint-add-page-icon {
  min-width: 156px;
  margin-left: auto; /* add-to-page-right */
  border-color: rgba(22, 93, 85, 0.36);
  background: linear-gradient(180deg, #187568, #0f5f56);
  color: #ffffff;
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(11, 63, 58, 0.18);
}

.footprint-canvas-toolbar .footprint-add-page-icon:hover {
  border-color: rgba(11, 63, 58, 0.5);
  background: linear-gradient(180deg, #1b8375, #11685e);
  color: #ffffff;
}

.footprint-canvas-toolbar .footprint-add-page-icon:disabled {
  opacity: 0.78;
  filter: saturate(0.85);
}
.footprint-new-sketch-inline {
  min-width: 118px;
}

.footprint-unit-tool {
  display: inline-grid;
  grid-template-columns: auto minmax(86px, 108px);
  gap: 7px;
  align-items: center;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.footprint-unit-tool span {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.footprint-unit-tool select {
  min-height: 28px;
  padding: 4px 24px 4px 8px;
  border-radius: 8px;
  font-size: 12px;
}

.footprint-canvas-shell {
  position: relative;
  min-height: 680px;
  background: #ffffff;
}

.footprint-sketch-tools {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  display: grid;
  gap: 8px;
  width: max-content;
  pointer-events: auto;
}

.footprint-canvas-tool {
  position: relative;
  display: grid !important;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 5px !important;
  border: 1px solid rgba(22, 93, 85, 0.18) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--brand-dark) !important;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.12) !important;
  backdrop-filter: blur(8px);
  cursor: pointer;
  text-align: left;
}

.footprint-canvas-tool:hover {
  border-color: rgba(22, 117, 104, 0.42) !important;
  background: #e9f7f3 !important;
}

.footprint-canvas-tool.active {
  border-color: #0b3f3a !important;
  background: #0b3f3a !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(11, 63, 58, 0.28) !important;
}

.footprint-canvas-tool.footprint-snap-toggle input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.footprint-tool-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(22, 117, 104, 0.1);
  color: #0b3f3a;
}

.footprint-canvas-tool.active .footprint-tool-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.footprint-tool-icon svg {
  width: 20px;
  height: 20px;
}

.footprint-tool-copy {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  z-index: 2;
  display: grid;
  gap: 3px;
  width: 204px;
  padding: 9px 10px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.footprint-canvas-tool:hover .footprint-tool-copy,
.footprint-canvas-tool:focus-within .footprint-tool-copy,
.footprint-canvas-tool:focus .footprint-tool-copy {
  opacity: 1;
  transform: translateX(0);
}

.footprint-tool-copy strong {
  color: currentColor;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.05;
}

.footprint-tool-copy em {
  color: #5f706d;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.footprint-canvas-tool.active .footprint-tool-copy em {
  color: #5f706d;
}

.footprint-sketch-history {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(8px);
}

.footprint-sketch-history .icon-only {
  width: 34px;
  min-height: 34px;
  padding: 7px;
  border-radius: 10px;
  border-color: rgba(22, 93, 85, 0.18);
  background: #ffffff;
  color: var(--brand-dark);
}

.footprint-sketch-history .icon-only .button-label {
  display: none;
}

.footprint-sketch-history .icon-only:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.footprint-sketch-actions {
  position: absolute;
  top: 106px;
  right: 14px;
  z-index: 30;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(8px);
  transform: none;
}

.footprint-sketch-actions .icon-only {
  width: 34px;
  min-height: 34px;
  border-radius: 10px;
  border-color: rgba(22, 93, 85, 0.18);
  background: #ffffff;
  color: var(--brand-dark);
}

.footprint-sketch-actions .icon-only:hover {
  border-color: rgba(22, 117, 104, 0.42);
  background: #e9f7f3;
  color: #0b3f3a;
}

.footprint-sketch-actions .icon-only.is-active {
  border-color: rgba(22, 117, 104, 0.45);
  background: #e8f7f3;
  color: #006b63;
  box-shadow: inset 0 0 0 1px rgba(22, 117, 104, 0.12);
}

.footprint-sketch-actions .icon-only[aria-pressed="false"] {
  color: #6b7b86;
  background: #ffffff;
}

.footprint-svg.is-grid-hidden .footprint-grid-background {
  display: none;
}

.footprint-sketch-actions .footprint-add-page-icon {
  width: auto;
  min-width: 128px;
  min-height: 38px;
  padding: 0 13px;
  gap: 8px;
  border-color: rgba(22, 93, 85, 0.34);
  background: linear-gradient(180deg, #187568, #0f5f56);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(11, 63, 58, 0.22);
}

.footprint-sketch-actions .footprint-add-page-icon .button-label {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.footprint-sketch-actions .footprint-add-page-icon:disabled {
  opacity: 0.78;
  filter: saturate(0.85);
}

.footprint-sketch-actions .footprint-add-page-icon:hover {
  border-color: rgba(11, 63, 58, 0.5);
  background: linear-gradient(180deg, #1b8375, #11685e);
  color: #ffffff;
}

.footprint-sketch-actions .footprint-add-page-icon.is-working {
  opacity: 0.68;
}



.footprint-add-page-note {
  position: absolute;
  top: 60px;
  right: 12px;
  z-index: 29;
  width: min(280px, calc(100% - 24px));
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(17, 44, 49, 0.12);
  color: #31495c;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.footprint-page-modal-note {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.footprint-svg {
  display: block;
  width: 100%;
  height: min(70vh, 760px);
  min-height: 600px;
  background: #ffffff;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 29l5-2L29 6l-3-3L5 24z' fill='%23111111' stroke='%23ffffff' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M22 7l3 3M5 24l3 3' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E") 3 29, crosshair;
  touch-action: none;
  user-select: none;
}

.footprint-svg.is-deduction-mode {
  cursor: crosshair;
}

.footprint-deduction {
  cursor: pointer;
}

.footprint-deduction rect {
  fill: rgba(245, 158, 11, 0.2);
  stroke: #b45309;
  stroke-width: 2.4;
  stroke-dasharray: 9 6;
  vector-effect: non-scaling-stroke;
}

.footprint-deduction.selected rect {
  fill: rgba(234, 88, 12, 0.24);
  stroke: #9a3412;
  stroke-width: 4;
}

.footprint-deduction.preview rect {
  fill: rgba(245, 158, 11, 0.12);
  stroke-dasharray: 5 5;
}

.footprint-deduction text {
  fill: #7c2d12;
  font-size: 14px;
  font-weight: 900;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 3px;
}

.footprint-deduction-size {
  font-size: 12px;
}

.footprint-empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 5px;
  min-width: 260px;
  padding: 15px 17px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  box-shadow: var(--shadow);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.footprint-empty-state strong {
  color: var(--brand-dark);
  font-size: 16px;
}

.footprint-area-fill {
  fill: rgba(22, 117, 104, 0.12);
  stroke: none;
}

.footprint-segment {
  fill: none;
  stroke: #2f3a45;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
}

.footprint-segment.selected {
  stroke: #167568;
  stroke-width: 6;
  filter: drop-shadow(0 6px 10px rgba(22, 93, 85, 0.18));
}

.footprint-segment.custom-angle {
  stroke-dasharray: 12 6;
}

.footprint-segment.resizable-edge {
  cursor: grab;
}

.footprint-segment.resizable-edge:hover,
.footprint-segment.resizable-edge.selected {
  stroke-width: 7;
}

.footprint-svg:has(.footprint-segment.resizable-edge:active) {
  cursor: grabbing;
}

.footprint-closure-gap {
  stroke: #b42318;
  stroke-width: 3;
  stroke-dasharray: 9 7;
  stroke-linecap: round;
}

.footprint-preview-line {
  stroke: #bd9451;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 12 8;
  pointer-events: none;
}

.footprint-preview-line.pending {
  stroke: #167568;
  stroke-dasharray: 5 6;
}

.footprint-preview-line.closing {
  stroke: #b42318;
}

.footprint-curve-preview {
  fill: none;
  stroke: #0f9f9a;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 8;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(15, 159, 154, 0.18));
}

.footprint-curve-depth-line {
  stroke: rgba(15, 159, 154, 0.7);
  stroke-width: 2.5;
  stroke-dasharray: 6 5;
  pointer-events: none;
}

.footprint-curve-handle {
  fill: #0f9f9a;
  stroke: #ffffff;
  stroke-width: 4;
  pointer-events: none;
  filter: drop-shadow(0 5px 10px rgba(15, 159, 154, 0.3));
}

.footprint-curve-depth-label {
  pointer-events: none;
}

.footprint-curve-depth-label rect {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(15, 159, 154, 0.42);
  stroke-width: 1.4;
  filter: drop-shadow(0 4px 8px rgba(16, 24, 40, 0.12));
}

.footprint-curve-depth-label text {
  fill: #0b3f3a;
  font-size: 13px;
  font-weight: 950;
}

.footprint-preview-label {
  pointer-events: none;
}

.footprint-preview-label rect {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(189, 148, 81, 0.52);
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 8px rgba(16, 24, 40, 0.14));
}

.footprint-preview-label text {
  fill: #765821;
  font-size: 14px;
  font-weight: 950;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3px;
}

.footprint-node {
  fill: #ffffff;
  stroke: #2f3a45;
  stroke-width: 3;
}

.footprint-node-start {
  fill: #167568;
  stroke: #ffffff;
  stroke-width: 4;
}

.footprint-node-current {
  fill: #bd9451;
  stroke: #ffffff;
  stroke-width: 4;
}

.footprint-node-closed {
  fill: #167568;
  stroke: #ffffff;
  stroke-width: 4;
}

.footprint-dimension-label {
  cursor: pointer;
}

.footprint-dimension-label rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(22, 93, 85, 0.2);
  stroke-width: 1.3;
  filter: drop-shadow(0 4px 8px rgba(16, 24, 40, 0.12));
}

.footprint-dimension-label:hover rect,
.footprint-dimension-label:focus rect {
  fill: #f4faf7;
  stroke: #167568;
  stroke-width: 2;
}

.footprint-dimension-label:focus {
  outline: none;
}

.footprint-dimension-label.selected rect {
  stroke: #167568;
  stroke-width: 2;
}

.footprint-dimension-label text {
  fill: var(--brand-dark);
  font-size: 16px;
  font-weight: 950;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 3px;
}

.footprint-dimension-editor {
  overflow: visible;
}

.footprint-dimension-editor-box {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 64px) auto minmax(0, 64px) auto;
  align-items: center;
  gap: 5px;
  width: 100%;
  height: 100%;
  padding: 5px 8px;
  border: 1.6px solid #bd9451;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.16);
}

.footprint-dimension-editor-box.metric {
  grid-template-columns: minmax(0, 76px) auto;
}

.footprint-dimension-editor-box input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: none;
}

.footprint-dimension-editor-box input:focus {
  border-color: #bd9451;
  box-shadow: 0 0 0 2px rgba(189, 148, 81, 0.2);
  outline: none;
}

.footprint-dimension-editor-box span {
  color: #334155;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.footprint-plan-label {
  cursor: text;
  pointer-events: auto;
}

.footprint-plan-label rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(11, 63, 58, 0.48);
  stroke-width: 1.7;
  filter: drop-shadow(0 8px 14px rgba(16, 24, 40, 0.13));
}

.footprint-plan-label text {
  fill: var(--brand-dark);
  font-size: 16px;
  font-weight: 950;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3px;
}
.footprint-plan-label:hover rect,
.footprint-plan-label:focus-visible rect {
  stroke: rgba(0, 107, 99, 0.72);
  stroke-width: 2.1;
}

.footprint-plan-label-editor {
  overflow: visible;
}

.footprint-plan-label-editor-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 4px;
  box-sizing: border-box;
}

.footprint-plan-label-editor-box input {
  width: 100%;
  min-height: 36px;
  border: 1.8px solid rgba(11, 63, 58, 0.56);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--brand-dark);
  font-size: 16px;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 10px 20px rgba(16, 24, 40, 0.14);
}

.footprint-plan-label-editor-box input:focus {
  border-color: #bd9451;
  box-shadow: 0 0 0 3px rgba(189, 148, 81, 0.2), 0 10px 20px rgba(16, 24, 40, 0.14);
  outline: none;
}

.footprint-side-panel {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  overflow: visible;
}

.footprint-side-panel > :not(.footprint-side-toggle) {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 180ms ease, transform 200ms ease;
}

.footprint-layout.is-side-collapsed .footprint-side-panel > :not(.footprint-side-toggle) {
  opacity: 0;
  transform: translateX(14px);
  pointer-events: none;
  visibility: hidden;
}

.footprint-side-toggle {
  position: absolute;
  top: 18px;
  left: -18px;
  z-index: 5;
  width: 30px;
  height: 54px;
  border: 1px solid rgba(22, 93, 85, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 200ms ease;
}

.footprint-side-toggle:hover,
.footprint-side-toggle:focus-visible {
  border-color: rgba(22, 93, 85, 0.42);
  background: var(--brand-soft);
  color: #006b63;
  outline: none;
}

.footprint-layout.is-side-collapsed .footprint-side-toggle {
  position: fixed;
  top: 46%;
  right: 14px;
  left: auto;
  z-index: 80;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(-50%);
}

.footprint-segment-input-card {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.footprint-card,
.footprint-table-card {
  padding: 14px;
}

.footprint-card h3,
.footprint-table-card h3 {
  margin: 0;
  color: var(--brand-dark);
}


.footprint-side-page-card {
  gap: 10px;
}

.footprint-side-page-head h3 {
  margin: 0 0 5px;
}

.footprint-side-page-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.footprint-side-page-actions button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: #0b3f3a;
  font-size: 12px;
  font-weight: 850;
}

.footprint-side-page-actions button:hover {
  border-color: rgba(22, 93, 85, 0.36);
  background: var(--brand-soft);
}

.footprint-side-page-card .footprint-saved-sketch-list {
  max-height: 290px;
  overflow: auto;
  padding-right: 2px;
}

.footprint-side-page-card .footprint-page-sheet {
  width: 100%;
  padding: 10px;
  gap: 8px;
}

.footprint-side-page-card .footprint-page-sketch-preview {
  padding: 8px;
}

.footprint-side-page-card .footprint-page-sketch-preview img {
  min-height: 74px;
}
.footprint-page-card {
  display: grid;
  gap: 12px;
}

.footprint-page-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.footprint-saved-sketch-list {
  display: grid;
  gap: 8px;
}

.footprint-page-empty,
.footprint-saved-sketch {
  padding: 10px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.86);
}

.footprint-page-empty {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.footprint-page-empty strong,
.footprint-saved-sketch strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.footprint-saved-sketch {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.footprint-saved-sketch img {
  width: 74px;
  height: 52px;
  object-fit: contain;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.footprint-saved-sketch span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.footprint-saved-sketch-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.footprint-saved-sketch-actions button {
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 9px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.footprint-saved-sketch-actions button:hover {
  border-color: rgba(22, 93, 85, 0.34);
  background: var(--brand-soft);
}

.footprint-dimension-page-preview {
  display: grid;
}

.footprint-page-sheet {
  display: grid;
  gap: 12px;
  aspect-ratio: 8.5 / 11;
  padding: 14px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(16, 24, 40, 0.12);
}

.footprint-page-sheet.one-sketch {
  align-content: center;
}

.footprint-page-sheet.two-sketches {
  grid-template-rows: 1fr 1fr;
}

.footprint-page-sheet.three-sketches {
  grid-template-rows: repeat(3, 1fr);
}

.footprint-page-sketch-preview {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 8px;
  background: #fbfdfc;
}

.footprint-page-sketch-preview h4 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.1;
}

.footprint-page-sketch-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 130px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
}

.footprint-page-modal[hidden] {
  display: none;
}

.footprint-page-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.footprint-page-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(3px);
}

.footprint-page-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, auto) minmax(0, 1fr);
  gap: 12px;
  width: min(920px, calc(100vw - 36px));
  max-height: min(94vh, 980px);
  padding: 16px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.26);
  overflow: auto;
}

.footprint-page-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.footprint-page-modal-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 24px;
}


.footprint-page-order-label {
  display: block;
  margin-top: 4px;
  color: #0f766e;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.footprint-saved-sketch.is-on-page,
.footprint-page-sketch-preview[draggable="true"] {
  cursor: grab;
}

.footprint-saved-sketch.is-dragging,
.footprint-page-sketch-preview.is-dragging {
  opacity: 0.55;
}

.footprint-saved-sketch.is-drag-over,
.footprint-page-sketch-preview.is-drag-over {
  outline: 3px solid rgba(15, 118, 110, 0.34);
  outline-offset: 3px;
  background: rgba(232, 247, 243, 0.95);
}

.footprint-page-drag-hint {
  display: inline-flex;
  margin: -4px 0 8px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}
.footprint-page-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.footprint-page-modal-actions button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.footprint-page-modal-actions button:hover {
  border-color: rgba(22, 93, 85, 0.36);
  background: var(--brand-soft);
}

.footprint-page-modal .footprint-saved-sketch-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.footprint-page-modal .footprint-page-sheet {
  width: min(520px, 100%);
  margin: 0 auto;
}

body.footprint-page-modal-open {
  overflow: hidden;
}

.footprint-plan-label-card {
  display: grid;
  gap: 10px;
}

.footprint-ai-card {
  display: grid;
  gap: 12px;
}

.footprint-ai-head h3 {
  margin: 0;
}

.footprint-ai-head p,
.footprint-ai-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.38;
}

.footprint-ai-paste-zone {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 13px;
  border: 1.5px dashed rgba(22, 93, 85, 0.28);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(244, 250, 247, 0.92), rgba(255, 255, 255, 0.98));
  cursor: copy;
}

.footprint-ai-paste-zone:focus,
.footprint-ai-paste-zone:hover {
  border-color: rgba(22, 117, 104, 0.56);
  background: #f1f8f6;
  outline: none;
}

.footprint-ai-paste-zone.has-image {
  border-style: solid;
  border-color: rgba(22, 117, 104, 0.36);
}

.footprint-ai-paste-zone.error {
  border-color: rgba(180, 35, 24, 0.52);
  background: #fff7f5;
}

.footprint-ai-paste-zone strong {
  color: var(--brand-dark);
  font-size: 13px;
}

.footprint-ai-paste-zone span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.footprint-ai-paste-zone img {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 10px;
  background: #fff;
}

.footprint-ai-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.footprint-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.footprint-file-button:hover {
  border-color: rgba(22, 93, 85, 0.36);
  background: var(--brand-soft);
}

.footprint-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.footprint-ai-status.error {
  color: #9d2118;
}

.footprint-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.footprint-inline-check input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--brand);
}

.footprint-segment-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.footprint-length-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.footprint-length-split[hidden] {
  display: none;
}

.footprint-length-split .field {
  margin: 0;
}

.footprint-angle-snaps button {
  min-width: 58px;
  min-height: 32px;
  padding: 5px 9px;
  line-height: 1;
}

.footprint-closure-card {
  display: none;
}

.footprint-input-note {
  padding: 9px 10px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px;
  background: rgba(244, 250, 247, 0.84);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.footprint-closure-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.footprint-readout {
  padding: 11px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.9);
}

.footprint-readout.warn {
  border-color: rgba(189, 148, 81, 0.3);
  background: rgba(246, 239, 225, 0.82);
}

.footprint-readout span,
.footprint-mini-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.footprint-readout strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.08;
}

.footprint-readout em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
  line-height: 1.35;
}

.footprint-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.footprint-mini-grid div {
  padding: 9px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px;
  background: #ffffff;
}

.footprint-mini-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 14px;
}

.footprint-export-card {
  position: fixed;
  top: 84px;
  right: 22px;
  z-index: 6400;
  gap: 12px;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100vh - 112px);
  overflow: auto;
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 247, 0.96)),
    #ffffff;
  box-shadow:
    0 24px 58px rgba(5, 18, 28, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.footprint-export-card[hidden] {
  display: none;
}

.footprint-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.footprint-export-head div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footprint-export-head span {
  padding: 5px 9px;
  border: 1px solid rgba(22, 93, 85, 0.14);
  border-radius: 999px;
  background: rgba(244, 250, 247, 0.9);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.footprint-export-head span.warn {
  border-color: rgba(189, 148, 81, 0.28);
  background: rgba(246, 239, 225, 0.9);
  color: #8a5b16;
}

.footprint-export-close {
  display: inline-grid;
  place-items: center;
  width: 31px;
  min-height: 31px;
  padding: 0;
  border-radius: 9px;
  box-shadow: none;
}

.footprint-export-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.footprint-export-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 7px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #40514e;
  font-size: 11px;
  font-weight: 850;
}

.footprint-export-options input {
  width: 14px;
  min-height: 14px;
  margin: 0;
  accent-color: var(--brand);
}

.footprint-export-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.footprint-export-actions button {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}

.footprint-export-actions button[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
}

.footprint-table-card {
  margin-top: 14px;
}

.footprint-table-wrap {
  overflow-x: auto;
}

.footprint-empty-table {
  padding: 14px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.86);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.footprint-segment-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0 7px;
  font-size: 13px;
}

.footprint-segment-table th {
  padding: 8px 9px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.footprint-segment-table td {
  padding: 10px 9px;
  border-top: 1px solid rgba(22, 93, 85, 0.12);
  border-bottom: 1px solid rgba(22, 93, 85, 0.12);
  background: rgba(255, 255, 255, 0.92);
  vertical-align: top;
}

.footprint-segment-table tr.selected td {
  background: rgba(229, 242, 239, 0.96);
}

.footprint-segment-table td:first-child {
  border-left: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 10px 0 0 10px;
}

.footprint-segment-table td:last-child {
  border-right: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 0 10px 10px 0;
}

.footprint-segment-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.footprint-bottom-summary {
  position: fixed;
  right: 22px;
  bottom: 16px;
  left: 22px;
  z-index: 1100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto auto;
  gap: 10px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 44px rgba(16, 24, 40, 0.18);
  backdrop-filter: blur(12px);
}

.footprint-bottom-summary > div,
.footprint-bottom-summary button {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 12px;
  background: rgba(244, 250, 247, 0.9);
}

.footprint-bottom-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.footprint-bottom-summary strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.12;
}

body.building-footprint-active .workspace,
body.building-footprint-active .results-panel {
  display: none;
}

body:not(.building-footprint-active) .footprint-bottom-summary {
  display: none;
}

.subject-dashboard-screen {
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: calc(100vh - 74px);
  padding: 22px;
  background: #eef5f2;
}

.subject-dashboard-header,
.subject-address-panel,
.subject-card {
  width: min(1280px, 100%);
  margin-inline: auto;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.06);
}

.subject-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
}

.subject-dashboard-header h2 {
  margin: 4px 0 8px;
  font-size: 1.75rem;
  line-height: 1.1;
}

.subject-dashboard-header p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.subject-dashboard-actions,
.subject-card-actions,
.subject-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subject-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(22, 93, 85, 0.2);
  border-radius: 8px;
  background: #f8fbfb;
  color: #0f766e;
  font-weight: 850;
  text-decoration: none;
}

.subject-action-link:hover {
  border-color: rgba(15, 118, 110, 0.42);
  background: #eef8f7;
}

.subject-source-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.subject-dashboard-actions button.is-confirmed,
.subject-card button.is-confirmed {
  border-color: rgba(15, 118, 110, 0.36);
  background: #e6f6f3;
  color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.subject-address-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.subject-address-field {
  margin: 0;
}

.subject-address-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.subject-address-autocomplete,
.subject-address-control input {
  min-width: 0;
}

.subject-address-control input {
  min-height: 44px;
}

.subject-address-autocomplete .address-suggestions {
  z-index: 1200;
}

.subject-address-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

#subjectSavedAddress {
  color: var(--ink);
  font-weight: 800;
}

#subjectDashboardStatus.success {
  color: #0f766e;
  font-weight: 800;
}

#subjectDashboardStatus.error {
  color: #b42318;
  font-weight: 800;
}

.subject-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  width: min(1280px, 100%);
  margin-inline: auto;
}

.subject-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.subject-summary-card,
.subject-municipal-gis-card,
.subject-report-card {
  grid-column: span 2;
}

.subject-priority-card {
  border-color: rgba(15, 118, 110, 0.18);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
}

.subject-secondary-card {
  box-shadow: none;
}

.subject-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.subject-card-head span,
.subject-card-status span,
.subject-card-foot {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.subject-card-head h3 {
  margin: 3px 0 0;
  font-size: 1rem;
}

.subject-card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f5faf8;
}

.subject-card-status strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.subject-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.subject-span-2 {
  grid-column: span 2;
}

.subject-card textarea {
  min-height: 86px;
  resize: vertical;
}

.subject-manual-field {
  margin: 0;
}

.subject-card-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 41, 51, 0.1);
  text-transform: none;
}

.subject-card-foot a,
.subject-link-row a {
  color: #0f766e;
  font-weight: 850;
}

.subject-map-preview {
  display: grid;
  gap: 6px;
  min-height: 132px;
  align-content: center;
  padding: 18px;
  border: 1px dashed rgba(15, 118, 110, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(189, 148, 81, 0.08)),
    #f8fbfb;
}

.subject-map-preview strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.subject-map-preview span {
  color: var(--muted);
}

.subject-gis-link-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: #f5faf8;
}

.subject-gis-link-panel .field {
  margin: 0;
}

.subject-gis-link-status {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

.subject-gis-link-status.warning {
  color: #b42318;
}

.subject-gis-source-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.subject-gis-source-meta div {
  padding: 10px 12px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #f8fbfb;
}

.subject-gis-source-meta span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-gis-source-meta strong,
.subject-gis-source-meta a {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.subject-gis-source-meta a {
  color: #0f766e;
}

.subject-gis-source-meta a[aria-disabled="true"] {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
}

.subject-gis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.subject-gis-grid div {
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #f8fbfb;
}

.subject-gis-grid dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-gis-grid dd {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.subject-gis-value,
.subject-gis-note {
  display: block;
}

.subject-gis-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.subject-gis-details {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(31, 41, 51, 0.1);
  padding-top: 10px;
}

.subject-gis-details summary {
  cursor: pointer;
  color: #0f766e;
  font-size: 0.88rem;
  font-weight: 900;
}

.subject-gis-details[open] summary {
  margin-bottom: 10px;
}

.subject-gis-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
}

.subject-gis-status.retrieved {
  border-color: rgba(15, 118, 110, 0.22);
  background: #e7f7f3;
  color: #0f766e;
}

.subject-gis-status.failed {
  border-color: rgba(180, 35, 24, 0.24);
  background: #fff0ef;
  color: #b42318;
}

.subject-gis-status.not-available {
  border-color: rgba(71, 84, 103, 0.2);
  background: #f2f4f7;
  color: #475467;
}

.subject-gis-status.needs-verification {
  border-color: rgba(189, 148, 81, 0.3);
  background: #fff7e8;
  color: #8a5a13;
}

.subject-gis-status.link-only {
  border-color: rgba(22, 93, 85, 0.2);
  background: #edf7f2;
  color: #165d55;
}

.subject-gis-log {
  max-height: 150px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  background: #fbfdfd;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.subject-gis-log p,
.subject-gis-log ul {
  margin: 0;
}

.subject-gis-log ul {
  padding-left: 18px;
}

.subject-gis-log li + li {
  margin-top: 4px;
}

.subject-gis-disclaimer {
  padding: 10px 12px;
  border-left: 3px solid #bd9451;
  background: #fffaf0;
}

.subject-card button.is-loading {
  cursor: wait;
  opacity: 0.82;
}

.subject-report-output {
  width: 100%;
  min-height: 280px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
  color: var(--ink);
  font: 0.95rem/1.45 Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  resize: vertical;
}


/* Subject Dashboard note-style reading layout */
.subject-dashboard-screen {
  gap: 20px;
  padding: 30px 24px 48px;
  background: #f6f8f7;
  color: #1f2933;
  font-family: Aptos, "Segoe UI", "Noto Sans", Arial, Helvetica, sans-serif;
  font-size: 15.5px;
  line-height: 1.58;
}

.subject-dashboard-header,
.subject-address-panel,
.subject-card,
.subject-dashboard-grid {
  width: min(980px, 100%);
}

.subject-dashboard-header,
.subject-address-panel,
.subject-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.subject-dashboard-header {
  padding: 0 0 18px;
  border-bottom: 2px solid rgba(31, 41, 51, 0.18);
}

.subject-dashboard-header h2 {
  margin-top: 2px;
  font-size: 1.58rem;
  line-height: 1.18;
}

.subject-dashboard-header p {
  max-width: 680px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.subject-address-panel {
  padding: 0 0 20px;
  border-bottom: 1px solid rgba(31, 41, 51, 0.14);
}

.subject-dashboard-grid {
  display: block;
}

.subject-card {
  gap: 13px;
  padding: 24px 0;
  border-top: 1px solid rgba(31, 41, 51, 0.14);
}

.subject-dashboard-grid .subject-card:first-child {
  border-top: 0;
}

.subject-priority-card,
.subject-secondary-card {
  box-shadow: none;
}

.subject-summary-card,
.subject-municipal-gis-card,
.subject-report-card {
  grid-column: auto;
}

.subject-card-head {
  align-items: center;
  margin-bottom: 2px;
}

.subject-card-head span,
.subject-card-status span,
.subject-card-foot {
  color: #667085;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: none;
}

.subject-card-head h3 {
  margin-top: 2px;
  color: #182230;
  font-size: 1.16rem;
  font-weight: 780;
  line-height: 1.28;
}

.subject-card-status {
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.subject-card-status span::after {
  content: ":";
}

.subject-card-status strong {
  color: #344054;
  font-size: 0.96rem;
  font-weight: 720;
  text-align: left;
}

.subject-field-grid {
  gap: 14px 18px;
}

.subject-card .field span,
.subject-address-field > span,
.subject-gis-link-panel .field span {
  color: #475467;
  font-size: 0.9rem;
  font-weight: 720;
  text-transform: none;
}

.subject-card input,
.subject-card textarea,
.subject-card select,
.subject-address-control input {
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.98rem;
  line-height: 1.45;
}

.subject-card textarea {
  min-height: 96px;
}

.subject-source-note {
  margin: 0;
  color: #667085;
  font-size: 0.92rem;
  line-height: 1.55;
}

.subject-map-preview,
.subject-gis-link-panel {
  min-height: 0;
  padding: 12px 0 12px 14px;
  border: 0;
  border-left: 3px solid rgba(22, 93, 85, 0.26);
  border-radius: 0;
  background: #fbfcfc;
}

.subject-map-preview strong {
  font-size: 1rem;
  font-weight: 760;
}

.subject-gis-link-status {
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.55;
}

.subject-gis-grid {
  display: block;
  border-top: 1px solid rgba(31, 41, 51, 0.12);
}

.subject-gis-grid div {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 0;
  background: transparent;
}

.subject-gis-grid dt {
  margin: 0;
  color: #51606f;
  font-size: 0.92rem;
  font-weight: 730;
  line-height: 1.45;
  text-transform: none;
}

.subject-gis-grid dd {
  color: #1f2937;
  font-size: 0.96rem;
  font-weight: 620;
  line-height: 1.52;
}

.subject-gis-note {
  color: #667085;
  font-size: 0.88rem;
  font-weight: 500;
}

.subject-gis-status {
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.74rem;
}

.subject-gis-details {
  padding-top: 12px;
  border-top: 1px solid rgba(31, 41, 51, 0.12);
}

.subject-gis-details summary {
  color: #165d55;
  font-size: 0.92rem;
  font-weight: 760;
}

.subject-gis-source-meta {
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid rgba(31, 41, 51, 0.1);
}

.subject-gis-source-meta div {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 0;
  background: transparent;
}

.subject-gis-source-meta span,
.subject-gis-source-meta strong,
.subject-gis-source-meta a {
  font-size: 0.92rem;
  line-height: 1.45;
}

.subject-gis-source-meta span {
  margin: 0;
  text-transform: none;
}

.subject-gis-log {
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.9rem;
  line-height: 1.52;
}

.subject-gis-disclaimer {
  padding: 10px 0 10px 14px;
  border-left: 3px solid #bd9451;
  background: transparent;
}

.subject-card-foot {
  padding-top: 2px;
  border-top: 0;
  font-size: 0.88rem;
}

.subject-report-output {
  min-height: 320px;
  border-radius: 6px;
  background: #ffffff;
  font: 0.98rem/1.62 Aptos, "Segoe UI", "Noto Sans", Arial, Helvetica, sans-serif;
}

@media (max-width: 900px) {
  .subject-dashboard-screen {
    padding: 18px 16px 36px;
  }

  .subject-gis-grid div,
  .subject-gis-source-meta div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

body.subject-dashboard-active .workspace,
body.subject-dashboard-active .results-panel {
  display: none;
}

@media (max-width: 1280px) {
  .subject-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subject-summary-card,
  .subject-municipal-gis-card,
  .subject-report-card {
    grid-column: span 2;
  }

  .floor-plan-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }  .floor-plan-layout,
  .footprint-layout,
  .footprint-layout.is-side-collapsed {
    grid-template-columns: 1fr;
  }

  .floor-plan-side,
  .footprint-side-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footprint-layout.is-side-collapsed .footprint-side-panel {
    display: none;
  }

  .footprint-side-toggle {
    top: 10px;
    right: 10px;
    left: auto;
    height: 38px;
    width: 38px;
  }
}

@media (max-width: 900px) {
  .subject-dashboard-screen {
    padding: 14px;
  }

  .subject-dashboard-header,
  .subject-address-control,
  .subject-dashboard-grid,
  .subject-gis-source-meta,
  .subject-gis-grid,
  .subject-field-grid {
    grid-template-columns: 1fr;
  }

  .subject-dashboard-header {
    display: grid;
  }

  .subject-summary-card,
  .subject-municipal-gis-card,
  .subject-report-card,
  .subject-span-2 {
    grid-column: auto;
  }

  .floor-plan-screen,
  .building-footprint-screen {
    padding: 14px;
  }

  .floor-plan-header,
  .floor-level-bar,
  .footprint-topbar,
  .footprint-bottom-summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .floor-plan-header h2,
  .footprint-title-block h2 {
    font-size: 24px;
  }

  .floor-plan-toolbar,
  .floor-plan-side,
  .floor-scale-grid,
  .floor-checkbox-grid,
  .footprint-side-panel,
  .footprint-mini-grid {
    grid-template-columns: 1fr;
  }

  .floor-plan-svg,
  

.footprint-add-page-note {
  position: absolute;
  top: 60px;
  right: 12px;
  z-index: 29;
  width: min(280px, calc(100% - 24px));
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(22, 93, 85, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(17, 44, 49, 0.12);
  color: #31495c;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.footprint-page-modal-note {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.footprint-svg {
    height: 62vh;
    min-height: 430px;
  }

  .floor-canvas-help {
    position: static;
    margin: 10px;
  }

  .footprint-canvas-shell {
    min-height: 460px;
  }

  .footprint-bottom-summary {
    right: 12px;
    bottom: 10px;
    left: 12px;
  }
}

body.print-map-mode {
  background: #fff;
}

body.print-map-mode .panel {
  display: none;
}

body.print-map-mode .brand-photo,
body.print-map-mode .access-gate,
body.capture-map-mode .brand-photo,
body.capture-map-mode .access-gate {
  display: none;
}

body.print-map-mode .workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.8in;
  width: 100%;
  min-height: auto;
  height: 7.5in;
}

body.print-map-mode .map-area,
body.print-map-mode .results-panel {
  break-inside: avoid;
}

body.print-map-mode .map-area {
  width: 100%;
  height: 7.5in;
  overflow: hidden;
  padding: 0;
}

body.print-map-mode .results-panel {
  max-height: 7.5in;
  padding: 0.12in;
  border-left: 1px solid var(--line);
  overflow: hidden;
}

body.print-map-mode .map-shell {
  width: 100%;
  height: 7.5in;
  min-height: 7.5in;
}

body.print-map-mode .leaflet-control-zoom,
body.print-map-mode .map-quick-actions,
body.print-map-mode .map-display-bar,
body.print-map-mode .map-style-dock,
body.print-map-mode .overlay-clarity-control,
body.print-map-mode .sidebar-toggle-button {
  display: none;
}

@media print {
  @page {
    size: landscape;
    margin: 0.25in;
  }

  html,
  body {
    width: 100%;
    height: auto;
    background: #fff;
  }

  .shell {
    min-height: auto;
  }

  .panel {
    display: none;
  }

  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.8in;
    width: 100%;
    min-height: auto;
    height: 7.5in;
  }

  .map-area,
  .results-panel {
    break-inside: avoid;
  }

  .map-area {
    width: 100%;
    height: 7.5in;
    overflow: hidden;
    padding: 0;
  }

  .results-panel {
    max-height: 7.5in;
    padding: 0.12in;
    border-left: 1px solid var(--line);
    overflow: hidden;
  }

  .map-shell {
    width: 100%;
    height: 7.5in;
    min-height: 7.5in;
  }

  .leaflet-control-zoom,
  .map-quick-actions,
  .map-display-bar,
  .map-style-dock,
  .overlay-clarity-control,
  .sidebar-toggle-button {
    display: none;
  }
}

/* Subject Dashboard: single note-first information view */
.subject-research-note-panel,
.subject-edit-details {
  width: min(980px, 100%);
}

.subject-research-note-panel {
  display: grid;
  gap: 14px;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(31, 41, 51, 0.14);
  border-bottom: 1px solid rgba(31, 41, 51, 0.14);
}

.subject-research-note-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.subject-research-note-head h3 {
  margin: 2px 0 4px;
  color: #182230;
  font-size: 1.25rem;
  line-height: 1.25;
}

.subject-research-note-head p:last-child {
  margin: 0;
  color: #667085;
  font-size: 0.95rem;
}

.subject-research-output {
  width: 100%;
  min-height: 500px;
  padding: 18px 20px;
  border: 1px solid rgba(31, 41, 51, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: #182230;
  font: 1rem/1.66 Aptos, "Segoe UI", "Noto Sans", Arial, Helvetica, sans-serif;
  resize: vertical;
  white-space: pre-wrap;
}

.subject-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subject-edit-details {
  padding: 12px 0 0;
}

.subject-edit-details > summary {
  cursor: pointer;
  color: #165d55;
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1.45;
}

.subject-edit-details > summary:hover {
  color: #0f766e;
}

.subject-edit-details .subject-dashboard-grid {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .subject-research-note-head {
    align-items: stretch;
    display: grid;
  }

  .subject-research-output {
    min-height: 420px;
    padding: 14px;
    font-size: 0.96rem;
  }
}
/* Subject Dashboard: minimal address + source-labelled text box */
.subject-simple-dashboard {
  align-items: center;
  gap: 18px;
  padding-top: 28px;
}

.subject-simple-dashboard .subject-address-panel,
.subject-simple-dashboard .subject-research-output {
  width: min(980px, 100%);
}

.subject-simple-dashboard .subject-address-panel {
  padding: 0;
  border: 0;
}

.subject-simple-dashboard .subject-address-field > span {
  color: #344054;
  font-size: 0.98rem;
  font-weight: 760;
}

.subject-simple-dashboard .subject-research-output {
  min-height: 620px;
  padding: 22px 24px;
  border: 1px solid rgba(31, 41, 51, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: #182230;
  font: 1rem/1.68 Aptos, "Segoe UI", "Noto Sans", Arial, Helvetica, sans-serif;
  resize: vertical;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .subject-simple-dashboard {
    padding-top: 18px;
  }

  .subject-simple-dashboard .subject-research-output {
    min-height: 520px;
    padding: 16px;
  }
}
.subject-reading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: min(980px, 100%);
  padding: 10px 12px;
  border: 1px solid rgba(21, 94, 117, 0.22);
  border-radius: 6px;
  background: #ecfeff;
  color: #155e75;
  font-size: 0.94rem;
  font-weight: 740;
}

.subject-reading-indicator[hidden] {
  display: none;
}

.subject-reading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(21, 94, 117, 0.22);
  border-top-color: #155e75;
  border-radius: 999px;
  animation: subject-reading-spin 0.85s linear infinite;
}

@keyframes subject-reading-spin {
  to {
    transform: rotate(360deg);
  }
}
/* Subject Dashboard alignment: address input and content box share one column */
.subject-simple-dashboard .subject-address-panel,
.subject-simple-dashboard .subject-reading-indicator,
.subject-simple-dashboard .subject-research-output {
  box-sizing: border-box;
  width: min(980px, 100%);
  margin-inline: auto;
}

.subject-simple-dashboard .subject-address-control {
  display: block;
  width: 100%;
}

.subject-simple-dashboard .subject-address-autocomplete,
.subject-simple-dashboard #subjectDashboardAddressInput {
  box-sizing: border-box;
  width: 100%;
}
/* Subject Dashboard rich note formatting */
.subject-simple-dashboard .subject-research-output {
  overflow: auto;
  resize: vertical;
}

.subject-research-section + .subject-research-section,
.subject-research-reading-text + .subject-research-section {
  margin-top: 20px;
}

.subject-research-title {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-weight: 820;
}

.subject-research-lines {
  display: grid;
  gap: 2px;
}

.subject-research-line {
  white-space: pre-wrap;
}

.subject-research-reading-text {
  margin: 0;
  color: #155e75;
  font-weight: 760;
}
.subject-research-link {
  color: #0f766e;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.subject-research-link:hover {
  color: #115e59;
}
/* Subject Dashboard polish: readable report-note layout */
body.subject-dashboard-active {
  background:
    linear-gradient(180deg, #f7f9fb 0%, #eef4f2 100%),
    #f7f9fb;
}

.subject-simple-dashboard {
  align-items: center;
  gap: 14px;
  padding: 34px 24px 58px;
}

.subject-simple-dashboard .subject-address-panel,
.subject-simple-dashboard .subject-reading-indicator,
.subject-simple-dashboard .subject-research-output {
  width: min(1040px, calc(100vw - 64px));
}

.subject-simple-dashboard .subject-address-panel {
  margin-bottom: 2px;
}

.subject-simple-dashboard .subject-address-field {
  display: grid;
  gap: 8px;
}

.subject-simple-dashboard .subject-address-field > span {
  color: #4b5a6a;
  font-size: 0.78rem;
  font-weight: 880;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.subject-simple-dashboard #subjectDashboardAddressInput {
  min-height: 56px;
  padding: 0 17px;
  border: 1px solid #c8d3df;
  border-radius: 8px;
  background: #ffffff;
  color: #14202d;
  font-size: 1.03rem;
  font-weight: 720;
  box-shadow: 0 9px 22px rgba(16, 24, 40, 0.07);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.subject-simple-dashboard #subjectDashboardAddressInput::placeholder {
  color: #8a98aa;
  font-weight: 620;
}

.subject-simple-dashboard #subjectDashboardAddressInput:focus {
  border-color: #987040;
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(189, 148, 81, 0.18), 0 10px 24px rgba(16, 24, 40, 0.08);
}

.subject-simple-dashboard .address-suggestions {
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.14);
}

.subject-reading-indicator {
  padding: 11px 14px;
  border-color: rgba(12, 91, 103, 0.28);
  border-radius: 8px;
  background: #edf9fb;
  color: #155e75;
  box-shadow: 0 8px 18px rgba(21, 94, 117, 0.08);
}

.subject-simple-dashboard .subject-research-output {
  min-height: 650px;
  padding: 30px 34px 34px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #17212f;
  font-family: Aptos, "Segoe UI", "Noto Sans", Arial, Helvetica, sans-serif;
  font-size: 0.98rem;
  line-height: 1.58;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.1);
}

.subject-research-section + .subject-research-section,
.subject-research-reading-text + .subject-research-section {
  margin-top: 26px;
}

.subject-research-title {
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #dfe6ee;
  color: #101828;
  font-size: 1.02rem;
  font-weight: 880;
  letter-spacing: 0;
}

.subject-research-lines {
  gap: 0;
}

.subject-research-line {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) minmax(170px, 260px);
  gap: 8px 16px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid #eef2f6;
  white-space: normal;
}

.subject-research-line:last-child {
  border-bottom: 0;
}

.subject-research-label {
  color: #1f2937;
  font-weight: 820;
}

.subject-research-value {
  min-width: 0;
  color: #17212f;
  overflow-wrap: anywhere;
}

.subject-research-source {
  min-width: 0;
  color: #667085;
  font-size: 0.88rem;
  font-weight: 640;
  justify-self: end;
  overflow-wrap: anywhere;
  text-align: right;
}

.subject-research-link {
  color: #0f766e;
  font-weight: 820;
  text-decoration-thickness: 1px;
}

.subject-research-link:hover {
  color: #0b5f59;
}

.subject-research-reading-text {
  padding: 10px 12px;
  border: 1px solid rgba(21, 94, 117, 0.2);
  border-radius: 8px;
  background: #edf9fb;
}

@media (max-width: 900px) {
  .subject-simple-dashboard {
    padding: 20px 14px 40px;
  }

  .subject-simple-dashboard .subject-address-panel,
  .subject-simple-dashboard .subject-reading-indicator,
  .subject-simple-dashboard .subject-research-output {
    width: 100%;
  }

  .subject-simple-dashboard .subject-research-output {
    min-height: 560px;
    padding: 22px 18px;
  }

  .subject-research-line {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 9px 0;
  }

  .subject-research-source {
    justify-self: start;
    text-align: left;
  }
}
/* Subject Dashboard supported-city notice */
.subject-supported-cities-note {
  display: grid;
  gap: 11px;
  width: min(1040px, calc(100vw - 64px));
  margin: -2px auto 2px;
  padding: 16px 18px;
  border: 1px solid rgba(152, 112, 64, 0.42);
  border-left: 6px solid #bd9451;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff9ea 0%, #fffdf7 100%);
  color: #344054;
  font-size: 0.94rem;
  line-height: 1.45;
  box-shadow: 0 12px 26px rgba(122, 77, 22, 0.12);
}

.subject-supported-cities-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
}

.subject-supported-cities-heading strong {
  color: #6f4513;
  font-size: 1.03rem;
  font-weight: 900;
}

.subject-supported-cities-heading span {
  color: #475467;
  font-weight: 720;
}

.subject-supported-city-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subject-supported-city-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(13, 70, 63, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: #0d463f;
  font-size: 0.88rem;
  font-weight: 820;
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.06);
}

.subject-supported-cities-note p {
  margin: 0;
  color: #7a4d16;
  font-size: 0.9rem;
  font-weight: 760;
}

@media (max-width: 900px) {
  .subject-supported-cities-note {
    width: 100%;
    margin-top: -2px;
    padding: 14px;
  }

  .subject-supported-cities-heading {
    display: grid;
    gap: 4px;
  }
}
/* Home landing redesign */
body.home-active {
  overflow: auto;
  background: #f7fbff;
}

.home-landing {
  min-height: 100vh;
  padding: 0;
  background: #f8fbff;
  color: #061b3a;
}

.home-landing .home-hero-photo img {
  object-fit: cover;
  object-position: center right;
  filter: saturate(1.02) contrast(1.02);
}

.home-landing .home-hero-shade {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.98) 28%, rgba(255, 255, 255, 0.78) 45%, rgba(255, 255, 255, 0.22) 70%, rgba(255, 255, 255, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(238, 247, 252, 0.56));
}

.home-landing .landing-shell {
  max-width: 1760px;
  min-height: 100vh;
  padding: 24px clamp(24px, 4.6vw, 78px) 24px;
  gap: 16px;
}

.landing-nav {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  min-height: 66px;
  gap: 22px;
}

.landing-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.landing-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.landing-brand-lockup div {
  display: grid;
  gap: 2px;
}

.landing-brand-lockup strong {
  color: #071b3a;
  font-size: clamp(1.15rem, 1.5vw, 1.55rem);
  font-weight: 920;
  line-height: 1.08;
}

.landing-brand-lockup span {
  color: #8b98aa;
  font-size: clamp(0.86rem, 1vw, 1rem);
  font-weight: 720;
}

.landing-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.4vw, 40px);
}

.landing-menu a {
  color: #071b3a;
  font-size: 0.94rem;
  font-weight: 760;
  text-decoration: none;
}

.landing-menu a:hover {
  color: #078b91;
}

.landing-auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.home-landing .landing-login,
.home-landing .landing-create {
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 7px;
  font-size: 0.93rem;
  font-weight: 860;
}

.home-landing .landing-login {
  border: 1px solid #cfd8e3;
  background: rgba(255, 255, 255, 0.84);
  color: #071b3a;
  box-shadow: none;
}

.home-landing .landing-create {
  border: 1px solid rgba(8, 132, 143, 0.12);
  background: linear-gradient(180deg, #0d9ca2, #08777e);
  box-shadow: 0 10px 22px rgba(8, 119, 126, 0.22);
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(590px, 0.92fr) minmax(560px, 1.08fr);
  align-items: center;
  min-height: clamp(540px, calc(100vh - 250px), 610px);
  gap: clamp(24px, 3vw, 58px);
}

.home-landing .landing-copy-panel {
  align-content: center;
  max-width: 760px;
  padding: 0 0 8px;
}

.home-landing .home-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 22px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #e5f5f5;
  color: #078b91;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.home-landing .home-brand h1 {
  max-width: 760px;
  color: #061b3a;
  font-size: clamp(3.8rem, 5vw, 5.65rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.home-landing .home-brand h1 span {
  color: #0d9aa1;
}

.home-landing .home-copy {
  max-width: 600px;
  margin-top: 20px;
  color: #43536c;
  font-size: clamp(1rem, 1.18vw, 1.22rem);
  font-weight: 640;
  line-height: 1.48;
}

.landing-tool-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 620px;
  margin-top: 24px;
}

.landing-tool-cards span {
  min-height: 68px;
  padding: 15px 18px 15px 58px;
  border: 1px solid #d9e2ed;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #071b3a;
  font-size: 0.92rem;
  font-weight: 860;
  line-height: 1.25;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.08);
  position: relative;
}

.landing-tool-cards span::before {
  position: absolute;
  left: 20px;
  top: 50%;
  width: 26px;
  color: #0b7f86;
  font-size: 0.78rem;
  font-weight: 950;
  transform: translateY(-50%);
}

.landing-tool-cards span[data-tool="map"]::before { content: "MAP"; }
.landing-tool-cards span[data-tool="footprint"]::before { content: "SQ"; }
.landing-tool-cards span[data-tool="trend"]::before { content: "HPI"; }

.landing-visual-stage {
  position: relative;
  min-height: 550px;
}

.landing-floating-card {
  position: absolute;
  border: 1px solid rgba(210, 220, 232, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 44px rgba(15, 33, 58, 0.15);
  backdrop-filter: blur(8px);
}

.landing-card-title {
  color: #071b3a;
  font-size: 0.86rem;
  font-weight: 900;
}

.landing-market-card {
  right: 0;
  top: 8px;
  width: min(340px, 42%);
  padding: 18px;
}

.landing-trend-chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 8px;
  height: 112px;
  margin-top: 14px;
  border-bottom: 1px solid #dfe8f2;
}

.landing-trend-chart span {
  display: block;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #25b4bd, #0b6385);
  opacity: 0.86;
}

.landing-trend-chart span:nth-child(1) { height: 36%; }
.landing-trend-chart span:nth-child(2) { height: 48%; }
.landing-trend-chart span:nth-child(3) { height: 42%; }
.landing-trend-chart span:nth-child(4) { height: 68%; }
.landing-trend-chart span:nth-child(5) { height: 58%; }
.landing-trend-chart span:nth-child(6) { height: 88%; }

.landing-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #52637a;
  font-size: 0.75rem;
  font-weight: 800;
}

.landing-overview-card {
  right: 1.5%;
  top: 222px;
  width: min(370px, 46%);
  padding: 16px;
}

.landing-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.landing-metrics strong {
  min-height: 76px;
  padding: 12px 10px;
  border: 1px solid #e3e9f1;
  border-radius: 8px;
  color: #071b3a;
  font-size: 0.92rem;
  line-height: 1.3;
  background: #ffffff;
}

.landing-metrics strong span {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
}

.landing-property-card {
  left: 10%;
  bottom: 0;
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  gap: 16px;
  width: min(430px, 58%);
  padding: 16px;
}

.landing-property-card img {
  width: 158px;
  height: 116px;
  object-fit: cover;
  border-radius: 7px;
}

.landing-property-card div {
  display: grid;
  align-content: center;
  gap: 7px;
}

.landing-property-card span {
  color: #08a2a8;
  font-size: 0.96rem;
  font-weight: 900;
}

.landing-property-card strong {
  color: #071b3a;
  font-size: 0.92rem;
}

.landing-property-card em {
  color: #0a969d;
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 920;
}

.landing-feature-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: -4px;
  padding: 16px 22px;
  border: 1px solid #dfe7f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(16, 24, 40, 0.09);
}

.landing-feature-rail article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 0 18px;
  border-right: 1px solid #dbe4ee;
}

.landing-feature-rail article:last-child {
  border-right: 0;
}

.landing-feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #eef5fb;
  color: #061b3a;
  font-size: 0.76rem;
  font-weight: 950;
}

.landing-feature-rail strong {
  color: #071b3a;
  font-size: 0.9rem;
  font-weight: 900;
}

.landing-feature-rail p {
  margin: 4px 0 0;
  color: #43536c;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.32;
}

@media (max-width: 1200px) {
  .landing-nav {
    grid-template-columns: 1fr auto;
  }

  .landing-menu {
    display: none;
  }

  .landing-hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .landing-visual-stage {
    min-height: 420px;
  }

  .landing-feature-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-feature-rail article {
    border-right: 0;
    border-bottom: 1px solid #dbe4ee;
    padding: 16px;
  }

  .landing-feature-rail article:last-child {
    border-bottom: 0;
  }
}


@media (max-width: 760px) {
  .home-landing .landing-shell {
    padding: 18px;
  }

  .landing-nav {
    grid-template-columns: 1fr;
  }

  .landing-auth-actions {
    justify-content: start;
  }

  .landing-visual-stage {
    display: none;
  }

  .home-landing .home-brand h1 {
    font-size: clamp(3rem, 14vw, 4.2rem);
  }

  .landing-tool-cards,
  .landing-feature-rail {
    grid-template-columns: 1fr;
  }

  .landing-feature-rail article {
    border-bottom: 1px solid #dbe4ee;
  }
}
/* Home landing map-wave background */
.home-landing .home-hero-photo img {
  opacity: 1;
  object-position: center center;
  filter: saturate(1.02) contrast(1.02) brightness(1.01);
  transform: none;
}

.home-landing .home-hero-shade {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.9) 36%, rgba(255, 255, 255, 0.58) 58%, rgba(255, 255, 255, 0.18) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(235, 246, 255, 0.2));
}

.home-landing .landing-shell {
  position: relative;
}

.landing-visual-stage::before {
  content: "";
  position: absolute;
  inset: 10px -8px 18px 8%;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(241, 248, 252, 0.1));
  backdrop-filter: blur(0.5px);
}

.landing-floating-card {
  z-index: 1;
  border-color: rgba(176, 210, 232, 0.56);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 42px rgba(46, 98, 132, 0.12);
}

.landing-feature-rail,
.landing-tool-cards span {
  border-color: rgba(176, 210, 232, 0.55);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(46, 98, 132, 0.09);
  backdrop-filter: blur(8px);
}


@media (max-width: 760px) {
  .home-landing .home-hero-photo img {
    opacity: 0.74;
    object-position: 62% center;
  }

  .home-landing .home-hero-shade {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 252, 0.8));
  }
}
/* Subject Dashboard reset control */
.subject-simple-dashboard .subject-address-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  width: 100%;
}

.subject-dashboard-reset-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #263547;
  font-weight: 820;
  white-space: nowrap;
}

.subject-dashboard-reset-button:hover,
.subject-dashboard-reset-button:focus-visible {
  border-color: #0b8791;
  color: #076b72;
  box-shadow: 0 0 0 3px rgba(11, 135, 145, 0.12);
}

.subject-dashboard-reset-button.is-confirmed {
  border-color: #16a34a;
  color: #166534;
  background: #f0fdf4;
}

.subject-dashboard-status {
  min-height: 20px;
  margin: 6px 0 0;
  color: #256044;
  font-size: 0.9rem;
  font-weight: 760;
}

.subject-dashboard-status.error {
  color: #b42318;
}

@media (max-width: 720px) {
  .subject-simple-dashboard .subject-address-control {
    grid-template-columns: 1fr;
  }

  .subject-dashboard-reset-button {
    width: 100%;
  }
}

/* Final white-tone refresh */
:root {
  --ink: #172033;
  --muted: #667085;
  --soft: #98a2b3;
  --line: #e4e7ec;
  --paper: #ffffff;
  --panel: #f8fafc;
  --panel-strong: #eef2f6;
  --brand: #0b7f86;
  --brand-dark: #075f66;
  --brand-soft: #eef9fa;
  --accent: #0b7f86;
  --accent-dark: #075f66;
  --canvas: #f7f9fc;
  --sidebar-dark: #ffffff;
  --sidebar-deep: #f3f6fa;
  --report-panel: #ffffff;
  --shadow: 0 12px 28px rgba(16, 24, 40, 0.07);
  --shadow-strong: 0 20px 48px rgba(16, 24, 40, 0.12);
}

body {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 46%, #eef4f8 100%),
    #ffffff;
}

.app-top-nav {
  border-bottom-color: rgba(208, 213, 221, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

.app-nav-button {
  border-color: #d9e1ea;
  background: #ffffff;
  color: #475467;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.07);
}

.app-nav-button:hover {
  border-color: rgba(11, 127, 134, 0.28);
  background: #fbfdff;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.1);
}

.workspace {
  background:
    linear-gradient(90deg, #ffffff 0 28%, #f8fafc 28% 100%);
}

.panel,
.results-panel,
.trend-card,
.ai-grid-review-card,
.floor-plan-card,
.building-footprint-card,
.subject-simple-dashboard .subject-address-panel,
.subject-simple-dashboard .subject-research-output {
  border-color: #e4e7ec;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
}

.panel > .brand,
.results-header {
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  border-bottom-color: #e4e7ec;
}

.map-area,
.map-shell {
  border-color: #e4e7ec;
  background: #f3f6fa;
}

.market-trend-screen,
.time-adjustment-screen,
.ai-grid-review-screen,
.floor-plan-screen,
.building-footprint-screen,
.subject-simple-dashboard {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

body.grid-review-active .workspace,
body.grid-review-active .results-panel,
body.ai-grid-review-active .workspace,
body.ai-grid-review-active .results-panel,
body.floor-plan-active .workspace,
body.floor-plan-active .results-panel,
body.building-footprint-active .workspace,
body.building-footprint-active .results-panel,
body.subject-dashboard-active .workspace,
body.subject-dashboard-active .results-panel {
  background: #ffffff;
}

.home-landing,
body.home-active {
  background: #ffffff;
}

.home-landing .home-hero-photo img {
  opacity: 0.82;
  filter: saturate(0.96) contrast(0.98) brightness(1.05);
}

.home-landing .home-hero-shade {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.97) 34%, rgba(255, 255, 255, 0.74) 58%, rgba(255, 255, 255, 0.3) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 249, 252, 0.58));
}

.landing-floating-card,
.landing-feature-rail,
.landing-tool-cards span {
  border-color: rgba(218, 225, 233, 0.95);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.1);
}

.home-landing .landing-login {
  border-color: #d0d5dd;
  background: #ffffff;
}

.home-landing .landing-create {
  border-color: rgba(11, 127, 134, 0.18);
  background: linear-gradient(180deg, #0f9aa3, #08737b);
}

.home-landing .home-kicker,
.trend-summary-city,
.landing-feature-icon {
  background: #eef9fa;
}


@media (max-width: 760px) {
  .home-landing .home-hero-photo img {
    opacity: 0.58;
  }

  .home-landing .home-hero-shade {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  }
}

/* Narrative Assistant */
.narrative-assistant-screen {
  min-height: calc(100vh - 92px);
  padding: 22px;
  background: #f6f8fa;
  color: #111827;
}

.narrative-header-card,
.narrative-panel,
.narrative-output-card,
.narrative-card,
.narrative-suggestion-card,
.narrative-favorites article {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.narrative-header-card {
  max-width: 1120px;
  margin: 0 auto 14px;
  padding: 18px 20px;
  border-radius: 14px;
}

.narrative-header-card h2 {
  margin: 3px 0 6px;
  color: #111827;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.narrative-header-card p:not(.section-kicker) {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  font-weight: 700;
  line-height: 1.5;
}

.narrative-workspace {
  max-width: 1120px;
  margin: 0 auto 14px;
  display: grid;
  grid-template-columns: minmax(420px, 0.48fr) minmax(460px, 0.52fr);
  gap: 14px;
  align-items: start;
}

.narrative-panel,
.narrative-output-card {
  padding: 16px;
  border-radius: 14px;
}

.narrative-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.narrative-card-head h3 {
  margin: 2px 0 0;
  color: #111827;
  font-size: 1.28rem;
}

.narrative-field-group,
.narrative-textarea-wrap {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.narrative-field-title,
.narrative-textarea-wrap > span,
.narrative-options-row span {
  color: #334155;
  font-size: 0.84rem;
  font-weight: 900;
}

.narrative-pill-group,
.narrative-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.narrative-pill-group button,
.narrative-chip-group button,
.narrative-recent-searches button {
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  padding: 8px 11px;
  font-weight: 850;
  cursor: pointer;
}

.narrative-pill-group button.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

.narrative-prompt-input {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid #d9e4e7;
  border-radius: 12px;
  padding: 16px;
  color: #111827;
  background: #ffffff;
  font: 750 1.05rem/1.55 Inter, "Segoe UI", Arial, sans-serif;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.narrative-prompt-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.narrative-options-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.narrative-options-row label {
  display: grid;
  gap: 7px;
}

.narrative-options-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 10px;
  color: #111827;
  background: #ffffff;
  font-weight: 800;
}

.narrative-category-field {
  margin-bottom: 12px;
}

.narrative-category-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbdbe4;
  border-radius: 12px;
  padding: 0 14px;
  color: #0f172a;
  background: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  outline: none;
}

.narrative-category-select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.narrative-options-row-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.narrative-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.narrative-generate-button,
.narrative-clear-button {
  min-height: 44px;
  border-radius: 10px;
  padding: 0 15px;
  font-weight: 900;
  cursor: pointer;
}

.narrative-generate-button {
  border: 0;
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.narrative-generate-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.narrative-clear-button {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #334155;
}

.narrative-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: #64748b;
  font-weight: 800;
}

.narrative-status.error {
  color: #b42318;
}

.narrative-recent-searches {
  margin-top: 16px;
}

.narrative-recent-searches h3,
.narrative-favorites h3 {
  margin: 0 0 10px;
  color: #334155;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.narrative-recent-searches div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.narrative-results {
  display: grid;
  gap: 12px;
}

.narrative-results.is-loading {
  opacity: 0.72;
}

.narrative-card {
  position: relative;
  min-height: 0;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.narrative-option-card {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.narrative-option-card:hover,
.narrative-option-card:focus {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.narrative-option-card.is-selected {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14), 0 18px 38px rgba(15, 23, 42, 0.08);
}

.narrative-option-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e7f6f2;
  color: #005f63;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.narrative-output-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.narrative-output-head h3,
.narrative-suggestion-card h3 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
}

.narrative-output-actions {
  display: inline-flex;
  gap: 7px;
  flex-shrink: 0;
}

.narrative-card p,
.narrative-card li {
  margin: 0;
  color: #334155;
  font-weight: 720;
  line-height: 1.58;
}

.narrative-card ul {
  margin: 0;
  padding-left: 18px;
}

.narrative-output-actions button,
.narrative-suggestion-card button,
.narrative-favorites button {
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 10px;
  background: #ffffff;
  color: #0f766e;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
}

.narrative-output-actions [data-narrative-copy],
.narrative-suggestion-card button {
  background: #0f766e;
  color: #ffffff;
}

.narrative-output-actions [data-narrative-select] {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.narrative-option-card.is-selected [data-narrative-select] {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.narrative-output-actions [data-copy-status="copying"] {
  background: #2563eb;
  color: #ffffff;
}

.narrative-output-actions [data-copy-status="copied"] {
  background: #047857;
  color: #ffffff;
}

.narrative-output-actions [data-copy-status="error"] {
  background: #b42318;
  border-color: #b42318;
  color: #ffffff;
}

.narrative-notes-card {
  background: #f8fafc;
}

.narrative-suggestions,
.narrative-favorites {
  max-width: 1180px;
  margin: 0 auto 18px;
}

.narrative-suggestion-card {
  padding: 18px;
  border-radius: 16px;
}

.narrative-suggestion-card ul {
  margin: 10px 0 14px;
  padding-left: 20px;
  color: #334155;
  font-weight: 800;
}

.narrative-favorite-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.narrative-favorites article {
  padding: 16px;
  border-radius: 14px;
}

.narrative-favorites strong {
  color: #111827;
}

.narrative-favorites p {
  color: #475569;
  font-weight: 700;
  line-height: 1.5;
}

.narrative-empty {
  padding: 28px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-weight: 800;
}

.narrative-output-empty {
  display: grid;
  gap: 8px;
  min-height: 220px;
  place-content: center;
  text-align: center;
}

.narrative-output-empty strong {
  color: #111827;
  font-size: 1.08rem;
}


.narrative-card-head-simple {
  border-bottom: 1px solid #edf2f4;
  padding-bottom: 10px;
}

.narrative-helper-drawer,
.narrative-history-drawer,
.narrative-favorites-drawer {
  border: 1px solid #dbe8ea;
  border-radius: 12px;
  background: #fbfefd;
  margin: 10px 0;
  overflow: hidden;
}

.narrative-helper-drawer summary,
.narrative-history-drawer summary,
.narrative-favorites-drawer summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 13px;
  color: #005f63;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.narrative-helper-drawer summary::-webkit-details-marker,
.narrative-history-drawer summary::-webkit-details-marker,
.narrative-favorites-drawer summary::-webkit-details-marker {
  display: none;
}

.narrative-helper-drawer summary::after,
.narrative-history-drawer summary::after,
.narrative-favorites-drawer summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e7f6f2;
  color: #007c7f;
}

.narrative-helper-drawer[open] summary::after,
.narrative-history-drawer[open] summary::after,
.narrative-favorites-drawer[open] summary::after {
  content: "-";
}

.narrative-helper-content,
.narrative-history-drawer .narrative-recent-searches,
.narrative-favorites-drawer .narrative-favorites {
  padding: 0 13px 13px;
}

.narrative-advanced-drawer {
  margin-bottom: 0;
}

.narrative-favorites-drawer {
  max-width: 1120px;
  margin: 0 auto 18px;
}

.narrative-favorites-drawer .narrative-favorites {
  margin: 0;
  max-width: none;
}
body.narrative-assistant-active .workspace,
body.narrative-assistant-active .results-panel {
  display: none !important;
}

body.print-map-mode .workspace {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 860px) {
  .narrative-assistant-screen {
    padding: 14px;
  }

  .narrative-header-card,
  .narrative-panel,
  .narrative-output-card {
    padding: 14px;
  }

  .narrative-workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .narrative-options-row {
    grid-template-columns: 1fr;
  }

  .narrative-action-row,
  .narrative-output-head {
    flex-direction: column;
    align-items: stretch;
  }

  .narrative-generate-button,
  .narrative-clear-button {
    width: 100%;
  }
}
.footprint-segment-table-card[hidden] {
  display: none !important;
}




.footprint-save-sketch-button .button-label {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}


.footprint-action-toast {
  position: fixed;
  top: 92px;
  left: 50%;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: min(360px, calc(100vw - 32px));
  max-width: min(460px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  color: #0b3f3a;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  transform: translate(-50%, -12px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.footprint-action-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.footprint-action-toast-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
  flex: 0 0 auto;
}

.footprint-action-toast strong,
.footprint-action-toast small {
  display: block;
}

.footprint-action-toast strong {
  font-size: 15px;
  font-weight: 950;
}

.footprint-action-toast small {
  margin-top: 2px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.footprint-action-toast.warning .footprint-action-toast-icon {
  background: #bd9451;
}

.footprint-action-toast.error {
  border-color: rgba(180, 35, 24, 0.28);
}

.footprint-action-toast.error .footprint-action-toast-icon {
  background: #b42318;
}

/* footprint-add-page-note hover help */
.footprint-add-page-note {
  display: block;
  width: min(330px, calc(100% - 24px));
  font-size: 12.5px;
  line-height: 1.38;
  font-weight: 800;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

#footprintLayout:has(.footprint-save-sketch-button:is(:hover, :focus-visible)) .footprint-add-page-note,
.footprint-canvas-shell:has(.footprint-sketch-actions:is(:hover, :focus-within)) .footprint-add-page-note {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* footprint-save-sketch-button readable disabled */
.footprint-canvas-toolbar .footprint-save-sketch-button,
.footprint-canvas-toolbar .footprint-save-sketch-button:disabled {
  opacity: 1;
  color: #ffffff;
  filter: none;
}

.footprint-canvas-toolbar .footprint-save-sketch-button:disabled {
  background: linear-gradient(180deg, #2f8177, #246a62);
  border-color: rgba(13, 82, 74, 0.34);
  cursor: not-allowed;
}

.footprint-canvas-toolbar .footprint-save-sketch-button .button-icon,
.footprint-canvas-toolbar .footprint-save-sketch-button .button-label {
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* footprint-plan-label-card hidden per request */
.footprint-plan-label-card {
  display: none !important;
}

/* footprint side panel restore tab */
.footprint-side-restore-toggle {
  position: fixed;
  top: 46%;
  right: 14px;
  z-index: 7200;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(22, 93, 85, 0.24);
  border-radius: 999px 0 0 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0b3f3a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.footprint-side-restore-toggle[hidden] {
  display: none !important;
}

.footprint-side-restore-toggle span:first-child {
  font-size: 25px;
  line-height: 1;
}

.footprint-side-restore-toggle:hover,
.footprint-side-restore-toggle:focus-visible {
  border-color: rgba(22, 117, 104, 0.48);
  background: #e9f7f3;
  color: #006b63;
  outline: none;
  transform: translateY(-50%) translateX(-2px);
}

.footprint-layout.is-side-collapsed .footprint-side-toggle {
  display: none;
}

@media (max-width: 980px) {
  .footprint-side-restore-toggle {
    top: auto;
    right: 12px;
    bottom: 92px;
    transform: none;
  }

  .footprint-side-restore-toggle:hover,
  .footprint-side-restore-toggle:focus-visible {
    transform: translateX(-2px);
  }
}

/* footprint-plan-label draggable */
.footprint-plan-label {
  cursor: grab;
}

.footprint-plan-label:active,
.footprint-plan-label.is-dragging {
  cursor: grabbing;
}

/* footprint-plan-label title size colors */
.footprint-plan-label .footprint-plan-label-title,
.footprint-export-floor-label .footprint-plan-label-title {
  fill: #006b63;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0;
}

.footprint-plan-label .footprint-plan-label-size,
.footprint-export-floor-label .footprint-plan-label-size {
  fill: #0f4f7a;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
}






body.capture-map-mode .map-export-progress-overlay,
body.print-map-mode .map-export-progress-overlay {
  display: none;
}
/* Keep ACI import help guide above the map while open */
#mapWorkspace .panel:has(.import-help-wrap.is-open) {
  z-index: 9000;
  overflow: visible;
}

#mapWorkspace .import-help-wrap.is-open {
  z-index: 9010;
}

#mapWorkspace .import-help-popover {
  z-index: 9020;
}
.trend-calculation-method {
  display: inline-grid;
  gap: 4px;
  min-width: 230px;
  color: #395468;
  font-size: 12px;
  font-weight: 900;
}

.trend-calculation-method select {
  min-height: 36px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 10px;
  background: #ffffff;
  color: #0b4f4a;
  font-size: 13px;
  font-weight: 850;
}

.trend-calculation-source-note {
  margin: 10px 0 0;
  color: #526579;
  font-size: 12px;
  font-weight: 800;
}
.trend-calculation-method[data-method="hpi"] select,
.trend-calculation-source-note[data-method="hpi"] {
  border-color: rgba(15, 118, 110, 0.46);
  background: #e9f9f5;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.trend-calculation-method[data-method="benchmark"] select,
.trend-calculation-source-note[data-method="benchmark"] {
  border-color: rgba(189, 148, 81, 0.48);
  background: #fff7e8;
  box-shadow: 0 0 0 3px rgba(189, 148, 81, 0.12);
}

.trend-calculation-method[data-method="official"] select,
.trend-calculation-source-note[data-method="official"] {
  border-color: rgba(29, 78, 216, 0.32);
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.09);
}

.trend-calculation-source-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 10px;
}
/* Appraisal Workbench rebrand logo sizing */
.app-nav-brand img {
  width: 86px;
  max-width: 86px;
  height: 40px;
  object-fit: contain;
}

.landing-logo {
  width: 118px;
  max-width: 118px;
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.access-brand .brand-logo {
  width: min(100%, 320px);
  max-height: 118px;
}

.home-brand h1 {
  font-size: clamp(50px, 6vw, 86px);
  line-height: 1;
}




/* 2026-07-01 Intro page refinement */
.home-landing,
body.home-active {
  background: #f7faf9;
}

.home-landing .home-hero-photo img {
  opacity: 0.5;
  filter: saturate(0.78) contrast(0.96) brightness(1.08);
}

.home-landing .home-hero-shade {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.99) 0%, rgba(255,255,255,0.98) 44%, rgba(255,255,255,0.82) 72%, rgba(255,255,255,0.66) 100%),
    linear-gradient(180deg, rgba(248,252,251,0.94), rgba(238,247,244,0.88));
}

.home-landing .landing-shell {
  max-width: 1480px;
  padding: 22px clamp(20px, 4vw, 64px) 28px;
}

.landing-nav {
  grid-template-columns: minmax(170px, 1fr) auto minmax(220px, 1fr);
  min-height: 72px;
  padding: 10px 14px;
  border: 1px solid rgba(193, 213, 216, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

.landing-brand-lockup {
  gap: 0;
}

.landing-brand-lockup strong {
  font-size: clamp(1.12rem, 1.25vw, 1.36rem);
}

.landing-brand-lockup span {
  color: #5d6b7d;
  font-size: 0.9rem;
}

.landing-logo {
  width: 142px;
  max-width: 142px;
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.landing-menu {
  gap: 10px;
  padding: 5px;
  border-radius: 999px;
  background: #eef7f6;
}

.landing-menu a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #0b4f55;
  font-weight: 880;
}

.landing-menu a:hover {
  background: #ffffff;
  color: #08787e;
}

.home-landing .landing-login,
.home-landing .landing-create {
  min-height: 42px;
  border-radius: 12px;
}

.landing-hero-grid {
  grid-template-columns: minmax(420px, 0.9fr) minmax(420px, 1.1fr);
  min-height: clamp(500px, calc(100vh - 238px), 660px);
  gap: clamp(22px, 4vw, 74px);
}

.home-landing .landing-copy-panel {
  max-width: 690px;
}

.home-landing .home-kicker {
  margin-bottom: 18px;
  padding: 9px 16px;
  border: 1px solid #bde3df;
  background: #eefaf7;
  color: #007c7f;
  font-size: 0.82rem;
}

.home-landing .home-brand h1 {
  max-width: 720px;
  color: #082f49;
  font-size: clamp(3.5rem, 5.8vw, 6.15rem);
  line-height: 0.98;
}

.home-landing .home-copy {
  max-width: 620px;
  margin-top: 22px;
  color: #344256;
  font-size: clamp(1.08rem, 1.35vw, 1.34rem);
  font-weight: 720;
  line-height: 1.48;
}

.landing-tool-cards {
  max-width: 680px;
  gap: 12px;
  margin-top: 30px;
}

.landing-tool-cards span {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px 16px 16px 58px;
  border-color: rgba(163, 197, 199, 0.75);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.landing-tool-cards span::before {
  left: 16px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0f8b8d;
  color: #ffffff;
  font-size: 0.72rem;
}

.landing-tool-cards span strong {
  color: #082f49;
  font-size: 1.04rem;
  line-height: 1.1;
}

.landing-tool-cards span em {
  color: #64748b;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 760;
  line-height: 1.25;
}

.landing-visual-stage {
  min-height: 520px;
}

.landing-visual-stage::before {
  content: "";
  position: absolute;
  inset: 42px 34px 42px 0;
  border: 1px solid rgba(173, 203, 204, 0.68);
  border-radius: 30px;
  background:
    linear-gradient(rgba(15,139,141,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,139,141,0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.56);
  background-size: 34px 34px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 24px 70px rgba(15, 23, 42, 0.08);
}

.landing-floating-card {
  border-color: rgba(181, 206, 209, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
}

.landing-market-card {
  right: 26px;
  top: 42px;
}

.landing-overview-card {
  left: 38px;
  top: 178px;
}

.landing-property-card {
  right: 58px;
  bottom: 52px;
}

.landing-hero-trial-cta {
  position: absolute;
  right: clamp(98px, 12vw, 210px);
  bottom: -42px;
  z-index: 3;
  min-height: 52px;
  padding: 0 30px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.landing-hero-trial-cta:hover,
.landing-hero-trial-cta:focus-visible {
  background: linear-gradient(180deg, #1d4ed8, #1e40af);
  box-shadow: 0 22px 42px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
  outline: none;
}

.landing-feature-rail {
  max-width: 1480px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-color: rgba(193, 213, 216, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.landing-feature-rail article,
.landing-feature-rail article:last-child {
  grid-column: auto;
  min-height: 112px;
  padding: 14px;
  border-radius: 14px;
  background: #ffffff;
}

.landing-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e9f8f6;
  color: #08787e;
}

.landing-feature-rail strong {
  font-size: 0.98rem;
}

.landing-feature-rail p {
  font-size: 0.82rem;
  line-height: 1.34;
}

@media (max-width: 1120px) {
  .landing-nav {
    grid-template-columns: 1fr auto;
  }

  .landing-menu {
    display: none;
  }

  .landing-hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 0 18px;
  }

  .landing-visual-stage {
    min-height: 430px;
  }

  .landing-hero-trial-cta {
    right: 50%;
    bottom: -26px;
    transform: translateX(50%);
  }

  .landing-hero-trial-cta:hover,
  .landing-hero-trial-cta:focus-visible {
    transform: translateX(50%) translateY(-1px);
  }

  .landing-feature-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


@media (max-width: 760px) {
  .home-landing .landing-shell {
    padding: 14px;
  }

  .landing-nav {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .landing-auth-actions {
    justify-content: stretch;
  }

  .home-landing .landing-login,
  .home-landing .landing-create {
    flex: 1;
  }

  .home-landing .home-brand h1 {
    font-size: clamp(3rem, 16vw, 4.7rem);
  }

  .landing-tool-cards,
  .landing-feature-rail {
    grid-template-columns: 1fr;
  }

  .landing-visual-stage {
    min-height: 360px;
  }

  .landing-floating-card {
    transform: scale(0.9);
    transform-origin: center;
  }

  .landing-overview-card {
    left: 8px;
    top: 138px;
  }

  .landing-property-card {
    right: 0;
    bottom: 22px;
  }

  .landing-hero-trial-cta {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 18px;
    transform: none;
  }

  .landing-hero-trial-cta:hover,
  .landing-hero-trial-cta:focus-visible {
    transform: translateY(-1px);
  }
}

/* 2026-07-01 Billing and Personal Plan */
.billing-screen {
  min-height: calc(100vh - 92px);
  padding: 28px;
  background: #f6faf9;
  color: #102033;
}

.billing-hero-card,
.pricing-card,
.billing-success-card,
.billing-usage-card {
  max-width: 920px;
  margin: 0 auto 18px;
  border: 1px solid rgba(190, 213, 215, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.billing-hero-card,
.billing-success-card {
  padding: 26px;
}

.billing-hero-card h2,
.billing-success-card h2 {
  margin: 4px 0 8px;
  color: #082f49;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.billing-hero-card p:not(.section-kicker),
.billing-success-card p {
  max-width: 680px;
  margin: 0;
  color: #526174;
  font-weight: 750;
  line-height: 1.5;
}

.pricing-card,
.billing-usage-card {
  padding: 24px;
}

.pricing-card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.pricing-card-head span {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 13px;
  background: #eaf8f6;
  color: #08787e;
  font-weight: 900;
}

.pricing-card-head strong {
  color: #082f49;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.1;
}

.pricing-card-head p {
  margin: 0;
  color: #0f766e;
  font-size: 1.55rem;
}

.pricing-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.pricing-feature-list li {
  border: 1px solid #dceaea;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfefd;
  color: #203047;
  font-weight: 850;
}

.pricing-note,
.billing-status {
  color: #667085;
  font-weight: 760;
  line-height: 1.45;
}

.billing-test-note {
  color: #1d4ed8 !important;
}

.billing-status.error {
  color: #b42318;
}

.billing-primary-button,
.billing-secondary-button {
  min-height: 46px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 950;
  cursor: pointer;
}

.billing-primary-button {
  border: 0;
  background: linear-gradient(180deg, #0f9aa3, #08737b);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(8, 115, 123, 0.22);
}

.billing-primary-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.billing-secondary-button {
  border: 1px solid #cadbdd;
  background: #ffffff;
  color: #0b4f55;
}

.billing-plan-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #edf3f3;
  color: #526174;
  font-weight: 850;
}

.billing-plan-row strong {
  color: #082f49;
}

.billing-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.billing-account-actions [hidden] {
  display: none;
}

.billing-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.billing-usage-grid div {
  border: 1px solid #dceaea;
  border-radius: 14px;
  padding: 14px;
  background: #fbfefd;
}

.billing-usage-grid span {
  display: block;
  margin-bottom: 8px;
  color: #667085;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-usage-grid strong {
  color: #0f766e;
  font-size: 1.4rem;
}



.billing-plan-layout,
.billing-account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto 18px;
  align-items: start;
}

.billing-plan-layout .pricing-card,
.billing-account-layout .billing-usage-card {
  max-width: none;
  margin: 0;
}

.billing-side-card {
  padding: 22px;
  border: 1px solid rgba(190, 213, 215, 0.84);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.billing-side-card h3 {
  margin: 0 0 14px;
  color: #082f49;
  font-size: 1.18rem;
}

.billing-side-card p,
.billing-side-card li {
  color: #526174;
  font-weight: 760;
  line-height: 1.48;
}

.billing-side-card p {
  margin: 14px 0 0;
}

.billing-side-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.billing-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.billing-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #edf3f3;
}

.billing-detail-list dt {
  color: #667085;
  font-weight: 850;
}

.billing-detail-list dd {
  margin: 0;
  color: #082f49;
  font-weight: 950;
  text-align: right;
}

.billing-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
}

.billing-info-grid article {
  padding: 18px;
  border: 1px solid rgba(190, 213, 215, 0.84);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.billing-info-grid span {
  color: #08787e;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.billing-info-grid strong {
  display: block;
  margin: 8px 0;
  color: #082f49;
  font-size: 1.05rem;
}

.billing-info-grid p {
  margin: 0;
  color: #526174;
  font-weight: 760;
  line-height: 1.45;
}

.billing-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

.billing-modal-backdrop[hidden] {
  display: none !important;
}

.billing-modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #cfe0f7;
  border-radius: 22px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.billing-modal-card h2 {
  margin: 4px 44px 12px 0;
  color: #082f49;
  font-size: 2rem;
  line-height: 1.05;
}

.billing-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid #d7e3f4;
  border-radius: 12px;
  background: #f8fbff;
  color: #0f2f5f;
  font-size: 1.2rem;
  font-weight: 950;
  cursor: pointer;
}

.billing-test-notice {
  margin: 0 0 18px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 12px 14px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 900;
}

.dummy-checkout-form,
.dummy-checkout-form label {
  display: grid;
  gap: 10px;
}

.dummy-checkout-form {
  gap: 14px;
}

.dummy-checkout-form label span {
  color: #344054;
  font-size: 0.9rem;
  font-weight: 900;
}

.dummy-checkout-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfe0f7;
  border-radius: 13px;
  padding: 0 14px;
  background: #ffffff;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.dummy-checkout-form input:focus {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, 0.18);
}

.dummy-checkout-grid,
.dummy-checkout-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dummy-checkout-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dummy-checkout-summary div {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px;
  background: #f8fbff;
}

.dummy-checkout-summary span,
.dummy-checkout-summary strong {
  display: block;
}

.dummy-checkout-summary span {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dummy-checkout-summary strong {
  margin-top: 4px;
  color: #0f2f5f;
  font-size: 0.95rem;
}

body.billing-modal-open {
  overflow: hidden;
}

@media (max-width: 620px) {
  .billing-modal-card {
    padding: 20px;
  }

  .dummy-checkout-grid,
  .dummy-checkout-summary {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .billing-screen {
    padding: 16px;
  }

  .pricing-feature-list,
  .billing-usage-grid,
  .billing-plan-layout,
  .billing-account-layout,
  .billing-info-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026-07-02 Order Manager embedded dashboard */
.order-manager-screen {
  min-height: calc(100vh - 92px);
  padding: 0;
  background: #f6f8fb;
}

.order-manager-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 92px);
  border: 0;
  background: #f6f8fb;
}

body.order-manager-active .workspace,
body.order-manager-active .results-panel {
  display: none !important;
}

/* 2026-07-02 Field Photos new-tab launcher page */
.field-photos-screen {
  min-height: calc(100vh - 92px);
  display: grid;
  place-items: center;
  padding: 28px;
  background: #f6f8fb;
}

.field-photos-launch-panel {
  width: min(760px, 100%);
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
}

.field-photos-heading h2 {
  margin: 2px 0 6px;
  color: #063f3b;
  font-size: 1.45rem;
}

.field-photos-heading p:last-child {
  margin: 0;
  color: #475569;
  font-weight: 700;
}

.field-photos-url-field {
  display: grid;
  gap: 6px;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field-photos-url-field input {
  min-height: 42px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 12px;
  padding: 0 12px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  background: #fff;
}

.field-photos-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.field-photos-action,
.field-photos-open-button {
  min-height: 46px;
  justify-content: center;
  text-decoration: none;
}

.field-photos-open-button {
  flex: 1 1 240px;
  background: #0f766e;
  color: #fff;
}

.field-photos-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.field-photos-steps span {
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 12px;
  background: #f7fbfa;
  color: #0f4f4a;
  font-weight: 900;
}


.field-photos-phone-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background: #f8fcfb;
}

.field-photos-qr-card {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 8px #fff;
}

.field-photos-qr-card img {
  width: 170px;
  height: 170px;
  display: block;
}

.field-photos-phone-copy h3 {
  margin: 0 0 6px;
  color: #063f3b;
  font-size: 1.05rem;
}

.field-photos-phone-copy p {
  margin: 0 0 10px;
  color: #475569;
  font-weight: 750;
}

.field-photos-phone-copy ul {
  margin: 0;
  padding-left: 18px;
  color: #0f4f4a;
  font-weight: 850;
}
body.field-photos-active .workspace,
body.field-photos-active .results-panel {
  display: none !important;
}

@media (max-width: 900px) {
  .field-photos-screen {
    padding: 12px;
  }

  .field-photos-launch-panel {
    padding: 20px;
  }

  .field-photos-steps {
    grid-template-columns: 1fr;
  }

  .field-photos-phone-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .field-photos-phone-copy ul {
    text-align: left;
  }

  .field-photos-actions {
    display: grid;
  }
}
body.building-footprint-active,
body.building-footprint-active input,
body.building-footprint-active textarea,
body.building-footprint-active [contenteditable="true"] {
  caret-color: #000 !important;
}



/* Stronger screenshot paste affordance */
#mapWorkspace .paste-zone,
.time-screenshot-paste-zone {
  position: relative;
  border: 2px dashed rgba(0, 133, 122, 0.58);
  background:
    linear-gradient(135deg, rgba(232, 249, 246, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 28px rgba(15, 55, 50, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

#mapWorkspace .paste-zone::before,
.time-screenshot-paste-zone::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #0f8f87, #0b6f68);
  box-shadow: 0 8px 18px rgba(15, 143, 135, 0.24);
  display: block;
}

#mapWorkspace .paste-zone::after,
.time-screenshot-paste-zone::after {
  content: "\2398";
  position: absolute;
  left: 20px;
  top: 18px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

#mapWorkspace .paste-zone {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  min-height: 92px;
  padding: 16px 16px 16px 18px;
  gap: 12px;
}

#mapWorkspace .paste-title {
  color: #004f49;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0;
}

#mapWorkspace .paste-help {
  color: #244358;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.35;
}

.time-screenshot-paste-zone {
  min-height: 104px;
  padding: 18px 18px 18px 68px;
}

.time-screenshot-paste-zone::before {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.time-screenshot-paste-zone::after {
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
}

.time-screenshot-paste-zone strong {
  color: #004f49;
  font-size: 16px;
  letter-spacing: 0;
}

.time-screenshot-paste-zone span {
  color: #244358;
  font-size: 14px;
  line-height: 1.35;
}

#mapWorkspace .paste-zone:hover,
#mapWorkspace .paste-zone:focus,
.time-screenshot-paste-zone:hover,
.time-screenshot-paste-zone:focus {
  border-color: #007c72;
  background: linear-gradient(135deg, rgba(218, 246, 241, 0.98), #ffffff);
  box-shadow: 0 16px 34px rgba(15, 55, 50, 0.14), 0 0 0 4px rgba(0, 133, 122, 0.12);
  outline: none;
}

/* Highlight time adjustment amount in orange */
.time-adjustment-amount-metric {
  border-color: rgba(217, 119, 6, 0.38);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.96), rgba(255, 251, 235, 0.92));
}

.time-adjustment-amount-metric span {
  color: #9a3412;
}

.time-adjustment-amount-metric strong {
  color: #c2410c;
  font-size: 16px;
}

.time-adjustment-amount-metric em {
  color: #9a3412;
}

/* Match Time Adjustment filter input and select styling */
.time-filter-bar .field {
  min-width: 0;
}

.time-filter-bar .field > span {
  color: #30425a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.time-filter-bar input,
.time-filter-bar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(119, 145, 167, 0.46);
  border-radius: 7px;
  background-color: #ffffff;
  color: #05172c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.time-filter-bar select {
  appearance: auto;
  padding-right: 34px;
}

.time-filter-bar input:focus,
.time-filter-bar select:focus {
  border-color: #0f8f87;
  box-shadow: 0 0 0 3px rgba(15, 143, 135, 0.13);
  outline: none;
}

/* Expanded Time Adjustment chart preview */
.time-hpi-chart {
  cursor: zoom-in;
}

.time-chart-preview-modal[hidden] {
  display: none;
}

.time-chart-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  padding: 28px;
}

.time-chart-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}

.time-chart-preview-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  width: min(1180px, calc(100vw - 48px));
  max-height: calc(100vh - 56px);
  padding: 18px;
  border: 1px solid rgba(22, 93, 85, 0.18);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.time-chart-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.time-chart-preview-head span {
  color: #007c72;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.time-chart-preview-head h3 {
  margin: 3px 0 0;
  color: #001f3a;
  font-size: 24px;
  line-height: 1.1;
}

.time-chart-preview-close {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(22, 93, 85, 0.2);
  border-radius: 10px;
  background: #ffffff;
  color: #004f49;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.time-chart-preview-close:hover,
.time-chart-preview-close:focus {
  border-color: rgba(15, 143, 135, 0.44);
  background: #eefaf8;
  outline: none;
}

.time-chart-preview-body {
  overflow: auto;
  border: 1px solid rgba(22, 93, 85, 0.12);
  border-radius: 14px;
  background: #ffffff;
}

.time-chart-preview-body svg {
  display: block;
  width: 100%;
  min-width: 860px;
  height: auto;
}

body.time-chart-preview-open {
  overflow: hidden;
}

/* 2026-07-02 Whole app white + blue visual refresh */
:root {
  --ink: #0f172a;
  --muted: #475569;
  --soft: #64748b;
  --line: #d7e3f4;
  --paper: #ffffff;
  --panel: #f7fbff;
  --panel-strong: #edf6ff;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf2ff;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --focus: #3b82f6;
  --gold-soft: #eff6ff;
  --canvas: #f4f8ff;
  --sidebar-dark: #f8fbff;
  --sidebar-deep: #edf5ff;
  --report-panel: #f7fbff;
  --shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
  --shadow-strong: 0 22px 56px rgba(37, 99, 235, 0.14);
}

html,
body {
  background: #f5f9ff;
}

body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, #f5f9ff 44%, #eef6ff 100%);
}

.app-top-nav {
  border-bottom-color: rgba(37, 99, 235, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.08);
}

.app-nav-brand {
  border-right-color: rgba(37, 99, 235, 0.16);
  color: #1e3a8a;
}

.app-nav-button,
button:not(.leaflet-control-zoom-in):not(.leaflet-control-zoom-out),
a.home-action-link,
select,
input,
textarea {
  border-color: #cfe0f7;
}

.app-nav-button,
a.home-action-link {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: #334155;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.app-nav-button:hover,
.app-nav-button:focus-visible,
a.home-action-link:hover,
a.home-action-link:focus-visible {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  color: #1d4ed8;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.14);
}

.app-nav-button.active,
.primary,
button.primary,
.billing-primary-button,
.field-photos-open-button,
.map-export-panel button.primary,
#copySelectedAreaButton,
#downloadSelectedAreaButton {
  border-color: #2563eb;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.app-nav-button.active .button-icon,
.primary .button-icon,
.field-photos-open-button .button-icon {
  color: #ffffff;
}

.workspace,
.results-panel,
.panel,
.tool-section,
.upload-card,
.time-card,
.time-filter-panel,
.time-summary-card,
.time-comparable-card,
.time-comparable-card-summary,
.trend-card,
.trend-summary-card,
.narrative-card,
.narrative-result-card,
.ai-grid-card,
.floor-plan-card,
.building-footprint-card,
.billing-card,
.billing-usage-card,
.field-photos-launch-panel,
.subject-address-panel,
.subject-reading-indicator,
.subject-research-output,
.pricing-card,
.order-manager-screen .panel-card {
  border-color: #d7e3f4;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

.section-kicker,
.tool-section h2,
.tool-section h3,
.time-card h3,
.time-adjustment-header h2,
.trend-card h3,
.narrative-card h3,
.ai-grid-card h3,
.floor-plan-card h3,
.building-footprint-card h3,
.billing-card h3,
.field-photos-heading h2,
.subject-simple-dashboard h2,
label > span,
.field label,
.time-filter-grid label,
.time-comparable-field span,
.map-display-title,
.map-style-control span {
  color: #1e3a8a;
}

input,
select,
textarea,
.paste-zone,
.time-screenshot-paste-zone,
.field-photos-url-field input {
  background: #ffffff;
  color: #0f172a;
  border-color: #cfe0f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

input:focus,
select:focus,
textarea:focus,
.paste-zone:focus,
.time-screenshot-paste-zone:focus,
.map-style-control select:focus-visible {
  border-color: #3b82f6;
  outline-color: rgba(59, 130, 246, 0.38);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14), 0 10px 24px rgba(37, 99, 235, 0.08);
}

.paste-zone,
.time-screenshot-paste-zone,
.field-photos-phone-panel,
.field-photos-steps span,
.time-source-panel,
.time-hpi-disclaimer,
.market-trend-note,
.narrative-helper,
.ai-grid-reading-indicator,
.footprint-status-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
}

/* Comparable map import box: keep the icon, title, and help text in clean columns. */
#mapWorkspace .paste-zone {
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 5px;
  min-height: 112px;
  padding: 16px 16px 16px 18px;
  overflow: hidden;
  border-color: rgba(0, 118, 110, 0.68);
  background: linear-gradient(135deg, #ffffff 0%, #eefdfa 100%);
}

#mapWorkspace .paste-zone::before {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
}

#mapWorkspace .paste-zone::after {
  left: 29px;
  top: 50%;
  transform: translateY(-50%);
}

#mapWorkspace .paste-title,
#mapWorkspace .paste-help {
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

#mapWorkspace .paste-title {
  align-self: end;
  font-size: 16px;
  line-height: 1.2;
}

#mapWorkspace .paste-help {
  align-self: start;
  font-size: 13px;
  line-height: 1.35;
}

#mapWorkspace .image-preview {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 92px;
  object-fit: contain;
  margin-top: 8px;
}

#mapWorkspace .import-help-wrap.is-open,
#mapWorkspace .import-help-popover {
  z-index: 20000;
}

.map-area,
.map-shell,
#mapWorkspace .panel,
.map-export-panel,
.map-display-bar,
.map-style-dock,
.map-quick-actions,
.sidebar-toggle-button,
.field-photos-screen,
.time-adjustment-screen,
.market-trend-screen,
.narrative-assistant-screen,
.ai-grid-review-screen,
.floor-plan-screen,
.building-footprint-screen,
.billing-screen,
.subject-simple-dashboard {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.map-display-bar label:has(input:checked),
.map-quick-actions button:hover,
.map-quick-actions button:focus-visible,
.map-quick-actions:hover button,
.map-quick-actions:focus-within button {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.map-display-bar label,
.map-style-dock .map-style-control,
.map-export-panel,
.sidebar-toggle-button {
  border-color: #cfe0f7;
  background: rgba(255, 255, 255, 0.94);
  color: #1e3a8a;
}

.import-progress-card,
.modal-card,
.narrative-output-card,
.time-chart-preview-card {
  border-color: #d7e3f4;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.16);
}

.import-progress-indicator.active,
.subject-reading-spinner,
.ai-grid-reading-spinner {
  border-color: rgba(37, 99, 235, 0.18);
  border-top-color: #2563eb;
}

.field-photos-qr-card {
  border-color: #bfdbfe;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
}

.field-photos-phone-copy h3,
.field-photos-phone-copy ul,
.field-photos-url-field,
.field-photos-heading h2 {
  color: #1e3a8a;
}

.field-photos-action {
  background: #ffffff;
  color: #1d4ed8;
}

.field-photos-action:hover,
.field-photos-action:focus-visible {
  background: #eff6ff;
}

.time-adjustment-amount-metric {
  border-color: #bfdbfe;
  background: #f7fbff;
}

.time-adjustment-amount-metric strong {
  color: #1d4ed8;
}

.app-nav-dropdown {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.app-nav-dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  right: -8px;
  left: -8px;
  z-index: 1799;
  height: 14px;
}

.app-nav-dropdown-trigger {
  padding-right: 16px;
}

.app-nav-dropdown-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms ease;
}

.app-nav-dropdown.is-open .app-nav-dropdown-trigger::after,
.app-nav-dropdown:hover .app-nav-dropdown-trigger::after,
.app-nav-dropdown:focus-within .app-nav-dropdown-trigger::after {
  transform: translateY(2px) rotate(225deg);
}

.app-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1800;
  display: none;
  min-width: 238px;
  padding: 8px;
  border: 1px solid #cfe0f7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
}

.app-nav-dropdown-menu-right {
  right: 0;
  left: auto;
}

.app-nav-dropdown.is-open .app-nav-dropdown-menu,
.app-nav-dropdown:hover .app-nav-dropdown-menu,
.app-nav-dropdown:focus-within .app-nav-dropdown-menu {
  display: grid;
  gap: 6px;
}

.app-nav-dropdown-menu .app-nav-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 10px;
  box-shadow: none;
  text-align: left;
}

.app-nav-dropdown-menu .app-nav-button:hover,
.app-nav-dropdown-menu .app-nav-button:focus-visible {
  box-shadow: none;
}

.app-nav-dropdown-menu .app-nav-button.active {
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.app-nav-menu-open {
  overflow: visible;
}

.app-nav-brand {
  min-width: 198px;
  min-height: 60px;
  padding-right: 18px;
}

.app-nav-brand img {
  width: 178px;
  max-width: 178px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 900px) {
  .app-top-nav {
    gap: 8px;
  }

  .app-nav-brand {
    min-width: 150px;
    min-height: 52px;
  }

  .app-nav-brand img {
    width: 136px;
    max-width: 136px;
    height: 48px;
  }

  .app-nav-dropdown-menu {
    min-width: 220px;
  }
}

/* 2026-07-11 Landing photo hero refresh */
.home-landing,
body.home-active {
  background: #fbfdff;
}

.home-landing {
  min-height: 100vh;
  color: #123457;
}

.home-landing .home-hero-photo img {
  opacity: 1;
  filter: saturate(0.94) contrast(0.98) brightness(1.08);
  object-position: center right;
}

.home-landing .home-hero-shade {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 32%, rgba(239, 248, 255, 0.76) 55%, rgba(224, 242, 254, 0.32) 80%, rgba(255, 255, 255, 0.14) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(219, 234, 254, 0.18));
}

.home-landing .landing-shell {
  max-width: none;
  min-height: 100vh;
  padding: 22px clamp(18px, 4vw, 64px) 28px;
}

.home-landing .landing-nav,
.home-landing .landing-hero-grid,
.home-landing .landing-feature-rail {
  max-width: 1480px;
  margin-right: auto;
  margin-left: auto;
}

.home-landing .landing-nav {
  grid-template-columns: minmax(220px, 1fr) auto minmax(300px, 1fr);
  min-height: 76px;
  border-color: rgba(147, 197, 253, 0.34);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.08);
}

.home-landing .landing-logo {
  width: 206px;
  max-width: 206px;
  height: 62px;
  object-fit: contain;
  object-position: left center;
}

.home-landing .landing-menu {
  background: rgba(239, 246, 255, 0.94);
}

.home-landing .landing-menu a {
  color: #1e3a8a;
}

.home-landing .landing-menu a:hover {
  color: #1d4ed8;
}

.home-landing .landing-hero-grid {
  grid-template-columns: minmax(420px, 0.76fr) minmax(520px, 1.24fr);
  min-height: clamp(560px, calc(100vh - 168px), 760px);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding-top: clamp(26px, 4vw, 56px);
}

.home-landing .landing-copy-panel {
  max-width: 650px;
  padding: clamp(26px, 3.4vw, 48px);
  border: 1px solid rgba(191, 219, 254, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 66px rgba(37, 99, 235, 0.1);
  backdrop-filter: blur(14px);
}

.home-landing .home-kicker {
  width: fit-content;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(240, 249, 255, 0.96);
  color: #0369a1;
}

.home-landing .home-brand h1 {
  max-width: 580px;
  color: #0f4c81;
  font-size: clamp(3.4rem, 5.25vw, 6.35rem);
  letter-spacing: 0;
}

.home-landing .home-copy {
  max-width: 560px;
  color: #475569;
  font-size: clamp(1.05rem, 1.18vw, 1.26rem);
  font-weight: 750;
}

.home-landing .landing-tool-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 590px;
  margin-top: 26px;
}

.home-landing .landing-tool-cards span {
  min-height: 86px;
  padding: 14px 14px 14px 54px;
  border-color: rgba(186, 230, 253, 0.92);
  background: rgba(248, 252, 255, 0.94);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}

.home-landing .landing-tool-cards span::before {
  background: #38bdf8;
  color: #0f3b5f;
}

.home-landing .landing-visual-stage {
  min-height: 560px;
}

.home-landing .landing-visual-stage::before {
  display: none;
}

.home-landing .landing-floating-card {
  border-color: rgba(191, 219, 254, 0.78);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.12);
  backdrop-filter: blur(12px);
}

.home-landing .landing-market-card {
  right: 18px;
  top: 52px;
}

.home-landing .landing-overview-card {
  left: 36px;
  top: 220px;
}

.home-landing .landing-property-card {
  right: 72px;
  bottom: 70px;
}

.home-landing .landing-hero-trial-cta {
  right: clamp(128px, 14vw, 240px);
  bottom: 0;
  min-height: 56px;
  padding: 0 34px;
  border-color: rgba(14, 165, 233, 0.28);
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  box-shadow: 0 22px 46px rgba(14, 165, 233, 0.26);
}

.home-landing .landing-feature-rail {
  margin-top: 18px;
  border-color: rgba(191, 219, 254, 0.78);
  background: rgba(255, 255, 255, 0.94);
}

.home-landing .landing-feature-icon {
  background: #e0f2fe;
  color: #0284c7;
}

@media (max-width: 1120px) {
  .home-landing .home-hero-shade {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.92) 48%, rgba(255, 255, 255, 0.76) 100%);
  }

  .home-landing .landing-nav {
    grid-template-columns: 1fr auto;
  }

  .home-landing .landing-hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .home-landing .landing-copy-panel {
    max-width: 760px;
  }

  .home-landing .landing-visual-stage {
    min-height: 430px;
  }

  .home-landing .landing-hero-trial-cta {
    right: 50%;
    bottom: 0;
    transform: translateX(50%);
  }

  .home-landing .landing-hero-trial-cta:hover,
  .home-landing .landing-hero-trial-cta:focus-visible {
    transform: translateX(50%) translateY(-1px);
  }
}

@media (max-width: 760px) {
  .home-landing .home-hero-photo img {
    object-position: 68% center;
  }

  .home-landing .home-hero-shade {
    background: rgba(248, 252, 255, 0.94);
  }

  .home-landing .landing-shell {
    padding: 14px;
  }

  .home-landing .landing-nav {
    grid-template-columns: 1fr;
  }

  .home-landing .landing-logo {
    width: 180px;
    max-width: 180px;
    height: 54px;
  }

  .home-landing .landing-copy-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .home-landing .home-brand h1 {
    font-size: clamp(3rem, 15vw, 4.55rem);
  }

  .home-landing .landing-tool-cards {
    grid-template-columns: 1fr;
  }

  .home-landing .landing-visual-stage {
    min-height: 360px;
  }

  .home-landing .landing-hero-trial-cta {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 18px;
    transform: none;
  }

  .home-landing .landing-hero-trial-cta:hover,
  .home-landing .landing-hero-trial-cta:focus-visible {
    transform: translateY(-1px);
  }
}
