:root {
  color-scheme: light;
  --bg: #f6f7f5;
  --panel: #ffffff;
  --panel-muted: #f0f4f2;
  --text: #15201b;
  --muted: #5b6962;
  --line: #d9e0dc;
  --accent: #087568;
  --accent-strong: #005c51;
  --blue: #1d4ed8;
  --amber: #b45309;
  --red: #b42318;
  --shadow: 0 12px 30px rgb(20 31 27 / 8%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body {
  margin: 0;
}

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

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgb(8 117 104 / 35%);
  outline-offset: 2px;
}

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

.surface {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 750;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
}

.top-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.top-nav a {
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

.top-nav a[aria-current="page"] {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 2px 8px rgb(20 31 27 / 8%);
}

.shop-layout,
.product-detail-layout,
.cart-page-layout,
.privacy-layout,
.pilot-layout,
.admin-layout {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 36px);
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.cart-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 20px;
  align-items: start;
}

.privacy-layout {
  display: grid;
  place-items: start center;
}

.pilot-layout {
  display: grid;
  gap: clamp(22px, 4vw, 36px);
  width: min(1180px, 100%);
}

.span-2 {
  grid-column: span 2;
}

.admin-section,
.privacy-panel,
.pilot-panel,
.cart-page-main,
.cart-page-panel,
.cart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.privacy-panel {
  width: min(880px, 100%);
  padding: 20px;
}

.pilot-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: start;
  padding: clamp(10px, 2vw, 20px) 0 clamp(18px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}

.lead {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.pilot-proof-grid {
  display: grid;
  gap: 10px;
}

.pilot-proof-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f5f8ff);
}

.pilot-proof-grid strong {
  color: var(--text);
}

.pilot-proof-grid span {
  color: var(--muted);
}

.pilot-proof-section {
  display: grid;
  gap: 14px;
}

.pilot-proof-section h2,
.pilot-proof-section h3,
.pilot-proof-section p {
  margin: 0;
}

.pilot-package-grid,
.pilot-check-grid,
.pilot-metric-row,
.pilot-trust-grid {
  display: grid;
  gap: 12px;
}

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

.pilot-package-grid article,
.pilot-check-grid div,
.pilot-metric-row div {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.pilot-package-grid article h3,
.pilot-check-grid strong {
  color: var(--text);
}

.pilot-package-grid article p,
.pilot-check-grid span,
.pilot-metric-row span,
.pilot-trust-grid p,
.pilot-step-list span {
  color: var(--muted);
}

.pilot-check-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pilot-step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: pilot-step;
}

