:root {
  --bg: #f8fbf8;
  --surface: #ffffff;
  --surface-soft: #eef9f3;
  --text: #173127;
  --muted: #62756d;
  --line: #dce8e1;
  --primary: #12805f;
  --primary-dark: #0d644b;
  --accent: #f1b23f;
  --danger: #b84343;
  --success: #19724e;
  --shadow: 0 18px 50px rgba(21, 50, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(248, 251, 248, 0.86);
  border-bottom: 1px solid rgba(220, 232, 225, 0.85);
}

.nav-wrap,
.nav,
.footer-inner,
.hero-actions,
.product-meta,
.note-card > div,
.admin-toolbar {
  display: flex;
  align-items: center;
}

.nav-wrap {
  min-height: 74px;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #28b987);
}

.nav {
  gap: 16px;
  font-weight: 650;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: none;
  min-width: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: grid;
}

.nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 12px;
}

.nav-dropdown-menu a:hover {
  background: var(--surface-soft);
}

.nav form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.icon-button {
  border: 0;
  background: transparent;
  padding: 4px;
  font-size: 1.15rem;
  cursor: pointer;
}

main {
  padding: 28px 0 64px;
}

.hero {
  display: grid;
  gap: 24px;
  align-items: center;
}

.hero-copy h1,
.section-heading h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.02;
}

.lead {
  max-width: 700px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dff6eb;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

.hero-card,
.card,
.form-card,
.cta-card,
.product-card,
.note-card,
.dev-note,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  overflow: hidden;
}

.hero-card div {
  padding: 18px;
}

.hero-card p,
.card p,
.cta-card p,
.section-heading p,
.product-card p,
.locked-registration p,
.microcopy,
.muted {
  color: var(--muted);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

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

.button-secondary {
  background: #e8f5ef;
  color: var(--primary-dark);
}

.button-secondary:hover {
  background: #d9eee4;
}

.button-disabled {
  background: #dce5df;
  color: #66776f;
  cursor: not-allowed;
}

.button-disabled:hover {
  background: #dce5df;
  color: #66776f;
}

.danger-button {
  background: var(--danger);
}

.danger-button:hover {
  background: #963535;
}

.value-grid,
.product-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

.value-grid {
  margin-top: 24px;
}

.card,
.cta-card,
.admin-card {
  padding: 22px;
}

.dashboard-link {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-link:hover,
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(21, 50, 39, 0.12);
}

.admin-back {
  margin-bottom: 8px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f6fbf8;
}

.subtle-action {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.danger-zone {
  border-color: #efcaca;
}

.card h2,
.cta-card h2,
.product-card h2,
.section-heading h2 {
  margin-top: 0;
}

.beta-banner {
  margin-top: 24px;
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #173127, #12805f);
}

.beta-banner h2 {
  margin: 12px 0 0;
}

.waitlist,
.section-block {
  margin-top: 32px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.form-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

label span {
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 13px 14px;
  color: var(--text);
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
}

textarea {
  resize: vertical;
}

.alert {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 18px;
}

.alert-success {
  color: var(--success);
  background: #e4f7ee;
}

.alert-error {
  color: var(--danger);
  background: #fdecec;
}

.narrow {
  max-width: 720px;
}

.dev-note,
.locked-registration {
  margin-top: 18px;
}

.dev-note {
  padding: 18px;
  overflow-wrap: anywhere;
}

.product-grid {
  margin: 24px 0;
}

.product-card {
  overflow: hidden;
}

.product-card a {
  display: grid;
  gap: 12px;
  height: 100%;
  padding-bottom: 18px;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
}

.product-card h2,
.product-card p,
.product-card strong,
.product-card .product-meta,
.product-card .rating-display,
.product-card .rating-empty {
  margin-left: 18px;
  margin-right: 18px;
}

.product-meta {
  flex-wrap: wrap;
  gap: 8px;
}

.product-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.product-detail {
  display: grid;
  gap: 22px;
}

.product-hero {
  display: grid;
  gap: 20px;
  align-items: center;
}

.product-hero img {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.product-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff4df;
  font-weight: 750;
}

.rating-display {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.rating-display strong {
  color: var(--text);
}

.star-meter {
  position: relative;
  display: inline-block;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 0.08em;
}

.star-meter-base {
  color: #d6ddd8;
}

.star-meter-fill {
  position: absolute;
  inset: 0;
  width: var(--rating-width);
  overflow: hidden;
  color: var(--accent);
}

.rating-empty {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mini-action {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mini-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.rating-card form {
  display: grid;
  gap: 16px;
}

.star-picker {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}

.star-picker legend {
  width: 100%;
  margin-bottom: 8px;
  font-weight: 700;
}

.star-picker input {
  position: absolute;
  opacity: 0;
  width: 0;
}

.star-picker label {
  display: inline-block;
  color: #c7d1cb;
  font-size: 2rem;
  cursor: pointer;
}

.star-picker input:checked ~ label,
.star-picker label:hover,
.star-picker label:hover ~ label {
  color: var(--accent);
}

.note-list {
  display: grid;
  gap: 14px;
}

.note-card {
  padding: 18px;
}

.note-card > div {
  justify-content: space-between;
  gap: 12px;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  min-height: 78px;
  color: var(--muted);
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

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

.admin-card strong {
  display: block;
  font-size: 2rem;
}

.admin-toolbar {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.filter-grid,
.admin-form-grid {
  display: grid;
  gap: 12px;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

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

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions form {
  margin: 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

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

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

  .filter-grid {
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: end;
  }

  .public-filter-grid {
    grid-template-columns: 2fr 1fr 1fr auto;
  }

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

@media (max-width: 719px) {
  .nav-wrap {
    min-height: 68px;
  }

  .nav {
    gap: 12px;
    font-size: 0.95rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}
