:root {
  --page: #f7f9f4;
  --paper: #ffffff;
  --paper-soft: #f0f4ec;
  --paper-warm: #faf6ee;
  --ink: #14201d;
  --ink-soft: #2a3633;
  --muted: #5b6b65;
  --line: #e4e9de;
  --line-strong: #cdd5c4;
  --green: #1a7a5c;
  --green-dark: #0e4f3e;
  --green-soft: #dfeee6;
  --green-mid: #2a957a;
  --brick: #b86844;
  --clay-soft: #f4e2d6;
  --amber: #d18d18;
  --blue: #2c5872;
  --danger: #c0392b;
  --danger-soft: #fce9e6;
  --shadow-xs: 0 1px 2px rgba(20, 32, 29, 0.04);
  --shadow-soft: 0 4px 14px rgba(20, 32, 29, 0.06), 0 1px 2px rgba(20, 32, 29, 0.04);
  --shadow: 0 14px 36px rgba(20, 32, 29, 0.10), 0 2px 6px rgba(20, 32, 29, 0.05);
  --shadow-hover: 0 22px 54px rgba(20, 32, 29, 0.14), 0 3px 8px rgba(20, 32, 29, 0.06);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --focus-ring: 0 0 0 3px rgba(26, 122, 92, 0.22);

  /* Type scale (16px base) */
  --text-2xs: 0.68rem;   /* 10.9px — captions, micro tags */
  --text-xs: 0.78rem;    /* 12.5px — eyebrows, chip labels */
  --text-sm: 0.88rem;    /* 14px   — meta, secondary text */
  --text-base: 1rem;     /* 16px   — body */
  --text-md: 1.06rem;    /* 17px   — emphasis body, card strong */
  --text-lg: 1.22rem;    /* 19.5px — section sub-heads */
  --text-xl: clamp(1.32rem, 2vw, 1.55rem);   /* h3 */
  --text-2xl: clamp(1.6rem, 2.6vw, 2.0rem);  /* h2 small */
  --text-3xl: clamp(1.85rem, 3.2vw, 2.65rem); /* h2 */
  --text-4xl: clamp(2.1rem, 5vw, 3.6rem);    /* hero h1 secondary */
  --text-5xl: clamp(2.4rem, 6.4vw, 5.0rem);  /* hero h1 portal */

  /* Line height */
  --leading-tight: 1.08;
  --leading-snug: 1.18;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Weight scale */
  --w-regular: 400;
  --w-medium: 500;
  --w-semibold: 600;
  --w-bold: 700;
  --w-extrabold: 800;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fafcf7 0%, var(--page) 48%, #eef2e8 100%);
  color: var(--ink-soft);
  font-family: "Segoe UI Variable", "Segoe UI", Inter, Aptos, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font: 16px/1.5 "Segoe UI Variable", "Segoe UI", Inter, Aptos, "Helvetica Neue", Arial, sans-serif;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-chip {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  flex: 0 0 auto;
  vertical-align: middle;
}

.section-heading[data-icon] {
  position: relative;
}

.section-heading[data-icon] .icon-chip {
  position: absolute;
  top: 0;
  left: 0;
}

.section-heading[data-icon] .eyebrow,
.section-heading[data-icon] h2 {
  padding-left: 48px;
}

.section-heading[data-icon].compact-heading {
  display: flex;
  align-items: center;
}

.section-heading[data-icon].compact-heading .icon-chip {
  position: static;
}

.section-heading[data-icon].compact-heading h3,
.section-heading[data-icon].compact-heading h2 {
  padding-left: 0;
}

.home-screen .section-heading[data-icon] .eyebrow,
.home-screen .section-heading[data-icon] h2 {
  padding-left: 42px;
}

.home-screen .section-heading[data-icon] .icon-chip {
  width: 30px;
  height: 30px;
  margin-right: 8px;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(14, 56, 44, 0.94) 0%, rgba(12, 44, 35, 0.94) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand-lockup {
  order: 1;
  display: inline-grid;
  place-items: center;
  align-items: center;
  flex: 0 0 auto;
  width: 132px;
  min-width: 0;
  height: 50px;
  margin-left: 0;
  margin-right: auto;
}

.brand-lockup::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: url("logo.png") center left / contain no-repeat;
}

.brand-lockup > * {
  display: none;
}

.brand-lockup strong,
.section-heading h2,
.admin-rail h1,
.portal-copy h1,
.client-hero-copy h1,
.project-card h3,
.listing-card h3,
.map-card h3,
.charge-card h3,
.calculator-result h3,
.module-card h3,
.compact-heading h3,
.record-card h3,
.compact-record h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-lockup strong {
  display: block;
  font-size: 1rem;
}

.eyebrow {
  display: block;
  margin: 0 0 6px;
  color: var(--brick);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.header-nav {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.96);
  color: var(--green-dark);
  outline: none;
}

main {
  overflow: hidden;
}

.portal-hero,
.client-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(680px, calc(100vh - 90px));
  padding: clamp(28px, 7vw, 84px) clamp(16px, 5vw, 72px);
  color: #fff;
  isolation: isolate;
}

