/* Graylark LRM: the brand layer, loaded after the theme (styles_v7.css) by nav-layout and the public pages.
 *
 * Always on since 7 October 2026 (the ui.refresh.enabled switch is gone). The first version, on
 * 2 October, re-dressed the whole product in the marketing site's colours; the review kept the motion
 * (graylark-motion.js: stat tiles arriving in sequence, their figures counting up, progress bars
 * growing from the left) and the public pages' dark top bar, which the public pages' own stylesheet
 * (graylark-public.css, 7 October) has since replaced. Plus the optional flat page header
 * (.header-flat) behind ui.header.particles.enabled or ?header=flat, which the particle animation
 * stays the default for. docs/ui-refresh.md has the account; the brand tokens below are what
 * graylark-public.css paints with. And one contrast fix the theme lacks: pills whose text meets AA.
 */

/* ----------------------------------------------------------------- tokens
 * The marketing site's palette (site.css), under the same names. Not yet applied to components. */

:root {
  --slate: #495a58;
  --slate-deep: #3f4a49;
  --ink: #263130;
  --ink-2: #1c2423;
  --sand: #dcd9d0;
  --sand-2: #e9e7e0;
  --paper: #f4f3ee;
  --clay: #d4967d;
  --clay-deep: #c4826a;
  --clay-soft: #ecc9b8;
  --rust: #9c5a40;
  --navy: #272f3b;         /* the product's own chrome: sidebar, card headers, the public pages' top bar */
  --mint: #9fb3ad;
  --moss: #6b8e7a;
  --amber: #d9a85c;
  --late: #c96b55;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ------------------------------------------------------------ page header
 * The flat header: the viewer chose ?header=flat, or ui.header.particles.enabled is off. */

.header-flat .page-header.bg-gradient-gray {
  background-color: var(--navy) !important;
  background-image: none !important;
}
.header-flat #particles-js { display: none !important; }

/* ----------------------------------------------------------------- motion
 * The tiles (cards that lift on hover, graylark-motion.js's definition too) and progress bars that
 * are animated in must never be shown, taken away and shown again. So they are hidden from the first paint: the layout adds gl-prepaint to
 * <html> in the head, and these rules hold the tiles faint and the bars at zero width until the
 * script takes over, puts its own gl-reveal on the tiles, and removes gl-prepaint. If the script
 * never runs (blocked, failed), the zero-length animation with a 1.5s delay shows everything.
 * Then, as a row comes into view, each tile gets gl-in 90ms after the one before. */

html.gl-prepaint .card.lift:not(.nudge-item) { opacity: 0; transform: translateY(10px); animation: gl-failsafe 0s 1.5s forwards; }
html.gl-prepaint .progress .progress-bar { transform: scaleX(0); transform-origin: left center; animation: gl-failsafe-bar 0s 1.5s forwards; }
@keyframes gl-failsafe { to { opacity: 1; transform: none; } }
@keyframes gl-failsafe-bar { to { transform: none; } }

.gl-reveal { opacity: 0; transform: translateY(10px); }
.gl-reveal.gl-in { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html.gl-prepaint .card.lift:not(.nudge-item),
  html.gl-prepaint .progress .progress-bar,
  .gl-reveal, .gl-reveal.gl-in { opacity: 1; transform: none; transition: none; animation: none; }
}

/* --------------------------------------------------------------- pill ink
 * Every pill's text meets WCAG AA (4.5:1). Templates append a status colour to "badge text-white"
 * (the change, jurisdiction, record, question and health pills take theirs from their enums), and
 * white fails on the theme's light backgrounds: about 2.1:1 on amber (bg-warning and bg-yellow are the
 * same colour), 3.0:1 on green, 1.9:1 on cyan, 2.1:1 on the light slate. So a light pill takes the
 * theme's dark ink here whatever its text class (5:1 on green, 7:1 on amber): both rules are
 * !important and this one is more specific. The two mid tones that fail with either ink take a
 * slightly deeper shade of their own colour in a pill, with white. StatusPillContrastGuardTest reads
 * this block and the theme's colours and fails a pill under 4.5:1. */

:root {
  --pill-iris: #6e719c;    /* bg-secondary-supporting-8 in a pill: white 4.7:1 (the theme's is 4.4:1) */
  --pill-moss: #5d7c6a;    /* bg-secondary-supporting-11 in a pill: white 4.6:1 (the theme's is 3.6:1) */
  --pill-mauve: #886d79;   /* bg-secondary-supporting-12 in a pill: white 4.7:1 (the theme's is 3.3:1) */
}

.badge.bg-warning,
.badge.bg-yellow,
.badge.bg-green,
.badge.bg-success,
.badge.bg-info,
.badge.bg-cyan,
.badge.bg-teal,
.badge.bg-orange,
.badge.bg-light,
.badge.bg-white,
.badge.bg-secondary-supporting-2,
.badge.bg-secondary-supporting-3,
.badge.bg-secondary-supporting-4,
.badge.bg-secondary-supporting-5,
.badge.bg-secondary-supporting-6,
.badge.bg-secondary-supporting-7 {
  color: var(--bs-dark) !important;
}

.badge.bg-secondary-supporting-8 { background-color: var(--pill-iris) !important; color: var(--bs-white) !important; }
.badge.bg-secondary-supporting-11 { background-color: var(--pill-moss) !important; color: var(--bs-white) !important; }
.badge.bg-secondary-supporting-12 { background-color: var(--pill-mauve) !important; color: var(--bs-white) !important; }

/* ---------------------------------------------------------------- selects
 * The theme gives a select's text a line-height of 1, too short for its descenders: "All Trigger Events" read clipped
 * and sat high (QA, 20 Nov 2026, Admin > Legal Advice). 437 selects carried style="line-height: 1.4" for it and 246
 * did not, so it is every select's now and no template can miss it. A small select keeps the theme's (compact rows);
 * a floating label's select keeps its own (more specific in the theme). */
.form-select { line-height: 1.4; }
.form-select-sm { line-height: 1; }

/* --------------------------------------------------------- search results
 * The agreement search (fragments/agreement-provisions.html, fragments/search-relevance.html): how well each
 * result matches, as a five-bar meter rising left to right with the bars it earns filled; the snippet of a
 * provision's text around its matches; its whole text, kept in its own lines and scrolled when long; the dots
 * between an agreement's details. The theme's own colours, nothing new. */

.gl-relevance { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; color: var(--bs-gray-700); }
.gl-relevance-meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 0.9rem; }
.gl-relevance-meter > span { width: 4px; border-radius: 1px; background-color: var(--bs-gray-300); }
.gl-relevance-meter > span:nth-child(1) { height: 40%; }
.gl-relevance-meter > span:nth-child(2) { height: 55%; }
.gl-relevance-meter > span:nth-child(3) { height: 70%; }
.gl-relevance-meter > span:nth-child(4) { height: 85%; }
.gl-relevance-meter > span:nth-child(5) { height: 100%; }
.gl-relevance-meter > span.on { background-color: var(--bs-primary); }

