/*
 * Freklo AI (2026-11-14): an upcoming service, shown on the home page (#freklo-ai), on /ai and as a band
 * on /services. Nothing here exists yet, and every fragment says so: "Coming soon" beside the name,
 * "Illustrative preview" on every picture of it.
 *
 * Loaded after site.css on those three pages; it uses site.css's tokens, fields, type scale, radii and
 * motion, and the app's interface fragments (.ui). Freklo AI has one field of its own, the ink of the
 * hero, and one device: the wordmark's four-point sparkle on a thread that runs from recorded activity
 * to the owner's decision.
 *
 * The flow (.aif) is written as its last frame, and that is what a visit without scripts, with reduced
 * motion or on paper gets. ai.js adds .is-live when it will play the sequence; every "before" state
 * below hangs on that class, so nothing can stay hidden without the script that reveals it.
 * See ../../WEBSITE_DESIGN.md → "Freklo AI".
 */

:root {
  --ai-cyan: #7DF3FF;
  --ai-teal: #12A5A5;
  --ai-orange: #F79009;
  --ai-wait-bg: #FEF0C7;
  --ai-wait-fg: #93370D;
  --ai-flow: cubic-bezier(0.65, 0, 0.2, 1);
  /* A strong ease-out for what answers the visitor, a strong in-out for what travels on screen. */
  --ai-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ai-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ai-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --ai-spring: linear(0, 0.09, 0.303, 0.561, 0.806, 1.001, 1.13, 1.194, 1.203, 1.176, 1.128, 1.074, 1.026, 0.99, 0.968, 0.959, 0.959, 0.967, 0.977, 0.988, 0.997, 1.004, 1.007, 1.009, 1.008, 1.006, 1); }
}

/* ================= The name with its status: one pill, the same at every entry point ================= */

.ai-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px 0 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--fg);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.2;
}
.ai-badge svg { width: 18px; height: 18px; flex: none; fill: var(--sky); }
[data-field="white"] .ai-badge svg, [data-field="grey"] .ai-badge svg { fill: var(--blue); }
[data-field="white"] .ai-badge, [data-field="grey"] .ai-badge { background: var(--pale); }
.ai-badge-s { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-soft); }
.ai-badge-s::before { content: "·"; }

/* A button that leads on carries an arrow, and the arrow answers the pointer. */
.ai-go svg { transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .ai-go:hover svg { transform: translateX(4px); } .ai-go--down:hover svg { transform: translateY(3px) rotate(90deg); } }
.ai-go--down svg { transform: rotate(90deg); }

/* ================= Home: the way in from the hero ================= */

.ai-teaser {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-top: -10px;
  color: var(--fg); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.25;
}
.ai-teaser svg { width: 16px; height: 16px; flex: none; }
.ai-teaser .ai-teaser-mark { fill: var(--ai-cyan); }
.ai-teaser .ai-teaser-go { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-hover) var(--ease-out); }
.ai-teaser span { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.24em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .ai-teaser:hover span { text-decoration-color: currentColor; }
  .ai-teaser:hover .ai-teaser-go { transform: translateX(4px); }
  .ai-teaser:hover .ai-teaser-mark { transform: rotate(90deg); }
}
.ai-teaser .ai-teaser-mark { transition: transform 520ms var(--ease-out); }
@media (pointer: coarse) { .ai-teaser { min-height: 44px; } }

/* ================= Home: the section ================= */

.aih { position: relative; }
.aih-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 6vw, 96px); align-items: end; }
.aih-title { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.aih-title h2 { font-size: clamp(1.875rem, 1.2rem + 2.3vw, 3rem); line-height: 1.06; letter-spacing: -0.025em; }
:lang(hy) .aih-title h2 { font-size: clamp(1.5rem, 0.6rem + 2vw, 2.375rem); }
:lang(ru) .aih-title h2 { font-size: clamp(1.75rem, 1.1rem + 2vw, 2.75rem); }
.aih-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.aih-copy .lede { max-width: 34em; }
/* Each sentence of the title keeps its own line where the column can hold it. */
@media (min-width: 640px) { .aih-title h2, .ai-band h2 { white-space: pre-line; text-wrap: initial; } }
@media (max-width: 1099px) { .aih-head { grid-template-columns: minmax(0, 1fr); align-items: start; } }

/* What it will bring, in three lines under the picture. */
/* What it will bring: three lines above the picture. With scripts they are tabs, and the one that is
   chosen is the story the picture tells; without scripts they are three lines and the first story. */
.aih-pick { margin-top: clamp(28px, 4vw, 48px); }
.aih-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px clamp(20px, 3vw, 48px); }
.aih-benefits li { position: relative; padding-top: 18px; border-top: 1px solid var(--border); } /* taste-skill-ignore: the site's row vocabulary (.rows): a line between entries of a list */
.aih-benefits h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.02em; }
.aih-benefits p { margin-top: 8px; max-width: 30em; color: var(--fg-soft); }
.aih-benefits[role="tablist"] li { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color var(--t-hover) ease; }
.aih-benefits[role="tablist"] li::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px; border-radius: 3px; background: var(--ai-cyan); transform: scaleX(0); transform-origin: 0 50%; transition: transform 360ms var(--ai-out); }
.aih-benefits[role="tablist"] li[aria-selected="true"]::before { transform: none; }
.aih-benefits[role="tablist"] li[aria-selected="false"] { color: var(--fg-soft); }
.aih-benefits[role="tablist"] li p { transition: opacity var(--t-hover) ease; }
.aih-benefits[role="tablist"] li[aria-selected="false"] p { opacity: 0.72; }
.aih-benefits[role="tablist"] li:focus-visible { outline-offset: 6px; }
.aih-benefits[role="tablist"] li:active h3 { transform: scale(0.985); transform-origin: 0 50%; }
.aih-benefits[role="tablist"] li h3 { transition: transform var(--t-press) var(--ai-out); }
@media (hover: hover) and (pointer: fine) { .aih-benefits[role="tablist"] li[aria-selected="false"]:hover { color: var(--fg); } }
.aih-stories { margin-top: clamp(18px, 2.4vw, 28px); }
.aih-stories .aih-story { margin-top: 0; }
html:not(.js) .aih-story ~ .aih-story { display: none; }
/* The three stories keep one height in a row, so choosing another does not move the page. */
@media (min-width: 1000px) { .aih-story .aif-card { min-height: 172px; } }
@media (max-width: 760px) {
  .aih-benefits { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .aih-benefits li { padding: 16px 0; }
  /* One column: the lines open like the rows of a list; only the chosen one shows its sentence. */
  .aih-benefits[role="tablist"] li { display: grid; grid-template-rows: auto 0fr; min-height: 56px; padding: 15px 34px 15px 0; transition: grid-template-rows 300ms var(--ai-out), color var(--t-hover) ease; }
  .aih-benefits[role="tablist"] li[aria-selected="true"] { grid-template-rows: auto 1fr; }
  .aih-benefits[role="tablist"] li p { min-height: 0; margin-top: 0; overflow: hidden; }
  .aih-benefits[role="tablist"] li p::before { content: ""; display: block; height: 8px; }
  .aih-benefits[role="tablist"] li::after { content: ""; position: absolute; right: 6px; top: 22px; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform var(--t-ui) var(--ai-out); }
  .aih-benefits[role="tablist"] li[aria-selected="true"]::after { transform: translateY(4px) rotate(225deg); }
}

/* ================= The stage: one tone up from the field, labelled for what it is ================= */

.ai-stage {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  margin: clamp(32px, 4.5vw, 56px) 0 0; padding: clamp(18px, 2.4vw, 32px);
  border-radius: var(--radius-l); background: var(--surface);
}
.ai-stage-cap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  margin-bottom: clamp(20px, 2.6vw, 32px);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.3;
}
.ai-illus { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.ai-illus svg { width: 16px; height: 16px; flex: none; fill: var(--ai-cyan); }
.ai-stage-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: clamp(18px, 2.4vw, 28px); font-size: var(--fs-small); color: var(--fg-soft); }
.ai-stage-foot p { max-width: 60ch; }
/* Behind the flow: two slow ribbons, the hero's own, flat and faint. They move only with the page. */
.ai-stage-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.ai-rib-a { fill: rgba(74, 157, 255, 0.1); }
.ai-rib-b { fill: rgba(125, 243, 255, 0.06); }

