/*
  Team Intranet — stylesheet
  Author: Vera (UI/front-end)

  Design direction (v2, 2026-09-12): same editorial "small-studio directory"
  foundation as v1 — warm paper background, near-black ink, a deep
  teal-charcoal header/footer band, a curated 5-accent-color set reused
  round-robin per member between their card and their own page, and a real
  serif/sans pairing built entirely from system font stacks (no external/CDN
  font — this site must render fully offline). What changes in v2 is what
  that foundation now has to carry: the roster tripled (5 -> 15) into three
  very unevenly sized groups, and two new pieces of distinctive first-person
  content (motto, decision authority) arrived that deserved more than another
  line of text. Three real design moves, not a patch on top of v1:

    1. Grouped overview, not one flat grid. Three <section class="team-group">
       blocks (see partial_group_header.html / page_team_index.html), each
       with its own <h2> heading — real landmarks, not just visual dividers.
       A group of more than GROUP_SIZE_THRESHOLD (4, see generate_site.py)
       members gets ".team-grid--dense": smaller cards, tighter rhythm, more
       columns — built for the Web Design & Development Team (12 members as
       of 2026-09-12, up from the original 10) without hardcoding that name
       or count anywhere; it responds to being the biggest group, not to
       being *that* group, so it needs no edit here as that group keeps
       growing. Leadership/Specialists keep the more spacious v1-style card
       at their smaller scale.
    2. Motto as a real pull-quote, not a line of metadata. Card and member
       page both render {{MOTTO}} as an italic serif <blockquote> with a
       large decorative accent-colored quote mark (CSS-generated, not typed
       into the content — see section 7/8's ::before rules), sized well past
       body text. On the member page it leads the main column, before the
       bio, because it's the most distinctive single line on that person's
       page.
    3. Decision authority as its own callout, not sidebar small print. Every
       role entry in CLAUDE.md states a "Final say on X" line, and this
       field is that same idea surfaced per-person - worth the same
       real visual weight here, so {{DECISION_AUTHORITY}} gets a bordered
       callout of its own on the member page — its own heading, larger type,
       real visual separation from the bio paragraphs it used to risk
       blending into.

  The blank case (Larry/Pax/Nolan/Sillas/Vera have neither field) is handled
  entirely in CSS via :empty / :has() — see the notes in section 7 and 8 —
  so those five pages simply don't render the block, rather than rendering
  an empty quote or an empty box. That's a deliberate bet on :has() support
  (solid across current Chromium/Edge/Safari/Firefox — this site's realistic
  viewing environment); flagged explicitly in the project handoff.

  Design direction (v3, 2026-09-12, same day): real headshot photos landed.
  Rather than bolt "photos" on next to the existing monogram-avatar system,
  the monogram becomes the fallback state of ONE avatar system: same
  circular .avatar slot, same size, same accent-colored ring, whether it
  holds a photo or initials. Which one renders is decided in
  generate_site.py (not here, and not in the templates — plain {{TOKEN}}
  substitution can't branch) and handed down as one pre-built
  {{AVATAR_INNER}} value containing either an <img class="avatar-photo"> or
  a <span class="avatar-fallback">, never both, never an <img> with an empty
  src — see avatar_inner_html() in generate_site.py and the doc comments in
  both templates. Concretely, this meant restructuring .avatar from "the
  thing that IS the monogram" (fixed size + its own font/color) into "the
  thing that CONTAINS either a photo or a monogram" (fixed size/shape/ring
  only; font styling moved to .avatar-fallback, sizing overrides for
  .avatar-photo/.avatar-fallback follow .avatar's own density/large
  overrides in sections 7 and 8) — see those rules for the reasoning on the
  accent ring, object-fit: cover, and why the fallback stays undecorated
  (it's simply what the pre-photo design already looked like, so it reads
  as "pending," not "broken"). Current state: 16 of the roster's 17 members
  have a photo; Rhea is the one member currently on the fallback.

  Design direction (v4, 2026-09-12, same day): owner-requested resize — every
  avatar size doubles (photo and fallback states both, every context: card
  grid, dense card grid, member-page sidebar). This is a deliberate,
  visible size change, not a subtle nudge, so the fallback's font-size is
  doubled right alongside its container (keeps the monogram's proportion
  *within* the circle identical to before — it was never a goal to make the
  initials relatively bigger or smaller, just the whole avatar). The
  decorative ring (box-shadow) doubles too, for the same reason: it was
  already sized as a proportion of the avatar (~6.25% of diameter), and
  literally doubling both keeps that ratio exact rather than left behind at
  the old thickness. Doubling the avatar alone, with no other adjustment,
  would have cramped every grid it sits in — so three supporting values move
  with it, all in sections 7/8/9 below: the spacious and dense card grids'
  minmax() column widths widen (more room per card so a much bigger avatar
  doesn't dominate a card still sized for the old one), the member-page
  sidebar column widens from 220px to 360px (at the old width a doubled
  avatar-lg would leave only ~28px of clearance inside the sidebar's own
  padding — visibly cramped), and avatar-lg gets its own mobile-width trim
  in section 9, the same treatment already applied to motto-lg/authority at
  phone width, rather than carrying a full 9rem circle unscaled into a
  360px viewport. None of this changes column *count* logic (auto-fit still
  decides that from available width) or the flex-column card structure that
  already pins .card-cta to the bottom — it only changes the numbers those
  mechanisms work from, so the layout keeps producing full, unclipped rows
  at every width it did before, just with larger avatars driving them.

  Design direction (v5, 2026-09-14): Sillas's content-depth pass added five
  new fields to the member page only (working style, personality, integrity,
  strengths, weaknesses) - real structure, not more paragraphs bolted onto
  the bio. Three moves, extending the existing system rather than starting a
  new one:

    1. Integrity joins decision-authority as a second callout, not a fourth
       bio paragraph. Both are short label+value blocks placed together
       right after the motto, before any prose - "who decides" and "how
       they hold the line" read as a pair of up-front, skimmable facts about
       how this person operates. They share identical label/value typography
       (.authority-label/.integrity-label and .authority-value/.integrity-
       value are one comma-selector rule each - same weight class,
       literally) but get different box treatments so one doesn't read as a
       reskinned duplicate of the other: decision-authority keeps its
       original white background + left accent border; integrity gets a
       tinted background (the member's own --avatar-bg tint, already used
       behind their avatar) + a top accent border instead. Both border
       treatments are independently checked at >=4.3:1 (see the per-member
       ACCENT_PALETTE contrast note in generate_site.py) against their
       respective backgrounds, clear of the 3:1 non-text minimum.
    2. Working style + personality grouped under one "How They Work"
       section (h2), as two h3-labeled sub-items - related facets of the
       same question about a person, not two unrelated callouts stacked in
       a row. Strengths + weaknesses get their own section (h2) as a real
       two-column pairing (h3-labeled columns, side-by-side from tablet
       width, stacked on mobile) - the point of showing both together is
       that they're read as a genuine, honest pair, not one column
       "the good stuff" and a buried afterthought below it. Deliberately
       not a red/green stoplight treatment (weaknesses aren't a warning) -
       both lists use the member's own accent color, differing only in
       marker fill (solid dot for strengths, outlined/hollow dot for
       weaknesses) so the visual language stays inside this page's existing
       accent-per-member system rather than importing semantic
       traffic-light colors that would overdramatize genuinely mature,
       specific content.
    3. Bio gets an explicit "About" heading (h2), matching the new
       sections, so the page doesn't end up with three labeled sections and
       one unlabeled holdover from before this pass - consistency across
       the whole main column, not just the new parts of it.

  Heading hierarchy top to bottom: h1 (name) -> h2 About -> h2 How They Work
  -> h3 Working style -> h3 Personality -> h2 Strengths & Weaknesses -> h3
  Strengths -> h3 Weaknesses. Motto/Decision-authority/Integrity stay
  non-heading label+value idioms, same as decision-authority always was -
  three short callouts don't need three more headings between h1 and
  "About" to be navigable.

  All five new fields degrade gracefully when empty (a future member whose
  profile content isn't written yet), via the same :empty/:has() mechanism
  as motto/decision-authority - see the .integrity, .htw-item, and
  .sw-column rules in section 8 below. Not a live case today (all 17
  current members have every field populated) but built the same way as
  every other optional field on this page rather than assumed away.

  Structure of this file:
    1. Design tokens
    2. Reset / base
    3. Accessibility helpers (skip link, focus, reduced motion)
    4. Header / nav
    5. Footer
    6. Home page (masthead + directory list)
    7. Team overview (grouped sections + card grid, spacious/dense variants)
    8. Team member page (sidebar + motto + callouts + About/How They Work/
       Strengths & Weaknesses sections)
    9. Responsive adjustments
*/

