/* /access/ — what a visitor and an account can actually use today.
 *
 * Why this file exists
 * --------------------
 * The page's rules lived in a `<style>` block inside `templates/access.html`,
 * which meant every declaration sat in the cascade at the position of the
 * body, could not be reviewed as CSS, and could not be overridden by anything
 * except another inline block. Two other sheets were already writing rules
 * for this page's classes from outside it -- `workspaces.css` cards every
 * `.am-access__group` and gives every row title a 44px inline-flex box -- so
 * the page had three owners and no single place to read.
 *
 * Everything here is scoped under `.am-access` on `body.page-access`. Where a
 * rule has to beat `workspaces.css` (the last stylesheet in the document) it
 * does it with specificity -- one extra class, `.am-access` -- rather than
 * with ``, so the override is legible as a cascade fact rather than
 * as a shout.
 *
 * Colour comes only from the canvas tokens, so both themes and both
 * languages follow from one definition.
 */

.am-access {
  --am-access-gap: var(--c-space-6, 1.5rem);
  width: 100%;
  max-width: var(--sh-max);
  margin-inline: auto;
  padding-block: var(--sh-page-start) var(--c-space-7);
}

/* ---------------------------------------------------------------- page head
   One primary action. The funnel below explains how access builds up; the
   head answers the question a first visit arrives with, which is "can I just
   look at it". */

/* The page head is a shared canvas primitive; this sheet may not name its
   class (markets.tests.test_canvas_design pins that ownership), so the
   spacing hangs off the page's own modifier on the same element. */
.am-access__intro { margin-block-end: var(--am-access-gap); }

.am-access__note-row { margin-block-start: var(--c-space-3); }
.am-access__note { color: var(--c-text-secondary); }

.am-access__head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-block-start: 1.25rem;
}

/* 2026-09-18: the two head actions and the funnel's step actions carry
   `am-btn am-btn--primary` / `--secondary` and are drawn by the component
   layer. Neither is described here any more -- the accent-filled 10px-radius
   button this file used to draw was the only one of its shape left on the
   site, and there is one owner of what a primary action looks like. Only the
   glyph size stays, because `.am-btn` sizes `svg` and this markup hands
   lucide an `<i>` that is only an `<svg>` after the script has run. */
.am-access__primary i,
.am-access__primary svg,
.am-access__cta i,
.am-access__cta svg { inline-size: 16px; block-size: 16px; }

/* The arrow points the way the language reads. */
[dir="rtl"] .am-access__cta i[data-lucide="arrow-right"],
[dir="rtl"] .am-access__primary i[data-lucide="arrow-right"] { transform: scaleX(-1); }



/* ------------------------------------------------------------------ legend
   Collapsed by default: the five status words are self-describing, and a
   reader who wants the exact commitment opens one row instead of reading a
   glossary before the table. */

.am-access__legend { margin-block-end: var(--am-access-gap); }
.am-access__legend dl { margin: 0; padding-block-start: 0.5rem; }

.am-access__legend-row {
  display: grid;
  grid-template-columns: minmax(8rem, 10rem) 1fr;
  gap: 0.5rem 1rem;
  padding-block: 0.55rem;
  border-block-end: 1px solid var(--c-line);
}

.am-access__legend-row:last-child { border-block-end: 0; }
.am-access__legend dt { margin: 0; }

.am-access__legend dd {
  margin: 0;
  color: var(--c-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ------------------------------------------------------------ status badge
   The word is the status. The tint only repeats what the word already says,
   which is why it may be quiet and why it is never the only carrier.
   0.75rem is the floor for a label on this site. */

.am-status {
  display: inline-block;
  flex-shrink: 0;
  min-block-size: 22px;
  padding: 0.18rem 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--c-r-pill);
  background: var(--c-inset);
  color: var(--c-text-secondary);
  font-size: var(--c-t-label);
  font-weight: var(--c-w-medium);
  line-height: 1.5;
  white-space: nowrap;
}

/* 2026-09-18. Thirty-one of these render at once, and before this pass
   seventeen of them were green, five cyan and four amber: three quarters of
   the page was a coloured pill, which is the badge overload the brief names,
   and the green ones broke the house rule that green and red mean price
   movement and nothing else.
   What replaces the hues is a ladder in neutral ink, which is what the five
   words already are -- open today, open but moving, open when signed in, not
   built, by arrangement. Ink and weight carry the order; the word carries the
   meaning, exactly as markets/services/access_plans.py says it must. No
   status is told by colour alone, because none of them is told by colour. */
.am-status--available-now {
  background: color-mix(in srgb, var(--c-line) 75%, transparent);
  color: var(--c-text);
  font-weight: var(--c-w-semi);
}

.am-status--beta,
.am-status--early-access { color: var(--c-text-secondary); }

.am-status--planned,
.am-status--enterprise-pilot { color: var(--c-text-muted); }

/* ------------------------------------------------------------ capabilities
   The description is on the page rather than behind thirty-one "Details"
   toggles: a one-sentence description hidden behind a control costs a click
   to read and a row of repeated link text to skip. */

/* Seven surfaces, two up at 1024 and three at 1440 -- the reference's panel
   grid. This was two bare columns of hairline rows on the canvas, which read
   as one very long list with rules in it rather than as seven families; the
   `workspaces.css` treatment it was written against (a full-width card per
   group, 6,182px of document) was the over-correction in the other
   direction. A panel per family, and the rows inside it stay hairlines. */
.am-access__groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-block-end: var(--am-access-gap);
}

