:root {
  color-scheme: light;
  --background: #eef2f6;
  --surface: #ffffff;
  --surface-subtle: #f6f8fb;
  --text: #101827;
  --muted-strong: #3c485d;
  --muted: #657086;
  --muted-soft: #8b95a7;
  --line: #dce3eb;
  --line-strong: #c9d2de;
  --accent: #19745f;
  --accent-strong: #105846;
  --accent-soft: rgb(25 116 95 / 0.09);
  --accent-line: rgb(25 116 95 / 0.24);
  --focus: #c87808;
  --danger: #a43333;
  --danger-soft: #fff2f2;
  --radius: 0.9rem;
  --shadow: 0 1rem 2.5rem -2rem rgb(32 48 72 / 0.34);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 0%, rgb(25 116 95 / 0.05), transparent 26rem),
    var(--background);
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 40;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  color: white;
  background: var(--text);
  font-weight: 750;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.78);
  backdrop-filter: blur(0.9rem);
}

.header-inner,
.portal-main {
  width: min(100% - 3rem, 96rem);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 4.4rem;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  min-width: 0;
  gap: 0.7rem;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 0.72rem;
  color: white;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0.65rem 1.4rem -0.8rem rgb(16 88 70 / 0.72);
}

.atomtree-mark {
  position: relative;
  width: 1rem;
  height: 1rem;
  border: 2px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.atomtree-mark::after {
  position: absolute;
  right: -0.28rem;
  bottom: -0.08rem;
  width: 0.42rem;
  height: 2px;
  background: white;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.brand-text {
  min-width: 0;
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.session-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: flex-end;
}

.session-role,
.mission-link,
.admin-view-toggle {
  min-height: 2.35rem;
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 0.75rem;
  font-weight: 750;
}

.admin-view-toggle {
  cursor: pointer;
}

.admin-view-toggle input {
  accent-color: var(--accent);
}

.mission-link {
  color: var(--accent-strong);
  text-decoration: none;
}

.environment-chip,
.portfolio-status {
  display: inline-flex;
  gap: 0.48rem;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.environment-chip {
  padding: 0.38rem 0.62rem;
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.environment-chip > span,
.status-dot,
.property-status::before {
  width: 0.4rem;
  height: 0.4rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.2rem var(--accent-soft);
}

.portal-main {
  padding-block: 2.1rem 2rem;
}

.page-head {
  display: block;
  max-width: none;
  margin-bottom: 1.6rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0.6rem;
  font-size: clamp(2.35rem, 5vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.page-sub {
  max-width: 40rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.property-quick-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.25rem 0.15rem 0.55rem;
  margin: 0.9rem -0.15rem -0.1rem;
}

.property-quick-list[aria-busy="true"] {
  min-height: 4.85rem;
}

.property-quick-item {
  min-width: 0;
  scroll-snap-align: start;
}

.property-quick-link,
.property-quick-disabled {
  display: grid;
  min-height: 4.5rem;
  grid-template-columns: 4.35rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  padding: 0.42rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 0.72rem;
  background: var(--surface);
  box-shadow: 0 0.55rem 1.25rem -1rem rgb(32 48 72 / 0.45);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.property-quick-link:hover {
  border-color: var(--accent);
  box-shadow: 0 0.8rem 1.5rem -1rem rgb(16 88 70 / 0.62);
  transform: translateY(-1px);
}

.property-quick-thumb {
  position: relative;
  width: 4.35rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.48rem;
  background: #dfe7ef;
}

.property-quick-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-quick-image[data-frame="street"] {
  object-position: center 36%;
  transform: scale(1.08);
}

.property-quick-image[data-frame="street-wide"] {
  object-position: center 44%;
  transform: scale(1.22);
}

.property-quick-copy,
.property-quick-name,
.property-quick-address {
  display: block;
  min-width: 0;
}

.property-quick-name {
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-quick-address {
  display: -webkit-box;
  margin-top: 0.23rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.property-quick-disabled {
  color: var(--muted);
  background: var(--surface-subtle);
}

.portfolio-status {
  min-height: 2.25rem;
  padding: 0.42rem 0.68rem;
  margin: 1rem 0 0;
  font-size: 0.74rem;
}

.portfolio-status strong {
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.catalog-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.12rem);
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-margin-top: 1rem;
}

.admin-tools {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(20rem, 1.3fr);
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding: 1.35rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-tools h2 {
  margin: 0.25rem 0 0.45rem;
}

.admin-tools p {
  margin-bottom: 0;
  color: var(--muted-strong);
}

.admin-artifact-list {
  display: grid;
  gap: 0.65rem;
}

.admin-artifact-link,
.admin-artifact-unavailable {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface-subtle);
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.admin-artifact-link::after {
  color: var(--accent);
  content: "Download";
  font-size: 0.72rem;
  text-transform: uppercase;
}

.admin-artifact-unavailable {
  color: var(--muted);
}

.section-head {
  display: flex;
  gap: 1.5rem;
  align-items: end;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.section-head .eyebrow {
  margin-bottom: 0.3rem;
}

.section-head h2,
.evidence-note h2 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-head > p {
  max-width: 23rem;
  margin-bottom: 0.05rem;
  color: var(--muted);
  text-align: right;
  font-size: 0.76rem;
  line-height: 1.45;
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 1rem;
}

.property-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.82rem;
  background: var(--surface);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.property-card:has(.property-link:hover) {
  border-color: var(--accent-line);
  box-shadow: 0 1.2rem 2.4rem -1.8rem rgb(16 88 70 / 0.5);
  transform: translateY(-2px);
}

.property-link,
.property-disabled {
  display: grid;
  min-height: 100%;
  grid-template-columns: minmax(10rem, 40%) minmax(0, 1fr);
  text-decoration: none;
}

.property-media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 13rem;
  overflow: hidden;
  background: #e3eaf3;
}

.property-media::after {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgb(8 18 30 / 0.2));
  content: "";
  pointer-events: none;
}

.property-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.04) contrast(1.035);
  transition:
    transform 240ms ease,
    filter 240ms ease;
}

.property-image[data-frame="street"] {
  object-position: center 36%;
  transform: scale(1.08);
}

.property-image[data-frame="street-wide"] {
  object-position: center 44%;
  transform: scale(1.25);
}

.property-link:hover .property-image {
  filter: saturate(1.12) contrast(1.045);
  transform: scale(1.045);
}

.property-link:hover .property-image[data-frame="street"] {
  transform: scale(1.125);
}

.property-link:hover .property-image[data-frame="street-wide"] {
  transform: scale(1.3);
}

.property-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 0.9rem 1rem 1rem;
}

.property-meta {
  display: flex;
  min-height: 1.25rem;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.58rem;
}

.property-status,
.property-kind {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  color: var(--accent);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.property-status::before {
  box-shadow: none;
  content: "";
}

.property-kind {
  padding: 0.2rem 0.42rem;
  border-radius: 999px;
  color: #255b83;
  background: #e9f4ff;
  letter-spacing: 0.06em;
}

.property-card[data-reconstruction="proposed"] .property-kind,
.property-card[data-reconstruction="estimated"] .property-kind {
  color: #7a4c00;
  background: #fff3d6;
}

.property-card[data-reconstruction="historical-blueprint"] .property-kind {
  color: #5a4484;
  background: #f1ebff;
}

.property-card[data-status="coming-soon"] .property-status {
  color: var(--muted);
}

.property-title {
  margin-bottom: 0.22rem;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.property-address,
.property-brief {
  margin-bottom: 0;
  line-height: 1.46;
}

.property-address {
  color: var(--muted-strong);
  font-size: 0.78rem;
}

.property-brief {
  margin-top: 0.48rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.property-footer {
  display: flex;
  min-height: 2.75rem;
  gap: 0.75rem;
  align-items: end;
  justify-content: space-between;
  padding-top: 0.72rem;
  margin-top: auto;
}

.property-signal {
  color: var(--muted-soft);
  font-size: 0.65rem;
  font-weight: 650;
}

.property-cta {
  display: inline-flex;
  min-height: 2.75rem;
  gap: 0.35rem;
  align-items: center;
  margin: -0.5rem -0.25rem -0.5rem auto;
  padding: 0.5rem 0.25rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.property-cta span {
  transition: transform 160ms ease;
}

.property-link:hover .property-cta span {
  transform: translateX(0.18rem);
}

.property-disabled {
  background: var(--surface-subtle);
}

.property-disabled .property-image {
  filter: grayscale(0.85) brightness(0.93);
}

.property-error {
  margin: 0 1rem 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e0b5b5;
  border-radius: 0.75rem;
  color: var(--danger);
  background: var(--danger-soft);
}

.evidence-note {
  display: flex;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: linear-gradient(110deg, var(--accent-soft), rgb(255 255 255 / 0.72));
  scroll-margin-top: 1rem;
}

.evidence-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.62rem;
  color: var(--accent-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.evidence-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.evidence-note p {
  max-width: 58rem;
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted-soft);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer p {
  margin-bottom: 0;
}

@media (min-width: 561px) and (max-width: 1100px) {
  .property-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.38rem;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .portal-main {
    width: min(100% - 1.4rem, 74rem);
  }

  .header-inner {
    min-height: 4rem;
    flex-wrap: wrap;
  }

  .brand-mark {
    width: 2.15rem;
    height: 2.15rem;
  }

  .environment-chip {
    padding-inline: 0.5rem;
    font-size: 0.58rem;
  }

  .portal-main {
    padding-top: 1.35rem;
  }

  .page-head {
    display: block;
    margin-bottom: 1.15rem;
  }

  h1 {
    font-size: clamp(2.25rem, 11.5vw, 3rem);
  }

  .page-sub {
    font-size: 0.88rem;
  }

  .portfolio-status {
    margin-top: 0.8rem;
  }

  .property-quick-list {
    display: flex;
    width: calc(100vw - 1.4rem);
    gap: 0.65rem;
    padding: 0.25rem 0.15rem 0.7rem;
    margin: 0.9rem -0.15rem -0.1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .property-quick-item {
    min-width: 0;
    flex: 1 0 10.8rem;
  }

  .section-head {
    display: block;
    padding: 0.85rem 0.9rem;
  }

  .section-head > p {
    margin: 0.35rem 0 0;
    text-align: left;
  }

  .property-content {
    padding: 0.8rem 0.9rem 0.9rem;
  }

  .property-footer {
    padding-top: 0.6rem;
  }

  .session-controls {
    width: 100%;
    padding-bottom: 0.65rem;
    justify-content: flex-start;
  }

  .admin-tools {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 560px) {
  .property-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .property-link,
  .property-disabled {
    display: flex;
    flex-direction: column;
  }

  .property-media {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 430px) {
  .brand-text small {
    font-size: 0.54rem;
  }

  .environment-chip {
    max-width: 7.5rem;
    justify-content: center;
    text-align: center;
  }

  .property-kind {
    display: none;
  }

  .evidence-note {
    padding: 0.9rem;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #7c8799;
    --muted: #344158;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .property-card,
  .property-image,
  .property-quick-link,
  .property-quick-image,
  .property-cta span {
    transition: none;
  }
}
