@font-face {
  font-family: "SpaceGrotesk";
  src: url("/assets/fonts/SpaceGrotesk-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
}
@font-face {
  font-family: "SpaceMono";
  src: url("/assets/fonts/SpaceMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
}
@font-face {
  font-family: "SpaceMono";
  src: url("/assets/fonts/SpaceMono-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
}
@font-face {
  font-family: "SpaceMono";
  src: url("/assets/fonts/SpaceMono-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
}
@font-face {
  font-family: "SpaceMono";
  src: url("/assets/fonts/SpaceMono-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
}

:root {
  --primary: #9a6a2f;
  --bg: #f8f7f3;
  --bg-soft: #efebe2;
  --text: #1f2430;
  --line: #d8d3c6;
  --sidebar-bg: #f2efe8;
  --sidebar-soft: #efebe2;
  --code-bg: #efebe2;
  --radius: 12px;
  --radius-full: 999px;
  --g-neg: #d4a89a;
  --g-mid: #efebe2;
  --g-pos: #c8ddc8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "SpaceGrotesk", "Segoe UI", sans-serif;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px 1fr;
  column-gap: 28px;
}

.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 18px 16px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 56px;
}

.sidebar-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
}

.sidebar-brand-fallback {
  display: none;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  color: var(--text);
}

.brand-kicker {
  margin: 0;
  color: #6d6a5a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand h1 {
  margin: 4px 0 10px;
  font-size: 46px;
  line-height: 1;
  font-weight: 600;
}

.brand-sub {
  margin: 0 0 16px;
  font-size: 14px;
  color: #5f5c4f;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  margin-top: 48px;
}

.sidebar-page-meta {
  margin-top: 4px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf9f4;
  font-size: 15px;
  line-height: 1.5;
  color: #595547;
  min-height: 150px;
}

.sidebar-page-meta h4 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: #3d3a2a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sidebar-page-meta p {
  margin: 0 0 8px;
}

.sidebar-page-meta p:last-child {
  margin-bottom: 0;
}

.sidebar-page-meta label {
  display: block;
  margin: 8px 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a675a;
}

.sidebar-page-meta input,
.sidebar-page-meta select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  font-family: "SpaceMono", monospace;
  font-size: 13px;
  background: #fff;
  color: var(--text);
}

.meta-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.meta-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.sidebar-footnote {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.45;
  color: #6a675a;
}

.sidebar-footnote a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tab {
  border: 0;
  background: transparent;
  color: #5a574a;
  text-decoration: none;
  text-align: left;
  padding: 2px 0;
  cursor: pointer;
  font-family: "SpaceGrotesk", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  transition: color 120ms ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tab.active {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.tab-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.tab-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

#refresh-btn {
  width: auto;
}

.content {
  padding: 24px;
  min-width: 0;
}

.top-menu {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding-top: 4px;
}

.top-menu h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
}

.top-menu-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.record-date {
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 36px;
  min-width: 160px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-family: "SpaceMono", monospace;
  font-size: 13px;
  line-height: 36px;
}

.source-filter {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 36px;
  min-width: 160px;
  padding: 0 36px 0 12px;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a675a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  color: var(--text);
  font-family: "SpaceGrotesk", sans-serif;
  font-size: 13px;
}

.refresh-top-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-full);
  height: 36px;
  min-width: 160px;
  padding: 0 12px;
  cursor: pointer;
  font-family: "SpaceGrotesk", sans-serif;
  font-size: 13px;
}

.page#page-main.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.main-top {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.86fr);
  gap: 46px;
  align-items: start;
}

.lead-column {
  display: grid;
  gap: 0;
}

.page { display: none; }
.page.active { display: block; }

.section-kicker {
  margin: 0 0 4px;
  color: #666356;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-header h2 {
  margin: 0;
  font-size: 48px;
  line-height: 1;
  font-weight: 600;
}

.section-sub {
  margin: 8px 0 18px;
  color: #666356;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpis article,
.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.topic-featured {
  padding: 6px 0 0;
  min-height: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.tracked-panel {
  min-height: 340px;
  align-self: stretch;
  padding: 6px 0 0;
  border: 0;
  background: transparent;
}

.kpis h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666356;
}

.kpis p {
  margin: 8px 0 0;
  font-size: 34px;
  font-weight: 600;
}

.carousel-wrap {
  padding: 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.carousel-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.carousel-controls {
  display: flex;
  gap: 6px;
}

.carousel-controls button {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.topics-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(205px, 1fr);
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 4px;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.topic-chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius);
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 5px;
  scroll-snap-align: start;
}

.topic-chip.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.topic-chip-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666356;
}