/* 1. Design tokens ------------------------------------------------------ */

@font-face {
  font-display: swap; 
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/montserrat-v31-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* montserrat-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/montserrat-v31-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


:root {
  --color-paper: #00123f;
  --color-paper-raised: #5a5a5b;
  --color-paper-raised-lite: #cbcbcb;
  --color-ink: #ffffff;
  --color-ink2: #353232;
  --color-ink-muted: #ffb100;
  --color-border: #ffffff;

  --color-header: #051126;
  --color-header-text: #c5c5c5;

  --accent-terracotta: #ffffff;
  --accent-teal: #2f6e63;
  --accent-mustard: #ffb100;
  --accent-plum: #7a4c6d;
  --accent-slate: #45607a;
  
  --font-display: 'Montserrat', Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;


  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --container-max: 960px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 2px rgba(33, 29, 27, 0.06), 0 6px 16px -8px rgba(33, 29, 27, 0.18);
  --shadow-card-hover: 0 2px 4px rgba(33, 29, 27, 0.08), 0 16px 32px -12px rgba(33, 29, 27, 0.22);
  --transition: 160ms ease;
}

/* 2. Reset / base -------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--color-ink);
}

h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; }

p { margin: 0 0 var(--space-4); }

a { color: inherit; }

ul, ol { margin: 0; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

main {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-7) var(--space-5) var(--space-8);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-ink-muted);
  margin: 0 0 0.75rem;
}

.lede {
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: 62ch;
  color: var(--color-ink);
}

/* 3. Accessibility helpers ------------------------------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-terracotta);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent-terracotta);
  outline-offset: 2px;
}

:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 4. Header / nav --------------------------------------------------------- */

.site-header {
  background: var(--color-header);
  color: var(--color-header-text);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-header-text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

/* Brand/logotype text is exempt from minimum text-contrast requirements
   (WCAG 1.4.3) — used deliberately here for a single italic accent word. */
.wordmark-accent {
  color: var(--accent-mustard);
  font-style: italic;
}

nav[aria-label="Primary"] {
  display: flex;
  gap: var(--space-5);
}

.nav-link {
  color: var(--color-header-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-2) var(--space-1);
  border-bottom: 2px solid transparent;
  opacity: 0.85;
  transition: border-color var(--transition), opacity var(--transition);
}

.nav-link:hover { opacity: 1; }

.nav-link.active {
  border-bottom-color: var(--accent-terracotta);
  opacity: 1;
}

/* 5. Footer ---------------------------------------------------------------- */

.site-footer {
  background: var(--color-header);
  color: var(--color-header-text);
  margin-top: var(--space-8);
}

.footer-inner {
  padding-block: var(--space-5);
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.85;
}

.footer-inner p { margin: 0; }

/* 6. Home page ------------------------------------------------------------- */

.masthead { margin-bottom: var(--space-7); }

.directory { margin-top: var(--space-6); }

.directory-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  border-top: 1px solid var(--color-border);
}

.directory-item { border-bottom: 1px solid var(--color-border); }

.directory-item a {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-2);
  text-decoration: none;
  color: var(--color-ink);
  border-radius: var(--radius-sm);
  transition: background var(--transition), padding-left var(--transition);
}

