/* Speaker profile + index page styling. Drop-in alongside reader.css. */

/* Rectangular portrait cards in the documentary-grayscale register —
   matches the report-index treatment. Object-position favours the face;
   initials sit behind as fallback when the image is absent. */
.avatar{position:relative;background:var(--avatar-color,#3a3a3a);overflow:hidden;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.avatar .initials{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.92);font-family:var(--serif);font-weight:500;letter-spacing:-.01em;z-index:0}
.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 22%;z-index:1;filter:grayscale(1) contrast(1.04);transition:filter .18s}
.sp-card:hover .avatar img{filter:grayscale(.35) contrast(1.06)}
.profile-hero .avatar img{filter:grayscale(1) contrast(1.05)}

/* Portrait sizes — all 3:4 portrait aspect, no rounding. The profile-hero
   variant of avatar-lg overrides the size below to be considerably bigger. */
.avatar-lg{width:160px;height:208px}
.avatar-lg .initials{font-size:48px}
.avatar-md{width:64px;height:84px}
.avatar-md .initials{font-size:22px}
.avatar-sm{width:38px;height:50px}
.avatar-sm .initials{font-size:13px}

/* ----- Profile page ----- */
main.profile{max-width:1040px;margin:0 auto;padding:0 36px 80px}
main.profile .breadcrumb{padding-top:18px;font-family:var(--mono);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase}
main.profile .breadcrumb a{color:var(--ink-3);text-decoration:none}
main.profile .breadcrumb a:hover{color:var(--red)}

.profile-hero{display:grid;grid-template-columns:240px 1fr;gap:40px;padding:28px 0 36px;border-bottom:1px solid var(--rule);align-items:start}
/* Profile portrait — 240×320 (matches the 4:5 head-and-shoulders crop
   ratio used elsewhere on the site, brief §2.5). 2px colored LEFT bar
   (not top stripe) consistent with speaker cards. Per-profile role colour
   comes from the parent .role-bench / .role-claimant / .role-defence
   class on <main class="profile">. */
.profile-hero .avatar.avatar-lg{position:relative;width:240px;height:320px;background:var(--paper-2);overflow:hidden;border-left:2px solid var(--role-color, var(--rule-soft))}
.profile-hero .avatar.avatar-lg::before{display:none}
.profile-hero .avatar.avatar-lg .initials{font-size:64px;color:var(--ink-3);background:linear-gradient(135deg,#e2dccc 0%,#c8c2b3 100%)}
.profile-hero .avatar.avatar-lg img{object-position:50% 22%}
/* Map the role class to the accent colour for the portrait bar. */
main.profile.role-bench    .profile-hero .avatar.avatar-lg{--role-color:var(--accent-bench)}
main.profile.role-claimant .profile-hero .avatar.avatar-lg{--role-color:var(--accent-claimant)}
main.profile.role-defence  .profile-hero .avatar.avatar-lg{--role-color:var(--accent-defence)}
.profile-hero h1{margin:0 0 4px;font-family:var(--serif);font-weight:600;font-size:42px;line-height:1.05;letter-spacing:-.015em;color:var(--ink)}
/* Italic-serif role label per brief §2.1 — replaces the previous all-caps
   tracked-mono treatment. "presiding judge" sets in italic serif rather
   than "PRESIDING JUDGE" tracked out. */
.profile-hero .role{margin:0 0 16px;font-family:var(--serif);font-style:italic;font-size:15px;line-height:1.3;letter-spacing:0;text-transform:none;color:var(--ink-3)}
.profile-hero .role em{font-style:italic;color:var(--ink-3);text-transform:none;letter-spacing:0;font-family:var(--serif)}
/* Keyfacts strip — monospace numeric facts. Brief §3.3 places these in a
   2-col bordered box; we keep the inline flex but border the strip so it
   reads as a discrete keyfacts panel rather than running text. */
.profile-hero .stats{
  list-style:none;margin:0;padding:12px 14px;
  display:grid;grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:10px 18px;
  background:var(--paper);border:1px solid var(--rule-soft);border-radius:2px;
  font-family:var(--mono);font-size:10px;letter-spacing:.04em;color:var(--ink-3);text-transform:uppercase
}
.profile-hero .stats li{line-height:1.35}
.profile-hero .stats b{display:block;color:var(--ink);font-family:var(--mono);font-size:17px;font-weight:600;margin:0 0 2px;letter-spacing:0}
.profile-hero .stats a{color:var(--ink-2);text-decoration:none;border-bottom:1px dotted var(--rule-soft);font-family:var(--serif);font-size:13px;letter-spacing:0;text-transform:none;font-style:italic}
.profile-hero .stats a:hover{color:var(--red);border-bottom-color:var(--red)}
.profile-hero .stats a em{font-style:italic}

.profile-bio{padding:24px 0;border-bottom:1px solid var(--rule-soft);font-family:var(--serif);font-size:15.5px;line-height:1.6;color:var(--ink);max-width:64ch;text-wrap:pretty}
.profile-bio em{font-style:italic;color:var(--ink-2)}

.profile-days{padding:28px 0 0}
.profile-days h3{margin:0 0 14px;font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-3);font-weight:600}

.day-stripe-wrap{padding:14px 0 22px;border-bottom:1px dotted var(--rule-soft);margin-bottom:18px}
.day-stripe{display:grid;grid-template-columns:repeat(32,1fr);gap:1px;background:var(--rule-soft);border:1px solid var(--rule-soft);height:32px}
.ds-cell{display:block;height:100%;background:var(--paper);position:relative;transition:background .12s}
.ds-cell:hover{background:var(--paper-2)}
.ds-cell.on::after{content:"";position:absolute;left:0;right:0;bottom:0;height:var(--w,30%);background:var(--ink);transition:background .12s}
.ds-cell.on:hover::after{background:var(--red)}
.day-stripe-ticks{display:grid;grid-template-columns:repeat(32,1fr);gap:1px;margin-top:5px;font-family:var(--mono);font-size:9.5px;color:var(--ink-3);letter-spacing:.02em}
.day-stripe-ticks span{text-align:center;line-height:1}
.day-stripe-ticks span.mark{color:var(--ink-2);font-weight:600}
.day-stripe-caption{margin-top:10px;font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3)}
.day-stripe-caption b{color:var(--ink-2);font-weight:600}

.profile-day-table{width:100%;border-collapse:collapse;font-family:var(--serif);font-size:14px;color:var(--ink-2)}
.profile-day-table th{text-align:left;padding:8px 10px;font-family:var(--mono);font-size:9.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3);font-weight:600;border-bottom:1px solid var(--rule)}
.profile-day-table td{padding:10px;border-bottom:1px dotted var(--rule-soft);vertical-align:top}
.profile-day-table td a{color:var(--ink);text-decoration:none;border-bottom:1px dotted var(--rule-soft)}
.profile-day-table td a:hover{color:var(--red);border-bottom-color:var(--red)}
.profile-day-table td.date{font-family:var(--mono);font-size:11px;color:var(--ink-3);letter-spacing:.04em;white-space:nowrap}
.profile-day-table td.ct{font-family:var(--mono);font-size:11px;color:var(--ink);text-align:right;font-variant-numeric:tabular-nums;font-weight:500}
.profile-day-table td.ln{font-family:var(--mono);font-size:10.5px;color:var(--ink-3);letter-spacing:.04em}
.profile-day-table td.ch span{display:inline-block;font-family:var(--serif);font-style:italic;font-size:12.5px;color:var(--ink-3);margin-right:8px}
.profile-day-table td.ch span:not(:last-child)::after{content:" ·";color:var(--rule-soft);font-style:normal;margin-left:8px}

