/*
 * The demo hub (hub.js): a quiet light frame so the demos carry the colour. One weave in the
 * hero (two rows of demos crossing, warp and weft), one madder thread for the store password's
 * stitched label. English: Readex Pro, IBM Plex Sans, IBM Plex Mono; Arabic: Alexandria.
 * Logical properties throughout, so /ar/ turns right to left by itself.
 */

:root {
  --bg: #f2f3f6;
  --surface: #ffffff;
  --surface-2: #e8eaf0;
  --ink: #14172a;
  --muted: #555b70;
  --line: #dadde5;
  --indigo: #2d3a8c;
  --indigo-hover: #23307a;
  --on-indigo: #ffffff;
  --madder: #b5452f;
  --label: #f8f5ee;
  --shadow: 0 1px 2px rgba(20, 23, 42, 0.06), 0 8px 24px rgba(20, 23, 42, 0.06);
  --error: #b42318;
  --thread: var(--madder);

  --f-display: 'Readex Pro', 'Alexandria', system-ui, sans-serif;
  --f-body: 'IBM Plex Sans', 'Alexandria', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-ar: 'Alexandria', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gap: 20px;
  color-scheme: light;
}
html[lang='ar'] {
  --f-display: 'Alexandria', 'Readex Pro', system-ui, sans-serif;
  --f-body: 'Alexandria', 'IBM Plex Sans', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #171a23;
    --surface-2: #1f2330;
    --ink: #eceef4;
    --muted: #a0a6ba;
    --line: #2b3040;
    --indigo: #8f9bff;
    --indigo-hover: #a9b2ff;
    --on-indigo: #10132a;
    --madder: #e27a62;
    --label: #1c1f2b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    --error: #ff8a7a;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
html[lang='ar'] body {
  line-height: 1.75;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--f-display);
  text-wrap: balance;
  margin: 0;
}
p {
  margin: 0;
}
[lang='ar'] {
  font-family: var(--f-ar);
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus {
  outline: none;
}
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 40;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus {
  top: 12px;
}
.i {
  flex: none;
}
[dir='rtl'] .i--flip {
  transform: scaleX(-1);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
html[lang='ar'] .eyebrow {
  letter-spacing: 0;
  font-size: 14px;
}
.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 60ch;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--indigo);
  background: var(--indigo);
  color: var(--on-indigo);
  font: 500 15px/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.btn:hover {
  background: var(--indigo-hover);
  border-color: var(--indigo-hover);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover {
  border-color: var(--ink);
}
.btn.sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
/* the favicon's tile beside the word: white in both themes, as the favicon is */
.brand__tile {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #dadde5;
  border-radius: 8px;
  background: #ffffff;
  color: #14172a;
  --thread: #b5452f;
}
.brand__mark {
  width: 22px;
  height: 22px;
}
.brand b {
  font: 600 22px/1 var(--f-display);
  letter-spacing: -0.02em;
}
.brand span[lang] {
  font: 500 15px/1 var(--f-ar);
  color: var(--muted);
}
.nav {
  display: flex;
  gap: 22px;
  margin-inline-start: 12px;
}
.nav a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
}
.top-end {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
@media (max-width: 960px) {
  .nav {
    display: none;
  }
}
@media (max-width: 420px) {
  .top .btn {
    display: none;
  }
}

/* hero */
.hero {
  padding-block: 64px 48px;
  overflow: hidden;
}
.hero__head {
  display: grid;
  justify-items: center;
  text-align: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}
.kicker i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--madder);
}
.kicker span {
  color: var(--ink);
  font-weight: 500;
}
.hero h1 {
  margin-top: 22px;
  max-width: 14ch;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.025em;
}
html[lang='ar'] .hero h1 {
  letter-spacing: 0;
  line-height: 1.25;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--indigo);
}
.hero .lead {
  margin-top: 20px;
  max-width: 54ch;
}
.hero__head .cta {
  justify-content: center;
}