.pilot-step-list li {
  counter-increment: pilot-step;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.pilot-step-list li::before {
  content: counter(pilot-step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
}

.pilot-metric-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pilot-metric-row strong {
  color: var(--blue-dark);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1;
}

.pilot-trust-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
}

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

.pilot-trust-grid a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pilot-panel {
  padding: 20px;
}

.shop-main {
  min-width: 0;
}

.cart-panel {
  position: sticky;
  top: 84px;
  padding: 18px;
}

.cart-page-main,
.cart-page-panel {
  padding: 18px;
  min-width: 0;
}

.cart-page-panel {
  position: sticky;
  top: 84px;
}

.cart-summary-actions {
  display: grid;
  gap: 10px;
}

.cart-summary-actions .primary-button,
.cart-summary-actions .secondary-button,
.full-width-action {
  width: 100%;
}

.admin-section {
  padding: 18px;
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 2vw, 2.25rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.metric-pill {
  min-width: 96px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.notice {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.notice:empty,
.notice[hidden] {
  display: none;
}

.notice[data-tone="success"] {
  border-color: rgb(8 117 104 / 35%);
  color: var(--accent-strong);
  background: #edf8f5;
}

.notice[data-tone="warning"] {
  border-color: rgb(180 83 9 / 35%);
  color: var(--amber);
  background: #fff7ed;
}

.notice[data-tone="error"] {
  border-color: rgb(180 35 24 / 35%);
  color: var(--red);
  background: #fff1f0;
}

.search-bar {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.search-bar label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.search-row input,
.search-filter-grid input,
.search-filter-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  background: #ffffff;
}

.search-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
  align-items: end;
}

.search-filter-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.search-meta {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  min-height: 340px;
}

.product-card {
  display: grid;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.product-media {
  display: grid;
  min-height: 132px;
  place-items: center;
  background:
    linear-gradient(135deg, rgb(8 117 104 / 92%), rgb(29 78 216 / 82%)),
    linear-gradient(90deg, #f7c948, #e76f51);
  color: #ffffff;
  font-size: 2.4rem;
  font-weight: 850;
}

.product-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.product-body p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.product-meta strong {
  color: var(--text);
  font-size: 1.05rem;
}

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

.product-actions .secondary-button {
  flex: 1 1 132px;
}

.product-detail-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.product-detail-media {
  display: grid;
  min-height: clamp(260px, 34vw, 520px);
  place-items: center;
  background:
    linear-gradient(135deg, rgb(8 117 104 / 92%), rgb(29 78 216 / 82%)),
    linear-gradient(90deg, #f7c948, #e76f51);
  color: #ffffff;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 850;
}

.product-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-content {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: clamp(18px, 3vw, 34px);
}

.product-detail-content h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.product-detail-price {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.product-detail-facts {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-detail-facts dt {
  color: var(--muted);
  font-weight: 750;
}

.product-detail-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 132px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

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

.secondary-button {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.secondary-button:hover {
  border-color: rgb(8 117 104 / 55%);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.line-list {
  display: grid;
  gap: 10px;
  min-height: 52px;
  margin-bottom: 14px;
}

.line-list.empty {
  display: block;
  color: var(--muted);
}

.line-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.line-item > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.line-item small {
  color: var(--muted);
}

.cart-page-line-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px 14px;
}

.cart-page-line-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cart-page-line-item a {
  color: var(--text);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cart-page-line-item span,
.cart-page-line-item small {
  color: var(--muted);
}

.cart-page-line-item strong {
  text-align: right;
}

.cart-page-line-controls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 5px;
}

.cart-page-line-controls button {
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
}

.cart-page-line-controls button:hover {
  border-color: var(--accent);
}

.cart-page-line-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.cart-page-line-controls .secondary-button {
  min-width: 112px;
}

.line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.line-actions .secondary-button {
  min-width: 112px;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.order-confirmation {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.order-confirmation:empty {
  display: none;
}

.order-confirmation h2,
.order-confirmation p {
  margin: 0;
}

.product-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.privacy-form,
.pilot-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.product-form label,
.privacy-form label,
.pilot-form label,
.access-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.product-form label {
  grid-column: span 2;
}

.product-form label.span-2 {
  grid-column: span 4;
}

.product-form input,
.privacy-form input,
.privacy-form select,
.privacy-form textarea,
.pilot-form input,
.pilot-form select,
.pilot-form textarea,
.access-form input,
.access-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  background: #ffffff;
}

.product-form input,
.privacy-form input,
.privacy-form select,
.pilot-form input,
.pilot-form select,
.access-form input,
.access-form select {
  min-height: 42px;
}

.privacy-form textarea,
.pilot-form textarea {
  min-height: 108px;
  resize: vertical;
}

.product-form button,
.pilot-form button {
  align-self: end;
}

.pilot-form label.pilot-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--text);
}

.pilot-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 3px 0 0;
}

.pilot-consent span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pilot-consent a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pilot-receipt {
  margin-top: 4px;
}

.privacy-data-fieldset {
  grid-column: span 2;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.privacy-data-fieldset legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.privacy-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.privacy-choice-grid label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--text);
}

.privacy-choice-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 3px 0 0;
}

.identity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.identity-pane {
  min-width: 0;
}

.access-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.access-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.access-form legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

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

.scope-grid label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 650;
}

.scope-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
}

.token-value {
  display: block;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.consent-banner {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  left: clamp(12px, 3vw, 28px);
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px) auto;
  gap: 16px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgb(20 31 27 / 18%);
}

.consent-banner h2,
.consent-banner p {
  margin: 0;
}

.consent-banner p {
  color: var(--muted);
}

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

.consent-purpose-grid label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.consent-purpose-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 3px 0 0;
}

.consent-purpose-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.consent-purpose-grid small {
  color: var(--muted);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.table-frame {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--panel);
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

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

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

.metric-list {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 10px 14px;
  margin: 0;
}

.metric-list dt {
  color: var(--muted);
}

.metric-list dd {
  margin: 0;
  font-weight: 750;
  text-align: right;
}

@media (max-width: 980px) {
  .shop-layout,
  .product-detail-layout,
  .cart-page-layout,
  .privacy-layout,
  .pilot-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-panel {
    grid-template-columns: 1fr;
  }

  .pilot-hero {
    grid-template-columns: 1fr;
  }

  .pilot-package-grid,
  .pilot-check-grid,
  .pilot-step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-2 {
    grid-column: auto;
  }

  .cart-panel {
    position: static;
  }

  .cart-page-panel {
    position: static;
  }
}

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

  .top-nav {
    width: 100%;
  }

  .top-nav a {
    flex: 1;
    min-width: max-content;
  }

  .section-heading,
  .product-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .product-actions,
  .product-detail-actions {
    flex-direction: column;
  }

  .product-detail-facts {
    grid-template-columns: 1fr;
  }

  .cart-page-line-item {
    grid-template-columns: 1fr;
  }

  .cart-page-line-item strong {
    text-align: left;
  }

  .cart-page-line-controls {
    display: grid;
    grid-template-columns: 40px 40px minmax(0, 1fr);
  }

  .product-form {
    grid-template-columns: 1fr;
  }

  .privacy-form,
  .pilot-form {
    grid-template-columns: 1fr;
  }

  .pilot-package-grid,
  .pilot-check-grid,
  .pilot-step-list,
  .pilot-metric-row,
  .pilot-trust-grid {
    grid-template-columns: 1fr;
  }

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

  .product-form label,
  .product-form label.span-2,
  .privacy-form label.span-2,
  .pilot-form label.span-2,
  .privacy-data-fieldset,
  .product-form button,
  .pilot-form button {
    grid-column: auto;
  }

  .metric-list {
    grid-template-columns: 1fr;
  }

  .metric-list dd {
    text-align: left;
  }

  .consent-banner {
    grid-template-columns: 1fr;
  }

  .consent-purpose-grid {
    grid-template-columns: 1fr;
  }

  .consent-actions {
    justify-content: stretch;
  }

  .consent-actions button {
    flex: 1 1 160px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* FR-059 unified UI refresh */
:root {
  --bg: #f4f6f3;
  --panel: #ffffff;
  --panel-muted: #eef3f0;
  --panel-soft: #f8faf8;
  --text: #14211c;
  --muted: #5b6b63;
  --line: #d6dfda;
  --accent: #087568;
  --accent-strong: #064f48;
  --accent-soft: #e4f5f0;
  --blue: #245a92;
  --blue-dark: #173c68;
  --blue-soft: #eaf2fb;
  --amber: #9f5b00;
  --red: #aa2419;
  --shadow: 0 10px 28px rgb(16 29 24 / 8%);
  --shadow-strong: 0 18px 48px rgb(16 29 24 / 14%);
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, #eef5f1 0, #f6f7f5 360px),
    var(--bg);
}

input,
textarea,
select {
  accent-color: var(--accent);
}

.site-header {
  min-height: 68px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 1px 0 rgb(20 31 27 / 4%);
}

.brand-mark {
  background: linear-gradient(135deg, var(--accent-strong), var(--blue));
  box-shadow: inset 0 -8px 18px rgb(255 255 255 / 12%);
}

.top-nav {
  background: #eef3f0;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 70%);
}

.top-nav a {
  min-height: 38px;
  white-space: nowrap;
}

.top-nav a:hover {
  color: var(--text);
  background: rgb(255 255 255 / 58%);
}

.shop-layout,
.product-detail-layout,
.cart-page-layout,
.privacy-layout,
.pilot-layout,
.admin-layout {
  padding: clamp(16px, 3vw, 34px);
}

.shop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: clamp(16px, 3vw, 30px);
  align-items: end;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 92%), rgb(235 245 240 / 92%)),
    var(--panel);
  box-shadow: var(--shadow);
}

.shop-hero-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hero-title {
  max-width: 820px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.02;
}

.shop-trust-strip {
  display: grid;
  gap: 10px;
}

.shop-trust-strip span,
.product-context span,
.stock-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.2;
}

