/* Agent Glyphs. The page is drawn like an icon: white paper, one black line
   (1.5px, the stroke most icons here use), rounded outlined shapes. Black is
   the only accent and is kept for what is active or primary. */

:root {
  --paper: #FFFFFF;
  --ink: #0E0E10;
  --ink-2: #57575E;
  --ink-3: #8A8A92;
  --hair: #E6E6E9;
  --wash: #F5F5F6;
  --grid: #F0F0F2;
  --on-ink: #FFFFFF;
  --on-ink-2: #A6A6AE;
  --pop-shadow: 0 14px 36px -10px rgba(14, 14, 16, .22), 0 2px 6px rgba(14, 14, 16, .06);
  --line: 1.5px solid var(--ink);
  --edge: #D2D2D7;            /* outline of large cards: lighter than the ink line */
  --line-soft: 1.5px solid var(--edge);
  --font-en: "Satoshi", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Satoshi", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --gutter: 48px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E0E10; --ink: #F2F2F4; --ink-2: #A9A9B1; --ink-3: #7A7A83;
    --hair: #2A2A2F; --edge: #3A3A41; --wash: #18181B; --grid: #19191C; --on-ink: #0E0E10; --on-ink-2: #55555C;
    --pop-shadow: 0 14px 36px -10px rgba(0, 0, 0, .7), 0 0 0 1.5px #2A2A2F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E0E10; --ink: #F2F2F4; --ink-2: #A9A9B1; --ink-3: #7A7A83;
  --hair: #2A2A2F; --edge: #3A3A41; --wash: #18181B; --grid: #19191C; --on-ink: #0E0E10; --on-ink-2: #55555C;
  --pop-shadow: 0 14px 36px -10px rgba(0, 0, 0, .7), 0 0 0 1.5px #2A2A2F;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  background: var(--paper); color: var(--ink); font-family: var(--font-en);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html[lang="ar"] body { font-family: var(--font-ar); }
::selection { background: var(--ink); color: var(--on-ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
svg { display: block; }
.ui { width: 18px; height: 18px; flex: none; fill: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: var(--s4); top: -60px; z-index: 50; background: var(--ink); color: var(--on-ink); padding: var(--s2) var(--s4); border-radius: 999px; }
.skip:focus { top: var(--s3); }
code, pre, .mono { font-family: var(--mono); }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------------ shared shapes */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease;
}
.pill:active { transform: scale(.98); }
.pill.dark { background: var(--ink); color: var(--on-ink); }
.pill.dark:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.pill.out { border: var(--line); background: var(--paper); }
.pill.out:hover { background: var(--wash); }
.pill.sm { height: 40px; padding: 0 16px; font-size: 14px; }
.pill .ui { width: 16px; height: 16px; }
.pill-line { height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--hair); font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; }
.pill-line:hover, .round:hover { border-color: var(--ink); }
.round { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--hair); display: inline-grid; place-items: center; flex: none; background: var(--paper); transition: border-color .15s ease; }
.round.small { width: 36px; height: 36px; }
.round.dark { background: var(--ink); color: var(--on-ink); border-color: var(--ink); width: 44px; height: 44px; }
.muted { color: var(--ink-2); font-size: 14.5px; }