.gl-search-title { min-width: 0; }
.gl-search-meta { display: flex; flex-wrap: wrap; align-items: center; }
.gl-search-meta > span + span::before { content: "\00B7"; margin: 0 0.4rem; }
.small .gl-relevance .small { font-size: inherit; }
.gl-snippet { line-height: 1.55; color: var(--bs-gray-800); }
.gl-provision-text {
  white-space: pre-line;
  max-height: 28rem;
  overflow-y: auto;
  padding-left: 1rem;
  border-left: 3px solid var(--bs-gray-300);
  color: var(--bs-gray-800);
}

/* ----------------------------------------------------------------- zero tiles
 * A stat tile whose figure is zero has nothing to act on, so it gives up its colour and the tiles with work in them
 * lead: the country Change Proposals tab drew four solid "0" obligation tiles larger than its one change awaiting a
 * response (QA, 27 October 2026). A zero tile is a quiet grey, never white: it sits on white card bodies, where a
 * white tile had no edge (review, the same day). Applied with th:classappend on the tile; the theme's bg-* and text-*
 * utilities are !important, so these are too. The theme's own greys: 700 ink on 200 is about 6.5:1. */

.card.gl-tile-zero {
  background-color: var(--bs-gray-200) !important;
  border: 0;
  box-shadow: none !important;
}
/* The card's own ink too: a tile's figure carries no ink class and takes the card's, so a text-white card left its
 * zero white on grey (seen 7 November 2026, on the action centre and the country tab alike). */
.card.gl-tile-zero.text-white,
.card.gl-tile-zero.text-dark,
.card.gl-tile-zero .text-white,
.card.gl-tile-zero .text-white-75,
.card.gl-tile-zero .text-dark,
.card.gl-tile-zero .text-black-75 { color: var(--bs-gray-700) !important; }
.card.gl-tile-zero .text-white-50,
.card.gl-tile-zero .text-black-50 { color: var(--bs-gray-500) !important; }
.card.gl-tile-zero .card-footer { background-color: transparent; border-top-color: var(--bs-gray-300); }

/* ------------------------------------------------------ tiles that do nothing
 * The theme's .lift raises a card on hover, which says "click me". On 185 tiles across the app nothing answered the
 * click (review, 7 November 2026): the Change Proposals pipeline and ERB activity tiles, the Landscape figures, the
 * dashboards' counts. A lifted card now rises only if it does something: it is a link, a button or carries a click
 * itself, it sits inside one, or it holds one (a stretched link, a footer link, a menu). The others keep their resting
 * shadow and stay put. A browser without :has() drops the rule and lifts them all, as before. graylark-motion.js still
 * knows a tile by .card.lift, so the dead ones still arrive in sequence. LiftOnlyWhenClickableGuardTest fails a card
 * made clickable in a way this list does not know. */

.lift:not(a, button, [onclick], [hx-get], [hx-post], [data-bs-toggle]):not(a *, button *, [onclick] *, [hx-get] *, [hx-post] *, [data-bs-toggle] *):not(:has(a, button, [onclick], [hx-get], [hx-post], [data-bs-toggle])):is(:hover, :active) {
  transform: none;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
}
.lift-sm:not(a, button, [onclick], [hx-get], [hx-post], [data-bs-toggle]):not(a *, button *, [onclick] *, [hx-get] *, [hx-post] *, [data-bs-toggle] *):not(:has(a, button, [onclick], [hx-get], [hx-post], [data-bs-toggle])):is(:hover, :active) {
  transform: none;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(33, 40, 50, 0.2);
}

/* ------------------------------------------------------- tiles that open a list
 * A tile whose footer button opens a list below its row (the Change Proposals action centre,
 * fragments/widgets/action-centre.html) is pressed while the list is open, its button reads Hide instead of Show and
 * its chevron points up. All three read Bootstrap's aria-expanded on the button, which the collapse keeps true for the
 * open list and false for the one it closed, so no script keeps them in step. The ring is white inside navy, so it
 * shows on the light page body and where the strip overlaps the dark page header (a single business unit and no
 * headline row: the country view, a viewer who does not create changes). A list scrolled to (js/widgets/action-centre.js)
 * stops below the fixed top bar. The button wears no button chrome: it reads as the footer links of the tiles beside it. */

.card.gl-tile-toggle:has(> .card-footer [aria-expanded="true"]) {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--bs-white);
}
.gl-tile-toggle-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
}
.gl-tile-toggle [aria-expanded="true"] .gl-when-closed,
.gl-tile-toggle [aria-expanded="false"] .gl-when-open { display: none; }
.gl-tile-toggle .gl-tile-chevron svg { transition: transform 0.2s var(--ease); }
.gl-tile-toggle [aria-expanded="true"] + .gl-tile-chevron svg { transform: rotate(180deg); }
[data-action-worklist] { scroll-margin-top: 5rem; }

@media (prefers-reduced-motion: reduce) {
  .gl-tile-toggle .gl-tile-chevron svg { transition: none; }
}