.shop-trust-strip span::before,
.stock-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.shop-main,
.cart-panel,
.cart-page-main,
.cart-page-panel,
.privacy-panel,
.pilot-panel,
.pilot-proof-section,
.product-detail-panel,
.admin-section,
.admin-hero,
.admin-sidebar-card {
  border-radius: var(--radius);
}

.shop-main {
  min-width: 0;
}

.shop-toolbar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-row {
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
}

.search-filter-grid {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.search-meta {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--panel-muted);
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.product-card {
  grid-template-rows: auto 1fr;
  min-height: 390px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgb(8 117 104 / 38%);
  box-shadow: var(--shadow-strong);
}

.product-media {
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(8 117 104 / 12%), rgb(36 90 146 / 12%)),
    #f6f8f6;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  background: #ffffff;
}

.product-media-fallback {
  background:
    linear-gradient(135deg, var(--accent-strong), var(--blue)),
    #eef3f0;
}

.product-body {
  grid-template-rows: auto auto minmax(54px, 1fr) auto auto;
  gap: 10px;
}

.product-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.product-context span:first-child {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgb(8 117 104 / 18%);
}

.product-context span:last-child {
  overflow-wrap: anywhere;
}

.product-body h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.28;
}

.product-body h2 a {
  color: var(--text);
}

