:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-soft: #f1f4f2;
  --ink: #161b22;
  --muted: #5f6972;
  --line: #d8dde3;
  --line-strong: #c4cbd3;
  --accent: #2f7d3e;
  --accent-dark: #256833;
  --accent-soft: #e6f3e9;
  --danger: #b42318;
  --ok: #237a3b;
  --warning: #9a6700;
  --radius: 8px;
  --shadow: 0 16px 42px rgba(23, 32, 42, 0.06);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
.button-link {
  align-items: center;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary,
.secondary-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button.secondary:hover,
.secondary-link:hover {
  background: var(--surface-soft);
}

.site-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px max(24px, calc((100vw - 1440px) / 2 + 24px));
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-brand,
.site-nav,
.header-tools,
.hero-actions,
.column-heading,
.log-heading,
.button-row,
.tabs,
.cart-total,
.status-chip,
.mode-indicator {
  align-items: center;
  display: flex;
}

.site-brand {
  color: var(--ink);
  font-size: 1.36rem;
  font-weight: 900;
  gap: 10px;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--accent);
  border-radius: var(--radius);
  color: #fff;
  display: inline-flex;
  font-size: 0.94rem;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.site-nav {
  gap: 26px;
}

.site-nav a {
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 0.91rem;
  font-weight: 800;
  padding: 22px 0 20px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.header-tools {
  gap: 16px;
}

.segmented-control {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.segmented-control button {
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  min-height: 34px;
  min-width: 64px;
  padding: 0 14px;
}

.segmented-control button.active {
  background: var(--accent);
  color: #fff;
}

.mode-indicator {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  gap: 8px;
  white-space: nowrap;
}

.mode-indicator::before {
  background: var(--ok);
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.page-shell {
  margin: 0 auto;
  padding: 22px 20px 20px;
  width: min(100%, 1440px);
}

.hero-shell {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  min-height: 190px;
  padding: 34px 62px;
}

.hero-copy {
  min-width: 0;
}

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

h1 {
  font-size: 2.48rem;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 14px;
}

h2 {
  font-size: 1rem;
  letter-spacing: 0.015em;
  margin: 0;
  text-transform: uppercase;
}

h3 {
  font-size: 1rem;
  margin: 0;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 20px;
  max-width: 620px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.hero-placeholder,
.media-placeholder,
.image-cell {
  align-items: center;
  background: linear-gradient(135deg, #f9fafb, #eef1f4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  display: grid;
  justify-items: center;
}

.hero-placeholder {
  min-height: 150px;
  padding: 20px;
}

.hero-placeholder svg,
.media-placeholder svg,
.image-cell svg {
  fill: none;
  height: 44px;
  margin-bottom: 8px;
  stroke: #9ca3af;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  width: 44px;
}

.hero-placeholder strong {
  color: var(--ink);
  font-size: 1rem;
}

.main-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 2fr) minmax(360px, 0.95fr);
  margin-top: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-heading {
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
}

.public-preview,
.booking-module,
.account-module,
.commerce-module {
  grid-column: 1;
}

.dev-harness {
  align-self: start;
  grid-column: 2;
  grid-row: span 2;
  position: sticky;
  top: 86px;
}

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

.preview-column {
  min-width: 0;
  padding: 16px 14px;
}

.preview-column + .preview-column {
  border-left: 1px solid var(--line);
}

.column-heading,
.log-heading,
.tabs-heading {
  justify-content: space-between;
}

.text-button {
  background: transparent;
  color: var(--accent-dark);
  min-height: auto;
  padding: 0;
}

.text-button:hover {
  background: transparent;
  text-decoration: underline;
}

.row-list,
.choice-list,
.module-toggles,
.harness-form,
.account-form,
.cart-panel,
.module-output {
  display: grid;
  gap: 10px;
}

.data-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 8px 0;
}

.data-row:last-child {
  border-bottom: 0;
}

.data-row strong,
.data-row span,
.compact-list strong,
.compact-list span {
  display: block;
}

.data-row span,
.compact-list span,
.inline-status,
.page-status,
.helper-text,
.module-output dd {
  color: var(--muted);
}

.image-cell {
  height: 48px;
  width: 58px;
}

.image-cell svg {
  height: 24px;
  margin: 0;
  width: 24px;
}

.row-action {
  color: var(--ink);
  font-weight: 900;
}

.harness-form {
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 125, 62, 0.2);
  outline-offset: 2px;
}

.module-toggles {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px 14px;
}

.module-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px 110px minmax(0, 1fr);
}

.module-row.reserved {
  opacity: 0.65;
}

.switch {
  align-items: center;
  background: #e6e9ed;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  height: 20px;
  padding: 2px;
  width: 38px;
}

.switch input {
  appearance: none;
  height: 0;
  margin: 0;
  min-height: 0;
  opacity: 0;
  padding: 0;
  width: 0;
}

.switch span {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  height: 16px;
  transform: translateX(0);
  transition: transform 160ms ease, background 160ms ease;
  width: 16px;
}

.switch:has(input:checked) {
  background: var(--accent);
}

.switch:has(input:checked) span {
  transform: translateX(18px);
}

.request-log {
  padding: 12px 14px 14px;
}

.log-table {
  display: grid;
  font-size: 0.8rem;
  gap: 0;
  margin-top: 10px;
}

.log-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 64px 58px minmax(0, 1fr) 54px;
  min-height: 34px;
}

.log-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-code {
  border-radius: 999px;
  justify-self: start;
  padding: 3px 7px;
}

.status-code.ok {
  background: var(--accent-soft);
  color: var(--ok);
}

.status-code.error {
  background: #fff0ed;
  color: var(--danger);
}

.booking-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 270px 190px minmax(0, 1fr);
  padding: 16px;
}