/* ---------------------------------------------------------- detail cards
 * Home's summary cards (home/home.html, home/workspace.html), moved here unchanged so the Rep Portal's landing page
 * (modules/rep/landing.html) draws its Needs Attention, Coming Up and Your Role cards with the same look. */

/* Detail cards inside the expanded summary */
.home-detail-card { border: 0; }
/* Big icon on the left + stacked content on the right — matches the tip-of-the-day card,
   so all three overlap cards share the same feather-xl icon size (the baseline). */
.home-detail-card .card-body { display: flex; align-items: stretch; gap: 1.5rem; }
.home-detail-icon { flex-shrink: 0; align-self: flex-start; stroke-width: 1.75; }
.home-detail-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.home-detail-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

/* Items rendered as soft translucent tiles — no separator lines. */
.home-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.45rem;
  text-decoration: none;
  transition: background-color 0.12s ease-in-out;
}
.home-detail-item + .home-detail-item { margin-top: 0.4rem; }
/* Item tiles change background on hover — never underline (beats Bootstrap's global a:hover). */
.home-detail-item:hover,
.home-detail-item:hover .home-detail-title { text-decoration: none; }
.home-detail-item .home-detail-title { font-weight: 500; }
.home-detail-item .home-detail-date { font-size: 0.78rem; white-space: nowrap; opacity: 0.85; }
.home-detail-more {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}
.home-detail-more:hover { text-decoration: underline; }
.home-detail-empty { opacity: 0.9; font-size: 0.88rem; }

