:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0c0f10;
  --panel-2: #121617;
  --border: #2a3032;
  --border-soft: rgba(255, 255, 255, 0.1);
  --muted: #a4aaad;
  --dim: #737b7e;
  --text: #f7f7f7;
  --green: #bbff2a;
  --green-soft: rgba(187, 255, 42, 0.15);
  --blue: #64f1dc;
  --amber: #ffbe4d;
  --red: #ff3c5d;
  --red-deep: #93212a;
  --axis: 53%;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
summary {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

h1,
h2,
p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  padding: 0 18px 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 320px) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
  margin: 0 -18px;
  padding: 10px 18px;
  border-bottom: 1px solid #202426;
  background: #000;
}

.brand,
.filter-controls,
.summary-strip,
.chart-heading,
.axis-labels,
.site-footer.site-legal-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(187, 255, 42, 0.56);
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.filter-controls {
  justify-content: center;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-controls::-webkit-scrollbar {
  display: none;
}

body.is-profile-view .filter-controls {
  display: none;
}

body.is-profile-view .topbar {
  grid-template-columns: minmax(210px, 320px) auto;
  justify-content: space-between;
}

.filter-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.filter-control span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-control select,
.mode-toggle {
  min-width: 136px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0 34px 0 12px;
  appearance: none;
  background: #0b0d0e;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.filter-control select {
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 16px,
    calc(100% - 12px) 16px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.mode-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0 14px;
}

.filter-control select:hover,
.filter-control select:focus-visible,
.mode-toggle:hover,
.mode-toggle:focus-visible,
.mode-toggle[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
  outline: none;
}

.filter-control select:hover,
.filter-control select:focus-visible {
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 16px,
    calc(100% - 12px) 16px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.toolkit-menu {
  position: relative;
  z-index: 40;
  display: grid;
  justify-items: end;
}

.toolkit-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--border);
  padding: 0 13px;
  background: #0b0d0e;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  list-style: none;
  text-transform: uppercase;
  user-select: none;
}

.toolkit-menu summary::-webkit-details-marker {
  display: none;
}

.toolkit-menu summary::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.toolkit-menu[open] summary,
.toolkit-menu summary:hover,
.toolkit-menu summary:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.toolkit-menu nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 2px;
  width: 260px;
  max-width: calc(100vw - 20px);
  border: 1px solid var(--border);
  padding: 8px;
  background: rgba(5, 6, 6, 0.98);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

.toolkit-menu nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.toolkit-menu nav a:hover,
.toolkit-menu nav a:focus-visible,
.toolkit-menu nav a[aria-current="page"] {
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

.workspace {
  display: grid;
  width: min(1120px, 100%);
  margin: 18px auto 0;
}

.library-panel {
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--panel);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
}

.section-heading h1 {
  font-size: clamp(36px, 8vw, 84px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.92;
}

.section-heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(16px, 4vw, 24px);
  font-weight: 650;
  line-height: 1.2;
}

.status-pill {
  flex: 0 0 auto;
  width: fit-content;
  border: 1px solid rgba(187, 255, 42, 0.42);
  padding: 9px 12px;
  background: var(--green-soft);
  color: var(--green) !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  text-transform: uppercase;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.summary-strip div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 15px 18px;
}

.summary-strip div + div {
  border-left: 1px solid var(--border);
}

.summary-strip span,
.axis-labels,
.chart-heading p,
.method-note p {
  color: var(--muted);
}

.summary-strip span,
.chart-heading h2,
.filter-control span,
.axis-labels,
#bias-range {
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary-strip span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-strip strong {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(20px, 5vw, 34px);
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.chart-heading {
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
}

.chart-heading h2 {
  color: var(--green);
  font-size: 18px;
  font-weight: 950;
}

.chart-heading p {
  max-width: 48rem;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.35;
}

#bias-range {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.axis-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 0 18px 10px;
  font-size: 11px;
  font-weight: 900;
}

.axis-labels span:nth-child(2) {
  text-align: center;
}

.axis-labels span:first-child {
  color: var(--red);
}

