/* Karam CX Benchmark — custom styles on top of design tokens */
@import url("assets/karam-tokens.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "Zain", "Quicksand", system-ui, sans-serif;
  background: var(--karam-bg);
  color: var(--karam-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
[data-lucide] { stroke-width: 2; }

/* ===== App shell ===== */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 249, 249, 0.85);
  backdrop-filter: saturate(1.4) blur(8px);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-brand img { height: 72px; }
.app-brand-sub {
  font-size: 16px;
  color: var(--karam-muted-ink);
  padding-inline-start: 16px;
  margin-inline-start: 16px;
  border-inline-start: 1px solid var(--karam-border);
  font-weight: 500;
  line-height: 1.3;
}
.lang-toggle {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.lang-toggle button {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--karam-muted-ink);
}
.lang-toggle button.is-active {
  background: var(--karam-navy);
  color: #fff;
}

/* ===== Landing ===== */
.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 80px;
  position: relative;
  overflow: hidden;
}
.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(65, 124, 156, 0.12), transparent 60%),
    radial-gradient(800px 400px at 90% 10%, rgba(214, 242, 237, 0.6), transparent 60%);
  pointer-events: none;
}
.landing-inner {
  position: relative;
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: 12.5px;
  color: var(--karam-muted-ink);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(22, 72, 99, 0.04);
}
.eyebrow-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--karam-success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}
.landing h1 {
  font-family: "Zain", sans-serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.12;
  color: var(--karam-navy);
  margin: 22px 0 14px;
  letter-spacing: -0.01em;
  max-width: 780px;
  text-wrap: balance;
}
.landing h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--karam-steel-prod), var(--karam-navy));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing .sub {
  font-size: 18px;
  color: var(--karam-muted-ink);
  max-width: 620px;
  line-height: 1.55;
  margin: 0 0 36px;
  text-wrap: pretty;
}
.scan-form {
  width: 100%;
  max-width: 680px;
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 16px;
  padding: 8px;
  box-shadow:
    0 12px 32px -16px rgba(22, 72, 99, 0.25),
    0 2px 0 rgba(22, 72, 99, 0.04);
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.scan-form:focus-within {
  border-color: var(--karam-steel-prod);
  box-shadow:
    0 0 0 4px rgba(65, 124, 156, 0.18),
    0 12px 32px -16px rgba(22, 72, 99, 0.25);
}
.scan-form-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px 0 16px;
  color: var(--karam-muted-ink);
}
.scan-form input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--karam-ink);
  padding: 14px 6px;
  font-weight: 500;
}
.scan-form input::placeholder {
  color: var(--karam-fg-dim, #6B8BA0);
  font-weight: 400;
}
.scan-btn {
  background: var(--karam-navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 0 24px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 150ms var(--ease-out), transform 150ms var(--ease-out);
  min-height: 44px;
}
.scan-btn:hover { background: #0F3649; }
.scan-btn:active { transform: translateY(1px); }

.privacy-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--karam-muted-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.privacy-note i { width: 13px; height: 13px; }

.social-proof {
  margin-top: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-direction: column;
}
.social-proof-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--karam-fg-dim, #6B8BA0);
}
.proof-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.proof-avatar-stack {
  display: flex;
}
.proof-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid var(--karam-bg);
  background: linear-gradient(135deg, var(--karam-tertiary, #90D2E1), var(--karam-steel-prod));
  margin-inline-start: -10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.proof-avatar:first-child { margin-inline-start: 0; }
.proof-text { font-size: 13.5px; color: var(--karam-muted-ink); }
.proof-text b { color: var(--karam-navy); }

/* ===== How it works strip ===== */
.steps-strip {
  margin-top: 64px;
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step-card {
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--karam-mint);
  color: var(--karam-navy);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-title { font-size: 15px; font-weight: 700; color: var(--karam-navy); }
.step-desc { font-size: 13px; color: var(--karam-muted-ink); line-height: 1.5; }

/* ===== Scanning screen ===== */
.scan-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 60px;
  position: relative;
}
.scan-scope {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  box-shadow: 0 2px 4px rgba(22, 72, 99, 0.04);
}
.scan-scope-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--karam-navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.scan-scope-text { font-size: 13.5px; color: var(--karam-ink); font-weight: 500; }
.scan-scope-text b { color: var(--karam-navy); }

.scan-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--karam-navy);
  margin: 28px 0 8px;
  text-align: center;
}
.scan-sub {
  color: var(--karam-muted-ink);
  font-size: 15px;
  margin-bottom: 28px;
}

.scan-progress-bar {
  width: 100%;
  max-width: 640px;
  height: 4px;
  background: rgba(65, 124, 156, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 32px;
}
.scan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--karam-steel-prod), var(--karam-navy));
  transition: width 500ms var(--ease-out);
  border-radius: 999px;
}

