/* ==========================================================================
   PEPTIDE SHOP — DESIGN SYSTEM (DESIGN_SPEC.md §13)
   Single global stylesheet. Tokens, base, and primitive components.
   No Bootstrap. No jQuery. Plain CSS so every page can rely on the same names.
   ========================================================================== */

/* --- Tokens ---------------------------------------------------------------- */
:root {
  /* Color */
  --color-ink:            #0F172A;
  --color-ink-2:          #334155;
  --color-ink-3:          #475569;
  --color-surface:        #FFFFFF;
  --color-surface-2:      #F8FAFC;
  --color-border:         #E2E8F0;
  --color-border-strong:  #CBD5E1;
  --color-primary:        #0066CC;   /* vivid royal blue — WCAG AA on white (5.6:1) */
  --color-primary-600:    #0052A5;
  --color-primary-50:     #E3F0FF;
  --color-accent:         #00B4A0;   /* fresh teal — secondary conversion accent */
  --color-accent-50:      #E0F7F4;
  --color-success:        #0D9948;
  --color-warning:        #B45309;
  --color-danger:         #B42318;
  --color-info:           #0B5FB7;

  /* Type */
  --font-sans: 'Inter Variable', 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing (4 px scale) */
  --space-1:  4px;  --space-2: 8px;   --space-3: 12px; --space-4: 16px;
  --space-5: 20px;  --space-6: 24px;  --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --space-32: 128px;

  /* Radius / shadow */
  --radius-sm: 4px; --radius-md: 6px; --radius-lg: 12px; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow-2: 0 8px 24px rgb(15 23 42 / 0.08);
  --shadow-3: 0 24px 48px rgb(15 23 42 / 0.16);

  /* Layout */
  --container-max: 1280px;
  --container-pad: 24px;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
}

@media (max-width: 768px) {
  :root { --container-pad: 16px; }
}

/* --- Reset (Tailwind preflight covers most; this targets layout primitives) - */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-ink-2);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-600); }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--color-ink);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { margin: 0 0 1em; }
small { font-size: var(--text-sm); }
code, pre, kbd, samp { font-family: var(--font-mono); }

::selection { background: var(--color-primary-50); color: var(--color-primary-600); }