.directory-item a:hover,
.directory-item a:focus-visible {
  background: var(--color-paper-raised);
  padding-left: var(--space-3);
}

.directory-index {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  width: 2.5rem;
  flex: none;
}

.directory-title { display: block; font-weight: 700; font-size: 1.05rem; }

.directory-desc {
  display: block;
  color: var(--color-ink-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.directory-arrow {
  margin-left: auto;
  color: var(--color-ink-muted);
  transition: transform var(--transition), color var(--transition);
}

.directory-item a:hover .directory-arrow,
.directory-item a:focus-visible .directory-arrow {
  transform: translateX(4px);
  color: var(--accent-terracotta);
}

.directory-note {
  color: var(--color-ink-muted);
  font-size: 0.9rem;
  margin: var(--space-4) 0 0;
}

/* 7. Team overview (grouped sections + card grid) ---------------------------- */

.page-intro { margin-bottom: var(--space-2); }

.team-group { margin-top: var(--space-8); }

.team-group:first-of-type { margin-top: var(--space-6); }

.group-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-5);
}

.group-title {
  font-size: 1.3rem;
  margin: 0;
  letter-spacing: -0.005em;
}

.group-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-ink2);
  background: var(--color-ink);
  padding: 0.2rem 1.0rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  /* ink-muted (#6E5D4F) on this pill's border-tint background measures
     4.61:1 - checked, not assumed - which clears the 4.5:1 normal-text
     minimum (this text sits well under the 18.66px/bold "large text"
     threshold, so the stricter ratio is the one that applies). */
}