.home-screen .site-header {
  position: absolute;
  width: 100%;
  background: linear-gradient(180deg, rgba(11, 22, 21, 0.72) 0%, rgba(11, 22, 21, 0.35) 100%);
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

.portal-hero::after,
.client-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 46, 35, 0.92) 0%, rgba(8, 46, 35, 0.62) 50%, rgba(8, 46, 35, 0.20) 100%),
    linear-gradient(180deg, rgba(8, 46, 35, 0.10), rgba(8, 46, 35, 0.55));
}

.portal-media,
.client-hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  margin: 0;
}

.portal-media img,
.client-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-stack {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.banner-stack span {
  position: absolute;
  inset: 0;
  background-image: var(--banner-image);
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  animation: bannerFade 18s infinite;
}

.banner-stack span:nth-child(2) {
  animation-delay: 6s;
}

.banner-stack span:nth-child(3) {
  animation-delay: 12s;
}

@keyframes bannerFade {
  0%,
  28% {
    opacity: 1;
  }

  36%,
  100% {
    opacity: 0;
  }
}

.portal-copy,
.client-hero-copy {
  max-width: 790px;
}

.portal-copy h1,
.client-hero-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: var(--text-5xl);
  font-weight: var(--w-bold);
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
}

.lede {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--text-lg);
  font-weight: var(--w-regular);
  line-height: var(--leading-relaxed);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-action,