@media (min-width: 48rem) {
  .am-access__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 80rem) {
  .am-access__groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.am-access__group {
  margin: 0;
  break-inside: avoid;
}

/* Every section heading on this page is a canvas `.am-section-head` carrying
   `.am-access__head` beside it. The companion class is what this file styles:
   a stylesheet that is not canvas-2026.css must not write a rule against a
   class canvas-2026.css owns, which is the collision
   test_canvas_classes_do_not_collide_with_any_other_stylesheet exists to
   catch. Only the spacing below the heading belongs to this page anyway. */
.am-access__group > .am-access__head { margin-block-end: var(--c-space-4); }

.am-access__list { list-style: none; margin: 0; padding: 0; }

.am-access__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding-block: 0.7rem;
  border-block-end: 1px solid var(--c-line);
}

.am-access .am-access__row:last-child { border-block-end: 0; }

.am-access__row h3 {
  display: block;
  margin: 0;
  color: var(--c-text);
  font-size: 0.94rem;
  font-weight: var(--c-w-semi);
  line-height: 1.45;
}

.am-access__row h3 a {
  display: inline;
  min-height: 0;
  color: inherit;
  text-decoration: none;
  border-block-end: 1px solid transparent;
}

.am-access .am-access__row h3 a:hover {
  color: var(--c-evidence);
  border-block-end-color: currentColor;
}

.am-access__desc {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  max-width: 46ch;
  color: var(--c-text-secondary);
  font-size: 0.84rem;
  line-height: 1.6;
}

.am-access__row .am-status {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  align-self: center;
}

/* ------------------------------------------------------------------ funnel */

.am-access__funnel { margin-block-end: var(--am-access-gap); }

/* The three section headings are canvas section heads, which canvas-2026.css
   owns; this file only spaces them, through the page's own companion class. */
.am-access__funnel > .am-access__head,
.am-access__faq > .am-access__head,
.am-access__research > .am-access__head { margin-block-end: var(--c-space-4); }

.am-access__funnel-lede,
.am-access__research p {
  margin: 0 0 1.25rem;
  max-width: 60ch;
  color: var(--c-text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

.am-access__funnel-list {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

@media (min-width: 64rem) {
  .am-access__funnel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.am-access__step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
}

.am-access__step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.6rem;
  block-size: 1.6rem;
  border: 1px solid var(--c-line-strong);
  border-radius: 50%;
  color: var(--c-text-muted);
  font-size: 0.8rem;
  font-weight: var(--c-w-bold);
  font-variant-numeric: tabular-nums;
}

.am-access__step h3 {
  margin: 0 0 0.25rem;
  color: var(--c-text);
  font-size: 0.98rem;
  font-weight: var(--c-w-bold);
}

.am-access__step p {
  margin: 0 0 0.65rem;
  max-width: 46ch;
  color: var(--c-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------- FAQ */

.am-access__faq { margin-block-end: var(--am-access-gap); }

/* The four answers are `.c-disclosure`, which canvas-2026.css owns -- row,
   chevron, open state and body measure. This file wrote a second summary
   treatment with a `+`/`\2212` marker of its own, so a page that used both
   showed two markers on one row. All this file sets now is the reading
   measure, and it sets it on the page's own `.am-access__answer` rather than
   on the canvas class, for the same reason as the headings above. */
.am-access__faq .am-access__answer { max-inline-size: 68ch; }

/* -------------------------------------------------------------- disclaimer */

.am-access__disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--c-line);
  border-radius: var(--c-r-control);
  color: var(--c-text-muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.am-access__disclaimer i,
.am-access__disclaimer svg {
  flex-shrink: 0;
  inline-size: 16px;
  block-size: 16px;
  margin-block-start: 2px;
}

/* ---------------------------------------------------------------- narrow */

@media (max-width: 40rem) {
  .am-access__legend-row { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .am-access__head-actions { align-items: stretch; flex-direction: column; }
  .am-access__primary { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .am-access__primary { transition: none; }
}

@media print {
  .am-access__group,
  .am-access__step { break-inside: avoid; }
  .am-access__faq details > div { display: block; }
}