.team-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}

/* Spacious variant: Leadership (3) and Specialists (2) - small groups get
   room to breathe and a card that can carry a motto pull-quote comfortably.
   auto-fit (not auto-fill) so 2-3 cards on a wide viewport share the row's
   full width instead of hugging the left edge with dead empty grid tracks -
   a real auto-fill gotcha with low item counts. max-width caps how wide an
   individual card gets on very wide screens so 2 cards don't balloon.
   VERA (v4 resize): minmax floor raised 250px -> 280px and max-width
   400px -> 440px alongside the doubled .avatar (see section 1's v4 note) -
   the old floor left a card's content column at ~202px against a now-96px
   avatar; the wider floor keeps the avatar reading as "prominent by
   design" rather than "crowding the card." */
.team-grid--spacious {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.team-grid--spacious .team-card { max-width: 440px; }

/* Dense variant: the Web Design & Development Team (12, up from the
   original 10) - more columns, tighter card, smaller avatar, clamped
   one-liner, so a group this size still reads as an organized directory
   rather than the same spacious treatment straining under 2x+ the content
   of the other two groups combined.
   VERA (v4 resize): minmax floor raised 210px -> 240px to match the doubled
   dense .avatar below - checked at 12 members specifically (not just
   assumed to still fit): on a full-width desktop container this now lands
   3 cards per row instead of 4 (4 tidy rows of 3 rather than 3 rows of 4),
   which is the deliberate trade-off for a visibly bigger avatar at this
   density - still fully auto-fit, still collapses to fewer columns (down to
   one) as the viewport narrows, never overflows. */
.team-grid--dense {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-paper-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.team-grid--dense .team-card { padding: var(--space-4); }

.team-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

/* Avatar slot. One fixed circular shape/size shared by BOTH states - a real
   headshot photo (16 of 17 members) and the colored-monogram fallback
   (Rhea, currently) - so the grid never shifts or reads as "half-finished"
   depending on who has a photo yet. Which state renders is decided once in
   generate_site.py (see {{AVATAR_INNER}}, avatar_inner_html()) and dropped
   in as one of two mutually-exclusive children: .avatar-photo (an <img>) or
   .avatar-fallback (a <span>) - this rule only shapes the shared container.
   overflow:hidden is what crops a photo of any source aspect ratio to the
   circle; it has no effect on the fallback span (short centered text, never
   overflows). The box-shadow ring reuses the member's own accent color
   (--avatar-fg) as a thin boundary on BOTH states - a photo and a monogram
   for the same person read as one identity system, not "real photos" bolted
   onto "the old placeholder." It's decorative/non-text (WCAG 1.4.11 applies,
   not the stricter text-contrast rule) and uses the same deepened
   ACCENT_PALETTE values already verified elsewhere in this file to clear
   3:1 against the light paper-raised background it sits on in both the card
   and the member sidebar.
   VERA (v4, owner-requested resize): width/height doubled (3rem -> 6rem),
   the ring's two box-shadow layers doubled with it (2px/3px -> 4px/6px) so
   the ring stays the exact same proportion of the circle's diameter rather
   than reading as thinner once the circle grew, and margin-bottom nudged up
   a token (space-4 -> space-5) so the extra visual weight doesn't crowd the
   name directly under it. See section 1's v4 note for why this and the two
   sibling overrides below (.team-grid--dense .avatar, .avatar-lg) all moved
   together. */
.avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  background: var(--avatar-bg, var(--color-border));
  margin-bottom: var(--space-5);
  box-shadow:
    0 0 0 4px var(--color-paper-raised),
    0 0 0 6px var(--avatar-fg, var(--accent-terracotta));
}

/* Real headshot. object-fit: cover crops to fill the circle regardless of
   the source photo's original aspect ratio, without distorting it. No
   filename mismatches remain in the current mapping (the two historical
   ones are both resolved - the typo'd sSillas.jpg was corrected to
   sillas.jpg on disk, and selene.jpg, a stopgap once assigned to Rhea
   before Selene existed as an agent, now belongs to Selene) - but display
   treatment never depended on the filename either way, only on
   {{PHOTO_FILE}} as handed down by generate_site.py. Full color, not
   grayscale - this site's whole palette leans warm on purpose (see section
   1's tokens/comment), and a desaturated photo would read as colder than
   everything around it rather than as a considered choice. */
.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Monogram fallback (Rhea, currently - the one member without a photo as of
   the 2026-09-12 correction pass; Larry's photo landed the same day). Same
   font treatment the avatar used to carry directly before it had to also
   host a photo child - moved here, not restyled, so the fallback is
   visually identical to how every avatar looked before photos existed.
   aria-hidden (set in the markup) because it repeats initials already
   covered by the name text next to it - decorative, same as before. */
.avatar-fallback {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--avatar-fg, var(--accent-terracotta));
}

/* VERA (v4 resize): dense avatar doubled (2.5rem -> 5rem) with the grid's
   minmax floor (see section 7) widened alongside it; margin-bottom nudged
   up a token (space-3 -> space-4) to match. Fallback font-size doubled with
   it (1.05rem -> 2.1rem) to hold the same initials-to-circle proportion. */
.team-grid--dense .avatar {
  width: 8rem;
  height: 8rem;
  margin-bottom: var(--space-4);
}

.team-grid--dense .avatar-fallback { font-size: 2.1rem; }

.card-name { font-size: 1.15rem; margin: 0 0 0.2rem; }

.team-grid--dense .card-name { font-size: 1.05rem; }

.card-name a {
  color: var(--color-ink);
  text-decoration: none;
}

/* Stretched-link pattern: the card's only real link fills the whole card,
   so the entire card is a click/tap target while the accessible name stays
   just the person's name (no redundant/duplicate link text for AT users). */
.card-name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card-name a:hover,
.card-name a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--avatar-fg, var(--accent-terracotta));
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.card-role {
  margin: 0 0 var(--space-3);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Motto pull-quote (card). MUST stay truly empty in the HTML when MOTTO is
   "" (see partial_team_card.html - no whitespace between the tags and the
   token) for :empty to match. When it's populated it reads as a short
   italic first-person line, set off with a decorative oversized quote mark
   in the member's own accent color. */
.motto {
  margin: 0 0 var(--space-3);
  padding: 0 0 0 var(--space-4);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--color-ink);
  position: relative;
}

