/* The AgentMagic site (the approved v4 concept C, "Pick an agent"): page layout, header and footer, and the scene
   parts. Colour, type, spacing, cards and product-screen frames come from /design-system/. Each page adds its own
   /pages/<page>.css. Scenes are played by /scenes.js. */

html {
  scroll-padding-top: 5rem;
}
body {
  overflow-x: clip;
}
/* Desktop-dense: the page uses more of a 1440px screen than the system's 1216px container. */
.am-container {
  --container: 84rem;
}
.am-eyebrow .am-tile {
  margin-inline-end: 0.15rem;
}
.nav-cta {
  display: none;
}
@media (min-width: 30rem) {
  .nav-cta {
    display: inline-flex;
  }
}

/* ---------- Header on a phone or tablet: the five page links as a second row ----------
   The design system hides .am-nav__links below 60rem and the shared header has no menu button, so here the links
   sit under the brand row as one line. All five fit on a 375px screen; on a narrower one the line scrolls
   sideways and fades at the right edge until it is scrolled to its end. No markup change on any page. */
@property --nav-fade {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
@keyframes nav-fade {
  from {
    --nav-fade: 2.5rem;
  }
  to {
    --nav-fade: 0px;
  }
}
@media (max-width: 59.99rem) {
  html {
    scroll-padding-top: 8rem; /* the header is two rows tall here */
  }
  .am-nav__inner {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .am-nav__links {
    --pad: 0.375rem;
    display: flex;
    order: 3;
    flex: none;
    gap: 0;
    /* The first link's text lines up with the logo: its padding hangs into the gutter. The line stops at the
       container's right edge; run past it and Chrome no longer scrolls a focused link into view. */
    width: calc(100% + var(--pad));
    margin: 0 0 var(--space-2) calc(var(--pad) * -1);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    /* A focused link that is only partly in view counts as out of view, so the line scrolls to show it whole. */
    scroll-padding-inline: 3.5rem;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--nav-fade)), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - var(--nav-fade)), transparent);
  }
  /* The fade follows the scroll position, so it is there only while more links wait to the right. A line that
     fits has nothing to scroll and gets no fade; a browser without scroll timelines gets no fade either. */
  @supports (animation-timeline: scroll()) {
    .am-nav__links {
      animation: nav-fade linear both;
      animation-timeline: scroll(self inline);
    }
  }
  .am-nav__links::-webkit-scrollbar {
    display: none;
  }
  .am-nav__links .am-nav__link {
    flex: none;
    padding-inline: var(--pad);
    font-size: 0.875rem;
    white-space: nowrap;
  }
  /* the line clips what hangs outside it, so the focus ring is drawn inside the link */
  .am-nav__links .am-nav__link:focus-visible {
    outline-offset: -2px;
  }
}

/* ---------- Buttons: the same pair down the page ---------- */
.cta {
  display: grid;
  gap: var(--space-3);
  width: 100%;
}
@media (min-width: 30rem) {
  .cta {
    grid-auto-flow: column;
    justify-content: start;
    width: auto;
  }
}
.am-wash .am-btn--secondary {
  --btn-bg: color-mix(in srgb, var(--card-float) 78%, transparent);
}
.am-wash .am-btn--secondary:hover {
  --btn-bg: var(--card-float);
}

/* The tokens have no violet. An agent the owner makes gets one of its own, so it is not mistaken for the five. */
:root {
  --tint-violet-bg: #ece8fc;
  --tint-violet-fg: #5a3fc0;
}
[data-theme='dark'] {
  --tint-violet-bg: #2a2350;
  --tint-violet-fg: #b9a8ff;
}
.tile--violet {
  --tile-bg: var(--tint-violet-bg);
  --tile-fg: var(--tint-violet-fg);
}

/* ---------- The line under a scene ---------- */
.scene__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-5);
  margin-top: var(--space-3);
}

/* ---------- Photos: plain rounded rectangles, people at work ---------- */
.photo {
  margin: 0;
  border-radius: 16px;
}
.photo img {
  display: block;
}

/* The small link under a scene, and the footer's brand column (logo, then the mission line close under it) */
.scene__foot .am-link--arrow {
  font-size: var(--text-sm);
}
.am-footer__brand {
  align-content: start;
}

/* ---------- The backdrop behind a scene: one soft tint per agent ----------
   The tint is the agent's tile colour from the tokens, thinned with the page background so the window,
   the phone and any caption on it stay calm. agents.js sets data-tint to the scene that is playing. */