.ai-replay {
  display: inline-flex; align-items: center; gap: 0.45em;
  min-height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--fg-soft); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.ai-replay svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 520ms var(--ease-out); }
.ai-replay:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .ai-replay:hover { background: var(--surface-2); color: var(--fg); }
  .ai-replay:hover svg { transform: rotate(-50deg); }
}
@media (pointer: coarse) { .ai-replay { min-height: 44px; } }
/* One column is paced by the scroll itself; there the sequence is not told again from a button. */
@media (max-width: 999px) { .ai-replay { display: none; } }

/* ================= The flow: four steps on one thread ================= */
/* A row of four from 1000 px: the thread runs across the top, a step hangs under each sparkle.
   Below that, one column: the thread runs down the left edge and every step is read beside it. */

.aif { --aif-gap: clamp(14px, 1.8vw, 24px); --aif-node: 30px; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--aif-gap); }
.aif-step { position: relative; display: grid; grid-template-rows: auto auto 1fr; row-gap: 12px; min-width: 0; }
.aif-node { position: relative; width: var(--aif-node); height: var(--aif-node); border-radius: 50%; display: grid; place-items: center; background: var(--blue); }
.aif-node svg { width: 16px; height: 16px; fill: #FFFFFF; }
/* The thread to the next step: a faint dotted track, and the line that has been drawn over it. */
.aif-rail { position: absolute; top: calc(var(--aif-node) / 2 - 6px); left: calc(var(--aif-node) + 8px); right: calc(8px - var(--aif-gap)); height: 12px; overflow: hidden; overflow: clip; color: rgba(255, 255, 255, 0.3); }
.aif-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: radial-gradient(circle, currentColor 1px, transparent 1.4px) 0 50% / 8px 2px repeat-x; } /* taste-skill-ignore: not a fill: a dotted track drawn as dots */
.aif-rail i { position: absolute; inset: 0; }
.aif-rail i::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; border-radius: 2px; background: var(--ai-cyan); }
.aif-rail i::after { content: ""; position: absolute; right: 0; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--ai-cyan); }
.aif-step:last-child .aif-rail { display: none; }
.aif-label { font-size: var(--fs-body); line-height: 1.25; letter-spacing: -0.01em; color: var(--fg); }

/* What a step holds: a piece of the app, in the app's own type and colours. */
.aif-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; height: 100%; }
.aif-say { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ui-text); }
.aif-say--q::before { content: "“"; }
.aif-say--q::after { content: "”"; }
:lang(hy) .aif-say--q::before, :lang(ru) .aif-say--q::before { content: "«"; }
:lang(hy) .aif-say--q::after, :lang(ru) .aif-say--q::after { content: "»"; }
.aif-text { font-size: 15px; line-height: 1.4; color: var(--ui-text); }
.aif-cap { margin-top: auto; padding-top: 2px; font-size: 13px; line-height: 1.35; color: var(--ui-text2); }
.aif-biz { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; }
.aif-biz .ui-badge { width: 36px; height: 36px; }
.aif-biz .ui-badge svg { width: 18px; height: 18px; }
.aif-biz .ui-name { display: block; font-size: 16px; }
.aif-biz .ui-sc { display: block; font-size: 13px; }
/* Recorded activity: one dot a visit, the blue ones a reward. */
.aif-dots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: min(100%, 190px); }
.aif-dots i { aspect-ratio: 1; border-radius: 50%; background: var(--ui-ok); }
.aif-dots i.is-reward { background: var(--ui-tint); }
/* An insight you can see: two bars, no figures. */
.aif-bars { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; align-items: center; font-size: 13px; line-height: 1.3; color: var(--ui-text2); }
.aif-bars .ui-bar { margin-top: 0; height: 8px; }
.aif-bars .ui-bar.is-low i { background: var(--ui-text3); }
/* Waiting for the owner: the app's pill in amber, where a finished thing would be green. */
.ui-pill.is-wait { position: relative; background: var(--ai-wait-bg); color: var(--ai-wait-fg); }

