/* T · Thread: Al Sadu weaving, one continuous thread. Phone-first; logical properties throughout. */

/* ------------------------------------------------------------ tokens */
:root {
  --wool: #efe5d3;
  --wool-2: #e6d9c2;
  --wool-3: #f7f1e6;
  --ink: #1c1715;
  --ink-2: #3a302a;
  --muted: #5f4a3a;
  --madder: #a3262a;
  --madder-d: #85191d;
  --madder-l: #d0524a;
  --ochre: #c98b2b;
  --brown: #7a5c45;
  --line: rgba(28, 23, 21, .14);
  --line-2: rgba(28, 23, 21, .3);
  --f-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-text: "Karla", "Segoe UI", system-ui, sans-serif;
  --body: 17px;
  --lh: 1.6;
  --gut: clamp(18px, 4.6vw, 56px);
  --max: 1240px;
  --hdr: 60px;
  --r: 14px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --yarn-twist: repeating-linear-gradient(118deg, rgba(255,255,255,.18) 0 2px, transparent 2px 5px);
  /* room view theming */
  --rv-bg: #efe5d3;
  --rv-surface: #f7f1e6;
  --rv-text: #1c1715;
  --rv-muted: #5f4a3a;
  --rv-line: rgba(28, 23, 21, .22);
  --rv-accent: #a3262a;
  --rv-accent-text: #fbf6ee;
  --rv-radius: 12px;
  --rv-font: "Karla", system-ui, sans-serif;
  --rv-font-display: "Newsreader", Georgia, serif;
  color-scheme: light;
}
:root:lang(ar) {
  --f-display: "Kufam", "Newsreader", serif;
  --f-text: "Zain", "Karla", system-ui, sans-serif;
  --body: 18px;
  --lh: 1.75;
  --rv-font: "Zain", "Karla", system-ui, sans-serif;
  --rv-font-display: "Kufam", "Newsreader", serif;
}
@media (min-width: 960px) {
  :root { --body: 18px; --hdr: 76px; }
  :root:lang(ar) { --body: 19px; }
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 16px); background: var(--wool); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html.is-locked { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--wool); color: var(--ink);
  font: 400 var(--body)/var(--lh) var(--f-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
/* the wool: fibre noise plus a faint warp, on a fixed layer so it costs nothing to scroll */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--wool-noise), repeating-linear-gradient(90deg, rgba(122, 92, 69, .045) 0 1px, transparent 1px 4px);
  opacity: .9;
}
:lang(ar) *, :lang(ar) { letter-spacing: 0 !important; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; margin: 0; line-height: 1.08; text-wrap: balance; }
:lang(ar) :is(h1, h2, h3) { line-height: 1.35; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { width: 22px; height: 22px; flex: none; }
[dir="rtl"] .ico.dir { transform: scaleX(-1); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }
.measure { max-width: 64ch; }

.skip {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100;
  background: var(--ink); color: var(--wool); padding: 12px 18px; border-radius: 8px; min-height: 44px;
  text-decoration: none; font-weight: 700; transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px; border-radius: 10px; border: 2px solid transparent;
  font: 700 17px/1.2 var(--f-text); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .12s, box-shadow .2s;
  position: relative;
}
:lang(ar) .btn { font-size: 18px; font-weight: 700; }
.btn--primary { background: var(--madder); color: #fbf6ee; }
.btn--primary::after { /* a running stitch inside the button */
  content: ""; position: absolute; inset: 5px; border: 1.5px dashed rgba(251, 246, 238, .42); border-radius: 6px; pointer-events: none;
}
.btn--primary:hover { background: var(--madder-d); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--wool); }
.btn--light { background: var(--wool); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--outline-light { border-color: rgba(239, 229, 211, .7); color: var(--wool); }
.btn--outline-light:hover { background: var(--wool); color: var(--ink); }
.btn:active, .iconbtn:active, .add:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .ico { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn--block { width: 100%; }

.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  border: 0; background: transparent; color: var(--ink); position: relative; transition: background-color .2s, transform .12s;
}
.iconbtn:hover { background: rgba(28, 23, 21, .07); }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 14px/1.3 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--madder);
  margin-block-end: 14px;
}
.kicker::before { content: ""; width: 10px; height: 10px; background: currentColor; transform: rotate(45deg); flex: none; }
:lang(ar) .kicker { font-size: 16px; text-transform: none; }
.on-dark .kicker { color: var(--ochre); }

.h2 { font-size: clamp(36px, 8.4vw, 64px); letter-spacing: -.015em; }
.h2 em { font-style: italic; color: var(--madder); }
:lang(ar) .h2 { font-size: clamp(30px, 7vw, 52px); }
:lang(ar) .h2 em, :lang(ar) h1 em { font-style: normal; }
.lede { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-2); max-width: 60ch; margin-block-start: 16px; }
:lang(ar) .lede { font-size: clamp(19px, 2.2vw, 22px); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section__head { margin-block-end: clamp(28px, 4vw, 48px); }
.section__head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }

/* ------------------------------------------------------------ Sadu bands */
.band { height: 36px; background: var(--sadu-teeth) repeat-x; background-size: auto 36px; }
.band--eyes { height: 52px; background: var(--sadu-eyes) repeat-x; background-size: auto 52px; }
.band--tick { height: 7px; background: var(--sadu-tick) repeat-x; background-size: auto 7px; }

/* ------------------------------------------------------------ header */
.hdr {
  position: sticky; top: 0; z-index: 40; height: var(--hdr);
  background: var(--wool);
  box-shadow: 0 1px 0 var(--line);
}
.hdr::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: -5px; height: 5px; background: var(--sadu-tick) repeat-x; background-size: auto 5px; opacity: 0; transition: opacity .3s; }
.hdr.is-scrolled::after { opacity: 1; }
.hdr__in { height: 100%; display: flex; align-items: center; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; flex: none; margin-inline-end: auto; }
.logo .mark { width: 28px; height: 28px; }
.logo__word { font: 600 21px/1 "Newsreader", Georgia, serif; letter-spacing: -.01em; white-space: nowrap; }
.nav { display: none; }
@media (max-width: 380px) { .logo__word { font-size: 19px; } .logo { gap: 8px; } .hdr__in { gap: 6px; } .hdr__tools { gap: 2px; } }
.hdr__tools { display: flex; align-items: center; gap: 4px; }
.cart { position: relative; }
.cart__n {
  position: absolute; inset-block-start: 3px; inset-inline-end: 1px; min-width: 20px; height: 20px; padding-inline: 5px;
  border-radius: 10px; background: var(--madder); color: #fbf6ee; font: 700 12px/20px var(--f-text); text-align: center;
}
.cart__n.is-zero { background: var(--wool-2); color: var(--ink); }
.cart.is-bump .cart__n { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.45); } 100% { transform: none; } }
.lang { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; }
.lang button { min-width: 48px; min-height: 40px; padding: 0 12px; border: 0; background: transparent; font-weight: 700; font-size: 15px; }
.lang button[lang="ar"] { font-family: "Zain", "Karla", sans-serif; font-size: 17px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--wool); }
.lang button:not([aria-pressed="true"]):hover { background: rgba(28, 23, 21, .08); }
.hdr .lang { display: none; }