/* --- Layout primitives ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-20);
}
@media (max-width: 768px) {
  .section { padding-block: var(--space-12); }
}

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.lead { font-size: var(--text-lg); color: var(--color-ink-2); max-width: 60ch; }

.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--color-ink-3); }
.text-ink { color: var(--color-ink); }
.text-primary { color: var(--color-primary); }

/* --- Grid helpers ---------------------------------------------------------- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.grid-6 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .grid-6 { grid-template-columns: repeat(6, 1fr); }
}

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding-inline: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5; pointer-events: none;
}

.btn-primary {
  background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-600); border-color: var(--color-primary-600); color: #fff; }

.btn-secondary {
  background: #fff; color: var(--color-primary); border-color: var(--color-primary);
}
.btn-secondary:hover { background: var(--color-primary-50); color: var(--color-primary-600); }

.btn-ghost { color: var(--color-ink-2); }
.btn-ghost:hover { background: var(--color-surface-2); color: var(--color-ink); }

.btn-danger {
  background: var(--color-danger); color: #fff; border-color: var(--color-danger);
}
.btn-danger:hover { background: #94171c; border-color: #94171c; color: #fff; }

.btn-sm { height: 32px; padding-inline: var(--space-3); font-size: var(--text-xs); }
.btn-lg { height: 48px; padding-inline: var(--space-6); font-size: var(--text-base); }
.btn-block { width: 100%; }

/* --- Cards ----------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  transition: border-color 150ms ease-out;
}
.card:hover { border-color: var(--color-primary); }

.card-category { min-height: 200px; gap: var(--space-3); }
.card-category .icon { color: var(--color-primary); width: 32px; height: 32px; }
.card-category h3 { font-size: var(--text-xl); margin-bottom: var(--space-1); }
.card-category .meta { font-size: var(--text-sm); color: var(--color-ink-3); }
.card-category .cta { margin-top: auto; padding-top: var(--space-4); }

/* Product card */
.card-product {
  padding: 0; overflow: hidden;
}
.card-product:hover { box-shadow: var(--shadow-1); }
.card-product .img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--color-surface-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-product .img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-4); }
.card-product .body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.card-product .title { font-size: var(--text-base); font-weight: 600; color: var(--color-ink); margin: 0; }
.card-product .meta { font-size: var(--text-xs); color: var(--color-ink-3); font-family: var(--font-mono); }
.card-product .price { font-size: var(--text-lg); font-weight: 700; color: var(--color-ink); }
.card-product .actions { display: flex; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--color-primary-50);
  color: var(--color-primary);
  white-space: nowrap;
}
.badge-success { background: #DCFCE7; color: var(--color-success); }
.badge-warning { background: #FEF3C7; color: var(--color-warning); }
.badge-danger  { background: #FEE2E2; color: var(--color-danger); }

/* --- Forms ----------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); }
.field .help { font-size: var(--text-xs); color: var(--color-ink-3); }
.field .error { font-size: var(--text-xs); color: var(--color-danger); }

.input, .select, .textarea {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-3);
  font: inherit;
  color: var(--color-ink);
  background: #fff;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.textarea { height: auto; padding: var(--space-3); min-height: 96px; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-50);
}
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--color-danger); }

/* Filter chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 32px;
  padding-inline: var(--space-3);
  font-size: 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-ink-2);
  cursor: pointer;
  transition: all 150ms ease-out;
}
.chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.chip[aria-pressed="true"], .chip.is-selected {
  background: var(--color-primary-50);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* --- Tabs ------------------------------------------------------------------ */
.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}
.tab {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink-3);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: var(--color-ink); }
.tab[aria-selected="true"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* --- Tables ---------------------------------------------------------------- */
.table-clean {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.table-clean th, .table-clean td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.table-clean th {
  background: var(--color-surface-2);
  font-weight: 600;
  color: var(--color-ink);
  position: sticky;
  top: 0;
}
.table-clean tbody tr:nth-child(even) { background: var(--color-surface-2); }
.table-clean .num { text-align: right; font-family: var(--font-mono); }

/* --- Breadcrumb ------------------------------------------------------------ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-ink-3);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: var(--space-2); }
.breadcrumb li + li::before { content: '/'; color: var(--color-border-strong); }
.breadcrumb a { color: var(--color-ink-3); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb [aria-current="page"] { color: var(--color-ink); font-weight: 600; }

/* --- Trust band & RUO ------------------------------------------------------ */
.trust-band {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}
.trust-band .item { display: inline-flex; align-items: center; gap: var(--space-2); }

.ruo-banner {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #78350F;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.ruo-banner strong { color: #78350F; }
.ruo-banner.compact {
  margin-bottom: var(--space-4);
  display: grid;
  gap: var(--space-1);
}

/* --- Commerce flows -------------------------------------------------------- */
.commerce-page {
  background: var(--color-surface-2);
  min-height: 70vh;
}
.page-heading {
  max-width: 760px;
  margin-bottom: var(--space-10);
}
.page-heading-compact h1 {
  margin-bottom: var(--space-3);
}
.page-heading p {
  color: var(--color-ink-2);
  font-size: var(--text-lg);
}
.commerce-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: var(--space-6);
  align-items: start;
}
.commerce-main,
.cart-items-list {
  display: grid;
  gap: var(--space-4);
}
.commerce-status {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
}
.commerce-status h2 {
  font-size: var(--text-2xl);
}
.commerce-status p {
  margin: 0;
  color: var(--color-success);
  font-weight: 600;
}
.commerce-empty {
  align-items: center;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  gap: var(--space-4);
  padding: var(--space-12);
}
.commerce-empty p {
  max-width: 52ch;
  color: var(--color-ink-3);
}
.commerce-empty-icon {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: var(--color-primary-50);
}
.commerce-empty.compact {
  padding: var(--space-8);
  max-width: none;
  border: 1px dashed var(--color-border-strong);
}
.cart-line {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
}
.cart-line img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}
.cart-line-body {
  display: grid;
  gap: var(--space-4);
}
.cart-line h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.cart-line-note {
  margin: var(--space-2) 0 0;
  color: var(--color-ink-3);
  font-size: var(--text-sm);
}
.cart-line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.cart-line-price {
  text-align: right;
  display: grid;
  gap: var(--space-1);
  color: var(--color-ink-3);
  font-size: var(--text-sm);
}
.cart-line-price strong {
  color: var(--color-ink);
  font-size: var(--text-xl);
}
.quantity-stepper {
  display: inline-grid;
  grid-template-columns: 36px 44px 36px;
  height: 36px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.quantity-stepper button,
.quantity-stepper span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #fff;
  color: var(--color-ink);
  font-weight: 700;
}
.quantity-stepper button:hover {
  background: var(--color-primary-50);
  color: var(--color-primary);
}
.quantity-stepper span {
  border-inline: 1px solid var(--color-border);
  font-family: var(--font-mono);
}
.order-summary {
  position: sticky;
  top: calc(var(--space-20) + 20px);
  gap: var(--space-4);
}
.order-summary h2 {
  font-size: var(--text-2xl);
}
.order-summary dl {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}
.order-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.order-summary dt {
  color: var(--color-ink-3);
}
.order-summary dd {
  margin: 0;
  color: var(--color-ink);
  font-weight: 700;
}
.order-summary .summary-total {
  border-bottom: 0;
  padding-bottom: 0;
  font-size: var(--text-xl);
}
.checkout-flow,
.checkout-main,
.checkout-stack {
  display: grid;
  gap: var(--space-5);
}
.checkout-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  padding: 0;
  margin: 0 0 var(--space-6);
  list-style: none;
}
.checkout-progress li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-ink-3);
  background: #fff;
  font-weight: 600;
  text-transform: capitalize;
}
.checkout-progress span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: inherit;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
}
.checkout-progress li.is-active,
.checkout-progress li.is-complete {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-50);
}
.checkout-progress li.is-complete {
  color: var(--color-success);
  border-color: #BBF7D0;
  background: #F0FDF4;
}
.checkout-panel {
  gap: var(--space-5);
}
.checkout-panel h2,
.checkout-complete h2 {
  font-size: var(--text-2xl);
}
.checkout-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.checkout-form-wide,
.checkout-choice-group,
.checkout-actions,
.form-error {
  grid-column: 1 / -1;
}
.checkout-choice-group {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}
.checkout-choice-group legend {
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: var(--space-3);
}
.choice-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  width: 100%;
  min-height: 56px;
  padding: var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-ink);
  text-align: left;
  font-weight: 600;
}
.choice-card:hover,
.choice-card:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-50);
  color: var(--color-primary);
}
.choice-card input {
  margin-top: 3px;
  accent-color: var(--color-primary);
}
.choice-card span {
  display: grid;
  gap: var(--space-1);
}
.choice-card small {
  color: var(--color-ink-3);
  font-weight: 500;
}
.checkout-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.form-error {
  margin: 0;
  color: var(--color-danger);
  font-size: var(--text-sm);
  font-weight: 600;
}
.checkout-summary-items {
  display: grid;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}
