/* ============================================================
   AtomSearch — site styles
   Design tokens come from theme.json as --wp--preset--* variables.
   This file adds the instrument layer: measurement grid, numbered
   figures, plots, and the components patterns are built from.
   ============================================================ */

:root {
  --as-ground:      var(--wp--preset--color--ground, #FFFFFF);
  --as-panel:       var(--wp--preset--color--panel, #FCFCFB);
  --as-ink:         var(--wp--preset--color--ink, #1C1D1F);
  --as-charcoal:    var(--wp--preset--color--charcoal, #424141);
  --as-body:        var(--wp--preset--color--body, #4A4E52);
  --as-graphite:    var(--wp--preset--color--graphite, #6E7377);
  --as-muted:       var(--wp--preset--color--muted, #94989C);
  --as-rule:        var(--wp--preset--color--rule, #E4E4E2);
  --as-hair:        var(--wp--preset--color--hair, #F0F0EE);

  /* Colour carries meaning here — each hue has one job and keeps it. */
  --as-signal:      var(--wp--preset--color--signal, #C2603A);   /* shopper intent */
  --as-signal-deep: var(--wp--preset--color--signal-dark, #A04E2E);
  --as-signal-wash: var(--wp--preset--color--signal-wash, #F7E9E2);
  --as-slate:       var(--wp--preset--color--slate, #45607F);    /* machine, core, API */
  --as-slate-wash:  var(--wp--preset--color--slate-wash, #E8ECF2);
  --as-moss:        var(--wp--preset--color--moss, #4F7A5F);     /* available, live */
  --as-moss-wash:   var(--wp--preset--color--moss-wash, #E5EFE8);
  --as-amber:       var(--wp--preset--color--amber, #B07F2E);    /* constraint, queued */
  --as-amber-wash:  var(--wp--preset--color--amber-wash, #F5EEDC);

  --as-grid:        rgba(28, 29, 31, .05);
  --as-signal-soft: rgba(194, 96, 58, .10);
  --as-signal-line: rgba(194, 96, 58, .28);
}

/* ---------- Primitives ---------- */

.as-label {
  font-size: var(--wp--preset--font-size--label, .6875rem);
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.as-tnum { font-variant-numeric: tabular-nums; }

.as-signal { color: var(--as-signal); }
.as-muted  { color: var(--as-muted); }
.as-ink    { color: var(--as-ink); }

/* Measurement grid down the length of the page. Decorative, so it is
   painted on a pseudo-element and hidden from assistive tech. */
.as-gridded { position: relative; }
.as-gridded::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: linear-gradient(to right, var(--as-grid) 1px, transparent 1px);
  background-size: 100px 100%;
  background-position: center top;
}
.as-gridded > * { position: relative; z-index: 1; }

/* ---------- Header ---------- */

.as-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--30);
  padding: 1.05rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--as-rule);
  background: var(--as-ground);
  position: sticky;
  top: 0;
  z-index: 30;
}

.as-brand {
  display: inline-flex;
  align-items: center;
  color: var(--as-charcoal);
  flex-shrink: 0;
}
.as-brand:hover { color: var(--as-ink); text-decoration: none; }
.as-brand svg { display: block; height: 38px; width: auto; }
@media (max-width: 600px) { .as-brand svg { height: 30px; } }

/* Hard-coded, not a Navigation block. A block theme has no Appearance → Menus
   screen, and with no menu assigned the block silently falls back to listing
   every page on the site — which on a migrated install means every leftover
   page from the old one. Three links do not justify that risk. */
.as-nav { display: flex; align-items: center; gap: 1.6rem; }
.as-nav a {
  font-size: var(--wp--preset--font-size--small);
  font-weight: 500;
  color: var(--as-graphite);
}
.as-nav a:hover,
.as-nav a[aria-current="page"] { color: var(--as-ink); text-decoration: none; }

.as-header-cta {
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  color: var(--as-panel);
  background: var(--as-ink);
  padding: .6rem 1.1rem;
  border-radius: 3px;
  white-space: nowrap;
}
.as-header-cta:hover { background: var(--as-charcoal); color: var(--as-panel); text-decoration: none; }


/* ---------- Shell ---------- */

.as-wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.as-measure { max-width: 64ch; }

/* ---------- Hero ---------- */

.as-hero { padding-block: clamp(3.5rem, 10vw, 8rem) clamp(2.5rem, 6vw, 5rem); }

.as-stamp {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--as-muted);
  margin-bottom: clamp(1.75rem, 5vw, 3.25rem);
  flex-wrap: wrap;
}
.as-stamp .as-rule-bar {
  height: 1px;
  background: var(--as-rule);
  flex: 1 1 2rem;
  max-width: 90px;
}

.as-hero h1 { margin-block: 0 clamp(1.5rem, 4vw, 2.75rem); max-width: 18ch; text-wrap: balance; }
.as-hero h1 .as-fade { color: var(--as-muted); }

.as-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: start;
  padding-top: 1.75rem;
  border-top: 1px solid var(--as-ink);
}
@media (max-width: 820px) { .as-hero-split { grid-template-columns: 1fr; } }

.as-lede {
  font-size: var(--wp--preset--font-size--lede);
  line-height: 1.5;
  color: var(--as-ink);
}

.as-keys { display: grid; gap: 1.15rem; margin: 0; }
.as-keys > div { padding-left: .875rem; border-left: 2px solid var(--as-signal); }
.as-keys dt { color: var(--as-signal); margin-bottom: .3rem; }
.as-keys dd {
  margin: 0;
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.5;
  color: var(--as-body);
}

/* ---------- Buttons ---------- */

.as-actions { display: flex; gap: .625rem; flex-wrap: wrap; }

.as-btn,
.as-btn-ghost {
  display: inline-block;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  padding: .8rem 1.4rem;
  border-radius: 3px;
  border: 1px solid transparent;
}
.as-btn { background: var(--as-ink); color: var(--as-panel); }
.as-btn:hover { background: var(--as-charcoal); color: var(--as-panel); text-decoration: none; }
.as-btn-ghost { color: var(--as-ink); border-color: var(--as-rule); font-weight: 500; }
.as-btn-ghost:hover { border-color: var(--as-ink); color: var(--as-ink); text-decoration: none; }

/* ---------- Figures ---------- */

.as-fig {
  padding-block: clamp(3.25rem, 8vw, 6rem);
  border-top: 1px solid var(--as-rule);
}

.as-fig-head,
.as-fig-body {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.125rem);
}
.as-fig-head { margin-bottom: clamp(1.875rem, 4.5vw, 3.25rem); }

/* The figure body is a two-column grid whose first column is the figure
   number gutter. Without this, the second and subsequent content blocks
   drop into that 96px gutter instead of stacking in the content column. */
.as-fig-body { row-gap: clamp(1.5rem, 4vw, 2.75rem); }
@media (min-width: 721px) {
  .as-fig-body > .as-fig-spacer { grid-column: 1; grid-row: 1; }
  .as-fig-body > *:not(.as-fig-spacer) { grid-column: 2; }
  /* Diagrams are the exception: they span the number gutter too, because
     shrinking them into the content column makes the labels unreadable. */
  .as-fig-body > .as-split { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .as-fig-head,
  .as-fig-body { grid-template-columns: 1fr; }
  .as-fig-head { gap: .75rem; }
  .as-fig-spacer { display: none; }
}

.as-fig-num { color: var(--as-signal); padding-top: .5rem; }
.as-fig-head h2 { margin-block: 0 1rem; }
.as-fig-head p {
  margin: 0;
  font-size: var(--wp--preset--font-size--medium);
  max-width: 62ch;
  color: var(--as-body);
}
.as-fig-head p + p { margin-top: .8rem; }
.as-fig-head strong { color: var(--as-ink); font-weight: 600; }

/* ---------- Two-column comparison (shopper / merchant) ---------- */

.as-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--as-rule);
  border: 1px solid var(--as-rule);
}
@media (max-width: 680px) { .as-duo { grid-template-columns: 1fr; } }

.as-duo-col { background: var(--as-panel); padding: 1.5rem 1.375rem; }
.as-duo-col header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.125rem;
}
.as-duo-col h3 { margin: 0; font-size: var(--wp--preset--font-size--base); font-weight: 600; }
.as-duo-col .as-who { color: var(--as-muted); margin-left: auto; }
.as-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.as-duo-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .7rem; }
.as-duo-col li {
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.45;
  color: var(--as-body);
  padding-left: 1rem;
  position: relative;
}
.as-duo-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 1.5px;
}
.as-duo-col li q { font-style: normal; color: var(--as-ink); quotes: "\201C" "\201D"; }

.as-shopper .as-dot,
.as-shopper li::before { background: var(--as-signal); }
.as-merchant .as-dot,
.as-merchant li::before { background: var(--as-graphite); }

/* Resolution strip beneath the two columns */
.as-resolve {
  border: 1px solid var(--as-rule);
  border-top: 0;
  background: var(--as-panel);
  padding: 1.375rem;
  display: grid;
  gap: 1rem;
}
.as-resolve-line {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .8rem .95rem;
  border: 1px solid var(--as-hair);
  border-radius: 3px;
  background: var(--as-ground);
}
.as-resolve-line .as-q {
  font-size: var(--wp--preset--font-size--small);
  color: var(--as-ink);
  font-weight: 500;
}
.as-tags { display: flex; gap: .375rem; flex-wrap: wrap; margin-left: auto; }
.as-tag {
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: .2rem .45rem;
  border-radius: 2px;
}
.as-tag.is-shopper { background: var(--as-signal-soft); color: var(--as-signal); }
.as-tag.is-merchant { background: var(--as-hair); color: var(--as-graphite); }
.as-resolve p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.55; }
.as-resolve strong { color: var(--as-ink); font-weight: 600; }

/* ---------- Plot ---------- */

.as-plot {
  border: 1px solid var(--as-rule);
  background: var(--as-panel);
  padding: clamp(1.125rem, 3vw, 1.875rem);
}
.as-plot svg { width: 100%; height: auto; display: block; overflow: visible; }

.as-plot-legend {
  display: flex;
  gap: 1.375rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--as-hair);
}
.as-plot-legend span { display: flex; align-items: center; gap: .5rem; color: var(--as-muted); }
.as-plot-legend i { width: 16px; height: 0; border-top-width: 2px; border-top-style: solid; }

/* ---------- Stage / card strips ---------- */

.as-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--as-rule);
  border: 1px solid var(--as-rule);
}
.as-strip.is-attached { border-top: 0; }
.as-strip > div { background: var(--as-panel); padding: 1.25rem 1.125rem; }
.as-strip .as-when { color: var(--as-signal); display: block; margin-bottom: .6rem; }
.as-strip h4 { margin: 0 0 .4rem; }
.as-strip p {
  margin: 0;
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.5;
  color: var(--as-body);
}

/* ---------- Layer stack (retrieval core / domain / surfaces) ---------- */

.as-layers { display: grid; gap: .625rem; }
.as-layer {
  border: 1px solid var(--as-rule);
  background: var(--as-panel);
  padding: 1.125rem 1.25rem;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 1.375rem;
  align-items: baseline;
}
@media (max-width: 640px) { .as-layer { grid-template-columns: 1fr; gap: .45rem; } }
.as-layer .as-tier { color: var(--as-muted); }
.as-layer h4 { margin: 0 0 .35rem; }
.as-layer p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.5; max-width: 60ch; }
.as-layer.is-core { border-color: var(--as-ink); border-width: 1.5px; }
.as-layer.is-core .as-tier { color: var(--as-signal); }

.as-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.as-chip {
  font-size: var(--wp--preset--font-size--small);
  font-weight: 500;
  color: var(--as-body);
  border: 1px solid var(--as-rule);
  border-radius: 3px;
  padding: .3rem .7rem;
  background: var(--as-ground);
}
.as-chip.is-live { border-color: var(--as-signal-line); color: var(--as-signal); }
.as-chip.is-next { color: var(--as-muted); border-style: dashed; }

/* ---------- Distribution table ---------- */

.as-table-scroll { overflow-x: auto; }
.as-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--as-rule);
  background: var(--as-panel);
  min-width: 620px;
}
.as-table th,
.as-table td {
  text-align: left;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--as-hair);
  font-size: var(--wp--preset--font-size--small);
  vertical-align: top;
}
.as-table thead th {
  color: var(--as-muted);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--label);
  letter-spacing: .11em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--as-rule);
  background: var(--as-ground);
}
.as-table tbody tr:last-child td { border-bottom: 0; }
.as-table td:first-child { color: var(--as-ink); font-weight: 600; }
.as-table p { margin: 0; }

