/* ==========================================================================
   Viés Claro — Component Primitives
   Fonte canônica: Claude Design (bundle h3FYgH4IiaUmegBHr9PmiQ, abr/2026)
   Consome tokens de tokens.css. Chrome exclusivo de protótipo omitido.
   ========================================================================== */

@import "tokens.css";

/* Base ---------------------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #e8e2d2; /* "mat" editorial visível em telas > 1440px */
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

[data-theme="dark"] body {
  background: #0a0908;
}

/* Masthead (shared) --------------------------------------------------------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: relative;
}
.masthead .brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
/* Canonical brand dot — aparece no masthead, pg-masthead, footer, sidebar.
   Dimensionado como 0.7em (≈ cap-height do Fraunces weight 900), de modo
   que ocupe exatamente a altura do "V" de "Viés". Parent usa
   align-items: baseline, então o bottom do dot cola no baseline do texto
   e o topo fica na altura do cap-top. */
.brand .dot,
.fbrand .dot {
  width: 0.7em;
  height: 0.7em;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--left) 0 33%, var(--center) 33% 66%, var(--right) 66% 100%);
}
.masthead .brand small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.masthead nav {
  display: flex; gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}
.masthead nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.masthead nav a.is-active {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 500;
}
.masthead .edition {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Page masthead (site header) ----------------------------------------------- */
.pg-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 56px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.pg-masthead .brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 12px;
}
/* .pg-masthead .brand .dot herda size do .brand .dot canonical acima */
.pg-masthead .brand small {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.pg-masthead nav {
  display: flex; gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}
.pg-masthead nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.pg-masthead nav a.is-active {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 500;
}
.pg-masthead .actions {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pg-masthead .actions .search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  color: var(--ink-3);
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  min-width: 220px;
  border-radius: 2px;
}

/* Sub-header (breadcrumb bar) ----------------------------------------------- */
.pg-subheader {
  padding: 10px 56px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 10px;
}
.pg-subheader a { color: var(--ink-3); text-decoration: none; }
.pg-subheader .crumb-sep { color: var(--ink-4); }
.pg-subheader .current { color: var(--ink); }

/* Site footer --------------------------------------------------------------- */
.pg-footer {
  background: #12110f;
  color: #d9d3c5;
  padding: 56px 56px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  font-size: 13px;
  border-top: 3px solid var(--ink);
}
.pg-footer .fbrand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 32px;
  color: #f2ede2;
  line-height: 1;
  margin-bottom: 14px;
}
/* .pg-footer .fbrand .dot herda size do .fbrand .dot canonical acima,
   mas override do gradiente (dark mode) e margin-right */