.not-testified{margin:0;padding:18px 22px;background:var(--paper-2);border-left:2px solid var(--ink-3);font-family:var(--serif);font-size:14px;line-height:1.5;color:var(--ink-2);font-style:italic}

/* ----- Speakers index page ----- */
main.speakers{max-width:1100px;margin:0 auto;padding:0 36px 80px}
.speakers-hero{padding:42px 0 24px;border-bottom:1px solid var(--rule)}
.speakers-hero .kicker{font-family:var(--mono);font-size:10.5px;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-3);margin-bottom:8px}
.speakers-hero h1{margin:0 0 12px;font-family:var(--serif);font-weight:600;font-size:42px;line-height:1.08;letter-spacing:-.015em;color:var(--ink)}
.speakers-hero .lead{font-size:16.5px;line-height:1.55;color:var(--ink-2);margin:0;max-width:62ch;text-wrap:pretty;font-style:italic}

.role-group{margin-top:32px}
/* Each section's role class drives the left bar colour for every card
   inside it. Brief §2.4: brick / teal / olive, no other accents. */
.role-group.role-bench    .sp-card{--role-color:var(--accent-bench)}
.role-group.role-claimant .sp-card{--role-color:var(--accent-claimant)}
.role-group.role-defence  .sp-card{--role-color:var(--accent-defence)}
/* Category header: name on the left, monospace count on the right
   (brief §3.2: "Bench · 1 person", "Expert witnesses for the defendants
   · 5 people"). Names are serif, counts are mono — matches the metadata
   strip's typographic logic. */
.role-group h2{
  margin:0 0 4px;padding:0 0 8px;
  display:flex;align-items:baseline;justify-content:space-between;gap:14px;
  font-family:var(--serif);font-size:17px;font-weight:500;letter-spacing:-.005em;
  color:var(--ink);text-transform:none;
  border-bottom:1px solid var(--rule);
}
.role-group h2 em{
  color:var(--ink);font-family:var(--serif);font-style:normal;
  font-size:17px;font-weight:500;letter-spacing:-.005em;text-transform:none;
  margin:0;
}
.role-group h2 .count{
  font-family:var(--mono);font-size:9.5px;letter-spacing:.06em;
  color:var(--ink-3);text-transform:uppercase;font-weight:400;
}

