/* «مساعد تيند»: three landing sections (2026-11-09, from the approved options artifact v4).
   1 the dialogue: six abilities as auto-advancing tabs (7 s, pauses under the pointer) with a
     typed chat mock, and the assistant's face walking and hopping around the heading's rim,
     never over the words; 2 beams from six areas into the Tind mark, the peak lifting in time
     with the pulses, four trust facts; 3 «تيند يتحسّن بكم»: a request travels four stations and
     joins the list of what shipped. Every rule is scoped under .asst; keyframes carry as-.
   Reduced motion and the site's motion switch leave everything visible and still. */
.asst {
  --agent-bg: var(--navy); --agent-eye: #fffdf9; --mark-ink: var(--navy); --mark-peak: var(--navy);
  --fast: var(--duration-fast); --base: var(--duration-base); --slow: var(--duration-base); --exit: 190ms; --stagger: 30ms;
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1); --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .asst { --agent-bg: var(--accent); --agent-eye: #0b1019; --mark-ink: var(--cream); --mark-peak: var(--sky); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .asst { --agent-bg: var(--accent); --agent-eye: #0b1019; --mark-ink: var(--cream); --mark-peak: var(--sky); }
}
.asst h2, .asst h3, .asst h4, .asst p, .asst ul, .asst ol, .asst dl { margin: 0; }
.asst ul, .asst ol { padding: 0; list-style: none; }
.asst h2 { font-size: clamp(30px, 3.5vw, 46px); font-weight: 500; line-height: 1.45; text-wrap: balance; }
.asst h3 { font-size: 20px; font-weight: 500; line-height: 1.5; }
.asst button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.asst svg { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.asst .label { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--accent); font-size: 14px; font-weight: 500; }
.asst .label .soon { padding: 1px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; }
.asst .heading { display: grid; gap: 12px; max-width: 640px; margin-block-end: clamp(28px, 4vw, 40px); }
.asst .heading p { color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); max-width: 52ch; margin: 0; }
.asst .center { justify-items: center; text-align: center; margin-inline: auto; }

/* agent face (agent.js on the landing, the same character) */
.asst .face { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 40px; height: 40px; border-radius: 13px; background: var(--agent-bg); box-shadow: 0 6px 16px -6px var(--agent-bg); flex: none; }
.asst .face i { display: block; width: 6px; height: 9px; border-radius: 3px; background: var(--agent-eye); translate: calc(var(--look-x, 0) * 2px) calc(var(--look-y, 0) * 1px); transition: translate var(--slow) var(--ease); }
.asst .face.sm { width: 28px; height: 28px; border-radius: 9px; gap: 5px; }
.asst .face.sm i { width: 4px; height: 6px; border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) { .face i { animation: as-blink 5s ease-in-out infinite; } }
@keyframes as-blink { 0%, 46%, 50%, 100% { scale: 1 1; } 48% { scale: 1 0.1; } }

/* the heading the face wanders around: a stage with room on every side, the face on the rim, never over the text */
.asst .stage { position: relative; width: min(760px, 100%); margin-inline: auto; padding: 0 64px 8px; }
/* the section before already gives 100px; these three keep the air tight (Linear-like 64/80) */
.asst.section#assistant { padding-block: 0 80px; }
.asst.section#assistant-limits { padding-block: 80px; }
.asst.section#built-with-you { padding-block: 80px; }
.asst .stage .heading { gap: 8px; }
.asst .tabs { margin-block-start: 8px; }
.asst .stage .heading { margin-block-end: 0; }
.asst .wander { position: absolute; left: 0; top: 0; width: 40px; height: 40px; translate: var(--tx, 0px) var(--ty, 0px); transition: translate var(--dur, 1.2s) var(--ease-in-out); will-change: translate; }
.asst .wander .face { display: flex; transform-origin: 50% 100%; }
.asst .wander.hop .face { animation: as-hop 520ms var(--ease-in-out); }
@keyframes as-hop {
  0% { translate: 0 0; scale: 1 1; }
  14% { translate: 0 0; scale: 1.08 0.9; }
  50% { translate: 0 -18px; scale: 0.96 1.06; }
  86% { translate: 0 0; scale: 1.06 0.94; }
  100% { translate: 0 0; scale: 1 1; }
}
@media (max-width: 560px) { .stage { padding: 52px 48px; } }

