/* ══════════════════════════════════════════════════════════════
   PEPTIDE EXCHANGE — clinical-biotech design system
   Inter + Sora · trustworthy teal/slate palette · light-default,
   refined dark mode. Class + variable names preserved for compat.
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* professional light (clinical) — default */
  --bg:       #f4f7fa;
  --surface:  #ffffff;
  --surface2: #f1f5f9;
  --border:   #e4e9f0;
  --border2:  #cfd8e3;
  --accent:   #0d9488;   /* teal-600 */
  --accent2:  #0891b2;   /* cyan-600 */
  --text:     #0f1b2d;
  --muted:    #64748b;
  --muted2:   #475569;
  --error:    #dc2626;
  --warn:     #b45309;
  --ok:       #0d9488;
  --shadow:   0 1px 2px rgba(15,27,45,.04), 0 4px 16px rgba(15,27,45,.05);
  --shadow-lg:0 8px 30px rgba(15,27,45,.10);
  --ring:     rgba(13,148,136,.16);
  --mono:     'Inter', system-ui, sans-serif;
  --display:  'Sora', 'Inter', sans-serif;
}

body.dark-mode {
  /* refined professional dark (no neon) */
  --bg:       #0b1120;
  --surface:  #111a2b;
  --surface2: #17223a;
  --border:   #1f2b40;
  --border2:  #2c3a54;
  --accent:   #2dd4bf;   /* teal-400 */
  --accent2:  #38bdf8;   /* sky-400 */
  --text:     #e6edf5;
  --muted:    #64748b;
  --muted2:   #94a3b8;
  --error:    #f87171;
  --warn:     #fbbf24;
  --ok:       #2dd4bf;
  --shadow:   0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.28);
  --shadow-lg:0 10px 34px rgba(0,0,0,.45);
  --ring:     rgba(45,212,191,.22);
}

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

/* subtle clinical wash — replaces neon grid/orb */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 460px at 50% -220px, var(--ring), transparent 70%);
  opacity: .6;
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: var(--accent); }

/* ── TOP BAR ──────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}
.brand { text-decoration: none; display: flex; flex-direction: row; align-items: center; gap: 11px; }
.brand-mark { display: block; border-radius: 8px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; }
.logo-mark {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.4px;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-sub {
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 500;
}
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a, .nav-link {
  color: var(--muted2);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .1px;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
  border: 1px solid transparent;
}
.site-nav a:hover, .nav-link:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.site-nav .nav-accent {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  border: 1px solid transparent;
}
.site-nav .nav-accent:hover { color: #fff; filter: brightness(1.05); }
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--error);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  vertical-align: middle;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  font-size: 12px;
  color: var(--muted2);
  margin-left: 8px;
}
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; font-weight: 700;
}
.role-pill {
  font-size: 8.5px; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; font-weight: 600;
  border: 1px solid var(--border2); color: var(--muted);
}

/* theme toggle */
.theme-btn {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  font-family: var(--mono);
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }

.ccy-select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted2);
  font-family: var(--mono);
}
.card-price-converted { color: var(--muted2); font-weight: 400; font-size: 0.85em; }

/* ── RUO COMPLIANCE BANNER ────────────────────────────────── */
.ruo-banner {
  background: color-mix(in srgb, var(--warn) 9%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  color: var(--warn);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  text-align: center;
  padding: 9px 16px;
  text-transform: uppercase;
  z-index: 1;
}

/* ── FLASH TOASTS ─────────────────────────────────────────── */
.flashes { list-style: none; margin: 0 0 20px; max-width: 680px; width: 100%; }
.flash-success {
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  color: var(--ok);
  padding: 11px 15px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  animation: fadeUp .3s ease both;
}
.flash-error {
  background: color-mix(in srgb, var(--error) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--error) 35%, transparent);
  color: var(--error);
  padding: 11px 15px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  animation: fadeUp .3s ease both;
}

/* ── CONTENT ──────────────────────────────────────────────── */
.page {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 28px 72px;
}
.page-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.6px;
  margin-bottom: 5px;
}
.page-sub { font-size: 13px; color: var(--muted); margin-bottom: 26px; max-width: 70ch; line-height: 1.65; }