.checkout-summary-items > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}
.checkout-summary-items span {
  color: var(--color-ink-2);
}
.checkout-summary-items strong {
  color: var(--color-ink);
}
.review-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.review-block h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.review-block p {
  margin: 0;
  color: var(--color-ink-2);
}
.checkout-complete {
  max-width: 760px;
  margin-inline: auto;
  gap: var(--space-5);
}
.payment-instructions {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.payment-instructions p {
  margin: 0;
}
.payment-instructions code {
  display: block;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.badge-blue {
  background: var(--color-primary-50);
  color: var(--color-primary);
}
/* --- Editorial content ----------------------------------------------------- */
.content-page {
  background: var(--color-surface);
}
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-8);
  align-items: start;
}
.content-sidebar {
  display: grid;
  gap: var(--space-5);
  position: sticky;
  top: calc(var(--space-20) + 20px);
}
.content-sidebar .card {
  gap: var(--space-4);
}
.content-sidebar h2 {
  font-size: var(--text-xl);
}
.content-sidebar p {
  color: var(--color-ink-3);
}
.feature-article {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-6);
  align-items: center;
  margin-bottom: var(--space-12);
  padding: var(--space-5);
}
.feature-article-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.feature-article-image img,
.article-card > img,
.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feature-article-body {
  display: grid;
  gap: var(--space-4);
}
.feature-article h2 a,
.article-card h3 a,
.related-list a strong {
  color: inherit;
}
.feature-article p,
.article-card p {
  color: var(--color-ink-2);
}
.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.article-list,
.article-grid {
  display: grid;
  gap: var(--space-5);
}
.article-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.article-card {
  padding: 0;
  overflow: hidden;
}
.article-card > img {
  aspect-ratio: 16 / 9;
  background: var(--color-surface-2);
}
.article-card > div,
.article-card .article-meta {
  padding-inline: var(--space-5);
}
.article-card > div {
  padding-top: var(--space-5);
  display: grid;
  gap: var(--space-3);
}
.article-card .article-meta {
  margin-top: auto;
  padding-block: var(--space-4) var(--space-5);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  color: var(--color-ink-3);
  font-size: var(--text-sm);
}
.chip-list,
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.article-page {
  padding-top: var(--space-12);
}
.article-header {
  max-width: 860px;
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.article-header h1 {
  font-size: var(--text-5xl);
  max-width: 14ch;
}
.article-header p {
  max-width: 70ch;
  color: var(--color-ink-2);
  font-size: var(--text-lg);
}
.article-hero-image {
  margin: 0 0 var(--space-10);
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.article-body {
  display: block;
  max-width: 860px;
}
.article-body h2,
.article-body h3,
.article-body h4 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.article-body h2:first-child,
.article-body h3:first-child {
  margin-top: 0;
}
.article-body p,
.article-body li {
  color: var(--color-ink-2);
  line-height: 1.8;
}
.article-body p,
.article-body ul,
.article-body ol {
  margin-bottom: var(--space-5);
}
.article-body ul,
.article-body ol {
  padding-left: var(--space-6);
}
.article-body a {
  font-weight: 600;
}
.article-tags {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-5);
  margin-top: var(--space-8);
}
.related-list {
  display: grid;
  gap: var(--space-3);
}
.related-list a {
  display: grid;
  gap: var(--space-1);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.related-list a:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.related-list span {
  color: var(--color-ink-3);
  font-size: var(--text-sm);
}
.learning-card {
  gap: var(--space-4);
  color: inherit;
  min-height: 240px;
}
.learning-card:hover {
  color: inherit;
}
.learning-card p {
  color: var(--color-ink-3);
}
.learning-card .text-primary {
  margin-top: auto;
  font-weight: 700;
}
.learning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-block: var(--space-5);
}
.learning-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-3);
}
.learning-panel h3 {
  font-size: var(--text-xl);
}
.learning-panel p {
  margin: 0;
}