.axis-labels span:last-child {
  color: var(--green);
  text-align: right;
}

.bias-chart {
  position: relative;
  display: block;
  min-height: 520px;
  padding-bottom: 8px;
  background:
    radial-gradient(circle at 50% 12%, rgba(100, 241, 220, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 46%),
    #071011;
}

.echarts-chart {
  width: 100%;
  padding: 0 0 8px;
}

.echarts-chart > div,
.echarts-chart svg {
  max-width: 100%;
}

.map-chart {
  min-height: 620px;
  background:
    linear-gradient(90deg, rgba(255, 60, 93, 0.05), transparent 40%, transparent 60%, rgba(187, 255, 42, 0.05)),
    linear-gradient(180deg, rgba(187, 255, 42, 0.035), transparent 48%, rgba(100, 241, 220, 0.035)),
    #061114;
}

.bias-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, var(--axis)) 1fr;
  min-height: 62px;
  border-top: 1px solid var(--border-soft);
}

.site-cell {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 14px 8px 18px;
  background: linear-gradient(90deg, var(--panel) 0 62%, rgba(12, 15, 16, 0.82) 82%, transparent);
}

.site-name {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(17px, 4.7vw, 25px);
  font-weight: 950;
  line-height: 1.03;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bar-cell {
  position: relative;
  min-width: 0;
}

.bar-track {
  position: absolute;
  inset: 50% 14px auto 0;
  height: 13px;
  transform: translateY(-50%);
}

.bar {
  position: absolute;
  top: 0;
  height: 100%;
  min-width: 2px;
}

.bar.positive {
  left: 0;
  background: linear-gradient(90deg, #50a532, var(--green));
  box-shadow: 0 0 18px rgba(187, 255, 42, 0.16);
}

.bar.negative {
  right: 100%;
  background: linear-gradient(90deg, var(--red-deep), var(--red));
  box-shadow: 0 0 18px rgba(255, 60, 93, 0.13);
}

.bias-value {
  position: absolute;
  top: 50%;
  right: 14px;
  min-width: 52px;
  transform: translateY(-50%);
  font-size: clamp(21px, 5.5vw, 32px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-align: right;
}

.bias-value.positive {
  color: var(--green);
}

.bias-value.negative {
  color: var(--red);
}

.bias-value.neutral {
  color: var(--muted);
}

.zero-row {
  display: grid;
  place-items: center;
  min-height: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  border-bottom: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.method-note {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 12px;
  align-items: start;
  border-top: 1px solid var(--border);
  padding: 18px;
}

.method-note span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: ui-serif, Georgia, serif;
  font-size: 15px;
  font-weight: 950;
}

.method-note-copy {
  display: grid;
  gap: 8px;
}

.method-note p {
  font-size: 13px;
  line-height: 1.35;
}

.method-note p:first-child {
  color: var(--text);
}

.method-note a,
.methodology-page a {
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}

.method-note a:hover,
.method-note a:focus-visible,
.methodology-page a:hover,
.methodology-page a:focus-visible {
  color: var(--blue);
  outline: none;
}

.methodology-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 1120px);
  margin: 18px auto 0;
}

.methodology-hero,
.methodology-grid article,
.methodology-actions {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(18, 31, 36, 0.94), rgba(9, 15, 18, 0.96)),
    var(--panel);
}

.methodology-hero {
  display: grid;
  gap: 10px;
  padding: clamp(22px, 5vw, 44px);
}

.methodology-hero p {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.methodology-hero h1 {
  max-width: 820px;
  font-size: clamp(40px, 8vw, 82px);
  font-weight: 950;
  line-height: 0.94;
}

.methodology-hero span {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.45;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.methodology-grid article {
  display: grid;
  gap: 9px;
  align-content: start;
  min-height: 170px;
  padding: 18px;
}

.methodology-grid h2 {
  color: var(--green);
  font-size: 16px;
  font-weight: 950;
  text-transform: uppercase;
}

.methodology-grid p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.methodology-grid strong {
  color: var(--text);
}

.methodology-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 14px;
}

.methodology-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(187, 255, 42, 0.42);
  padding: 0 14px;
  background: var(--green-soft);
}