.secondary-action,
.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.primary-action {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 79, 62, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.primary-action:hover {
  box-shadow: 0 16px 32px rgba(14, 79, 62, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.secondary-action {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.secondary-action:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.96);
  color: var(--green-dark);
}

.light-action {
  border-color: var(--line);
  background: #fff;
  color: var(--green-dark);
  box-shadow: var(--shadow-soft);
}

.light-action:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.danger-action {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 20px rgba(192, 57, 43, 0.22);
}

.primary-action:hover,
.secondary-action:hover,
.danger-action:hover,
.light-action:hover {
  transform: translateY(-1px);
}

.primary-action:active,
.secondary-action:active,
.danger-action:active,
.light-action:active {
  transform: translateY(0);
}

.compact {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
}

.portal-strip,
.metric-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px clamp(16px, 5vw, 72px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

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

.portal-strip article,
.stat-card {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.metric-value,
.stat-card strong {
  color: var(--green-dark);
  font-size: clamp(1.5rem, 4vw, 2.35rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric-label,
.stat-card span {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.84rem;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: 10px;
  max-width: 1040px;
  margin-top: 28px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.home-screen .client-hero {
  min-height: min(460px, calc(100vh - 74px));
  padding: calc(84px + clamp(20px, 4vw, 44px)) clamp(14px, 4vw, 44px) clamp(20px, 4vw, 44px);
}

.home-screen .client-hero-copy {
  max-width: 980px;
}

.home-screen .client-hero-copy h1 {
  max-width: 720px;
  font-size: clamp(2rem, 5vw, 4.1rem);
}

.home-screen .lede {
  max-width: 620px;
  margin-top: 12px;
}

.home-screen .hero-actions {
  margin-top: 18px;
}

.home-screen .quick-search {
  grid-template-columns: minmax(210px, 1.3fr) repeat(6, minmax(100px, 0.75fr));
  gap: 8px;
  max-width: 1180px;
  margin-top: 18px;
  padding: 10px;
}

.home-screen .quick-search input,
.home-screen .quick-search select {
  min-height: 38px;
  padding: 7px 9px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.quick-search label {
  color: rgba(255, 255, 255, 0.83);
}

.directory-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 390px;
  padding: clamp(48px, 9vw, 108px) clamp(16px, 5vw, 72px);
  color: #fff;
  isolation: isolate;
  background-position: center;
  background-size: cover;
}

.directory-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 46, 35, 0.88) 0%, rgba(8, 46, 35, 0.55) 45%, rgba(8, 46, 35, 0.18) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.30) 100%);
}

.directory-hero > div {
  max-width: 820px;
}

.directory-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: var(--text-4xl);
  font-weight: var(--w-bold);
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
}

.project-directory {
  background-image: url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1500&q=82");
}

.home-directory {
  background-image: url("https://images.unsplash.com/photo-1600566753190-17f0baa2a6c3?auto=format&fit=crop&w=1500&q=82");
}

.plot-directory {
  background-image: url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1500&q=82");
}

.directory-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding: 18px clamp(16px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.phase-strip-section {
  padding: 24px clamp(16px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.home-screen .metric-band {
  gap: 8px;
  padding: 10px clamp(14px, 4vw, 44px);
}

.home-screen .stat-card {
  min-height: 62px;
  padding: 11px 12px;
}

.home-screen .phase-strip-section {
  padding: 14px clamp(14px, 4vw, 44px);
}

.home-screen .phase-strip-section .section-heading {
  align-items: end;
  grid-template-columns: minmax(170px, auto) 1fr;
  max-width: none;
  margin-bottom: 8px;
}

.home-screen .phase-strip-section .section-heading .eyebrow {
  grid-column: 1 / -1;
}

.home-screen .phase-strip-section .section-heading h2 {
  font-size: 1.25rem;
}

.compact-band {
  background: var(--paper-soft);
}

.phase-strip-section .section-heading {
  margin-bottom: 14px;
}

.phase-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phase-strip a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--green-dark);
  font-size: var(--text-sm);
  font-weight: var(--w-bold);
  box-shadow: var(--shadow-xs);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.phase-strip a .icon {
  color: var(--green);
  opacity: 0.8;
}

.phase-strip a:hover,
.phase-strip a:focus-visible {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
  outline: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: var(--focus-ring);
}

.content-section {
  padding: clamp(36px, 7vw, 74px) clamp(16px, 5vw, 72px);
}

.home-screen .content-section {
  padding: 18px clamp(14px, 4vw, 44px);
}

.home-screen .content-section:nth-of-type(even) {
  background: #fff;
}

.home-screen .section-heading {
  max-width: none;
  margin-bottom: 10px;
}

.home-screen .section-heading h2 {
  font-size: clamp(1.12rem, 1.7vw, 1.55rem);
}

.home-screen .eyebrow {
  margin-bottom: 3px;
}

.home-screen .with-tools {
  align-items: start;
}

.content-section:nth-of-type(even) {
  background: #fff;
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: var(--text-3xl);
  font-weight: var(--w-bold);
  letter-spacing: -0.015em;
  line-height: var(--leading-tight);
}

.with-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.segmented-control button {
  min-width: 76px;
  min-height: 36px;
  padding: 7px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.segmented-control button:hover {
  color: var(--green-dark);
}

.segmented-control button.active {
  background: #fff;
  color: var(--green-dark);
  box-shadow: var(--shadow-xs), 0 1px 0 rgba(20, 32, 29, 0.04);
}

.project-grid,
.listing-grid,
.map-grid,
.charge-grid,
.record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.listing-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.home-preview-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.home-preview-row > * {
  scroll-snap-align: start;
}

.project-grid.home-preview-row > * {
  flex: 0 0 calc((100% - 42px) / 4);
  min-width: 220px;
}

.listing-grid.home-preview-row > * {
  flex: 0 0 calc((100% - 56px) / 5);
  min-width: 210px;
}

.map-grid.home-preview-row > * {
  flex: 0 0 calc((100% - 42px) / 4);
  min-width: 220px;
}

.charge-grid.home-preview-row > * {
  flex: 0 0 calc((100% - 28px) / 3);
  min-width: 240px;
}

.tool-grid.home-preview-row > * {
  flex: 0 0 calc((100% - 42px) / 4);
  min-width: 210px;
}

.phase-strip[data-preview-row="true"] {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
}

.phase-strip[data-preview-row="true"] a {
  flex: 0 0 auto;
}

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

.tool-grid.home-preview-row {
  display: flex;
}

.tool-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--green);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-1px);
}

.tool-card strong {
  color: var(--green-dark);
  font-size: var(--text-md);
  font-weight: var(--w-bold);
}

.tool-card span {
  color: var(--muted);
  font-weight: var(--w-medium);
  font-size: var(--text-sm);
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
}

.project-card,
.listing-card,
.map-card,
.charge-card,
.record-card,
.compact-record,
.calculator-result,
.calculator-form,
.admin-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.project-card,
.listing-card,
.map-card {
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

a.project-card,
a.listing-card {
  display: block;
  color: inherit;
}

a.project-card:hover,
a.listing-card:hover,
a.project-card:focus-visible,
a.listing-card:focus-visible {
  border-color: rgba(26, 122, 92, 0.45);
  box-shadow: var(--shadow-hover);
  outline: none;
  transform: translateY(-3px);
}

.project-card img,
.listing-card img,
.map-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--paper-soft);
  transition: transform 380ms ease;
}

a.project-card:hover img,
a.listing-card:hover img,
.map-card:hover img {
  transform: scale(1.04);
}

/* Card media containers (image + overlay tags + favorite) */
.listing-media,
.project-media {
  position: relative;
  overflow: hidden;
}

.media-tag,
.media-status {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.95);
  color: var(--green-dark);
  font-size: var(--text-xs);
  font-weight: var(--w-bold);
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(4px);
}