@media (max-width: 960px) {
  .commerce-layout {
    grid-template-columns: 1fr;
  }
  .order-summary {
    position: static;
  }
  .content-layout,
  .feature-article {
    grid-template-columns: 1fr;
  }
  .content-sidebar {
    position: static;
  }
  .article-header h1 {
    font-size: var(--text-4xl);
    max-width: none;
  }
}

@media (max-width: 640px) {
  .commerce-status {
    flex-direction: column;
    align-items: flex-start;
  }
  .cart-line {
    grid-template-columns: 80px 1fr;
    align-items: start;
  }
  .cart-line img {
    width: 80px;
    height: 80px;
  }
  .cart-line-price {
    grid-column: 2;
    text-align: left;
  }
  .checkout-progress,
  .checkout-form {
    grid-template-columns: 1fr;
  }
  .section-heading-row {
    align-items: stretch;
    flex-direction: column;
  }
  .article-grid {
    grid-template-columns: 1fr;
  }
  .learning-grid {
    grid-template-columns: 1fr;
  }
  .article-hero-image {
    aspect-ratio: 4 / 3;
  }
}

/* Product buy-box React island */
.product-options-clean {
  display: grid;
  gap: var(--space-4);
}
.product-options-clean .price-summary {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--color-primary-50);
  border: 1px solid #BFD9EA;
  border-radius: var(--radius-sm);
}
.product-options-clean .price-summary strong {
  font-size: var(--text-3xl);
  line-height: 1;
  color: var(--color-ink);
}
.product-options-clean .muted-label,
.product-options-clean .ruo-note {
  color: var(--color-ink-3);
  font-size: var(--text-xs);
}
.product-options-clean .pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.product-options-clean .pack-option {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: var(--space-3);
  background: #fff;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
}
.product-options-clean .pack-option:hover,
.product-options-clean .pack-option.is-selected {
  border-color: var(--color-primary);
  background: var(--color-primary-50);
}
.product-options-clean .pack-option small {
  color: var(--color-success);
  font-weight: 600;
}
.product-options-clean .order-summary {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.product-options-clean .order-summary > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}
.product-options-clean .order-total {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  color: var(--color-ink);
  font-size: var(--text-base);
}
.product-options-clean .minimum-note {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: #FEF3C7;
  color: #78350F;
  font-size: var(--text-sm);
}

/* Header React islands */
.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 40px;
  height: 40px;
  padding-inline: var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 600;
}
.header-icon-btn:hover,
.header-icon-btn[aria-expanded="true"] {
  background: var(--color-surface-2);
  color: var(--color-ink);
}
.cart-count-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.search-shell {
  position: relative;
}
.search-results-panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 1000;
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
}
.search-panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1000;
  width: min(420px, calc(100vw - 32px));
}
.search-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-1);
}
.search-input-row input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding-inline: var(--space-3);
  border: 0;
  color: var(--color-ink);
  outline: 0;
}
.search-input-row button {
  height: 40px;
  padding-inline: var(--space-3);
  border: 0;
  border-left: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 700;
}
.search-input-row button:hover {
  background: var(--color-primary-50);
}
.search-results-panel {
  left: auto;
  right: 0;
  display: grid;
  max-height: 360px;
  overflow-y: auto;
  margin-top: var(--space-2);
}
.search-results-panel p {
  margin: 0;
  padding: var(--space-4);
  color: var(--color-ink-3);
  font-size: var(--text-sm);
}
.search-result-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  color: inherit;
}
.search-result-item:last-child {
  border-bottom: 0;
}
.search-result-item:hover {
  background: var(--color-surface-2);
  color: inherit;
}
.search-result-item strong,
.search-result-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-item strong {
  color: var(--color-ink);
  font-size: var(--text-sm);
}
.search-result-item small {
  color: var(--color-ink-3);
  font-size: var(--text-xs);
  text-transform: capitalize;
}
.search-result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 800;
}
.search-result-icon[data-result-type="blog"] {
  background: var(--color-success);
}
.search-result-icon[data-result-type="page"] {
  background: var(--color-info);
}

