:root {
  --bg: #f8faf7;
  --surface: #ffffff;
  --surface-2: #f1f5f0;
  --ink: #08110f;
  --muted: #66736d;
  --line: #dbe5df;
  --line-strong: #b8c8bf;
  --primary: #064e3b;
  --primary-2: #0f766e;
  --green: #16a34a;
  --blue: #2563eb;
  --gold: #f59e0b;
  --red: #b42318;
  --shadow: 0 18px 42px rgba(8, 17, 15, .08);
  --rail: 260px;
  --utility: 320px;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, Segoe UI, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  font-size: 15px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 17, 15, .035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 17, 15, .025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.4), transparent 45%);
}
button, input, textarea, select { font: inherit; }
input, textarea, select, button { min-width: 0; }
button { cursor: pointer; }
svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  background: rgba(248, 250, 247, .92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand {
  width: max-content;
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
}
.brand span { color: var(--green); }
.site-header nav {
  display: grid;
  gap: 6px;
}
.site-header nav button, .ghost, .signin {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 850;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.site-header nav button:hover, .ghost:hover {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 8px 20px rgba(8, 17, 15, .05);
}
.site-header nav button:first-child {
  background: #fff;
  border-color: var(--line);
}
.account-nav {
  margin-top: auto;
  display: grid;
  gap: 8px;
}
.signin, .primary {
  border: 0;
  background: var(--ink);
  color: #fff;
  justify-content: center;
  text-decoration: none;
}
.signin:hover, .primary:hover { background: var(--primary); }

main, .page, .section, .trust {
  max-width: 980px;
  margin-left: calc(var(--rail) + 28px);
  margin-right: calc(var(--utility) + 28px);
}
main { min-height: 100vh; }
.page { padding: 30px 0 70px; }
.page.narrow { max-width: 760px; }

.footer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  width: var(--utility);
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px 18px;
  background: rgba(255,255,255,.86);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.footer > div:first-child {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  padding: 18px;
}
.footer b { display: block; font-size: 18px; }
.footer p { margin: 8px 0 0; color: #d7e2dc; line-height: 1.45; }
.footer-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}
.footer-stat b { color: var(--primary); font-size: 28px; line-height: 1; }
.footer-stat span { display: block; margin-top: 5px; color: var(--muted); font-weight: 800; }
.footer button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  font-weight: 820;
}
.footer button:hover { background: var(--surface-2); border-color: var(--line); }

.hero {
  padding: 34px 0 24px;
}
.hero-inner {
  display: grid;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(236,253,243,.92), rgba(255,255,255,.95) 42%, #fff),
    radial-gradient(circle at top right, rgba(22,163,74,.2), transparent 22rem);
  padding: clamp(24px, 5vw, 54px);
  box-shadow: var(--shadow);
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-kicker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.eyebrow {
  width: max-content;
  margin: 0;
  border: 1px solid #bee7cf;
  border-radius: 999px;
  background: #ecfdf3;
  color: #087443;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 950;
}
.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .96;
  letter-spacing: 0;
}
.hero-copy {
  max-width: 710px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}
.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(8, 17, 15, .08);
}
.hero-search input {
  min-height: 56px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
}
.hero-search button, .form button {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 0 22px;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.hero-actions, .card-actions, .detail-actions, .demo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 650px;
}
.hero-metrics span {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.hero-metrics b {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  margin-bottom: 4px;
}
.hero-actions button, .card-actions button, .card-actions a, .detail-actions a, .detail-actions button, .detail-grid aside button, .demo-buttons button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.hero-actions button:hover, .card-actions button:hover, .card-actions a:hover, .detail-actions a:hover, .detail-actions button:hover, .detail-grid aside button:hover {
  border-color: #9ad6b0;
  background: #f0fdf4;
  color: var(--primary);
}

.section { padding: 22px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.section-head h2, .trust h2, .page h1, .detail h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
}
.section-head p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.category-grid, .listing-grid, .trust-grid, .action-grid, .dashboard-grid, .stat-grid {
  display: grid;
  gap: 10px;
}
.category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }

.category-card, .action-card, .listing-card, .trust-card, .detail-grid article, .detail-grid aside, .table-card, .metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 26px rgba(8, 17, 15, .045);
}
.category-card, .action-card {
  min-height: 132px;
  color: var(--ink);
  text-align: left;
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: start;
  position: relative;
  overflow: hidden;
}
.category-card::after, .action-card::after {
  content: "→";
  position: absolute;
  right: 14px;
  top: 14px;
  color: var(--line-strong);
  font-weight: 950;
}
.category-card svg {
  width: 27px;
  height: 27px;
  color: var(--primary);
}
.category-card b, .action-card b { font-size: 16px; }
.category-card span, .action-card span {
  color: var(--muted);
  line-height: 1.42;
}
.category-card:hover, .action-card:hover, .listing-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.listing-card {
  min-height: 230px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  overflow: hidden;
}
.listing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), transparent);
}
.card-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.card-title h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.24;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}
.badge.muted {
  background: #eef2f0;
  color: #66736d;
}
.meta, .availability {
  color: var(--muted);
  line-height: 1.42;
  font-size: 13px;
}
.listing-card p { margin: 0; line-height: 1.45; }
.availability { margin-top: auto; }