/* search: an icon + full-screen sheet on phones, an inline field with a results panel on wide screens */
.search { display: none; }
.search__bar { position: relative; display: flex; align-items: center; gap: 8px; }
.search__ico { position: absolute; inset-inline-start: 14px; color: var(--muted); pointer-events: none; display: grid; }
.search input {
  width: 100%; min-height: 48px; padding: 10px 14px; padding-inline-start: 44px;
  font-size: 17px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--wool-3); color: var(--ink);
}
.search input::placeholder { color: #7a6556; opacity: 1; }
.search input:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.search input::-webkit-search-cancel-button { display: none; }
.search__close { display: none; }
.results { margin-block-start: 12px; }
.results__count { color: var(--muted); font-size: 16px; padding-block: 6px 10px; }
.results__count strong { color: var(--ink); display: block; }
.results__list { list-style: none; display: grid; gap: 6px; }
.res {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 6px 10px; border-radius: 10px; text-decoration: none; background: var(--wool-3); border: 1px solid var(--line);
}
.res:hover { border-color: var(--madder); }
.res__art { width: 56px; height: 46px; background: var(--wool-2); border-radius: 6px; display: grid; place-items: center; }
.res__art .art { width: 52px; height: 42px; }
.res__txt { display: grid; min-width: 0; }
.res__name { font-weight: 700; line-height: 1.3; }
.res__meta { font-size: 14px; color: var(--muted); }
.res__price { font: 600 18px/1 var(--f-display); white-space: nowrap; }
html.search-open .search {
  display: block; position: fixed; inset: 0; z-index: 70; background: var(--wool);
  padding: 8px var(--gut) 24px; overflow-y: auto; overscroll-behavior: contain;
}
html.search-open .search__bar { min-height: 60px; }
html.search-open .search__close { display: inline-grid; }

@media (min-width: 1180px) {
  .nav { display: block; margin-inline-start: 8px; }
  .nav ul { display: flex; gap: 4px; list-style: none; }
  .nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none;
    font-weight: 500; font-size: 16px; position: relative;
  }
  :lang(ar) .nav a { font-size: 18px; }
  .nav a::after {
    content: ""; position: absolute; inset-inline: 12px; bottom: 8px; height: 2px; background: var(--madder);
    transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
  }
  [dir="rtl"] .nav a::after { transform-origin: right; }
  .nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
  .logo { margin-inline-end: 0; }
  .hdr__tools { margin-inline-start: auto; gap: 10px; }
  .hdr .lang { display: inline-flex; }
  .search-btn, .menu-btn { display: none; }
  .search { display: block; position: relative; width: 250px; }
  .search input { min-height: 44px; font-size: 16px; }
  .results {
    position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0; width: 420px; max-height: min(70vh, 560px); overflow: auto;
    background: var(--wool); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px 12px 12px; margin: 0;
    box-shadow: 0 24px 60px -20px rgba(28, 23, 21, .35);
  }
}

/* menu sheet */
.menu { position: fixed; inset: 0; z-index: 80; background: rgba(28, 23, 21, .4); }
.menu__panel {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: min(100%, 420px); background: var(--wool);
  display: flex; flex-direction: column; padding: 8px var(--gut) calc(24px + env(safe-area-inset-bottom)); overflow-y: auto;
  transform: translateX(100%); transition: transform .35s var(--ease);
}
[dir="rtl"] .menu__panel { transform: translateX(-100%); }
.menu.is-open .menu__panel { transform: none; }
.menu__top { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.menu nav ul { list-style: none; margin-block: 12px 28px; }
.menu nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; text-decoration: none;
  font: 500 30px/1.15 var(--f-display); border-block-end: 1px solid var(--line);
}
:lang(ar) .menu nav a { font-size: 26px; }
.menu nav a .ico { color: var(--madder); }
.menu__lang p { font-size: 15px; color: var(--muted); margin-block-end: 8px; }
.menu__lang .lang button { min-height: 48px; min-width: 72px; font-size: 17px; }
.menu__lang .lang button[lang="ar"] { font-size: 19px; }
.menu__tag { margin-block: auto 16px; padding-block-start: 32px; font: italic 400 22px/1.3 var(--f-display); color: var(--muted); }
:lang(ar) .menu__tag { font-style: normal; font-size: 20px; }
.menu .band { height: 36px; flex: none; }

/* ------------------------------------------------------------ toast */
.toast {
  position: fixed; inset-inline: 16px; inset-block-end: calc(18px + env(safe-area-inset-bottom)); z-index: 90;
  margin-inline: auto; max-width: 460px; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--wool); padding: 14px 18px; border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); font-weight: 500;
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease);
}
.toast .ico { color: var(--ochre); }
.toast.is-on { opacity: 1; transform: none; }
body.has-bar .toast { inset-block-end: calc(96px + env(safe-area-inset-bottom)); }

