/* Generated from packages/ui-web/src/scope-grid.css by scripts/export-django-static.mjs. Edit the source. */
/* @aents/ui-web · scope grid
   ------------------------------------------------------------------
   Above the phone rail the cards are a grid. Below it the shared peek
   rail owns the layout, so everything about the grid stays behind this
   query — an app rule outside one would win the tie by load order. */
@media (min-width: 561px) {
  .aents-scope-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spacing-lg);
  }

  /* Only while it is a grid: in the phone rail the cards stretch on
     their own, and a height here would stop them. */
  .aents-scope-grid > * {
    height: 100%;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  .aents-scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.aents-scope-grid > * {
  min-width: 0;
}

.aents-scope-card {
  height: 100%;
}

/* The default accent, for a consumer that does not colour its cards. */
.aents-scope-card {
  --aents-scope-accent: var(--primary);
}

.aents-scope-card[data-accent="green"] {
  --aents-scope-accent: var(--green);
}

.aents-scope-card[data-accent="teal"] {
  --aents-scope-accent: var(--teal);
}

.aents-scope-card[data-accent="purple"] {
  --aents-scope-accent: var(--purple);
}

.aents-scope-card[data-accent="info"] {
  --aents-scope-accent: var(--info);
}

.aents-scope-card[data-accent="lavender"] {
  --aents-scope-accent: var(--lavender);
}

.aents-scope-card[data-accent="amber"] {
  --aents-scope-accent: var(--amber);
}

/* The cards sit on a white band and keep only their gradient edge:
   filling them with the page's own ground, instead of the raised grey
   surface, leaves the border as the single thing that separates card
   from section. The dark scheme still needs the lift, so it keeps the
   surface fill. */
.aents-scope-card .aents-spotlight__content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  background: var(--background);
}

[data-scheme="dark"] .aents-scope-card .aents-spotlight__content {
  background: var(--surface);
}

/* Some titles take a second line and some do not. The heading always
   reserves both, so every description starts at the same height and the
   row reads as one row rather than as ragged cards. */
.aents-scope-card__heading {
  display: grid;
  grid-template-columns: var(--control-lg) minmax(0, 1fr);
  gap: var(--spacing-md);
  align-items: center;
  min-height: calc(var(--type-h3-line) * 2);
}

.aents-scope-card__icon {
  display: grid;
  width: var(--control-lg);
  height: var(--control-lg);
  place-items: center;
  color: var(--aents-scope-accent);
  border: 1px solid
    color-mix(in srgb, var(--aents-scope-accent) 28%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--aents-scope-accent) 10%, var(--surface));
  box-shadow: 0 10px 24px
    color-mix(in srgb, var(--aents-scope-accent) 14%, transparent);
}

/* One anchor stretched over the card: the whole surface is clickable,
   there is a single tab stop, and what a screen reader announces is the
   title rather than the three blocks of the card read as one link. */
.aents-scope-card__link {
  color: inherit;
  text-decoration: none;
}

.aents-scope-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Amber, teal and green alone fall under 3:1 on the white card, so the title
   takes the accent mixed into the text colour, as the footer chip does. */
.aents-scope-card:hover .aents-scope-card__link,
.aents-scope-card__link:focus-visible {
  color: color-mix(in srgb, var(--aents-scope-accent) 45%, var(--text));
}

/* The ring moves to the stretched area so it outlines the whole card; it is
   the site-wide ring, not the accent, which on amber falls to 2:1. */
.aents-scope-card__link:focus-visible {
  outline: none;
}

.aents-scope-card__link:focus-visible::after {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* The middle band is the same height in every card — three lines, which
   is what the longest of them needs — so the rule above the footer falls
   at the same place whether the card took one line to explain or three. */
.aents-scope-card__description {
  flex: 1;
  min-width: 0;
  min-height: calc(var(--type-body-line) * 3);
}

.aents-scope-card__signal {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: max(0.8125rem, var(--type-caption-size));
}

/* The accent alone (amber, teal) is under 3:1 on the light tint; mixed into
   the text colour it keeps its hue and reads at 4.5:1. */
.aents-scope-card__signal :where(code, span:last-child) {
  padding: 3px var(--spacing-sm);
  color: color-mix(in srgb, var(--aents-scope-accent) 45%, var(--text));
  border-radius: var(--radius-full);
  background: color-mix(
    in srgb,
    var(--aents-scope-accent) 8%,
    var(--surface-alt)
  );
}

.aents-scope-card__signal code {
  font-family: var(--font-mono);
}