/* the loom: each row holds its demos twice and moves by one set, so it loops without a seam */
.loom {
  display: grid;
  gap: var(--gap);
  margin-top: 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.loom__row {
  overflow: hidden;
}
.track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  animation: loom 110s linear infinite;
}
.track__copy {
  display: contents;
}
.loom__row.weft .track {
  animation-direction: reverse;
  animation-duration: 125s;
}
[dir='rtl'] .track {
  animation-name: loom-rtl;
}
.loom:hover .track,
.loom:focus-within .track {
  animation-play-state: paused;
}
@keyframes loom {
  to {
    transform: translateX(calc(-50% - var(--gap) / 2));
  }
}
@keyframes loom-rtl {
  to {
    transform: translateX(calc(50% + var(--gap) / 2));
  }
}
.tile {
  display: grid;
  gap: 10px;
  width: 300px;
  color: var(--ink);
  text-decoration: none;
}
.tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.tile:hover img {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.tile__cap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-inline: 2px;
  font-size: 14px;
}
.tile__cap small {
  font: 500 12px/1 var(--f-mono);
  color: var(--muted);
}
.tile__cap b {
  font: 600 15px/1.2 var(--f-display);
}
.tile__alt {
  margin-inline-start: auto;
  color: var(--muted);
}
.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 0;
  margin: 44px 0 0;
}
.facts div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-inline: 28px;
}
.facts div + div {
  border-inline-start: 1px solid var(--line);
}
.facts dt {
  font: 600 30px/1 var(--f-display);
  font-variant-numeric: tabular-nums;
}
.facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 700px) {
  :root {
    --gap: 14px;
  }
  .hero {
    padding-block: 40px 36px;
  }
  .loom {
    margin-top: 40px;
  }
  .tile {
    width: 210px;
  }
  .facts div {
    padding-inline: 16px;
  }
  .facts dt {
    font-size: 24px;
  }
  .facts dd {
    font-size: 13px;
  }
}

/* sections */
.sec {
  padding-block: 72px;
  border-top: 1px solid var(--line);
}
.sec__head {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 32px;
}
.sec h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  font-weight: 600;
}
@media (max-width: 600px) {
  .sec {
    padding-block: 52px;
  }
}