.trust {
  margin-top: 22px;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid #17352e;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
}
.trust h2 { color: #fff; margin-bottom: 12px; }
.trust article {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  padding: 16px;
}
.trust p { color: #cfddd7; line-height: 1.48; }

.directory-top, .detail-hero, .form, .table-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.directory-top {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
}
.directory-top h1 { margin: 0; }
.filters {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) minmax(120px,.8fr) minmax(150px,.9fr);
  gap: 8px;
  align-items: center;
}
.filters input, .filters select, .form input, .form select, .form textarea, .inline-form input, .inline-form select, .inline-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 12px;
  outline: 0;
  color: var(--ink);
}
.filters input:focus, .filters select:focus, .form input:focus, .form select:focus, .form textarea:focus, .inline-form input:focus, .inline-form select:focus, .inline-form textarea:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
.toggle {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}
.map-toggle {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.detail-hero {
  padding: 22px;
  margin-bottom: 12px;
}
.detail-hero p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--muted);
}
.detail-actions { margin: 10px 0 14px; }
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .85fr);
  gap: 10px;
}
.detail-grid article, .detail-grid aside, .table-card { padding: 18px; }
.detail-grid h2, .table-card h2 {
  margin: 20px 0 8px;
  font-size: 18px;
}
.detail-grid h2:first-child, .table-card h2:first-child { margin-top: 0; }
.detail-grid p { color: var(--muted); line-height: 1.58; }
.detail-grid aside button { width: 100%; margin-top: 8px; }
.photo-placeholder {
  min-height: 145px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-weight: 850;
}

.form {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.form textarea, .inline-form textarea {
  min-height: 104px;
  padding-top: 10px;
  resize: vertical;
}
.form button { min-height: 48px; }
.success {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  background: #ecfdf3;
  color: #166534;
  font-weight: 850;
}
.hidden { display: none !important; }
.empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: center;
}
.modal { display: none; }
.mobile-dock { display: none; }

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.metric { padding: 14px; }
.metric b {
  display: block;
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}
.metric span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 850;
}
.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.list-row:first-of-type { border-top: 0; }
.list-row b { min-width: 0; overflow-wrap: anywhere; }
.list-row span {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.42;
}
.row-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.row-actions button, .inline-form button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 850;
}
.inline-form {
  display: grid;
  grid-template-columns: minmax(110px,.35fr) minmax(0,1fr) auto;
  gap: 8px;
  margin-top: 12px;
}
.inline-form.stack { grid-template-columns: 1fr; }

@media (max-width: 1260px) {
  :root { --utility: 0px; }
  main, .page, .section, .trust { margin-right: 28px; }
  .footer {
    position: static;
    width: auto;
    margin-left: calc(var(--rail) + 28px);
    margin-right: 28px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 28px;
  }
  .footer > div:first-child, .footer-stat { display: none; }
}

@media (max-width: 980px) {
  :root { --rail: 0px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); background: #f5f8f5; }
  body::before { display: none; }
  .site-header {
    position: sticky;
    top: 0;
    inset: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.94);
  }
  .brand { font-size: 20px; padding: 7px 10px; }
  .site-header nav {
    display: none;
  }
  .account-nav { margin-left: auto; margin-top: 0; display: flex; }
  .account-nav .ghost { display: none; }
  .ghost, .signin { min-height: 38px; padding: 8px 11px; font-size: 13px; }
  main, .page, .section, .trust, .footer {
    width: min(calc(100% - 28px), 980px);
    margin-left: auto;
    margin-right: auto;
  }
  .hero { padding-top: 14px; }
  .hero-inner {
    border-radius: 24px;
    padding: 24px 18px;
    gap: 18px;
    background:
      linear-gradient(160deg, #08241d, #0b3b2f 56%, #0f766e);
    color: #fff;
  }
  .hero h1 {
    color: #fff;
    font-size: clamp(34px, 9vw, 48px);
    line-height: 1;
  }
  .hero-copy { color: rgba(255,255,255,.76); font-size: 16px; }
  .eyebrow {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.22);
    color: #bbf7d0;
  }
  .hero-kicker span { color: rgba(255,255,255,.72); }
  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 18px;
    box-shadow: 0 20px 44px rgba(0,0,0,.22);
  }
  .hero-search input { min-height: 50px; font-size: 15px; }
  .hero-search button { min-height: 48px; width: 100%; }
  .hero-actions button {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.22);
    color: #fff;
  }
  .hero-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-metrics span {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.16);
    color: rgba(255,255,255,.72);
  }
  .hero-metrics b { color: #fff; font-size: 18px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-grid, .trust-grid, .action-grid, .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .category-card {
    min-height: 132px;
    padding: 14px;
    border-radius: 16px;
  }
  .category-card b { font-size: 14px; }
  .category-card span { font-size: 12px; }
  .listing-card, .action-card, .table-card, .detail-grid article, .detail-grid aside {
    border-radius: 16px;
  }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr; }
  .directory-top { position: static; }
  .footer {
    display: none;
  }
  .mobile-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 100%;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(22px);
    box-shadow: 0 -18px 42px rgba(8,17,15,.1);
  }
  .mobile-dock button {
    min-width: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    padding: 8px 4px;
    display: grid;
    justify-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
  }
  .mobile-dock button:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
  .mobile-dock svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 640px) {
  main, .page, .section, .trust, .footer { width: min(calc(100% - 20px), 980px); }
  .hero-inner { padding: 22px 16px; border-radius: 22px; }
  .hero h1 { font-size: 36px; }
  .section { padding: 18px 0; }
  .section-head h2, .trust h2, .page h1, .detail h1 { font-size: 24px; }
  .section-head p { font-size: 13px; }
  .section-head, .dash-head { align-items: flex-start; flex-direction: column; }
  .stat-grid, .inline-form { grid-template-columns: 1fr; }
  .detail-actions a, .detail-actions button, .card-actions a, .card-actions button { flex: 1 1 44%; }
  .hero-metrics { grid-template-columns: 1fr; }
  .footer { display: none; }
}