.topic-chip-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

.topic-chip-score {
  font-family: "SpaceMono", monospace;
  font-size: 12px;
  color: #5f5c4f;
}

.topic-featured h4 {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.05;
  font-weight: 600;
  color: var(--primary);
}

.tracked-kicker {
  margin: 0 0 10px;
}

.tracked-panel h3 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
}

.tracked-entities {
  display: grid;
  gap: 9px;
  max-height: 284px;
  overflow: auto;
  padding-right: 2px;
}

.entity-leaderboard {
  display: grid;
  gap: 8px;
  max-height: 315px;
  overflow: auto;
  padding-right: 2px;
}

.leader-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.leader-head {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
}

.leader-rank {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "SpaceMono", monospace;
  font-size: 11px;
  color: #5d5a4f;
}

.leader-name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.leader-mentions {
  font-size: 11px;
  color: #666356;
  font-family: "SpaceMono", monospace;
}

.trend-indicator {
  font-weight: 700;
}

.trend-indicator.up {
  color: #1f7a3e;
}

.trend-indicator.down {
  color: #b03a2e;
}

.trend-indicator.neutral {
  color: #6a675a;
}

.meta-sep {
  color: #8a8678;
  margin: 0 5px;
}

.entity-card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.entity-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.entity-card-head h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.entity-card-head span {
  font-size: 12px;
  color: #666356;
  font-family: "SpaceMono", monospace;
}

.entity-gauge {
  margin-top: 6px;
  height: 22px;
  border-radius: 10px;
}

.entity-marker {
  height: 24px;
}

.entity-score-pill {
  font-size: 11px;
  padding: 1px 7px;
}

.topic-type {
  margin: 0 0 3px;
  color: #666356;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topic-meta {
  margin: 6px 0 0;
  color: #666356;
  font-family: "SpaceMono", monospace;
  font-size: 13px;
}

.sent-gauge {
  position: relative;
  margin-top: 8px;
  height: 30px;
  border-radius: 12px;
  background: linear-gradient(to right, var(--g-neg) 0%, var(--g-mid) 50%, var(--g-pos) 100%);
  box-shadow: inset 0 0 0 1px #ffffff80;
}

.sent-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 36px;
  border: 2px solid #fff;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.sent-score {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  margin-top: -1px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 2px solid #fff;
  color: #fff;
  font-family: "SpaceMono", monospace;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.sent-axis {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
}

.sent-axis span {
  min-width: 64px;
  display: grid;
}

.sent-axis span strong {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sent-axis span em {
  font-family: "SpaceMono", monospace;
  font-style: normal;
  color: #666356;
}

.sent-axis span:first-child strong { color: #8a6a5a; }
.sent-axis span:nth-child(2) strong { color: #8f8b78; text-align: center; }
.sent-axis span:last-child strong { color: #5a7a5a; text-align: right; }
.sent-axis span:last-child em { text-align: right; }
.sent-axis span:nth-child(2) em { text-align: center; }

.topic-summary {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.35;
  color: #4f4b3d;
  max-width: 78ch;
}

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

.card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 500;
}

.analytics-card {
  min-width: 0;
  margin-top: 6px;
  padding-top: 10px;
  background: #ecebe3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.analytics-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
}

.analytics-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6a675a;
  padding: 6px 0 9px;
  cursor: pointer;
  font-family: "SpaceGrotesk", sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.analytics-tab:hover {
  color: var(--text);
}

.analytics-tab.active {
  background: transparent;
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.analytics-panel {
  display: none;
}

.analytics-panel.active {
  display: block;
}

.trend-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  grid-template-columns: minmax(170px, 210px) minmax(210px, 300px) auto;
  align-items: end;
}

.trend-controls label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a675a;
}

.trend-control-group {
  display: grid;
  gap: 6px;
}

#trend-agg-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 34px 8px 10px;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a675a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  color: var(--text);
  font-family: "SpaceMono", monospace;
  font-size: 12px;
}

#source-topn-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 34px 8px 10px;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a675a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  color: var(--text);
  font-family: "SpaceMono", monospace;
  font-size: 12px;
  min-width: 170px;
}

.panel-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-controls.single-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trend-actions-group {
  justify-content: end;
}

.trend-controls .trend-actions-group {
  padding-top: 0;
}

