/* Themes Lab. Ink on off-white; Salla teal and mint are the only accents.
   Logical properties throughout, so the Arabic page mirrors by itself. */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --subtle: #f4f4f2;
  --stage: #f2f2f0;
  --line: #e6e6e3;
  --line-strong: #d6d6d2;
  --ink: #111112;
  --ink-2: #3f3f46;
  --muted: #55555c;
  --faint: #6b6b72;
  --teal: #004956;
  --teal-dark: #00323b;
  --mint: #baf3e6;
  --mint-soft: #f3fbf8;
  --red: #b42318;
  --red-line: #d92d20;
  --red-soft: #fef3f2;
  --amber: #93370d;
  --amber-soft: #fff6e5;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --arabic: 'IBM Plex Sans Arabic', 'Geist', system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
:lang(ar),
[dir='rtl'] body {
  font-family: var(--arabic);
}
a {
  color: var(--teal);
}
a:hover {
  color: var(--teal-dark);
}
button {
  font: inherit;
}
.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;
}
.mono,
.code {
  font-family: var(--mono);
}
.muted {
  color: var(--faint);
}
.accent {
  color: var(--teal);
}
.grow {
  flex: 1;
}
.small-text {
  font-size: 12.5px;
}
[dir='rtl'] .flip-rtl {
  transform: scaleX(-1);
}
.spin {
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spin,
  .bit,
  .celebrate-mark,
  .checking-bar span {
    animation: none !important;
  }
}

/* ── Page frame ─────────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px clamp(16px, 4vw, 40px);
  background: var(--surface);
  border-block-end: 1px solid #ecece9;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover {
  color: var(--ink);
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--teal);
  display: grid;
  place-items: center;
}
.brand-name {
  font-size: 15px;
  font-weight: 600;
}
.brand-by {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
:lang(ar) .brand-by {
  font-family: var(--arabic);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--ink);
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #e1e1dd;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
}
.lang-switch:lang(ar) {
  font-family: var(--arabic);
}
.lang-switch:lang(en) {
  font-family: var(--sans);
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 20px clamp(16px, 4vw, 40px);
  font-size: 12.5px;
  color: var(--faint);
  border-block-start: 1px solid #ecece9;
}

/* ── Buttons, chips, badges ─────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
:lang(ar) .cta {
  font-weight: 600;
  font-size: 16px;
}
.cta:hover {
  background: var(--teal-dark);
  color: #fff;
}
.cta.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.ghost:hover {
  border-color: #b8b8b3;
  color: var(--ink);
}
.ghost.small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #e1e1dd;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.chip:hover {
  border-color: #b8b8b3;
  color: var(--ink);
}
.chip.small {
  min-height: 36px;
  padding: 0 12px;
}
.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-twig {
  background: #8a8a92;
}
.dot-react {
  background: var(--teal);
}
.dot-live {
  background: #1f9d7a;
}
.badge {
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}
.badge-twig {
  background: #e6e6e3;
  color: var(--ink-2);
}
.badge-react {
  background: var(--mint);
  color: var(--teal);
  font-weight: 500;
}
.badge-ink {
  background: var(--ink);
  color: #fff;
}
.icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover,
.icon-btn[aria-expanded='true'] {
  background: #e7efef;
  color: var(--teal);
}
.icon-btn.filled {
  background: var(--subtle);
}
.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #f1f1ee;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.seg[aria-pressed='true'],
.seg[aria-current='page'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    0 1px 2px rgba(17, 17, 18, 0.1),
    0 0 0 1px rgba(17, 17, 18, 0.06);
}
.segmented.big {
  background: var(--surface);
  padding: 4px;
  border-radius: 12px;
}
.segmented.big .seg {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}
.segmented.big .seg[aria-pressed='true'] {
  background: var(--ink-2);
  color: #fff;
  box-shadow: none;
}
.segmented.big .seg[data-side-button='react'][aria-pressed='true'] {
  background: var(--teal);
}
.muted-inline {
  font-weight: 400;
  opacity: 0.8;
}

/* ── Entry ──────────────────────────────────────────────── */
.entry {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(40px, 9vh, 104px) 16px 56px;
}
.hero {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.pill svg {
  width: 14px;
  height: 14px;
}
h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
}
h1.h1-small {
  font-size: clamp(28px, 3.6vw, 44px);
}
:lang(ar) h1 {
  letter-spacing: 0;
  line-height: 1.3;
  font-weight: 700;
}
.lede {
  margin: 0;
  max-width: 580px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}
