
  /* ── Politician photo ─────────────────────── */
  .pol-photo-wrap {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    position: relative;
  }
  .pol-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--border);
    display: block;
  }
  .pol-photo-initials {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 3px solid transparent;
  }
  .pol-photo-initials.dem {
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
    border-color: rgba(59,130,246,0.3);
  }
  .pol-photo-initials.rep {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
  }
  .pol-photo-initials.ind {
    background: var(--surface2);
    color: var(--text-muted);
    border-color: var(--border);
  }
  .pol-photo img.dem { border-color: rgba(59,130,246,0.4); }
  .pol-photo img.rep { border-color: rgba(239,68,68,0.4); }

  /* ── Alpha hero stat ──────────────────────── */
  .alpha-hero {
    margin: 28px 0 8px;
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
  }
  .alpha-hero-val {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 700;
    line-height: 1;
  }
  .alpha-hero-val.pos { color: var(--buy); }
  .alpha-hero-val.neg { color: var(--sell); }
  .alpha-hero-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
  }

  /* ── Back link ─────────────────────────────── */
  .pol-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.06em;
    margin-bottom: 28px;
    transition: color var(--t);
  }
  .pol-back:hover { color: var(--accent); }

  /* ── Hero ─────────────────────────────────── */
  .pol-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
  }

  .pol-name {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 12px;
  }

  .pol-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .pol-state {
    font-size: 0.85rem;
    color: var(--text-dim);
  }

  .pol-count-big {
    text-align: right;
    flex-shrink: 0;
  }

  .pol-count-big .val {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4rem);
    line-height: 1;
    color: var(--accent);
  }

  .pol-count-big .label {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 5px;
  }

  /* ── Party badges ──────────────────────────── */
  .party-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
  }
  .party-badge.democrat     { background: rgba(59,130,246,0.1);  color: #3b82f6; border: 1px solid rgba(59,130,246,0.2); }
  .party-badge.republican   { background: rgba(239,68,68,0.1);   color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
  .party-badge.independent  { background: var(--surface2);       color: var(--text-muted); border: 1px solid var(--border); }

  /* ── Stat chips ────────────────────────────── */
  .pol-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 36px;
  }

  .pol-stat {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: all var(--t);
  }

  .pol-stat:hover {
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
  }

  [data-theme="light"] .pol-stat {
    background: #ffffff;
    backdrop-filter: none;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }

  [data-theme="light"] .pol-stat:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--card-hover-border);
  }

  .pol-stat-val {
    font-family: var(--font-display);
    font-size: 1.7rem;
    line-height: 1;
    color: var(--text);
  }

  .pol-stat-val.buy  { color: var(--buy); }
  .pol-stat-val.sell { color: var(--sell); }
  .pol-stat-val.accent { color: var(--accent); }
  .pol-stat-val.sm { font-size: 1.1rem; }

  .pol-stat-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 6px;
  }

  /* ── Section titles ────────────────────────── */
  .pol-section {
    margin-bottom: 20px;
  }

  .pol-section-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 4px;
  }

  .pol-section-sub {
    font-size: 0.82rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
  }

  /* ── Committees & the oversight flag ───────────
     The flag is the one place on this page we make a pointed claim, so it
     gets the only warm colour here — everything around it stays neutral. */
  .cmte-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }

  .cmte {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    max-width: 100%;
  }

  /* Committees narrow enough that we flag trades against them. */
  .cmte--oversight {
    border-color: var(--warn);
    background: var(--brand-tint);
  }

  .cmte-name {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.35;
  }

  .cmte-role {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
  }

  .cmte-flag {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--warn);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
    cursor: help;
  }

  .cmte-note {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-dim);
    max-width: 68ch;
    margin-bottom: 28px;
  }

  /* ── Ticker cards ──────────────────────────── */
  .pol-ticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 32px;
  }

  /* ── Long lists start short ─────────────────────────────────
     A member with 253 disclosed trades used to drop all 253 on the page, so
     everything below the table — the timeline, the round trips, the
     committees — was several screens of scrolling away. Both long lists now
     open showing a readable slice and expand on request.

     The cut is done in CSS on nth-child rather than by slicing in Jinja, so
     the full list is in the HTML from the start: no second request, nothing
     for search engines to miss, and expanding is instant. */
  /* ── Trade timeline lanes ─────────────────────────────────── */
  /* The SVG scales with its viewBox, so on a phone the whole chart — ticker
     labels and axis included — shrank to about a third and stopped being
     readable. Below the min-width it scrolls instead, which is how the tables
     on this page already handle being wider than the screen. */
  .tl-wrap { margin-top: 14px; overflow-x: auto; }
  #tl-svg { display: block; width: 100%; min-width: 620px; height: auto; overflow: hidden; }
  .tl-hint { display: none; font-size: 0.72rem; color: var(--text-dim); margin: 8px 0 0; }
  @media (max-width: 700px) { .tl-hint { display: block; } }
  .tl-lane-rule { stroke: var(--border); stroke-width: 1; }
  .tl-lane-band { fill: var(--bg2); }
  .tl-tk { fill: var(--text); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
  .tl-n  { fill: var(--text-dim); font-family: var(--font-mono); font-size: 10px; }
  .tl-ax { fill: var(--text-dim); font-family: var(--font-mono); font-size: 10px; }
  /* These must match the legend directly above the chart, which uses --buy and
     --sell. The congress teal/amber pair is used by the round-trip cards lower
     down; using it here made the marks contradict their own key. */
  .tl-dot-buy  { fill: var(--buy); }
  .tl-dot-sell { fill: var(--sell); }
  .tl-dot-buy, .tl-dot-sell { fill-opacity: 0.85; }
  .tl-dot-buy:hover, .tl-dot-sell:hover { fill-opacity: 1; }
  .tl-desc { font-size: 0.78rem; color: var(--text-dim); margin: 10px 0 0; }
  .tl-empty { font-size: 0.85rem; color: var(--text-muted); margin: 16px 0 4px; }

  /* The reveal component lives in base.html and is shared with /congress,
     /stocks, /investors and the rest. It used to be duplicated here, which is
     how two implementations of the same thing start drifting. */

  .pol-ticker-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    transition: all var(--t);
    text-decoration: none;
    color: inherit;
    display: block;
  }

  .pol-ticker-card:hover {
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
  }

  [data-theme="light"] .pol-ticker-card {
    background: #ffffff;
    backdrop-filter: none;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }

  [data-theme="light"] .pol-ticker-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--card-hover-border);
  }

  .pol-ticker-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }

  .pol-ticker-company {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-bottom: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .pol-ticker-count {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 8px;
  }

  .pol-ticker-sentiment {
    display: flex;
    gap: 10px;
    font-size: 0.82rem;
  }

  .pol-ticker-sentiment .t-buy  { color: var(--buy); }
  .pol-ticker-sentiment .t-sell { color: var(--sell); }

  /* ── Performance vs SPY ────────────────────── */
  .perf-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 28px 24px;
    margin-bottom: 36px;
  }
  .perf-eyebrow {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
  }
  .perf-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 4px;
  }
  .perf-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 22px;
  }
  .perf-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 22px;
  }
  .perf-stat {
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
  }
  .perf-stat-val {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 4px;
  }
  .perf-stat-val.pos { color: var(--buy); }
  .perf-stat-val.neg { color: var(--sell); }
  .perf-stat-val.neutral { color: var(--text); }
  .perf-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
  }
  .perf-headline {
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-muted);
    padding: 14px 16px;
    background: var(--surface2);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    margin-bottom: 18px;
  }
  .perf-headline strong { color: var(--text); }
  .perf-headline .alpha-pos { color: var(--buy); font-weight: 600; }
  .perf-headline .alpha-neg { color: var(--sell); font-weight: 600; }
  .perf-chart-wrap { position: relative; height: 320px; }
  .perf-disclaimer {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 14px;
    line-height: 1.5;
  }

  /* Trade timeline legend */
  .trade-timeline-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
  .tt-legend-item { display: inline-flex; align-items: center; gap: 6px; }
  .tt-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
  .tt-dot--buy  { background: var(--buy); box-shadow: 0 0 8px color-mix(in srgb, var(--buy)  50%, transparent); }
  .tt-dot--sell { background: var(--sell); box-shadow: 0 0 8px color-mix(in srgb, var(--sell) 50%, transparent); }

  /* Vs-SPY paired bars section */
  .vs-spy-list { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 8px; }
  .vs-spy-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; }
  .vs-spy-tk { font-family: var(--font-mono); font-weight: 600; color: var(--accent); font-size: 0.82rem; }
  .vs-spy-tk small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--text-dim); font-size: 0.78rem; margin-top: 2px; }
  .vs-spy-bars { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .vs-spy-bar-row { display: grid; grid-template-columns: 62px 1fr 46px; gap: 8px; align-items: center; font-size: 0.82rem; }
  .vs-spy-bar-row .lbl { color: var(--text-muted); }
  .vs-spy-bar { height: 6px; border-radius: 3px; background: var(--border); position: relative; overflow: hidden; }
  .vs-spy-bar .fill { position: absolute; top: 0; bottom: 0; }
  .vs-spy-bar .fill.pos { background: var(--buy); left: 50%; }
  .vs-spy-bar .fill.neg { background: var(--sell); right: 50%; }
  .vs-spy-bar .zero { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 1px; background: var(--border2); }
  .vs-spy-bar .val { text-align: right; font-weight: 600; }
  .vs-spy-alpha { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; white-space: nowrap; text-align: right; }
  .vs-spy-alpha.pos { color: var(--buy); background: color-mix(in srgb, var(--buy) 12%, transparent); }
  .vs-spy-alpha.neg { color: var(--sell); background: color-mix(in srgb, var(--sell) 12%, transparent); }
  @media (max-width: 600px) {
    .vs-spy-row { grid-template-columns: 1fr auto; row-gap: 6px; }
    .vs-spy-bars { grid-column: 1 / 3; }

  }

  /* All Trades — make bigger transactions visually stand out. Tiers are based on
     the disclosed amount_max range: LARGE ($250K+), MAJOR ($1M+). */
  .trade-row td { transition: background 0.25s ease; }
  .trade-row.trade-xl td, .trade-row.trade-jumbo td {
    background: color-mix(in srgb, var(--warn) 5%, transparent);
  }
  .trade-row.trade-jumbo td {
    background: color-mix(in srgb, var(--warn) 10%, transparent);
    box-shadow: inset 3px 0 0 var(--warn);
  }
  .amt-cell { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
  .amt-cell.amt-xl    { color: var(--text); font-weight: 500; }
  .amt-cell.amt-jumbo { color: var(--text); font-weight: 600; }
  .amt-tag {
    display: inline-block; margin-left: 8px;
    font-size: 0.75rem; font-weight: 600;
    padding: 2px 7px; border-radius: 4px;
    vertical-align: middle;
  }
  .amt-tag--xl    { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
  .amt-tag--jumbo { color: #1a1206; background: var(--warn); border: 1px solid var(--warn); }

  /* Stock cell — ticker + full company name always visible, even on mobile */
  .pol-stock-cell { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.25; min-width: 0; max-width: 220px; }
  .pol-stock-cell .pol-stock-tk { font-family: var(--font-mono); color: var(--accent); font-weight: 500; font-size: 0.82rem; }
  .pol-stock-cell .pol-stock-nm { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
  .pol-stock-cell:hover .pol-stock-tk { color: var(--text); }

  /* ── Mobile ────────────────────────────────── */
  @media (max-width: 600px) {
    .pol-hero { align-items: flex-start; }
    .pol-count-big { text-align: left; }
    .pol-company-col { display: none; }
    .pol-stats { grid-template-columns: 1fr 1fr; }
    .perf-row { grid-template-columns: 1fr; gap: 10px; }
    .perf-stat-val { font-size: 1.4rem; }
  }

  /* ── Completed round trips ────────────────────────────────────────
     Same inline-SVG family as /congress/lag: no chart library, no external
     request, drawn before any JavaScript runs. Entry teal, exit amber —
     the same pair the stock-page markers use. */
  .rt-band-title { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
                   color: var(--text-dim); margin: 22px 0 10px; }
  .rt-grid-wrap { display: grid; gap: 16px; margin-bottom: 6px;
                  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
  .rt-card { background: var(--surface); border: 1px solid var(--border);
             border-radius: 12px; padding: 18px 20px 15px;
             border-top: 3px solid var(--cong-buy); }
  .rt-card--lost { border-top-color: var(--cong-sell); }
  .rt-card-head { display: flex; gap: 16px; align-items: flex-start;
                  justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
  .rt-rank { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
             color: var(--text-dim); margin-bottom: 5px; }
  .rt-title { font-size: 1.15rem; margin: 0 0 5px; color: var(--text); font-weight: 600; }
  .rt-title a { color: var(--text); text-decoration: none; }
  .rt-title a:hover { color: var(--accent); }
  .rt-held { font-size: 0.74rem; font-weight: 500; color: var(--text-dim);
             margin-left: 8px; letter-spacing: 0.02em; }
  .rt-dates { font-size: 0.8rem; line-height: 1.55; color: var(--text-muted); margin: 0;
              font-family: var(--font-mono); }
  .rt-figure { text-align: right; flex: 0 0 auto; }
  .rt-figure .v { font-family: var(--font-mono); font-size: 1.65rem; font-weight: 700; line-height: 1; }
  .rt-figure .v.pos { color: var(--buy); }
  .rt-figure .v.neg { color: var(--sell); }
  .rt-figure .v .u { font-size: 0.72rem; font-weight: 600; margin-left: 2px; }
  .rt-figure .l { font-size: 0.63rem; letter-spacing: 0.07em; text-transform: uppercase;
                  color: var(--text-dim); margin-top: 5px; max-width: 16ch; margin-left: auto; }
  /* overflow was `visible`, which let the axis price labels — drawn to the
     LEFT of the plot and anchored to their end — render outside the SVG box
     and spill over the card. The gutter in congress_roundtrips.py is wide
     enough for them now; this makes anything unexpected clip inside the chart
     instead of escaping onto the page. */
  .rt-svg { width: 100%; height: auto; display: block; overflow: hidden; }
  .rt-band { fill: var(--accent); opacity: 0.09; }
  .rt-grid { stroke: var(--border); stroke-width: 1; }
  .rt-line { fill: none; stroke: var(--text); stroke-width: 1.6;
             stroke-linejoin: round; stroke-linecap: round; }
  .rt-dot-entry { fill: var(--cong-buy); stroke: var(--surface); stroke-width: 2; }
  .rt-dot-exit  { fill: var(--cong-sell); stroke: var(--surface); stroke-width: 2; }
  .rt-ax { fill: var(--text-dim); font-size: 10px; font-family: var(--font-mono); }
  .rt-ax-r { text-anchor: end; }
  .rt-key { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 0;
            font-size: 0.72rem; color: var(--text-muted); }
  .rt-key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
              margin-right: 5px; vertical-align: -1px; }
  .rt-key .k-entry { background: var(--cong-buy); }
  .rt-key .k-exit  { background: var(--cong-sell); }
  .rt-key .k-band  { background: var(--accent); opacity: 0.28; border-radius: 2px; }
  .rt-line-fig { font-size: 0.79rem; line-height: 1.65; color: var(--text-muted);
                 margin: 11px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
  .rt-line-fig .pos { color: var(--buy); }
  .rt-line-fig .neg { color: var(--sell); }
  .rt-adj { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
            color: var(--text-dim); margin-left: 6px; font-family: var(--font-body); }
  .rt-basis { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap;
              background: var(--surface); border: 1px solid var(--border);
              border-left: 3px solid var(--accent); border-radius: 12px;
              padding: 18px 22px; margin: 20px 0 4px; }
  .rt-basis-fig { font-family: var(--font-mono); font-size: 2.6rem; font-weight: 700;
                  color: var(--accent); line-height: 1; flex: 0 0 auto; }
  .rt-basis-fig .u { font-size: 1.1rem; margin-left: 1px; }
  .rt-basis-txt { font-size: 0.86rem; line-height: 1.7; color: var(--text-muted);
                  max-width: 72ch; flex: 1 1 320px; }
  .rt-basis-txt strong { color: var(--text); display: block; margin-bottom: 5px; }
  .rt-note { font-size: 0.82rem; line-height: 1.7; color: var(--text-dim);
             max-width: 82ch; margin: 18px 0 34px; }
  .rt-note strong { color: var(--text-muted); }
  @media (max-width: 640px) {
    .rt-grid-wrap { grid-template-columns: 1fr; }
    .rt-card { padding: 15px 14px 12px; }
    .rt-figure { text-align: left; }
    .rt-figure .l { margin-left: 0; }
  }