.as-status {
  display: inline-block;
  font-size: var(--wp--preset--font-size--label);
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 2px;
  white-space: nowrap;
}
.as-status.is-live  { background: var(--as-signal-soft); color: var(--as-signal); }
.as-status.is-build { background: var(--as-hair); color: var(--as-graphite); }
.as-status.is-next  { color: var(--as-muted); border: 1px dashed var(--as-rule); }

/* ---------- Horizon (today vs building toward) ---------- */

.as-horizon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--as-rule);
  border: 1px solid var(--as-rule);
}
@media (max-width: 680px) { .as-horizon { grid-template-columns: 1fr; } }
.as-horizon > div { background: var(--as-panel); padding: 1.625rem 1.5rem; }
.as-horizon .as-when { color: var(--as-muted); display: block; margin-bottom: 1rem; }
.as-horizon ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .8rem; }
.as-horizon li {
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.5;
  color: var(--as-body);
  padding-left: 1.25rem;
  position: relative;
}
.as-horizon li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 9px;
  height: 1.5px;
  background: var(--as-graphite);
}
.as-horizon .is-later .as-when { color: var(--as-signal); }
.as-horizon .is-later li { color: var(--as-ink); }
.as-horizon .is-later li::before { background: var(--as-signal); }

/* ---------- Notebook ---------- */