:lang(ar) .lede {
  font-size: 18px;
  line-height: 1.8;
}
.lookup {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-block-start: 6px;
}
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  padding-block: 8px;
  padding-inline: 18px 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(17, 17, 18, 0.04),
    0 8px 24px -12px rgba(17, 17, 18, 0.12);
  color: #8a8a92;
}
.field:focus-within {
  border-color: var(--teal);
  box-shadow:
    0 0 0 4px rgba(0, 73, 86, 0.12),
    0 8px 24px -12px rgba(17, 17, 18, 0.14);
}
.field-error {
  border: 1.5px solid var(--red-line);
  color: var(--red);
}
.field-error:focus-within {
  border-color: var(--red-line);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12);
}
.field input {
  flex: 1 1 220px;
  min-width: 0;
  height: 44px;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
  text-align: start;
}
[dir='rtl'] .field input {
  text-align: right;
}
.field input:focus {
  outline: none;
}
.field input::placeholder {
  color: #8a8a92;
}
.cta-busy {
  display: none;
  align-items: center;
  gap: 10px;
}
.cta-idle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lookup[aria-busy='true'] .cta {
  background: #e7efef;
  color: var(--teal);
}
.lookup[aria-busy='true'] .cta-idle {
  display: none;
}
.lookup[aria-busy='true'] .cta-busy {
  display: inline-flex;
}
.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
}
.privacy {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--faint);
}
.steps {
  width: 100%;
  max-width: 1080px;
  margin-block-start: clamp(56px, 10vh, 112px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: #e8e8e5;
  border: 1px solid #e8e8e5;
  border-radius: 16px;
  overflow: hidden;
}
.step {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
}
.step .mono {
  font-size: 12px;
}
.step h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
:lang(ar) .step p {
  line-height: 1.75;
}

/* Problem panel */
.problem {
  width: 100%;
  text-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.problem-head {
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  align-items: flex-start;
}
.problem-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--subtle);
  color: var(--ink-2);
}
.problem-error .problem-icon {
  background: var(--red-soft);
  color: var(--red);
}
.problem-warn .problem-icon {
  background: var(--amber-soft);
  color: var(--amber);
}
.problem h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}
.problem p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.problem .code {
  font-size: 14px;
  color: var(--ink);
  background: var(--subtle);
  padding: 1px 6px;
  border-radius: 4px;
}
.problem-tips {
  border-block-start: 1px solid #eeeeeb;
  padding-block: 18px 22px;
  padding-inline: 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.problem-tips .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}