.probe-list {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(22, 72, 99, 0.04), 0 2px 12px -2px rgba(22, 72, 99, 0.08);
}
.probe-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--karam-border);
  transition: background 200ms var(--ease-out);
}
.probe-item:last-child { border-bottom: none; }
.probe-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--karam-surface);
  color: var(--karam-muted-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 200ms var(--ease-out);
}
.probe-item.is-active .probe-icon {
  background: var(--karam-mint);
  color: var(--karam-navy);
}
.probe-item.is-done .probe-icon {
  background: var(--karam-success);
  color: #fff;
}
.probe-item.is-fail .probe-icon {
  background: #FEE;
  color: var(--karam-warn);
}
.probe-label {
  flex: 1;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--karam-ink);
}
.probe-label .sub {
  display: block;
  font-size: 12px;
  color: var(--karam-muted-ink);
  font-weight: 400;
  margin-top: 2px;
}
.probe-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--karam-fg-dim, #6B8BA0);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.probe-item.is-done .probe-status { color: var(--karam-success); }
.probe-item.is-active .probe-status { color: var(--karam-navy); }
.probe-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(22, 72, 99, 0.2);
  border-top-color: var(--karam-navy);
  border-radius: 999px;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Enrichment card ===== */
.enrich-card {
  margin-top: 24px;
  width: 100%;
  max-width: 640px;
  background: linear-gradient(135deg, #ffffff, var(--karam-mint));
  border: 1px solid var(--karam-border);
  border-radius: 16px;
  padding: 24px;
  animation: slide-up 400ms var(--ease-out);
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.enrich-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.enrich-title { font-size: 18px; font-weight: 700; color: var(--karam-navy); margin: 0; }
.enrich-sub { font-size: 13px; color: var(--karam-muted-ink); margin: 4px 0 0; }
.enrich-skip {
  font-size: 12.5px;
  color: var(--karam-muted-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.enrich-q {
  margin-top: 16px;
}
.enrich-q-label { font-size: 13px; font-weight: 600; color: var(--karam-ink); margin-bottom: 8px; }
.enrich-options { display: flex; flex-wrap: wrap; gap: 6px; }
.enrich-opt {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--karam-ink);
  font-weight: 500;
  transition: all 150ms var(--ease-out);
}
.enrich-opt:hover { border-color: var(--karam-steel-prod); }
.enrich-opt.is-selected {
  background: var(--karam-navy);
  color: #fff;
  border-color: var(--karam-navy);
}
.enrich-confidence {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--karam-muted-ink);
}
.enrich-conf-bar {
  flex: 1;
  margin: 0 12px;
  height: 6px;
  background: rgba(22, 72, 99, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.enrich-conf-fill {
  height: 100%;
  background: var(--karam-success);
  transition: width 400ms var(--ease-out);
  border-radius: 999px;
}

/* ===== Results screen ===== */
.result-screen {
  flex: 1;
  padding: 32px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.result-inner {
  width: 100%;
  max-width: 1100px;
}

.result-head {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.result-head-left { display: flex; align-items: center; gap: 14px; }
.store-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F7D1DE, #F5A8C2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--karam-navy);
  font-size: 22px;
  border: 1px solid rgba(0,0,0,0.05);
}
.store-name { font-size: 22px; font-weight: 700; color: var(--karam-navy); margin: 0; }
.store-url { font-size: 13px; color: var(--karam-muted-ink); direction: ltr; unicode-bidi: isolate; }
.result-head-right { display: flex; gap: 8px; }

/* Hero — score + verdict */
.hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #F1F6F5 100%);
  border: 1px solid var(--karam-border);
  border-radius: 20px;
  padding: 36px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px -12px rgba(22, 72, 99, 0.12);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 80% 20%, rgba(65, 124, 156, 0.08), transparent);
  pointer-events: none;
}

.score-gauge {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}
.score-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-gauge-track { fill: none; stroke: rgba(22, 72, 99, 0.08); stroke-width: 16; stroke-linecap: round; }
.score-gauge-fill { fill: none; stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset 1200ms var(--ease-out); }
.score-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.score-value {
  font-size: 84px;
  font-weight: 700;
  line-height: 1;
  color: var(--karam-navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.score-of {
  font-size: 18px;
  color: var(--karam-muted-ink);
  margin-top: 4px;
}
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  margin-top: 10px;
}
.tier-leader { background: #DFF4E4; color: #15803D; }
.tier-solid { background: #D6F2ED; color: #0F766E; }
.tier-needs { background: #FEF2D6; color: #9A6200; }
.tier-risk { background: #FDE2EA; color: #B22B54; }

.hero-right h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--karam-navy);
  margin: 0 0 10px;
  line-height: 1.25;
  text-wrap: balance;
}
.hero-right .lead {
  font-size: 15.5px;
  color: var(--karam-muted-ink);
  line-height: 1.6;
  margin: 0 0 18px;
  text-wrap: pretty;
}
.percentile-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 12px;
  padding: 12px 16px;
}
.percentile-num { font-size: 28px; font-weight: 700; color: var(--karam-navy); font-variant-numeric: tabular-nums; line-height: 1; }
.percentile-label { font-size: 12.5px; color: var(--karam-muted-ink); line-height: 1.4; }

.hero-actions { display: flex; gap: 8px; margin-top: 18px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: all 150ms var(--ease-out);
}
.btn-primary { background: var(--karam-navy); color: #fff; }
.btn-primary:hover { background: #0F3649; }
.btn-secondary { background: #fff; color: var(--karam-navy); border: 1px solid var(--karam-border); }
.btn-secondary:hover { background: var(--karam-surface); }
.btn-ghost { background: transparent; color: var(--karam-muted-ink); }
.btn-ghost:hover { background: var(--karam-surface); color: var(--karam-navy); }
.btn:active { transform: translateY(1px); }
.btn i { width: 16px; height: 16px; }

/* Pillars */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 36px 0 16px;
}
.section-title h3 { font-size: 20px; font-weight: 700; color: var(--karam-navy); margin: 0; }
.section-title .sub { font-size: 13px; color: var(--karam-muted-ink); }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.pillar-card {
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
  cursor: pointer;
}
.pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(22, 72, 99, 0.18);
}
.pillar-head { display: flex; align-items: center; justify-content: space-between; }
.pillar-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--karam-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--karam-steel-prod);
}
.pillar-weight { font-size: 11px; color: var(--karam-muted-ink); font-weight: 600; }
.pillar-name { font-size: 14px; font-weight: 600; color: var(--karam-ink); }
.pillar-score-row { display: flex; align-items: baseline; gap: 6px; }
.pillar-score { font-size: 30px; font-weight: 700; color: var(--karam-navy); line-height: 1; font-variant-numeric: tabular-nums; }
.pillar-score-of { font-size: 13px; color: var(--karam-muted-ink); }
.pillar-bar {
  height: 6px;
  background: rgba(22, 72, 99, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.pillar-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 900ms var(--ease-out);
}
.pillar-note { font-size: 12px; color: var(--karam-muted-ink); line-height: 1.45; }

.band-leader { background: #22C55E; }
.band-solid { background: #0EA5A0; }
.band-needs { background: #F59E0B; }
.band-risk { background: var(--karam-danger); }

/* Recommendations */
.recs-list { display: flex; flex-direction: column; gap: 12px; }
.rec-card {
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 16px;
  padding: 22px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: flex-start;
  transition: all 200ms var(--ease-out);
  position: relative;
  overflow: hidden;
}
.rec-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0; bottom: 0;
  width: 3px;
  background: var(--karam-steel-prod);
  opacity: 0;
  transition: opacity 150ms;
}
.rec-card.is-karam::before { opacity: 1; background: linear-gradient(180deg, var(--karam-steel-prod), var(--karam-navy)); }
.rec-card:hover { box-shadow: 0 10px 24px -10px rgba(22, 72, 99, 0.16); }
.rec-num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--karam-surface);
  color: var(--karam-navy);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rec-card.is-karam .rec-num { background: var(--karam-navy); color: #fff; }
.rec-body { min-width: 0; }
.rec-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--karam-navy);
  margin: 0 0 8px;
  line-height: 1.35;
  text-wrap: balance;
}
.rec-finding {
  font-size: 14px;
  color: var(--karam-muted-ink);
  line-height: 1.6;
  margin: 0 0 12px;
  text-wrap: pretty;
}
.rec-action {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--karam-surface);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--karam-ink);
  line-height: 1.5;
}
.rec-action-label {
  font-weight: 700;
  color: var(--karam-navy);
  margin-inline-end: 6px;
}
.rec-action i { width: 16px; height: 16px; color: var(--karam-steel-prod); flex-shrink: 0; margin-top: 3px; }
.rec-pillar-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--karam-mint);
  color: var(--karam-navy);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.rec-karam-fit {
  margin-top: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(65, 124, 156, 0.08), rgba(65, 124, 156, 0.02));
  border: 1px solid rgba(65, 124, 156, 0.18);
  border-radius: 10px;
  font-size: 13px;
  color: var(--karam-navy);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.45;
}
.rec-karam-fit .k-mark {
  width: 22px; height: 22px;
  background: var(--karam-navy);
  color: #fff;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.rec-ext-link {
  font-size: 12.5px;
  color: var(--karam-steel-prod);
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.rec-ext-link i { width: 12px; height: 12px; }

.rec-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.rec-severity {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.sev-high { background: #FDE2EA; color: #B22B54; }
.sev-med { background: #FEF2D6; color: #9A6200; }
.sev-low { background: var(--karam-mint); color: var(--karam-navy); }
.rec-impact {
  font-size: 11px;
  color: var(--karam-muted-ink);
  text-align: end;
  line-height: 1.3;
}
.rec-impact b { color: var(--karam-navy); font-size: 13px; }

/* ===== Share + CTA block ===== */
.share-section {
  margin-top: 28px;
  background: linear-gradient(140deg, var(--karam-navy), #0E3A52);
  border-radius: 20px;
  padding: 32px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 28px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.share-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(400px 200px at 20% 80%, rgba(214, 242, 237, 0.18), transparent),
    radial-gradient(300px 200px at 80% 20%, rgba(144, 210, 225, 0.14), transparent);
}
.share-copy { position: relative; }
.share-copy h3 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
  text-wrap: balance;
}
.share-copy p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 20px;
  line-height: 1.55;
  max-width: 440px;
}
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 150ms;
}
.share-btn:hover { background: rgba(255, 255, 255, 0.2); }
.share-btn.is-wa { background: #25D366; border-color: #25D366; }
.share-btn.is-wa:hover { background: #1EB055; }
.share-btn i { width: 15px; height: 15px; }

.share-card-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 630;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.4);
  background: #fff;
  transform: rotate(-1deg);
  transition: transform 300ms var(--ease-out);
  cursor: pointer;
}
.share-card-preview:hover { transform: rotate(0deg) scale(1.02); }

/* ===== Share card (1200x630) ===== */
.share-card {
  width: 1200px;
  height: 630px;
  background: #FAFCFC;
  color: var(--karam-ink);
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  font-family: "Zain", sans-serif;
}
.share-card.scaled {
  transform-origin: top left;
}
.share-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(214, 242, 237, 0.5), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(65, 124, 156, 0.06), transparent 60%);
  pointer-events: none;
}
.share-card-head { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.share-card-brand { display: flex; align-items: center; gap: 14px; }
.share-card-brand img { height: 36px; }
.share-card-title {
  font-size: 17px;
  color: var(--karam-muted-ink);
  padding-inline-start: 16px;
  margin-inline-start: 16px;
  border-inline-start: 1px solid var(--karam-border);
}
.share-card-meta {
  font-size: 15px;
  color: var(--karam-muted-ink);
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 500;
}

.share-card-body {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.share-score-block { text-align: center; }
.share-score-value {
  font-size: 180px;
  font-weight: 700;
  color: var(--karam-navy);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.share-score-of {
  font-size: 28px;
  color: var(--karam-muted-ink);
  margin-top: 4px;
}
.share-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 700;
}

.share-bars { display: flex; flex-direction: column; gap: 14px; }
.share-bar { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 16px; }
.share-bar-label { font-size: 17px; color: var(--karam-ink); font-weight: 600; }
.share-bar-track { height: 12px; background: rgba(22, 72, 99, 0.08); border-radius: 999px; overflow: hidden; }
.share-bar-fill { height: 100%; border-radius: 999px; }
.share-bar-value { font-size: 18px; font-weight: 700; color: var(--karam-navy); text-align: end; font-variant-numeric: tabular-nums; }

.share-card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.share-insight {
  flex: 1;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 3px 0 rgba(22, 72, 99, 0.04);
}
.share-insight-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--karam-steel-prod);
  margin-bottom: 4px;
}
.share-insight-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--karam-navy);
  line-height: 1.35;
  text-wrap: balance;
}
.share-cta-link {
  font-size: 16px;
  color: var(--karam-muted-ink);
  text-align: end;
  line-height: 1.3;
  flex-shrink: 0;
}
.share-cta-link b { color: var(--karam-navy); font-size: 18px; display: block; }