/* Cart drawer and toast */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10010;
  border: 0;
  background: rgb(15 23 42 / 0.5);
  backdrop-filter: blur(3px);
}
.cart-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10011;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  background: #fff;
  box-shadow: var(--shadow-3);
}
.cart-drawer-header,
.cart-drawer-footer {
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.cart-drawer-header h2 {
  font-size: var(--text-xl);
}
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
}
.cart-drawer-items {
  display: grid;
  gap: var(--space-4);
}
.cart-drawer-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.cart-drawer-item img,
.cart-toast-body img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #fff;
}
.cart-drawer-item h3 {
  overflow: hidden;
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-drawer-item strong {
  display: block;
  margin-block: var(--space-2);
  color: var(--color-ink);
}
.cart-drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.cart-drawer-footer {
  border-top: 1px solid var(--color-border);
  border-bottom: 0;
  display: grid;
  gap: var(--space-3);
}
.cart-drawer-footer dl,
.cart-drawer-footer div {
  margin: 0;
}
.cart-drawer-footer dl > div {
  display: flex;
  justify-content: space-between;
  color: var(--color-ink);
  font-weight: 700;
}
.cart-toast {
  position: fixed;
  top: 112px;
  right: var(--space-5);
  z-index: 10005;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-3);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}
.cart-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.cart-toast-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
}
.cart-toast-header strong {
  color: #fff;
  font-size: var(--text-sm);
}
.cart-toast-header button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
}
.cart-toast-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.16);
}
.cart-toast-body {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
}
.cart-toast-body h3 {
  overflow: hidden;
  font-size: var(--text-base);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-toast-body strong {
  color: var(--color-primary);
}
.cart-toast-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-4);
}

@media (max-width: 760px) {
  .header-actions .action-label {
    display: none;
  }
  .search-panel {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    width: auto;
  }
  .search-results-panel {
    width: 100%;
  }
  .cart-toast {
    top: 88px;
    right: 16px;
  }
}