.stagebox {
  --tint: var(--tint-blue-bg);
  --color-text-muted: var(--wash-text-muted);
  padding: clamp(1rem, 0.25rem + 3vw, 2.5rem);
  border-radius: calc(var(--card-radius) + 8px);
  background-color: color-mix(in srgb, var(--tint) 88%, var(--color-bg));
  background-image: linear-gradient(
    150deg,
    color-mix(in srgb, var(--color-bg) 48%, transparent),
    transparent 55%
  );
  transition: background-color var(--dur-slow) var(--ease-out);
}
.stagebox[data-tint='ads'] {
  --tint: var(--tint-amber-bg);
}
.stagebox[data-tint='desk'] {
  --tint: var(--tint-rose-bg);
}
.stagebox[data-tint='finance'] {
  --tint: var(--tint-green-bg);
}
.stagebox[data-tint='quality'] {
  --tint: var(--tint-teal-bg);
}
.stagebox[data-tint='custom'] {
  --tint: var(--tint-violet-bg);
}
/* An agent the owner made appears in the sidebar only once it is on. */
.am-app__link[hidden] {
  display: none;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-block: var(--space-10) var(--space-10);
  overflow: clip;
}
.hero__grid {
  display: grid;
  gap: var(--space-10);
}
.hero__copy {
  display: grid;
  gap: var(--space-5);
  justify-items: start;
}
.hero .am-display {
  font-size: clamp(2.5rem, 1.3rem + 3.4vw, 3.875rem);
}
.hero__line {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.012em;
}
.hero__note {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.hero__stage {
  min-width: 0;
  max-width: 58rem;
}
.scene--hero {
  position: relative;
}
.scene--hero .am-window {
  --design: 860;
}
.scene--hero .scene__phone {
  --design: 236;
  z-index: 2;
}
/* In the hero the phone covers the lower sidebar, so the sidebar starts with the agents. */
.scene--hero .am-app__side > .am-app__link:not([data-side]) {
  display: none;
}
.scene--hero .am-app--rail {
  --side-w: calc(var(--u) * 150);
  --rail-w: calc(var(--u) * 252);
}
@container (min-width: 641px) {
  .scene--hero .am-app--rail {
    aspect-ratio: 16 / 10.7;
  }
}
@media (min-width: 52rem) {
  .scene--hero {
    padding: 0 0 2.5rem 4.75rem;
  }
  .scene--hero .scene__phone {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 12.75rem;
    margin: 0;
  }
  .hero .scene__foot {
    padding-left: 18.5rem;
    margin-top: calc(var(--space-8) * -1);
  }
}
/* Side by side only when the window keeps a readable size; below this the window sits under the copy. */
@media (min-width: 80rem) {
  .hero {
    padding-block: var(--space-12) var(--space-12);
  }
  .hero__grid {
    grid-template-columns: clamp(22rem, 31vw, 26.5rem) minmax(0, 1fr);
    gap: var(--space-10);
    align-items: center;
  }
  .hero .am-display {
    font-size: clamp(2.75rem, 4.1vw, 3.875rem);
  }
  .hero__stage {
    max-width: none;
  }
}

/* ============================================================
   Scene parts (inside .am-ui, so every size is a multiple of --u)
   ============================================================ */
/* Messages stack from the top as they arrive. Once a thread is full it scrolls, and only then fades at the top. */
.scene .am-app__body,
.ph__body {
  justify-content: flex-start;
}
.scene .am-app__body > *,
.ph__body > * {
  flex: none;
}
.scene .am-app__body.is-scrolled,
.scene .ph__body.is-scrolled {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 calc(var(--u) * 26));
  mask-image: linear-gradient(to bottom, transparent, #000 calc(var(--u) * 26));
}

/* The right-hand panel is not there until the agent produces something for it; then it slides in. */
.scene .am-app--rail {
  --side-w: calc(var(--u) * 212);
  --rail-w: calc(var(--u) * 268);
}
@container (min-width: 641px) {
  .scene .am-app--rail {
    grid-template-columns: var(--side-w) minmax(0, 1fr) 0px;
    transition: grid-template-columns var(--dur-slow) var(--ease-out);
  }
  .scene.rail-open .am-app--rail {
    grid-template-columns: var(--side-w) minmax(0, 1fr) var(--rail-w);
  }
  .scene .am-app__rail {
    min-width: 0;
    padding-inline: 0;
    border-left-color: transparent;
    overflow: hidden;
    opacity: 0;
    transition:
      opacity var(--dur-slow) var(--ease-out),
      border-color var(--dur-slow) var(--ease-out);
  }
  .scene.rail-open .am-app__rail {
    border-left-color: var(--color-border);
    opacity: 1;
  }
  .scene .am-app__rail > * {
    flex: none;
    width: calc(var(--rail-w) - var(--space-4) * 2);
    margin-inline: var(--space-4);
  }
}
.scene .am-app__head [data-agent]:not(:empty)::before {
  content: '· ';
}
.scene .am-app__head {
  gap: var(--space-2);
}
.rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  align-content: start;
}