/* mock: the assistant panel */
.asst .mock { position: relative; display: grid; gap: 12px; width: 100%; max-width: 420px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.7; }
.asst .mock-head { display: flex; align-items: center; gap: 10px; padding-block-end: 10px; border-block-end: 1px solid var(--line); }
.asst .bubble { max-width: 88%; padding: 8px 14px; border-radius: 16px; }
.asst .bubble.me { justify-self: start; background: var(--surface-2); border-end-end-radius: 4px; }
.asst .bubble.me .caret { display: inline-block; width: 1px; height: 1em; margin-inline-start: 1px; background: var(--ink); vertical-align: -2px; animation: as-caret 1s steps(1) infinite; }
@keyframes as-caret { 50% { opacity: 0; } }
.asst .reply { display: grid; gap: 10px; }
.asst .rows { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.asst .row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; font-size: 13.5px; }
.asst .row + .row { border-block-start: 1px solid var(--line); }
.asst .row .t { color: var(--muted); }
.asst .row .pill { padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.asst .row .pill.warn { background: var(--warning-bg); color: var(--warning); }
.asst .kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 13.5px; }
.asst .kv dt { color: var(--muted); }
.asst .kv dd { margin: 0; }
.asst .card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.asst .card h4 { font-size: 14px; font-weight: 500; margin-block-end: 4px; }
.asst .draft { white-space: pre-line; font-size: 13.5px; line-height: 1.8; }
.asst .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.asst .chip { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--muted); }
.asst .chip.on { border-color: var(--accent); color: var(--accent); }
.asst .steps { display: grid; gap: 6px; counter-reset: s; }
.asst .steps li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; }
.asst .steps li::before { counter-increment: s; content: counter(s, arabic-indic); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); font-size: 12px; }
.asst .steps b { font-weight: 500; }
.asst .steps small { display: block; color: var(--muted); }
.asst .actions { display: flex; align-items: center; gap: 8px; }
.asst .btn { padding: 6px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 500; border: 1px solid var(--line); background: var(--surface); }
.asst .btn.primary { background: var(--action); color: var(--on-action); border-color: var(--action); }
.asst .quiet { color: var(--muted); font-size: 12.5px; }
.asst .actions .quiet { margin-inline-start: auto; }
.asst .file { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; }
.asst .composer { display: flex; align-items: center; gap: 8px; margin-block-start: 4px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--muted); font-size: 13.5px; }
.asst .composer .send { margin-inline-start: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--action); color: var(--on-action); }
.asst .composer .send svg { width: 14px; height: 14px; }
.asst .wave { display: flex; align-items: center; gap: 3px; height: 32px; flex: 1; }
.asst .wave i { display: block; width: 3px; height: 30%; border-radius: 2px; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .wave i { animation: as-wave 1.2s ease-in-out infinite; animation-delay: calc(var(--i) * 60ms); } }
@keyframes as-wave { 0%, 100% { height: 25%; } 50% { height: 90%; } }
.asst .settle > * { opacity: 0; translate: 0 6px; }
.asst .mock.is-live .settle > * { animation: as-settle var(--slow) var(--ease) forwards; animation-delay: calc(var(--typed, 0ms) + var(--k, 0) * var(--stagger) + 200ms); }
@keyframes as-settle { to { opacity: 1; translate: 0 0; } }

/* facts under an ability */
.asst .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.asst .facts div { display: grid; gap: 2px; }
.asst .facts svg { width: 22px; height: 22px; color: var(--accent); margin-block-end: 6px; }
.asst .facts b { font-weight: 500; font-size: 16px; }
.asst .facts span { color: var(--muted); font-size: 14.5px; }
.asst .ability-title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 500; line-height: 1.45; text-wrap: balance; }