.as-nb-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--as-ink);
  padding-bottom: .75rem;
}
.as-nb-head h3 { margin: 0; }

.as-entry {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) minmax(0, 120px);
  gap: 1.375rem;
  padding-block: 1.2rem;
  border-bottom: 1px solid var(--as-hair);
  align-items: baseline;
}
@media (max-width: 720px) { .as-entry { grid-template-columns: 1fr; gap: .45rem; } }
.as-entry .as-date { color: var(--as-muted); }
.as-entry h4 { margin: 0 0 .3rem; }
.as-entry h4 a { color: var(--as-ink); }
.as-entry h4 a:hover { color: var(--as-signal); text-decoration: none; }
.as-entry p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.5; max-width: 60ch; }
/* A post with several categories renders them as a comma-separated list, which
   is wider than this column and pushed the whole page sideways. Let it wrap. */
.as-entry .as-kind {
  color: var(--as-signal);
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.as-entry .as-kind a { color: inherit; }
@media (max-width: 720px) { .as-entry .as-kind { text-align: left; } }

/* ---------- Closing ---------- */

.as-close { padding-block: clamp(4rem, 9vw, 6.75rem); border-top: 1px solid var(--as-ink); }
.as-close h2 { max-width: 18ch; margin-block: 0 1.375rem; }
.as-close p { font-size: var(--wp--preset--font-size--medium); max-width: 56ch; margin: 0 0 1.875rem; }
.as-close .as-fine { margin-top: 1.625rem; font-size: var(--wp--preset--font-size--small); color: var(--as-muted); }

/* ---------- Footer ---------- */

.as-footer {
  border-top: 1px solid var(--as-rule);
  background: var(--as-ground);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
}
.as-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
@media (max-width: 860px) { .as-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .as-footer-grid { grid-template-columns: 1fr; } }

.as-footer .as-brand svg { height: 44px; }
.as-footer-blurb {
  margin: .9rem 0 0;
  font-size: var(--wp--preset--font-size--small);
  color: var(--as-body);
  max-width: 34ch;
}
.as-footer h4 { margin: 0 0 .75rem; font-size: var(--wp--preset--font-size--label); font-weight: 500; letter-spacing: .11em; text-transform: uppercase; color: var(--as-muted); }
.as-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.as-footer ul a { font-size: var(--wp--preset--font-size--small); color: var(--as-body); }
.as-footer ul a:hover { color: var(--as-ink); text-decoration: none; }

.as-footer-base {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--as-rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--as-muted);
}