.home-detail-upcoming { background: #3d4c70; color: #fff; }
.home-detail-upcoming .home-detail-icon { color: rgba(255, 255, 255, 0.6); }
.home-detail-upcoming .home-detail-eyebrow,
.home-detail-upcoming .home-detail-empty { color: #fff; }
.home-detail-upcoming .home-detail-item { background: rgba(255, 255, 255, 0.12); color: #fff; }
.home-detail-upcoming .home-detail-item:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.home-detail-upcoming .home-detail-more { color: #fff; }

/* Needs-attention card colour escalates with the highest nudge level: calm blue → amber → red.
   Hues line up with the nudge accents (#3b82f6 / #f59e0b / #ef4444), deepened for a legible
   full-card fill. Blue & red carry white text; amber keeps dark text. */
.home-attention-info { background: #3b82f6; color: #fff; }
.home-attention-info .home-detail-icon { color: rgba(255, 255, 255, 0.7); }
.home-attention-info .home-detail-eyebrow,
.home-attention-info .home-detail-empty { color: #fff; }
.home-attention-info .home-detail-item { background: rgba(255, 255, 255, 0.16); color: #fff; }
.home-attention-info .home-detail-item:hover { background: rgba(255, 255, 255, 0.26); color: #fff; }
.home-attention-info .home-detail-more { color: #fff; }

.home-attention-warning { background: #f59e0b; color: #3a2c00; }
.home-attention-warning .home-detail-icon { color: rgba(58, 44, 0, 0.6); }
.home-attention-warning .home-detail-eyebrow,
.home-attention-warning .home-detail-empty { color: #3a2c00; }
.home-attention-warning .home-detail-item { background: rgba(0, 0, 0, 0.09); color: #3a2c00; }
.home-attention-warning .home-detail-item:hover { background: rgba(0, 0, 0, 0.16); color: #3a2c00; }
.home-attention-warning .home-detail-more { color: #3a2c00; }

.home-attention-danger { background: #c53030; color: #fff; }
.home-attention-danger .home-detail-icon { color: rgba(255, 255, 255, 0.75); }
.home-attention-danger .home-detail-eyebrow,
.home-attention-danger .home-detail-empty { color: #fff; }
.home-attention-danger .home-detail-item { background: rgba(255, 255, 255, 0.16); color: #fff; }
.home-attention-danger .home-detail-item:hover { background: rgba(255, 255, 255, 0.26); color: #fff; }
.home-attention-danger .home-detail-more { color: #fff; }

/* Home's Needs Attention card while the workspace loads (home/home.html): its level is not known yet, so it wears no
   level's colour. It was drawn in the info blue and turned amber or red when the workspace landed seconds later, which
   read as the card changing colour for no reason (Rowan, 12 November 2026). Pending is the zero tiles' quiet grey; the
   level's colour then arrives once, grown out of that grey with the card's contents, never as a second colour. */
.home-attention-pending { background: var(--bs-gray-200); color: var(--bs-gray-700); box-shadow: none; }
.home-attention-pending .home-detail-icon { color: var(--bs-gray-500); }
.home-attention-pending .home-detail-eyebrow,
.home-attention-pending .home-detail-empty { color: var(--bs-gray-700); }

#home-attention > .home-detail-card:not(.home-attention-pending) { animation: home-level-in 0.5s var(--ease) both; }
#home-attention > .home-detail-card:not(.home-attention-pending) .home-detail-icon,
#home-attention > .home-detail-card:not(.home-attention-pending) .home-detail-body,
#home-upcoming > .home-detail-card .home-detail-body:not(:has([data-home-pending])) { animation: home-contents-in 0.5s var(--ease) both; }
@keyframes home-level-in { from { background-color: var(--bs-gray-200); } }
@keyframes home-contents-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  #home-attention > .home-detail-card,
  #home-attention > .home-detail-card .home-detail-icon,
  #home-attention > .home-detail-card .home-detail-body,
  #home-upcoming > .home-detail-card .home-detail-body { animation: none !important; }
}

/* ------------------------------------------------------------------- home
 * Home's front (home/home.html, home/workspace.html; 12 November 2026): the Rep Portal's header (rep-portal.css:
 * the greeting as the title, the countdown ring) with the day's briefing under the greeting; the three summary cards
 * over the header, as before; the modules as one band; and shapes instead of spinners while the workspace loads.
 * ui-preview/home.html draws all of it with these rules and no application. */

/* The header leaves room below the briefing for the summary cards that sit over its lower edge (mt-n10 on the page). */
.rep-hero.home-hero.page-header .page-header-content { padding-bottom: 6.5rem; }
.home-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
@media (max-width: 991.98px) { .home-hero-side { align-items: flex-start; } }

/* The three cards over the header (Coming up, Needs Attention, the tip), finished as one set (Rowan, 12 November 2026:
   "a cool border, an effect"): a lit edge and a light fall across each card's own colour, a shadow in that colour so the
   card floats over the header, and one sheen across it as it arrives. The colour still says what it said; the glow is
   the same colour, so a red card glows red. Nothing repeats: the sheen plays once, and the lift answers the pointer. */
.home-overlap .card {
  --home-glow: rgba(33, 40, 50, 0.3);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.85rem;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.17) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(315deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0) 45%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 1.1rem 2rem -0.9rem var(--home-glow),
    0 0.15rem 0.5rem rgba(33, 40, 50, 0.12);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.home-overlap .card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 1.7rem 2.6rem -0.9rem var(--home-glow),
    0 0.2rem 0.7rem rgba(33, 40, 50, 0.16);
}
.home-overlap .home-detail-upcoming { --home-glow: rgba(61, 76, 112, 0.75); }
.home-overlap .home-attention-info { --home-glow: rgba(59, 130, 246, 0.7); }
.home-overlap .home-attention-warning { --home-glow: rgba(245, 158, 11, 0.65); }
.home-overlap .home-attention-danger { --home-glow: rgba(197, 48, 48, 0.75); }
.home-overlap .home-tip-card { --home-glow: rgba(4, 116, 127, 0.7); }
.home-overlap .home-attention-pending { border-color: var(--bs-gray-300); background-image: none; box-shadow: none; }
/* The sheen: a band of light across the card, once, when the card has its contents (never a loading card). */
.home-overlap .card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  transform: skewX(-18deg);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  pointer-events: none;
  animation: home-sheen 1.2s var(--ease) 0.35s 1 both;
}
.home-overlap > :nth-child(2) .card::after { animation-delay: 0.5s; }
.home-overlap > :nth-child(3) .card::after { animation-delay: 0.65s; }
.home-overlap .card:has([data-home-pending])::after { display: none; }
@keyframes home-sheen { from { left: -60%; } to { left: 130%; } }

/* The briefing: one sentence, its figures the links to what they count. */
.home-hero-brief {
  max-width: 46rem;
  min-height: 1.7rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.home-hero-brief a {
  color: var(--bs-white);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: border-color 0.2s ease;
}
.home-hero-brief a:hover,
.home-hero-brief a:focus-visible { color: var(--bs-white); border-bottom-color: var(--bs-white); }
.home-hero-brief a.home-brief-late { color: var(--clay-soft); border-bottom-color: var(--clay-soft); }
.home-hero-brief > span:not([data-home-pending]),
.home-hero-brief > a { animation: home-contents-in 0.5s var(--ease) both; }

/* Where a link on the page lands (the briefing's figures, a summary card's "+N more"): clear of the fixed top bar, and
   its card ringed for a moment, once, so it is plain where the link went. */
#home-nudges,
#your-timeline,
#home-attention,
#home-upcoming { scroll-margin-top: 5rem; }
#home-nudges:target > .card,
#your-timeline:target > .card,
#home-attention:target > .card,
#home-upcoming:target > .card { animation: home-landed 1.6s var(--ease) 0.2s 1 both; }
@keyframes home-landed {
  0% { box-shadow: 0 0 0 0 rgba(0, 97, 242, 0); }
  25% { box-shadow: 0 0 0 4px rgba(0, 97, 242, 0.55); }
  100% { box-shadow: 0 0 0 4px rgba(0, 97, 242, 0); }
}

/* The countdown's place is held while the workspace loads, so the header never changes height. */
.home-next { min-height: 7.7rem; }
@media (min-width: 992px) { .home-next { min-width: 21rem; } }
.home-next .rep-countdown { animation-name: home-contents-in; }
.home-next .home-next-pending { animation: none; }
.home-next-pending .rep-countdown-text { width: 11rem; }

/* While the user's own work loads: shapes where the words will be, in the ink of the card they sit on. */
.home-skel { display: block; height: 0.8rem; border-radius: 0.4rem; background: currentColor; opacity: 0.16; animation: home-skel 1.1s ease-in-out infinite alternate; }
.home-skel + .home-skel { margin-top: 0.6rem; }
.home-skel-row { height: 2.1rem; border-radius: 0.45rem; }
.home-skel-block { height: 4.5rem; border-radius: 0.5rem; }
.home-skel-block + .home-skel-block { margin-top: 1rem; }
.home-skel-brief { display: inline-block; width: min(26rem, 80%); height: 1rem; vertical-align: middle; }
@keyframes home-skel { to { opacity: 0.07; } }

/* The months ahead (HomeYear): the card keeps about its drawn height while the workspace loads. */
.home-year-card > .card-body { min-height: 17rem; }

/* The modules, one band: each in its own colour with its icon and name; its description is the tile's tooltip. */
/* Rows of equal length: js/home-modules.js sets how many tiles go on a row (--home-module-columns), and a row that
   is one short widens its tiles to the band's edge. Without the script each row simply fills. */
.home-module-band { --home-module-min: 13.5; --home-module-gap: 0.85rem; display: flex; flex-wrap: wrap; gap: var(--home-module-gap); }
.home-module-band > * {
  flex: 1 1 calc(var(--home-module-min) * 1rem);
  min-width: 0;
}
.home-module-band[style*="--home-module-columns"] > * {
  flex-basis: calc((100% - (var(--home-module-columns) - 1) * var(--home-module-gap)) / var(--home-module-columns) - 0.5px);
}
a.card.home-module {
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 0.6rem;
  color: var(--bs-white);
  text-decoration: none;
}
a.card.home-module:hover,
a.card.home-module:focus-visible { color: var(--bs-white); }
.home-module svg { flex: 0 0 auto; width: 1.7rem; height: 1.7rem; opacity: 0.9; }
/* How many things in the module need the user (js/home-modules.js, from the nudges). No count, no badge. */
.home-module-count {
  flex: 0 0 auto;
  min-width: 1.6rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--bs-white);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  animation: home-contents-in 0.5s var(--ease) both;
}

/* News & Events (fragments/widgets/news-timeline.html): a row of cards, each item's day a calendar leaf. A few items
   share the row's width; many scroll sideways, a card at a time. What has passed is quieter; today's leaf is primary. */
.home-news {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(15.5rem, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x proximity;
}
.home-news-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--bs-gray-300);
  border-radius: 0.6rem;
  background: var(--bs-white);
  color: var(--bs-body-color);
  text-decoration: none;
  scroll-snap-align: start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.25s var(--ease);
}
a.home-news-item:hover,
a.home-news-item:focus-visible {
  border-color: var(--bs-primary);
  box-shadow: 0 0.4rem 1rem rgba(33, 40, 50, 0.12);
  color: var(--bs-body-color);
  text-decoration: none;
  transform: translateY(-2px);
}
.home-news-date {
  flex: 0 0 3.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--bs-gray-300);
  border-radius: 0.5rem;
  background: var(--bs-gray-100);
}
.home-news-month {
  width: 100%;
  padding: 0.15rem 0;
  background: var(--navy);
  color: var(--bs-white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}
.home-news-day { font-size: 1.45rem; font-weight: 700; line-height: 2rem; color: var(--navy); }
.home-news-today .home-news-month { background: var(--bs-primary); }
.home-news-past .home-news-month { background: var(--bs-gray-600); }
.home-news-past .home-news-day { color: var(--bs-gray-600); }
.home-news-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.home-news-when { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--bs-gray-600); }
.home-news-title,
.home-news-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.home-news-title { font-weight: 600; line-height: 1.3; color: var(--bs-gray-900); }
.home-news-body { font-size: 0.82rem; line-height: 1.45; color: var(--bs-gray-600); }

@media (prefers-reduced-motion: reduce) {
  .home-news-item { transition: none; }
  a.home-news-item:hover,
  a.home-news-item:focus-visible { transform: none; }
}

/* All clear on the Needs Attention card: a line that reads as good news, then what comes next. */
.home-detail-clear { margin-bottom: 0.6rem; font-size: 1.05rem; font-weight: 600; }

/* The timeline opens at today (js/home-timeline.js sets data-view on the column): Upcoming is today and ahead,
   Recent is what has happened, newest first. The tabs lie over the card's header, the notes over its body. */
#your-timeline { position: relative; }
.home-timeline-tabs {
  position: absolute;
  top: 0.55rem;
  right: 1.75rem;
  z-index: 2;
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.home-timeline-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 0.1rem 0.85rem;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: 600;
}
.home-timeline-tabs button[aria-selected="true"] { background: var(--bs-white); color: var(--navy); }
#your-timeline[data-view="upcoming"] .timeline-item-past { display: none; }
#your-timeline[data-view="recent"] .timeline-item:not(.timeline-item-past) { display: none; }
#your-timeline[data-view="recent"] .timeline { display: flex; flex-direction: column-reverse; }
.home-timeline-none { display: none; position: absolute; top: 6rem; left: 0; right: 0; margin: 0; text-align: center; color: var(--bs-gray-600); }
#your-timeline[data-view="upcoming"]:not(:has(.timeline-item:not(.timeline-item-past))) .home-timeline-none-upcoming,
#your-timeline[data-view="recent"]:not(:has(.timeline-item-past)) .home-timeline-none-recent { display: block; }
.home-module-name { flex: 1 1 auto; min-width: 0; font-weight: 600; line-height: 1.2; }

@media (prefers-reduced-motion: reduce) {
  .home-skel,
  .home-hero-brief > span,
  .home-hero-brief > a,
  .home-next .rep-countdown,
  .home-overlap .card::after,
  #home-nudges:target > .card,
  #your-timeline:target > .card,
  #home-attention:target > .card,
  #home-upcoming:target > .card { animation: none !important; }
}

/* ------------------------------------------------------- rep portal landing
 * The Rep Portal's landing page (modules/rep/landing.html) on the detail cards above: a second, smaller line under an
 * item's title (how soon a meeting is, how late a step is); the Your Role card, white with quiet tiles; and what is
 * expected of a member, which is a paragraph, held to three lines. The theme's own greys. */

.home-detail-note { display: block; font-size: 0.78rem; opacity: 0.85; }
.rep-role-card .home-detail-icon { color: var(--bs-gray-500); }
.rep-role-card .home-detail-eyebrow { color: var(--bs-gray-700); }
.rep-role-card .home-detail-empty { color: var(--bs-gray-700); }
.rep-role-card .home-detail-item { background-color: var(--bs-gray-100); color: var(--bs-body-color); }
.rep-role-card .home-detail-item:hover { background-color: var(--bs-gray-200); color: var(--bs-body-color); }
.rep-role-card .home-detail-more { color: var(--bs-primary); }
.rep-role-expected {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--bs-gray-700);
}

/* A Needs Attention row (the EWC dashboard's strip): its kind and state on one line, then the record as a pill link
   with its dates beside it. The whole row opens the record, so it answers the pointer as a table row does. */
.attention-row {
  padding: 0.6rem 0.6rem;
  border-top: 1px solid var(--bs-gray-200);
  border-radius: 0.45rem;
  transition: background-color 0.12s ease-in-out;
}
.attention-row[data-href] { cursor: pointer; }
.attention-row[data-href]:hover { background-color: var(--bs-gray-100); }
.attention-row-head,
.attention-row-body,
.attention-row-facts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.attention-row-body { margin-top: 0.35rem; min-width: 0; }
.attention-row-body > a { min-width: 0; }
.attention-row-facts { justify-content: flex-start; flex-wrap: wrap; margin-top: 0.35rem; }
.attention-row-kind {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-gray-600);
}
.attention-row-fact { font-size: 0.8rem; white-space: nowrap; color: var(--bs-gray-600); }

/* ----------------------------------------------------------------------------------------- user administration
 * The directory, the Add page and a person's profile (templates/users, 20 November 2026; the mock is
 * src/test/resources/ui-preview/users.html). Role colours: one per role, from the theme's supporting palette and the
 * brand's ink, each taking white text at WCAG AA or better (ink 13:1, navy 8.5:1, plum 8.0:1, teal 5.5:1, slate
 * 5.4:1, brown 5.4:1, iris and mauve 4.7:1 as the pill rules above deepen them). None is a status colour. */

:root {
  --role-admin: var(--ink);
  --role-executive: rgb(var(--bs-secondary-supporting-9-rgb));
  --role-er: rgb(var(--bs-secondary-supporting-10-rgb));
  --role-country: rgb(var(--bs-secondary-supporting-13-rgb));
  --role-business: rgb(var(--bs-secondary-supporting-1-rgb));
  --role-employee: var(--pill-mauve);
  --role-rep: var(--pill-iris);
  --role-expert: rgb(var(--bs-secondary-supporting-14-rgb));
  --role-none: var(--bs-gray-500);
}
.gl-role-admin { --role: var(--role-admin); }
.gl-role-executive { --role: var(--role-executive); }
.gl-role-er { --role: var(--role-er); }
.gl-role-country { --role: var(--role-country); }
.gl-role-business { --role: var(--role-business); }
.gl-role-employee { --role: var(--role-employee); }
.gl-role-rep { --role: var(--role-rep); }
.gl-role-expert { --role: var(--role-expert); }
.gl-role-none { --role: var(--role-none); }
.badge.gl-role { background-color: var(--role) !important; color: var(--bs-white) !important; }
.bg-ink { background-color: var(--ink) !important; }

/* Filter tiles: the theme's stat tile, the whole tile a link; the one in force is ringed. */
.gl-filter-tile { display: block; height: 100%; border-radius: 0.5rem; text-decoration: none; }
.gl-filter-tile:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.gl-filter-tile .card { transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
.gl-filter-tile.is-active .card { box-shadow: 0 0 0 3px var(--bs-white), 0 0 0 6px var(--clay) !important; }
.gl-filter-tile .card-footer { border-top: 0; background: rgba(0, 0, 0, 0.08); }
.gl-filter-tile .card.gl-tile-zero .card-footer { background: transparent; color: var(--bs-gray-600) !important; }

/* Who does what: one bar in the role colours, and a legend that filters. */
.gl-rolebar { display: flex; gap: 3px; height: 1rem; margin: 0.6rem 0 1.25rem; overflow: hidden; border-radius: 999px; transform-origin: left center; animation: gl-grow 0.9s var(--ease) both; }
@keyframes gl-grow { from { transform: scaleX(0); } }
.gl-rolebar-seg { min-width: 6px; background: var(--role); transition: opacity 0.2s, filter 0.2s; }
.gl-rolebar-seg:hover { filter: brightness(1.15); }
.gl-rolebar.has-active .gl-rolebar-seg:not(.is-active) { opacity: 0.25; }
.gl-legend { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gl-legend-item { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.8rem 0.3rem 0.6rem; border: 1px solid var(--bs-gray-300); border-radius: 999px; background: var(--bs-white); font-size: 0.82rem; color: var(--bs-gray-800); text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.gl-legend-item:hover { border-color: var(--role, var(--bs-gray-500)); color: var(--bs-gray-900); }
.gl-legend-item.is-active { border-color: var(--role, var(--bs-gray-700)); background: color-mix(in srgb, var(--role, var(--bs-gray-500)) 10%, var(--bs-white)); }
.gl-legend-item .gl-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--role, var(--dot)); }
.gl-legend-item strong { font-weight: 600; color: var(--bs-gray-900); }
.gl-legend-item .gl-pct { color: var(--bs-gray-600); }
.gl-dot-good { --dot: var(--bs-success); }
.gl-dot-warn { --dot: var(--bs-warning); }
.gl-dot-sso { --dot: var(--bs-success); }
.gl-dot-app { --dot: var(--bs-teal); }
.gl-dot-password { --dot: var(--bs-warning); }
.gl-dot-waiting { --dot: var(--bs-gray-400); }
.gl-overview-lead { font-size: 0.9rem; color: var(--bs-gray-700); }
.gl-overview-lead strong { color: var(--bs-gray-900); }

/* Two-factor coverage: a ring. */
.gl-donut-wrap { display: flex; align-items: center; gap: 1.25rem; }
.gl-donut { position: relative; flex: 0 0 auto; width: 7.75rem; height: 7.75rem; }
.gl-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gl-donut circle { fill: none; stroke-width: 9; }
.gl-donut-track { stroke: var(--bs-gray-200); }
.gl-donut-on { stroke: var(--bs-success); stroke-linecap: round; transition: stroke-dasharray 1s var(--ease); }
.gl-donut-off { stroke: var(--bs-warning); stroke-linecap: round; transition: stroke-dasharray 1s var(--ease), stroke-dashoffset 1s var(--ease); }
/* The sign-in ring, on a tenant with its identity provider switched on: one arc per way of signing in. */
.gl-donut-arc { stroke-linecap: round; transition: stroke-dasharray 1s var(--ease), stroke-dashoffset 1s var(--ease); }
.gl-donut-sso { stroke: var(--bs-success); }
.gl-donut-app { stroke: var(--bs-teal); }
.gl-donut-password { stroke: var(--bs-warning); }
.gl-donut-waiting { stroke: var(--bs-gray-400); }
.gl-donut-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gl-donut-label strong { font-size: 1.45rem; line-height: 1; color: var(--bs-gray-900); }
.gl-donut-label span { margin-top: 0.2rem; font-size: 0.62rem; color: var(--bs-gray-600); }
.gl-donut-legend { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; min-width: 0; }

/* The toolbar above the directory's table. */
.gl-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.25rem; }
.gl-toolbar .gl-search { flex: 1 1 16rem; max-width: 24rem; }
.gl-toolbar .form-select { width: auto; min-width: 9.5rem; }
.gl-result-count { margin-left: auto; font-size: 0.85rem; color: var(--bs-gray-600); white-space: nowrap; }

/* A person: initials in their role's colour, their name, their address beneath. */
.gl-person { display: flex; align-items: center; gap: 0.75rem; min-width: 15rem; color: var(--bs-body-color); text-decoration: none; }
.gl-person:hover .gl-person-name { text-decoration: underline; }
.gl-avatar { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.35rem; height: 2.35rem; border-radius: 50%; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.02em; color: var(--role); background: color-mix(in srgb, var(--role) 13%, var(--bs-white)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--role) 35%, transparent); }
.gl-avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.1rem; }
.gl-avatar-xl { width: 5rem; height: 5rem; font-size: 1.6rem; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--role) 40%, transparent); }
.gl-person-name { display: block; font-weight: 600; line-height: 1.25; color: var(--bs-gray-900); }
.gl-person-sub { display: block; font-size: 0.8rem; color: var(--bs-gray-600); }
.gl-you { font-size: 0.65rem; vertical-align: 0.1rem; }
.gl-user-table td { vertical-align: middle; }
.gl-user-table tbody tr[data-href] { cursor: pointer; }
.gl-flags { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.gl-flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); }
.gl-access-sub { display: block; margin-top: 0.15rem; font-size: 0.75rem; color: var(--bs-gray-600); white-space: nowrap; }
.gl-quiet { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--bs-gray-700); white-space: nowrap; }
.gl-quiet svg { width: 0.95rem; height: 0.95rem; }
.gl-signin { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; color: var(--bs-gray-800); white-space: nowrap; }
.gl-signin svg { width: 1rem; height: 1rem; }
.gl-signin-2fa svg { color: var(--bs-success); }
.gl-signin-sso svg { color: var(--bs-gray-600); }
.gl-when { white-space: nowrap; font-size: 0.85rem; }
.gl-when-sub { display: block; font-size: 0.75rem; color: var(--bs-gray-600); }
.gl-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; margin-top: 1.5rem; padding: 2rem; border: 1.5px dashed var(--bs-gray-300); border-radius: 0.75rem; background: var(--bs-gray-100); }
.gl-empty-icon { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 6rem; height: 6rem; border-radius: 50%; background: color-mix(in srgb, var(--navy) 10%, var(--bs-white)); color: var(--navy); }
.gl-empty-icon svg { width: 2.75rem; height: 2.75rem; }

/* The Add page: three numbered parts, and a preview that stays beside them. */
.gl-section + .gl-section { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid var(--bs-gray-200); }
.gl-step { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 1.1rem; }
.gl-step h5 { margin: 0.1rem 0; font-size: 1.05rem; color: var(--bs-gray-900); }
.gl-step p { margin: 0; }
.gl-step-num { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: var(--bs-white); font-weight: 600; font-size: 0.9rem; transition: background-color 0.25s var(--ease); }
.gl-step-num.is-done { background: var(--bs-success); color: var(--bs-dark); }
.gl-step-num svg { width: 1rem; height: 1rem; }
.gl-sticky { position: sticky; top: 5rem; }
.gl-role-card { position: relative; display: flex; gap: 0.85rem; height: 100%; margin: 0; padding: 1rem 1rem 0.9rem; border: 1.5px solid var(--bs-gray-300); border-radius: 0.6rem; background: var(--bs-white); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s var(--ease); }
.gl-role-card:hover { border-color: color-mix(in srgb, var(--role) 55%, var(--bs-gray-300)); transform: translateY(-1px); box-shadow: 0 0.25rem 0.75rem rgba(33, 40, 50, 0.08); }
.gl-role-card input { position: absolute; opacity: 0; pointer-events: none; }
.gl-role-card:has(input:focus-visible) { outline: 3px solid var(--clay); outline-offset: 2px; }
.gl-role-card.is-selected { border-color: var(--role); box-shadow: 0 0 0 3px color-mix(in srgb, var(--role) 20%, transparent); }
.gl-role-card.is-locked { cursor: default; }
.gl-role-icon { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 0.6rem; background: var(--role); color: var(--bs-white); }
.gl-role-icon svg { width: 1.15rem; height: 1.15rem; }
.gl-role-name { display: block; font-weight: 600; color: var(--bs-gray-900); }
.gl-role-desc { display: block; margin-top: 0.15rem; font-size: 0.82rem; line-height: 1.4; color: var(--bs-gray-700); }
.gl-role-tag { display: block; margin-top: 0.4rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bs-gray-600); }
.gl-role-check { position: absolute; top: 0.6rem; right: 0.6rem; display: none; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--role); color: var(--bs-white); }
.gl-role-check svg { width: 0.85rem; height: 0.85rem; }
.gl-role-card.is-selected .gl-role-check { display: flex; }
.gl-note { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 0.5rem; background: var(--bs-gray-100); font-size: 0.88rem; color: var(--bs-gray-800); }
.gl-note svg { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; margin-top: 0.1rem; color: var(--bs-gray-600); }
.gl-note-warn { background: color-mix(in srgb, var(--bs-warning) 14%, var(--bs-white)); }
.gl-note-warn svg { color: var(--rust); }

/* Country access: a searchable list, None / Read / Write on each row, a running count. */
.gl-access-tools { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin-bottom: 0.75rem; }
.gl-access-tools .gl-search { flex: 1 1 12rem; max-width: 18rem; }
.gl-country-list { max-height: 23rem; overflow-y: auto; border: 1px solid var(--bs-gray-300); border-radius: 0.5rem; }
.gl-country-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.85rem; border-bottom: 1px solid var(--bs-gray-200); transition: background-color 0.15s; }
.gl-country-row:last-child { border-bottom: 0; }
.gl-country-row.is-set { background: var(--bs-gray-100); }
.gl-country-name { flex: 1 1 auto; font-size: 0.92rem; }
.gl-seg { position: relative; display: inline-flex; flex: 0 0 auto; padding: 2px; border-radius: 999px; background: var(--bs-gray-200); }
.gl-seg input { position: absolute; opacity: 0; pointer-events: none; }
.gl-seg label { margin: 0; padding: 0.2rem 0.8rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: var(--bs-gray-700); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.gl-seg input:checked + label { background: var(--bs-white); color: var(--bs-gray-900); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.gl-seg input[value="READ"]:checked + label { background: var(--role-country); color: var(--bs-white); }
.gl-seg input[value="WRITE"]:checked + label { background: var(--navy); color: var(--bs-white); }
.gl-seg input:focus-visible + label { outline: 2px solid var(--clay); outline-offset: 1px; }
.gl-access-summary { font-size: 0.85rem; color: var(--bs-gray-700); }
.gl-access-summary strong { color: var(--bs-gray-900); }
.gl-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gl-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.7rem 0.25rem 0.4rem; border: 1px solid var(--bs-gray-300); border-radius: 999px; background: var(--bs-white); font-size: 0.85rem; color: var(--bs-gray-800); }
.gl-chip .gl-flag { width: 18px; height: 18px; border-radius: 50%; }

/* What a person can do, in words. */
.gl-can { margin: 0; padding: 0; list-style: none; }
.gl-can li { display: flex; gap: 0.6rem; padding: 0.3rem 0; font-size: 0.88rem; line-height: 1.4; color: var(--bs-gray-800); }
.gl-can svg { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; margin-top: 0.1rem; }
.gl-can .yes svg { color: var(--bs-success); }
.gl-can .no { color: var(--bs-gray-600); }
.gl-can .no svg { color: var(--bs-gray-400); }
.gl-can .warn svg { color: var(--rust); }
.gl-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--bs-gray-600); }
.gl-preview-person { display: flex; align-items: center; gap: 1rem; }
.gl-preview-person .gl-person-name { font-size: 1.05rem; }
.gl-placeholder { color: var(--bs-gray-500) !important; font-weight: 500 !important; }

/* A person's profile. */
.gl-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem; }
.gl-hero h2 { margin: 0; font-size: 1.55rem; color: var(--bs-gray-900); }
.gl-hero-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin-top: 0.5rem; font-size: 0.82rem; color: var(--bs-gray-600); }
.gl-hero-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.gl-hero-meta svg { width: 0.95rem; height: 0.95rem; }
.gl-hero-stats { display: flex; margin-left: auto; overflow: hidden; border: 1px solid var(--bs-gray-200); border-radius: 0.6rem; }
.gl-hero-stat { min-width: 9rem; padding: 0.7rem 1.25rem; }
.gl-hero-stat + .gl-hero-stat { border-left: 1px solid var(--bs-gray-200); }
.gl-hero-stat .gl-value { display: block; margin-top: 0.15rem; font-size: 1rem; font-weight: 600; color: var(--bs-gray-900); white-space: nowrap; }
.gl-facts { margin: 0; }
.gl-fact { display: flex; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px solid var(--bs-gray-200); }
.gl-fact:first-child { padding-top: 0; }
.gl-fact:last-child { padding-bottom: 0; border-bottom: 0; }
.gl-fact-icon { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 0.5rem; background: var(--bs-gray-100); color: var(--bs-gray-700); }
.gl-fact-icon svg { width: 1rem; height: 1rem; }
.gl-fact-icon.is-good { background: color-mix(in srgb, var(--bs-success) 14%, var(--bs-white)); color: var(--moss); }
.gl-fact-icon.is-warn { background: color-mix(in srgb, var(--bs-warning) 18%, var(--bs-white)); color: var(--rust); }
.gl-fact-value { font-size: 0.92rem; color: var(--bs-gray-900); }
.gl-fact-sub { font-size: 0.8rem; color: var(--bs-gray-600); }
.gl-savebar { position: fixed; left: 50%; bottom: 1.25rem; z-index: 1040; display: flex; align-items: center; gap: 1rem; padding: 0.5rem 0.5rem 0.5rem 1.25rem; visibility: hidden; border-radius: 999px; background: var(--navy); color: var(--bs-white); box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25); transform: translate(-50%, 160%); transition: transform 0.3s var(--ease), visibility 0s linear 0.3s; }
.gl-savebar.is-shown { visibility: visible; transform: translate(-50%, 0); transition: transform 0.3s var(--ease), visibility 0s; }
.gl-savebar .btn-link { color: rgba(255, 255, 255, 0.8); text-decoration: none; }