/* stat bar */
.statsbar {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
  overflow: hidden;
  flex-wrap: wrap;
}
.stat-item { padding: 18px 26px; border-right: 1px solid var(--border); flex: 0 1 auto; }
.stat-item:last-child { border-right: none; }
.stat-val {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--text);
}
.stat-label {
  font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--muted); margin-top: 4px; font-weight: 600;
}

/* ── CARDS / GRID ─────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 20px;
  box-shadow: var(--shadow);
  transition: border-color .18s, box-shadow .18s, transform .18s;
  animation: cardIn .3s ease both;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-link { text-decoration: none; color: var(--text); display: block; }
.card-title { font-family: var(--display); font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 6px; }
.card-meta { font-size: 12px; color: var(--muted); line-height: 1.75; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.card-price {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
}
.card-purity {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

/* ── PILLS / BADGES ───────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  color: var(--muted2);
  background: var(--surface2);
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-verified, .pill-active, .pill-paid, .pill-approved { border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, transparent); }
.pill-pending { border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.pill-invoiced, .pill-awaiting_confirmation { border-color: rgba(56,148,255,.4); color: #3894ff; background: rgba(56,148,255,.09); }
.pill-draft, .pill-pending_payment { border-color: var(--border2); color: var(--muted2); }
.pill-rejected, .pill-failed { border-color: color-mix(in srgb, var(--error) 40%, transparent); color: var(--error); background: color-mix(in srgb, var(--error) 9%, transparent); }
.pill-open, .pill-disputed { border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.pill-refunded { border-color: var(--border2); color: var(--muted2); }
.pill-featured {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  margin-bottom: 10px;
}
.pill-featured::before { display: none; }
.card-featured { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }

/* --- dispute message thread --- */
.thread { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.msg {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 15px;
  background: var(--surface); box-shadow: var(--shadow); max-width: 78%;
}
.msg-buyer { align-self: flex-start; }
.msg-seller { align-self: flex-end; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.msg-admin { align-self: center; border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 5%, var(--surface)); max-width: 90%; }
.msg-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted2); margin-bottom: 6px; }
.msg-time { margin-left: auto; }
.msg-body { font-size: 13px; color: var(--text); line-height: 1.55; white-space: pre-wrap; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 20px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(13,148,136,.25);
  transition: filter .15s, box-shadow .15s, transform .1s;
}
.btn:hover { filter: brightness(1.06); color: #fff; box-shadow: 0 4px 14px rgba(13,148,136,.28); }
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background: var(--surface);
  color: var(--muted2);
  border: 1px solid var(--border2);
  font-weight: 500;
  box-shadow: none;
}
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); filter: none; background: var(--surface2); }
.btn.danger { background: color-mix(in srgb, var(--error) 12%, var(--surface)); color: var(--error); border: 1px solid color-mix(in srgb, var(--error) 38%, transparent); font-weight: 500; box-shadow: none; }
.btn.danger:hover { background: color-mix(in srgb, var(--error) 20%, var(--surface)); filter: none; box-shadow: none; }
.btn-sm { padding: 7px 13px; font-size: 12px; }

/* ── FORMS ────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow);
  max-width: 540px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.form-row input[type=file] { padding: 7px; }
.form-row input[type=checkbox] { width: auto; accent-color: var(--accent); }
.form-row input[type=file]::file-selector-button {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--muted2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 11px;
  cursor: pointer;
  margin-right: 11px;
  transition: border-color .15s, color .15s;
}
.form-row input[type=file]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }
.form-note { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-top: -6px; }
.form-note a { color: var(--accent); text-decoration: none; }
.form-note a:hover { text-decoration: underline; }

/* ── DIRECTORY SEARCH ROW ─────────────────────────────────── */
.search-row { display: flex; align-items: flex-end; gap: 14px; }
.search-row .form-row { margin-bottom: 0; flex: 1; min-width: 0; }
.search-row .search-q { flex: 3; }
.search-btn { flex-shrink: 0; }
.clear-link { color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 500; }
.clear-link:hover { text-decoration: underline; }