/* --- Drawer / off-canvas --------------------------------------------------- */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgb(15 23 42 / 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
  z-index: 9998;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0;
  width: min(420px, 92vw);
  background: #fff;
  box-shadow: var(--shadow-3);
  transform: translateX(-100%);
  transition: transform 200ms ease-out;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer.is-open { transform: translateX(0); }
.drawer-right { left: auto; right: 0; transform: translateX(100%); }
.drawer-right.is-open { transform: translateX(0); }
.drawer-header { padding: var(--space-4); border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; }
.drawer-body { padding: var(--space-4); overflow-y: auto; flex: 1; }

/* --- Utility --------------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.divider { height: 1px; background: var(--color-border); border: 0; margin: var(--space-6) 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   MODERNIZATION LAYER — Clinical Modern v2 (additive, token-extending only)
   Rules:
     - Adds new tokens and utilities; does NOT redefine existing primitives.
     - Keeps brand primary #005B8C, all current component class names work.
     - WCAG 2.2 AA contrast preserved; respects prefers-reduced-motion.
   ========================================================================== */

:root {
  /* Display font (Inter Tight Variable) for hero/section headlines.
     Body keeps Inter for maximum legibility at small sizes. */
  --font-display: 'Inter Tight Variable', 'Inter Tight', 'Inter Variable', 'Inter', system-ui, sans-serif;

  /* Refined neutral / brand ramps */
  --color-ink-4:          #94A3B8;   /* slate-400, captions and dividers */
  --color-surface-3:      #F1F5F9;   /* alt-alt surface for depth without color */
  --color-primary-100:    #BAD8FF;   /* soft outline tint */
  --color-primary-700:    #003F80;
  --color-primary-900:    #00254D;

  /* Soft shadow scale (lower opacity, longer reach — reads modern, not chunky) */
  --shadow-soft-1: 0 1px 2px rgb(15 23 42 / 0.04), 0 1px 1px rgb(15 23 42 / 0.03);
  --shadow-soft-2: 0 6px 16px -4px rgb(15 23 42 / 0.06), 0 2px 6px -2px rgb(15 23 42 / 0.04);
  --shadow-soft-3: 0 18px 40px -12px rgb(15 23 42 / 0.10), 0 6px 14px -6px rgb(15 23 42 / 0.06);
  --shadow-ring:   0 0 0 1px rgb(15 23 42 / 0.04);
  --shadow-focus:  0 0 0 3px var(--color-primary-50);

  /* Motion */
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* Refined radii */
  --radius-xl: 16px;
  --radius-2xl: 24px;

  /* Display type scale (clamp-based for fluid responsiveness) */
  --text-display-xs: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
  --text-display-sm: clamp(2rem,    1.5rem + 2.4vw, 2.75rem);
  --text-display-md: clamp(2.5rem,  1.8rem + 3.4vw, 3.75rem);
  --text-display-lg: clamp(3rem,    2.2rem + 4.0vw, 4.5rem);
  --text-display-xl: clamp(3.5rem,  2.6rem + 5.0vw, 5.5rem);
}

/* Apply display font to all top-level headings, but only when the
   .display-typography class is on a section/page wrapper. This keeps the
   change opt-in for content blocks where Inter body type reads better. */
.display-typography h1,
.display-typography h2,
.display-typography .display,
h1.display, h2.display, h3.display,
.hero h1, .hero h2,
.section-heading h2,
.cta-band h2,
.stat-band h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.display-xs { font-size: var(--text-display-xs); }
.display-sm { font-size: var(--text-display-sm); }
.display-md { font-size: var(--text-display-md); }
.display-lg { font-size: var(--text-display-lg); }
.display-xl { font-size: var(--text-display-xl); }

/* --- Refined eyebrow w/ leading rule -------------------------------------- */
.eyebrow-rule {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.eyebrow-rule::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--color-primary);
  display: inline-block;
}

/* --- Section rhythm -------------------------------------------------------- */
.section-tight    { padding-block: var(--space-12); }
.section-loose    { padding-block: var(--space-24); }
.section-bleed    { padding-block: var(--space-20); position: relative; isolation: isolate; }
@media (max-width: 768px) {
  .section-loose  { padding-block: var(--space-16); }
  .section-bleed  { padding-block: var(--space-16); }
}

/* Soft tinted surfaces (for alternating bands without losing minimalism) */
.surface-soft     { background: var(--color-surface-2); }
.surface-mist     { background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%); }
.surface-ink      { background: var(--color-primary-900); color: #fff; }
.surface-ink h1, .surface-ink h2, .surface-ink h3 { color: #fff; }
.surface-ink .eyebrow,
.surface-ink .eyebrow-rule { color: #90CAF9; }
.surface-ink .eyebrow-rule::before { background: #90CAF9; }
.surface-ink p { color: rgb(255 255 255 / 0.78); }
.surface-ink a { color: #BBDEFB; }

/* --- Hero pattern (subtle dot + soft tint) -------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32));
  overflow: hidden;
  background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 65%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 1px 1px, rgb(15 23 42 / 0.06) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 70% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 60% at 70% 30%, #000 30%, transparent 75%);
  opacity: 0.65;
}
.hero::after {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 480px; height: 480px;
  z-index: -1;
  background: radial-gradient(circle, var(--color-primary-50) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0.7;
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-display-lg);
  letter-spacing: -0.03em;
  line-height: 1.02;
  max-width: 18ch;
  color: var(--color-ink);
}
.hero .lead {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-ink-2);
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

/* --- Trust strip (logo / metric row) -------------------------------------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-6);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: #fff;
}
.trust-strip .item {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
}
.trust-strip .item strong {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-ink);
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.trust-strip .item span {
  font-size: var(--text-xs);
  color: var(--color-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Stat band (KPI strip on dark or light surfaces) ---------------------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-8);
  padding: var(--space-12);
  border-radius: var(--radius-xl);
  background: var(--color-primary-900);
  color: #fff;
}
.stat-band .stat strong {
  font-family: var(--font-display);
  font-size: var(--text-display-sm);
  display: block;
  color: #fff;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.02em;
}
.stat-band .stat span {
  font-size: var(--text-sm);
  color: rgb(255 255 255 / 0.7);
  margin-top: var(--space-1);
  display: block;
}

/* --- Value grid w/ icon-tile ---------------------------------------------- */
.value-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .value-grid { grid-template-columns: repeat(4, 1fr); } }
.value-card {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-6);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-base) var(--ease-out-soft),
              box-shadow var(--dur-base) var(--ease-out-soft),
              transform var(--dur-base) var(--ease-out-soft);
}
.value-card:hover {
  border-color: var(--color-primary-100);
  box-shadow: var(--shadow-soft-2);
  transform: translateY(-2px);
}
.value-card .icon-tile {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  color: var(--color-primary);
}
.value-card h3 { font-size: var(--text-lg); margin: 0; }
.value-card p { color: var(--color-ink-3); font-size: var(--text-sm); margin: 0; }

/* --- CTA band (full-bleed conversion strip) ------------------------------- */
.cta-band {
  position: relative;
  padding: clamp(var(--space-12), 6vw, var(--space-20));
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-700) 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.10) 1px, transparent 0);
  background-size: 24px 24px;
}
.cta-band h2 {
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-display-md);
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin-bottom: var(--space-4);
}
.cta-band p {
  color: rgb(255 255 255 / 0.85);
  max-width: 60ch;
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
}
.cta-band .btn-primary {
  background: #fff; color: var(--color-primary); border-color: #fff;
}
.cta-band .btn-primary:hover { background: var(--color-primary-50); color: var(--color-primary-700); border-color: var(--color-primary-50); }
.cta-band .btn-secondary {
  background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.4);
}
.cta-band .btn-secondary:hover { background: rgb(255 255 255 / 0.1); border-color: #fff; color: #fff; }

/* --- Section heading patterns --------------------------------------------- */
.section-heading {
  max-width: 760px;
  margin-bottom: var(--space-10);
}
.section-heading.center { margin-inline: auto; text-align: center; }
.section-heading h2 {
  font-family: var(--font-display);
  font-size: var(--text-display-sm);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-3);
}
.section-heading p { color: var(--color-ink-2); font-size: var(--text-lg); margin: 0; }