.pg-footer .fbrand .dot {
  background: linear-gradient(90deg, oklch(0.70 0.17 25) 0 33%, oklch(0.80 0.12 75) 33% 66%, oklch(0.68 0.17 255) 66% 100%);
  margin-right: 10px;
}
.pg-footer .fmanifesto {
  color: #9a938a;
  line-height: 1.5;
  max-width: 340px;
  font-size: 13px;
}
.pg-footer h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5e584f;
  font-weight: 500;
  margin: 0 0 14px;
}
.pg-footer ul { list-style: none; padding: 0; margin: 0; }
.pg-footer ul li { padding: 4px 0; color: #d9d3c5; }
.pg-footer ul li a { color: inherit; text-decoration: none; }
.pg-footer ul li a:hover { color: #f2ede2; }
.pg-footer-bottom {
  grid-column: 1 / -1;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #2a2823;
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5e584f;
}

/* Section label ------------------------------------------------------------- */
.section-label {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
  border-top: 2px solid var(--ink);
  padding-top: 10px;
}
.section-label h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  margin: 0;
}
.section-label .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* Bias chip ----------------------------------------------------------------- */
.bias-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  border: 1px solid currentColor;
}
.bias-chip.left   { color: var(--left-ink);   background: var(--left-soft); }
.bias-chip.right  { color: var(--right-ink);  background: var(--right-soft); }
.bias-chip.center { color: var(--center-ink); background: var(--center-soft); }
.bias-chip.none   { color: var(--ink-3);      background: var(--rule-2);     border-color: var(--rule); }
.bias-chip .pip { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* Bias bar (stacked) -------------------------------------------------------- */
.bias-bar {
  display: flex;
  height: 10px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  background: var(--rule-2);
}
.bias-bar > span { display: block; height: 100%; }
.bias-bar .l { background: var(--left); }
.bias-bar .c { background: var(--center); }
.bias-bar .r { background: var(--right); }
.bias-bar.tall { height: 18px; }
.bias-bar.xl { height: 28px; }

.bias-legend {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 6px;
}
.bias-legend .lv { color: var(--left-ink); }
.bias-legend .cv { color: var(--center-ink); }
.bias-legend .rv { color: var(--right-ink); }

/* Bias dots (sparkline) ----------------------------------------------------- */
.bias-dots {
  display: inline-flex; gap: 2px;
}
.bias-dots i {
  display: block;
  width: 6px; height: 14px;
  background: var(--rule-2);
  border-radius: 1px;
}
.bias-dots i.l { background: var(--left); }
.bias-dots i.c { background: var(--center); }
.bias-dots i.r { background: var(--right); }

/* Spectrum gauge ------------------------------------------------------------ */
.spectrum {
  position: relative;
  height: 34px;
  background: linear-gradient(90deg,
    var(--left) 0%,
    color-mix(in oklch, var(--left), var(--center) 60%) 35%,
    var(--center) 50%,
    color-mix(in oklch, var(--right), var(--center) 60%) 65%,
    var(--right) 100%);
  border-radius: 2px;
}
.spectrum .needle {
  position: absolute;
  top: -6px; bottom: -6px;
  width: 3px;
  background: var(--ink);
  border-radius: 2px;
  box-shadow: 0 0 0 3px var(--bg);
}
.spectrum .ticks {
  position: absolute; inset: 0;
  display: flex; justify-content: space-between;
  pointer-events: none;
}
.spectrum .ticks span {
  width: 1px; background: rgba(0,0,0,0.15);
}

/* Placeholder --------------------------------------------------------------- */
.placeholder {
  background:
    repeating-linear-gradient(135deg, var(--rule-2) 0 10px, transparent 10px 20px),
    var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Card ---------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
}

/* Story card (feed) --------------------------------------------------------- */
.story-card {
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 22px;
  cursor: pointer;
}
.story-card .img {
  aspect-ratio: 4/3;
  min-height: 140px;
}
.story-card h3 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  margin: 10px 0 8px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.story-card p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
}
.story-card .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Button -------------------------------------------------------------------- */
.btn {
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  border-radius: 2px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Pill ---------------------------------------------------------------------- */
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  background: var(--bg-soft);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
}
.pill.accent {
  background: oklch(0.95 0.05 160);
  color: oklch(0.35 0.14 160);
  border-color: oklch(0.80 0.10 160);
}

/* KPI ----------------------------------------------------------------------- */
.kpi {
  padding: 14px 0;
}
.kpi .num {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.kpi .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 6px;
}

/* Dense table --------------------------------------------------------------- */
.vc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vc-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  padding: 8px 14px;
  border-bottom: 1px solid var(--ink);
}
.vc-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.vc-table tr:hover td { background: var(--bg-soft); }
.vc-table .num-col { font-family: var(--mono); text-align: right; }

/* Proposal banner ----------------------------------------------------------- */
.proposal-banner {
  background: oklch(0.95 0.05 160);
  color: oklch(0.30 0.14 160);
  padding: 14px 56px;
  border-bottom: 1px solid oklch(0.80 0.10 160);
  font-size: 13px;
  display: flex; align-items: center; gap: 12px;
}
.proposal-banner strong {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: oklch(0.35 0.14 160);
  color: #fff;
  padding: 3px 7px;
  border-radius: 2px;
}

/* Candidate chip ------------------------------------------------------------ */
.cand-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
}
.cand-chip .av {
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  color: var(--ink-2);
  flex-shrink: 0;
}
.cand-chip .name { font-size: 13px; font-weight: 500; }
.cand-chip .party { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; }

/* Social post card ---------------------------------------------------------- */
.social-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: 16px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
}
.social-card .head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.social-card .platform {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.social-card .stats {
  display: flex; gap: 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