.motto:empty { display: none; margin: 0; padding: 0; }

.team-grid--dense .motto { font-size: 0.92rem; }

/* Decorative only - the quote mark carries no unique information (the
   actual quote text is the real, readable content), so it's exempt from
   text-contrast requirements the same way the header's italic wordmark
   accent is (see section 4). */
.motto::before {
  content: "\201C";
  position: absolute;
  left: -0.05em;
  top: -0.1em;
  font-size: 1.6em;
  line-height: 1;
  color: var(--avatar-fg, var(--accent-terracotta));
  font-style: normal;
  opacity: 0.85;
}

.card-oneliner {
  margin: 0;
  color: var(--color-ink);
  font-size: 0.95rem;
  line-height: 1.55;
}

.team-grid--dense .card-oneliner {
  font-size: 0.88rem;
  /* Clamp to 3 lines in the dense grid so a long one-liner can't make one
     card much taller than its row-mates at this smaller card size; the full
     text is always one click away on the member page. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  display: inline-block;
  /* auto, not a fixed space token: pins the CTA to the bottom of the card
     via the flex column on .team-card (above), so a card with no motto
     (shorter content) doesn't leave the CTA floating mid-card while its
     motto'd row-mates run longer - every card in a row ends on the same
     note regardless of which optional fields it has. */
  margin-top: auto;
  padding-top: var(--space-4);
  font-size: 0.85rem;
  font-weight: 700;
  /* Ink-muted, not accent-terracotta: at this weight/size (bold 13.6px) the
     accent color measures ~3.84:1 on white, short of the 4.5:1 normal-text
     minimum. Ink-muted clears it (~4.9:1); the accent shows on hover/focus
     instead, where it's a non-required enhancement, not the resting state. */
  color: var(--color-ink-muted);
  transition: color var(--transition);
}