.stepper {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 14px 38px;
}

.step {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.82rem;
  font-weight: 850;
  gap: 9px;
  min-width: 0;
}

.step::after {
  border-top: 1px dashed var(--line-strong);
  content: "";
  flex: 1;
}

.step:last-child::after {
  display: none;
}

.step-index {
  align-items: center;
  background: #e9edf1;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.step.active {
  color: var(--ink);
}

.step.active .step-index {
  background: var(--accent);
  color: #fff;
}

.choice-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 8px 10px;
}

.choice-row input {
  min-height: auto;
  width: auto;
}

.choice-row.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.media-placeholder {
  min-height: 124px;
}

.booking-form,
.inline-fields,
.account-grid,
.commerce-grid {
  display: grid;
  gap: 12px;
}

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

.booking-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.tabs {
  gap: 14px;
}

.tabs button {
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  min-height: auto;
  padding: 0 0 5px;
}

.tabs button.active {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.account-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.8fr);
  padding: 16px;
}

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

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

.account-form button {
  align-self: end;
}

.module-output {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.module-output dl {
  display: grid;
  gap: 7px 14px;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
}

.module-output dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.commerce-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  padding: 16px;
}

.commerce-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.product-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 40px minmax(0, 1fr) 90px 88px 44px;
  min-height: 58px;
  padding: 8px 10px;
}

.product-row:last-child {
  border-bottom: 0;
}

.product-row input[type="number"] {
  min-height: 32px;
}

.product-row input[type="checkbox"] {
  min-height: auto;
}

.cart-panel {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.compact-list .data-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
}

.cart-total {
  border-top: 1px solid var(--line);
  justify-content: space-between;
  padding-top: 12px;
}

.cart-total strong {
  font-size: 1.3rem;
}

.button-row {
  flex-wrap: wrap;
  gap: 8px;
}

.order-status,
.page-status,
.card-mount {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.45;
  padding: 10px 12px;
}

.page-status {
  margin: 14px 0 0;
}

.page-status.ok {
  border-color: #b7dfc1;
  background: #f0fbf2;
  color: var(--ok);
}

.page-status.error {
  border-color: #ffd1cb;
  background: #fff5f4;
  color: var(--danger);
}

.site-footer {
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.86rem;
  justify-content: space-between;
  padding: 14px max(20px, calc((100vw - 1440px) / 2 + 20px));
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .hero-shell,
  .main-grid,
  .booking-grid,
  .account-grid,
  .commerce-grid {
    grid-template-columns: 1fr;
  }

  .dev-harness,
  .public-preview,
  .booking-module,
  .account-module,
  .commerce-module {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }

  .module-output,
  .cart-panel,
  .preview-column + .preview-column {
    border-left: 0;
    padding-left: 0;
  }

  .preview-columns,
  .inline-fields,
  .account-form {
    grid-template-columns: 1fr;
  }

  .preview-column + .preview-column {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 14px 12px;
  }

  .site-header {
    gap: 16px;
    padding: 12px;
  }

  .site-nav {
    gap: 12px 20px;
  }

  .site-nav a {
    padding: 0;
  }

  .hero-shell {
    padding: 24px;
  }

  h1 {
    font-size: 2.22rem;
  }

  .stepper {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 16px;
  }

  .step::after {
    display: none;
  }

  .product-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .product-row > span,
  .product-row > input[type="number"] {
    grid-column: 2;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 12px;
  }
}