.problem-tips ul {
  margin: 0;
  padding-inline-start: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Checking (shown by lab.js while the lookup runs) */
.checking {
  width: 100%;
  text-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.checking-lede {
  margin: 0;
  padding: 18px 24px 4px;
  font-size: 14px;
  color: var(--muted);
}
.checking ol {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.checking li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  font-size: 15px;
  color: var(--faint);
}
.step-dot {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px dashed #b8b8b3;
}
.checking li.done {
  color: var(--ink);
}
.checking li.done .step-dot {
  border: 0;
  background: var(--teal)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.checking li.active {
  color: var(--teal);
  font-weight: 600;
  background: #f7faf9;
}
.checking li.active .step-dot {
  border: 2px solid var(--teal);
  border-inline-end-color: transparent;
  animation: spin 0.9s linear infinite;
}
.checking-bar {
  height: 3px;
  background: #eeeeeb;
}
.checking-bar span {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--teal);
  transition: width 0.6s ease;
}

@media (max-width: 560px) {
  .site-nav {
    gap: 14px;
  }
  .entry {
    padding-block-start: 32px;
  }
  .hero {
    gap: 18px;
  }
  .field {
    padding: 8px;
  }
  .field > svg {
    margin-inline-start: 6px;
  }
  .field input {
    flex: 1 1 0;
    font-size: 15px;
  }
  .field .cta {
    flex: 1 1 100%;
  }
  .lede {
    font-size: 16px;
  }
  .problem-tips {
    padding-inline: 24px;
  }
  .steps {
    margin-block-start: 40px;
  }
}

/* ── Already on React ───────────────────────────────────── */
.react-done {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) clamp(16px, 4vw, 40px) 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.react-copy {
  flex: 1 1 460px;
  min-width: 0;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.celebrate {
  position: relative;
  width: 72px;
  height: 72px;
}
.celebrate-mark {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--mint);
  color: var(--teal);
  display: grid;
  place-items: center;
  animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.bit {
  position: absolute;
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.c1 {
  inset-block-start: -14px;
  inset-inline-start: 58px;
  width: 8px;
  height: 3px;
  border-radius: 2px;
  background: var(--teal);
  rotate: -35deg;
  animation-delay: 0.15s;
}
.c2 {
  inset-block-start: 4px;
  inset-inline-start: 86px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  animation-delay: 0.2s;
}
.c3 {
  inset-block-start: 36px;
  inset-inline-start: 92px;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: #9fd9cb;
  rotate: 20deg;
  animation-delay: 0.25s;
}
.c4 {
  inset-block-start: 66px;
  inset-inline-start: 80px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: #b8b8b3;
  rotate: 30deg;
  animation-delay: 0.3s;
}
.c5 {
  inset-block-start: -18px;
  inset-inline-start: 20px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9fd9cb;
  animation-delay: 0.2s;
}
.c6 {
  inset-block-start: -8px;
  inset-inline-start: -16px;
  width: 9px;
  height: 3px;
  border-radius: 2px;
  background: #b8b8b3;
  rotate: 40deg;
  animation-delay: 0.3s;
}
@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes rise {
  from {
    translate: 0 14px;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #e8e8e5;
  border: 1px solid #e8e8e5;
  border-radius: 14px;
  overflow: hidden;
}
.facts > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  background: var(--surface);
}
.facts dt {
  font-size: 12px;
  color: var(--faint);
}
.facts dd {
  margin: 0;
}
.fact-theme {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.store-name {
  font-weight: 600;
  color: var(--ink);
}
.react-phone {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid #e1e1dd;
  font-size: 12.5px;
  color: var(--ink-2);
}
.phone {
  width: 320px;
  height: 660px;
  padding: 9px;
  background: var(--ink);
  border-radius: 48px;
  box-shadow:
    0 40px 80px -40px rgba(17, 17, 18, 0.5),
    0 0 0 1px rgba(17, 17, 18, 0.08);
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 39px;
  overflow: hidden;
  background: #fff;
}
/* A phone shows no scrollbar beside the page. The iframe is wider by the
   browser's scrollbar (--sb, from scrollbar.js; 0 with overlay scrollbars), so
   the page keeps its 390px and its scrollbar falls outside the screen: on the
   right for a left-to-right store, on the left for a right-to-left one. */
.phone-screen iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(390px + var(--sb, 0px));
  height: 790px;
  border: 0;
  transform: scale(0.7744);
  transform-origin: top left;
}
.phone-screen[data-store-dir='rtl'] iframe {
  left: calc(var(--sb, 0px) * -0.7744);
}

@media (max-width: 400px) {
  .react-done {
    gap: 32px;
  }
  .phone {
    width: 280px;
    height: 578px;
    border-radius: 42px;
  }
  .phone-screen {
    border-radius: 34px;
  }
  .phone-screen iframe {
    height: 834px;
    transform: scale(0.6718);
  }
  .phone-screen[data-store-dir='rtl'] iframe {
    left: calc(var(--sb, 0px) * -0.6718);
  }
}

/* ── Compare ────────────────────────────────────────────── */
/* One slim bar; everything else is the comparison. */
.compare-body {
  overflow: hidden;
}
.compare {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  background: var(--stage);
}
.compare:fullscreen {
  background: var(--stage);
}
.cbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  flex: none;
  padding: 0 14px;
  background: var(--surface);
  border-block-end: 1px solid var(--line);
}
.cbar .brand-name {
  font-size: 14px;
}
.cbar-store {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.store-logo {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--subtle);
}
.store-initial {
  display: grid;
  place-items: center;
  background: var(--ink-2);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.store-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 220px;
  font-size: 13px;
  line-height: 1.25;
}
.store-text > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-text .mono {
  font-size: 11.5px;
}
.cbar-themes {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-inline-start: 10px;
  border-inline-start: 1px solid var(--line);
}
.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.cbar-themes .arrow {
  font-size: 13px;
}
[dir='rtl'] .cbar-themes .arrow {
  transform: scaleX(-1);
}
.info-wrap {
  position: relative;
}
.popover {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-start: 0;
  width: min(380px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid #e1e1dd;
  border-radius: 14px;
  box-shadow:
    0 28px 56px -20px rgba(17, 17, 18, 0.3),
    0 2px 6px rgba(17, 17, 18, 0.06);
  overflow: hidden;
}
.popover[hidden] {
  display: none;
}
.popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px 12px;
  padding-inline: 18px 14px;
}
.popover-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
}
.popover-title .muted {
  font-size: 13px;
}
.popover-head p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.popover-facts {
  margin: 0;
  padding: 2px 18px 14px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
}
.popover-facts dt {
  color: var(--faint);
}
.popover-facts dd {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--teal);
}
/* The default React theme, standing in for a theme with no React edition of its own. */
.tag-default {
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  flex: none;
  border: 1px dashed var(--amber);
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.popover-facts .dd-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.popover-note {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 18px;
  background: var(--mint-soft);
  border-block-start: 1px solid #e3f1ec;
  font-size: 12.5px;
  line-height: 1.6;
  color: #1f4b45;
}
.popover-note svg {
  flex: none;
  margin-block-start: 2px;
}

/* Bar controls */
.cbar .segmented {
  padding: 2px;
  border-radius: 10px;
}
.cbar .seg {
  min-height: 34px;
  padding: 0 12px;
}
.cbar .seg.icon-only {
  width: 38px;
  padding: 0;
  justify-content: center;
}
.sides .seg[aria-pressed='true'] {
  background: var(--ink-2);
  color: #fff;
  box-shadow: none;
}
.sides .seg[data-side-button='react'][aria-pressed='true'] {
  background: var(--teal);
}
.cbar .icon-btn {
  width: 36px;
  height: 36px;
}
.sync-toggle {
  position: relative;
}
.sync-toggle[aria-checked='false'] {
  color: #b8b8b3;
}
.sync-state {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--surface);
  background: #c9c9c4;
}
.sync-toggle[data-state='on'] .sync-state {
  background: #1f9d7a;
}
.sync-toggle[data-state='waiting'] .sync-state {
  background: #e3a008;
}
.sync-toggle[data-state='off'] .sync-state {
  display: none;
}
/* Scrolling locked together (a shut padlock) or each on its own (open, greyed). */
.scroll-toggle .when-free,
.scroll-toggle[aria-checked='false'] .when-locked {
  display: none;
}
.scroll-toggle[aria-checked='false'] .when-free {
  display: block;
}
.scroll-toggle[aria-checked='false'] {
  color: #b8b8b3;
}
[data-fullscreen] .when-immersive,
.immersive [data-fullscreen] .when-normal {
  display: none;
}
.immersive [data-fullscreen] .when-immersive {
  display: block;
}

/* The ⋯ menu */
.more {
  position: relative;
}
.more > summary {
  list-style: none;
  cursor: pointer;
}
.more > summary::-webkit-details-marker {
  display: none;
}
.more[open] > summary {
  background: #e7efef;
  color: var(--teal);
}
.more-panel {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(330px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid #e1e1dd;
  border-radius: 14px;
  box-shadow:
    0 28px 56px -20px rgba(17, 17, 18, 0.3),
    0 2px 6px rgba(17, 17, 18, 0.06);
}
.more-row {
  display: flex;
  gap: 6px;
  padding-block-end: 6px;
  border-block-end: 1px solid #eeeeeb;
  margin-block-end: 2px;
}
.more-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
}
.more-link:hover {
  background: var(--subtle);
  color: var(--ink);
}
.more-link:lang(ar) {
  font-family: var(--arabic);
}
.more-link:lang(en) {
  font-family: var(--sans);
}
.path-field {
  display: flex;
  align-items: center;
  height: 36px;
  border: 1px solid #e1e1dd;
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.5px;
}
.path-field:focus-within {
  border-color: var(--teal);
}
.path-host {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px;
  color: var(--faint);
  background: #f7f7f5;
  border-right: 1px solid #ecece9;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.path-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0 8px;
  font: inherit;
  color: var(--ink);
  background: transparent;
}
.path-field input:focus {
  outline: none;
}
.path-go {
  height: 100%;
  border: 0;
  border-left: 1px solid #ecece9;
  padding: 0 12px;
  background: var(--surface);
  color: var(--teal);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* Stage: one DOM, four layouts. */
.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  /* Set from compare.js through the CSSOM: the page's CSP allows no inline style. */
  --scale: 0.74;
  --split: 50%;
  --dscale: 0.5;
  --dheight: 1600px;
}
.hint {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 760px;
  padding-block: 6px;
  padding-inline: 8px 6px;
  background: var(--surface);
  border: 1px solid #e1e1dd;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.hint strong {
  color: var(--ink);
}
.hint-icon {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--mint);
  color: var(--teal);
  display: grid;
  place-items: center;
}
.hint .icon-btn {
  width: 28px;
  height: 28px;
}
.hint[hidden],
.stage:not([data-mode='mobile']) .hint {
  display: none;
}
.canvas {
  flex: 1;
  min-height: 0;
  position: relative;
}
.split-line,
.split-handle {
  display: none;
}
.pane-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  white-space: nowrap;
  min-width: 0;
}
.pane-label strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.device {
  position: relative;
  overflow: hidden;
  background: #fff;
}
.device-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.device iframe {
  display: block;
  border: 0;
  background: #fff;
}
.frame-note {
  position: absolute;
  inset-block-end: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(17, 17, 18, 0.82);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.frame-note a {
  color: var(--mint);
}
.frame-note[hidden] {
  display: none;
}

/* Phones side by side, with the sync link between them. */
.stage[data-mode='mobile'] .canvas {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 4vw, 56px);
}
.stage[data-mode='mobile'] .pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.stage[data-mode='mobile'] .device {
  width: calc(390px * var(--scale) + 16px);
  height: calc(844px * var(--scale) + 16px);
  padding: 8px;
  background: var(--ink);
  border-radius: calc(54px * var(--scale) + 8px);
  box-shadow:
    0 30px 60px -34px rgba(17, 17, 18, 0.55),
    0 0 0 1px rgba(17, 17, 18, 0.08);
}
.stage[data-mode='mobile'] .device-screen {
  inset: 8px;
  border-radius: calc(54px * var(--scale));
  background: #fff;
}
/* A phone shows no scrollbar beside the page: the iframe is wider by the browser's
   scrollbar (--sb, scrollbar.js) and clipped on the side the store's direction puts it. */