/* attestation box — compliance gate */
.attestation-box {
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  background: color-mix(in srgb, var(--warn) 7%, var(--surface));
  padding: 20px 22px;
  border-radius: 14px;
  margin: 24px 0;
  font-size: 13px;
  line-height: 1.8;
  box-shadow: var(--shadow);
}
.attestation-box .attest-title {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--warn); margin-bottom: 10px; font-weight: 700;
}

/* ── TABLES ───────────────────────────────────────────────── */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow-x: auto; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 13px 17px;
  font-size: 9.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 13px 17px; border-bottom: 1px solid var(--border); color: var(--muted2); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td, table tr:hover td { background: var(--surface2); }
td a { color: var(--accent); text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }

/* ── SECTIONS ─────────────────────────────────────────────── */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin: 34px 0 14px;
}
.section-title::before {
  content: '';
  width: 7px; height: 7px; border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

/* ── MISC ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  border: 1px dashed var(--border2);
  border-radius: 14px;
  background: var(--surface);
}
.empty-icon { font-size: 38px; margin-bottom: 12px; opacity: .5; }
.empty-title { font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--muted2); margin-bottom: 6px; }
.empty-sub { font-size: 12.5px; line-height: 1.75; }

.coa-list { list-style: none; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.coa-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 15px;
  box-shadow: var(--shadow);
}
.coa-list a { color: var(--accent); text-decoration: none; font-weight: 500; }
.coa-list a:hover { text-decoration: underline; }

/* centered auth/pay cards */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 34px 30px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .5s ease both;
}
.auth-card .logo-mark { font-size: 30px; text-align: center; display: block; }
.auth-card .logo-sub { text-align: center; margin-bottom: 26px; }
.auth-title { font-family: var(--display); font-size: 18px; font-weight: 700; margin-bottom: 20px; }

/* mock checkout */
.mock-pay-card {
  width: 440px;
  text-align: center;
}
.amount {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 18px 0 6px;
}
.meta { font-size: 11px; color: var(--muted); line-height: 1.85; margin-bottom: 16px; }

/* toast */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s;
}
.toast.show { transform: translateY(0); opacity: 1; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── MOBILE ───────────────────────────────────────────────── */
@media (max-width: 720px) {
  .site-header { padding: 12px 16px; }
  .statsbar { gap: 0; }
  .stat-item { padding: 14px 18px; }
  .page { padding: 22px 16px 56px; }
  .page-title { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; align-items: stretch; }
  .search-row .form-row { flex: 1 1 auto; }
  .search-row .search-q { flex: 1 1 auto; }
  .search-btn { width: 100%; }
  .form-card, .auth-card, .mock-pay-card { width: 100%; max-width: 100%; }
}

/* ── COA PREVIEW MODAL ─────────────────────────────────────── */
.coa-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 15, 26, .6);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.coa-modal.show { display: flex; }
.coa-modal-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  width: min(900px, 94vw);
  height: min(82vh, 800px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .18s ease;
}
.coa-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 17px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted2);
}
.coa-modal-close {
  background: none;
  border: none;
  color: var(--muted2);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.coa-modal-close:hover { color: var(--text); background: var(--surface2); }
.coa-modal-box iframe { flex: 1; width: 100%; border: none; background: #fff; }
.btn-preview {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--muted2);
  border-radius: 7px;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  margin-left: 8px;
  transition: border-color .15s, color .15s;
}
.btn-preview:hover { border-color: var(--accent); color: var(--accent); }

/* ══ P3 — brand & UX polish ═══════════════════════════════════ */

/* ── LANDING HERO (P3-28) ─────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: center;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 40px;
  margin-bottom: 34px;
  box-shadow: var(--shadow);
}
.hero-eyebrow {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  padding: 4px 11px; border-radius: 999px; margin-bottom: 16px;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.hero-sub { font-size: 14.5px; color: var(--muted2); line-height: 1.7; max-width: 60ch; margin-bottom: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.trust-points {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  font-size: 12.5px;
  color: var(--muted2);
}
.trust-points li { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.trust-points li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hero-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
}
.hero-stat-val {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label {
  display: block;
  font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-top: 5px;
}

/* ── PRODUCT PHOTO GALLERY (P3-29) ────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.photo-thumb {
  padding: 0;
  border: 1px solid var(--border2);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface2);
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }

/* ── IMAGE LIGHTBOX (P3-29) ───────────────────────────────── */
.img-modal { flex-direction: column; }
.img-modal img {
  max-width: min(92vw, 1000px);
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  background: #fff;
  object-fit: contain;
}
.img-modal-close {
  position: absolute;
  top: 18px; right: 22px;
  font-size: 20px;
  color: #fff;
  background: rgba(0,0,0,.35);
  border-radius: 999px;
  width: 38px; height: 38px;
}
.img-modal-close:hover { color: #fff; background: rgba(0,0,0,.55); }

/* ── ACCESSIBILITY (P3-30) ────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
/* mouse users don't get the ring; keyboard users always do */
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 28px 22px; gap: 24px; }
  .trust-points { grid-template-columns: 1fr; }
}