/* ---------- Editorial / long-form documents ---------- */

.as-doc { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.as-doc-head { border-bottom: 1px solid var(--as-ink); padding-bottom: 1.25rem; margin-bottom: 2rem; }
.as-doc-head h1 { font-size: var(--wp--preset--font-size--title); margin-block: .5rem 0; }
.as-doc-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--as-muted); }

.as-prose { max-width: 68ch; }
.as-prose h2 { font-size: var(--wp--preset--font-size--subhead); margin-block: 2.25rem .75rem; }
.as-prose h3 { font-size: var(--wp--preset--font-size--heading); margin-block: 1.75rem .5rem; }
.as-prose p { margin-block: 0 1.05rem; }
.as-prose ul, .as-prose ol { margin-block: 0 1.05rem; padding-left: 1.15rem; }
.as-prose li { margin-bottom: .45rem; }
.as-prose a { text-decoration: underline; text-underline-offset: 2px; }
.as-prose hr { border: 0; border-top: 1px solid var(--as-rule); margin-block: 2rem; }

/* ---------- Contact ---------- */

.as-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--as-rule);
  border: 1px solid var(--as-rule);
}
.as-contact-grid > div { background: var(--as-panel); padding: 1.5rem 1.375rem; }
.as-contact-grid .as-when { color: var(--as-signal); display: block; margin-bottom: .6rem; }
.as-contact-grid h4 { margin: 0 0 .4rem; }
.as-contact-grid p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.5; }

/* ---------- Accessibility ---------- */

:focus-visible {
  outline: 2px solid var(--as-signal);
  outline-offset: 3px;
}

.as-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--as-ink);
  color: var(--as-panel);
  padding: .7rem 1.1rem;
  z-index: 100;
}
.as-skip:focus { left: .5rem; top: .5rem; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .as-draw { stroke-dashoffset: 0 !important; opacity: 1 !important; }
}

/* ---------- Overflow containment ----------
   Grid items default to min-width:auto, so a wide child (the distribution
   table at its 620px minimum) widens the whole column and scrolls the page
   sideways. These let the columns shrink and keep the scroll local. */
.as-fig-body > *,
.as-layer > *,
.as-entry > *,
.as-hero-split > * { min-width: 0; }
.as-table-scroll { max-width: 100%; }


/* ============================================================
   Grid ambience canvas
   Sits inside .as-gridded, above the static grid lines and below
   all content. Fixed to the viewport so marks travel past the
   page rather than scrolling with it.
   ============================================================ */

.as-grid-canvas {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   Query anatomy
   ============================================================ */

.as-anatomy {
  border: 1px solid var(--as-rule);
  background: var(--as-panel);
}

.as-anatomy-bar {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .7rem 1.125rem;
  border-bottom: 1px solid var(--as-rule);
  background: var(--as-ground);
  color: var(--as-muted);
  flex-wrap: wrap;
}
.as-anatomy-bar .as-dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--as-signal);
  box-shadow: 0 0 0 3px var(--as-signal-soft);
  flex-shrink: 0;
}

.as-query {
  padding: clamp(1.25rem, 3.5vw, 2.25rem) clamp(1.125rem, 3vw, 1.75rem);
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .1rem;
  align-items: baseline;
  font-size: clamp(1.125rem, 2.7vw, 1.75rem);
  line-height: 1.7;
  color: var(--as-ink);
  letter-spacing: -.02em;
}

.as-token {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: .1em .18em;
  border-radius: 2px;
  cursor: default;
}

/* Only the interactive build advertises itself as clickable. */
.is-interactive .as-token[data-signal] {
  cursor: pointer;
  border-bottom-color: var(--as-signal-line);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.is-interactive .as-token[data-signal]:hover {
  background: var(--as-signal-soft);
  border-bottom-color: var(--as-signal);
}
.is-interactive .as-token[aria-selected="true"] {
  background: var(--as-signal-soft);
  border-bottom-color: var(--as-signal);
  color: var(--as-signal);
}
.as-token.is-plain { color: var(--as-muted); }

.as-anatomy-readout {
  border-top: 1px solid var(--as-rule);
  background: var(--as-ground);
  padding: clamp(1.125rem, 3vw, 1.5rem);
  min-height: 8.5rem;
}

.as-anatomy-hint {
  color: var(--as-muted);
  font-size: var(--wp--preset--font-size--small);
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}
/* A display value on the element itself outranks the UA [hidden] rule, so
   anything toggled with the hidden attribute has to say so explicitly. */
.as-anatomy [hidden] { display: none; }

.as-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
}
@media (max-width: 680px) { .as-panel-grid { grid-template-columns: 1fr; gap: 1rem; } }