/* ------------------------------------------------------------ top bar */
.bar { display: flex; align-items: center; gap: var(--s5); height: 76px; font-size: 14.5px; font-weight: 500; }
.mark { display: flex; align-items: center; gap: 10px; font-family: var(--font-en); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.mark svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.mark .dot { fill: var(--ink); }
.nav { display: flex; gap: var(--s5); margin-inline-start: var(--s5); color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.bar-end { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }

/* ------------------------------------------------------------ hero, on the 24 px grid icons are drawn on */
.hero {
  position: relative; isolation: isolate; margin-top: var(--s2); padding: 72px 0 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: var(--s7); align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 45%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 75% at 50% 45%, #000 45%, transparent 100%);
}
h1 {
  font-family: var(--font-en); font-size: clamp(48px, 6.4vw, 92px); line-height: .92; letter-spacing: -.055em; font-weight: 700;
  text-transform: lowercase; text-wrap: balance; max-width: 9.5em;
}
html[lang="ar"] h1 { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.12; text-transform: none; font-size: clamp(44px, 5.6vw, 80px); }
.tag {
  display: inline-block; margin-top: var(--s5); transform: rotate(-4deg); transform-origin: left center;
  border: var(--line); border-radius: 12px; padding: 6px 14px; font-size: 14px; font-weight: 600; background: var(--paper);
  font-variant-numeric: tabular-nums;
}
html[dir="rtl"] .tag { transform: rotate(4deg); transform-origin: right center; }
.lede { margin-top: var(--s5); font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 48ch; }
.lede b { color: var(--ink); font-weight: 700; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s6); }

/* stacked cards: three steps an agent goes through */
.stack { position: relative; min-height: 340px; }
.card { position: absolute; inset: 0; border: var(--line-soft); border-radius: 26px; background: var(--paper); }
.card.c3 { transform: translate(-22px, 22px) rotate(-3deg); }
.card.c2 { transform: translate(-11px, 11px) rotate(-1.5deg); }
html[dir="rtl"] .card.c3 { transform: translate(22px, 22px) rotate(3deg); }
html[dir="rtl"] .card.c2 { transform: translate(11px, 11px) rotate(1.5deg); }
.card.c1 { position: relative; min-height: 340px; padding: 26px 30px 24px; display: flex; flex-direction: column; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }
.card.c1.leaving { transform: translate(-14px, 14px) rotate(-2deg); opacity: 0; }
html[dir="rtl"] .card.c1.leaving { transform: translate(14px, 14px) rotate(2deg); }
.step-head { display: flex; align-items: center; gap: var(--s3); }
.ring { width: 34px; height: 34px; flex: none; }
.ring svg { width: 34px; height: 34px; transform: rotate(-90deg); fill: none; stroke: var(--hair); stroke-width: 2.5; }
.ring .arc { stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 100.5; }
.ring.run .arc { animation: fill var(--step-ms, 5000ms) linear forwards; }
@keyframes fill { to { stroke-dashoffset: 0; } }
.step-n { font: 500 15px var(--mono); }
.step-title { color: var(--ink-2); font-size: 14.5px; font-weight: 500; }
.step-head .round { margin-inline-start: auto; }
html[dir="rtl"] #next .ui { transform: scaleX(-1); }
.step-body { margin-top: auto; padding-top: var(--s6); }
.term { font: 500 21px/1.5 var(--mono); letter-spacing: -.01em; overflow-wrap: anywhere; }
.term .say { color: var(--ink-3); }
.term.small { font-size: 15px; }
.ask-bubble { font-size: 22px; line-height: 1.45; font-weight: 500; letter-spacing: -.01em; max-width: 26ch; }
.picks { display: flex; gap: 6px; margin-top: var(--s4); }
.picks span { width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--hair); display: grid; place-items: center; }
.picks span.chosen { border: 2px solid var(--ink); background: var(--wash); }
.picks svg { width: 24px; height: 24px; }
.done { margin-top: var(--s3); font-size: 14.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.done .ui { width: 16px; height: 16px; color: var(--ink); }
.step-tabs { display: flex; gap: var(--s4); margin-top: var(--s4); font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.step-tabs button[aria-pressed="true"] { color: var(--ink); }
.step-note { margin-top: var(--s2); font-size: 13.5px; color: var(--ink-2); }
.step-note a { text-decoration: underline; text-underline-offset: 3px; }
.prompt-line { margin-top: var(--s5); font: 500 14px var(--mono); color: var(--ink); display: flex; align-items: center; gap: 6px; }
.cursor { display: inline-block; width: 9px; height: 2px; background: var(--ink); margin-top: 10px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------ browse */
.browse { padding-top: var(--s5); scroll-margin-top: var(--s4); }
.label { font-size: 30px; letter-spacing: -.03em; color: var(--ink); font-weight: 700; }
html[lang="ar"] .label { letter-spacing: 0; }
.search { margin-top: var(--s5); display: flex; align-items: center; gap: var(--s4); height: 80px; padding: 0 28px; border-radius: 999px; background: var(--wash); transition: box-shadow .15s ease; }
.search:focus-within { box-shadow: 0 0 0 1.5px var(--edge); }
.search-icon .ui { width: 24px; height: 24px; color: var(--ink-2); }
.q-wrap { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; }
/* the placeholder, drawn so its last word can change with where the visitor is */
.q-hint {
  position: absolute; inset-inline-start: 0; inset-inline-end: 0; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: clamp(24px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.03em; color: var(--ink-3);
}
html[lang="ar"] .q-hint { letter-spacing: 0; }
.q-hint[hidden] { display: none; }
.q-word { display: inline-block; color: var(--ink-2); transition: opacity .25s ease, transform .25s ease; }
.q-word.out { opacity: 0; transform: translateY(-.25em); }
#q {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 100%;
  font-size: clamp(24px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.03em; caret-color: var(--ink);
}
html[lang="ar"] #q { letter-spacing: 0; }
#q::placeholder { color: var(--ink-3); opacity: .55; }
#q::-webkit-search-cancel-button { display: none; }
.count { font-size: 15px; color: var(--ink-3); font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* filters and the command they produce share one row; the command takes the space left */
/* the command hugs its text; when the chips need the room it shrinks and ends in an ellipsis */
.filter-row { margin-top: var(--s4); display: flex; flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
.filters { flex: 0 0 auto; max-width: calc(100% - 190px); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: relative; }
.fwrap { position: relative; }
.chip {
  height: 42px; padding: 0 12px 0 16px; border-radius: 999px; border: 1.5px solid var(--hair);
  display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; white-space: nowrap; background: var(--paper);
}
html[dir="rtl"] .chip { padding: 0 16px 0 12px; }
.chip small { font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.chip:hover { border-color: var(--ink-3); }
.chip.set { outline: 1.5px solid var(--ink); outline-offset: -4.5px; }
.chip[aria-expanded="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip[aria-expanded="true"] small { color: var(--on-ink-2); }
.clear { font-size: 14.5px; font-weight: 600; color: var(--ink-2); height: 42px; padding: 0 var(--s2); }
.clear:hover { color: var(--ink); }
.clear[hidden] { display: none; }

.pop {
  position: absolute; top: calc(100% + 10px); inset-inline-start: 0; z-index: 30; background: var(--paper);
  border-radius: 18px; padding: var(--s3); min-width: 240px; box-shadow: var(--pop-shadow);
  transform-origin: top left; animation: pop .16s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop h3 { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin: 2px var(--s1) var(--s3); }
.pop .opt { display: flex; width: 100%; align-items: center; gap: var(--s3); padding: 10px 12px; border-radius: 12px; font-size: 15px; font-weight: 500; text-align: start; }
.pop .opt:hover { background: var(--wash); }
.pop .opt .n { margin-inline-start: auto; color: var(--ink-3); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pop .opt .tick { width: 16px; height: 16px; visibility: hidden; }
.pop .opt[aria-checked="true"] { font-weight: 700; }
.pop .opt[aria-checked="true"] .tick { visibility: visible; }
.pop .opt .ui:not(.tick) { color: var(--ink-2); }
.pop.cats { width: 340px; max-height: 420px; overflow: auto; }
.sws { display: grid; grid-template-columns: repeat(8, 52px); gap: var(--s1); }
.sw { display: grid; justify-items: center; gap: 6px; padding: var(--s3) 0 var(--s2); border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sw svg { width: 34px; height: 34px; color: var(--ink); }
.sw:hover { background: var(--wash); }
.sw[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
.sw[aria-checked="true"] svg { color: var(--on-ink); }
.pop .foot-row { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s2); padding: var(--s2) var(--s1) 0; font-size: 13.5px; color: var(--ink-2); }
.pop .foot-row button { font-weight: 600; color: var(--ink); }

.agent-line { flex: 0 1 auto; min-width: 0; margin-left: auto; display: flex; align-items: center; gap: var(--s2); height: 42px; padding: 0 4px 0 16px; border-radius: 999px; border: 1.5px solid var(--hair); }
.copy-cmd { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); transition: transform .12s ease; }
.copy-cmd:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.copy-cmd:active { transform: scale(.94); }
.copy-cmd .ui { width: 16px; height: 16px; }
/* the command reads left to right in both languages, so its copy button stays on the right;
   it sits at the far end of the filter row (left in Arabic, right in English) */
html[dir="rtl"] .agent-line { margin-left: 0; margin-right: auto; }
.agent-line code { flex: 0 1 auto; min-width: 0; font-size: 14px; line-height: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.agent-line .gt, .agent-line s { color: var(--ink-3); text-decoration: none; }
.agent-line .cursor { margin: 0 0 0 4px; vertical-align: -1px; }

.shell { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: var(--s7); margin-top: var(--s7); padding-bottom: var(--s8); align-items: start; }
.grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px; align-content: start; }
.tile {
  width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 20px; border: 1.5px solid var(--hair);
  color: var(--ink); transition: border-color .12s ease, background-color .12s ease;
}
.tile:hover { border-color: var(--ink-3); }
.tile[aria-current="true"] { border: 2px solid var(--ink); background: var(--wash); }
.tile .ic svg { width: 30px; height: 30px; }
.ph { display: block; width: 26px; height: 26px; border-radius: 8px; background: var(--wash); }
.empty { grid-column: 1 / -1; padding: var(--s7) 0; color: var(--ink-2); font-size: 17px; }
.more { margin: var(--s6) auto 0; display: flex; }

/* inspector: one outlined card */
.inspector { border: var(--line-soft); border-radius: 26px; padding: var(--s4); position: sticky; top: var(--s4); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sheet-handle { display: none; }
.canvas {
  position: relative; border-radius: 18px; aspect-ratio: 1.15; display: grid; place-items: center; background-color: var(--wash);
  background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 14px 14px; background-position: -1px -1px;
}
.preview { width: 46%; aspect-ratio: 1; display: grid; place-items: center; color: var(--ink); }
.preview svg { width: 100%; height: 100%; }
.canvas #download { position: absolute; top: 12px; inset-inline-end: 12px; }
.canvas .close { position: absolute; top: 12px; inset-inline-start: 12px; display: none; }
.inspector h2 { font-family: var(--font-en); font-size: 28px; letter-spacing: -.04em; line-height: 1.05; margin: 18px 4px 0; overflow-wrap: anywhere; text-align: start; }
html[dir="rtl"] .inspector h2 { text-align: right; }
.by { color: var(--ink-2); margin: 6px 4px 0; font-size: 14.5px; }
.actions { display: flex; gap: var(--s2); margin: var(--s4) 4px 0; }
.tabs { display: flex; gap: 22px; margin: 22px 4px 0; font-size: 15px; font-weight: 600; }
.tabs button { color: var(--ink-3); padding: 4px 0; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.pane { margin-top: 14px; }
.alts { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.alt { width: 100%; aspect-ratio: 1; border: 1.5px solid var(--hair); border-radius: 14px; display: grid; place-items: center; }
.alt:hover { border-color: var(--ink); }
.alt svg { width: 22px; height: 22px; }
.block + .block { margin-top: var(--s4); }
.block-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 0 4px 6px; }
.mini { display: inline-flex; gap: 4px; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--ink); height: 30px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--hair); }
.mini:hover { border-color: var(--ink); }
.mini .ui { width: 14px; height: 14px; }
.ask { background: var(--wash); border-radius: 14px; padding: var(--s3) 14px; font-size: 14.5px; line-height: 1.55; }
.code { background: var(--wash); border-radius: 14px; padding: var(--s3) 14px; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; margin: 0 4px; }
.facts dt { font-size: 13px; color: var(--ink-3); }
.facts dd { font-weight: 600; font-size: 15.5px; margin-top: 2px; }
.control { margin: 18px 4px 0; }
.c-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: var(--s2); }
.swatches { display: flex; gap: var(--s2); flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1.5px var(--hair); position: relative; display: grid; place-items: center; font-weight: 700; color: var(--ink-2); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch.custom { background: var(--paper); }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opts button { height: 34px; min-width: 44px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--hair); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.opts button[aria-checked="true"] { border: var(--line); }
input[type="range"] { width: 100%; accent-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: center; margin: 18px 4px 0; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.license-note { margin: 18px 4px 0; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.license-note strong { color: var(--ink); }
#dTerms { margin: var(--s2) 4px 0; font-size: 13.5px; }
.report { display: inline-block; margin: var(--s3) 4px var(--s1); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); }

.foot { padding: var(--s6) 0 var(--s7); color: var(--ink-2); font-size: 14px; text-align: center; white-space: nowrap; }
@media (max-width: 1000px) { .foot { white-space: normal; text-wrap: balance; } }

.scrim { position: fixed; inset: 0; background: rgba(14, 14, 16, .4); z-index: 39; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px); opacity: 0; z-index: 60; pointer-events: none;
  background: var(--ink); color: var(--on-ink); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ tablet: the inspector slides in */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 1fr; }
  .inspector {
    position: fixed; z-index: 40; top: 12px; bottom: 12px; inset-inline-end: 12px; width: min(400px, calc(100vw - 24px)); max-height: none;
    background: var(--paper); transform: translateX(110%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
  }
  html[dir="rtl"] .inspector { transform: translateX(-110%); }
  .inspector[aria-hidden="false"] { transform: none !important; visibility: visible; }
  .canvas .close { display: grid; }
  .hero { grid-template-columns: 1fr; padding: 56px 0; }
  .stack { max-width: 560px; }
}

/* ------------------------------------------------------------ phone */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .bar { height: 64px; gap: var(--s3); }
  .nav { display: none; }
  .hero { padding: 36px 0 44px; gap: 44px; }
  .hero::before { background-size: 20px 20px; }
  .lede { font-size: 16.5px; }
  .ctas .pill { flex: 1 1 auto; }
  .stack, .card.c1 { min-height: 300px; }
  .card.c1 { padding: 20px 20px 18px; }
  .card.c3 { transform: translate(-10px, 14px) rotate(-2.5deg); }
  .card.c2 { transform: translate(-5px, 7px) rotate(-1.2deg); }
  html[dir="rtl"] .card.c3 { transform: translate(10px, 14px) rotate(2.5deg); }
  html[dir="rtl"] .card.c2 { transform: translate(5px, 7px) rotate(1.2deg); }
  .term { font-size: 16px; }
  .ask-bubble { font-size: 18px; }
  .picks span { width: 44px; height: 44px; }
  .browse { padding-top: var(--s4); }
  .label { font-size: 24px; }
  .search { height: 60px; gap: var(--s3); padding: 0 20px; }
  .search-icon .ui { width: 22px; height: 22px; }
  .count { display: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
      .pop { position: fixed; inset: auto 12px 12px 12px; top: auto; min-width: 0; max-height: 70dvh; overflow: auto; }
  .pop.cats { width: auto; }
  .sws { grid-template-columns: repeat(4, 1fr); }
  .filter-row { flex-wrap: wrap; }
  .filters { max-width: none; }
  .agent-line { flex-basis: 100%; }
  .agent-line code { font-size: 12.5px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; }
  .tile { border-radius: 16px; }
  .tile .ic svg { width: 26px; height: 26px; }
  .inspector {
    inset: auto 0 0 0 !important; top: auto; width: auto; max-height: 88dvh; border-radius: 26px 26px 0 0; border-bottom: 0;
    transform: translateY(105%) !important; padding-top: var(--s2);
  }
  .inspector[aria-hidden="false"] { transform: none !important; }
  .sheet-handle { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--hair); margin: 0 auto var(--s3); }
  .canvas { aspect-ratio: 1.6; }
  .preview { width: 34%; }
}