.stage[data-mode='mobile'] .device iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(390px + var(--sb, 0px));
  height: 844px;
  transform: scale(var(--scale));
  transform-origin: top left;
}
.stage[data-mode='mobile'][data-store-dir='rtl'] .device iframe {
  left: calc(var(--sb, 0px) * var(--scale) * -1);
}
.sync-link {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 140px;
  text-align: center;
}
.stage:not([data-mode='mobile']) .sync-link {
  display: none;
}
.sync-line {
  height: 80px;
  border-inline-start: 1.5px dashed #c9c9c4;
}
.sync-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: #8a8a92;
  border: 1px solid var(--line);
}
.sync-path {
  font-size: 12px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sync-label {
  font-size: 12px;
  line-height: 1.45;
  color: var(--faint);
}
.stage[data-sync='on'] .sync-line {
  border-color: #7fb3ac;
}
.stage[data-sync='on'] .sync-dot {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* Desktops side by side: drawn 1280px wide, shrunk into their half (compare.js). */
.stage[data-mode='sbs'] .canvas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.stage[data-mode='sbs'] .pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.stage[data-mode='sbs'] .device {
  flex: 1;
  min-height: 0;
  border: 1px solid #dadad6;
  border-radius: 10px;
  box-shadow: 0 18px 36px -26px rgba(17, 17, 18, 0.35);
}
.stage[data-mode='sbs'] .device iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: var(--dheight);
  transform: scale(var(--dscale));
  transform-origin: top left;
}

/* One over the other (slider) or one at a time (Twig / React): full size in one frame. */
.stage[data-mode='slider'] .canvas,
.stage[data-mode='toggle'] .canvas {
  border: 1px solid #dadad6;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 48px -30px rgba(17, 17, 18, 0.35);
}
.stage[data-mode='slider'] .pane,
.stage[data-mode='toggle'] .pane {
  position: absolute;
  inset: 0;
}
.stage[data-mode='slider'] .device,
.stage[data-mode='toggle'] .device,
.stage[data-mode='slider'] .device iframe,
.stage[data-mode='toggle'] .device iframe {
  width: 100%;
  height: 100%;
}
.stage[data-mode='toggle'][data-side='twig'] .pane-react,
.stage[data-mode='toggle'][data-side='react'] .pane-twig {
  visibility: hidden;
}
.stage[data-mode='slider'] .pane-react {
  clip-path: inset(0 0 0 var(--split));
}
[dir='rtl'] .stage[data-mode='slider'] .pane-react {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}
/* Their labels float over the page, as small chips. */
.stage[data-mode='slider'] .pane-label,
.stage[data-mode='toggle'] .pane-label {
  position: absolute;
  z-index: 2;
  inset-block-start: 10px;
  height: 26px;
  padding: 0 9px;
  gap: 6px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}
.stage[data-mode='slider'] .pane-label .badge,
.stage[data-mode='slider'] .pane-label .muted,
.stage[data-mode='toggle'] .pane-label .badge,
.stage[data-mode='toggle'] .pane-label .muted {
  display: none;
}
.stage[data-mode='slider'] .pane-twig .pane-label,
.stage[data-mode='toggle'] .pane-twig .pane-label {
  inset-inline-start: 10px;
  background: rgba(17, 17, 18, 0.82);
}
.stage[data-mode='slider'] .pane-react .pane-label,
.stage[data-mode='toggle'] .pane-react .pane-label {
  inset-inline-end: 10px;
  background: var(--teal);
}
.stage[data-mode='toggle'] .pane-react .pane-label {
  inset-inline-end: auto;
  inset-inline-start: 10px;
}
.stage[data-mode='slider'] .pane-label .tag-default,
.stage[data-mode='toggle'] .pane-label .tag-default {
  height: 18px;
  border-color: rgba(255, 255, 255, 0.75);
  background: transparent;
  color: #fff;
}
.stage[data-mode='slider'] .split-line {
  display: block;
  position: absolute;
  z-index: 3;
  inset-block: 0;
  left: var(--split);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 17, 18, 0.22);
  pointer-events: none;
}
.stage[data-mode='slider'] .split-handle {
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 4;
  top: 50%;
  left: var(--split);
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px -6px rgba(17, 17, 18, 0.35);
  cursor: ew-resize;
  touch-action: none;
}
.stage.dragging iframe {
  pointer-events: none;
}