/* In a row the four steps share their rows, so a name that takes two lines in one language keeps every
   card on the same line. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1000px) {
    .aif { grid-template-rows: auto auto 1fr; }
    .aif-step { grid-row: span 3; grid-template-rows: subgrid; }
  }
}

@media (max-width: 999px) {
  .aif { --aif-gap: 22px; grid-template-columns: minmax(0, 1fr); max-width: 600px; }
  .aif-step { grid-template-columns: var(--aif-node) minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 10px; align-items: center; }
  .aif-node { grid-area: 1 / 1; }
  .aif-label { grid-area: 1 / 2; }
  .aif-card { grid-area: 2 / 2; height: auto; }
  .aif-rail { top: calc(var(--aif-node) + 6px); bottom: calc(6px - var(--aif-gap)); left: calc(var(--aif-node) / 2 - 6px); right: auto; width: 12px; height: auto; }
  .aif-rail::before { left: 5px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: radial-gradient(circle, currentColor 1px, transparent 1.4px) 50% 0 / 2px 8px repeat-y; } /* taste-skill-ignore: not a fill: the same dotted track, running down */
  .aif-rail i::before { left: 5px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .aif-rail i::after { left: 2px; right: auto; top: auto; bottom: 0; }
}

/* ================= /ai: the title across the page, the promise made visible beside the actions ================= */

.ai-hero { padding-bottom: clamp(56px, 7vw, 104px); }
.ai-hero-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 3.6vw, 48px) clamp(32px, 5vw, 80px); align-items: start; }
.ai-hero-top { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
/* Two sentences, two lines: the first is sized to cross the container in one. It measures 15.6 em in
   English, 14.2 em in Russian and 22.0 em in Armenian, so each language takes its own step. */
.ai-hero h1 { max-width: none; white-space: pre-line; text-wrap: initial; font-size: clamp(1.875rem, 5.4vw, 4.75rem); line-height: 1.03; }
:lang(hy) .ai-hero h1 { max-width: none; font-size: clamp(1.5rem, 4.1vw, 3.625rem); line-height: 1.1; }
:lang(ru) .ai-hero h1 { max-width: none; font-size: clamp(1.75rem, 5.4vw, 4.75rem); }
/* On the narrowest phones the first two Armenian words share a line at this size, not above it. */
@media (max-width: 374px) { :lang(hy) .ai-hero h1 { font-size: 1.375rem; } }
.ai-hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.ai-hero .lede { max-width: 34em; }
.ai-hero-note { max-width: 36em; font-size: var(--fs-small); color: var(--fg-soft); }
/* The picture: an insight and the step it suggests, on the bright scene of the home hero. */
.ai-scene { position: relative; isolation: isolate; margin: 0; width: min(100%, 500px); justify-self: end; padding: clamp(20px, 2.6vw, 30px); display: flex; flex-direction: column; }
.ai-scene .lc-scene { z-index: -1; }
.ai-scene figcaption { margin-bottom: 14px; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.3; color: #FFFFFF; }
.ai-scene .ui-card { width: 88%; }
.ai-scene .ui-card + .ai-scene-link + .ui-card { align-self: flex-end; }
.ai-scene-link { position: relative; align-self: center; width: 2px; height: 26px; margin: 4px 0; border-radius: 2px; background: #FFFFFF; }
.ai-scene-link svg { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; max-width: none; margin: -11px 0 0 -11px; fill: #FFFFFF; }
.ai-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1.3; color: var(--ui-tint); }
.ai-tag svg { width: 13px; height: 13px; flex: none; fill: currentColor; }
@media (max-width: 900px) {
  .ai-hero-in { grid-template-columns: minmax(0, 1fr); }
  .ai-scene { justify-self: start; width: min(100%, 460px); }
}
/* Between a phone and a desktop the picture takes the whole width: the insight and its step side by side. */
@media (min-width: 620px) and (max-width: 900px) {
  .ai-scene { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ai-scene figcaption { flex: 0 0 100%; }
  .ai-scene .ui-card { flex: 1 1 0; width: auto; align-self: stretch; }
  .ai-scene .ui-card + .ai-scene-link + .ui-card { align-self: stretch; }
  .ai-scene-link { width: 26px; height: 2px; margin: 0 4px; }
}
@media (max-width: 600px) { .ai-scene .lc-scene { border-radius: 28px; } }

/* ================= /ai: what works today beside what is coming ================= */
/* The site's own language for it: a filled card for what exists, a dashed outline for what is planned. */

.ai-now-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); margin-top: clamp(28px, 4vw, 44px); }
.ai-now-card { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; padding: clamp(24px, 3vw, 40px); border: 1.5px solid transparent; border-radius: var(--radius-l); background: var(--surface); --link: var(--blue-press); }
.ai-now-card.is-planned { background: transparent; border-style: dashed; border-color: color-mix(in srgb, var(--fg) 30%, transparent); }
.ai-now-card h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); }
.ai-now-card .ticks { margin-top: 6px; gap: 12px; }
.ai-now-card .ticks svg { stroke: var(--mint); }
.ai-now-card > .arrow-link { margin-top: auto; padding-top: 10px; }
.ai-now-card .link-rows { width: 100%; margin-top: 6px; }
.ai-now-card .link-rows a { min-height: 60px; padding: 13px 0; }
.ai-now-card .link-rows li:last-child a { border-bottom: 0; padding-bottom: 0; }
.ai-now-card .lr-t { font-size: var(--fs-lead); }
.ai-now-card .lr-d { font-size: var(--fs-small); }
.ai-now-card .link-rows svg { width: 20px; height: 20px; transform: rotate(90deg); }
@media (hover: hover) and (pointer: fine) { .ai-now-card .link-rows a:hover svg { transform: translateY(3px) rotate(90deg); } }
/* A planned capability that is pointed at lights up what it would rest on, and the rest steps back. */
.ai-now-card .ticks li { transition: opacity var(--t-hover) ease; }
.ai-now-card .ticks li svg { transition: transform 320ms var(--ai-spring); }
@media (hover: hover) and (pointer: fine) {
  .ai-now-grid:has(a[href="#advisor"]:is(:hover, :focus-visible)) .ticks li:not([data-for~="advisor"]),
  .ai-now-grid:has(a[href="#builder"]:is(:hover, :focus-visible)) .ticks li:not([data-for~="builder"]),
  .ai-now-grid:has(a[href="#intelligence"]:is(:hover, :focus-visible)) .ticks li:not([data-for~="intelligence"]),
  .ai-now-grid:has(a[href="#campaigns"]:is(:hover, :focus-visible)) .ticks li:not([data-for~="campaigns"]) { opacity: 0.32; }
  .ai-now-grid:has(a[href="#advisor"]:is(:hover, :focus-visible)) .ticks li[data-for~="advisor"] svg,
  .ai-now-grid:has(a[href="#builder"]:is(:hover, :focus-visible)) .ticks li[data-for~="builder"] svg,
  .ai-now-grid:has(a[href="#intelligence"]:is(:hover, :focus-visible)) .ticks li[data-for~="intelligence"] svg,
  .ai-now-grid:has(a[href="#campaigns"]:is(:hover, :focus-visible)) .ticks li[data-for~="campaigns"] svg { transform: scale(1.3); }
}
@media (max-width: 860px) { .ai-now-grid { grid-template-columns: minmax(0, 1fr); } }

