:root {
  --v84-green: #087a45;
  --v84-green-dark: #075a3a;
  --v84-green-soft: #edf8f2;
  --v84-red: #c82333;
  --v84-ink: #17251f;
  --v84-muted: #66756d;
  --v84-line: #d9e6df;
  --v84-surface: #fff;
  --v84-page: #f4f8f6;
  color: var(--v84-ink);
  background: var(--v84-page);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: clip;
  overscroll-behavior-x: none;
  background: var(--v84-page);
  color: var(--v84-ink);
}
body { background: linear-gradient(180deg, #f7faf8 0, #edf5f1 100%); }

.wrap {
  width: min(1440px, 100%);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: 28px clamp(16px, 3vw, 42px) 54px;
}
.wrap > *, .card > *, .grid2 > *, .grid3 > *, .grid4 > *, .checks > *,
.progress > *, .values > *, .scan-controls > * { min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid #c7e2d3;
  border-radius: 999px;
  background: #fff;
  color: var(--v84-green-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: .13em;
  overflow-wrap: anywhere;
  box-shadow: 0 7px 22px rgba(6, 70, 45, .07);
}
.hero { min-width: 0; padding: 28px 0 12px; }
.hero h1 {
  max-width: 1050px;
  margin-block: 4px;
  color: #121b17;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.hero .muted {
  max-width: 1050px;
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.6;
}
.muted, label { color: var(--v84-muted); }
.muted, .source, .source .detail, .autoUrl, .health, #message { overflow-wrap: anywhere; }

.card {
  min-width: 0;
  margin: 18px 0;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--v84-line);
  border-radius: 22px;
  background: var(--v84-surface);
  box-shadow: 0 16px 48px rgba(6, 70, 45, .07);
}
.card h2 {
  max-width: 100%;
  margin: 0 0 19px;
  color: #15271f;
  font-size: clamp(20px, 2.4vw, 29px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.cityBox {
  max-width: 100%;
  background: #fff;
  border: 2px solid var(--v84-green);
  box-shadow: 0 12px 35px rgba(8, 122, 69, .08);
}

input, select, textarea, button {
  max-width: 100%;
  min-width: 0;
  font: inherit;
}
input, select, textarea {
  width: 100%;
  min-height: 48px;
  background: #fff;
  color: var(--v84-ink);
  border: 1px solid #bdd2c7;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(7, 90, 58, .02);
}
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #89968f; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(8, 122, 69, .14);
  border-color: var(--v84-green);
}
button {
  min-height: 48px;
  background: var(--v84-green);
  color: #fff;
  border-radius: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  box-shadow: 0 9px 22px rgba(8, 122, 69, .18);
}
button:hover { background: var(--v84-green-dark); }
button:focus-visible { outline: 3px solid rgba(8, 122, 69, .25); outline-offset: 2px; }
button:disabled { opacity: .65; cursor: wait; }
.secondary { background: #eef5f1; color: var(--v84-green-dark); box-shadow: none; }

.checks label, .card label[style*="background"] {
  background: #f6f9f7 !important;
  border-color: #d7e5de !important;
  color: var(--v84-ink) !important;
}
.checks label {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 11px 13px;
}
.checks input, .card label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  min-height: 0;
  accent-color: var(--v84-green);
}

.scan-controls {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.05fr)
    minmax(170px, .9fr)
    minmax(210px, 1.05fr)
    minmax(210px, 1.05fr)
    minmax(220px, 1.2fr);
  gap: 14px;
  align-items: stretch;
}
.scan-option {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  min-height: 88px;
  margin-top: 6px !important;
  padding: 13px !important;
  border: 1px solid #d7e5de !important;
  border-radius: 12px !important;
  background: #f6f9f7 !important;
  color: var(--v84-ink) !important;
  font-size: 14px;
  line-height: 1.4;
}
.scan-option input { margin: 2px 0 0 !important; }
.scan-action { display: flex; align-items: stretch; }
.scan-action button { width: 100%; min-height: 100%; }
.scan-catalog { display: block; width: 100%; margin-top: 6px; }
.scan-capabilities { margin-top: 7px; font-size: 11px; line-height: 1.45; }
.scan-health, .scan-message { margin-top: 10px; }

.valuation-journey {
  min-width: 0;
  margin: 18px 0;
  padding: clamp(17px, 2.4vw, 25px);
  border: 1px solid #cfe2d8;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #edf8f2);
  box-shadow: 0 15px 42px rgba(6, 70, 45, .08);
}
.valuation-journey-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.valuation-journey-head strong { display: block; color: #123c29; font-size: clamp(17px, 2vw, 21px); }
.valuation-journey-head p { margin: 3px 0 0; color: var(--v84-muted); line-height: 1.45; }
.valuation-journey-head > b { color: var(--v84-green-dark); font-size: 18px; }
.valuation-spinner { width: 28px; height: 28px; border: 3px solid #cfe4d8; border-top-color: var(--v84-green); border-radius: 50%; }
.valuation-journey[data-state="running"] .valuation-spinner { animation: valuation-spin .8s linear infinite; }
.valuation-journey[data-state="idle"] .valuation-spinner { border-color: #d8e5de; }
.valuation-journey[data-state="done"] .valuation-spinner { border: 0; background: var(--v84-green); }
.valuation-journey[data-state="done"] .valuation-spinner::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #fff; font-weight: 900; }
.valuation-journey[data-state="error"] { border-color: #efc4c8; background: #fff7f7; }
.valuation-journey[data-state="error"] .valuation-spinner { border-color: #efc4c8; border-top-color: var(--v84-red); }
.valuation-journey-track { position: relative; height: 10px; margin-top: 17px; overflow: hidden; border-radius: 999px; background: #dfece5; }
.valuation-journey-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--v84-green-dark), #18a666); transition: width .45s ease; }
.valuation-journey ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.valuation-journey li { position: relative; min-width: 0; padding-inline-start: 19px; color: #718078; font-size: 12px; font-weight: 750; }
.valuation-journey li::before { content: ""; position: absolute; inset-inline-start: 0; top: .25em; width: 10px; height: 10px; border: 2px solid #b9cbc1; border-radius: 50%; background: #fff; }
.valuation-journey li.is-active { color: var(--v84-green-dark); }
.valuation-journey li.is-active::before { border-color: var(--v84-green); box-shadow: 0 0 0 4px rgba(8,122,69,.12); }
.valuation-journey li.is-done { color: #2b684a; }
.valuation-journey li.is-done::before { border-color: var(--v84-green); background: var(--v84-green); }
@keyframes valuation-spin { to { transform: rotate(360deg); } }

.re-v84-public-context .technical-detail,
.re-v84-public-context .scan-controls > div:not(.scan-action),
.re-v84-public-context .scan-health,
.re-v84-public-context .scan-message { display: none !important; }
.re-v84-public-context .scan-controls { display: block; }
.re-v84-public-context .scan-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
.re-v84-public-context .scan-action button { width: 100%; min-height: 58px; font-size: 16px; }
.re-v84-public-context #values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.re-v84-public-context #values .value:nth-child(4) { display: none; }

.source {
  background: #fff;
  border-color: #d7e5de;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(15, 61, 40, .045);
}
.sourceHead { flex-wrap: wrap; align-items: flex-start; }
.sourceHead b { min-width: 0; color: #173127; overflow-wrap: anywhere; }
.sourceHead .tag { flex: 0 0 auto; }
.source .detail { line-height: 1.5; }
.source a { color: var(--v84-green-dark); font-weight: 750; }
.tag { border: 1px solid transparent; }
.waiting { background: #edf2ef; color: #5f6e66; }
.running { background: #e8f2fb; color: #1a5d8b; }
.ok { background: #e6f6ed; color: #087443; }
.blocked, .no_data { background: #fff5dc; color: #855d00; }
.error { background: #fde9eb; color: #a3212d; }
.health {
  max-width: 100%;
  white-space: normal;
  background: #eef5f1;
  color: #315d49;
  border: 1px solid #d6e5dd;
}
.health.ok { background: #e7f6ee; color: #087443; }
.health.error { background: #fdebed; color: #9b2630; }

.values { gap: 14px; }
.value { background: #f7faf8; border-color: #dbe8e1; border-radius: 17px; }
.value b { color: var(--v84-green-dark); }
.warn {
  border-inline-start: 4px solid #d69b22;
  border-left: 0;
  background: #fff8e8;
  color: #6f5012;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.persistBox { background: #eef9f3; border-color: #b9dec9; color: #174d34; border-radius: 15px; }
.persistBox a { color: var(--v84-green-dark); font-weight: 800; }
.autoUrl { background: #f7faf8; border-color: #d6e4dc; }
.autoUrl b { color: #173127; }
.autoUrl a, a { color: var(--v84-green-dark); }

.scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #dce8e2;
  border-radius: 16px;
  background: #fff;
}
table { background: #fff; }
th { position: sticky; top: 0; z-index: 1; background: #edf5f1; color: #365d4a; }
th, td { border-bottom-color: #e1ebe6; color: #24372e; }
tbody tr:hover { background: #f6faf8; }

.professional-card { border-top: 5px solid var(--v84-green); background: linear-gradient(180deg, #fff, #f8fbf9); }
.professional-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.professional-heading p { max-width: 820px; color: var(--v84-muted); line-height: 1.55; }
.section-kicker { display: block; margin-bottom: 7px; color: var(--v84-green); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.professional-net { flex: 0 0 auto; padding: 11px 15px; border: 1px solid #cfe2d8; border-radius: 999px; background: #eef7f2; color: var(--v84-green-dark); font-weight: 850; }
.professional-net.is-positive { background: #e8f7ef; }
.professional-net.is-negative { background: #fff0f1; color: #a4232e; border-color: #f1cdd1; }
.professional-category { min-width: 0; margin: 20px 0 0; padding: 19px; border: 1px solid #dbe7e1; border-radius: 18px; background: #fff; }
.professional-category legend { max-width: 100%; padding: 0 9px; color: #173127; font-size: 18px; font-weight: 850; overflow-wrap: anywhere; }
.professional-category > p { margin: 0 0 15px; color: var(--v84-muted); }
.professional-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.professional-grid label > span, .professional-notes > span { display: block; color: #365247; font-size: 12px; font-weight: 750; }
.professional-notes { display: block; margin-top: 20px; }
.professional-rule { margin-top: 12px; padding: 12px 14px; border-inline-start: 4px solid var(--v84-green); border-radius: 7px 13px 13px 7px; background: #edf7f2; color: #315d49; font-size: 13px; }
.professional-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.professional-result span { min-width: 0; padding: 11px; border: 1px solid #cee2d7; border-radius: 11px; background: #fff; }
.professional-result b { display: block; margin-top: 4px; color: var(--v84-green-dark); font-size: 16px; overflow-wrap: anywhere; }

body:dir(rtl) .sourceHead, body:dir(rtl) .professional-heading { flex-direction: row-reverse; }
body:dir(rtl) th, body:dir(rtl) td { text-align: right; }

@media (max-width: 1180px) {
  .scan-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scan-action { grid-column: 1 / -1; }
  .scan-action button { min-height: 58px; }
}

@media (max-width: 1000px) {
  .grid4, .checks, .values, .progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .professional-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .wrap { padding: 14px 12px 44px; }
  .brand { width: fit-content; max-width: 100%; border-radius: 18px; font-size: 10px; letter-spacing: .11em; }
  .hero { padding-top: 22px; }
  .hero h1 { font-size: clamp(30px, 10vw, 42px); line-height: 1.02; }
  .hero .muted { font-size: 16px; line-height: 1.55; }
  .card { padding: 17px 14px; border-radius: 17px; }
  .card h2 { font-size: clamp(21px, 7vw, 27px); }
  .cityBox { padding: 14px; }
  .cityBox, .grid2, .grid3, .grid4, .checks, .values, .progress,
  .scan-controls, .professional-grid, .professional-result { grid-template-columns: minmax(0, 1fr); }
  .cityBox > div:nth-child(2), .scan-action { grid-column: auto; }
  .scan-option { min-height: 0; }
  .scan-action button { min-height: 58px; }
  .professional-heading { display: grid; gap: 12px; }
  .professional-net { justify-self: start; }
  .professional-category { padding: 15px 12px; }
  .scroll { border-radius: 12px; }
  .valuation-journey-head { grid-template-columns: auto minmax(0, 1fr); }
  .valuation-journey-head > b { grid-column: 2; font-size: 14px; }
  .valuation-journey ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .re-v84-public-context #values { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 360px) {
  .wrap { padding-inline: 10px; }
  .card { padding-inline: 12px; }
  .brand { padding-inline: 10px; }
}

@media print {
  body { background: #fff; }
  .brand, .hero, .cityBox, #professional-adjustments button { box-shadow: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .source { box-shadow: none; }
  .valuation-journey { display: none; }
}

/* AVM R4: same light, green visual language as the public site. */
body { background: #fff; }
.wrap { max-width: 1180px; }
.card { box-shadow: none; border: 0; border-bottom: 1px solid var(--v84-line); border-radius: 0; background: #fff; padding: 24px 0; }
.hero h1 { color: var(--v84-ink); font-size: clamp(32px,4vw,48px); }
.brand { color: var(--v84-green); letter-spacing: .08em; }
.cityBox { background: var(--v84-green-soft); border: 1px solid var(--v84-line); }
details.technical-detail > summary { cursor: pointer; color: var(--v84-green-dark); font-weight: 650; padding: 8px 0; }
details.technical-detail > h2 { display: none; }
.progress { display: block; }
.source { margin-block: 8px; box-shadow: none; }
.values .value { background: var(--v84-green-soft); border: 0; box-shadow: none; }
.re-v84-public-context details.technical-detail:not(.hide) { display: block; }