.team-card:hover .card-cta,
.team-card:focus-within .card-cta {
  color: var(--accent-terracotta);
  text-decoration: underline;
}

/* 8. Team member page -------------------------------------------------------- */

/* VERA (v4 resize): sidebar column widened 220px -> 360px alongside
   avatar-lg doubling below. At the old 220px, sidebar padding (space-5,
   1.5rem/24px per side) alone would have left a doubled 9rem/144px avatar
   only ~28px of clearance total inside the box - visibly cramped, nearly
   touching its own padding edge. 360px restores roughly the same
   avatar-to-content-width proportion the sidebar had before the resize. */
.member-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-7);
  align-items: start;
  margin-top: var(--space-6);
}

.member-sidebar {
  padding: var(--space-5);
  background: var(--color-paper-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* VERA (v4 resize): doubled 4.5rem -> 9rem, fallback font-size doubled with
   it (2rem -> 4rem) for the same initials-to-circle proportion as before;
   margin-bottom bumped a token (space-4 -> space-5). See the mobile trim in
   section 9 - a 9rem circle is deliberately dialed back on phone widths,
   the same treatment already given to motto-lg/authority there. */
.avatar-lg { margin: 0 auto;;width: 9rem; height: 9rem; margin-bottom: var(--space-5); }

.avatar-lg .avatar-fallback { font-size: 4rem; }

.member-name { font-size: 1.6rem; margin: 0 0 0.15rem; }

.member-pronouns { margin: 0 0 var(--space-3); color: var(--color-ink-muted); font-size: 0.9rem; display: none }

.member-role {
  margin: 0 0 var(--space-5);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-ink);
}

.member-meta {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
  font-size: 0.85rem;
}

/* Two .member-meta blocks now stack in the sidebar (Defined in + Group -
   Group is new in v2, always populated so no blank case to design around).
   Only the first gets the divider rule; the second just gets vertical
   rhythm instead of a second, near-touching rule immediately under the
   first block's one line of content. */
.member-meta + .member-meta {
  border-top: none;
  padding-top: 0;
  margin-top: var(--space-3);
}

.meta-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.meta-value { display: block; color: var(--color-ink); }

.back-link { margin: 0 0 var(--space-5); font-size: 0.9rem; }

.back-link a { color: var(--color-ink-muted); text-decoration: none; }

.back-link a:hover,
.back-link a:focus-visible { color: var(--color-ink); text-decoration: underline; }

/* Motto pull-quote (member page). Same :empty-hides-it mechanism as the
   card version in section 7 (see page_team_member.html - {{MOTTO}} sits
   flush against its tags with no added whitespace) - larger here since the
   member page has room to let it lead the main column. */
.motto-lg {
  margin: 0 0 var(--space-6);
  padding: 0 0 0 var(--space-5);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.45;
  max-width: 32ch;
  color: var(--color-ink);
  position: relative;
}

.motto-lg:empty { display: none; margin: 0; padding: 0; }

.motto-lg::before {
  content: "\201C";
  position: absolute;
  left: -0.06em;
  top: -0.18em;
  font-size: 2.2em;
  line-height: 1;
  color: var(--avatar-fg, var(--accent-terracotta));
  font-style: normal;
  opacity: 0.85;
}

/* Decision-authority callout. "Real visual weight, not buried in the bio" -
   a distinct bordered block with its own label, ahead of the bio text. The
   left border uses the member's own accent color as a non-text UI boundary
   (WCAG 1.4.11 non-text contrast, not the stricter text-contrast rule) -
   verified well clear of 3:1 against these light backgrounds at every
   accent in the palette. Hidden via :has() when .authority-value is empty
   (the 5 members with no decision_authority) - see the doc comment in
   page_team_member.html for the browser-support note on :has(). */
.authority {
  margin: 0 0 var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: #dfe6ec;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--avatar-fg, var(--accent-terracotta));
  border-radius: var(--radius-sm);
  max-width: 60ch;
}

.authority:has(.authority-value:empty) { display: none; }

.authority-label,
.integrity-label {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.92rem;
  font-weight: 700;
  color: #96091b;
}

.authority-value,
.integrity-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-ink2);
}