.as-panel-grid h4 { margin: 0 0 .5rem; }
.as-panel-grid p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.55; }
.as-panel-grid .as-kicker { display: block; margin-bottom: .55rem; }

.as-signal-row { display: grid; gap: .55rem; }
.as-signal-pair {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: baseline;
  gap: .75rem;
  font-size: var(--wp--preset--font-size--small);
}
@media (max-width: 520px) {
  .as-signal-pair { grid-template-columns: 1fr; gap: .15rem; }
}
.as-signal-pair b {
  color: var(--as-signal);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--label);
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1.5;
}
.as-signal-pair span { color: var(--as-ink); }

.as-versus {
  padding-left: 1rem;
  border-left: 2px solid var(--as-rule);
}
.as-versus .as-kicker { color: var(--as-muted); }
.as-versus p { color: var(--as-graphite); }

/* ============================================================
   Platform logos
   ============================================================ */

.as-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 1px;
  background: var(--as-rule);
  border: 1px solid var(--as-rule);
}
.as-platform {
  background: var(--as-panel);
  padding: 1.375rem 1.125rem;
  display: grid;
  gap: .7rem;
  justify-items: start;
}
.as-platform svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: var(--as-ink);
}
.as-platform .as-name {
  font-weight: 600;
  color: var(--as-ink);
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.25;
}
.as-platform.is-next svg { fill: var(--as-muted); }
.as-platform.is-next .as-name { color: var(--as-graphite); font-weight: 500; }

/* ============================================================
   Coming soon — conversational search
   ============================================================ */

.as-soon {
  border: 1px solid var(--as-signal-line);
  background: var(--as-signal-soft);
  padding: clamp(1.375rem, 3.5vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
}
@media (max-width: 720px) { .as-soon { grid-template-columns: 1fr; } }
.as-soon .as-kicker { color: var(--as-signal); display: block; margin-bottom: .6rem; }
.as-soon h3 { margin: 0 0 .6rem; }
.as-soon p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.55; }

.as-convo {
  display: grid;
  gap: .5rem;
  background: var(--as-panel);
  border: 1px solid var(--as-rule);
  border-radius: 3px;
  padding: .875rem;
}
.as-convo .as-turn {
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.45;
  padding: .5rem .7rem;
  border-radius: 3px;
}
.as-convo .is-shopper { background: var(--as-ground); color: var(--as-ink); }
.as-convo .is-system {
  background: var(--as-signal-soft);
  color: var(--as-signal);
  border: 1px solid var(--as-signal-line);
}
.as-convo .as-typing { letter-spacing: .18em; color: var(--as-muted); }

/* ============================================================
   Tinted section blocks
   A figure can sit in a tinted block instead of on white. Used
   sparingly — a run of them turns the page into a stack of
   coloured stripes and the emphasis stops meaning anything.
   ============================================================ */