.media-tag { left: 12px; }
.media-status {
  right: 12px;
  background: rgba(14, 79, 62, 0.92);
  color: #fff;
}

.favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.95);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
  transition: color 180ms ease, transform 180ms ease, background 180ms ease;
}

.favorite-button:hover {
  color: var(--danger);
  transform: scale(1.08);
}

.favorite-button.is-saved {
  color: var(--danger);
  background: #fff;
}

.favorite-button.is-saved .icon {
  fill: currentColor;
}

/* Listing card body */
.listing-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: var(--w-semibold);
}

.listing-meta .icon {
  color: var(--green);
}

.listing-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--paper-soft);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: var(--w-semibold);
}

.stat-pill .icon {
  color: var(--green);
}

.listing-footer,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.listing-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green-dark);
  font-size: var(--text-sm);
  font-weight: var(--w-bold);
}

a.listing-card:hover .listing-cta,
a.project-card:hover .listing-cta {
  color: var(--green);
}

.card-society {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: var(--text-xs);
  font-weight: var(--w-bold);
}

.listing-card img {
  height: 188px;
}

.map-card img {
  height: 250px;
}

.home-screen .project-card img,
.home-screen .listing-card img,
.home-screen .map-card img {
  height: 120px;
}

.home-screen .project-card-body,
.home-screen .listing-body,
.home-screen .map-card > div,
.home-screen .charge-card {
  gap: 8px;
  padding: 12px;
}

.home-screen .project-card p,
.home-screen .listing-card p,
.home-screen .map-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-screen .property-specs span,
.home-screen .mini-meta span {
  min-height: 24px;
  padding: 3px 7px;
}

.home-screen .table-wrap table {
  min-width: 520px;
}

.home-screen th,
.home-screen td {
  padding: 10px 12px;
}

.home-screen .calculator-layout {
  grid-template-columns: minmax(210px, 0.95fr) minmax(220px, 1.05fr);
  gap: 10px;
}

.home-screen .calculator-form,
.home-screen .calculator-result {
  gap: 8px;
  padding: 12px;
}

.home-screen .calculator-result h3 {
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
}

.project-card-body,
.listing-body,
.map-card > div,
.charge-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.project-card p,
.listing-card p,
.map-card p,
.charge-card p,
.about-section p,
.privacy-section p,
.calculator-result p,
.record-card p,
.compact-record p {
  margin: 0;
  color: var(--muted);
}