/* Arrivals */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(calc(var(--u, 1px) * 10));
  }
}
@keyframes swap {
  from {
    opacity: 0;
    transform: translateY(calc(var(--u, 1px) * 4));
  }
}
@keyframes mark {
  0%,
  55% {
    background-color: var(--tint-blue-bg);
    box-shadow: 0 0 0 calc(var(--u) * 5) var(--tint-blue-bg);
  }
  100% {
    background-color: transparent;
    box-shadow: 0 0 0 calc(var(--u) * 5) transparent;
  }
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
.is-new {
  animation: rise var(--dur-slow) var(--ease-out) both;
}
.is-swap {
  animation: swap var(--dur-base) var(--ease-out) both;
}
.line {
  border-radius: calc(var(--u) * 4);
}
.line.is-marked {
  animation: mark 1.8s var(--ease-out) both;
}
.is-pressed {
  transform: scale(0.94);
  filter: brightness(0.88);
}
/* [data-k]: not there until the script shows it. [data-v]: keeps its place, fades in. */
[data-k]:not(.is-on) {
  display: none !important;
}
[data-k].is-on {
  animation: rise var(--dur-slow) var(--ease-out) both;
}
.am-doc:has([data-k]):not(:has(.is-on)) {
  display: none;
}
[data-v] {
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
[data-v].is-on {
  opacity: 1;
}
/* A transcript detail before the agent has picked it out */
.am-hl {
  transition:
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}
.am-hl.hl-wait {
  background: transparent;
  color: inherit;
  font-weight: inherit;
}
/* The agent at work: typing dots and what it is doing right now */
.working {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
  color: var(--color-text-muted);
}
.am-transcript:not(:empty) + p {
  margin-top: var(--space-2);
}
.am-transcript:empty {
  display: none;
}
.is-instant *,
.is-instant *::before {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .is-new,
  .is-swap,
  [data-k].is-on,
  .line.is-marked,
  .status[data-tone='work']::before {
    animation: none !important;
  }
}

/* Status word in the window header */
.status {
  margin-left: auto;
  font-weight: var(--weight-medium);
}
.status:empty {
  display: none;
}
.status[data-tone='work']::before {
  content: '';
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1s var(--ease-in-out) infinite;
}
.status[data-tone='ok'] {
  color: var(--color-success);
}
.status[data-tone='warn'],
.chip-warn {
  background: var(--tint-amber-bg);
  color: var(--tint-amber-fg);
}

/* Phone: a plain chat in our own system */
.chatbar {
  gap: calc(var(--u) * 9);
  padding-bottom: calc(var(--u) * 9);
}
.chatbar .am-msg__avatar {
  width: calc(var(--u) * 30);
  height: calc(var(--u) * 30);
  border-radius: 50%;
}
.chatbar .am-spark {
  width: calc(var(--u) * 13);
  height: calc(var(--u) * 13);
}
.chatbar div {
  display: grid;
  line-height: 1.2;
}
.chatbar strong {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
.chatbar div span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
}
.bub {
  align-self: flex-start;
  max-width: 90%;
  padding: calc(var(--u) * 8) calc(var(--u) * 11);
  border-radius: calc(var(--u) * 15);
  border-bottom-left-radius: calc(var(--u) * 5);
  background: var(--card-fill);
  line-height: 1.4;
}
.bub--me {
  align-self: flex-end;
  border-radius: calc(var(--u) * 15);
  border-bottom-right-radius: calc(var(--u) * 5);
  background: var(--color-inverse-bg);
  color: var(--color-inverse-text);
}
.bub--photo {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
}
.opts,
.acts {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--u) * 6);
  margin-top: calc(var(--u) * 7);
}
.opt {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 5);
  padding: calc(var(--u) * 3) calc(var(--u) * 9) calc(var(--u) * 3) calc(var(--u) * 4);
  border-radius: var(--radius-pill);
  background: var(--card-float);
  box-shadow: 0 0 0 1px var(--color-border);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.opt b {
  display: grid;
  place-items: center;
  width: calc(var(--u) * 16);
  height: calc(var(--u) * 16);
  border-radius: 50%;
  background: var(--color-fill);
  font-size: calc(var(--u) * 10);
  font-weight: var(--weight-semibold);
}
.acts .am-btn {
  --tap: calc(var(--u) * 30);
}
.acts:has(> .am-badge) {
  margin-top: calc(var(--u) * 6);
}
.sys {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 6);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-align: center;
}
.sys .am-brandmark {
  height: calc(var(--u) * 10);
}
.saved {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 5);
  color: var(--color-success);
  font-weight: var(--weight-medium);
}
.bub > .am-brandmark {
  height: calc(var(--u) * 11);
  margin-top: calc(var(--u) * 7);
}
.notif {
  display: grid;
  gap: calc(var(--u) * 5);
  padding: calc(var(--u) * 11);
  border-radius: calc(var(--u) * 14);
  background: var(--card-float);
  box-shadow:
    0 0 0 1px var(--color-border),
    var(--shadow-2);
  line-height: 1.4;
}
.notif__head {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 6);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.ptable {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: calc(var(--u) * 3) calc(var(--u) * 12);
  font-variant-numeric: tabular-nums;
}
.ptable b {
  font-weight: var(--weight-semibold);
  text-align: right;
}

