/* faction-view.css — Žmonės "Frakcijos" view (FRAKCIJOS-VIEW, artboard F;
   docs/design/page-design-2026-11.md §C): the topic × faction comparison table,
   then one drawn card per faction with a per-topic radar (bars on narrow cards).
   Markup from zmones.html renderFactions(). Colours only from tokens: each
   faction element carries .fv-c-<key>, which sets --fv-c (the faction colour)
   and --fv-tint (its tint), both themes. Prefix fv-. */

.fv-c-lsdpf  { --fv-c: var(--faction-lsdpf);  --fv-tint: var(--faction-lsdpf-tint); }
.fv-c-tslkdf { --fv-c: var(--faction-tslkdf); --fv-tint: var(--faction-tslkdf-tint); }
.fv-c-naf    { --fv-c: var(--faction-naf);    --fv-tint: var(--faction-naf-tint); }
.fv-c-dfvl   { --fv-c: var(--faction-dfvl);   --fv-tint: var(--faction-dfvl-tint); }
.fv-c-lsf    { --fv-c: var(--faction-lsf);    --fv-tint: var(--faction-lsf-tint); }
.fv-c-lvzksf { --fv-c: var(--faction-lvzksf); --fv-tint: var(--faction-lvzksf-tint); }
.fv-c-misri  { --fv-c: var(--faction-misri);  --fv-tint: var(--faction-misri-tint); }

.fv { padding: 0.5rem 0 1.5rem; }
.fv-intro { margin: 0 0 1.25rem; }
.fv-meta { font-size: var(--text-small); color: var(--text-secondary); line-height: 1.4; }
.fv-note { font-size: var(--text-small); color: var(--text-secondary); margin: 1rem 0 0; max-width: var(--measure); }
.fv-note a { color: inherit; }

/* the "?" next to a fact label: a 24×24 target around the 14px method mark */
.fv-q { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; vertical-align: middle; text-decoration: none; }
.fv-q .method-link { margin-left: 0; }

/* ── 1. comparison table ── */
.fv-table-card {
  background: var(--bg-surface); border: 1px solid var(--border-hair); border-radius: 8px;
  padding: 20px 24px; margin: 0 0 24px;
}
.fv-table-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin: 0 0 14px; }
.fv-h2 { font-family: 'Source Serif 4', serif; font-weight: 600; font-size: var(--text-h3); line-height: 1.3; color: var(--text-primary); margin: 0; }
/* the table scrolls inside its own box on narrow screens; position: relative so
   the cells' visually-hidden (absolute) notes stay inside it, not widening the page */