.card-kicker,
.mini-meta,
.property-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.tag,
.map-society {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: var(--text-xs);
  font-weight: var(--w-bold);
  letter-spacing: 0.02em;
}

.tag .icon,
.map-society .icon,
.media-tag .icon {
  opacity: 0.85;
}

.charge-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.charge-head > div {
  display: grid;
  gap: 6px;
}

.charge-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--paper-warm);
  color: var(--brick);
  flex: 0 0 auto;
}

.charge-card h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--w-bold);
}

.map-media {
  position: relative;
  overflow: hidden;
}

.property-specs span,
.mini-meta span {
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--muted);
  font-weight: 600;
}

.listing-body strong {
  color: var(--brick);
  font-size: var(--text-lg);
  font-weight: var(--w-extrabold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.listing-card h3,
.project-card h3 {
  font-size: var(--text-md);
  font-weight: var(--w-bold);
  letter-spacing: -0.01em;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--paper-soft);
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) td {
  background: rgba(247, 249, 244, 0.55);
}

tbody tr:hover td {
  background: var(--green-soft);
}

td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
}

tr:last-child td {
  border-bottom: 0;
}

.transfer-section {
  background: var(--paper-warm);
}

.calculator-charges {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.calculator-charges .section-heading {
  margin-bottom: 0;
}

.calculator-layout,
.split-admin {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 14px;
}

.calculator-form,
.calculator-result {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.calculator-result h3 {
  color: var(--green-dark);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-weight: 700;
}

dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.about-section p,
.privacy-section p {
  max-width: 940px;
  font-size: 1.05rem;
}

.detail-hero {
  position: relative;
  min-height: min(620px, calc(100vh - 82px));
  display: grid;
  align-items: end;
  padding: clamp(44px, 9vw, 104px) clamp(16px, 5vw, 72px);
  color: #fff;
  isolation: isolate;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 46, 35, 0.90) 0%, rgba(8, 46, 35, 0.55) 50%, rgba(8, 46, 35, 0.18) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.30) 100%);
}

.detail-hero img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-copy {
  display: grid;
  gap: 14px;
  max-width: 820px;
}

.detail-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5.4rem);
  line-height: 1.04;
}

.detail-hero-copy p,
.detail-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.detail-panel p {
  color: var(--muted);
}

.inverse-link {
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 24px;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 5vw, 72px);
  background: #fff;
}

.detail-main {
  display: grid;
  gap: 16px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: var(--w-semibold);
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.78);
  transition: color 160ms ease;
}

.breadcrumbs a:hover {
  color: #fff;
}

.breadcrumbs span {
  color: #fff;
}

.breadcrumbs .icon {
  color: rgba(255, 255, 255, 0.42);
}

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

.tag-inverse {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--text-md);
  font-weight: var(--w-semibold);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-price {
  color: #fff;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: var(--w-extrabold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  margin-right: 12px;
}

.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--text-sm);
  font-weight: var(--w-semibold);
}

/* Sticky contact panel */
.contact-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--paper-warm) 0%, #fff 60%);
  box-shadow: var(--shadow-soft);
}

.contact-panel h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: var(--text-2xl);
  font-weight: var(--w-extrabold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.contact-panel p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.contact-panel .primary-action,
.contact-panel .secondary-action {
  width: 100%;
}

.contact-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--green-dark);
}

.contact-secondary:hover {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-dark);
}

.contact-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--line);
}

.contact-fineprint {
  font-size: var(--text-xs) !important;
  color: var(--muted);
}

.project-detail-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: var(--paper-soft);
}

.detail-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.detail-panel .section-heading {
  margin-bottom: 0;
}

.detail-price {
  color: var(--brick);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

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

.mini-list a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbf9;
}

.mini-list a:hover,
.mini-list a:focus-visible {
  border-color: rgba(31, 111, 82, 0.5);
  outline: none;
}

.mini-list span {
  color: var(--muted);
  font-weight: 700;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  min-height: 38px;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-weight: 800;
}

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

.gallery-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  object-fit: cover;
}

/* New gallery: main + thumbnail strip */
.gallery-panel {
  grid-column: 1 / -1;
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 12px;
}