/* ------------------------------------------------------------ progress thread */
.pthread { position: fixed; z-index: 30; pointer-events: none; inset-block: 0; inset-inline-end: 0; width: 3px; }
.pthread__line { position: absolute; inset: 0; background: rgba(122, 92, 69, .16); }
.pthread__fill { position: absolute; inset: 0; background: var(--madder); transform-origin: top; transform: scaleY(0); }
.pthread ol { display: none; }
.pknot {
  position: fixed; z-index: 35; inset-inline-end: 12px; inset-block-end: calc(16px + env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--wool-3); color: var(--ink); box-shadow: 0 8px 24px -10px rgba(28, 23, 21, .55), 0 0 0 1px var(--line);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .3s var(--ease), visibility .25s, inset-block-end .3s var(--ease);
}
.pknot.is-shown { opacity: 1; visibility: visible; transform: none; }
.pknot svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pknot__track { fill: none; stroke: var(--line); stroke-width: 3; }
.pknot__ring { fill: none; stroke: var(--madder); stroke-width: 3; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; }
body.has-bar .pknot { opacity: 0; visibility: hidden; transform: translateY(8px); }
.psheet { position: fixed; inset: 0; z-index: 80; background: rgba(28, 23, 21, .4); display: flex; align-items: flex-end; }
.psheet__panel {
  width: 100%; max-height: 80dvh; overflow: auto; background: var(--wool); border-radius: 18px 18px 0 0;
  padding: 8px var(--gut) calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .35s var(--ease);
}
.psheet.is-open .psheet__panel { transform: none; }
.psheet__top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.psheet h2 { font-size: 24px; }
.psheet ol { list-style: none; }
.psheet a { display: flex; align-items: center; gap: 14px; min-height: 52px; text-decoration: none; border-block-end: 1px solid var(--line); font-size: 18px; }
.psheet a[aria-current] { color: var(--madder); font-weight: 700; }
.psheet__n { font: italic 500 18px/1 var(--f-display); color: var(--muted); min-width: 26px; }

@media (min-width: 1280px) {
  .pthread { inset-block: auto; top: 50%; transform: translateY(-50%); height: min(54vh, 440px); width: 28px; inset-inline-end: 18px; pointer-events: auto; }
  .pthread__line { inset-block: 0; inset-inline-start: 13px; width: 2px; inset-inline-end: auto; background: rgba(122, 92, 69, .3); }
  .pthread ol { display: block; position: absolute; inset: 0; list-style: none; }
  .pthread__knot {
    position: absolute; inset-inline-start: 0; top: calc(var(--i) * 100% / (var(--n, 2) - 1)); width: 28px; height: 28px; margin-top: -14px;
    display: grid; place-items: center; text-decoration: none; border-radius: 50%;
  }
    .pthread__dot { width: 12px; height: 12px; transform: rotate(45deg); background: var(--wool); border: 2px solid var(--brown); transition: transform .3s var(--ease), background-color .3s; }
  .pthread__knot.is-past .pthread__dot { background: var(--brown); }
  .pthread__knot.is-current .pthread__dot { background: var(--madder); border-color: var(--madder); transform: rotate(45deg) scale(1.35); }
  .pthread__knot:hover .pthread__dot { transform: rotate(45deg) scale(1.35); }
  .pthread__label {
    position: absolute; inset-inline-end: calc(100% + 6px); white-space: nowrap; font-size: 14px; font-weight: 700;
    background: var(--ink); color: var(--wool); padding: 6px 10px; border-radius: 6px;
    opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; pointer-events: none;
  }
  .pthread__knot:hover .pthread__label, .pthread__knot:focus-visible .pthread__label { opacity: 1; transform: none; }
  .pknot { display: none; }
}

/* ------------------------------------------------------------ hero */
.hero { position: relative; display: flex; flex-direction: column; min-height: calc(100svh - var(--hdr)); overflow: clip; }
.hero::before { /* a pool of warm light behind the loom */
  content: ""; position: absolute; inset-inline-end: -10%; inset-block-start: 30%; width: 90%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 249, 238, .9), rgba(255, 249, 238, 0)); pointer-events: none;
}
.hero__grid { position: relative; flex: 1; display: grid; align-content: start; gap: 6px; padding-block-start: 22px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--madder); margin-block-end: 12px; }
.hero__eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--madder); border-radius: 2px; }
.hero h1 { font-size: clamp(42px, 11vw, 96px); line-height: .98; letter-spacing: -.022em; }
.hero h1 em { display: block; font-style: italic; color: var(--madder); font-weight: 400; }
:lang(ar) .hero h1 { font-size: clamp(34px, 9vw, 72px); line-height: 1.3; }
.hero__lede { font-size: 17px; color: var(--ink-2); margin-block: 16px 22px; max-width: 34em; }
:lang(ar) .hero__lede { font-size: 18px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.ctas .btn { flex: 1 1 auto; }
.hero__stage { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 560px; margin: 4px auto 0; }
.hero__canvas { position: absolute; inset: 0; }
.hero__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; opacity: 0; transition: opacity .6s; }
.hero__stage.is-live canvas { opacity: 1; }
.hero__poster { position: absolute; inset: 0; transition: opacity .6s; }
.hero__stage.is-live .hero__poster { opacity: 0; }
.hero__counter {
  position: absolute; inset-block-start: 6px; inset-inline-start: 0; display: inline-flex; align-items: center; gap: 8px;
  font: 500 15px/1 var(--f-text); color: var(--ink-2); background: rgba(247, 241, 230, .85); padding: 9px 12px; border-radius: 999px;
  border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.hero__counter i { width: 18px; height: 4px; border-radius: 2px; background: var(--madder); display: inline-block; }
.hero__counter b { font-weight: 700; }
.hero__pause { position: absolute; inset-block-start: 0; inset-inline-end: 0; background: rgba(247, 241, 230, .85); border: 1px solid var(--line); border-radius: 50%; }
.hero__now {
  position: absolute; inset-block-end: 4%; inset-inline-start: 50%; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--wool-3); border: 1px solid var(--line-2); text-decoration: none; font-size: 15px; white-space: nowrap;
  box-shadow: 0 10px 24px -14px rgba(28, 23, 21, .5);
}
[dir="rtl"] .hero__now { transform: translateX(50%); }
.hero__now span:first-child { color: var(--muted); }
.hero__now strong { font-weight: 700; }
.hero__now:hover { border-color: var(--madder); }
@media (max-width: 420px) { .hero__now { font-size: 14px; gap: 8px; padding-inline: 14px; } .hero__now span:first-child { display: none; } }
.hero .band--eyes { position: relative; }
@media (min-width: 640px) {
  .ctas .btn { flex: 0 0 auto; }
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; align-content: center; gap: 24px; padding-block: 24px 8px; }
  .hero__copy { padding-block-end: 40px; }
  .hero__lede { font-size: 20px; margin-block: 24px 32px; }
  :lang(ar) .hero__lede { font-size: 21px; }
  .hero__stage { max-width: none; margin: 0; aspect-ratio: 1 / 1; max-height: calc(100svh - var(--hdr) - 90px); justify-self: center; width: auto; height: min(calc(100svh - var(--hdr) - 90px), 640px); }
  .hero__counter { font-size: 16px; }
}

