:root {
  --green: #1f7a44;
  --green-dark: #145331;
  --green-soft: #e8f5ee;
  --snow: #e7f0f7;
  --gold: #d6a13a;
  --ink: #17241c;
  --muted: #5d6b63;
  --line: #d9e5de;
  --bg: #f7faf8;
  --white: #ffffff;
  --danger: #a94432;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
}

.skip-link:focus {
  left: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 8px;
  font-weight: 900;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
  font-weight: 700;
}

.navlinks a:hover,
.navlinks a.active {
  color: var(--green);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.navlinks .btn-primary,
.navlinks .btn-primary.active,
.navlinks .btn-primary:hover {
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  border-color: var(--green);
  color: var(--green-dark);
}

.btn-danger {
  background: var(--white);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover,
.btn-danger:focus {
  background: #fff4f1;
}

.btn-call {
  background: var(--gold);
  color: #322301;
}

.btn-text {
  background: var(--green-dark);
  color: var(--white);
}

.btn-wide {
  width: 100%;
}

.hero {
  background:
    linear-gradient(90deg, rgba(20, 83, 49, 0.96), rgba(31, 122, 68, 0.76)),
    linear-gradient(135deg, #0e3c26 0%, #2f7249 48%, #d6a13a 100%);
  color: var(--white);
  padding: 66px 0 78px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 32px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #cfeedd;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  max-width: 13ch;
  font-size: clamp(36px, 7vw, 64px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(26px, 4vw, 38px);
}

h3 {
  font-size: 20px;
}

.hero p {
  max-width: 58ch;
  margin: 18px 0 0;
  color: #effaf3;
  font-size: 18px;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 20px 48px rgba(8, 28, 16, 0.22);
}

.mini-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.mini-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
}

.check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 900;
}

section {
  padding: 58px 0;
}

.section-white {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-snow {
  background: var(--snow);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.lead {
  max-width: 68ch;
  margin: 10px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card,
.service-card,
.builder-panel,
.summary-panel,
.info-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card,
.service-card,
.info-box {
  padding: 22px;
}

.card p,
.service-card p,
.info-box p {
  margin: 8px 0 0;
  color: var(--muted);
}

.tag-row,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag,
.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fbfdfc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.catalog {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.service-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.service-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.season-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.season {
  border-radius: 8px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
}

.season strong {
  display: block;
  margin-bottom: 4px;
}

.band {
  background: var(--green-dark);
  color: var(--white);
  text-align: center;
}

.band p {
  margin: 10px auto 0;
  max-width: 58ch;
  color: #dcefe5;
}

.builder-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.builder-panel,
.summary-panel {
  padding: 22px;
}

.builder-step {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.builder-step:first-child {
  padding-top: 0;
  border-top: 0;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label,
legend {
  color: #25372d;
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd9d1;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
}

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

small.help {
  color: var(--muted);
  font-size: 13px;
}

.photo-upload input[type="file"] {
  min-height: auto;
  padding: 11px 12px;
  background: #fbfdfc;
}

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

.photo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 8px 10px;
  font-size: 14px;
}

.photo-file {
  min-width: 0;
}

.photo-list strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.photo-remove {
  flex: 0 0 auto;
  border: 1px solid #e3c6be;
  border-radius: 6px;
  background: #fff7f5;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 9px;
}

.photo-remove:hover {
  background: #ffece7;
}

.photo-remove:focus {
  background: #ffece7;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented,
.service-picker {
  display: grid;
  gap: 10px;
}

.segmented {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.option,
.service-option,
.preset {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 14px;
  cursor: pointer;
}

.option input,
.service-option input,
.preset input {
  position: absolute;
  inset: 14px auto auto 14px;
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.option span,
.service-option span,
.preset span {
  display: block;
  padding-left: 30px;
  font-weight: 800;
}

.service-option .service-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-info {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--green-dark);
  cursor: help;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.service-info:hover,
.service-info:focus {
  border-color: var(--green);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.option small,
.service-option small,
.preset small {
  display: block;
  padding-left: 30px;
  margin-top: 4px;
  color: var(--muted);
}

.service-detail {
  display: none;
  padding-left: 30px;
  margin-top: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.service-option:hover .service-detail,
.service-option:focus-within .service-detail {
  display: block;
}

.option:has(input:checked),
.service-option:has(input:checked),
.preset:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
}

.service-option[hidden],
.dynamic-group[hidden] {
  display: none;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.filter-btn {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 6px 12px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.filter-btn.active {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.dynamic-questions {
  display: grid;
  gap: 16px;
}

.dynamic-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfc;
}

.dynamic-group h3 {
  margin-bottom: 12px;
}

.summary-panel {
  position: sticky;
  top: 88px;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.summary-panel pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
}

.muted {
  color: var(--muted);
}

.status {
  display: none;
  margin-top: 14px;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
}

.status.show {
  display: block;
}

.status.ok {
  color: #0f4d2f;
  background: #def5e8;
  border: 1px solid #aedbc1;
}

.status.error {
  color: var(--danger);
  background: #fff0ed;
  border: 1px solid #edc7bf;
}

.hp {
  position: absolute;
  left: -9999px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  gap: 24px;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
}

.contact-list a {
  color: var(--green-dark);
  font-weight: 900;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.photo-slot {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 2px dashed #abc7b8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(232, 245, 238, 0.92)),
    repeating-linear-gradient(45deg, #e4eee8, #e4eee8 12px, #dbe8e0 12px, #dbe8e0 24px);
  color: #5e7668;
  text-align: center;
  font-weight: 800;
  padding: 16px;
}

.footer {
  background: #0f1d15;
  color: #c1d5ca;
  padding: 38px 0;
  font-size: 14px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer .brand {
  color: var(--white);
  margin-bottom: 8px;
}

.copyright {
  margin-top: 20px;
  color: #82958a;
  font-size: 12px;
}

@media (max-width: 900px) {
  .hero-grid,
  .builder-shell,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
  }

  .season-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(100% - 28px, 1120px);
  }

  .menu-btn {
    display: inline-flex;
  }

  .navlinks {
    display: none;
    position: absolute;
    inset: 68px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 14px;
  }

  .navlinks.open {
    display: flex;
  }

  .hero {
    padding: 46px 0 58px;
  }

  .form-grid,
  .season-strip {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }
}

.admin-hero {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}

.admin-head,
.admin-actions,
.admin-service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-preview-links .btn {
  min-height: 38px;
  padding: 8px 12px;
}

.admin-shell {
  display: grid;
  gap: 18px;
}

.admin-panel,
.admin-service {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

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

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

.admin-services {
  display: grid;
  gap: 12px;
}

.admin-inline-actions {
  align-items: end;
  display: flex;
}

.admin-inline-actions .btn {
  width: 100%;
}

.domain-lanes {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.domain-lanes legend {
  color: var(--ink);
  font-size: .92rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.domain-entry {
  align-items: end;
}

.domain-preview {
  margin: 8px 0 0;
}

.admin-service {
  display: grid;
  gap: 12px;
}

.admin-service textarea {
  min-height: 74px;
}

.tenant-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.tenant-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.tenant-row:hover,
.tenant-row:focus {
  background: #eef6f0;
  border-color: #9cc8a3;
  outline: none;
}

.tenant-row.active {
  background: #edf7ed;
  border-color: var(--green);
}

.tenant-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tenant-main strong,
.tenant-main small {
  overflow-wrap: anywhere;
}

.tenant-meta {
  color: var(--muted);
  font-size: .88rem;
}

.tenant-status {
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  flex: 0 0 auto;
  font-size: .78rem;
  font-weight: 800;
  padding: 4px 8px;
  text-transform: uppercase;
}

.tenant-status.active {
  background: #eaf6ec;
  border-color: #b9d9bf;
  color: #1f6f35;
}

.tenant-status.draft {
  background: #fff7e6;
  border-color: #f1d18f;
  color: #8a5b00;
}

.tenant-status.paused {
  background: #f4f4f5;
  border-color: #d7d7dc;
  color: #55545c;
}

.domain-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.domain-row {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.domain-head,
.domain-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.domain-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.domain-head strong,
.domain-head small {
  overflow-wrap: anywhere;
}

.domain-head small {
  color: var(--muted);
}

.dns-record {
  display: grid;
  gap: 10px;
  grid-template-columns: .7fr .7fr 1.6fr;
}

.dns-record div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
}

.dns-record span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dns-record strong {
  overflow-wrap: anywhere;
}

.domain-error {
  color: var(--danger);
  margin: 0;
}

.tenant-status.live {
  background: #eaf6ec;
  border-color: #b9d9bf;
  color: #1f6f35;
}

.tenant-status.needs-dns,
.tenant-status.needs-api-setup,
.tenant-status.needs-cloudflare-setup,
.tenant-status.verifying {
  background: #fff7e6;
  border-color: #f1d18f;
  color: #8a5b00;
}

.tenant-status.cloudflare-error {
  background: #fff4f1;
  border-color: #e1b6ad;
  color: var(--danger);
}

@media (max-width: 760px) {
  .admin-head,
  .admin-service-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-preview-links {
    justify-content: stretch;
  }

  .admin-preview-links .btn {
    flex: 1 1 120px;
  }

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

  .admin-actions .btn {
    width: 100%;
  }

  .tenant-row,
  .domain-head,
  .domain-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tenant-status {
    width: fit-content;
  }

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