/* ================= /ai: a capability, said for the business, with a picture of it ================= */

.ai-cap-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; }
.ai-cap-main { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; min-width: 0; }
.ai-cap-main h2 { max-width: 16ch; }
:lang(hy) .ai-cap-main h2, :lang(ru) .ai-cap-main h2 { max-width: 22ch; }
.ai-cap-lede { max-width: 24em; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.22; letter-spacing: -0.015em; text-wrap: balance; }
.ai-cap-main > p:not(.ai-cap-lede) { max-width: 58ch; }
.ai-cap-main .ticks { max-width: 58ch; }
.ai-cap-ex { padding: 16px 18px; border-radius: var(--radius-s); background: var(--surface); }
.ai-cap-ex .ex-label { margin-bottom: 4px; }
.ai-cap-side { min-width: 0; }
@media (min-width: 1000px) { .ai-cap--flip .ai-cap-side { order: -1; } }
@media (max-width: 999px) { .ai-cap-grid { grid-template-columns: minmax(0, 1fr); } }

/* The picture stands on a field of one of the app's colours. */
.ai-field {
  --tone: #D6E7FF; --on: var(--ink);
  position: relative; margin: 0; display: flex; flex-direction: column; gap: 18px;
  min-height: clamp(340px, 34vw, 480px); padding: clamp(20px, 2.6vw, 34px);
  border-radius: var(--radius-l); background: var(--tone); color: var(--on);
}
.ai-field[data-tone="blue"] { --tone: var(--blue); --on: #FFFFFF; }
.ai-field[data-tone="sky"] { --tone: var(--sky); }
.ai-field[data-tone="mint"] { --tone: var(--mint); }
.ai-field[data-tone="orange"] { --tone: var(--ai-orange); }
.ai-field figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.3; }
.ai-field > .ai-frag { width: min(460px, 100%); margin: auto; }
@media (max-width: 999px) { .ai-field { min-height: 0; } .ai-field > .ai-frag { margin: 6px auto 10px; } }