/* ------------------------------------------------------------ the loom (how it works) */
.loom { list-style: none; position: relative; display: grid; margin-block-start: 8px; counter-reset: step; }
.loom__step { position: relative; padding: 26px 0 28px; padding-inline-start: 64px; }
.loom__warp, .loom__weft { position: absolute; display: block; border-radius: 4px; }
.loom__warp { /* horizontal on phones */
  inset-inline: 0; inset-block-start: 0; height: 4px;
  background: var(--yarn-twist), var(--brown); box-shadow: 0 0 0 3px var(--wool);
}
.loom__weft { /* vertical on phones */
  inset-block: -2px; inset-inline-start: 22px; width: 8px;
  background: repeating-linear-gradient(28deg, rgba(255,255,255,.16) 0 2px, transparent 2px 6px), var(--madder);
  transform-origin: top; transform: scaleY(var(--w, 1)); transition: transform .9s var(--ease) calc(var(--i, 0) * .22s);
}
.loom__step:nth-child(odd) .loom__weft { z-index: 2; box-shadow: 0 0 0 3px var(--wool); }
.loom__step:nth-child(even) .loom__warp { z-index: 2; }
.loom__step:last-child::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; height: 4px; border-radius: 4px; background: var(--yarn-twist), var(--brown); z-index: 2; box-shadow: 0 0 0 3px var(--wool); }
html:not(.rm) .loom[data-reveal]:not(.is-in) .loom__weft { --w: 0; }
.loom__n { display: block; font: italic 500 34px/1 var(--f-display); color: var(--madder); margin-block-end: 8px; }
:lang(ar) .loom__n { font-style: normal; font-size: 28px; }
.loom__step h3 { font-size: 26px; margin-block-end: 8px; }
:lang(ar) .loom__step h3 { font-size: 23px; }
.loom__step p { color: var(--ink-2); max-width: 36ch; }
.loom__weft { border-radius: 0; }
@media (min-width: 900px) {
  .loom__step:first-child .loom__weft { border-start-start-radius: 4px; border-end-start-radius: 4px; }
  .loom__step:last-child .loom__weft { border-start-end-radius: 4px; border-end-end-radius: 4px; }
}
@media (min-width: 900px) {
  .loom { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); padding-block: 18px; }
  .loom::before, .loom::after { /* the loom beams */
    content: ""; position: absolute; inset-inline: -10px; height: 14px; border-radius: 7px; z-index: 3;
    background: linear-gradient(180deg, rgba(255,255,255,.25), transparent 45%, rgba(0,0,0,.18)), var(--brown);
  }
  .loom::before { inset-block-start: 0; }
  .loom::after { inset-block-end: 0; }
  .loom__step { padding: 92px 28px 40px; padding-inline-start: 40px; }
  .loom__warp { inset-block: -18px; inset-inline-start: 12px; inset-inline-end: auto; width: 4px; height: auto; }
  .loom__weft {
    inset-inline: 0; inset-block-start: 44px; inset-block-end: auto; width: auto; height: 8px;
    background: repeating-linear-gradient(118deg, rgba(255,255,255,.16) 0 2px, transparent 2px 6px), var(--madder);
    transform-origin: left; transform: scaleX(var(--w, 1));
  }
  [dir="rtl"] .loom__weft { transform-origin: right; }
  .loom__weft--2 { inset-block-start: 60px; background: repeating-linear-gradient(118deg, rgba(255,255,255,.14) 0 2px, transparent 2px 6px), var(--ink); }
  .loom__step:nth-child(odd) .loom__weft--2 { z-index: 0; box-shadow: none; }
  .loom__step:nth-child(even) .loom__weft--2 { z-index: 3; box-shadow: 0 0 0 3px var(--wool); }
  .loom__step:last-child::after { inset-block: -18px; inset-inline-start: auto; inset-inline-end: 0; width: 4px; height: auto; }
  .loom__step:last-child .loom__weft { inset-inline-end: -10px; }
  .loom--6 .loom__step:nth-child(3n)::after { content: ""; position: absolute; inset-block: -18px; inset-inline-end: 0; width: 4px; border-radius: 4px; background: var(--yarn-twist), var(--brown); z-index: 2; box-shadow: 0 0 0 3px var(--wool); }
}
.loom__weft--2 { display: none; }
@media (min-width: 900px) { .loom__weft--2 { display: block; } }