/* demos: the title beside the store password card, then a sticky niche bar */
.demos-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: end;
  margin-bottom: 32px;
}
.demos-head .sec__head {
  margin-bottom: 0;
}
.keycard {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.keycard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.keycard__t {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}
.keycard__t .i {
  color: var(--madder);
}
.keycard .pass__code {
  padding: 9px 12px;
  font-size: 16px;
}
.keycard__n {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .demos-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
.toolbar {
  position: sticky;
  top: 64px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-block: 10px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(6px);
}
.filters {
  display: flex;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar {
  display: none;
}
.filters input,
.tabs input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.seg {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}
.seg:hover {
  color: var(--ink);
}
.seg .n {
  font: 500 12px/1 var(--f-mono);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
input:checked + .seg {
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    0 1px 2px rgba(20, 23, 42, 0.08),
    0 0 0 1px var(--line);
}
input:focus-visible + .seg,
input:focus-visible + .chip {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
input:checked + .chip {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.hint {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
@media (hover: none), (max-width: 1000px) {
  .hint {
    display: none;
  }
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: var(--shadow);
}

/* the window: 4:5 of the demo's whole home page, which scrolls by while pointed at */
.shot {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  container-type: inline-size;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.shot picture {
  display: contents;
}
.shot img {
  width: 100%;
  transform: translateY(0);
  transition: transform 0.9s ease;
}
.shot img.first {
  height: 100%;
  object-fit: cover;
  object-position: top;
}
@media (hover: hover) {
  .card:hover .shot img:not(.first),
  .shot:focus-visible img:not(.first) {
    transform: translateY(calc(-100% + 125cqw));
    transition: transform 8s linear;
  }
}
@media (hover: none) {
  .shot img {
    height: 100%;
    object-fit: cover;
    object-position: top;
  }
}
.blank {
  display: grid;
  place-items: center;
  height: 100%;
  font: 600 20px/1.2 var(--f-display);
  color: var(--muted);
}
.num {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: 600 12px/1 var(--f-mono);
}
.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 0;
}
.card__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.card__title h3 {
  font-size: 21px;
  font-weight: 600;
}
.card__title span {
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
}
.card__line {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.card__group {
  margin-top: auto;
  padding-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
html[lang='ar'] .card__group {
  letter-spacing: 0;
  font-size: 13px;
}

/* the store password, on every card: a quiet row whose password is the copy button */
.pass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 18px 0;
  padding-block: 6px;
  padding-inline: 12px 6px;
  border-radius: 10px;
  background: var(--surface-2);
}
.pass__k {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}
.pass__code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 600 14px/1 var(--f-mono);
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.pass__code code {
  font: inherit;
  letter-spacing: 0.02em;
}
.pass__code .i {
  color: var(--muted);
}
.pass__code:hover {
  border-color: var(--indigo);
}
.pass__code:hover .i {
  color: var(--indigo);
}
.pass__code .ok,
.pass__code[data-state='copied'] .cp {
  display: none;
}
.pass__code[data-state='copied'] .ok {
  display: block;
  color: var(--indigo);
}
.pass__code[data-state='copied'] {
  border-color: var(--indigo);
}
.card__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px 18px 18px;
}

/* arabic: one demo, its English page with its Arabic page over the right part, split by a handle */
.ar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 28px;
}
.ar-head .sec__head {
  margin: 0;
}
.compare__panel {
  display: none;
}
.compare__panel:first-child {
  display: block;
}
@supports selector(:has(*)) {
  .compare__panel:first-child {
    display: none;
  }
}
.split {
  --pos: 50%;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.split img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.split__ar {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}
.split input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.split__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(20, 23, 42, 0.15);
  pointer-events: none;
}
.split__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #ffffff;
  color: #14172a;
  box-shadow: 0 6px 18px rgba(20, 23, 42, 0.28);
}
.split input:focus-visible + .split__line .split__knob {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}
.split__tag {
  position: absolute;
  top: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(20, 23, 42, 0.8);
  color: #ffffff;
  font-size: 13px;
  pointer-events: none;
}
.split__tag--en {
  left: 14px;
}
.split__tag--ar {
  right: 14px;
}
.points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.points div {
  padding-top: 16px;
  border-top: 2px solid var(--line);
}
.points h3 {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
}
.points p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}
@media (max-width: 900px) {
  .points {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .points {
    grid-template-columns: 1fr;
  }
  .split {
    aspect-ratio: 4 / 3;
  }
  .split__tag {
    font-size: 12px;
  }
}

/* sections of the theme */
.secs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.sc {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.sc img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
[dir='rtl'] .sc img {
  object-position: top right;
}
.sc div {
  display: grid;
  gap: 6px;
  padding: 18px;
}
.sc__from {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
html[lang='ar'] .sc__from {
  letter-spacing: 0;
  font-size: 13px;
}
.sc h3 {
  font-size: 19px;
  font-weight: 600;
}
.sc p {
  color: var(--muted);
  font-size: 15px;
}
.sc a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--indigo);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.sc a:hover {
  text-decoration: underline;
}
@media (max-width: 1000px) {
  .secs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .secs {
    grid-template-columns: 1fr;
  }
}

/* features: three drawers rising from a dotted ground, then everything else on one sheet */
.feat-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.ftc {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.ftc__media {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 240px;
  padding: 28px 28px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-color: var(--surface-2);
  background-image: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0);
  background-size: 14px 14px;
}
.ftc__media img {
  width: 72%;
  max-width: 240px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 10px 30px rgba(20, 23, 42, 0.12);
}
.ftc__body {
  display: grid;
  gap: 6px;
  padding: 20px;
}
.ftc__body h3 {
  font-size: 18px;
  font-weight: 600;
}
.ftc__body p {
  color: var(--muted);
  font-size: 15px;
}
.lists {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-block: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.lists > div {
  padding: 20px 28px;
}
.lists > div + div {
  border-inline-start: 1px solid var(--line);
}
.lists h3 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}
.lists ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lists li {
  position: relative;
  padding-block: 7px;
  padding-inline-start: 26px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.lists li::before {
  content: '';
  position: absolute;
  inset-inline-start: 2px;
  top: 14px;
  width: 10px;
  height: 5px;
  border-left: 2px solid var(--indigo);
  border-bottom: 2px solid var(--indigo);
  transform: rotate(-45deg);
}
@media (max-width: 860px) {
  .lists {
    grid-template-columns: 1fr;
  }
  .lists > div + div {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }
}

/* help */
.help {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.help h2 {
  margin-top: 12px;
}
.help .lead {
  margin-top: 12px;
  font-size: 17px;
}
.topics {
  display: grid;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topics li {
  border-bottom: 1px solid var(--line);
}
.topics li:first-child {
  border-top: 1px solid var(--line);
}
.topics a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 15px;
  text-decoration: none;
}
.topics a:hover span {
  text-decoration: underline;
}
.topics .i {
  color: var(--indigo);
}
@media (max-width: 800px) {
  .help {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px;
  }
}

/* footer */
.foot {
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.foot .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}
.foot__about {
  margin: 12px 0 8px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.foot nav a {
  text-decoration: none;
}
.foot nav a:hover {
  color: var(--ink);
}
@media (max-width: 700px) {
  .foot .wrap {
    grid-template-columns: 1fr;
  }
}

/* the user guide (docs.html): a contents list beside short chapters of numbered steps */
.doc-head {
  padding-block: 56px 40px;
  border-bottom: 1px solid var(--line);
}
.doc-head h1 {
  margin-top: 12px;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.1;
  font-weight: 600;
}
.doc-head .lead {
  margin-top: 14px;
}
.doc {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-block: 48px 72px;
}
.toc {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 20px;
}
.toc__h {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html[lang='ar'] .toc__h {
  letter-spacing: 0;
  font-size: 14px;
}
.toc ol {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.toc li a {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}
.toc li a:hover {
  color: var(--ink);
}
.toc li a span {
  font: 500 12px/1.9 var(--f-mono);
}
.ask {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}
.ask strong {
  color: var(--ink);
}
.doc__body {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.chapter {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  scroll-margin-top: 88px;
}
.chapter__n {
  color: var(--muted);
  font: 500 13px/1 var(--f-mono);
}
.chapter h2 {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 600;
}
.chapter__intro {
  margin: 8px 0 16px;
  color: var(--muted);
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  margin: 14px 0;
  padding-inline-start: 40px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--on-indigo);
  font: 600 13px/1 var(--f-mono);
}
.tips {
  margin: 18px 0 0;
  padding: 12px 16px;
  list-style: none;
  border-inline-start: 3px solid var(--madder);
  border-radius: 8px;
  background: var(--label);
  color: var(--muted);
  font-size: 14px;
}
.tips li + li {
  margin-top: 6px;
}
@media (max-width: 860px) {
  .doc {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .toc {
    position: static;
  }
  .chapter {
    padding: 20px;
  }
}

/* the support form (render.js supportForm, site.js): a form card beside what helps us answer */
.support {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
  padding-block: 48px 72px;
}
.support .icon {
  width: 18px;
  height: 18px;
}
[dir='rtl'] .icon--flip {
  transform: scaleX(-1);
}
.support__form {
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}
.field {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}
.field--wide {
  grid-column: 1 / -1;
}
.field__label {
  font-size: 14.5px;
  font-weight: 600;
}
.field__optional {
  margin-inline-start: 6px;
  color: var(--muted);
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html[lang='ar'] .field__optional {
  font: 500 13px/1 var(--f-body);
  letter-spacing: 0;
}
.field__hint {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.field__error {
  display: flex;
  gap: 8px;
  color: var(--error);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.field__error::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: currentColor;
}
.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.4 var(--f-body);
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background-color 0.15s;
}
.input::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}
.input:hover {
  border-color: var(--muted);
}
.input:focus,
.input:focus-visible {
  outline: none;
  border-color: var(--indigo);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 18%, transparent);
}
.input[aria-invalid='true'] {
  border-color: var(--error);
}
.input--area {
  min-height: 170px;
  padding-block: 12px;
  resize: vertical;
}
.input--code {
  font-family: var(--f-mono);
  font-size: 14.5px;
}
[dir='rtl'] input[dir='ltr'] {
  text-align: start;
}
.pick {
  position: relative;
}
.pick__list {
  display: grid;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.pick__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 15px;
  cursor: pointer;
}
.pick__option + .pick__option {
  border-top: 1px solid var(--line);
}
.pick__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pick__text {
  flex: 1;
}
.pick__check {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
}
.pick__check .icon {
  width: 14px;
  height: 14px;
}
.pick__option:hover,
.pick__option:has(.pick__radio:focus-visible) {
  background: var(--surface-2);
}
.pick__option:has(.pick__radio:checked) {
  font-weight: 600;
}
.pick__option:has(.pick__radio:checked) .pick__check {
  border-color: var(--indigo);
  background: var(--indigo);
  color: var(--on-indigo);
}
.pick__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: start;
  cursor: pointer;
}
.pick__value[data-empty] {
  color: var(--muted);
}
.pick__chevron {
  display: inline-grid;
  transition: transform 0.2s;
}
.pick__button[aria-expanded='true'] .pick__chevron {
  transform: rotate(180deg);
}
.js .pick__list[data-popup] {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline: 0;
  z-index: 20;
  max-height: 340px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.js .pick__list[data-popup]:not([data-open]) {
  display: none;
}
.pick[data-invalid] .pick__button,
.pick[data-invalid] .pick__list:not([data-popup]) {
  border-color: var(--error);
}
.trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.form__note {
  color: var(--muted);
  font-size: 13.5px;
}
.btn--lg {
  min-height: 48px;
  padding: 0 22px;
  font-size: 16px;
}
.btn--line {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}
.btn--line:hover {
  border-color: var(--ink);
  background: transparent;
}
.alert {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--error) 35%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--error) 8%, var(--surface));
  color: var(--error);
  font-weight: 500;
}
.alert__icon {
  display: inline-grid;
}
.done {
  display: grid;
  justify-items: start;
  gap: 14px;
}
.ok-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--on-indigo);
}
.support .ok-mark .icon {
  width: 26px;
  height: 26px;
}
.label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html[lang='ar'] .label {
  letter-spacing: 0;
  font-size: 14px;
}
.done__title {
  font: 600 clamp(28px, 3vw, 40px) / 1.2 var(--f-display);
}
.done__text {
  max-width: 34em;
  color: var(--muted);
  font-size: 17px;
  overflow-wrap: anywhere;
}
.done__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.support__aside {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}
.aside-box {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.aside-box h2 {
  font-size: 17px;
  font-weight: 600;
}
.aside-box p {
  color: var(--muted);
  font-size: 14.5px;
}
.helps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.helps h3 {
  font-size: 15px;
  font-weight: 600;
}
.helps p {
  font-size: 14px;
}
@media (max-width: 900px) {
  .support {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .support__aside {
    position: static;
  }
}
@media (max-width: 620px) {
  .support__form {
    padding: 20px;
  }
  .form__grid {
    grid-template-columns: 1fr;
  }
  .form__foot .btn {
    width: 100%;
  }
}

.toast {
  position: fixed;
  inset-inline: 0;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .track {
    animation: none;
  }
  .loom__row {
    overflow-x: auto;
  }
  .card:hover .shot img,
  .shot:focus-visible img {
    transform: none;
  }
  * {
    transition: none !important;
  }
}