/* The directory on a phone: each person a card, each value labelled. */
@media (max-width: 767.98px) {
  .gl-user-table thead { display: none; }
  .gl-user-table, .gl-user-table tbody, .gl-user-table tr, .gl-user-table td { display: block; width: 100%; }
  .gl-user-table tr { margin-bottom: 0.75rem; padding: 0.6rem 0.85rem; border: 1px solid var(--bs-gray-300) !important; border-radius: 0.5rem; }
  .gl-user-table td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.35rem 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  .gl-user-table td[data-label]::before { content: attr(data-label); flex: 0 0 auto; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bs-gray-600); }
  .gl-user-table td > * { min-width: 0; text-align: right; }
  .gl-user-table td:first-child > * { text-align: left; }
  .gl-user-table td .gl-flags { flex-wrap: wrap; justify-content: flex-end; }
  .gl-user-table .gl-access-sub { white-space: normal; }
  .gl-user-table .gl-person { min-width: 0; }
  .gl-user-table .gl-person-sub { overflow-wrap: anywhere; }
  .gl-hero-stats { width: 100%; margin-left: 0; }
  .gl-hero-stat { flex: 1 1 0; min-width: 0; padding: 0.6rem 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gl-rolebar, .gl-savebar, .gl-role-card, .gl-filter-tile .card, .gl-donut-on, .gl-donut-off, .gl-donut-arc { animation: none !important; transition: none !important; }
}