/* ══ P4 — news feed, how-it-works, footer (professional landing polish) ══ */

/* ── HOW IT WORKS (landing strip) ─────────────────────────── */
.how {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 34px 38px;
  margin-bottom: 34px;
}
.how-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: how;
}
.how-step {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 22px 22px 20px;
  position: relative;
}
.how-num {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
}
.how-title { font-family: var(--display); font-size: 15px; font-weight: 700; margin: 8px 0 6px; letter-spacing: -.2px; }
.how-body { font-size: 12.5px; color: var(--muted2); line-height: 1.7; }

/* ── NEWS GRID / CARDS ────────────────────────────────────── */
.news-section {
  margin-top: 40px;
  padding-top: 6px;
}
.news-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: border-color .18s, box-shadow .18s, transform .18s;
  animation: cardIn .3s ease both;
}
.news-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.news-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.news-cat { border-color: color-mix(in srgb, var(--accent2) 45%, transparent); color: var(--accent2); background: color-mix(in srgb, var(--accent2) 9%, transparent); }
.news-cat::before { display: none; }
.news-date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.news-card-title {
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.35;
}
.news-card-summary {
  font-size: 12.5px;
  color: var(--muted2);
  line-height: 1.65;
  flex: 1;
}
.news-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.news-read { color: var(--accent); font-weight: 600; }

/* ── NEWS HUB FILTERS ─────────────────────────────────────── */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter-chip {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--muted2);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
}

/* ── ARTICLE PAGE ─────────────────────────────────────────── */
.article-back { margin-bottom: 18px; }
.article-back a { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 500; }
.article-back a:hover { text-decoration: underline; }
.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 42px 48px 38px;
  margin-bottom: 34px;
}
.article-head { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.article-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.article-source { font-size: 12px; font-weight: 600; color: var(--muted2); }
.article-date { font-size: 12px; color: var(--muted); }
.article-title {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.article-summary { font-size: 14.5px; color: var(--muted2); line-height: 1.7; max-width: 72ch; }
.article-body { max-width: 72ch; }
.article-body p { font-size: 14.5px; line-height: 1.85; color: var(--text); margin-bottom: 18px; }
.article-body p::first-letter { }
.article-external {
  margin-top: 26px;
  padding: 14px 18px;
  border: 1px dashed var(--border2);
  border-radius: 12px;
  background: var(--bg);
  font-size: 12.5px;
  color: var(--muted2);
}
.article-external a { color: var(--accent); text-decoration: none; font-weight: 500; }
.article-external a:hover { text-decoration: underline; }

/* ── SITE FOOTER ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 28px 26px;
  margin-top: 40px;
}
.footer-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
}
.footer-tag { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 14px; max-width: 38ch; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-head {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.footer-col a { color: var(--muted2); text-decoration: none; font-size: 13px; }
.footer-col a:hover { color: var(--accent); }
.footer-line { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.footer-bottom {
  max-width: 1120px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.footer-ruo {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--warn);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .how { padding: 26px 20px; }
  .how-steps { grid-template-columns: 1fr; }
  .article { padding: 26px 22px; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding: 32px 18px 22px; }
}