/* section 1: tabs + stage (21st: Feature Tab Switcher, Transition Panel) */
.asst .tabs { position: relative; display: flex; gap: 4px; padding: 4px; margin-block-end: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow-x: auto; scrollbar-width: none; }
.asst .tabs::-webkit-scrollbar { display: none; }
.asst .tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; flex: 1 0 auto; justify-content: center; padding: 10px 16px; border-radius: 12px; white-space: nowrap; font-size: 15px; font-weight: 500; color: var(--muted); transition: color var(--base) var(--ease); }
.asst .tabs button svg { width: 18px; height: 18px; }
.asst .tabs button[aria-selected="true"] { color: var(--ink); }
.asst .knob { position: absolute; top: 4px; bottom: 4px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line); transition: inset-inline-start var(--base) var(--ease-in-out), width var(--base) var(--ease-in-out); }
.asst .progress { position: absolute; bottom: 4px; height: 2px; border-radius: 1px; background: var(--accent); transform-origin: right; scale: 0 1; }
.asst .tabs.auto .progress { animation: as-progress 7s linear forwards; }
.asst .tabs.auto.paused .progress { animation-play-state: paused; }
@keyframes as-progress { to { scale: 1 1; } }
.asst .o1-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: var(--bg-alt); overflow: hidden; }
.asst .o1-copy { display: grid; gap: 28px; }
.asst .o1-copy .lead { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 14px; font-weight: 500; }
.asst .o1-visual { display: grid; place-items: center; min-height: 420px; padding: 24px; border-radius: 20px; background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--sky) 38%, transparent), transparent 70%), repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--line) 60%, transparent) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in srgb, var(--line) 60%, transparent) 23px 24px); }
.asst .swap { animation: as-panel-in var(--slow) var(--ease) both; }
@keyframes as-panel-in { from { opacity: 0; translate: 0 8px; } }