.gallery-main {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.gallery-main img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 600ms ease;
}

.gallery-main:hover img {
  transform: scale(1.03);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.gallery-thumbs img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.admin-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
  padding: 18px clamp(14px, 4vw, 34px) 34px;
}

.admin-rail {
  position: sticky;
  top: 90px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #0e4f3e 0%, #0a3a2d 60%, #082e23 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.admin-rail .eyebrow {
  color: #f0c97a;
  letter-spacing: 0.16em;
}

.admin-rail h1 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-rail h1 {
  font-size: 1.75rem;
}

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

.admin-stats .stat-card {
  min-height: 92px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  box-shadow: none;
}

.admin-stats .stat-card strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.admin-stats .stat-card span {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 600;
}

.admin-actions {
  display: grid;
  gap: 8px;
}

.admin-workspace {
  display: grid;
  gap: 16px;
}

.admin-section {
  padding: 18px;
}

.dashboard-hero {
  background:
    linear-gradient(135deg, rgba(26, 122, 92, 0.08), rgba(209, 141, 24, 0.06)),
    #fff;
}

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

.module-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  min-height: 178px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.module-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--text-2xs);
  font-weight: var(--w-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.add-badge {
  background: var(--green);
  color: #fff;
}

.view-badge {
  background: var(--paper-soft);
  color: var(--muted);
  border: 1px solid var(--line);
}

.module-card h3 {
  font-size: var(--text-md);
  font-weight: var(--w-bold);
}

.module-card:hover,
.module-card:focus-visible {
  border-color: rgba(26, 122, 92, 0.45);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.module-card p {
  margin: 0;
  color: var(--muted);
}

.module-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.admin-subsection {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.compact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: none;
  margin-bottom: 0;
}

.inline-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid rgba(14, 79, 62, 0.20);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green-dark);
  font-size: var(--text-sm);
  font-weight: var(--w-bold);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
  box-shadow: var(--shadow-soft);
  outline: none;
}

.inverse-link {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.inverse-link:hover,
.inverse-link:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #050505;
}

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

.admin-form.single {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.span-2 {
  grid-column: 1 / -1;
}

.record-card,
.compact-record {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 122px;
  padding: 12px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.record-card:hover,
.compact-record:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.compact-record {
  grid-template-columns: minmax(0, 1fr) auto;
}

.record-card img {
  width: 104px;
  height: 92px;
  border-radius: var(--radius);
  object-fit: cover;
}

.record-card div,
.compact-record div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.record-card h3,
.compact-record h3 {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.record-card p,
.compact-record p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  outline: none;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 130px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 28px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--paper-soft);
  text-align: center;
  font-weight: 500;
}

.empty-state .icon {
  padding: 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  color: var(--green);
  box-sizing: content-box;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 8px;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0e4f3e, #082e23);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: var(--text-sm);
  font-weight: var(--w-semibold);
  animation: toastIn 240ms ease-out;
}

.toast .icon {
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  color: #d6f5e6;
  box-sizing: content-box;
}

@keyframes toastIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Multi-column footer */
.site-footer {
  margin-top: 32px;
  padding: 48px clamp(16px, 5vw, 72px) 0;
  background: linear-gradient(180deg, #0e4f3e 0%, #082e23 100%);
  color: rgba(255, 255, 255, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 36px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: var(--text-lg);
  font-weight: var(--w-extrabold);
  letter-spacing: -0.01em;
}

.footer-brand p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: var(--text-sm);
  font-weight: var(--w-regular);
  line-height: var(--leading-relaxed);
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 8px;
}

.footer-socials a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.footer-socials a:hover {
  border-color: #fff;
  background: #fff;
  color: var(--green-dark);
  transform: translateY(-2px);
}

.footer-col h4 {
  margin: 0 0 14px;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--w-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li a,
.footer-col li span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--text-sm);
  font-weight: var(--w-medium);
  transition: color 160ms ease;
}

.footer-col li a:hover,
.footer-col li a:focus-visible {
  color: #fff;
  outline: none;
}

.footer-phase-list {
  grid-template-columns: 1fr 1fr;
  display: grid;
  gap: 8px 14px;
}

.footer-contact .icon {
  color: rgba(255, 255, 255, 0.5);
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-xs);
}