.as-fig.is-tinted {
  border-top: 0;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.as-fig.is-tinted.tint-signal { background: var(--as-signal-wash); }
.as-fig.is-tinted.tint-slate  { background: var(--as-slate-wash); }
.as-fig.is-tinted.tint-moss   { background: var(--as-moss-wash); }
.as-fig.is-tinted.tint-amber  { background: var(--as-amber-wash); }

/* Cards inside a tint need to lift off it, not blend in. */
.as-fig.is-tinted .as-anatomy,
.as-fig.is-tinted .as-plot,
.as-fig.is-tinted .as-layer,
.as-fig.is-tinted .as-duo-col,
.as-fig.is-tinted .as-platform,
.as-fig.is-tinted .as-strip > div,
.as-fig.is-tinted .as-horizon > div { background: #FFFFFF; }
.as-fig.is-tinted .as-resolve { background: #FFFFFF; }
.as-fig.is-tinted .as-anatomy-bar,
.as-fig.is-tinted .as-anatomy-readout,
.as-fig.is-tinted .as-resolve-line { background: var(--as-hair); }

/* ============================================================
   Split section — a visual on one side, prose on the other
   ============================================================ */

.as-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) { .as-split { grid-template-columns: 1fr; } }

/* Flip which side the visual sits on, so a run of split sections
   alternates rather than marching down one edge. The column ratio flips
   with it — otherwise the diagram lands in the narrow column and its
   labels shrink out of legibility. */
.as-split.is-flipped { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.as-split.is-flipped .as-split-media { order: 2; }
@media (max-width: 860px) { .as-split.is-flipped .as-split-media { order: 0; } }

.as-split-media {
  margin: 0;
  max-width: 440px;
}
.as-split.is-flipped .as-split-media { margin-left: auto; }
.as-split-media svg { width: 100%; height: auto; display: block; overflow: visible; }
.as-split-media figcaption { display: none; }
.as-split-media .as-legend { display: none; }

.as-split-body h3 { display: none; }
.as-split-body p {
  margin: 0 0 .9rem;
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.6;
  max-width: 46ch;
}
.as-split-body p:last-child { margin-bottom: 0; }
.as-split-body strong { color: var(--as-ink); font-weight: 600; }

/* ============================================================
   Infographic primitives
   ============================================================ */

.as-diagram text { font-family: Onest, system-ui, sans-serif; }
.as-diagram .d-label {
  font-size: 10.5px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  fill: var(--as-muted);
}
.as-diagram .d-title { font-size: 14px; font-weight: 600; fill: var(--as-ink); }
.as-diagram .d-note  { font-size: 12px; fill: var(--as-graphite); }
.as-diagram .d-stage { font-size: 13px; font-weight: 600; }

.as-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: 1rem;
  padding-top: .875rem;
  border-top: 1px solid var(--as-hair);
}
.as-legend span { display: flex; align-items: center; gap: .45rem; color: var(--as-muted); }
.as-legend i { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }

/* Signal-type colouring, shared by the anatomy readout and the diagrams. */
.sig-intent  { color: var(--as-signal); }
.sig-machine { color: var(--as-slate); }
.sig-stock   { color: var(--as-moss); }
.sig-limit   { color: var(--as-amber); }

.as-signal-pair.is-intent  b { color: var(--as-signal); }
.as-signal-pair.is-machine b { color: var(--as-slate); }
.as-signal-pair.is-stock   b { color: var(--as-moss); }
.as-signal-pair.is-limit   b { color: var(--as-amber); }

/* Status pills pick up the functional hues too. */
.as-status.is-live  { background: var(--as-moss-wash); color: var(--as-moss); }
.as-status.is-build { background: var(--as-amber-wash); color: var(--as-amber); }
.as-status.is-next  { color: var(--as-muted); border: 1px dashed var(--as-rule); }

.as-tag.is-shopper  { background: var(--as-signal-wash); color: var(--as-signal); }
.as-tag.is-merchant { background: var(--as-slate-wash); color: var(--as-slate); }

.as-platform.is-live svg { fill: var(--as-ink); }
.as-chip.is-live { border-color: var(--as-moss); color: var(--as-moss); }

/* ============================================================
   Cookie consent
   ============================================================ */

.as-consent {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 60;
  background: var(--as-ground);
  border-top: 1px solid var(--as-ink);
  box-shadow: 0 -8px 32px rgba(28, 29, 31, .07);
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1.25rem, 4vw, 3rem);
}
.as-consent[hidden] { display: none; }

.as-consent-inner {
  max-width: 1120px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2.25rem);
  align-items: center;
}
@media (max-width: 800px) {
  .as-consent-inner { grid-template-columns: 1fr; }
}
.as-consent-inner > div > p:last-child {
  margin: .4rem 0 0;
  font-size: var(--wp--preset--font-size--small);
  max-width: 72ch;
  line-height: 1.55;
}
.as-consent-inner .as-label { margin: 0; }

.as-consent-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.as-consent-actions .as-btn,
.as-consent-actions .as-btn-ghost { cursor: pointer; font-family: inherit; }

/* ---- Settings dialog ---- */

.as-consent-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(28, 29, 31, .34);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  overflow-y: auto;
}
.as-consent-panel[hidden] { display: none; }

.as-consent-card {
  background: var(--as-ground);
  border: 1px solid var(--as-ink);
  width: min(600px, 100%);
  max-height: min(86vh, 780px);
  overflow-y: auto;
}

.as-consent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.125rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--as-rule);
  position: sticky;
  top: 0;
  background: var(--as-ground);
}
.as-consent-head h2 { margin: 0; font-size: var(--wp--preset--font-size--subhead); }
.as-consent-x {
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--as-muted);
  cursor: pointer;
  padding: 0 .25rem;
}
.as-consent-x:hover { color: var(--as-ink); }

.as-consent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.125rem clamp(1.125rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--as-hair);
}
.as-consent-row h3 { margin: 0 0 .3rem; font-size: var(--wp--preset--font-size--base); font-weight: 600; }
.as-consent-row p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.5; }
.as-consent-fixed { color: var(--as-moss); white-space: nowrap; padding-top: .2rem; }

.as-consent-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.125rem clamp(1.125rem, 3vw, 1.75rem);
}
.as-consent-foot > a { font-size: var(--wp--preset--font-size--small); }

/* ---- Switch ---- */

