:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18222d;
  background: #f4f7f9;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; line-height: 1.55; }
a { color: #17624f; text-underline-offset: .2rem; }
a:hover { color: #0b493a; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem clamp(1rem, 5vw, 4rem);
  background: #fff;
  border-bottom: 1px solid #dbe3e8;
}
.brand { color: #173f36; font-size: 1.1rem; font-weight: 750; text-decoration: none; }
.navigation { display: flex; align-items: center; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.navigation a { color: #173f36; font-weight: 650; text-decoration-color: transparent; text-underline-offset: .3rem; }
.navigation a:hover, .navigation a[aria-current="page"] { text-decoration-color: currentColor; }
.nav-disabled { color: #67737d; cursor: not-allowed; }
.nav-disabled small { display: block; font-size: .65rem; font-weight: 500; }
.page-content { width: min(74rem, calc(100% - 2rem)); margin: clamp(2rem, 7vw, 5rem) auto; }
.status-card { padding: clamp(2rem, 6vw, 4rem); background: #fff; border: 1px solid #dbe3e8; border-radius: 1rem; box-shadow: 0 .5rem 2rem rgb(27 51 44 / 7%); }
.eyebrow { margin: 0 0 .75rem; color: #277562; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; color: #173f36; font-size: clamp(2.1rem, 7vw, 4rem); line-height: 1.05; }
h2 { color: #173f36; line-height: 1.2; }
.lead { margin: 1.5rem 0 .5rem; font-size: 1.25rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: .7rem 1.1rem;
  border: 1px solid #17624f;
  border-radius: .55rem;
  background: #17624f;
  color: #fff;
  font: inherit;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #0b493a; color: #fff; }
.button-secondary { border-color: #b8c7c2; background: #fff; color: #173f36; }
.button-secondary:hover { background: #edf3f1; color: #173f36; }
.status-card .button { margin-top: 1.25rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.page-heading .lead, .form-heading .lead { color: #53616c; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1.5rem; }
.product-card { overflow: hidden; background: #fff; border: 1px solid #dbe3e8; border-radius: .8rem; box-shadow: 0 .35rem 1.2rem rgb(27 51 44 / 5%); }
.product-image-link { display: block; aspect-ratio: 4 / 3; padding: 1rem; background: #f7f9f8; }
.product-card-image { width: 100%; height: 100%; object-fit: contain; }
.product-card-body { padding: 1.25rem; }
.product-card-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: #53616c; font-size: .85rem; }
.product-card h2 { margin: .8rem 0 .4rem; font-size: 1.2rem; }
.product-card h2 a { color: inherit; text-decoration: none; }
.price { margin: .4rem 0 1rem; color: #173f36; font-weight: 800; font-variant-numeric: tabular-nums; }
.price-large { font-size: 1.4rem; }
.text-link { font-weight: 700; }
.badge { display: inline-flex; flex: none; padding: .2rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 750; }
.badge-active { background: #dcefe8; color: #145845; }
.badge-inactive { background: #e8ecef; color: #515e68; }
.empty-state { padding: clamp(2rem, 7vw, 4rem); background: #fff; border: 1px dashed #abbdb7; border-radius: 1rem; text-align: center; }
.empty-state h2 { margin: .3rem 0; }
.empty-state p { color: #53616c; }
.empty-state .button { margin-top: 1rem; }
.empty-icon { margin: 0; color: #277562 !important; font-size: 2.5rem; line-height: 1; }
.breadcrumb { display: flex; gap: .5rem; margin-bottom: 1.5rem; color: #63717a; font-size: .9rem; }
.breadcrumb span[aria-current="page"] { overflow: hidden; max-width: 35rem; text-overflow: ellipsis; white-space: nowrap; }
.product-detail { display: grid; grid-template-columns: minmax(17rem, .85fr) minmax(20rem, 1.15fr); overflow: hidden; background: #fff; border: 1px solid #dbe3e8; border-radius: 1rem; box-shadow: 0 .5rem 2rem rgb(27 51 44 / 7%); }
.product-detail-image-wrap { display: grid; place-items: center; min-height: 30rem; padding: clamp(1.5rem, 5vw, 3rem); background: #f7f9f8; }
.product-detail-image { width: 100%; max-height: 32rem; object-fit: contain; }
.product-detail-content { padding: clamp(1.5rem, 5vw, 3rem); }
.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.detail-heading h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.description { color: #3f4e58; white-space: pre-line; }
.detail-list { margin: 2rem 0; border-top: 1px solid #dbe3e8; }
.detail-list div { display: grid; grid-template-columns: minmax(8rem, .55fr) 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid #dbe3e8; }
.detail-list dt { color: #53616c; font-size: .85rem; font-weight: 750; }
.detail-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.form-heading { margin-bottom: 2rem; }
.product-form { padding: clamp(1.2rem, 5vw, 2.5rem); background: #fff; border: 1px solid #dbe3e8; border-radius: 1rem; }
.product-form fieldset { margin: 0 0 2rem; padding: 0 0 2rem; border: 0; border-bottom: 1px solid #dbe3e8; }
.product-form legend { margin-bottom: 1.25rem; color: #173f36; font-size: 1.25rem; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.5rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: .35rem; color: #263943; font-weight: 750; }
.field input, .field textarea, .field select { width: 100%; padding: .7rem .8rem; border: 1px solid #9eada8; border-radius: .45rem; background: #fff; color: #18222d; font: inherit; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgb(39 117 98 / 20%); border-color: #277562; }
.field small { display: block; margin-top: .3rem; color: #62717a; }
.field-checkbox { display: flex; align-items: center; gap: .7rem; padding-top: 1.9rem; }
.field-checkbox input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: #17624f; }
.field-checkbox label { margin: 0; }
.field-error { margin: .35rem 0 0; color: #a12626; font-size: .88rem; font-weight: 650; }
.alert { margin-bottom: 1.25rem; padding: 1rem 1.2rem; border-radius: .55rem; }
.alert p { margin: .2rem 0 0; }
.alert-error { border: 1px solid #d68b8b; background: #fff2f2; color: #7c1d1d; }
.alert-success { border: 1px solid #7db59f; background: #edf9f4; color: #145845; }
.script-heading h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.script-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(17rem, .55fr); gap: 1.5rem; }
.script-panel, .history { padding: clamp(1.2rem, 4vw, 2rem); background: #fff; border: 1px solid #dbe3e8; border-radius: 1rem; }
.script-panel h2, .history h2 { margin-top: 0; }
.generate-form { display: flex; align-items: flex-end; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid #dbe3e8; }
.generate-form .field { flex: 1; margin: 0; }
.editor-form { margin-top: 1.5rem; }
.product-summary .detail-list { margin-bottom: 1rem; }
.cta-note { padding: .8rem; border-radius: .5rem; background: #edf3f1; }
.history { margin-top: 1.5rem; }
.version-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.version-card { padding: 1rem 1.2rem; border: 1px solid #dbe3e8; border-radius: .7rem; }
.version-card p { margin: .8rem 0 0; white-space: pre-line; }
.version-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; color: #53616c; font-size: .85rem; }
.badge-generated { background: #dcefe8; color: #145845; }
.badge-manual { background: #eee8fa; color: #53368a; }
.compact-empty { padding: 1.5rem; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.required-note { color: #53616c; font-size: .88rem; }
code { padding: .1rem .3rem; border-radius: .25rem; background: #eef2f3; font-size: .9em; }
.video-preview { max-width: 34rem; margin-bottom: 1.5rem; padding: 1.5rem; background: #fff; border: 1px solid #dbe3e8; border-radius: 1rem; }
.video-preview video { display: block; width: 100%; max-height: 70vh; border-radius: .7rem; background: #111; }
.actions form { margin: 0; }
@media (max-width: 40rem) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .navigation { gap: 1rem; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .button { width: 100%; }
  .product-detail { grid-template-columns: 1fr; }
  .script-layout { grid-template-columns: 1fr; }
  .generate-form { align-items: stretch; flex-direction: column; }
  .product-detail-image-wrap { min-height: 18rem; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .field-checkbox { padding-top: .5rem; }
  .detail-list div { grid-template-columns: 1fr; gap: .2rem; }
}