.footer-meta-links {
  display: flex;
  gap: 16px;
}

.footer-meta-links a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: var(--w-semibold);
  transition: color 160ms ease;
}

.footer-meta-links a:hover {
  color: #fff;
}

@media (max-width: 1180px) {
  .listing-grid,
  .project-grid,
  .map-grid,
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .home-screen .quick-search {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .header-nav {
    justify-content: flex-start;
  }

  .portal-hero,
  .client-hero {
    min-height: 620px;
  }

  .portal-hero::after,
  .client-hero::after {
    background: linear-gradient(90deg, rgba(19, 31, 30, 0.92), rgba(19, 31, 30, 0.58));
  }

  .portal-strip,
  .metric-band,
  .charge-grid,
  .record-grid,
  .calculator-layout,
  .detail-layout,
  .project-detail-stack,
  .split-admin,
  .module-grid,
  .admin-shell,
  .gallery-layout {
    grid-template-columns: 1fr;
  }

  .admin-rail,
  .contact-panel {
    position: static;
  }

  .with-tools {
    align-items: start;
    flex-direction: column;
  }

  .home-screen .client-hero {
    min-height: 560px;
  }

  .home-screen .quick-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid.home-preview-row > *,
  .listing-grid.home-preview-row > *,
  .map-grid.home-preview-row > *,
  .charge-grid.home-preview-row > *,
  .tool-grid.home-preview-row > * {
    flex-basis: calc((100% - 14px) / 2);
  }
}

@media (max-width: 680px) {
  body,
  button,
  input,
  select,
  textarea {
    font-size: 15px;
  }

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

  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    padding-right: 20px;
    padding-left: 20px;
  }

  .brand-lockup {
    margin-right: 0;
  }

  .header-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-self: start;
    width: min(100%, 350px);
    max-width: 350px;
  }

  .header-nav a {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  .portal-hero,
  .client-hero,
  .detail-hero {
    min-height: 700px;
    padding-top: 38px;
    padding-bottom: 38px;
  }

  .home-screen .site-header {
    position: sticky;
  }

  .home-screen .client-hero {
    min-height: auto;
    padding-right: 20px;
    padding-left: 20px;
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .home-screen .client-hero-copy,
  .home-screen .quick-search {
    width: min(100%, 350px);
    max-width: 350px;
    min-width: 0;
  }

  .home-screen .lede {
    max-width: 350px;
  }

  .home-screen .client-hero-copy h1 {
    max-width: 320px;
    font-size: clamp(1.9rem, 9vw, 2.35rem);
  }

  .home-screen .metric-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-screen .phase-strip-section .section-heading {
    grid-template-columns: 1fr;
  }

  .home-screen .quick-search {
    grid-template-columns: 1fr;
  }

  .portal-copy h1,
  .client-hero-copy h1,
  .detail-hero-copy h1 {
    font-size: clamp(2.15rem, 13vw, 3.8rem);
  }

  .directory-hero > div {
    width: min(100%, 350px);
    max-width: 350px;
  }

  .directory-hero h1 {
    max-width: 350px;
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .directory-hero .lede {
    max-width: 350px;
  }

  .hero-actions,
  .quick-search,
  .directory-filter,
  .admin-form,
  .project-grid,
  .listing-grid,
  .map-grid,
  .feature-list,
  .gallery-strip,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 320px);
    overflow: visible;
    padding-bottom: 0;
  }

  .hero-actions > a {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .segmented-control {
    width: 100%;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .record-card {
    grid-template-columns: 82px minmax(0, 1fr) auto;
  }

  .record-card img {
    width: 82px;
    height: 74px;
  }

  .content-section,
  .admin-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .home-screen .content-section {
    padding: 14px;
  }

  .project-grid.home-preview-row > *,
  .listing-grid.home-preview-row > *,
  .map-grid.home-preview-row > *,
  .charge-grid.home-preview-row > *,
  .tool-grid.home-preview-row > * {
    flex-basis: 82%;
    min-width: 240px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-phase-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 430px) {
  .site-header {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .record-card {
    grid-template-columns: 1fr auto;
  }

  .record-card img {
    grid-column: 1 / -1;
    width: 100%;
    height: 150px;
  }
}