.site-footer.site-legal-footer {
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  margin-top: 18px;
  padding: 24px 0 38px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer.site-legal-footer a {
  color: inherit;
  font-size: inherit;
  font-weight: 750;
  text-decoration: none;
}

.site-footer.site-legal-footer a:hover,
.site-footer.site-legal-footer a:focus-visible {
  color: var(--green);
  outline: none;
}

.error-state,
.empty-state {
  padding: 24px 18px 28px;
  color: var(--muted);
  font-size: 15px;
}

.profile-link {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.profile-link:hover,
.profile-link:focus-visible {
  color: var(--green);
  outline: none;
}

.profile-view {
  display: grid;
  gap: 14px;
  scroll-margin-top: 96px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(16, 33, 38, 0.62), rgba(4, 7, 8, 0.94) 340px),
    radial-gradient(circle at 16% 6%, rgba(100, 241, 220, 0.12), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(187, 255, 42, 0.11), transparent 34%),
    #071011;
}

.profile-toolbar,
.profile-panel,
.profile-signal,
.profile-card,
.profile-empty {
  border: 1px solid rgba(112, 132, 139, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 31, 36, 0.94), rgba(9, 15, 18, 0.96)),
    rgba(12, 18, 20, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 40px rgba(0, 0, 0, 0.22);
}

.profile-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  border-radius: 0;
  padding: 10px;
  background: rgba(8, 13, 15, 0.94);
}

.profile-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.profile-toolbar-main > span,
.profile-switcher > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.back-button {
  min-height: 36px;
  border: 1px solid rgba(100, 241, 220, 0.22);
  border-radius: 6px;
  padding: 0 12px;
  background: rgba(8, 15, 18, 0.92);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.back-button:hover,
.back-button:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.profile-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: min(100%, 430px);
}

.profile-switcher select {
  width: min(100%, 350px);
  min-height: 36px;
  border: 1px solid rgba(100, 241, 220, 0.22);
  border-radius: 6px;
  padding: 0 32px 0 11px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, currentColor 50%) calc(100% - 17px) 15px / 5px 5px no-repeat,
    linear-gradient(135deg, currentColor 50%, transparent 50%) calc(100% - 12px) 15px / 5px 5px no-repeat,
    rgba(8, 15, 18, 0.92);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.profile-switcher select:hover,
.profile-switcher select:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.profile-top-grid {
  display: grid;
  gap: 14px;
}

.profile-hero {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.profile-logo-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: #f7f7f7;
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.28);
}

.profile-logo-card::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border: 2px solid #eaf7ff;
  border-radius: 999px;
  background: #2f94ff;
  box-shadow: 0 0 12px rgba(47, 148, 255, 0.42);
}

.profile-logo-card::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 12px;
  z-index: 1;
  width: 8px;
  height: 13px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(42deg);
}

.profile-logo-card img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.profile-logo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #0b0d0e;
  color: var(--green);
  font-size: 23px;
  font-weight: 950;
}

.profile-title-block {
  min-width: 0;
}

.profile-kicker {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-title-block h1 {
  overflow-wrap: break-word;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 950;
  line-height: 0.94;
}

.profile-subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.profile-meta-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  gap: 9px;
  margin: 14px 0 0;
}

.profile-meta-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.profile-meta-item img {
  width: 25px;
  height: 25px;
  border-radius: 6px;
}

.profile-meta-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-meta-grid dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.profile-meta-grid a {
  color: inherit;
  text-decoration: none;
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 9px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid rgba(112, 132, 139, 0.34);
  border-radius: 7px;
  padding: 9px;
  background: rgba(6, 10, 12, 0.64);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.source-badge {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--text);
  font-weight: 950;
}

.source-badge img {
  width: 18px;
  height: 18px;
}

.profile-signal {
  display: grid;
  position: relative;
  gap: 14px;
  overflow: hidden;
  padding: 14px;
}