/* ===== Email capture / trial CTA ===== */
.email-capture {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--karam-border);
  border-radius: 16px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: center;
}
.email-capture h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--karam-navy);
  margin: 0 0 6px;
}
.email-capture p {
  font-size: 14px;
  color: var(--karam-muted-ink);
  margin: 0;
  line-height: 1.5;
}
.email-form { display: flex; gap: 8px; }
.email-form input {
  flex: 1;
  height: 44px;
  border: 1px solid var(--karam-border);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--karam-ink);
  background: var(--karam-bg);
  outline: none;
}
.email-form input:focus {
  border-color: var(--karam-steel-prod);
  box-shadow: 0 0 0 3px rgba(65, 124, 156, 0.18);
}

/* ===== Trial CTA ===== */
.trial-cta {
  margin-top: 28px;
  background: linear-gradient(140deg, var(--karam-mint), #E7F4EF);
  border: 1px solid var(--karam-border);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.trial-mascot {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.trial-mascot img { width: 100%; height: 100%; object-fit: cover; }
.trial-copy h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--karam-navy);
  margin: 0 0 8px;
  line-height: 1.3;
}
.trial-copy p {
  font-size: 14.5px;
  color: var(--karam-muted-ink);
  margin: 0 0 16px;
  line-height: 1.55;
  max-width: 520px;
}
.trial-btn {
  background: var(--karam-navy);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.trial-btn:hover { background: #0F3649; }

/* ===== Share modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 54, 73, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 200ms var(--ease-out);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  max-width: 1280px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: modal-in 300ms var(--ease-out);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 20px; font-weight: 700; color: var(--karam-navy); margin: 0; }
.modal-close {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--karam-surface);
  color: var(--karam-muted-ink);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--karam-border); }
.share-previews {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: flex-start;
}
.share-preview-wrap {
  background: var(--karam-surface);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.share-preview-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--karam-muted-ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.share-preview-frame {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px -6px rgba(22, 72, 99, 0.18);
  position: relative;
  width: 100%;
}
.share-preview-frame.og { aspect-ratio: 1200/630; }
.share-preview-frame.sq { aspect-ratio: 1/1; }
.share-preview-frame > div {
  transform-origin: top left;
  position: absolute;
  top: 0;
  left: 0;
}
/* RTL: keep transform anchor on the visual "left" (which is right in RTL) */
[dir="rtl"] .share-preview-frame > div {
  left: auto;
  right: 0;
  transform-origin: top right;
}

/* ===== Editorial variant (tweak) ===== */
body.editorial {
  background: #0E1419;
  color: #E6EDE9;
}
body.editorial .app-topbar {
  background: rgba(14, 20, 25, 0.85);
}
body.editorial .app-brand-sub { color: #8CA5B4; border-inline-start-color: #1F2E36; }
body.editorial .lang-toggle { background: #1A242B; border-color: #25333C; }
body.editorial .lang-toggle button { color: #8CA5B4; }
body.editorial .lang-toggle button.is-active { background: var(--karam-tertiary, #90D2E1); color: #0E1419; }
body.editorial .landing::before {
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(144, 210, 225, 0.22), transparent 60%),
    radial-gradient(800px 400px at 90% 10%, rgba(214, 242, 237, 0.1), transparent 60%);
}
body.editorial .landing h1 { color: #F5FAF8; font-size: 72px; letter-spacing: -0.02em; }
body.editorial .landing h1 em {
  background: linear-gradient(120deg, #90D2E1, #D6F2ED);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.editorial .landing .sub { color: #B8CAD1; font-size: 20px; }
body.editorial .eyebrow-pill { background: #1A242B; border-color: #25333C; color: #B8CAD1; }
body.editorial .scan-form { background: #1A242B; border-color: #25333C; }
body.editorial .scan-form input { color: #F5FAF8; }
body.editorial .scan-form input::placeholder { color: #6C8391; }
body.editorial .scan-btn { background: var(--karam-tertiary, #90D2E1); color: #0E1419; }
body.editorial .scan-btn:hover { background: #B4E4EF; }
body.editorial .privacy-note { color: #8CA5B4; }
body.editorial .step-card { background: #1A242B; border-color: #25333C; }
body.editorial .step-title { color: #F5FAF8; }
body.editorial .step-desc { color: #B8CAD1; }
body.editorial .step-num { background: #25333C; color: #90D2E1; }
body.editorial .social-proof-label { color: #6C8391; }
body.editorial .proof-text { color: #B8CAD1; }
body.editorial .proof-text b { color: #F5FAF8; }
body.editorial .proof-avatar { border-color: #0E1419; }

/* scanning editorial */
body.editorial .scan-scope { background: #1A242B; border-color: #25333C; }
body.editorial .scan-scope-text { color: #F5FAF8; }
body.editorial .scan-scope-text b { color: #90D2E1; }
body.editorial .scan-title { color: #F5FAF8; }
body.editorial .scan-sub { color: #B8CAD1; }
body.editorial .probe-list { background: #1A242B; border-color: #25333C; }
body.editorial .probe-item { border-color: #25333C; }
body.editorial .probe-icon { background: #25333C; color: #B8CAD1; }
body.editorial .probe-item.is-active .probe-icon { background: #2A4458; color: #90D2E1; }
body.editorial .probe-label { color: #F5FAF8; }
body.editorial .probe-label .sub { color: #8CA5B4; }
body.editorial .probe-status { color: #6C8391; }
body.editorial .probe-item.is-active .probe-status { color: #90D2E1; }
body.editorial .probe-item.is-done .probe-status { color: #10B981; }
body.editorial .enrich-card {
  background: linear-gradient(135deg, #1A242B, #213139);
  border-color: #25333C;
}
body.editorial .enrich-title { color: #F5FAF8; }
body.editorial .enrich-sub, body.editorial .enrich-skip { color: #B8CAD1; }
body.editorial .enrich-q-label { color: #F5FAF8; }
body.editorial .enrich-opt {
  background: #25333C;
  border-color: #2F4149;
  color: #E6EDE9;
}
body.editorial .enrich-opt.is-selected {
  background: #90D2E1;
  color: #0E1419;
  border-color: #90D2E1;
}
body.editorial .enrich-confidence { color: #8CA5B4; }
body.editorial .enrich-conf-bar { background: #25333C; }

/* Editorial results */
body.editorial .store-name { color: #F5FAF8; }
body.editorial .store-url { color: #8CA5B4; }
body.editorial .hero-card {
  background: linear-gradient(135deg, #1A242B 0%, #142028 100%);
  border-color: #25333C;
}
body.editorial .hero-card::before {
  background: radial-gradient(400px 200px at 80% 20%, rgba(144, 210, 225, 0.18), transparent);
}
body.editorial .score-value { color: #F5FAF8; }
body.editorial .score-of { color: #8CA5B4; }
body.editorial .score-gauge-track { stroke: rgba(255, 255, 255, 0.1); }
body.editorial .hero-right h2 { color: #F5FAF8; }
body.editorial .hero-right .lead { color: #B8CAD1; }
body.editorial .percentile-row { background: #25333C; border-color: #2F4149; }
body.editorial .percentile-num { color: #F5FAF8; }
body.editorial .percentile-label { color: #B8CAD1; }
body.editorial .btn-primary { background: #90D2E1; color: #0E1419; }
body.editorial .btn-primary:hover { background: #B4E4EF; }
body.editorial .btn-secondary { background: #1A242B; color: #F5FAF8; border-color: #25333C; }
body.editorial .section-title h3 { color: #F5FAF8; }
body.editorial .section-title .sub { color: #8CA5B4; }
body.editorial .pillar-card { background: #1A242B; border-color: #25333C; }
body.editorial .pillar-name { color: #F5FAF8; }
body.editorial .pillar-score { color: #F5FAF8; }
body.editorial .pillar-score-of, body.editorial .pillar-weight, body.editorial .pillar-note { color: #8CA5B4; }
body.editorial .pillar-icon { background: #25333C; color: #90D2E1; }
body.editorial .pillar-bar { background: rgba(255,255,255,0.08); }
body.editorial .rec-card { background: #1A242B; border-color: #25333C; }
body.editorial .rec-title { color: #F5FAF8; }
body.editorial .rec-finding { color: #B8CAD1; }
body.editorial .rec-action { background: #25333C; color: #E6EDE9; }
body.editorial .rec-action-label { color: #90D2E1; }
body.editorial .rec-num { background: #25333C; color: #90D2E1; }
body.editorial .rec-card.is-karam .rec-num { background: #90D2E1; color: #0E1419; }
body.editorial .rec-karam-fit {
  background: linear-gradient(135deg, rgba(144, 210, 225, 0.14), rgba(144, 210, 225, 0.04));
  border-color: rgba(144, 210, 225, 0.3);
  color: #90D2E1;
}
body.editorial .rec-karam-fit .k-mark { background: #90D2E1; color: #0E1419; }
body.editorial .rec-pillar-tag { background: #25333C; color: #90D2E1; }
body.editorial .email-capture { background: #1A242B; border-color: #25333C; }
body.editorial .email-capture h3 { color: #F5FAF8; }
body.editorial .email-capture p { color: #B8CAD1; }
body.editorial .email-form input { background: #0E1419; border-color: #25333C; color: #F5FAF8; }
body.editorial .trial-cta {
  background: linear-gradient(140deg, #2A4458, #1A242B);
  border-color: #25333C;
}
body.editorial .trial-copy h3 { color: #F5FAF8; }
body.editorial .trial-copy p { color: #B8CAD1; }
body.editorial .trial-btn { background: #90D2E1; color: #0E1419; }
body.editorial .trial-btn:hover { background: #B4E4EF; }
body.editorial .modal { background: #1A242B; }
body.editorial .modal-title { color: #F5FAF8; }
body.editorial .modal-close { background: #25333C; color: #B8CAD1; }
body.editorial .share-preview-wrap { background: #0E1419; }
body.editorial .share-preview-label { color: #8CA5B4; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .share-section { grid-template-columns: 1fr; }
  .email-capture { grid-template-columns: 1fr; gap: 16px; }
  .trial-cta { flex-direction: column; text-align: center; }
  .steps-strip { grid-template-columns: 1fr; }
  .landing h1 { font-size: 36px; }
  .score-gauge { width: 240px; height: 240px; }
  .score-value { font-size: 64px; }
  .rec-card { grid-template-columns: 40px 1fr; gap: 12px; padding: 16px; }
  .rec-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