/* ---- Business Advisor: a question, a plain answer ---- */
.aiq { display: flex; flex-direction: column; gap: 14px; }
.aiq-ask { min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.aiq-ask legend { float: left; width: 100%; padding: 0; margin-bottom: 8px; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.3; }
.aiq-ask .ai-chip label { background: #0C4DB3; color: #FFFFFF; }
.aiq-ask .ai-chip input:checked + label { background: #FFFFFF; color: var(--blue-press); }
.aiq-ask .ai-chip input:focus-visible + label { outline-color: #FFFFFF; }
@media (hover: hover) and (pointer: fine) { .aiq-ask .ai-chip input:not(:checked):hover + label { background: #0A429A; } }
/* The three answers share one place, so the card keeps its size whichever is asked. */
.aiq-sets { display: grid; }
.aiq-set { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; visibility: hidden; }
.aiq:has(#aiq-1:checked) .aiq-set[data-q="1"],
.aiq:has(#aiq-2:checked) .aiq-set[data-q="2"],
.aiq:has(#aiq-3:checked) .aiq-set[data-q="3"] { visibility: visible; }
@supports not selector(:has(*)) { .aiq-set[data-q="1"] { visibility: visible; } }
.aiq-q { align-self: flex-end; max-width: 88%; padding: 10px 16px; border-radius: 18px 18px 4px 18px; background: #0C4DB3; color: #FFFFFF; font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.3; }
.aiq .ui-card { display: flex; flex-direction: column; gap: 10px; }
.aiq-lines { display: flex; flex-direction: column; gap: 8px; }
.aiq-lines li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.4; }
.aiq-lines li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 8px; height: 8px; border-radius: 50%; background: var(--ui-ok); }
.aiq-try { padding: 10px 12px; border-radius: 12px; background: var(--ui-fill); font-size: 15px; line-height: 1.4; }
.aiq-try b { display: block; font-size: 13px; font-weight: 600; color: #475467; }

/* ---- Loyalty Program Builder: a goal, and a program to start from ---- */
.aib { display: flex; flex-direction: column; gap: 14px; }
.aib-goals { min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.aib-goals legend, .ai-decide legend { float: left; width: 100%; padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--ui-text2); }
.ai-chip { position: relative; display: inline-flex; }
.ai-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ai-chip label {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--ui-fill); color: var(--ui-text); cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 1.2;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.ai-chip input:checked + label { background: var(--ui-text); color: #FFFFFF; }
.ai-chip input:focus-visible + label { outline: 3px solid var(--ui-tint); outline-offset: 2px; }
.ai-chip input:active + label { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .ai-chip input:not(:checked):hover + label { background: #E2E8F0; } }
@media (pointer: coarse) { .ai-chip label { min-height: 44px; } }
.aib-out { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--ui-fill); } /* taste-skill-ignore: the app's own separator inside [data-ui] */
.aib-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ui-text2); }
.aib-v { display: none; grid-template-columns: auto minmax(0, 1fr); }
.aib-v > div { display: contents; }
.aib-v dt { align-self: center; padding: 9px 14px 9px 0; font-size: 13px; line-height: 1.4; color: var(--ui-text2); }
.aib-v dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-weight: 600; font-size: 15px; line-height: 1.35; }
/* Every rule carries a pencil: it is a suggestion to change, not a setting that was made. */
.aib-v svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--ui-text3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aib-v > div + div > * { border-top: 1px solid var(--ui-fill); } /* taste-skill-ignore: the app's own row separator inside [data-ui] */
@media (max-width: 420px) {
  .aib-v { grid-template-columns: minmax(0, 1fr); }
  .aib-v dt { padding: 9px 0 0; }
  .aib-v dd { padding-top: 2px; }
  .aib-v > div + div > dd { border-top: 0; }
}
/* The goal that is chosen shows its suggestion. Without :has() the first one simply stays. */
.aib-wrap { display: flex; flex-direction: column; gap: 16px; }
.aib-card.ui-wrow { display: none; }
.aib-wrap:has(#aib-g-1:checked) .aib-v[data-v="1"], .aib-wrap:has(#aib-g-1:checked) .aib-card[data-v="1"],
.aib-wrap:has(#aib-g-2:checked) .aib-v[data-v="2"], .aib-wrap:has(#aib-g-2:checked) .aib-card[data-v="2"],
.aib-wrap:has(#aib-g-3:checked) .aib-v[data-v="3"], .aib-wrap:has(#aib-g-3:checked) .aib-card[data-v="3"] { display: grid; }
@supports not selector(:has(*)) { .aib-v[data-v="1"], .aib-card[data-v="1"] { display: grid; } }
/* The reward is the rule a visitor can change here: sooner or later, and the card below follows. */
.aib-step { display: inline-flex; gap: 6px; flex: none; }
html:not(.js) .aib-step, .js .aib-pen--still { display: none; }
.aib-btn { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--ui-fill); color: var(--ui-text); transition: background-color 160ms ease, transform var(--t-press) var(--ai-out), opacity 160ms ease; }
.aib-btn::after { content: ""; position: absolute; inset: -6px; }
.aib-v .aib-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.4; }
.aib-btn:active { transform: scale(0.9); }
.aib-btn[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.aib-btn[aria-disabled="true"]:active { transform: none; }
.aib-btn:focus-visible { outline: 3px solid var(--ui-tint); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .aib-btn:not([aria-disabled="true"]):hover { background: #E2E8F0; } }
.aib-reward { transition: filter 180ms ease, opacity 180ms ease; }
.aib-reward.is-changing { filter: blur(3px); opacity: 0.5; transition: none; }
.aib-prev { display: flex; flex-direction: column; gap: 8px; }
.aib-prev-l { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.3; }
.aib-card .ui-bar i { transition: transform 320ms var(--ai-out); }

/* ---- Customer Intelligence: three groups, a dot for every customer ---- */
.aig { display: flex; flex-direction: column; }
.aig-g { border-bottom: 1px solid var(--ui-fill); } /* taste-skill-ignore: the app's own row separator inside [data-ui] */
.aig-g summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; gap: 2px 12px; align-items: center; min-height: 44px; padding: 12px 0; border-radius: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.aig-g summary::-webkit-details-marker { display: none; }
.aig-g:first-child summary { padding-top: 2px; }
.aig-g summary::after { content: ""; width: 8px; height: 8px; margin-top: -4px; justify-self: center; border-right: 2.5px solid var(--ui-text3); border-bottom: 2.5px solid var(--ui-text3); transform: rotate(45deg); transition: transform var(--t-ui) var(--ai-out); }
.aig-g[open] summary::after { transform: translateY(4px) rotate(225deg); }
.aig-g summary:focus-visible { outline: 3px solid var(--ui-tint); outline-offset: 2px; }
.aig-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aig-t b { font-weight: 600; font-size: 16px; line-height: 1.3; }
.aig-t span { font-size: 13px; line-height: 1.35; color: var(--ui-text2); }
.aig-dots { display: flex; gap: 5px; transition: opacity var(--t-ui) ease; }
.aig-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--ui-ok); transition: transform 320ms var(--ai-spring); }
.aig-g[data-g="new"] .aig-dots i { background: var(--ui-tint); }
.aig-g[data-g="away"] .aig-dots i { background: transparent; box-shadow: inset 0 0 0 2.5px var(--ui-text3); } /* taste-skill-ignore: not a shadow: a hollow dot, drawn as the site draws its 'planned' ring */
/* The group that is open stands out: its customers a little larger, the others a little back. */
.aig-g[open] .aig-dots i { transform: scale(1.15); }
.aig:has(.aig-g[open]) .aig-g:not([open]) .aig-dots { opacity: 0.5; }
.aig-next { padding: 0 0 12px; font-size: 15px; line-height: 1.4; }
.aig-next b { display: block; font-size: 13px; font-weight: 600; color: #475467; }
/* Until the card is on screen its customers are not sorted yet (ai.js gathers them and lets them go). */
.aig-card.is-unsorted .aig-dots i { opacity: 0; }
.aig-cap { padding-top: 12px; font-size: 13px; line-height: 1.35; color: var(--ui-text2); }

/* ---- Campaign Studio: one draft, three languages, waiting for review ---- */
.aic { display: flex; flex-direction: column; gap: 12px; }
.aic-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ui-text2); }
.aic-pills { display: inline-flex; }
.aic-pill-done, .aic-note { display: none; }
.aic:has(.aic-check:checked) .aic-pill-wait { display: none; }
.aic:has(.aic-check:checked) .aic-pill-done { display: inline-block; }
.aic:has(.aic-check:checked) .aic-note { display: block; }
.aic[data-reviewed] .aic-pill-wait { display: none; }
.aic[data-reviewed] .aic-pill-done { display: inline-block; }
.aic[data-reviewed] .aic-note { display: block; }
.aic-note { font-size: 13px; line-height: 1.4; color: #475467; }
.aic-review { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding-top: 10px; border-top: 1px solid var(--ui-fill); font-size: 15px; font-weight: 600; line-height: 1.3; cursor: pointer; -webkit-tap-highlight-color: transparent; } /* taste-skill-ignore: the app's own separator inside [data-ui] */
.aic-check { position: absolute; left: 0; bottom: 0; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.aic-switch { flex: none; display: flex; align-items: center; width: 46px; height: 28px; padding: 3px; border-radius: 999px; background: #CBD5E1; transition: background-color 200ms ease; }
.aic-switch i { width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.25); transition: transform 240ms var(--ai-out), width 140ms var(--ai-out); } /* taste-skill-ignore: the app's own switch thumb inside [data-ui] */
.aic-check:checked + .aic-switch { background: var(--ui-ok); }
.aic-check:checked + .aic-switch i { transform: translateX(18px); }
.aic-check:focus-visible + .aic-switch { outline: 3px solid var(--ui-tint); outline-offset: 2px; }
.aic-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
html:not(.js) .aic-tabs { display: none; }
.aic-tab {
  min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ui-text2);
  font-size: 14px; font-weight: 600; line-height: 1.2;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.aic-tab:active { transform: scale(0.96); }
.aic-tab[aria-selected="true"] { background: var(--ui-text); color: #FFFFFF; }
.aic-tab:focus-visible { outline: 3px solid var(--ui-tint); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .aic-tab:not([aria-selected="true"]):hover { background: var(--ui-fill); color: var(--ui-text); } }
@media (pointer: coarse) { .aic-tab { min-height: 44px; } }
.aic-draft { padding: 14px 16px; border-radius: 14px 14px 14px 4px; background: var(--ui-fill); font-size: 16px; line-height: 1.4; }
.aic-draft + .aic-draft { margin-top: 8px; }
.aic-draft b { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--ui-text2); }
.js .aic-draft b { display: none; }

/* ================= /ai: from insight to action, for three kinds of business ================= */

.ai-demo-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px clamp(32px, 6vw, 96px); align-items: end; }
.ai-demo-head .lede { max-width: 30em; }
@media (max-width: 860px) { .ai-demo-head { grid-template-columns: minmax(0, 1fr); } }
.ai-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(24px, 3vw, 36px); }
html:not(.js) .ai-tabs { display: none; }
.ai-tab {
  min-height: 44px; padding: 0 18px; border: 1.5px solid color-mix(in srgb, var(--fg) 34%, transparent); border-radius: 999px;
  background: transparent; color: var(--fg);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-body); line-height: 1.2; white-space: nowrap;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.ai-tab:active { transform: scale(0.97); }
.ai-tab[aria-selected="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
@media (hover: hover) and (pointer: fine) { .ai-tab:not([aria-selected="true"]):hover { border-color: var(--fg); } }
.ai-cases { margin-top: 16px; display: grid; gap: 16px; }
.ai-case { margin: 0; }
/* Without scripts the three examples follow one another, each under its own name. */
.ai-case-h { margin-bottom: 14px; font-size: var(--fs-h3); }
.js .ai-case-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ai-demo .ai-stage { margin-top: 0; }
/* Here the four cards keep their own heights: a short question, and the decision as the long step. */
.ai-demo .aif-card { height: auto; align-self: start; }
.ai-demo .aif-say--q { font-size: 19px; line-height: 1.25; }
/* The owner's decision: three choices, and what each one would mean. */
.ai-decide { min-width: 0; margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--ui-fill); display: flex; flex-wrap: wrap; gap: 6px; } /* taste-skill-ignore: the app's own separator inside [data-ui] */
.ai-outs { margin-top: auto; }
.ai-out { display: none; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; font-weight: 600; }
.ai-out[data-o="0"] { display: block; background: var(--ai-wait-bg); color: var(--ai-wait-fg); }
.ai-out[data-o="1"] { background: var(--ui-ok-subtle); color: var(--ui-ok-text); }
.ai-out[data-o="2"] { background: #E0EDFF; color: #0F5BD1; }
.ai-out[data-o="3"] { background: var(--ui-fill); color: var(--ui-text); }
/* ai.js writes the choice on the card; :has() does the same where scripts did not run. */
.ai-review[data-choice] .ai-out[data-o="0"] { display: none; }
.ai-review[data-choice="1"] .ai-out[data-o="1"], .ai-review[data-choice="2"] .ai-out[data-o="2"], .ai-review[data-choice="3"] .ai-out[data-o="3"] { display: block; }
.ai-review:has(.ai-decide input:checked) .ai-out[data-o="0"] { display: none; }
.ai-review:has(input[value="1"]:checked) .ai-out[data-o="1"],
.ai-review:has(input[value="2"]:checked) .ai-out[data-o="2"],
.ai-review:has(input[value="3"]:checked) .ai-out[data-o="3"] { display: block; }

/* The decision is seen where it lands: on the suggestion, and on the thread that leads to the owner. */
.aif-verdicts { display: none; }
.aif-verdict { display: none; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.aif-verdict[data-v="1"] { background: var(--ui-ok-subtle); color: var(--ui-ok-text); }
.aif-verdict[data-v="2"] { background: #E0EDFF; color: #0F5BD1; }
.aif-verdict[data-v="3"] { background: var(--ui-fill); color: #475467; }
.aif:has(.ai-decide input:checked) .aif-verdicts { display: block; }
.aif:has(.ai-decide input[value="1"]:checked) .aif-verdict[data-v="1"],
.aif:has(.ai-decide input[value="2"]:checked) .aif-verdict[data-v="2"],
.aif:has(.ai-decide input[value="3"]:checked) .aif-verdict[data-v="3"] { display: inline-block; }
.aif[data-choice] .aif-verdicts { display: block; }
.aif[data-choice="1"] .aif-verdict[data-v="1"], .aif[data-choice="2"] .aif-verdict[data-v="2"], .aif[data-choice="3"] .aif-verdict[data-v="3"] { display: inline-block; }
.aif-step:nth-child(3) .aif-card { outline: 2px solid transparent; outline-offset: 2px; }
.aif:has(.ai-decide input[value="1"]:checked) .aif-step:nth-child(3) .aif-rail i::before,
.aif:has(.ai-decide input[value="1"]:checked) .aif-step:nth-child(3) .aif-rail i::after { background: var(--mint-bright); }
.aif:has(.ai-decide input[value="1"]:checked) .aif-step:nth-child(4) .aif-node { background: var(--mint); }
.aif:has(.ai-decide input[value="2"]:checked) .aif-step:nth-child(3) .aif-card { outline-color: var(--sky); }
.aif:has(.ai-decide input[value="3"]:checked) .aif-step:nth-child(3) .aif-card { opacity: 0.55; }
.aif:has(.ai-decide input[value="3"]:checked) .aif-step:nth-child(3) .aif-rail { opacity: 0.35; }
.aif-rail { transition: opacity var(--t-ui) ease; }
.aif-rail i::before, .aif-rail i::after, .aif-node { transition: background-color var(--t-ui) ease; }

/* One question a step, closed until it is asked. */
.aif-more { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--ui-fill); } /* taste-skill-ignore: the app's own separator inside [data-ui] */
.aif-more summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.3; color: #0F5BD1; -webkit-tap-highlight-color: transparent; }
.aif-more summary::-webkit-details-marker { display: none; }
.aif-more summary::after { content: "+"; flex: none; width: 18px; font-size: 19px; font-weight: 500; line-height: 1; text-align: center; transition: transform 240ms var(--ai-out); }
.aif-more[open] summary::after { transform: rotate(45deg); }
.aif-more summary:focus-visible { outline: 3px solid var(--ui-tint); outline-offset: 2px; }
.aif-more p { padding: 2px 0 4px; font-size: 13px; line-height: 1.4; color: #475467; }
@media (pointer: coarse) { .aif-more summary { min-height: 44px; } }
/* Where the browser can animate to an automatic height, an answer and a group open over a quarter of a second. */
@supports (interpolate-size: allow-keywords) {
  .aif-more, .aig-g { interpolate-size: allow-keywords; }
  .aif-more::details-content, .aig-g::details-content { block-size: 0; overflow: hidden; overflow: clip; transition: block-size 260ms var(--ai-out), content-visibility 260ms allow-discrete; }
  .aif-more[open]::details-content, .aig-g[open]::details-content { block-size: auto; }
}

/* ================= /ai: where it will be used ================= */

.ai-statuses { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ai-access .tool-card .avail-line { position: relative; z-index: 1; }
.ai-tools { position: relative; }
.ai-tools-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 40px); align-items: start; margin-top: 18px; padding: clamp(20px, 3vw, 40px); border-radius: var(--radius-l); background: var(--surface); }
.ai-tools-in > h3, .ai-tools-in > .ai-tools-foot { grid-column: 1 / -1; }
.ai-tools-in > h3 { font-size: var(--fs-h3); }
.ai-tools-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; font-size: var(--fs-small); color: var(--fg-soft); }
.ai-tools-foot p { max-width: 62ch; }
.ai-shot { margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.ai-shot .device, .ai-concept { width: min(100%, 220px); }
.ai-shot figcaption { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ai-shot figcaption b { font-family: var(--font-display); font-weight: 700; line-height: 1.3; }
.ai-shot figcaption .avail-line { font-size: var(--fs-xs); text-align: left; }
/* A concept, not a capture: the outline of a phone, dashed like everything else that is planned. */
.ai-concept { aspect-ratio: 77.8 / 157.5; display: flex; flex-direction: column; gap: 10px; padding: 26px 12px 14px; border: 2px dashed color-mix(in srgb, var(--fg) 40%, transparent); border-radius: 34px; text-align: left; overflow: hidden; }
.ai-concept .ui-card { padding: 12px; border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-concept .aif-say { font-size: 13px; line-height: 1.3; }
.ai-concept .ui-pill { font-size: 11.5px; padding: 3px 8px; }
.ai-concept-h { display: flex; align-items: center; gap: 6px; padding: 0 2px; font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2; }
.ai-concept-h svg { width: 15px; height: 15px; flex: none; fill: var(--blue); }
@media (max-width: 700px) { .ai-tools-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ai-shot--concept { grid-column: 1 / -1; } }
@media (max-width: 400px) { .ai-tools-in { grid-template-columns: minmax(0, 1fr); } }

/* ================= /services: the band ================= */

.ai-band { padding-block: clamp(44px, 5.5vw, 76px); }
.ai-band-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px clamp(32px, 6vw, 96px); align-items: center; }
.ai-band-main { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
.ai-band h2 { font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.375rem); line-height: 1.08; }
:lang(hy) .ai-band h2 { font-size: clamp(1.375rem, 0.95rem + 1.15vw, 2rem); }
.ai-band .lede { max-width: 34em; }
.ai-band-side { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; min-width: 0; }
.ai-band-list { width: 100%; border-top: 1px solid var(--border); } /* taste-skill-ignore: the site's row vocabulary (.link-rows) */
.ai-band-list li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lead); line-height: 1.25; } /* taste-skill-ignore: the site's row vocabulary (.link-rows) */
.ai-band-list svg { width: 16px; height: 16px; flex: none; fill: var(--sky); }
@media (max-width: 860px) { .ai-band-in { grid-template-columns: minmax(0, 1fr); } }

/* ================= Motion ================= */

@keyframes aif-pop { from { opacity: 0; transform: scale(0.5); } 60% { opacity: 1; transform: scale(1.2); } to { opacity: 1; transform: none; } }
@keyframes aif-bar { from { transform: scaleX(0); } }
@keyframes aif-ring { from { opacity: 0.8; transform: scale(1); } to { opacity: 0; transform: scale(1.12, 1.5); } }
@keyframes aif-halo { from { opacity: 0.7; transform: scale(1); } to { opacity: 0; transform: scale(2.1); } }
@keyframes ai-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ai-pop-in { from { opacity: 0; transform: scale(0.6); } }
@keyframes ai-spark-in { from { opacity: 0; transform: rotate(-120deg) scale(0.5); } }
@keyframes ai-float { from { translate: 0 var(--ai-float, 12px); } to { translate: 0 calc(var(--ai-float, 12px) * -1); } }
@keyframes ai-drift-a { from { transform: translateX(-28px); } to { transform: translateX(28px); } }
@keyframes ai-drift-b { from { transform: translateX(34px); } to { transform: translateX(-22px); } }

@media (prefers-reduced-motion: no-preference) {
  /* ---- Before its turn a step is only a dim point on the thread. ---- */
  .aif.is-live .aif-node { transition: transform 560ms var(--ai-spring), opacity 200ms ease, background-color 260ms ease; }
  .aif.is-live .aif-node svg { transition: transform 680ms var(--ease-out) 60ms, opacity 200ms ease 60ms; }
  .aif.is-live .aif-step:not(.is-on) .aif-node { transform: scale(0.5); opacity: 0.55; background: #3A4658; transition: none; }
  .aif.is-live .aif-step:not(.is-on) .aif-node svg { transform: rotate(-120deg) scale(0.5); opacity: 0; transition: none; }
  /* The sparkle lands and sends one ring out. */
  .aif.is-live .aif-step.is-on .aif-node::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ai-cyan); pointer-events: none; animation: aif-halo 900ms var(--ease-out) 120ms both; }

  /* ---- The thread is drawn to the next step, its bright end leading. ---- */
  .aif.is-live .aif-rail i { transition: transform 520ms var(--ai-flow); }
  .aif.is-live .aif-step:not(.is-out) .aif-rail i { transform: translateX(-101%); transition: none; }

  /* ---- Then the step arrives: its name, its card, and what the card holds, in reading order. ---- */
  .aif.is-live .aif-label { transition: opacity 420ms var(--ease-out) 90ms, transform 620ms var(--ease-expo) 90ms; }
  .aif.is-live .aif-card { transition: opacity 440ms var(--ease-out) 170ms, transform 680ms var(--ease-expo) 170ms; }
  .aif.is-live .aif-step:not(.is-on) .aif-label { opacity: 0; transform: translateY(8px); transition: none; }
  .aif.is-live .aif-step:not(.is-on) .aif-card { opacity: 0; transform: translateY(18px) scale(0.98); transition: none; }
  .aif.is-live .aif-card > * { transition: opacity 380ms ease, transform 560ms var(--ease-out); transition-delay: calc(330ms + var(--k, 0) * 90ms); }
  .aif.is-live .aif-card > :nth-child(2) { --k: 1; }
  .aif.is-live .aif-card > :nth-child(3) { --k: 2; }
  .aif.is-live .aif-card > :nth-child(n+4) { --k: 3; }
  .aif.is-live .aif-step:not(.is-on) .aif-card > * { opacity: 0; transform: translateY(8px); transition: none; }
  /* Activity arrives a visit at a time; the insight's bars grow to their length. */
  .aif.is-live .aif-step.is-on .aif-dots i { animation: aif-pop 420ms var(--ease-out) both; animation-delay: calc(460ms + var(--i, 0) * 42ms); }
  .aif.is-live .aif-step.is-on .ui-bar i { animation: aif-bar 820ms var(--ease-out) 560ms backwards; }
  /* The end of the sequence: the thread has reached the owner, and the waiting pill says so once. */
  .aif.is-live.is-done .ui-pill.is-wait::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--ai-wait-fg); pointer-events: none; animation: aif-ring 1000ms var(--ease-out) both; }

  /* A story or a kind of business that is chosen tells its steps again, briskly: the visitor asked, so
     the answer comes in well under a second. */
  .aif.is-live.is-quick .aif-node { transition-duration: 300ms, 120ms, 160ms; }
  .aif.is-live.is-quick .aif-node svg { transition-duration: 320ms, 120ms; transition-delay: 0ms; }
  .aif.is-live.is-quick .aif-rail i { transition-duration: 180ms; }
  .aif.is-live.is-quick .aif-label { transition-duration: 220ms, 300ms; transition-delay: 0ms; }
  .aif.is-live.is-quick .aif-card { transition-duration: 240ms, 340ms; transition-delay: 40ms; }
  .aif.is-live.is-quick .aif-card > * { transition-duration: 200ms, 280ms; transition-delay: calc(90ms + var(--k, 0) * 40ms); }
  .aif.is-live.is-quick .aif-step.is-on .aif-dots i { animation-duration: 260ms; animation-delay: calc(140ms + var(--i, 0) * 16ms); }
  .aif.is-live.is-quick .aif-step.is-on .ui-bar i { animation-duration: 420ms; animation-delay: 160ms; }
  /* Once the steps have arrived, what the visitor decides is answered at once. */
  .aif.is-live.is-done .aif-card, .aif.is-live.is-done .aif-card > * { transition: opacity 200ms ease, transform 200ms var(--ai-out), outline-color 200ms ease; transition-delay: 0ms; }

  /* /ai, first screen: the insight's bars grow, the sparkle joins it to its step, the pill says "waiting" once. */
  .js .ai-scene .ui-bar i { animation: aif-bar 900ms var(--ai-out) 950ms backwards; }
  .js .ai-scene-link { animation: ai-pop-in 420ms var(--ai-out) 1000ms backwards; }
  .js .ai-scene-link svg { animation: ai-spark-in 700ms var(--ai-spring) 1100ms backwards; }
  .js .ai-scene .ui-pill.is-wait::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--ai-wait-fg); pointer-events: none; opacity: 0; animation: aif-ring 1000ms var(--ai-out) 1900ms; }

  /* An answer arrives in reading order: the question, the card, then its lines. Leaving is instant. */
  @supports selector(:has(*)) {
    .aiq-set > *, .aiq-lines li, .aiq-try { opacity: 0; transform: translateY(10px); }
    .aiq-set > .ui-card { --d: 70ms; }
    .aiq-lines li:nth-child(1) { --d: 150ms; }
    .aiq-lines li:nth-child(2) { --d: 210ms; }
    .aiq-try { --d: 270ms; }
    .aiq:has(#aiq-1:checked) .aiq-set[data-q="1"] :is(.aiq-q, .ui-card, .aiq-lines li, .aiq-try),
    .aiq:has(#aiq-2:checked) .aiq-set[data-q="2"] :is(.aiq-q, .ui-card, .aiq-lines li, .aiq-try),
    .aiq:has(#aiq-3:checked) .aiq-set[data-q="3"] :is(.aiq-q, .ui-card, .aiq-lines li, .aiq-try) { opacity: 1; transform: none; transition: opacity 240ms ease var(--d, 0ms), transform 340ms var(--ai-out) var(--d, 0ms); }
  }

  /* A tab, a goal, a decision or a review that is chosen brings its answer in. */
  .aic-draft.is-shown, .aib-v, .aib-card, .ai-out, .aif-verdict, .aig-next, .aic-note { animation: ai-rise 260ms var(--ai-out) both; }
  .aic-pill-done { animation: ai-pop-in 280ms var(--ai-spring) both; }
  @media (hover: hover) and (pointer: fine) {
    .aif-node svg { transition: transform 520ms var(--ai-out); }
    .aif-step:hover .aif-node svg { transform: rotate(90deg); }
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 999px) {
  .aif.is-live .aif-step:not(.is-out) .aif-rail i { transform: translateY(-101%); }
}

/* Depth on the scroll, with no script and no clock: the ribbons slide a little as the stage crosses the
   screen. Browsers without scroll-driven animations hold still. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ai-rib-a { animation: ai-drift-a linear both; animation-timeline: view(); }
    .ai-rib-b { animation: ai-drift-b linear both; animation-timeline: view(); }
    /* Each picture rides a few pixels against the page as it passes. */
    .ai-field > .ai-frag { animation: ai-float linear both; animation-timeline: view(); }
  }
  @media (prefers-reduced-motion: no-preference) and (max-width: 999px) { .ai-field > .ai-frag { --ai-float: 5px; } }
}

@media print {
  .ai-replay, .ai-tabs, .aic-tabs { display: none !important; }
  .ai-case[hidden], .aic-draft[hidden] { display: block !important; }
}