.as-switch { position: relative; display: inline-flex; cursor: pointer; }
.as-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.as-switch-track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--as-hair);
  border: 1px solid var(--as-rule);
  position: relative;
  transition: background-color .16s ease, border-color .16s ease;
}
.as-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--as-rule);
  transition: transform .16s ease;
}
.as-switch input:checked + .as-switch-track {
  background: var(--as-moss);
  border-color: var(--as-moss);
}
.as-switch input:checked + .as-switch-track::after {
  transform: translateX(18px);
  border-color: var(--as-moss);
}
.as-switch input:focus-visible + .as-switch-track {
  outline: 2px solid var(--as-signal);
  outline-offset: 2px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

@media (max-width: 700px) {
  .as-split-media { padding: .875rem; overflow-x: auto; }
  .as-split-media svg { min-width: 340px; }
}

/* ============================================================
   Section heads — short claim, one standfirst line, then the visual.
   Replaces the figure-number layout on the homepage, which was
   carrying four paragraphs nobody was going to read.
   ============================================================ */

.as-section-head { max-width: 62ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.as-section-head h2 { margin: 0 0 .75rem; }
.as-standfirst {
  margin: 0;
  font-size: var(--wp--preset--font-size--lede);
  line-height: 1.5;
  color: var(--as-body);
}
.as-measure-wide { max-width: 1120px; }
.as-measure-wide .as-standfirst { max-width: 56ch; }
.as-measure-wide h2 { max-width: 20ch; }

/* On the homepage the split no longer sits inside a figure grid. */
.as-fig > .as-wrap > .as-split { margin-top: 0; }

/* ============================================================
   Citations in notebook entries
   ============================================================ */

.as-prose sup {
  font-size: .7em;
  line-height: 0;
  vertical-align: super;
  font-weight: 600;
  color: var(--as-signal);
  padding-left: .1em;
}
.as-prose sup a { color: inherit; text-decoration: none; }
.as-prose sup a:hover { text-decoration: underline; }

.as-prose .as-sources {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--as-ink);
}
.as-prose .as-sources > p {
  font-size: var(--wp--preset--font-size--label);
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--as-muted);
  margin-bottom: .875rem;
}
.as-prose .as-sources ol { padding-left: 1.25rem; }
.as-prose .as-sources li {
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.5;
  color: var(--as-graphite);
  margin-bottom: .6rem;
}
.as-prose .as-sources li:target { background: var(--as-signal-wash); }

/* ============================================================
   Conversational search preview
   Marked as unbuilt on the page — this is a mockup of a roadmap
   feature, and must never read as a screenshot of something live.
   ============================================================ */

.as-convo-preview {
  border: 1px solid var(--as-rule);
  background: var(--as-panel);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}
@media (max-width: 860px) { .as-convo-preview { grid-template-columns: 1fr; } }

.as-convo-side {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-right: 1px solid var(--as-rule);
}
@media (max-width: 860px) {
  .as-convo-side { border-right: 0; border-bottom: 1px solid var(--as-rule); }
}
.as-convo-side h3 { margin: 0 0 .6rem; }
.as-convo-side p { margin: 0 0 .8rem; font-size: var(--wp--preset--font-size--small); line-height: 1.55; }
.as-convo-side p:last-child { margin-bottom: 0; }

.as-soon-flag {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: var(--wp--preset--font-size--label);
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--as-amber);
  background: var(--as-amber-wash);
  border: 1px dashed var(--as-amber);
  border-radius: 999px;
  padding: .3rem .7rem;
  margin-bottom: .9rem;
}

.as-thread {
  padding: clamp(1.125rem, 3vw, 1.5rem);
  display: grid;
  gap: .7rem;
  background: var(--as-ground);
  align-content: start;
}
.as-bubble {
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.5;
  padding: .65rem .85rem;
  border-radius: 10px;
  max-width: 90%;
}
.as-bubble.is-shopper {
  justify-self: end;
  background: var(--as-ink);
  color: var(--as-ground);
  border-bottom-right-radius: 3px;
}
.as-bubble.is-atom {
  justify-self: start;
  background: var(--as-panel);
  border: 1px solid var(--as-rule);
  color: var(--as-ink);
  border-bottom-left-radius: 3px;
}
.as-bubble .as-who-tag {
  display: block;
  font-size: var(--wp--preset--font-size--label);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--as-signal);
  margin-bottom: .35rem;
}

.as-picks { display: grid; gap: .4rem; margin-top: .6rem; }
.as-pick {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem .5rem;
  border: 1px solid var(--as-hair);
  border-radius: 5px;
  background: var(--as-ground);
}
.as-pick .sq {
  width: 26px; height: 26px; border-radius: 4px;
  background: linear-gradient(140deg, var(--as-hair), var(--as-rule));
  flex-shrink: 0;
}
.as-pick .nm { font-size: var(--wp--preset--font-size--small); color: var(--as-ink); }
.as-pick .pr {
  margin-left: auto;
  font-size: var(--wp--preset--font-size--small);
  color: var(--as-graphite);
  font-variant-numeric: tabular-nums;
}
.as-pick .tag {
  font-size: var(--wp--preset--font-size--label);
  color: var(--as-moss);
  letter-spacing: .06em;
}
.as-typing { color: var(--as-muted); letter-spacing: .2em; }


/* ============================================================
   Rhythm on long content pages
   Sections here are bare blocks in the post content rather than
   .as-fig wrappers, so they need their own vertical spacing —
   without it a heading lands directly under the figure above.

   Note the selector: wp:post-content renders an .entry-content
   wrapper between .as-wrap and the blocks, so a child combinator
   from .as-wrap matches nothing.
   ============================================================ */