.section-heading-row {
  display: flex; justify-content: space-between; align-items: end;
  gap: var(--space-6); margin-bottom: var(--space-10);
}
.section-heading-row > div { max-width: 760px; }
.section-heading-row h2 {
  font-family: var(--font-display);
  font-size: var(--text-display-sm);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-2);
}

/* --- Refined card hover (product cards lift cleanly) ---------------------- */
.card-product {
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-base) var(--ease-out-soft),
              box-shadow var(--dur-base) var(--ease-out-soft),
              transform var(--dur-base) var(--ease-out-soft);
}
.card-product:hover {
  border-color: var(--color-primary-100);
  box-shadow: var(--shadow-soft-3);
  transform: translateY(-3px);
}
.card-product .img-wrap {
  position: relative;
  background: linear-gradient(160deg, var(--color-surface-2) 0%, #fff 100%);
}
.card-product .img-wrap img {
  transition: transform var(--dur-slow) var(--ease-out-soft);
}
.card-product:hover .img-wrap img { transform: scale(1.04); }
.card-product .price {
  font-family: var(--font-display);
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* --- Refined buttons (depth + micro-interaction) -------------------------- */
.btn { transition: background var(--dur-fast) var(--ease-out-soft),
                   color var(--dur-fast) var(--ease-out-soft),
                   border-color var(--dur-fast) var(--ease-out-soft),
                   box-shadow var(--dur-fast) var(--ease-out-soft),
                   transform var(--dur-fast) var(--ease-out-soft); }
.btn-primary { box-shadow: 0 1px 0 rgb(0 0 0 / 0.06), inset 0 1px 0 rgb(255 255 255 / 0.12); }
.btn-primary:hover { box-shadow: 0 5px 14px -3px rgb(0 102 204 / 0.38), inset 0 1px 0 rgb(255 255 255 / 0.18); transform: translateY(-1px); }
.btn-secondary:hover { box-shadow: var(--shadow-soft-1); }
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* --- Inputs polish -------------------------------------------------------- */
.input, .select, .textarea {
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: border-color var(--dur-fast) var(--ease-out-soft), box-shadow var(--dur-fast) var(--ease-out-soft);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--color-ink-3); }

/* --- Refined cards -------------------------------------------------------- */
.card { border-radius: var(--radius-lg); transition: border-color var(--dur-base) var(--ease-out-soft), box-shadow var(--dur-base) var(--ease-out-soft); }
.card:hover { box-shadow: var(--shadow-soft-1); }
.card-category {
  background: linear-gradient(180deg, #fff 0%, #FAFCFD 100%);
}
.card-category:hover {
  border-color: var(--color-primary-100);
  box-shadow: var(--shadow-soft-2);
}

/* --- Site shell refinements (sticky-blur header, smoother focus) ---------- */
.site-header {
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgb(15 23 42 / 0.06);
}
@supports not (backdrop-filter: blur(0)) {
  .site-header { background: #fff; }
}

/* --- Pill chips refined --------------------------------------------------- */
.chip { transition: all var(--dur-fast) var(--ease-out-soft); }
.chip:hover { box-shadow: var(--shadow-soft-1); }

/* --- Marquee-style logo strip placeholder (keeps DOM minimal) ------------- */
.logo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8) 0;
  opacity: 0.65;
}
.logo-row .logo-mark {
  display: flex; align-items: center; justify-content: center;
  height: 32px;
  color: var(--color-ink-3);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: var(--text-sm);
  text-transform: uppercase;
}

/* --- Page hero (compact for inner pages) ---------------------------------- */
.page-hero {
  padding-block: clamp(var(--space-16), 8vw, var(--space-20));
  background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--color-border);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-display-md);
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 22ch;
}
.page-hero p {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-ink-2);
  max-width: 64ch;
}