.trend-actions-group.only-action {
  grid-column: 2 / 3;
  padding-top: 0;
  justify-content: end;
  display: flex;
  align-items: end;
  gap: 8px;
}

.panel-action-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font-family: "SpaceMono", monospace;
  font-size: 12px;
  cursor: pointer;
}

.multiselect {
  position: relative;
}

.multiselect-trigger {
  width: 100%;
  text-align: left;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font-family: "SpaceMono", monospace;
  font-size: 12px;
  cursor: pointer;
}

.multiselect-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  z-index: 40;
  display: none;
}

.multiselect-options.open {
  display: block;
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "SpaceMono", monospace;
  font-size: 12px;
  color: var(--text);
  padding: 6px 4px;
  cursor: pointer;
}

.multiselect-option input {
  margin: 0;
}

.analytics-panel canvas {
  width: 100% !important;
  max-width: 100%;
  display: block;
  height: 330px !important;
}

#calibration-scatter,
#calibration-mae {
  height: 250px !important;
}

.network-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  height: 360px;
  overflow: hidden;
}

.source-heatmap td:not(:first-child),
.source-heatmap th:not(:first-child) {
  text-align: center;
  font-family: "SpaceMono", monospace;
  font-size: 12px;
}

.source-heatmap td {
  min-width: 96px;
}

.network-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.network-edge {
  stroke: #c5c0b1;
  stroke-opacity: 0.7;
}

.network-node-label {
  font-size: 11px;
  fill: #3d3a2a;
  font-family: "SpaceMono", monospace;
}

.calibration-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.cal-kpi {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.cal-kpi h4 {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a675a;
}

.cal-kpi p {
  margin: 4px 0 0;
  font-family: "SpaceMono", monospace;
  font-size: 16px;
}

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

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px;
  font-size: 14px;
}

th {
  background: #e4e4e0;
  font-weight: 500;
}

code {
  font-family: "SpaceMono", monospace;
  font-size: 0.75rem;
  background: var(--code-bg);
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
}

.prose li { margin: 6px 0; }

#page-faqs .text-doc,
#page-terms .text-doc {
  background: transparent;
  border: 0;
  padding: 0;
}

#page-faqs details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 10px 0;
}

#page-faqs summary {
  cursor: pointer;
  font-weight: 500;
}

#page-faqs details p {
  margin: 8px 0 0;
}

#page-annotate .annotate-shell {
  background: transparent;
  border: 0;
  padding: 0;
}

.annotate-sub {
  margin-top: 6px;
  color: #5d5a4f;
}

.annotate-controls {
  display: grid;
  gap: 8px;
  max-width: 520px;
  margin-top: 10px;
}

.annotate-controls label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a675a;
}

.annotate-controls input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: "SpaceMono", monospace;
  font-size: 12px;
}

.annotate-controls button {
  width: fit-content;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.annotate-status {
  margin-top: 12px;
  min-height: 20px;
  font-size: 13px;
  color: #5d5a4f;
}

.annotate-workspace {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}

.annotation-comment {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  font-size: 15px;
  line-height: 1.4;
}

.annotation-grid {
  display: grid;
  gap: 10px;
}

.annotation-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.annotation-row-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.annotation-row-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.annotation-row-head span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a675a;
}

.annotation-input {
  display: grid;
  grid-template-columns: 140px 1fr 50px;
  align-items: center;
  gap: 8px;
}

.annotation-input label {
  font-size: 13px;
  color: #5d5a4f;
}

.annotation-input input[type="range"] {
  width: 100%;
}

.annotation-input output {
  font-family: "SpaceMono", monospace;
  font-size: 12px;
  text-align: right;
}

.annotation-actions {
  display: flex;
  gap: 8px;
}

.annotation-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 7px 12px;
  cursor: pointer;
}

.llm-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9f7f2;
  padding: 10px;
  font-size: 13px;
  color: #4b473b;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; column-gap: 0; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-nav { margin-top: 16px; }
  .kpis, .grid { grid-template-columns: 1fr; }
  .main-top { grid-template-columns: 1fr; }
  .trend-controls { grid-template-columns: 1fr; }
  .panel-controls.single-row { grid-template-columns: 1fr; }
  .trend-actions-group.only-action { grid-column: auto; }
  .top-menu { align-items: flex-start; gap: 8px; }
  .top-menu-right { gap: 8px; }
  .tracked-entities { max-height: none; }
  .entity-leaderboard { max-height: none; }
  .calibration-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calibration-grid { grid-template-columns: 1fr; }
  .page-header h2 { font-size: 36px; }
}