.as-doc .entry-content > h2 {
  margin-top: clamp(3.75rem, 8vw, 6.5rem);
  margin-bottom: .75rem;
}
.as-doc .entry-content > h2:first-child { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.as-doc .entry-content > .as-standfirst { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.as-doc .entry-content > .as-anatomy { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.as-doc .entry-content > .as-prose { margin-top: clamp(2.25rem, 4vw, 3rem); }

/* A figure is the end of its section; the next heading provides the gap. */
.as-doc .entry-content > .as-split,
.as-doc .entry-content > .as-convo-preview,
.as-doc .entry-content > .as-table-scroll { margin-block: 0; }

/* Prose runs that follow a figure need air of their own. */
.as-doc .entry-content > .as-prose > h2:first-child { margin-top: 0; }

/* ---------- Industries ---------- */

.as-industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--as-rule);
  border: 1px solid var(--as-rule);
}
.as-industry {
  background: var(--as-panel);
  padding: clamp(1.375rem, 3vw, 2rem);
  display: block;
  color: inherit;
}
a.as-industry:hover { background: var(--as-signal-wash); text-decoration: none; }
.as-industry > .as-label { color: var(--as-moss); display: block; margin-bottom: .7rem; }
.as-industry.is-next > .as-label { color: var(--as-muted); }
.as-industry h3 { margin: 0 0 .5rem; }
.as-industry p { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.55; color: var(--as-body); }
.as-industry.is-next h3, .as-industry.is-next p { color: var(--as-muted); }
.as-industry-go { display: block; margin-top: 1rem; color: var(--as-signal); }

/* ---------- Blog index call to action ---------- */

.as-blog-cta {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--as-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.as-blog-cta p { margin: 0; font-size: var(--wp--preset--font-size--lede); color: var(--as-ink); }

/* ---------- Capability grid ---------- */

/* Six cards. auto-fit gave 4+2 with two dead cells, so the columns are
   explicit: a clean 3x2, then 2x3, then a single column. */
.as-capabilities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .as-capabilities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .as-capabilities { grid-template-columns: 1fr; } }
.as-capabilities h4 { color: var(--as-ink); }

/* ---------- Community band ---------- */

.as-community { max-width: 62ch; }
.as-community .as-mark {
  width: 46px;
  height: auto;
  color: var(--as-charcoal);
  display: block;
  margin-bottom: 1.25rem;
}
.as-community h2 { margin: 0 0 .75rem; }
.as-community p {
  margin: 0 0 1.5rem;
  font-size: var(--wp--preset--font-size--lede);
  line-height: 1.5;
  color: var(--as-body);
}

/* ============================================================
   Early-access form
   ============================================================ */

.as-form {
  display: grid;
  gap: 1.125rem;
  max-width: 30rem;
  border: 1px solid var(--as-rule);
  background: var(--as-panel);
  padding: clamp(1.375rem, 3vw, 2rem);
}

.as-field { display: grid; gap: .4rem; }
.as-field label {
  font-size: var(--wp--preset--font-size--label);
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--as-graphite);
}
.as-field label span {
  color: var(--as-muted);
  letter-spacing: .06em;
}
.as-field input,
.as-field textarea {
  font: inherit;
  font-size: var(--wp--preset--font-size--medium);
  color: var(--as-ink);
  background: var(--as-ground);
  border: 1px solid var(--as-rule);
  border-radius: 3px;
  padding: .7rem .85rem;
  width: 100%;
}
.as-field textarea { resize: vertical; line-height: 1.5; }
.as-field input::placeholder,
.as-field textarea::placeholder { color: var(--as-muted); }
.as-field input:focus,
.as-field textarea:focus {
  outline: none;
  border-color: var(--as-signal);
  box-shadow: 0 0 0 3px var(--as-signal-soft);
}
.as-field input:user-invalid { border-color: var(--as-signal); }

.as-form button { cursor: pointer; font-family: inherit; border: 0; justify-self: start; }
.as-form button[disabled] { opacity: .55; cursor: default; }

.as-form-note {
  margin: 0;
  font-size: var(--wp--preset--font-size--small);
  color: var(--as-muted);
  line-height: 1.5;
}

.as-form-status {
  margin: 0;
  font-size: var(--wp--preset--font-size--small);
  padding: .7rem .85rem;
  border-radius: 3px;
  line-height: 1.5;
}
.as-form-status[hidden] { display: none; }
.as-form-status.is-ok {
  background: var(--as-moss-wash);
  color: var(--as-moss);
  border: 1px solid var(--as-moss);
}
.as-form-status.is-error {
  background: var(--as-signal-wash);
  color: var(--as-signal-deep);
  border: 1px solid var(--as-signal);
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.as-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.as-form-fallback {
  border: 1px solid var(--as-rule);
  background: var(--as-panel);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 30rem;
}
.as-form-fallback p { margin: 0 0 1rem; font-size: var(--wp--preset--font-size--medium); }


/* ---------- Header on small screens ----------
   Logo and CTA on one row, links beneath. Simpler and more reliable than a
   hamburger for three links. */

@media (max-width: 720px) {
  .as-header {
    flex-wrap: wrap;
    row-gap: .875rem;
    padding-block: .875rem;
  }
  .as-header .as-brand { order: 1; }
  .as-header .as-header-cta { order: 2; margin-left: auto; }
  .as-header .as-nav {
    order: 3;
    width: 100%;
    gap: 1.25rem;
    padding-top: .75rem;
    border-top: 1px solid var(--as-rule);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .as-header .as-nav a { white-space: nowrap; }
}

/* ---------- Capability icons ---------- */

.as-cap-icon {
  width: 26px;
  height: 26px;
  display: block;
  margin-bottom: .9rem;
  color: var(--as-signal);
}
.as-capabilities > div { padding-top: 1.375rem; }