/* --- Split layout (used by Contact, About, etc.) -------------------------- */
.split {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 1024px) {
  .split.split-form { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .split.split-7-5  { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split.split-6-6  { grid-template-columns: 1fr 1fr; }
}

/* --- Info card (used in contact/about side panel) ------------------------- */
.info-card {
  display: grid; gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.info-card h3 { font-size: var(--text-lg); margin: 0; }
.info-card a { color: var(--color-primary); font-weight: 600; }
.info-card .info-row {
  display: grid; gap: 2px;
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.info-card .info-row:last-child { border-bottom: 0; }
.info-card .info-row span { color: var(--color-ink-3); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; }
.info-card .info-row strong { color: var(--color-ink); font-size: var(--text-base); }

/* --- Timeline (about page) ------------------------------------------------- */
.timeline {
  display: grid;
  gap: var(--space-6);
  position: relative;
}
.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.timeline-item:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline-item time {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.timeline-item h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.timeline-item p { margin: 0; color: var(--color-ink-3); }

/* --- Big quote / pull-quote ----------------------------------------------- */
.pull-quote {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-6);
  max-width: 36ch;
}

/* --- Dot dividers --------------------------------------------------------- */
.divider-soft {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border) 40%, var(--color-border) 60%, transparent);
  border: 0;
  margin: var(--space-12) 0;
}

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .card-product:hover, .value-card:hover, .btn-primary:hover { transform: none; }
  .card-product:hover .img-wrap img { transform: none; }
}

/* --- Auto-upgrade existing page headings to display type ----------------- */
.page-heading h1,
.page-heading-compact h1 {
  font-family: var(--font-display);
  font-size: var(--text-display-md);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: var(--space-4);
}
.page-heading .eyebrow,
.page-heading-compact .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-4);
}
.page-heading .eyebrow::before,
.page-heading-compact .eyebrow::before {
  content: "";
  width: 28px; height: 1.5px;
  background: var(--color-primary);
  display: inline-block;
}
.content-page { padding-block: var(--space-16); }
.content-page .article-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
}
.content-page .article-body h2:first-child { margin-top: 0; }
.content-page .article-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: -0.015em;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}
.content-page .article-body p,
.content-page .article-body li {
  color: var(--color-ink-2);
  line-height: 1.75;
}
.content-page .article-body ul,
.content-page .article-body ol {
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

/* --- Accent / conversion utilities ----------------------------------------- */
/* Teal accent button — use for secondary conversion CTAs where blue is already dominant */
.btn-accent {
  background: var(--color-accent); color: #fff; border-color: var(--color-accent);
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.06), inset 0 1px 0 rgb(255 255 255 / 0.12);
}
.btn-accent:hover {
  background: #009485; border-color: #009485; color: #fff;
  box-shadow: 0 5px 14px -3px rgb(0 180 160 / 0.38), inset 0 1px 0 rgb(255 255 255 / 0.18);
  transform: translateY(-1px);
}
.badge-accent { background: var(--color-accent-50); color: var(--color-accent); }
.text-accent { color: var(--color-accent); }

/* Trust-strip numbers in primary for visual weight */
.trust-strip .item strong { color: var(--color-primary); }

/* Section--alt aligned with new soft surfaces */
.section--alt { background: var(--color-surface-2); }

/* Section heading row consistency */
.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  align-items: end;
  flex-wrap: wrap;
}
.section-heading-row > div { max-width: 760px; }

/* Footer refinements */
.site-footer {
  border-top: 1px solid var(--color-border);
}
.site-footer .footer-brand strong {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