/* Crew phone: My day */
.job {
  display: grid;
  gap: calc(var(--u) * 9);
  padding: calc(var(--u) * 12);
  border-radius: calc(var(--u) * 14);
  background: var(--card-fill);
}
.job__head {
  display: grid;
  line-height: 1.3;
}
.job__head strong {
  font-weight: var(--weight-semibold);
}
.job__head span,
.job__note,
.job__photos > span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.job__note {
  line-height: 1.35;
}
.job__list {
  display: grid;
  gap: calc(var(--u) * 6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.job__list li {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 7);
}
.tick {
  display: grid;
  place-items: center;
  width: calc(var(--u) * 15);
  height: calc(var(--u) * 15);
  border-radius: calc(var(--u) * 5);
  box-shadow: inset 0 0 0 1.5px var(--color-border-strong);
  color: var(--color-inverse-text);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.am-ui .tick .am-icon {
  width: calc(var(--u) * 11);
  height: calc(var(--u) * 11);
  stroke-width: 3;
  opacity: 0;
}
.is-done .tick {
  background: var(--color-inverse-bg);
  box-shadow: none;
}
.is-done .tick .am-icon {
  opacity: 1;
}
.chip-req {
  margin-left: auto;
  padding: 0 calc(var(--u) * 7);
  border-radius: var(--radius-pill);
  background: var(--tint-amber-bg);
  color: var(--tint-amber-fg);
  font-size: calc(var(--u) * 10.5);
  font-weight: var(--weight-medium);
}
.job__photos {
  display: grid;
  gap: calc(var(--u) * 5);
}
.job__photos div {
  display: flex;
  gap: calc(var(--u) * 4);
  min-height: calc(var(--u) * 26);
}
.thumb {
  flex: none;
  width: calc(var(--u) * 26);
  height: calc(var(--u) * 26);
  border-radius: calc(var(--u) * 6);
  background: var(--color-fill);
  box-shadow: inset 0 0 0 1px var(--color-border);
}
.thumb--after {
  background: var(--tint-teal-bg);
}
.job__done {
  display: none;
  align-items: center;
  gap: calc(var(--u) * 6);
  color: var(--color-success);
  font-weight: var(--weight-medium);
}
.job.is-finished .job__note,
.job.is-finished .job__list,
.job.is-finished .job__photos,
.job.is-finished [data-finish] {
  display: none;
}
.job.is-finished .job__done {
  display: flex;
}

/* Desktop thread and right column */
.kcard {
  display: grid;
  gap: var(--space-3);
  margin-left: calc(var(--u) * 38);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow:
    0 0 0 1px var(--color-border),
    var(--shadow-1);
}
.kcard__head,
.kcard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.kcard__head strong {
  font-weight: var(--weight-semibold);
}
.kcard__foot {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.kcard__foot--start {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.kcard__label {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.adlines {
  display: grid;
  gap: calc(var(--u) * 2);
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-border);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
.cols2 {
  display: grid;
  gap: var(--space-4);
}
.cols2 > div {
  display: grid;
  gap: var(--space-1);
  align-content: start;
}
@container (min-width: 641px) {
  .cols2 {
    grid-template-columns: 1fr 1fr;
  }
}
.sugg {
  display: grid;
  gap: calc(var(--u) * 2);
  margin: calc(var(--u) * 4) 0 0;
  padding-left: 1.4em;
}
.reply {
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-border);
}
.reply b {
  margin-right: 0.5em;
  font-weight: var(--weight-medium);
}
.fine {
  display: block;
  margin-top: calc(var(--u) * 3);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.paytable {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.paytable td {
  padding: calc(var(--u) * 5) 0;
  border-top: 1px solid var(--color-border);
}
.paytable tr:first-child td {
  border-top: 0;
}
.paytable td + td {
  text-align: right;
}
.paytable tr:last-child td {
  font-weight: var(--weight-semibold);
}
.flag {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--tint-amber-bg);
  color: var(--tint-amber-fg);
  font-weight: var(--weight-medium);
  transition: background-color var(--dur-base) var(--ease-out);
}
.scene .flag {
  margin-left: calc(var(--u) * 38);
}
.flag .am-icon {
  margin-top: 0.15em;
}
.flag--clear {
  background: var(--tint-green-bg);
  color: var(--tint-green-fg);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.stats > div {
  display: grid;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.stats span,
.camp span,
.week__row small,
.scorerow div span {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.stats strong {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.camp {
  display: grid;
}
.camp strong,
.budget strong {
  font-weight: var(--weight-medium);
}
.budget {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: stretch;
}
.budget b {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.missed li {
  grid-template-columns: auto minmax(0, 1fr);
}
.crew .am-badge,
.mini__slots .am-badge {
  justify-self: end;
}
.week {
  gap: 0;
  padding-block: var(--space-2);
}
.week__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: calc(var(--u) * 2) var(--space-3);
  padding-block: var(--space-2);
  border-top: 1px solid var(--color-border);
}
.week__row:first-child {
  border-top: 0;
}
.week__row small {
  margin-left: 0.6em;
}
.week__row strong {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.week__note:empty {
  display: none;
}
.scorerow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}
.scorerow strong {
  display: block;
  font-weight: var(--weight-medium);
}
.ring {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--u) * 64);
  height: calc(var(--u) * 64);
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke: var(--color-fill);
  stroke-width: 3;
}
.ring circle + circle {
  stroke: var(--color-text);
  stroke-linecap: round;
  stroke-dasharray: var(--p) 100;
  transition: stroke-dasharray 0.9s var(--ease-out);
}
.ring b {
  position: absolute;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

/* Small parts shared with the floating cards */
.mini__head,
.mini__sync,
.mini__slots li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.mini__head strong {
  font-weight: var(--weight-semibold);
}
.mini__sub {
  margin-top: calc(var(--space-2) * -1);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.mini__sync {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.mini__slots {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}
.mini__slots li {
  min-height: calc(var(--u) * 36);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}
.am-doc .mini__slots li {
  background: var(--color-surface);
}

/* A narrow window (a phone-width page): fixed thread height so the page never jumps. */
@container (max-width: 640px) {
  .scene .am-app__body {
    flex: none;
    height: calc(var(--u) * 410);
    padding: var(--space-4);
  }
  .scene .am-app__composer {
    display: none;
  }
  .scene .am-app__head {
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4);
  }
  .scene .am-app__rail {
    min-height: calc(var(--u) * 250);
  }
  .kcard,
  .scene .flag {
    margin-left: 0;
  }
}

/* ============================================================
   Hours + workflow rail
   ============================================================ */
.chain {
  padding-block: var(--space-10);
  border-bottom: 1px solid var(--color-border);
}
.chain__grid {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
.chain__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
}
.chain__rail {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-2);
  margin: 0;
}
.chain__rail li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.chain__arrow {
  width: 1.125rem;
  height: 1.125rem;
  margin-left: var(--space-1);
  color: var(--am-grey-450);
}
@media (min-width: 64rem) {
  .chain__rail {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .chain__rail li {
    font-size: var(--text-base);
  }
}
@media (min-width: 82rem) {
  .chain__grid {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-16);
  }
}

/* ============================================================
   Watch an agent work: tabs and one large stage
   ============================================================ */
.watch {
  padding-top: var(--space-16);
}
.watch__head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.tab {
  grid-column: span 2;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: var(--space-3) var(--space-2);
  border: 0;
  border-radius: var(--card-radius-sm);
  background: var(--card-fill);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-sm);
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--dur-base) var(--ease-out);
}
.tab:hover {
  background: var(--card-fill-hover);
}
.tab[aria-selected='true'] {
  background: var(--tint-blue-bg);
}
.tab[data-scene='ads'][aria-selected='true'] {
  background: var(--tint-amber-bg);
}
.tab[data-scene='desk'][aria-selected='true'] {
  background: var(--tint-rose-bg);
}
.tab[data-scene='finance'][aria-selected='true'] {
  background: var(--tint-green-bg);
}
.tab[data-scene='quality'][aria-selected='true'] {
  background: var(--tint-teal-bg);
}
.tab[data-scene='custom'][aria-selected='true'] {
  background: var(--tint-violet-bg);
}
.tab[aria-selected='true'] .am-tile {
  background: var(--card-float);
}
.tab .am-tile {
  transition: background-color var(--dur-base) var(--ease-out);
}
.tab__text {
  display: grid;
  line-height: 1.3;
}
.tab__text strong {
  font-weight: var(--weight-semibold);
}
.tab__text span {
  display: none;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.tab[aria-selected='true'] .tab__text span {
  color: var(--wash-text-muted);
}
.watch__panel:focus-visible {
  outline-offset: 8px;
  border-radius: var(--radius-md);
}
.scene--watch {
  display: grid;
  gap: var(--space-6);
  justify-items: center;
}
.scene--watch .scene__window {
  width: 100%;
}
@container (min-width: 641px) {
  .scene--watch .am-app {
    aspect-ratio: 16 / 8.3;
  }
}
.scene--watch .scene__phone {
  --design: 252;
  width: min(100%, 15rem);
}
@media (min-width: 60rem) {
  .watch__head {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: end;
    gap: var(--space-10);
  }
  .tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-3);
  }
  .tab {
    grid-column: auto;
  }
}
@media (min-width: 76rem) {
  .tab {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    text-align: left;
  }
  .tab__text span {
    display: block;
  }
}
@media (min-width: 68rem) {
  .scene--watch {
    grid-template-columns: minmax(0, 1fr) 16.25rem;
    gap: var(--space-10);
    align-items: center;
  }
  .scene--watch .scene__phone {
    width: 100%;
  }
}

/* ============================================================
   One section per agent: the copy above, its own scene at full width
   ============================================================ */
.agent {
  padding-block: calc(var(--space-section) * 0.45);
}
.watch + .agent {
  padding-top: 0;
}
.agent__head {
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
.agent__copy {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}
.agent__facts {
  gap: var(--space-2);
  font-weight: var(--weight-medium);
}
@media (min-width: 60rem) {
  .agent__head {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: var(--space-12);
  }
}

/* ============================================================
   The rest of the page
   ============================================================ */
.head--center {
  display: grid;
  gap: var(--space-4);
  justify-items: center;
  max-width: 46rem;
  margin: 0 auto var(--space-head);
  text-align: center;
}

/* You approve */
.approve {
  align-items: center;
}
.approve__copy {
  display: grid;
  gap: var(--space-4);
}
.approve__cards {
  display: grid;
  gap: var(--space-4);
  margin: 0;
}
.approve__cards .am-card--feature {
  min-height: 13rem;
}

/* Tools */
.tools {
  padding-block: var(--space-10);
  border-block: 1px solid var(--color-border);
}
.tools__inner {
  display: grid;
  gap: var(--space-6);
  justify-items: center;
  text-align: center;
}
.tools__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.012em;
}
.tools__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-5) var(--space-10);
  margin: 0;
}
.tools__row li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-semibold);
}
.tools__row .am-brandmark {
  height: 1.375rem;
}

/* Set up */
.setup__head {
  row-gap: var(--space-8);
  align-items: center;
  margin-bottom: var(--space-10);
}
.setup__head > *,
.goal__grid > * {
  grid-column: 1 / -1;
}
.setup__copy,
.goal__copy {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}
.setup__copy .cta {
  margin-top: var(--space-2);
}

/* The goal: a short band under the hours strip */
.goal__grid {
  row-gap: var(--space-8);
  align-items: center;
}
@media (min-width: 52rem) {
  .setup__copy,
  .goal__copy {
    grid-column: 1 / span 6;
  }
  .setup__head > .photo,
  .goal__grid > .photo {
    grid-column: 8 / -1;
  }
}
ol.setup {
  row-gap: var(--grid-gap);
  margin: 0;
}
.setup .am-card--feature {
  min-height: 13rem;
}
.setup__step {
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

/* Pricing */
.plans {
  row-gap: var(--grid-gap);
  align-items: start;
}
.plans__talk {
  font-size: var(--text-3xl);
}
.plans__note {
  margin-top: var(--space-8);
  font-weight: var(--weight-semibold);
  text-align: center;
}

/* FAQ */
.faq__head {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
  align-content: start;
}
.faq__head .am-lead {
  font-size: var(--text-base);
}
.faq__list {
  display: grid;
  gap: var(--space-3);
}

/* Mission and vision */
.mission__grid {
  row-gap: var(--space-8);
  align-items: start;
}
.mission__head,
.mission__list,
.mission__photo {
  grid-column: 1 / -1;
}
.mission__head {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}
.mission__list {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--color-border);
}
.mission__row {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.mission__row dt {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  color: var(--color-text-muted);
}
.mission__row dd {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  text-wrap: balance;
}
@media (min-width: 52rem) {
  .mission__grid {
    grid-template-rows: auto 1fr;
  }
  .mission__photo {
    grid-column: 1 / span 5;
    grid-row: 1 / span 2;
  }
  .mission__head,
  .mission__list {
    grid-column: 7 / -1;
  }
  .mission__row {
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: var(--space-5);
    align-items: baseline;
  }
}

/* Closing */
.closing {
  padding-bottom: var(--space-section);
}
.closing__panel {
  display: grid;
  gap: var(--space-5);
  justify-items: center;
  padding: clamp(2rem, 1rem + 5vw, 5rem) clamp(1.25rem, 0.5rem + 4vw, 4rem);
  border-radius: calc(var(--card-radius) + 8px);
  text-align: center;
}
.closing__panel .am-display {
  max-width: 18ch;
  font-size: var(--text-3xl);
}
.closing__panel .cta {
  margin-top: var(--space-2);
}

@media (min-width: 40rem) {
  .approve__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .setup > li,
  .plans > .am-card {
    grid-column: span 4;
  }
  .am-card--plan {
    --card-pad: 1.25rem;
  }
}
@media (min-width: 60rem) {
  .approve__copy {
    grid-column: 1 / span 4;
  }
  .approve__cards {
    grid-column: 5 / -1;
  }
  .am-card--plan {
    --card-pad: 2rem;
  }
  .plans {
    padding-top: var(--space-6);
  }
  .plans > .am-card--featured {
    margin-top: calc(var(--space-6) * -1);
    padding-block: calc(var(--card-pad) + var(--space-6));
  }
  .faq {
    align-items: start;
  }
  .faq__head {
    grid-column: 1 / span 5;
    position: sticky;
    top: 6rem;
  }
  .faq__list {
    grid-column: 7 / -1;
  }
}

/* Phone widths: cards size to their content. */
@media (max-width: 39.99rem) {
  .approve__cards .am-card--feature,
  .setup .am-card--feature {
    min-height: 0;
    gap: var(--space-6);
  }
}

/* ============================================================
   The phone: one unbranded handset, drawn in CSS, used for every phone on the page.
   .ph is the size container (--design is the width in px it was drawn for); everything
   inside is a multiple of --u, so the same markup works at any size.
   ============================================================ */
.ph {
  --design: 270;
  --u: calc(100cqi / var(--design));
  --ph-edge: var(--color-border);
  --ph-ink: var(--am-ink-950);
  container-type: inline-size;
  position: relative;
  width: min(100%, 17rem);
}
/* No bezel: the screen runs to the edge, with a hairline so it reads as a phone on white and on the wash. */
.ph__frame {
  position: relative;
  aspect-ratio: 9 / 19.3;
  border-radius: calc(var(--u) * 44);
  background: var(--color-surface);
  box-shadow:
    0 0 0 1px var(--ph-edge),
    0 calc(var(--u) * 2) calc(var(--u) * 5) rgb(11 12 14 / 0.06),
    0 calc(var(--u) * 24) calc(var(--u) * 52) rgb(11 12 14 / 0.16);
}
.ph__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: var(--color-surface);
  color: var(--color-text);
}
.ph__island {
  position: absolute;
  top: calc(var(--u) * 8);
  left: 50%;
  z-index: 2;
  width: calc(var(--u) * 72);
  height: calc(var(--u) * 21);
  border-radius: var(--radius-pill);
  background: var(--ph-ink);
  transform: translateX(-50%);
}
.ph__status {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--u) * 38);
  padding: calc(var(--u) * 2) calc(var(--u) * 20) 0 calc(var(--u) * 24);
  font-size: calc(var(--u) * 12);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.ph__icons {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 5);
}
.ph__icons svg {
  width: auto;
  height: calc(var(--u) * 9.5);
  fill: currentColor;
}
.ph__bar {
  display: flex;
  flex: none;
  align-items: center;
  padding: calc(var(--u) * 7) calc(var(--u) * 13) calc(var(--u) * 9);
  border-bottom: 1px solid var(--color-border);
}
.ph__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  gap: calc(var(--u) * 8);
  min-height: 0;
  padding: calc(var(--u) * 12) calc(var(--u) * 11);
  overflow: hidden;
}
/* The chat input, as on the desktop: a placeholder and a send button */
.ph__input {
  display: flex;
  flex: none;
  align-items: center;
  gap: calc(var(--u) * 6);
  margin: 0 calc(var(--u) * 11) calc(var(--u) * 20);
  padding: calc(var(--u) * 5) calc(var(--u) * 5) calc(var(--u) * 5) calc(var(--u) * 13);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 0 1px var(--color-border);
  color: var(--color-text-muted);
}
.ph__input span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ph__input.is-typing {
  border-radius: calc(var(--u) * 18);
  box-shadow: 0 0 0 1.5px var(--color-primary);
  color: var(--color-text);
}
/* A long message wraps onto a second line, as it does in a chat app */
.ph__input.is-typing span {
  white-space: normal;
}
.ph__input.is-typing span::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 1px;
  background: currentColor;
  vertical-align: text-bottom;
}
.ph__input.is-sending .ph__send {
  transform: scale(0.86);
}
.ph__send {
  transition: transform 0.12s;
  display: grid;
  flex: none;
  place-items: center;
  width: calc(var(--u) * 26);
  height: calc(var(--u) * 26);
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.ph__home {
  position: absolute;
  bottom: calc(var(--u) * 7);
  left: 50%;
  z-index: 2;
  width: calc(var(--u) * 92);
  height: calc(var(--u) * 4);
  border-radius: var(--radius-pill);
  background: var(--ph-ink);
  transform: translateX(-50%);
}

/* ============================================================
   Job quality management: the full scene on three screens
   ============================================================ */
.scene--big {
  display: grid;
  gap: var(--space-8);
  justify-items: center;
}
.scene__col {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  width: 100%;
  min-width: 0;
}
.scene__cap {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.scene__cap .am-icon {
  width: 1.125rem;
  height: 1.125rem;
}
.scene--big .am-window {
  --design: 800;
  width: 100%;
}
.scene--big .scene__phone {
  --design: 246;
  width: min(100%, 15rem);
}
/* The owner's phone waits, dimmed, until the scene reaches it. */
.scene__phone--owner {
  opacity: 0.55;
  transition: opacity var(--dur-slow) var(--ease-out);
}
.has-owner .scene__phone--owner {
  opacity: 1;
}
@container (min-width: 641px) {
  .scene--big .am-app--rail {
    --rail-w: calc(var(--u) * 286);
    grid-template-columns: minmax(0, 1fr) 0px;
    aspect-ratio: 16 / 10.7;
  }
  .scene--big.rail-open .am-app--rail {
    grid-template-columns: minmax(0, 1fr) var(--rail-w);
  }
  .scene--big .am-app__side {
    display: none;
  }
}
@media (min-width: 78rem) {
  .scene--big {
    grid-template-columns: 15rem minmax(0, 1fr) 15rem;
    align-items: end;
    gap: var(--space-8);
  }
}

/* Parts of the job report */
.rooms,
.next {
  display: grid;
  gap: calc(var(--u) * 7);
  margin: 0;
  padding: 0;
  list-style: none;
}
.rooms li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: calc(var(--u) * 3) var(--space-3);
}
.rooms li b {
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.rooms .am-bar {
  grid-column: 1 / -1;
  height: calc(var(--u) * 4);
}
.am-doc__title {
  font-weight: var(--weight-semibold);
}
.am-doc .am-approval__rows li {
  align-items: center;
}
.miss {
  gap: var(--space-2);
}
.miss .flag {
  margin: 0;
}
.miss .flag b {
  margin-right: 0.4em;
  font-weight: var(--weight-semibold);
}
.trace {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}
.trace__src {
  display: grid;
  gap: calc(var(--u) * 3);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.trace > :last-child {
  font-variant-numeric: tabular-nums;
}
.miss__note {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.next li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.next .am-icon {
  margin-top: 0.15em;
  color: var(--color-text-muted);
}
.draft {
  display: block;
  margin-top: calc(var(--u) * 6);
  padding-left: calc(var(--u) * 8);
  border-left: 2px solid var(--color-border);
  color: var(--color-text-muted);
}
.stars {
  display: flex;
  gap: calc(var(--u) * 2);
  margin-top: calc(var(--u) * 4);
  color: var(--tint-amber-fg);
}
.am-ui .stars .am-icon {
  width: calc(var(--u) * 13);
  height: calc(var(--u) * 13);
  fill: currentColor;
}
.job__photos small {
  color: var(--color-text-muted);
  font-size: calc(var(--u) * 10);
}

/* ============================================================
   Phone widths: the same scene, same steps, as one phone-sized chat.
   The desktop window is not shrunk; it is left out, and what it would show
   (the call, the agent at work, the invoice) arrives inline in the chat.
   agents.js uses the same breakpoint (COMPACT).
   ============================================================ */
@media (max-width: 51.99rem) {
  .scene[data-stage] .scene__window,
  .scene--big .scene__col--main,
  .scene--big .scene__col:has(.scene__phone--owner),
  .scene--big .scene__cap {
    display: none;
  }
  .scene[data-stage] .scene__phone {
    --design: 300;
    width: min(100%, 20.5rem);
    margin-inline: auto;
  }
}
/* Desktop parts when they sit inside a phone chat */
.ph__body .kcard,
.ph__body .flag {
  margin-left: 0;
}
.ph__body .kcard {
  padding: calc(var(--u) * 12);
}
.ph__body .am-msg {
  max-width: 100%;
  gap: calc(var(--u) * 8);
}
.ph__body .am-callcard {
  grid-template-columns: auto minmax(0, 1fr);
  padding: calc(var(--u) * 10) calc(var(--u) * 12);
}
.ph__body .am-callcard .am-badge {
  grid-column: 2;
  justify-self: start;
}
.ph__body .trace {
  grid-template-columns: minmax(0, 1fr) auto;
}
.ph__body .trace__src {
  grid-column: 1 / -1;
}
/* A side panel, inline: the invoice, the weekly numbers, the job report */
.pcard {
  display: grid;
  gap: calc(var(--u) * 10);
  padding: calc(var(--u) * 12);
  border-radius: calc(var(--u) * 14);
  background: var(--color-surface);
  box-shadow:
    0 0 0 1px var(--color-border),
    var(--shadow-1);
}
.pcard__title {
  font-weight: var(--weight-semibold);
}
.pcard .am-doc,
.pcard .am-doc__sync {
  padding: calc(var(--u) * 12);
}
.bub small {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.bub--photo small {
  display: none;
}

/* ---------- Footer: the policy line, then the language switch and the legal line ---------- */
.am-footer__notice {
  max-width: 48rem;
  margin-top: var(--space-10);
  color: var(--color-text-muted);
}
.am-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.am-footer__bottom .am-footer__legal {
  flex: 1 1 20rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.am-footer__legal span + span::before {
  content: ' ';
}

/* ---------- The language switch (added by the server to the header and the footer) ---------- */
.am-nav__actions .language-toggle,
.am-footer__bottom .language-toggle {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm, 0.5rem);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}
.am-nav__actions .language-toggle:hover,
.am-footer__bottom .language-toggle:hover {
  color: var(--color-text);
}
.am-footer__bottom .language-toggle {
  order: 2;
  padding: 0;
}

/* ---------- Scenes before the player takes over ----------
   Each scene's end state is written into the page (tools/bake-scenes.mjs), so it reads without JavaScript, with
   reduced motion, and to search engines. Where the player will play it, that end state stays out of sight until the
   player has the stage (it sets data-state), so the scene starts from an empty chat. If the player never runs, the
   end state shows after a few seconds. */
@keyframes am-reveal {
  to {
    visibility: visible;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .js
    .scene:not([data-state])
    :is(
      [data-thread],
      [data-pthread],
      [data-p2thread],
      [data-rail],
      [data-rail-title],
      [data-status],
      [data-title],
      [data-agent]
    ) {
    visibility: hidden;
    animation: am-reveal 0s 3s forwards;
  }
}

/* ---------- Arabic: right to left ---------- */
[dir='rtl'] {
  --font-sans: 'Noto Sans Arabic', 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
}
[dir='rtl'] .am-icon use[href$='#arrow-right'],
[dir='rtl'] .am-icon use[href$='#chevron-right'] {
  transform: scaleX(-1);
  transform-origin: center;
}

/* Four plans (the three paid plans and Custom): two across on a tablet, four across on a wide screen. */
@media (min-width: 40rem) {
  .plans--four > .am-card {
    grid-column: span 6;
  }
}
@media (min-width: 72rem) {
  .plans--four > .am-card {
    grid-column: span 3;
  }
}

/* The not-found page */
.notfound {
  padding-block: var(--space-24, 6rem);
}
.notfound .am-container {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}

/* A footer column is narrow on a phone: the support address wraps instead of widening the page. */
.am-footer__links a {
  overflow-wrap: anywhere;
}

/* Four plans across: the price (a whole phrase such as "$20 / month") stays on one line. */
.plans--four .am-card__price {
  font-size: var(--text-2xl);
}
.plans--four .am-card__price.plans__talk {
  font-size: var(--text-2xl);
}
