/* LinkCardsComponent (app/components/link_cards_component.rb): places to go, as cards. The Threat Assessment page, the offices whose caseload a person may open and the way on from a list were
   a column of underlined words with a hairline between them, and nothing said they were doors. Each is one link that is the whole card: its title in the accent, a sentence under it, a badge for a
   count or a state, and an arrow at the end that says where it goes. They sit in a grid that wraps, so a hub is a set of doors side by side on a wide screen and a stack on a phone.

   The card is one target and has no control inside it. Its hover is the border and a soft shadow, and the arrow is there at rest, so a hover is never the only sign that it is a link (AGENTS.md
   section 11: no function is hover-only); focus is the global ring.

   Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so it reads on the light shell and the console, in light and in dark, and mirrors in a
   right-to-left language (the arrow turns round there). Nothing pinned to an edge, no height in vh, and everything that holds words may shrink and wrap (WCAG 1.4.10). */

.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-3);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-cards > li {
  display: grid;
  min-inline-size: 0;
}

.link-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--space-1);
  min-inline-size: 0;
  padding-block: var(--space-3);
  padding-inline: var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.link-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-soft);
  color: inherit;
}

/* The arrow is decoration: the second `content` gives it an empty alternative text, so assistive technology does not read "right arrow" after every title; a browser that does not know the
   syntax drops that declaration and keeps the first. */
.link-card::after {
  content: "\2192";
  content: "\2192" / "";
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-end: var(--space-4);
  color: var(--accent-text);
  line-height: 1.35;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.link-card:dir(rtl)::after {
  content: "\2190";
  content: "\2190" / "";
}
.link-card:hover::after {
  transform: translateX(2px);
}
.link-card:dir(rtl):hover::after {
  transform: translateX(-2px);
}

/* Room for the arrow at the end of the title line. */
.link-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  min-inline-size: 0;
  padding-inline-end: var(--space-5);
}

.link-card__title {
  min-inline-size: 0;
  color: var(--accent-text);
  font-size: var(--text-base);
  font-weight: 650;
  line-height: 1.35;
}

.link-card__badge {
  min-inline-size: 0;
}

.link-card__about {
  min-inline-size: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  line-height: 1.45;
}

@media (pointer: coarse) {
  .link-card {
    min-block-size: var(--target-min);
  }
}