.fv-table-wrap { overflow-x: auto; position: relative; }
.fv-t { border-collapse: collapse; width: 100%; min-width: 760px; font-size: var(--text-small); }
.fv-t th, .fv-t td { padding: 7px 8px; border-bottom: 1px solid var(--border-hair); text-align: left; vertical-align: middle; }
.fv-t thead th { font-weight: 600; color: var(--text-primary); white-space: nowrap; border-bottom-color: var(--border-strong); }
.fv-t tbody th { font-weight: 400; color: var(--text-primary); white-space: nowrap; }
.fv-t tbody tr:last-child th, .fv-t tbody tr:last-child td { border-bottom: 0; }
.fv-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--fv-c); margin-right: 6px; vertical-align: -0.05em; }
.fv-cell { display: flex; align-items: center; gap: 8px; }
.fv-cell__bar { flex: 1 1 auto; min-width: 40px; height: 8px; border-radius: 2px; background: var(--bg-sunken); overflow: hidden; }
.fv-cell__bar span { display: block; height: 100%; background: var(--fv-c); }
.fv-num { font-family: 'JetBrains Mono', monospace; font-size: var(--text-mono); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.fv-cell .fv-num { flex: 0 0 auto; min-width: 2.6em; text-align: right; }
.fv-t__na { color: var(--text-secondary); text-align: center !important; }
.fv-foot { font-size: var(--text-small); color: var(--text-secondary); margin: 12px 0 0; }

/* ── 2. faction cards ── */
.fv-cards { display: flex; flex-wrap: wrap; gap: 20px; }
.fv-card {
  flex: 1 1 480px; min-width: 0; container-type: inline-size;
  background: var(--bg-surface); border: 1px solid var(--border-hair); border-top: 6px solid var(--fv-c);
  border-radius: 8px; overflow: hidden;
}
.fv-card__head { background: var(--fv-tint); padding: 14px 20px; }
.fv-card__name { font-family: 'Source Serif 4', serif; font-weight: 600; font-size: var(--text-h3); line-height: 1.3; color: var(--text-primary); margin: 0; overflow-wrap: anywhere; }
.fv-card__sub { font-size: var(--text-small); color: var(--text-secondary); margin-top: 2px; }
.fv-card__body { padding: 16px 20px 18px; }
.fv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 24px; }
.fv-fact__label { display: flex; align-items: center; font-size: var(--text-small); font-weight: 600; color: var(--text-primary); min-height: 24px; }
.fv-big { font-family: 'Source Serif 4', serif; font-weight: 600; font-size: var(--text-h2); line-height: 1.15; color: var(--text-primary); font-variant-numeric: tabular-nums; margin-top: 2px; }
.fv-big small { font-family: Inter, system-ui, sans-serif; font-size: var(--text-small); font-weight: 400; color: var(--text-secondary); margin-left: 4px; }
.fv-sub { font-size: var(--text-small); color: var(--text-secondary); line-height: 1.4; margin-top: 2px; }
.fv-meter { height: 6px; border-radius: 3px; background: var(--border-hair); overflow: hidden; margin-top: 8px; }
.fv-meter span { display: block; height: 100%; background: var(--text-primary); }
/* min–median–max: a line, the range band, the median dot */
.fv-range { position: relative; height: 16px; margin-top: 8px; }
.fv-range::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--border-hair); }
.fv-range__band { position: absolute; top: 5px; height: 6px; border-radius: 3px; background: var(--text-secondary); opacity: 0.55; }
.fv-range__dot { position: absolute; top: 2px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--text-primary); border: 2px solid var(--bg-surface); box-sizing: border-box; }
.fv-range__labels { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; font-size: var(--text-small); color: var(--text-secondary); margin-top: 2px; font-variant-numeric: tabular-nums; }
.fv-range__labels b { font-weight: 600; color: var(--text-primary); }
/* projects: individual / with other factions / other joint */
.fv-split { display: flex; height: 8px; border-radius: 2px; overflow: hidden; margin-top: 8px; background: var(--bg-sunken); }
.fv-split span { display: block; height: 100%; }
.fv-split .ind { background: var(--text-primary); }
.fv-split .cross { background: var(--text-secondary); }
.fv-split .other { background: var(--border-strong); }

/* radar block */
.fv-radar-block { border-top: 1px solid var(--border-hair); margin-top: 18px; padding-top: 14px; }
.fv-label { font-size: var(--text-small); font-weight: 600; color: var(--text-primary); }
.fv-radar { display: block; width: 100%; max-width: 460px; height: auto; margin: 8px auto 0; overflow: visible; }
.fv-radar .ring { fill: none; stroke: var(--border-hair); stroke-width: 1; }
.fv-radar .axis { stroke: var(--border-hair); stroke-width: 1; }
.fv-radar .ring-label { fill: var(--text-secondary); font-size: 12px; font-family: Inter, system-ui, sans-serif; }
.fv-radar .poly { fill: var(--fv-c); fill-opacity: 0.22; stroke: var(--fv-c); stroke-width: 2.5; stroke-linejoin: round; }
.fv-radar .vtx { fill: var(--fv-c); }
.fv-radar .lbl { fill: var(--text-primary); font-size: 14px; font-family: Inter, system-ui, sans-serif; }
.fv-radar .lbl .v { fill: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 13px; }
/* narrow cards: the same 13 values as thin bars (same scale, same order) */
.fv-tbars { display: none; margin-top: 8px; }
.fv-tbar { display: grid; grid-template-columns: minmax(0, 9.5em) 1fr auto; align-items: center; gap: 8px; font-size: var(--text-small); padding: 3px 0; }
.fv-tbar__name { color: var(--text-primary); overflow-wrap: anywhere; }
.fv-tbar__track { height: 6px; border-radius: 2px; background: var(--bg-sunken); overflow: hidden; }
.fv-tbar__track span { display: block; height: 100%; background: var(--fv-c); }
@container (max-width: 420px) {
  .fv-radar { display: none; }
  .fv-tbars { display: block; }
}
.fv-members { display: inline-block; margin-top: 14px; font-size: var(--text-small); font-weight: 500; color: var(--text-primary); }

@media (max-width: 600px) {
  .fv-table-card { padding: 16px; }
  .fv-card__head, .fv-card__body { padding-left: 16px; padding-right: 16px; }
}