/* ------------------------------------------------------------ cards */
.grid-col { display: grid; gap: 18px; list-style: none; }
@media (min-width: 640px) { .grid-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid-col { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }

/* collection: a woven Sadu border */
.ccard {
  position: relative; padding: 10px; border-radius: 6px;
  background:
    var(--sadu-edge) top left / auto 10px repeat-x,
    var(--sadu-edge) bottom left / auto 10px repeat-x,
    var(--sadu-edge-v) top left / 10px auto repeat-y,
    var(--sadu-edge-v) top right / 10px auto repeat-y,
    var(--ink);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.ccard__in { position: relative; height: 100%; background: var(--wool-3); display: grid; grid-template-columns: 112px minmax(0, 1fr); border-radius: 2px; }
.ccard__art { background: var(--wool-2); display: grid; place-items: center; position: relative; }
.ccard__art .art { width: 100%; height: auto; max-height: 150px; }
.ccard__body { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.ccard__name { font-size: 22px; line-height: 1.15; }
:lang(ar) .ccard__name { font-family: "Newsreader", Georgia, serif; font-weight: 500; }
.ccard__desc { font-size: 16px; color: var(--ink-2); line-height: 1.5; }
:lang(ar) .ccard__desc { font-size: 17px; line-height: 1.7; }
.card__foot { display: flex; align-items: center; gap: 10px; margin-block-start: auto; padding-block-start: 6px; }
.card__foot > span:first-child { margin-inline-end: auto; }
.price { font: 600 22px/1 var(--f-display); white-space: nowrap; }
:lang(ar) .price { font-family: "Newsreader", Georgia, serif; }
.mat {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px;
  font: 700 13px/1 var(--f-text); letter-spacing: .06em; border: 1.5px solid currentColor;
}
.mat--petg { color: var(--madder); }
.mat--pla { color: var(--muted); }
.add {
  position: relative; z-index: 2; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--madder);
  background: var(--wool-3); color: var(--madder); display: grid; place-items: center; transition: background-color .2s, color .2s, transform .12s;
}
.add:hover { background: var(--madder); color: #fbf6ee; }
.add.is-done { background: var(--ink); border-color: var(--ink); color: var(--wool); }
.hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.hit:focus-visible { outline: 3px solid var(--madder); outline-offset: 4px; }
@media (hover: hover) {
  .ccard:hover, .scard:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(28, 23, 21, .55); }
}
@media (min-width: 640px) {
  .ccard__in { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ccard__art { aspect-ratio: 5 / 4; }
  .ccard__art .art { width: 86%; max-height: none; }
  .ccard__body { padding: 18px 18px 16px; gap: 8px; }
  .ccard__name { font-size: 24px; }
}

/* sellers: a running-stitch border */
.scard { position: relative; background: var(--wool-3); border: 1px solid var(--line-2); border-radius: 12px; display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s; height: 100%; }
.scard::before { content: ""; position: absolute; inset: 5px; border: 1.5px dashed rgba(163, 38, 42, .5); border-radius: 8px; pointer-events: none; z-index: 0; }
.scard__art { position: relative; margin: 10px 10px 0; aspect-ratio: 5 / 4; border-radius: 6px; background: var(--wool-2); display: grid; place-items: center; overflow: hidden; }
.scard__art::after { content: ""; position: absolute; inset-inline: 14%; inset-block-end: 6%; height: 7px; background: var(--sadu-tick) repeat-x; background-size: auto 7px; opacity: .85; }
.scard__art .art { width: 88%; position: relative; z-index: 1; }
.scard__body { position: relative; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.scard__name { font-size: 21px; line-height: 1.2; }
:lang(ar) .scard__name { font-family: "Newsreader", Georgia, serif; font-weight: 500; }
.scard__by { font-size: 15px; color: var(--muted); margin-block-end: 8px; }
:lang(ar) .scard__by { font-size: 17px; }
.scard .card__foot .mat { align-self: center; }

/* rows: native scroll-snap, next card peeking */
.row { position: relative; }
.row__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 76%; gap: 14px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--brown) transparent;
  padding-inline: var(--gut); scroll-padding-inline: var(--gut); padding-block: 6px 18px;
}
.row__track > li { scroll-snap-align: start; }
.row__nav { display: none; gap: 10px; }
.row__nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; display: grid; place-items: center;
  transition: background-color .2s, color .2s, opacity .2s;
}
.row__nav button:hover:not(:disabled) { background: var(--ink); color: var(--wool); }
.row__nav button:disabled { opacity: .35; cursor: default; }
@media (min-width: 600px) { .row__track { grid-auto-columns: 44%; } }
@media (min-width: 900px) {
  .row__nav { display: flex; }
  .row__track { grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px; padding-inline: 0; scroll-padding-inline: 0; }
  .row--wrap { max-width: calc(var(--max) + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }
}

/* ------------------------------------------------------------ categories: yarn-wrapped tags */
.tags { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tag {
  position: relative; width: 100%; min-height: 60px; display: flex; align-items: center; gap: 12px; text-align: start;
  padding-block: 8px; padding-inline: 46px 16px;
  background: var(--wool-3); border: 1.5px solid var(--ink); color: var(--ink);
  border-start-start-radius: 30px; border-end-start-radius: 30px; border-start-end-radius: 8px; border-end-end-radius: 8px;
  font: 700 16px/1.25 var(--f-text); transition: background-color .2s, transform .2s var(--ease);
}
:lang(ar) .tag { font-size: 18px; }
.tag__yarn { /* the wound yarn */
  position: absolute; inset-block: 6px; inset-inline-start: 18px; width: 18px; border-radius: 4px;
  background: repeating-linear-gradient(170deg, rgba(255,255,255,.28) 0 1.5px, transparent 1.5px 4px), var(--yarn, var(--madder));
}
.tag__eye { position: absolute; inset-inline-start: 6px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; border: 2px solid var(--ink); background: var(--wool); }
.tag:hover { background: #fff; transform: translateY(-2px); }
@media (min-width: 900px) {
  .tags { display: flex; flex-wrap: wrap; gap: 14px; }
  .tag { width: auto; padding-inline-end: 24px; min-height: 64px; font-size: 18px; }
  :lang(ar) .tag { font-size: 20px; }
}

/* ------------------------------------------------------------ seller band */
.on-dark { background: var(--ink); color: var(--wool); }
.on-dark .lede { color: #e6dccb; }
.sband { position: relative; }
.sband__grid { display: grid; gap: 28px; align-items: center; }
.sband__fig { width: 100%; max-width: 520px; }
.sband__fig svg { width: 100%; height: auto; overflow: visible; }
.thread90 { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.thread90--shade { stroke: #5e1215; stroke-width: 13; transform: translate(2px, 3px); }
.thread90--main { stroke: var(--madder-l); stroke-width: 10; }
.thread90--twist { stroke: #f2b8ae; stroke-width: 10; stroke-dasharray: 1.6 5.4; opacity: .55; }
html:not(.rm) .sband__fig[data-reveal] .thread90 { stroke-dashoffset: 0; transition: stroke-dashoffset 2.8s cubic-bezier(.45, .05, .25, 1); }
html:not(.rm) .sband__fig[data-reveal]:not(.is-in) .thread90--main,
html:not(.rm) .sband__fig[data-reveal]:not(.is-in) .thread90--shade { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
html:not(.rm) .sband__fig[data-reveal]:not(.is-in) .thread90--twist { opacity: 0; }
html:not(.rm) .sband__fig[data-reveal].is-in .thread90--main,
html:not(.rm) .sband__fig[data-reveal].is-in .thread90--shade { stroke-dasharray: 1000; }
.sband__fig .thread90--twist { transition: opacity .6s 2.4s; }
.sband h2 { font-size: clamp(40px, 9vw, 76px); }
:lang(ar) .sband h2 { font-size: clamp(34px, 8vw, 60px); }
.sband .ctas { margin-block-start: 28px; }
@media (min-width: 900px) { .sband__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 56px; } }

/* ------------------------------------------------------------ trust */
.trust { list-style: none; display: grid; gap: 4px; }
.trust li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; padding-block: 16px; border-block-end: 1px solid var(--line); }
.trust__ico { width: 48px; height: 48px; display: grid; place-items: center; color: var(--madder); background: var(--wool-3); border-radius: 50%; border: 1.5px solid var(--line-2); }
.trust__ico .ico { width: 24px; height: 24px; }
.trust h3 { font-size: 21px; margin-block-end: 4px; }
:lang(ar) .trust h3 { font-size: 20px; }
.trust p { color: var(--muted); }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
@media (min-width: 1100px) {
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trust li { grid-template-columns: 1fr; border-block-end: 0; border-inline-start: 1px solid var(--line); padding: 4px 24px 8px; }
  .trust li:first-child { border-inline-start: 0; padding-inline-start: 0; }
}

/* ------------------------------------------------------------ footer */
.foot { background: var(--ink); color: var(--wool); }
.foot__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-block: 48px 32px; }
.foot__grid > div:first-child { grid-column: 1 / -1; }
.foot .logo__word { color: var(--wool); }
.foot__tag { color: #d9cdb9; margin-block: 12px 4px; max-width: 30ch; }
.foot__domain { color: var(--ochre); font-weight: 700; }
.foot h2 { font: 700 14px/1.3 var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--ochre); margin-block-end: 6px; }
:lang(ar) .foot h2 { font-size: 16px; text-transform: none; }
.foot ul { list-style: none; }
.foot li a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: #efe5d3; }
.foot li a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot__base { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 20px 28px; border-block-start: 1px solid rgba(239, 229, 211, .16); color: #d9cdb9; font-size: 15px; }
.foot__base .lang { border-color: rgba(239, 229, 211, .7); margin-inline-start: auto; }
.foot__base .lang button { color: var(--wool); min-height: 44px; }
.foot__base .lang button[aria-pressed="true"] { background: var(--wool); color: var(--ink); }
.foot :focus-visible { outline-color: var(--ochre); }
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; padding-block: 64px 40px; } .foot__grid > div:first-child { grid-column: auto; } }
body.page-product { padding-block-end: 0; }
@media (max-width: 959px) {
  body.page-product .foot { padding-block-end: calc(84px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------ product page */
.crumbs { padding-block: 6px 2px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 15px; }
.crumbs li { display: flex; align-items: center; gap: 4px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .ico { width: 16px; height: 16px; color: var(--muted); }
.crumbs [aria-current] { padding-inline: 4px; font-weight: 700; }
.pdp { display: grid; gap: 22px; padding-block: 4px 48px; }
.viewer { position: relative; }
.viewer__box {
  position: relative; aspect-ratio: 5 / 4; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 38%, #fbf6ec 0%, rgba(251, 246, 236, 0) 70%),
    repeating-linear-gradient(90deg, rgba(122, 92, 69, .06) 0 2px, transparent 2px 6px),
    var(--wool-2);
  border: 1px solid var(--line);
}
.viewer__box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; opacity: 0; transition: opacity .5s; cursor: grab; }
.viewer__box canvas:active { cursor: grabbing; }
.viewer__box.is-live canvas { opacity: 1; }
.viewer__poster { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .5s; }
.viewer__poster .art { width: 70%; height: auto; }
.viewer__box.is-live .viewer__poster { opacity: 0; }
.viewer__box:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.viewer__tools { position: absolute; inset-block-end: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
@media (min-width: 960px) { .viewer__tools { flex-direction: row; } }
.viewer__tools .iconbtn { background: rgba(247, 241, 230, .92); border: 1px solid var(--line-2); width: 44px; height: 44px; }
.viewer__tools .iconbtn:hover { background: #fff; }
.viewer__hint { display: flex; align-items: center; gap: 8px; margin-block-start: 10px; font-size: 15px; color: var(--muted); }
.viewer__hint::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: var(--madder); flex: none; }
.buy h1 { font-size: clamp(38px, 9vw, 56px); letter-spacing: -.015em; }
:lang(ar) .buy h1 { font-family: "Newsreader", Georgia, serif; font-weight: 500; line-height: 1.1; }
.buy__maker { color: var(--muted); margin-block: 6px 12px; }
.buy__price { font: 600 34px/1 var(--f-display); }
:lang(ar) .buy__price { font-family: "Newsreader", Georgia, serif; }
.buy__facts { list-style: none; display: grid; gap: 8px; margin-block: 18px; }
.buy__facts li { display: flex; align-items: center; gap: 10px; font-size: 16px; }
:lang(ar) .buy__facts li { font-size: 18px; }
.buy__facts .ico { color: var(--madder); }
.buy__facts b { font-weight: 700; }
.field { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.field legend, .field__label { font-weight: 700; margin-block-end: 10px; padding: 0; display: block; }
.field legend span { font-weight: 400; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; display: grid; place-items: center; width: 52px; height: 52px; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch__ball {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(28, 23, 21, .35);
  background: repeating-linear-gradient(160deg, rgba(255,255,255,.22) 0 2px, rgba(0,0,0,.05) 2px 5px), var(--c);
  box-shadow: inset 0 -6px 10px rgba(0,0,0,.12); transition: transform .2s var(--ease);
}
.swatch input:checked + .swatch__ball { box-shadow: 0 0 0 3px var(--wool), 0 0 0 5.5px var(--madder), inset 0 -6px 10px rgba(0,0,0,.12); transform: scale(.9); }
.swatch input:focus-visible + .swatch__ball { outline: 3px solid var(--ink); outline-offset: 7px; }
.swatch:hover .swatch__ball { transform: scale(.95); }
.buy__row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 10px; height: 52px; }
.qty button { width: 48px; height: 48px; border: 0; background: transparent; display: grid; place-items: center; border-radius: 8px; }
.qty button:hover { background: rgba(28, 23, 21, .07); }
.qty input { width: 48px; height: 48px; border: 0; background: transparent; text-align: center; font-size: 18px; font-weight: 700; -moz-appearance: textfield; }
.qty input:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.buy__row .btn--primary { flex: 1 1 180px; }
.buy__room { margin-block-start: 12px; }
.buy__note { font-size: 15px; color: var(--muted); margin-block-start: 8px; text-align: center; }
.details { display: grid; gap: 28px; padding-block: 8px 24px; }
.details h2 { font-size: 26px; margin-block-end: 10px; }
.details p { color: var(--ink-2); max-width: 60ch; }
.specs { display: grid; grid-template-columns: auto 1fr; margin: 0; border-block-start: 1px solid var(--line-2); }
.specs dt, .specs dd { margin: 0; padding-block: 12px; border-block-end: 1px solid var(--line); }
.specs dt { color: var(--muted); padding-inline-end: 24px; }
.specs dd { font-weight: 700; }
@media (min-width: 960px) {
  .pdp { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; padding-block: 8px 72px; }
  .viewer { position: sticky; top: calc(var(--hdr) + 16px); }
  .viewer__box { aspect-ratio: 1 / 1; max-height: calc(100svh - var(--hdr) - 80px); width: 100%; }
  .buy { padding-block-start: 12px; }
  .details { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .details .specs-wrap { grid-column: 1 / -1; max-width: 720px; }
}
/* sticky buy bar (phones and tablets) */
.buybar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 45;
  background: var(--wool-3); box-shadow: 0 -12px 30px -18px rgba(28, 23, 21, .5);
  padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  transform: translateY(110%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
}
.buybar::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: -5px; height: 5px; background: var(--sadu-tick) repeat-x; background-size: auto 5px; }
.buybar.is-shown { transform: none; visibility: visible; }
.buybar__price { font: 600 22px/1.1 var(--f-display); margin-inline-end: auto; }
.buybar__price small { display: block; font: 400 13px/1.2 var(--f-text); color: var(--muted); }
:lang(ar) .buybar__price small { font-size: 15px; }
.buybar .iconbtn { border: 1.5px solid var(--ink); width: 52px; height: 52px; }
.buybar .btn { min-height: 52px; padding-inline: 20px; }
@media (min-width: 960px) { .buybar { display: none; } }

/* ------------------------------------------------------------ sell page */
.shero { padding-block: 28px 56px; }
.shero__grid { display: grid; gap: 28px; align-items: center; }
.shero h1 { font-size: clamp(40px, 10vw, 76px); line-height: 1; letter-spacing: -.02em; }
.shero h1 em { display: block; font-style: italic; color: var(--madder); font-weight: 400; }
:lang(ar) .shero h1 { font-size: clamp(32px, 8vw, 64px); line-height: 1.3; }
.shero .ctas { margin-block-start: 26px; }
.shero__fig svg { width: 100%; height: auto; }
@media (min-width: 960px) { .shero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; } .shero { padding-block: 56px 72px; } }

.calc { display: grid; gap: 22px; align-items: start; }
.calc__side { display: grid; gap: 28px; }
.calc__card { background: var(--wool-3); border: 1px solid var(--line-2); border-radius: 18px; padding: 20px; }
.calc__rates { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); background: var(--wool-2); border-radius: 999px; padding: 6px 12px; margin-block-end: 18px; }
.calc__rates::before { content: ""; width: 8px; height: 8px; background: var(--ochre); transform: rotate(45deg); }
:lang(ar) .calc__rates { font-size: 16px; }
.drop {
  border: 2px dashed var(--brown); border-radius: 14px; padding: 14px 16px; margin-block-end: 12px; text-align: center;
  background: repeating-linear-gradient(90deg, rgba(122, 92, 69, .05) 0 2px, transparent 2px 6px);
}
.drop__t { font: 600 20px/1.2 var(--f-display); display: flex; align-items: center; justify-content: center; gap: 10px; }
.drop__t .ico { color: var(--madder); }
.drop__s { font-size: 15px; color: var(--muted); }
.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt__box {
  display: flex; flex-direction: column; gap: 2px; min-height: 64px; height: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line-2); background: var(--wool); transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.opt__box b { font-weight: 700; line-height: 1.25; }
.opt__box small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
:lang(ar) .opt__box small { font-size: 14px; }
.opt input:checked + .opt__box { border-color: var(--madder); background: #fff; box-shadow: inset 0 0 0 1.5px var(--madder); }
.opt input:checked + .opt__box b::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--madder); transform: rotate(45deg); margin-inline-end: 8px; vertical-align: middle; }
.opt input:focus-visible + .opt__box { outline: 3px solid var(--ink); outline-offset: 2px; }
.opt:hover .opt__box { border-color: var(--ink); }
.est { margin-block: 14px 22px; padding: 12px 14px; border-radius: 10px; background: var(--wool-2); font-size: 16px; color: var(--ink-2); border-inline-start: 4px solid var(--madder); }
:lang(ar) .est { font-size: 17px; }
.mats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mats .opt__box { min-height: 72px; }
.mats .opt__box b { font: 600 22px/1.1 var(--f-display); }
.guide-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--madder); font-weight: 700; margin-block: 4px 14px; }
.price-in { position: relative; display: flex; align-items: center; }
.price-in__cur { position: absolute; inset-inline-start: 16px; font-weight: 700; color: var(--muted); pointer-events: none; }
.price-in input {
  width: 100%; min-height: 56px; padding: 10px 16px; padding-inline-start: 64px; font-size: 22px; font-weight: 700;
  border: 2px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink);
}
.price-in input[aria-invalid="true"] { border-color: var(--madder); border-style: dashed; border-width: 3px; }
.hint { font-size: 15px; color: var(--muted); margin-block-start: 8px; }
.err { display: flex; align-items: flex-start; gap: 10px; margin-block-start: 10px; color: var(--madder); font-weight: 700; }
.err:empty { display: none; }
.err .ico { flex: none; width: 22px; height: 22px; margin-block-start: 1px; }
.res-card { background: var(--ink); color: var(--wool); border-radius: 18px; padding: 22px; position: relative; overflow: hidden; }
.res-card::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 10px; background: var(--sadu-edge) repeat-x; background-size: auto 10px; }
.res-earn { padding-block: 10px 16px; border-block-end: 1px solid rgba(239, 229, 211, .2); }
.res-earn__l { color: #e6dccb; font-weight: 700; }
.res-earn__v { font: 500 clamp(44px, 10vw, 64px)/1 "Newsreader", Georgia, serif; color: #fff; margin-block: 6px 4px; font-variant-numeric: tabular-nums; }
.res-earn__s { color: #d9cdb9; font-size: 15px; }
.res-earn.is-error .res-earn__v { color: #f0b3aa; }
.res-rows { display: grid; grid-template-columns: 1fr auto; margin: 10px 0 0; }
.res-rows dt, .res-rows dd { margin: 0; padding-block: 10px; border-block-end: 1px solid rgba(239, 229, 211, .14); }
.res-rows dt { color: #e6dccb; }
.res-rows dd { font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
.res-rows dt small { display: block; color: #cbbfa9; font-size: 14px; }
:lang(ar) .res-rows dt small { font-size: 15px; }
.breakdown { margin-block-start: 14px; }
.breakdown summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--ochre); list-style: none; }
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary::before { content: ""; width: 8px; height: 8px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
[dir="rtl"] .breakdown summary::before { transform: rotate(45deg); }
.breakdown[open] summary::before { transform: rotate(45deg); }
[dir="rtl"] .breakdown[open] summary::before { transform: rotate(-45deg); }
.breakdown dl { display: grid; grid-template-columns: 1fr auto; font-size: 15px; margin: 4px 0 0; }
.breakdown dt, .breakdown dd { margin: 0; padding-block: 6px; color: #e6dccb; }
.breakdown dd { text-align: end; font-variant-numeric: tabular-nums; }
.breakdown .tot { color: #fff; font-weight: 700; border-block-start: 1px solid rgba(239, 229, 211, .3); }
.estnote { border-inline-start: 4px solid var(--ochre); padding: 4px 0; padding-inline-start: 18px; }
.estnote h3 { font-size: 22px; margin-block-end: 8px; }
.estnote p { color: var(--ink-2); }
.strip {
  position: sticky; inset-block-end: 0; z-index: 20; margin-inline: calc(-1 * var(--gut));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: var(--wool); padding: 12px var(--gut) calc(12px + env(safe-area-inset-bottom));
  font-variant-numeric: tabular-nums;
}
.strip__item { display: grid; line-height: 1.2; }
.strip__item span { font-size: 13px; color: #d9cdb9; }
:lang(ar) .strip__item span { font-size: 15px; }
.strip__item b { font: 600 21px/1.1 "Newsreader", Georgia, serif; }
.strip.is-error .strip__earn b { color: #f0b3aa; font-family: var(--f-text); font-size: 17px; }
@media (min-width: 960px) {
  .calc { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; }
  .calc__side { position: sticky; top: calc(var(--hdr) + 20px); grid-column: 2; grid-row: 1 / span 2; }
  .calc .estnote { grid-column: 1; }
  .calc__card { padding: 28px; }
  .strip { display: none; }
}

/* material guide */
.mg { width: 100%; border-collapse: collapse; margin-block-start: 8px; }
.mg caption { text-align: start; }
.mg thead th { padding: 0 0 14px; vertical-align: bottom; text-align: start; }
.mg__head { display: flex; align-items: center; gap: 12px; }
.mg__head b { font: 600 30px/1 var(--f-display); }
.mg__head small { display: block; font-size: 14px; color: var(--muted); font-weight: 400; margin-block-start: 4px; }
:lang(ar) .mg__head small { font-size: 16px; }
.mg__spool { width: 40px; height: 40px; flex: none; }
.mg tbody th { text-align: start; font-weight: 700; color: var(--madder); font-size: 15px; padding: 16px 0 6px; }
:lang(ar) .mg tbody th { font-size: 17px; }
.mg td { vertical-align: top; padding: 4px 0 16px; font-size: 16px; border-block-end: 1px solid var(--line); }
:lang(ar) .mg td { font-size: 17px; }
.mg td + td { padding-inline-start: 16px; }
.mg .corner { width: 0; padding: 0; }
@media (max-width: 759px) {
  .mg, .mg tbody { display: block; }
  .mg thead { display: block; position: sticky; top: var(--hdr); z-index: 5; background: var(--wool); }
  .mg thead tr, .mg tbody tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .mg thead th { padding-block: 10px; }
  .mg .corner { display: none; }
  .mg tbody th { grid-column: 1 / -1; }
  .mg td + td { padding-inline-start: 0; }
}
@media (min-width: 760px) {
  .mg { table-layout: fixed; }
  .mg .corner { width: 24%; }
  .mg tbody th { padding: 16px 16px 16px 0; padding-inline: 0 16px; border-block-end: 1px solid var(--line); vertical-align: top; }
  .mg td { padding: 16px 0; font-size: 17px; }
  .mg td + td { padding-inline-start: 24px; }
  .mg td:nth-child(2) { padding-inline-end: 24px; }
  .mg thead th:last-child, .mg td:last-child { background: rgba(163, 38, 42, .05); padding-inline: 20px; }
}
.notes { display: grid; gap: 14px; margin-block-start: 28px; }
.note { display: flex; gap: 14px; padding: 16px 18px; border-radius: 12px; background: var(--wool-3); border: 1px solid var(--line-2); }
.note .ico { color: var(--madder); margin-block-start: 2px; }
.note b { font-weight: 700; }
@media (min-width: 900px) { .notes { grid-template-columns: 1fr 1fr; } }

/* rules */
.rules { display: grid; gap: 28px; }
.banned { list-style: none; display: grid; gap: 10px; }
.banned li { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 16px; border-radius: 12px; background: var(--wool-3); border: 1px solid var(--line-2); font-weight: 700; }
.banned .ico { color: var(--madder); width: 26px; height: 26px; }
.banned-title { font-size: 22px; margin-block-end: 12px; }
@media (min-width: 900px) { .rules { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }
.scta { text-align: center; }
.scta h2 { font-size: clamp(34px, 7vw, 60px); }
.scta p { margin-block: 12px 26px; color: #e6dccb; }
.scta .ctas { justify-content: center; }
.scta__note { font-size: 15px; color: #cbbfa9; margin-block-start: 14px !important; }

/* Arabic never gets a synthesized slant: the accent line keeps its colour, upright */
:lang(ar) :is(.hero, .shero) h1 em, :lang(ar) .h2 em { font-style: normal; font-weight: 500; }
:lang(ar) .loom__n, :lang(ar) .psheet__n { font-style: normal; }

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
html.rm *, html.rm *::before, html.rm *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