.product-body h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-body p {
  min-height: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-meta {
  align-items: end;
}

.product-meta strong {
  font-size: 1.2rem;
}

.stock-badge {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgb(8 117 104 / 20%);
}

.stock-badge-out {
  color: var(--red);
  background: #fff1f0;
  border-color: rgb(170 36 25 / 24%);
}

.stock-badge-out::before {
  background: var(--red);
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.product-actions .primary-button,
.product-actions .secondary-button {
  min-width: 0;
}

.product-detail-panel {
  box-shadow: var(--shadow);
}

.product-detail-media {
  background:
    linear-gradient(135deg, rgb(8 117 104 / 10%), rgb(36 90 146 / 10%)),
    #ffffff;
}

.product-detail-media img {
  object-fit: contain;
  padding: clamp(12px, 3vw, 28px);
}

.cart-panel,
.cart-page-panel,
.admin-sidebar {
  position: sticky;
  top: 86px;
}

.cart-panel,
.cart-page-panel {
  box-shadow: var(--shadow);
}

.primary-button,
.secondary-button {
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms ease;
}

.primary-button:not(:disabled):hover,
.secondary-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.admin-layout {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(14px, 2vw, 22px);
  width: min(1560px, 100%);
}

.admin-sidebar {
  align-self: start;
}

.admin-sidebar-card,
.admin-hero {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-sidebar-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.admin-section-nav {
  display: grid;
  gap: 6px;
}

.admin-section-nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 720;
}

.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  color: var(--text);
  background: var(--panel-muted);
}

.admin-content {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: end;
  padding: clamp(18px, 3vw, 28px);
}

.admin-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

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

.admin-kpi-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.admin-kpi-grid strong {
  color: var(--text);
}

.admin-kpi-grid span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.admin-section {
  box-shadow: var(--shadow);
}

.admin-section .section-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.product-form,
.admin-form,
.access-form,
.privacy-form,
.pilot-form {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.identity-pane {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.identity-pane .section-heading {
  padding-bottom: 0;
  border-bottom: 0;
}

.line-item {
  background: #ffffff;
}

.table-frame {
  background: var(--panel);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
}

@media (max-width: 1180px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-section-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 980px) {
  .shop-hero {
    grid-template-columns: 1fr;
  }

  .cart-panel,
  .cart-page-panel {
    position: static;
  }

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

@media (max-width: 680px) {
  .shop-layout,
  .product-detail-layout,
  .cart-page-layout,
  .privacy-layout,
  .pilot-layout,
  .admin-layout {
    padding: 12px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 12vw, 2.65rem);
  }

  .shop-trust-strip,
  .search-filter-grid,
  .product-actions,
  .admin-section-nav,
  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 0;
  }

  .product-actions .primary-button,
  .product-actions .secondary-button {
    width: 100%;
  }

  .admin-sidebar-card {
    padding: 12px;
  }

  .consent-banner {
    max-height: min(48vh, 390px);
    overflow: auto;
    gap: 10px;
    padding: 12px;
  }

  .consent-banner h2 {
    font-size: 1rem;
  }

  .consent-banner p,
  .consent-purpose-grid small {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .consent-purpose-grid {
    max-height: min(19vh, 150px);
    overflow: auto;
    overscroll-behavior: contain;
    gap: 6px;
  }

  .consent-purpose-grid label {
    padding: 7px 8px;
  }

  .consent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .consent-actions button {
    min-width: 0;
    min-height: 42px;
    padding: 8px 6px;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .admin-hero,
  .admin-section,
  .identity-pane {
    padding: 14px;
  }
}