/* Full screen: nothing but the store. The bar waits above the top edge and slides down when
   the pointer reaches that edge (the reveal zone: an iframe keeps the pointer to itself, so a
   strip of this page sits over it), stays while it is hovered or reached by keyboard, and slides
   back up after it is left. A touch screen, which cannot hover, gets a small pull tab instead. */
.reveal-zone,
.reveal-tab {
  display: none;
}
.compare.immersive .reveal-zone {
  display: block;
  position: absolute;
  z-index: 12;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
}
.compare.immersive .cbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 14px 32px -18px rgba(17, 17, 18, 0.45);
  /* Hiding waits a moment, so a pointer that slips off the bar does not lose it. */
  transition:
    transform 0.2s ease 0.35s,
    opacity 0.2s ease 0.35s;
}
.compare.immersive .reveal-zone:hover + .cbar,
.compare.immersive .cbar:hover,
.compare.immersive .cbar:has(:focus-visible),
.compare.immersive .cbar:has(.more[open]),
.compare.immersive .cbar:has(.popover:not([hidden])),
.compare.immersive.bar-open .cbar {
  transform: none;
  opacity: 1;
  pointer-events: auto;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}
.compare.immersive .stage {
  padding: 0;
  gap: 0;
}
.compare.immersive .hint {
  display: none;
}
.compare.immersive .stage[data-mode='slider'] .canvas,
.compare.immersive .stage[data-mode='toggle'] .canvas {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* The previews' labels hide too, and come back with the bar. */
.compare.immersive .pane-label {
  opacity: 0;
  transition: opacity 0.2s ease 0.35s;
}
.compare.immersive:has(.reveal-zone:hover, .cbar:hover, .cbar :focus-visible) .pane-label,
.compare.immersive.bar-open .pane-label {
  opacity: 1;
  transition-delay: 0s;
}
@media (hover: none) {
  .compare.immersive .reveal-zone {
    display: none;
  }
  .compare.immersive .reveal-tab {
    display: grid;
    place-items: center;
    position: absolute;
    z-index: 12;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 0 0 11px 11px;
    /* Dark and see-through: it has to show on any store's header, light or dark. */
    background: rgba(17, 17, 18, 0.78);
    color: #fff;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.55),
      0 4px 12px -4px rgba(17, 17, 18, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .compare.immersive.bar-open .reveal-tab svg {
    transform: rotate(180deg);
  }
  .compare.immersive.bar-open .reveal-tab {
    top: 52px;
  }
}

/* Medium screens: the theme names give way first, then the store's address. */
@media (max-width: 1180px) {
  .cbar-themes .theme-chip,
  .cbar-themes .arrow {
    display: none;
  }
  .cbar-themes {
    padding-inline-start: 0;
    border: 0;
  }
}
@media (max-width: 960px) {
  .cbar .brand-name,
  .store-text .mono {
    display: none;
  }
  .store-text {
    max-width: 150px;
  }
  .sync-link {
    width: 96px;
  }
}

/* Phones and small tablets: no room for two previews side by side, so slider and
   Twig / React only (compare.js switches to the slider), each at the screen's own width. */
@media (max-width: 760px) {
  .cbar {
    gap: 4px;
    padding: 0 6px;
  }
  .cbar .brand-mark {
    display: none;
  }
  .store-text {
    max-width: 26vw;
  }
  .cbar .view-mobile,
  .cbar .view-sbs {
    display: none;
  }
  .cbar .seg {
    padding: 0 9px;
  }
  .cbar .icon-btn {
    width: 34px;
  }
  .stage {
    padding: 0;
    gap: 0;
  }
  .stage[data-mode='slider'] .canvas,
  .stage[data-mode='toggle'] .canvas {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
@media (max-width: 400px) {
  .cbar-store .store-text {
    display: none;
  }
}

/* ── Internal ───────────────────────────────────────────── */
.internal-main {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 32px) 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.internal h1 {
  font-size: 28px;
}
.internal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.internal-head .lede {
  font-size: 14px;
  margin-top: 6px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.filters input,
.filters select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.filters input {
  flex: 1 1 260px;
  max-width: 360px;
}
.table-box {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: start;
  font-weight: 500;
  font-size: 12px;
  color: var(--faint);
  padding: 12px 18px;
  border-block-end: 1px solid #ecece9;
}
td {
  padding: 12px 18px;
  border-block-end: 1px solid #f1f1ee;
  vertical-align: top;
}
tr:hover td {
  background: #fafaf9;
}
.num {
  text-align: end;
}
.row-note {
  display: block;
  font-size: 12px;
  color: var(--faint);
  margin-top: 3px;
}
.reason {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f1ee;
}
.reason-unreachable {
  color: var(--muted);
}
.reason-invalid {
  background: var(--amber-soft);
  color: var(--amber);
}