/* Integrity callout. Same label/value typography as decision-authority
   (shared rules above) and the same "short callout, real weight" idea, but
   a different box treatment so the two don't read as one field repeated
   twice: tinted background (the member's own --avatar-bg, the same tint
   already sitting behind their avatar) + a top accent border, instead of
   authority's white background + left accent border. Both border
   treatments are independently contrast-checked (see the v5 design-
   direction note above) against their own backgrounds. Hidden via :has()
   when .integrity-value is empty - identical mechanism to .authority,
   same browser-support note applies (see page_team_member.html and the
   :has() note near .authority below). */
.integrity {
  margin: 0 0 var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--avatar-bg, var(--color-paper-raised));
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--avatar-fg, var(--accent-terracotta));
  border-radius: var(--radius-sm);
  max-width: 60ch;
}

.integrity:has(.integrity-value:empty) { display: none; }

/* Section headings for About / How They Work / Strengths & Weaknesses - a
   short accent-colored underline (the member's own --avatar-fg, same color
   already used for the avatar ring, motto mark, and callout borders) sized
   to the text itself (inline-block), not a full-width rule, so it reads as
   a per-section marker rather than a page-wide divider like the Team
   overview's .group-header border. Real <h2> elements (see the heading-
   hierarchy note above), sized a step down from the page h1/h2 default so
   three of them in a row don't compete with the member's own name. */
.member-section { margin-top: var(--space-7); }

.member-section:first-of-type { margin-top: 0; }

.member-section-heading {
  display: inline-block;
  font-size: 1.2rem;
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--avatar-fg, var(--accent-terracotta));
}

/* Field-label: the h3 sub-headings inside How They Work and Strengths &
   Weaknesses (Working style / Personality / Strengths / Weaknesses). Same
   small-caps visual language as .authority-label/.integrity-label and
   .meta-label - these are real <h3> elements for correct document
   structure/screen-reader navigation, but visually they read as labels,
   not as a second tier of display headings, which is deliberately what
   keeps 7 total headings on this page from reading as heading-soup. */
.field-label {
  margin: 0 0 var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--color-ink-muted);
}

.member-bio p {
  max-width: 70ch;
  margin: 0 0 var(--space-4);
  line-height: 1.7;
  font-size: 1.02rem;
}

.member-bio p:last-child { margin-bottom: 0; }

/* How They Work: working style + personality as two related sub-items, not
   two more standalone callouts. Single column on its own (each item is
   already a full-width paragraph), stacked with generous rhythm between
   them; a two-up grid isn't used here on purpose - unlike strengths/
   weaknesses these two paragraphs are prose of uneven length per member, so
   forcing them into side-by-side columns would frequently leave one column
   visibly taller than the other for no reason tied to the content. Each
   .htw-item hides itself if its paragraph comes back empty (future/
   unpopulated member), and the whole section hides if BOTH are empty,
   mirroring the .authority/.integrity :has()-empty pattern. */
.htw-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.htw-item p {
  max-width: 70ch;
  margin: 0;
  line-height: 1.7;
  font-size: 1rem;
  color: var(--color-ink);
}

.htw-item:has(p:empty) { display: none; }

.htw-section:not(:has(.htw-item p:not(:empty))) { display: none; }

/* Strengths & Weaknesses: a genuine paired contrast, side by side from
   tablet width up (see the responsive breakpoint below for the mobile
   stack), divided by a single vertical rule rather than two separate
   boxed cards - the point is that they're read together as two sides of
   the same person, not as two unrelated lists that happen to share a page.
   Marker treatment intentionally avoids red/green: both lists use the
   member's own accent color, differing only in whether the dot is filled
   (strengths) or hollow (weaknesses) - real, specific, mature content on
   both sides, not a pass/fail signal. */