.profile-signal-copy,
.confidence-card,
.profile-gauge-wrap {
  min-width: 0;
}

.profile-signal-copy {
  overflow: hidden;
}

.profile-tone-positive {
  border-color: rgba(139, 240, 116, 0.36);
  background:
    linear-gradient(120deg, rgba(70, 220, 102, 0.14), rgba(9, 18, 20, 0.96) 46%),
    rgba(12, 18, 20, 0.92);
}

.profile-tone-negative {
  border-color: rgba(255, 60, 93, 0.36);
  background:
    linear-gradient(120deg, rgba(255, 60, 93, 0.14), rgba(9, 18, 20, 0.96) 46%),
    rgba(12, 18, 20, 0.92);
}

.profile-tone-neutral {
  border-color: rgba(255, 190, 77, 0.34);
  background:
    linear-gradient(120deg, rgba(255, 190, 77, 0.12), rgba(9, 18, 20, 0.96) 46%),
    rgba(12, 18, 20, 0.92);
}

.profile-gauge-wrap {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.profile-gauge {
  width: 100%;
  height: 210px;
}

.profile-gauge-wrap > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.profile-signal-copy h2,
.profile-card h2,
.profile-empty h1 {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.08;
  text-transform: uppercase;
}

.profile-signal-copy p,
.profile-card p,
.profile-empty p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.profile-tone-positive .profile-signal-copy h2 {
  color: #8bf074;
}

.profile-tone-negative .profile-signal-copy h2 {
  color: var(--red);
}

.profile-tone-neutral .profile-signal-copy h2 {
  color: var(--amber);
}

.profile-read-grid {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.profile-read-grid div,
.confidence-card,
.profile-note {
  border: 1px solid rgba(112, 132, 139, 0.26);
  border-radius: 7px;
  background: rgba(7, 12, 14, 0.76);
}

.profile-read-grid div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 10px;
}

.profile-read-grid img {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.profile-read-grid strong,
.confidence-card strong {
  display: block;
  color: var(--green);
  font-size: 14px;
  font-weight: 950;
}

.profile-read-grid span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.confidence-card {
  padding: 14px;
  text-align: left;
}

.confidence-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.confidence-card strong {
  margin-top: 5px;
  color: var(--green);
  font-size: 28px;
}

.confidence-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.profile-grid {
  display: grid;
  gap: 12px;
}

.profile-card,
.profile-empty {
  min-width: 0;
  padding: 14px;
}

.profile-card {
  overflow: hidden;
}

.profile-chart {
  width: 100%;
  min-height: 290px;
}

.heatmap-chart {
  min-height: 350px;
}

.variance-list,
.fit-list {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.variance-list li,
.fit-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 7px 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
}

.variance-list span,
.fit-list span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(112, 132, 139, 0.26);
  border-radius: 5px;
  background: #10181c;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.fit-list span {
  display: inline-grid;
  grid-template-columns: 18px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fit-list span img {
  width: 18px;
  height: 18px;
}

.fit-list span b {
  display: none;
}

.variance-list strong,
.fit-list strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variance-list em,
.fit-list em {
  color: var(--red);
  font-style: normal;
  font-size: 13px;
  font-weight: 950;
}

.fit-card-positive h2,
.fit-list em.positive {
  color: #8bf074;
}

.fit-card-negative h2,
.fit-list em.negative {
  color: var(--red);
}

.profile-note {
  padding: 10px;
}

.card-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  justify-content: space-between;
}

.info-dot {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(164, 170, 173, 0.46);
  border-radius: 999px;
  color: var(--muted);
  cursor: help;
  font-size: 12px;
  font-weight: 950;
}

.heatmap-platform-key {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  margin-top: 12px;
  padding: 0 18px 0 82px;
}

.heatmap-platform-key span {
  display: grid;
  justify-items: center;
  color: var(--text);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.heatmap-platform-key img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.heatmap-platform-key b {
  font-size: 11px;
}

.heatmap-platform-key img,
.evidence-platform img,
.fit-list img[src*="platform-icons"] {
  filter: invert(1) grayscale(1) brightness(1.65);
  opacity: 0.9;
}

.chart-explain {
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
}

.heatmap-explain {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.fit-heading {
  display: flex;
  gap: 9px;
  align-items: center;
}

.fit-heading img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.card-title-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.evidence-card {
  display: grid;
  gap: 12px;
}

.evidence-table {
  overflow-x: auto;
  margin: 0 -4px -2px;
  padding: 0 4px 2px;
}

.evidence-head,
.evidence-item {
  display: grid;
  grid-template-columns: minmax(160px, 1.7fr) 66px 58px 58px 58px 86px 64px;
  gap: 8px;
  align-items: center;
  min-width: 600px;
}

.evidence-head {
  border-bottom: 1px solid var(--border-soft);
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.evidence-list {
  display: grid;
  gap: 0;
}

.evidence-item {
  border-top: 1px solid var(--border-soft);
  padding: 9px 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.evidence-list .evidence-item:first-child {
  border-top: 0;
}

.evidence-game {
  display: grid;
  gap: 5px;
}

.evidence-game strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

.evidence-item span,
.evidence-item a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-item > strong {
  font-size: 14px;
}

.evidence-item img {
  width: 18px;
  height: 18px;
}

.positive {
  color: #8bf074 !important;
}

.negative {
  color: var(--red) !important;
}

.neutral {
  color: var(--muted) !important;
}

body.is-profile-view .workspace {
  width: min(1320px, 100%);
}

body.is-profile-view .library-panel {
  border: 0;
  background: transparent;
}

body.is-profile-view .site-footer.site-legal-footer {
  display: none;
}

body.is-map-view .workspace {
  width: min(1500px, 100%);
  margin-top: 10px;
}

body.is-map-view .library-panel {
  min-height: calc(100svh - 94px);
}

body.is-map-view .chart-card {
  min-height: calc(100svh - 94px);
}

body.is-map-view .chart-heading {
  padding: 14px 18px 8px;
}

body.is-map-view .chart-heading h2 {
  color: var(--blue);
}

body.is-map-view .site-footer.site-legal-footer {
  display: none;
}

@media (min-width: 900px) {
  .profile-view {
    gap: 14px;
    padding: 18px;
  }

  .profile-top-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 22px;
  }

  .profile-logo-card {
    width: 136px;
  }

  .profile-logo-card::after {
    width: 28px;
    height: 28px;
  }

  .profile-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 18px;
    margin-top: 20px;
  }

  .profile-meta-grid dd {
    font-size: 15px;
  }

  .profile-meta-item:nth-child(3) {
    grid-column: 1 / -1;
  }

  .source-strip {
    width: fit-content;
    max-width: 100%;
    padding: 10px 12px;
  }

  .profile-signal {
    grid-template-columns: minmax(170px, 220px) minmax(260px, 1fr) minmax(150px, 178px);
    align-items: center;
    padding: 20px;
  }

  .profile-gauge {
    height: 230px;
  }

  .profile-signal-copy h2 {
    font-size: 28px;
  }

  .profile-signal-copy p {
    max-width: 640px;
    font-size: 15px;
  }

  .profile-read-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-read-grid div {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 2px 9px;
    padding: 11px;
  }

  .profile-read-grid img {
    width: 28px;
    height: 28px;
  }

  .profile-read-grid span {
    font-size: 11px;
    line-height: 1.28;
  }

  .profile-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
  }

  .profile-card {
    padding: 18px;
  }

  .profile-card:nth-child(1) {
    grid-column: span 4;
  }

  .profile-card:nth-child(2) {
    grid-column: span 5;
  }

  .profile-card:nth-child(3) {
    grid-column: span 3;
  }

  .profile-card:nth-child(4),
  .profile-card:nth-child(5) {
    grid-column: span 3;
  }

  .profile-card:nth-child(6) {
    grid-column: span 6;
  }

  .profile-chart {
    min-height: 335px;
  }

  .heatmap-chart {
    min-height: 390px;
  }

  .heatmap-platform-key {
    padding-right: 18px;
  }

  .evidence-head,
  .evidence-item {
    grid-template-columns: minmax(145px, 1.8fr) 62px 56px 56px 56px 82px 62px;
    min-width: 0;
  }
}

@media (min-width: 1180px) {
  .profile-top-grid {
    grid-template-columns: minmax(430px, 0.8fr) minmax(0, 1.5fr);
    align-items: stretch;
  }

  .profile-hero {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .profile-logo-card {
    width: 138px;
  }

  .profile-title-block h1 {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    font-size: clamp(34px, 3.35vw, 48px);
    line-height: 0.98;
  }

  .profile-signal {
    grid-template-columns: minmax(160px, 200px) minmax(112px, 1fr) minmax(112px, 1fr) minmax(150px, 170px);
    grid-template-rows: auto auto auto;
    gap: 10px;
    align-items: stretch;
    align-content: center;
  }

  .profile-gauge-wrap {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
  }

  .profile-signal-copy {
    display: contents;
    overflow: visible;
  }

  .profile-signal-copy h2 {
    grid-column: 2 / 5;
    grid-row: 1;
    align-self: end;
    max-width: 620px;
    font-size: clamp(24px, 2.2vw, 30px);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .profile-signal-copy p {
    grid-column: 2 / 5;
    grid-row: 2;
    align-self: start;
    max-width: 620px;
    margin-top: 0;
  }

  .profile-read-grid {
    grid-column: 2 / 4;
    grid-row: 3;
    align-self: stretch;
    align-items: stretch;
    margin-top: 0;
  }

  .profile-read-grid div {
    height: 100%;
    align-content: center;
  }

  .confidence-card {
    display: grid;
    grid-column: 4;
    grid-row: 3;
    align-self: stretch;
    align-content: center;
    padding: 12px;
  }
}

@media (min-width: 1180px) and (max-width: 1320px) {
  .profile-top-grid {
    grid-template-columns: minmax(420px, 0.72fr) minmax(0, 1.55fr);
  }

  .profile-signal {
    grid-template-columns: minmax(150px, 180px) minmax(104px, 1fr) minmax(104px, 1fr) minmax(145px, 160px);
    gap: 9px;
  }

  .profile-gauge {
    height: 214px;
  }

  .profile-read-grid span,
  .confidence-card p {
    font-size: 10.5px;
    line-height: 1.25;
  }
}

@media (min-width: 1321px) {
  .profile-top-grid {
    grid-template-columns: minmax(460px, 0.82fr) minmax(0, 1.5fr);
  }

  .profile-signal {
    grid-template-columns: minmax(188px, 212px) minmax(132px, 1fr) minmax(132px, 1fr) minmax(160px, 180px);
    grid-template-rows: auto auto auto;
    gap: 10px 12px;
    align-items: stretch;
    align-content: center;
  }

  .profile-gauge-wrap {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
  }

  .profile-signal-copy {
    display: contents;
    overflow: visible;
  }

  .profile-signal-copy h2 {
    grid-column: 2 / 5;
    grid-row: 1;
    align-self: end;
    max-width: 620px;
  }

  .profile-signal-copy p {
    grid-column: 2 / 5;
    grid-row: 2;
    align-self: start;
    max-width: 620px;
    margin-top: 0;
  }

  .profile-read-grid {
    grid-column: 2 / 4;
    grid-row: 3;
    align-self: stretch;
    align-items: stretch;
    margin-top: 0;
  }

  .profile-read-grid div {
    height: 100%;
    align-content: center;
  }

  .confidence-card {
    display: grid;
    grid-column: 4;
    grid-row: 3;
    align-self: stretch;
    align-content: center;
    padding: 12px;
  }
}

@media (max-width: 760px) {
  :root {
    --axis: 51%;
  }

  .app-shell {
    padding: 0 12px 14px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 60px;
    margin: 0 -12px;
    padding: 8px 12px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .brand-copy small {
    font-size: 11px;
  }

  .filter-controls {
    grid-column: 1 / -1;
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 -12px -8px;
    padding: 8px 12px 10px;
    border-top: 1px solid #202426;
    background: #000;
  }

  .filter-control {
    display: grid;
    gap: 4px;
  }

  .filter-control span {
    font-size: 9px;
  }

  .filter-control select {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding-left: 10px;
    font-size: 11px;
    background-position:
      calc(100% - 16px) 14px,
      calc(100% - 11px) 14px;
  }

  .mode-toggle {
    align-self: end;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .workspace {
    margin-top: 14px;
  }

  .methodology-shell {
    margin-top: 12px;
  }

  .methodology-grid {
    grid-template-columns: 1fr;
  }

  .methodology-grid article {
    min-height: 0;
  }

  .section-heading {
    display: grid;
    gap: 14px;
    padding: 18px 16px 16px;
  }

  .section-heading h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .section-heading p {
    font-size: 18px;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip div {
    padding: 13px 11px;
  }

  .summary-strip div:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .summary-strip span {
    font-size: 9px;
  }

  .summary-strip strong {
    white-space: normal;
  }

  .chart-heading {
    display: grid;
    padding: 16px;
  }

  #bias-range {
    justify-self: start;
  }

  .axis-labels {
    padding: 0 16px 10px;
  }

  .bias-row {
    min-height: 59px;
  }

  .site-cell {
    padding-left: 12px;
    padding-right: 10px;
  }

  .site-meta {
    font-size: 12px;
  }

  .bar-track {
    right: 12px;
    height: 12px;
  }

  .bias-value {
    right: 12px;
    min-width: 45px;
  }

  body.is-map-view .app-shell {
    padding-bottom: 0;
  }

  body.is-map-view .workspace {
    margin-top: 12px;
  }

  body.is-map-view .library-panel,
  body.is-map-view .chart-card {
    min-height: calc(100svh - 132px);
  }

  body.is-map-view .chart-heading {
    padding: 12px 12px 5px;
  }

  body.is-map-view .chart-heading p {
    font-size: 11px;
  }

  body.is-map-view .bias-chart {
    min-height: calc(100svh - 202px);
  }

  body.is-profile-view .app-shell {
    padding-bottom: 0;
  }

  body.is-profile-view .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-view {
    margin: 0 -1px;
    scroll-margin-top: 84px;
  }

  .profile-toolbar {
    position: sticky;
    top: 60px;
    z-index: 12;
    display: grid;
    gap: 8px;
    background: rgba(5, 6, 6, 0.96);
  }

  .profile-toolbar-main,
  .profile-switcher {
    width: 100%;
  }

  .profile-switcher {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .profile-switcher select {
    width: 100%;
    min-height: 34px;
    font-size: 11px;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-logo-card {
    width: 104px;
  }

  .profile-title-block h1 {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    font-size: clamp(30px, 10vw, 42px);
    line-height: 0.98;
  }

  .profile-meta-grid {
    grid-template-columns: 1fr;
  }

  .profile-chart {
    min-height: 270px;
  }

  .heatmap-chart {
    min-height: 350px;
  }

  .heatmap-platform-key {
    gap: 6px;
    margin-top: 10px;
    padding: 0 18px 0 82px;
  }

  .heatmap-platform-key span {
    font-size: 9px;
  }

  .heatmap-platform-key img {
    width: 23px;
    height: 23px;
  }

  .evidence-table {
    overflow-x: visible;
    margin: 0;
    padding: 0;
  }

  .evidence-head {
    display: none;
  }

  .evidence-list {
    gap: 9px;
  }

  .evidence-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 10px;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.035);
  }

  .evidence-list .evidence-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .evidence-game {
    grid-column: 1 / -1;
  }

  .evidence-item span,
  .evidence-item a,
  .evidence-item > strong {
    display: block;
    width: 100%;
    color: var(--text);
    font-size: 12px;
    white-space: normal;
  }

  .evidence-item [data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--dim);
    font-size: 9px;
    font-weight: 950;
    text-transform: uppercase;
  }

  .evidence-platform img {
    display: inline-block;
    margin-right: 5px;
    vertical-align: -4px;
  }
}