/* Row layout (brief §2.5 + §3.2): 72×90 b&w photo on the left, name /
   italic-serif role / bio / monospace metadata strip in a column on the
   right, 2px colored left bar from the three-colour palette (claimant /
   defence / bench). The earlier card grid used display-sized monogram tiles
   in saturated greens & yellows; that read as trading cards on an otherwise
   restrained site. Brief: "the b&w photo + colored bar approach gives all
   participants equal visual weight and lets the category be a quiet signal
   rather than a loud one." */
.sp-grid{display:flex;flex-direction:column;gap:0;background:transparent;border:0;margin:0}
.sp-grid.solo{flex-direction:column}

.sp-card{
  display:grid;
  grid-template-columns:72px 1fr;
  gap:14px;
  padding:14px 14px 14px 12px;
  border-left:2px solid var(--role-color, var(--rule-soft));
  border-bottom:1px solid var(--rule-soft);
  background:transparent;color:var(--ink);text-decoration:none;
  align-items:start;
  transition:background .12s;
}
.sp-card:last-child{border-bottom:0}
.sp-card:hover{background:var(--paper)}

/* The photo: 72×90, b&w, initials fallback behind. No top stripe, no rounded
   corners — flat archival rectangles. */
.sp-card .avatar,
.sp-card .avatar.avatar-md{
  position:relative;width:72px;height:90px;flex:0 0 auto;
  background:var(--paper-2);overflow:hidden;border-radius:0;
}
.sp-card .avatar .initials{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-family:var(--serif);font-size:22px;font-weight:500;
  color:var(--ink-3);letter-spacing:-.01em;z-index:0;
  background:linear-gradient(135deg,#e2dccc 0%,#c8c2b3 100%);
}
.sp-card .avatar img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  object-position:50% 22%;z-index:1;
  filter:grayscale(1) contrast(1.04);
  transition:filter .18s;
}
.sp-card:hover .avatar img{filter:grayscale(.35) contrast(1.06)}

/* The body — name / role / bio / metadata in one column. Targets the
   unclassed sibling div between .avatar and .ct in the existing markup. */
.sp-card > div:not(.avatar):not(.ct){
  padding:2px 0 0;background:transparent;
}
.sp-card .name{
  display:block;font-family:var(--serif);font-weight:600;font-size:16px;
  line-height:1.2;letter-spacing:-.005em;color:var(--ink);text-wrap:balance;margin:0 0 3px;
  text-shadow:none;
}
.sp-card .role{
  display:block;font-family:var(--serif);font-style:italic;font-weight:400;
  font-size:13px;line-height:1.3;letter-spacing:0;text-transform:none;
  color:var(--ink-3);margin:0 0 6px;
}
.sp-card .role em{font-style:italic}
.sp-card .cred{
  display:block;font-family:var(--serif);font-size:13px;line-height:1.45;
  color:var(--ink-2);max-width:64ch;margin:0 0 7px;font-style:normal;
  /* Always visible — no hover/reveal trick. The earlier card hid bios
     until hover; phones have no hover. */
  max-height:none;opacity:1;
}
.sp-card .cred em{font-style:italic}

/* Metadata strip — moved out of the top-right chip into the body row,
   below the bio. Brief §2.2: "this is the single most repeated component
   on the site." Numbers in body ink, labels in --ink-3. */
.sp-card .ct{
  position:static;top:auto;right:auto;
  display:block;text-align:left;
  font-family:var(--mono);font-size:10px;letter-spacing:.04em;
  color:var(--ink-3);text-transform:uppercase;text-shadow:none;
  grid-column:2;margin-top:0;line-height:1.4;white-space:normal;
  align-self:end;
}
.sp-card .ct b{
  display:inline;font-family:var(--mono);font-size:10px;font-weight:600;
  color:var(--ink);letter-spacing:0;margin:0 3px 0 0;
}

@media (max-width:520px){
  .sp-card{grid-template-columns:60px 1fr;gap:12px;padding:12px 10px 12px 10px}
  .sp-card .avatar,.sp-card .avatar.avatar-md{width:60px;height:75px}
  .sp-card .name{font-size:15px}
  .sp-card .cred{font-size:12.5px}
}

/* Profile-hero mobile adjustments. The portrait stacks above the metadata so it
   reads with the same visual weight as a speakers-index card. */
@media (max-width:760px){
  .profile-hero{grid-template-columns:1fr;gap:18px;padding:20px 0 24px;align-items:start;justify-items:start}
  .profile-hero .avatar.avatar-lg{width:220px;height:auto;aspect-ratio:3/4;max-width:60%}
  .profile-hero .avatar.avatar-lg .initials{font-size:54px}
  .profile-hero h1{font-size:28px}
  .profile-day-table{font-size:13px}
  .profile-day-table td.ch{display:none}
}
@media (max-width:460px){
  .profile-hero .avatar.avatar-lg{width:200px;max-width:62%}
}

/* Role legend strip — three-colour palette only. Brief §2.4: don't
   introduce a fourth hue. Olive bench, brick claimant side, teal defence
   side. */
.role-legend{display:flex;flex-wrap:wrap;gap:6px 22px;padding:14px 0 0;margin:0}
.rl-item{display:inline-flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3)}
.rl-dot{width:14px;height:3px;border-radius:0;flex:0 0 auto;opacity:1}