.strengths-weaknesses {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.sw-column:has(.sw-list:empty) { display: none; }

.sw-section:not(:has(.sw-list:not(:empty))) { display: none; }

.sw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sw-list li {
  position: relative;
  padding-left: 1.4em;
  line-height: 1.6;
  font-size: 0.98rem;
  color: var(--color-ink);
}

.sw-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Solid dot: decorative bullet substitute, non-text - WCAG 1.4.11 (3:1
   non-text contrast) applies, not the stricter text-contrast rule; uses
   the same per-member accent colors already checked at >=4.3:1 against
   every background they appear on across this page (see the v5 note
   above), comfortably clear of 3:1 against the paper backgrounds here
   too. */
.sw-list--strengths li::before {
  background: var(--avatar-fg, var(--accent-terracotta));
}

/* Hollow dot: same accent color as an outline instead of a fill - reads as
   "the same family, less absolute" rather than a different (alarm) color.
   Border width kept slightly heavier than a hairline so it stays visibly
   present at 8px against the paper background, same non-text-contrast
   reasoning as the solid dot above. */
.sw-list--weaknesses li::before {
  background: transparent;
  border: 1.5px solid var(--avatar-fg, var(--accent-terracotta));
}

/* 880px, worked out from this page's actual box model, not a stock tablet
   breakpoint: .member-main's available width is
   min(viewport, 960 container max) - 48px container padding - 360px
   sidebar - 48px sidebar gap. Below ~880px viewport that leaves .member-
   main under ~420px, too narrow for two list columns plus a divider to
   read as anything but cramped once .member-layout's own sidebar+main
   split (still two columns from 701px up - see section 9) is accounted
   for; at 880px+ it clears ~420px and keeps growing to a flat ~504px cap
   at the container's own max-width, which is comfortable for two ~200px+
   columns and the divider between them. Checked against the box model
   directly, not assumed to "probably fit" at some round number. */
@media (min-width: 880px) {
  /*.strengths-weaknesses {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }*/

 /* .sw-column + .sw-column {
    padding-left: var(--space-5);
    border-left: 1px solid var(--color-border);
  }*/
}

@media (min-width: 701px) {
  .member-sidebar { position: sticky; top: var(--space-6); }
}

/* 9. Responsive adjustments --------------------------------------------------- */

@media (max-width: 700px) {
  .member-layout { grid-template-columns: 1fr; gap: var(--space-5); }
}

@media (max-width: 600px) {
  main { padding: var(--space-6) var(--space-4) var(--space-7); }
  .header-inner { padding-block: var(--space-3); }
  .directory-item a { gap: var(--space-3); padding: var(--space-4) var(--space-2); }
  .directory-index { width: 2rem; font-size: 1.25rem; }

  /* Group headers, motto pull-quotes and the authority callout all carry
     desktop-scale type/spacing that's worth trimming at phone width so
     nothing feels oversized relative to a ~360-400px viewport - checked at
     that width specifically, not just assumed to scale down gracefully. */
  .team-group { margin-top: var(--space-7); }
  .group-title { font-size: 1.15rem; }
  .group-header { margin-bottom: var(--space-4); }

  .motto,
  .motto-lg { padding-left: var(--space-3); }

  .motto-lg {
    font-size: 1.2rem;
    max-width: none;
    margin-bottom: var(--space-5);
  }

  .motto-lg::before { font-size: 1.9em; }

  .authority { padding: var(--space-3) var(--space-4); max-width: none;}

  /* VERA (v5, depth pass): same "trim the desktop-scale treatment at phone
     width" pass extended to the new integrity callout and the three new
     sections - checked at a 360-400px viewport specifically, same
     discipline as motto/authority/avatar-lg just above and below. */
  .integrity { padding: var(--space-3) var(--space-4); max-width: none; }

  .member-section { margin-top: var(--space-6); }

  .member-section-heading { font-size: 1.08rem; }

  .htw-grid { gap: var(--space-4); }

  .strengths-weaknesses { gap: var(--space-4); }

  .sw-list { gap: var(--space-2); }

  /* VERA (v4 resize): avatar-lg's doubled 9rem/144px circle gets the same
     "trim the desktop-scale treatment at phone width" pass as motto-lg and
     .authority just above, rather than carrying a full 9rem circle
     unscaled into a ~360-400px viewport. member-sidebar padding is
     unaffected here, so the reduced circle simply sits with a bit more
     breathing room in the (by this width) full-bleed single-column
     sidebar - checked down to a 360px viewport, still clear of the
     sidebar's own padding on every side. */
  .avatar-lg { width: 7rem; height: 7rem; }

  .avatar-lg .avatar-fallback { font-size: 3.1rem; }
}

.lang-link {padding:0 5px
  
}

.lang-active {
  font-weight:600;color: var(--color-ink-muted);
}

.avatar {
  margin: 0 auto;
}
