/* HomeBriefingComponent (app/components/home_briefing_component.rb): "Start here" on /home. The first section of the page (PageSectionComponent, 42-page-section.css): how many places it found (or its one
   sentence), an ordered list of entry cards (EntryComponent, 43-entry-list.css) each with the model's sentence under the person and the office, the small button the page's script presses for the person,
   "Try again" or "Refresh" at the end of the heading row, and the note that says what it read.

   THE FRAME TAKES NO ROOM UNTIL IT HAS SOMETHING. The slot is an empty Turbo Frame that loads after the page, and it stays empty when the briefing is off or this reader may not ask. A grid gives an
   empty child its row and its gap, so an empty frame put a blank strip of `--section-gap` above the next section; with nothing in it the frame is not drawn.

   THE PLUM PANEL. On the console home (feature/home-console) "Start here" is the one dark panel on the page: `--plum` for the field and `--on-plum` for every word on it, in light and in dark
   alike (both are the same in every mode, because the panel is dark in every mode). Each suggestion is a numeral in the display face, italic and in `--gold-bright`, then its title as a link set
   in `--on-plum` and underlined in the gold, then the person and office and the model's sentence. The numeral is a CSS counter on the ordered list, so the markup is unchanged and the
   numeral is hidden from assistive technology (the list already counts). The pairs this uses are measured in config/contrast_pairs.yml: `on-plum` and `gold-bright` as text on `plum`, `plum` as text
   on `on-plum` (a hovered button turns inside out), and the focus ring on `plum`. The buttons ("Try again", "Refresh", the one the script presses) are outlined in `--on-plum` here.

   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. Nothing pinned to an edge, no height in vh, and everything that holds words may shrink and wrap (WCAG 1.4.10). */

.home-briefing-frame {
  display: block;
  min-inline-size: 0;
}

.home-briefing-frame:not(:has(*)) {
  display: none;
}

.home-briefing-ask,
.home-briefing-again,
.home-briefing-refresh {
  margin: 0;
}

/* The model's sentence is what the suggestion is for: said at the working size, in the working color, apart from the quiet line above it. */
.home-briefing-item-why,
.home-briefing-item-more {
  margin: 0;
  overflow-wrap: anywhere;
}
/* What else is owed on the same case is a fact about the list, not the model's: set apart from its sentence by weight. */
.home-briefing-item-more {
  font-weight: 600;
}

/* ── The plum panel ────────────────────────────────────────────────────── */
.home-briefing {
  position: relative;
  gap: var(--space-3);
  padding: var(--space-4) 1.25rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--plum);
  color: var(--on-plum);
}

/* Four gold and purple squares in the corner, the brand's tile: decoration, so it takes no room (it is out of the flow), is not read, and the heading row keeps clear of it. */
.home-briefing::after {
  content: "";
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-end: var(--space-4);
  inline-size: 49px;
  block-size: 23px;
  opacity: 0.55;
  pointer-events: none;
  background:
    linear-gradient(var(--gold-bright), var(--gold-bright)) 0 0 / 10px 10px no-repeat,
    linear-gradient(var(--color-purple-bright), var(--color-purple-bright)) 13px 0 / 10px 10px no-repeat,
    linear-gradient(var(--color-purple), var(--color-purple)) 26px 0 / 10px 10px no-repeat,
    linear-gradient(var(--color-purple-bright), var(--color-purple-bright)) 39px 0 / 10px 10px no-repeat,
    linear-gradient(var(--color-purple), var(--color-purple)) 0 13px / 10px 10px no-repeat,
    linear-gradient(var(--color-purple-bright), var(--color-purple-bright)) 13px 13px / 10px 10px no-repeat,
    linear-gradient(var(--gold-bright), var(--gold-bright)) 26px 13px / 10px 10px no-repeat,
    linear-gradient(var(--color-purple), var(--color-purple)) 39px 13px / 10px 10px no-repeat;
}

.home-briefing .page-section__head {
  padding-block-end: 0;
  padding-inline-end: 4.25rem;
  border-block-end: 0;
}

.home-briefing .page-section__title {
  color: var(--on-plum);
  font-weight: 600;
}

.home-briefing :is(.page-section__note, .page-section__lede, .page-note) {
  color: var(--on-plum);
  font-size: var(--text-xs);
}

/* The suggestions: a numeral in the margin, then the title, who and where, and the model's sentence. */
.home-briefing-list {
  gap: var(--space-3);
  counter-reset: home-briefing;
}

.home-briefing .home-briefing-item {
  position: relative;
  gap: 0.125rem;
  padding-block: 0;
  padding-inline: 2rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--on-plum);
  counter-increment: home-briefing;
}

.home-briefing .home-briefing-item::before {
  content: counter(home-briefing);
  content: counter(home-briefing) / "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  font-variant-numeric: lining-nums;
  line-height: 1;
}

.home-briefing .entry__title {
  font-weight: 800;
}

.home-briefing .entry__title a {
  color: var(--on-plum);
  text-decoration: underline;
  text-decoration-color: var(--gold-bright);
  text-underline-offset: 3px;
}

.home-briefing .entry__title a:is(:hover, :focus-visible) {
  text-decoration-thickness: 2px;
}

.home-briefing .entry__meta,
.home-briefing .home-briefing-item-why,
.home-briefing .home-briefing-item-more {
  color: var(--on-plum);
}

.home-briefing .home-briefing-item-why,
.home-briefing .home-briefing-item-more {
  font-size: var(--text-sm);
}

/* The buttons are outlined in the panel's own text color, and turn inside out on hover. */
.home-briefing .btn-secondary {
  --btn-fg: var(--on-plum);
  --btn-border: var(--on-plum);
}

.home-briefing .btn-secondary:hover:where(:not(:disabled, [aria-disabled="true"])) {
  border-color: var(--on-plum);
  background: var(--on-plum);
  color: var(--plum);
}