/* section 2: beams into the mark (21st: Animated Beam / Pulse Beams) */
.asst .hub { position: relative; width: min(960px, 100%); height: clamp(260px, 36vw, 380px); margin-inline: auto; }
.asst .hub svg.beams { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.asst .hub svg.beams path { fill: none; stroke-width: 1.5; }
.asst .hub path.base { stroke: var(--line); }
.asst .hub path.pulse { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 0.18 1; stroke-dashoffset: 1.18; animation: as-pulse 2.6s var(--ease-in-out) infinite; animation-delay: calc(var(--k) * 430ms); }
@keyframes as-pulse { 0% { stroke-dashoffset: 1.18; opacity: 0; } 8% { opacity: 1; } 70%, 100% { stroke-dashoffset: -0.18; opacity: 1; } }
.asst .hub-chip { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 15px; font-weight: 500; white-space: nowrap; }
.asst .mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: clamp(200px, 26vw, 280px); padding: 26px 32px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.asst .mark svg.wordmark { width: 100%; height: auto; overflow: visible; direction: ltr; }
.asst .wordmark .letters { fill: var(--mark-ink); }
.asst .wordmark .peak { fill: var(--mark-peak); transform-box: fill-box; transform-origin: 50% 100%; animation: as-peak 2.6s var(--ease-in-out) infinite; }
@keyframes as-peak { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.asst .trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-block-start: clamp(40px, 6vw, 72px); padding-block-start: 32px; border-block-start: 1px solid var(--line); }
.asst .trust div { display: grid; gap: 4px; }
.asst .trust svg { width: 22px; height: 22px; color: var(--accent); margin-block-end: 8px; }
.asst .trust b { font-weight: 500; font-size: 17px; }
.asst .trust span { color: var(--muted); font-size: 14.5px; }

/* section 3: built with you. A request travels four stations, then joins the list of what already shipped. */
.asst .build { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.asst .track { position: relative; display: grid; gap: 28px; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.asst .stations { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.asst .stations::before { content: ""; position: absolute; top: 11px; inset-inline: 12.5%; height: 1px; background: var(--line); }
.asst .stations li { display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--muted); font-size: 14px; }
.asst .stations .dot { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: border-color var(--base) var(--ease); }
.asst .stations .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); scale: 0; transition: scale var(--base) var(--ease); }
.asst .stations li.on .dot { border-color: var(--accent); }
.asst .stations li.on .dot::after { scale: 1; }
.asst .stations li.on { color: var(--ink); }
.asst .lane { position: relative; height: 112px; }
.asst .ticket { position: absolute; top: 0; left: 0; width: min(260px, 100%); display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); translate: var(--tx, 0px) 0; transition: translate 620ms var(--ease-in-out), opacity var(--slow) var(--ease); }
.asst .ticket.enter { opacity: 0; translate: var(--tx, 0px) 8px; transition: none; }
.asst .ticket.leave { opacity: 0; transition: opacity var(--exit) var(--ease-exit); }
.asst .ticket .from { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.asst .ticket .kind { padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.asst .ticket q { quotes: "«" "»"; font-size: 14.5px; line-height: 1.6; }
.asst .ticket .became { display: none; align-items: center; gap: 6px; color: var(--success); font-size: 13px; }
.asst .ticket.done .became { display: flex; }
.asst .ticket.done q { color: var(--muted); }
.asst .ticket .became svg { width: 16px; height: 16px; }
.asst .shipped { display: grid; gap: 2px; }
.asst .shipped h3 { display: flex; align-items: center; gap: 10px; margin-block-end: 10px; font-size: 16px; color: var(--muted); font-weight: 500; }
.asst .shipped li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; border-block-start: 1px solid var(--line); font-size: 15px; }
.asst .shipped li:last-child { border-block-end: 1px solid var(--line); }
.asst .shipped li svg { width: 18px; height: 18px; color: var(--success); }
.asst .shipped li small { color: var(--muted); font-size: 13px; }
.asst .shipped li.new { animation: as-settle var(--slow) var(--ease) both; }
.asst .sources { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 20px; }
.asst .sources span { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; color: var(--muted); transition: color var(--base) var(--ease), border-color var(--base) var(--ease), background var(--base) var(--ease); }
.asst .sources span.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.asst .cta { display: flex; align-items: center; gap: 16px; margin-block-start: 28px; }
.asst .cta-link { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border-radius: 12px; background: var(--action); color: var(--on-action); font-weight: 500; text-decoration: none; }
.asst .cta .quiet { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .asst .settle > * { opacity: 1; translate: none; } .asst .bubble.me .caret { display: none; }
  .asst .tabs.auto .progress { animation: none; } .asst .swap { animation: none !important; }
  .asst .wander { transition: none; } .asst .wander.hop .face { animation: none; }
  .asst .hub path.pulse { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; opacity: 0.5; }
  .asst .wordmark .peak { animation: as-peak-still 2s ease-in-out infinite; }
  .asst .ticket { transition: none; } .asst .shipped li.new { animation: none; }
}
@keyframes as-peak-still { 50% { opacity: 0.6; } }

@media (max-width: 900px) {
  .asst .o1-stage, .asst .build { grid-template-columns: 1fr; }
  .asst .facts { grid-template-columns: 1fr; }
  .asst .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asst .hub { height: 320px; }
  .asst .hub-chip { font-size: 13px; padding: 5px 12px; }
  .asst .mark { width: 160px; padding: 18px 20px; }
}
@media (max-width: 560px) {
  /* anchor the chips' outer edges so none leaves the screen */
  .asst .hub-chip { translate: 0 -50%; }
  .asst .hub-chip:nth-child(-n+4) { left: auto; right: calc(100% - var(--x)); }
}
@media (max-width: 560px) {
  .asst .trust { grid-template-columns: 1fr; }
  .asst .o1-visual { min-height: 0; padding: 12px; }
  .asst .tabs button { flex: 0 0 auto; }
  .asst .stations li { font-size: 12.5px; }
  .asst .ticket { width: min(220px, 100%); }
  .asst .lane { height: 128px; }
}

/* motion switch off: nothing waits for an animation that will not run */
:root[data-motion="paused"] .asst .settle > *,
:root[data-motion="paused"] .asst .swap,
:root[data-motion="paused"] .asst .ticket.enter { opacity: 1 !important; translate: none !important; animation: none !important; }
:root[data-motion="paused"] .asst .bubble.me .caret { display: none; }
