:root {
  color-scheme: light;
  /* ── Surface & background ───────────── */
  --bg:           #f1f5f9;
  --panel:        #ffffff;
  --panel-subtle: #f8fafc;
  /* ── Typography ─────────────────────── */
  --ink:          #0f172a;
  --muted:        #64748b;
  --muted-2:      #94a3b8;
  /* ── Borders ────────────────────────── */
  --line:         #e2e8f0;
  --line-sm:      #f1f5f9;
  /* ── Accent & semantic colours ──────── */
  --blue:         #4f46e5;   /* refined indigo */
  --blue-soft:    #eef2ff;
  --blue-mid:     #6366f1;
  --green:        #059669;
  --green-soft:   #ecfdf5;
  --red:          #dc2626;
  --red-soft:     #fef2f2;
  --amber:        #d97706;
  --amber-soft:   #fffbeb;
  --violet:       #7c3aed;
  --teal:         #0891b2;
  /* ── Elevation ──────────────────────── */
  --shadow:       0 1px 3px rgba(15,23,42,0.07), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:    0 4px 12px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
  --soft-shadow:  0 1px 2px rgba(15,23,42,0.04);
  /* ── Radius ─────────────────────────── */
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 28px;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.005em;
}

#subtitle,
.panel-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

#subtitle {
  max-width: 760px;
  line-height: 1.25;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Единая высота всех контролов в шапке */
.toolbar .secondary-button,
.toolbar .logout-form button,
.toolbar .secondary-link,
.toolbar .date-range-button,
.toolbar .freshness-indicator {
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--r-md);
  box-sizing: border-box;
}

.toolbar .freshness-indicator {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.toolbar .secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logout-form {
  display: inline-flex;
  margin: 0;
}

/* Logout button always looks secondary */
.logout-form button {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--soft-shadow);
}

.toolbar > .secondary-link,
.toolbar > .logout-form {
  margin-top: 0;
}

/* ── Topbar brand ──────────────────────────────────────────── */
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-logo {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.topbar-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.topbar-title {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

/* Prevent global svg{width:100%} from blowing up topbar icons */
.topbar svg,
.topbar-action svg,
.date-range-button svg,
.topbar-cal-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
  color: var(--muted);
}

.profile-link::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green-soft);
}

.range-picker {
  display: grid;
  gap: 2px;
  align-items: start;
  position: relative;
}

select,
input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

button {
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* Единое скругление и сброс нативного вида кнопок-контролов */
.preset,
.secondary-button,
.icon-button,
.modal-close,
.primary-button,
.admin-btn-primary,
.date-range-button,
.inv-dept-modal-tab,
.panel-ref-tab,
.inv-event-chip,
.inv-mix-seg,
.segmented-control button,
.pager button,
.action-open {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

/* Primary CTA — только явные классы */
.login-form button,
.admin-btn-primary,
.primary-button,
.calendar-actions button.primary-button {
  height: 36px;
  border: 1px solid var(--blue);
  border-radius: var(--r-md);
  padding: 0 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 550;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}

.login-form button:hover:not(:disabled),
.primary-button:hover:not(:disabled),
.calendar-actions button.primary-button:hover:not(:disabled),
.admin-section button.admin-btn-primary:hover:not(:disabled) {
  background: #4338ca;
  border-color: #4338ca;
}

.secondary-button:hover:not(:disabled) {
  background: var(--bg);
  border-color: #cbd5e1;
}

/* Toolbar chips — не календарь */
.date-range-button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.preset:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.tab:hover {
  background: transparent !important;
}

.table-link:hover,
.bar-label:hover,
.panel-ref-tab:hover,
.factor-card button:hover,
.ranking-item button:hover {
  background: transparent;
  text-decoration: underline;
}

.preset {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-weight: 620;
  box-shadow: var(--soft-shadow);
}

.preset.active {
  border: 1px solid #1764bf;
  background: #e8f1fc;
  color: #124f99;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.date-range-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 200px;
  max-width: 320px;
  height: 34px;
  min-height: 34px;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-md);
  background: var(--panel) !important;
  color: var(--ink) !important;
  text-align: center;
  font-weight: 500;
  box-shadow: var(--soft-shadow);
}


.date-range-button span {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.date-compare-label {
  display: block;
  max-width: 360px;
  margin-top: 3px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-compare-label:empty {
  display: none;
}

.calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  width: min(680px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(17, 24, 39, 0.22);
}

.calendar-popover[hidden] {
  display: none;
}

.calendar-head,
.calendar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-head strong {
  font-size: 14px;
  text-transform: capitalize;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--soft-shadow);
}

/* Квадратные кнопки-иконки: стрелки календаря, закрытие модалок */
.icon-button,
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--ink);
  font-weight: 400;
  line-height: 1;
  box-shadow: var(--soft-shadow);
  transition: border-color 0.12s, background 0.12s;
}

.icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  font-size: 22px;
}

.modal-close {
  width: 32px;
  min-width: 32px;
  height: 32px;
  font-size: 20px;
}

.modal-close:hover:not(:disabled) {
  border-color: #b7c6d8;
  background: #f8fafc;
}

.calendar-hint {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

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

.calendar-month h3 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: capitalize;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar-day,
.calendar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
}

.calendar-day {
  width: 100%;
  padding: 0;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  box-shadow: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.calendar-day:hover:not(:disabled):not(.selected) {
  border-color: #9ec4ec;
  background: #eef6ff;
}

.calendar-day:focus,
.calendar-day:focus-visible {
  outline: none;
}

.calendar-day.today:not(.selected):not(.in-range) {
  border-color: #b9d3ef;
  background: #fff;
  color: var(--ink);
}

.calendar-day.in-range:not(.selected) {
  border-color: transparent;
  background: #eaf3ff;
  color: #124f99;
}

.calendar-day.selected,
.calendar-day.selected:hover,
.calendar-day.selected:focus,
.calendar-day.selected:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}

.calendar-presets {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.calendar-presets > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.calendar-presets > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calendar-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

main {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 24px 28px 48px;
}

main.is-loading {
  opacity: 0.62;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-group-separator {
  width: 1px;
  height: 16px;
  margin: 0 8px;
  background: var(--line);
  border-radius: 0;
  align-self: center;
}

.tab {
  flex: 0 0 auto;
  position: relative;
  padding: 0 14px;
  height: 40px;
  border-color: transparent;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 0;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
  border-bottom-color: var(--muted-2);
}

.tab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.tab.active {
  color: var(--blue);
  font-weight: 600;
  border-bottom: 2px solid var(--blue);
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  border-bottom-color: var(--blue);
}

.tab-panel {
  display: none;
}

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

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

.filter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--blue-soft);
  border-radius: var(--r-md);
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
}

.filter-strip[hidden] {
  display: none;
}

.freshness-indicator-wrap {
  position: relative;
  flex: 0 0 auto;
}

.freshness-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: #b45309;
  cursor: pointer;
  box-shadow: var(--soft-shadow);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.freshness-indicator:hover {
  border-color: #f59e0b;
  background: #fffaf1;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.12);
}

.freshness-indicator:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.freshness-indicator--warming,
.freshness-indicator--maturing,
.freshness-indicator--weekly_pending,
.freshness-indicator--monthly_pending {
  color: #b45309;
  border-color: #fcd34d;
  background: #fffbeb;
}

.freshness-indicator-icon {
  display: block;
  flex: 0 0 auto;
}

.freshness-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.freshness-popover[hidden] {
  display: none;
}

.freshness-popover-inner {
  padding: 14px 16px;
  font-size: 13px;
}

.freshness-popover-title {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.freshness-popover-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.freshness-popover-meta {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.entity-profile {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.entity-profile[hidden] {
  display: none;
}

.executive {
  display: grid;
  gap: 12px;
}

.executive-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.executive-hero.growth {
  border-left-color: var(--green);
}

.executive-hero.normal {
  border-left-color: var(--blue);
}

.executive-hero.risk {
  border-left-color: var(--red);
}

.executive-hero h2 {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.18;
}

.executive-hero p {
  max-width: 980px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.executive-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
}

.executive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 12px;
}

.executive-items {
  padding: 12px 14px 14px;
  min-width: 0;
  overflow: hidden;
}

.executive-item {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 12px 14px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.executive-item.risk {
  border-left-color: var(--red);
}

.executive-item.attention {
  border-left-color: var(--amber);
}

.executive-item.growth {
  border-left-color: var(--green);
}

.executive-item.normal {
  border-left-color: var(--blue);
}

.executive-item strong,
.executive-item a {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
  white-space: normal;
}

.executive-item span {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.executive-item p {
  min-width: 0;
  max-width: 100%;
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.executive-item div {
  min-width: 0;
}

.executive-item.risk strong,
.executive-item.risk a {
  color: #c74444;
}

.executive-actions ol {
  margin: 0;
  padding: 12px 14px 14px 34px;
}

.executive-actions li {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.ai-panel {
  overflow: hidden;
}

.ai-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

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

.ai-meta span {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.ai-loading {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
}

.ai-brief {
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.ai-brief h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.2;
}

.ai-brief ul,
.ai-card ol {
  margin: 0;
  padding-left: 20px;
}

.ai-brief li,
.ai-card li {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.42;
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
}

.ai-card.risk {
  border-left-color: var(--red);
}

.ai-card.growth {
  border-left-color: var(--green);
}

.ai-card > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
}

.ai-card article {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.ai-card article:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.ai-card b {
  font-size: 13px;
  line-height: 1.25;
}

.ai-card span,
.ai-card em,
.ai-confidence {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.ai-card em {
  color: var(--ink);
}

.workspace {
  display: grid;
  gap: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 0 0 16px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: 20px;
}

.section-head h2 {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-head.compact {
  margin: 0 0 16px;
  padding: 0 0 12px;
  box-shadow: none;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
}

.metric-card {
  position: relative;
  min-height: 116px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 86px;
  height: 86px;
  border: 18px solid #e7eefb;
  border-radius: 50%;
}

.metric-card span,
.metric-card p {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  font-size: 27px;
  line-height: 1;
}

.metric-card em {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 9px;
  font-style: normal;
  font-weight: 760;
}

.rank-list,
.trend-list,
.quality-list,
.pill-list {
  padding: 12px 14px 14px;
}

.rank-row,
.trend-item,
.quality-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child,
.trend-item:last-child,
.quality-post:last-child {
  border-bottom: 0;
}

.rank-row strong,
.trend-item strong,
.quality-post strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row span,
.trend-item span,
.quality-post span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.quality-post a {
  color: var(--ink);
  text-decoration: none;
}

.quality-post a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.quality-explainer {
  overflow: hidden;
}

.quality-explainer-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 14px;
}

.quality-explainer-body span {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.quality-explainer-body strong {
  color: var(--ink);
}

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

.trend-item {
  grid-template-columns: minmax(0, 1fr) 98px auto;
}

.sparkline {
  width: 90px;
  height: 34px;
}

.trend-item .trend-item-topic {
  font-size: 14px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #f0d2d2;
  border-radius: 999px;
  background: #fff6f6;
  color: #9f2323;
  font-size: 13px;
  font-weight: 650;
}

.profile-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.eyebrow {
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-head h2 {
  margin-top: 3px;
  font-size: 22px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.profile-kpi {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  box-shadow: var(--soft-shadow);
}

.profile-kpi span,
.mini-post span,
.driver-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile-kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 14px;
}

.profile-layout h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.profile-layout ul {
  margin: 0 0 14px;
  padding-left: 18px;
}

.profile-layout li,
.profile-layout p {
  font-size: 13px;
  line-height: 1.35;
}

.driver-list {
  margin-bottom: 10px;
}

.driver-list strong {
  display: block;
  margin-bottom: 4px;
}

.mini-post {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.mini-post a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 650;
}

.kpi {
  min-height: 86px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.1;
}

.overview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 0 0 16px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  margin-bottom: 20px;
}

.overview-head h2 {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.overview-head p,
.overview-head > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.overview-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.overview-kpi {
  min-height: 0;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-left: none;
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.overview-kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  border-radius: 0 2px 2px 0;
}

.overview-kpi.growth::before { background: var(--green); }
.overview-kpi.normal::before { background: var(--blue); }
.overview-kpi.risk::before   { background: var(--red); }

.overview-kpi span,
.overview-kpi em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overview-kpi strong {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.overview-kpi em {
  margin-top: 0;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.overview-kpi.growth em { color: var(--green); }
.overview-kpi.risk em   { color: var(--red); }

.overview-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.overview-chart-panel {
  grid-column: 1 / span 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.overview-factors {
  grid-column: 3;
  min-height: 0;
}

.overview-chart-panel #overviewChart {
  display: flex;
  flex: 1;
  min-height: 0;
}

.overview-chart-panel #overviewChart > .metric-chart {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segmented-control button {
  width: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--muted);
  font-weight: 500;
}

.segmented-control button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.factor-list {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}

.factor-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: box-shadow 0.16s ease;
  position: relative;
  overflow: hidden;
}

.factor-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}

.factor-card.normal::before { background: var(--blue); }
.factor-card.growth::before { background: var(--green); }
.factor-card.risk::before   { background: var(--red); }

.factor-card span,
.factor-card p,
.ranking-item span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.factor-card strong,
.factor-card button,
.ranking-item strong,
.ranking-item button {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.factor-card button:hover,
.ranking-item button:hover {
  color: var(--blue);
}

.factor-card button:focus-visible,
.ranking-item button:focus-visible {
  outline: 2px solid #8ab6ea;
  outline-offset: 3px;
  border-radius: 4px;
}

.factor-card:hover {
  border-color: #c5d9ee;
  box-shadow: 0 8px 20px rgba(36, 107, 254, 0.08);
  transform: translateY(-1px);
}

.factor-card p {
  margin-top: 1px;
}

.overview-rankings,
.overview-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

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

.overview-ranking {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.overview-rankings > .panel,
.overview-posts > .panel {
  min-height: 0;
}

.overview-ranking .ranking-list {
  padding-right: 4px;
}

.overview-ranking .panel-head {
  align-items: flex-start;
  min-height: 0;
}

.ranking-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.ranking-footer {
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ranking-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fbfdff;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.ranking-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.ranking-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.ranking-item b {
  font-size: 12px;
  white-space: nowrap;
  color: #2a3a4d;
}

.ranking-item:hover {
  border-color: #d9e6f3;
  background: #f6faff;
}

.ranking-item.is-zero {
  border-color: #ffd8d8;
  background: #fff6f6;
}

.ranking-item.is-zero strong,
.ranking-item.is-zero button {
  color: #b42318;
}

.ranking-item.is-zero span {
  color: #c2410c;
}

.ranking-item.is-zero b {
  color: #b42318;
}

.ranking-item.is-zero .ranking-bar {
  background: #ffe0e0;
}

.ranking-item.is-zero .ranking-bar i {
  background: #ef4444;
}

.overview-mini-chart {
  padding: 10px 14px 14px;
  min-height: 250px;
}

.overview-mini-chart svg {
  width: 100%;
  height: 240px;
}

.unique-mix-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 0;
}

.content-mix-stack {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
}

.content-mix-card {
  display: flex;
  overflow: hidden;
  min-height: 300px;
}

.content-mix-card-body {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 18px 14px 20px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.unique-mix-wrap.ai .donut-value {
  stroke: var(--green);
}

.unique-mix-wrap p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.25;
  text-align: center;
}

.unique-mix-chart {
  position: relative;
  width: min(220px, 92%);
  max-width: 250px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.unique-mix-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.unique-mix-ring {
  stroke-width: 12;
}

.unique-mix-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 8px;
}

.unique-mix-center strong {
  font-size: clamp(1.55rem, 2.55vw, 2.3rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--ink);
  letter-spacing: 0;
}

.unique-mix-center span {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
  max-width: 8em;
}

@media (max-width: 960px) {
  .content-mix-card {
    min-height: 280px;
  }

  .unique-mix-chart {
    width: min(220px, 84%);
  }
}

.donut-track {
  fill: none;
  stroke: #e8edf5;
  stroke-width: 12;
}

.donut-value {
  fill: none;
  stroke: var(--blue);
  stroke-width: 12;
  stroke-linecap: round;
}

@media (min-width: 1101px) {
  .overview-chart-panel .metric-chart {
    min-height: 100%;
  }

  .overview-chart-panel .metric-chart-plot {
    height: 100%;
    min-height: clamp(440px, 34vw, 620px);
  }
}

.mini-line-grid {
  stroke: #e8edf5;
  stroke-width: 1;
}

.mini-line-label {
  fill: #748399;
  font-size: 11px;
}

.mini-line-area {
  fill: rgba(33, 111, 255, 0.14);
}

.mini-line-path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
}

.mini-line-dot {
  fill: var(--blue);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 12px;
  margin-bottom: 12px;
}

#tab-quality .layout {
  grid-template-columns: 1fr;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.empty-panel {
  padding: 18px;
}

.loading-panel {
  overflow: hidden;
}

.loading-lines {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.loading-lines i {
  display: block;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #edf2f7 10%, #f8fafc 45%, #edf2f7 80%);
  background-size: 220% 100%;
  animation: ecoShimmer 1.2s ease-in-out infinite;
}

.loading-lines i:nth-child(1) {
  width: 78%;
}

.loading-lines i:nth-child(2) {
  width: 92%;
}

.loading-lines i:nth-child(3) {
  width: 64%;
}

.skeleton-row td {
  background: #fff;
}

.skeleton-line {
  display: inline-block;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, #edf2f7 10%, #f8fafc 45%, #edf2f7 80%);
  background-size: 220% 100%;
  animation: ecoShimmer 1.2s ease-in-out infinite;
}

.skeleton-line.w-30 {
  width: 30%;
}

.skeleton-line.w-40 {
  width: 40%;
}

.skeleton-line.w-50 {
  width: 50%;
}

.skeleton-line.w-60 {
  width: 60%;
}

.skeleton-line.w-80 {
  width: 80%;
}

@keyframes ecoShimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.panel-wide {
  min-height: 330px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-sm);
}

.panel-head h2 {
  letter-spacing: -0.005em;
  color: var(--ink);
}

.panel-ref-tab {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #1d70d6);
  background: transparent;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  cursor: pointer;
}

.panel-ref-tab:hover {
  background: #f0f6fc;
}

.chart {
  padding: 10px 12px 12px;
}

.metric-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
}

.metric-chart--solo {
  grid-template-columns: minmax(0, 1fr);
}

.metric-chart-plot {
  position: relative;
  min-width: 0;
  width: 100%;
  height: clamp(340px, 32vw, 500px);
  padding: 8px;
  overflow: hidden;
  border: 1px solid #dce8f4;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(36, 107, 254, 0.045) 0 1px, transparent 1px 90px);
  box-sizing: border-box;
}

.metric-chart-plot svg {
  display: block;
  width: 100%;
  height: 100%;
}

.metric-chart-grid {
  stroke: #f1f5f9;
  stroke-width: 1;
}

.metric-chart-axis {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.metric-chart-label {
  fill: var(--muted-2);
  font-size: 11px;
  font-weight: 500;
  font-family: Inter, sans-serif;
}

.metric-chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-chart-dot {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
  cursor: pointer;
  transition: r 0.12s ease;
}

.metric-chart-dot:hover,
.metric-chart-dot.active {
  stroke-width: 2.5;
  fill: var(--blue);
}

.metric-chart-cursor {
  stroke: var(--muted-2);
  stroke-dasharray: 4 6;
  stroke-linecap: round;
  stroke-opacity: 0.5;
  stroke-width: 1;
}

.metric-chart-callout rect {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 1;
  filter: drop-shadow(0 4px 12px rgba(15,23,42,0.10));
}

.metric-chart-callout-value {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700;
  font-family: Inter, sans-serif;
}

.metric-chart-callout-meta {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 500;
  font-family: Inter, sans-serif;
}

.metric-chart-callout circle {
  fill: var(--muted-2);
}

.metric-chart-callout circle.growth {
  fill: var(--green);
}

.metric-chart-callout circle.risk {
  fill: var(--red);
}

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

.overview-chart-summary > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e2eaf3;
  border-radius: 8px;
  background: #fbfdff;
}

.overview-chart-summary span,
.overview-chart-summary small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-chart-summary strong {
  display: block;
  margin: 5px 0 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-chart-summary .growth strong {
  color: var(--green);
}

.overview-chart-summary .risk strong {
  color: var(--red);
}

.overview-chart-shell {
  height: clamp(210px, 28vw, 300px);
  padding: 4px 2px 0;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.overview-chart-grid {
  stroke: #e8eef5;
  stroke-width: 1;
}

.overview-chart-axis {
  stroke: #d9e0e7;
  stroke-width: 1;
}

.overview-chart-label {
  fill: var(--muted);
  font-size: 11px;
}

.overview-chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.overview-chart-dot {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
}

.metric-chart svg,
.overview-chart-panel svg,
.sparkline {
  width: 100%;
  height: 100%;
  display: block;
}

.bars,
.post-list,
.topic-grid,
.risk-list,
.insights {
  padding: 12px 14px 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 190px) 1fr 92px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  font-size: 13px;
}

.bar-label {
  width: 100%;
  height: auto;
  min-height: 26px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.bar-label.static {
  display: block;
  min-height: 0;
  line-height: 1.25;
}

.bar-label:hover {
  color: var(--blue);
}

.bar-track {
  height: 6px;
  overflow: hidden;
  background: var(--line);
  border-radius: 99px;
}

.bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.bar-fill.alt {
  background: var(--violet);
}

.bar-fill.status-fill {
  background: var(--teal);
}

.bar-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.post {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.post:last-child {
  border-bottom: 0;
}

.post a {
  color: var(--blue);
  font-weight: 650;
  text-decoration: none;
}

.meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.topic {
  width: 100%;
  height: auto;
  padding: 9px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
}

.topic:hover {
  border-color: #9ec4ec;
  background: #eef6ff;
}

.risk-list > .risk {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.risk-list > .risk strong {
  color: var(--red);
}

.insights {
  margin: 0;
  list-style: none;
}

.insights li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.35;
}

.table-panel {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-sm);
  text-align: left;
  vertical-align: middle;
}

tr:hover td {
  background: #f8fafc;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td:nth-child(n + 2),
th:nth-child(n + 2) {
  text-align: right;
}

td:first-child,
th:first-child {
  min-width: 260px;
  text-align: left;
}

td:last-child,
th:last-child {
  max-width: 360px;
  text-align: left;
}

.table-link {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  text-align: inherit;
  font-weight: 650;
}

.score-cell {
  cursor: help;
}

.table-link:hover,
td a:hover,
.post a:hover {
  text-decoration: underline;
}

td a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 650;
}

.post-title-link {
  max-width: 520px;
  overflow-wrap: anywhere;
  line-height: 1.25;
  text-align: left;
}

.post-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(140px, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.post-tools input,
.post-tools select {
  width: 100%;
}

.group-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.group-tools input,
.group-tools select {
  width: 100%;
}

.group-tools-count {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

.group-filter-menu {
  position: relative;
  justify-self: end;
}

.group-filter-menu summary {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #fff;
  color: #155fc7;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  list-style: none;
}

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

.group-filter-menu[open] summary {
  background: #eef5ff;
  border-color: var(--blue);
}

.group-filter-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 260px;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.group-filter-popover label {
  display: grid;
  gap: 5px;
}

.group-filter-popover label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.group-filter-popover select {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  font-size: 13px;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.pager button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--soft-shadow);
}

.pager button:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: var(--bg);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-md);
}

.modal-card-wide {
  width: min(1180px, calc(100vw - 28px));
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.modal-head h2 {
  font-size: 17px;
  line-height: 1.25;
}

#postModalBody {
  padding: 14px;
}

#sliceModalBody {
  padding: 16px 18px 18px;
}

.slice-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.slice-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(36, 107, 254, 0.1), rgba(20, 150, 111, 0.07)),
    #f8fbff;
}

.slice-hero h3 {
  margin: 4px 0 4px;
  font-size: 26px;
  line-height: 1.08;
  font-weight: 800;
}

.slice-hero p {
  color: var(--muted);
  font-size: 14px;
}

.slice-page-link {
  flex: 0 0 auto;
  box-shadow: var(--soft-shadow);
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  padding: 0 12px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s;
  box-shadow: var(--soft-shadow);
}

.secondary-link:hover {
  background: var(--bg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.12s;
}

.back-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.back-link:hover {
  color: var(--ink);
}

.topbar-back {
  flex-shrink: 0;
}

.entity-page .topbar {
  align-items: center;
}

.entity-topbar-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.entity-topbar-type {
  margin: 0;
  font-size: 11px;
}

.entity-topbar-name {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-main {
  display: grid;
  gap: 16px;
}

.entity-main.is-loading {
  opacity: 0.72;
  transition: opacity 0.16s ease;
}

.entity-main.is-loading .entity-chart-panel,
.entity-main.is-loading .entity-posts-row {
  pointer-events: none;
}

.entity-kpi-skeleton::before {
  background: #e2e8f0;
}

.entity-kpi-skeleton strong,
.entity-kpi-skeleton em,
.entity-kpi-skeleton span {
  display: block;
  min-height: 11px;
  color: transparent;
}

.entity-kpi-skeleton strong {
  min-height: 28px;
  margin: 8px 0 6px;
}

.entity-skeleton-eyebrow {
  display: inline-block;
  min-height: 11px;
}

.entity-skeleton-heading {
  margin: 8px 0 0;
}

.entity-skeleton-heading .skeleton-line {
  display: block;
  min-height: 24px;
}

.entity-skeleton-status {
  display: inline-flex;
  padding: 0;
  background: transparent;
}

.entity-skeleton-status .skeleton-line {
  min-height: 14px;
}

.entity-chart-skeleton {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.entity-loading-lines {
  padding: 10px 0;
}

.entity-profile-block {
  padding: 18px 20px;
}

.entity-profile-head {
  margin-bottom: 0;
}

.entity-scoreboard {
  margin-top: 14px;
}

.entity-brief-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 1.25fr;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.entity-brief-card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.entity-brief-list {
  margin: 0;
  padding-left: 18px;
}

.entity-brief-list li,
.entity-brief-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.entity-brief-text {
  margin: 0;
}

.entity-driver-stack {
  display: grid;
  gap: 10px;
}

.entity-driver-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.entity-driver-card h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entity-driver-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-top: 1px solid #e8eef5;
  font-size: 13px;
}

.entity-driver-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.entity-driver-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-driver-row strong {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.entity-chart-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.entity-chart-panel #entityChart {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 0 12px 16px;
}

.entity-chart-panel #entityChart > .metric-chart {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
}

.entity-chart-panel #entityChartHint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.entity-panel-empty {
  padding: 16px 20px;
  margin: 0;
}

.entity-quality-panel .panel-head {
  align-items: flex-end;
}

.entity-posts-head {
  flex-wrap: wrap;
  align-items: center;
}

.entity-top-posts-toggle {
  flex-shrink: 0;
}

.panel-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.entity-quality-list {
  padding: 0 20px 14px;
}

.entity-quality-list .quality-post {
  min-height: 0;
  padding: 13px 0;
  font-family: inherit;
  font-size: 13px;
  font-feature-settings: inherit;
  letter-spacing: inherit;
}

.entity-quality-list .quality-post strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.entity-quality-list .quality-post a {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.entity-quality-list .quality-post span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
}

.entity-quality-list .quality-post b.pos {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.slice-layout {
  margin-top: 12px;
}

.slice-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.slice-kpi {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.slice-kpi span,
.slice-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.slice-kpi strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
}

.slice-kpi.accent {
  border-color: rgba(20, 150, 111, 0.35);
  background: #f5fbf8;
}

.slice-diagnosis {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) 1.3fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.slice-diagnosis.growth {
  border-left-color: var(--green);
}

.slice-diagnosis.warning {
  border-left-color: var(--amber);
}

.slice-diagnosis.risk {
  border-left-color: var(--red);
}

.slice-diagnosis span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.slice-diagnosis h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.12;
}

.slice-diagnosis strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.slice-diagnosis p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.slice-diagnosis p + p {
  margin-top: 6px;
}

.slice-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.slice-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.slice-panel-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.slice-panel-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
}

.slice-panel-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.slice-driver-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.slice-driver-card {
  padding: 10px;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  background: #fff;
}

.slice-driver-card h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.slice-driver-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 8px 0;
  border-top: 1px solid #edf2f7;
}

.slice-driver-row:first-of-type {
  border-top: 0;
}

.slice-driver-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slice-driver-row strong {
  color: var(--ink);
  font-size: 13px;
}

.slice-driver-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.slice-post-list {
  display: flex;
  flex-direction: column;
}

.slice-post-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 14px;
  border-top: 1px solid var(--line);
}

.slice-post-row:first-child {
  border-top: 0;
}

.slice-post-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.slice-post-row a,
.slice-post-row strong {
  display: block;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.slice-post-row a:hover {
  text-decoration: underline;
}

.slice-post-row p {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.slice-post-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.modal-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.post-detail {
  display: grid;
  grid-template-columns: 160px 1fr;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-detail dt,
.post-detail dd {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.post-detail dt {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 720;
}

.post-detail dd {
  word-break: break-word;
}

.post-detail dt:nth-last-child(2),
.post-detail dd:last-child {
  border-bottom: 0;
}

.history-panel {
  overflow: hidden;
}

.history-metrics {
  padding: 12px 14px 0;
}

.history-runs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 14px;
}

.history-runs span {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.pos {
  color: var(--green);
}

.neg {
  color: var(--red);
}

.delta-na {
  color: var(--muted);
}

.panel-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel-hint-warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.empty {
  color: var(--muted);
  text-align: center !important;
}

.empty-state {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 10px 0;
}

.empty-state .meta {
  margin: 0;
  text-align: center;
}

.empty-state-action {
  width: auto;
  min-width: 180px;
  font-size: 12px;
}

.status {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status.growth {
  background: var(--green-soft);
  color: var(--green);
}

.status.normal {
  background: var(--line-sm);
  color: var(--muted);
}

.status.attention {
  background: var(--amber-soft);
  color: var(--amber);
}

.status.risk {
  background: var(--red-soft);
  color: var(--red);
}

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

.action-center-preview {
  overflow: hidden;
}

.action-center-preview-grid,
.action-center-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.action-center-board {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 12px;
}

.action-card-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.action-card-v2 {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: #fff;
}

.action-card-v2.risk {
  border-left-color: var(--red);
}

.action-card-v2.attention {
  border-left-color: var(--amber);
}

.action-card-v2.growth {
  border-left-color: var(--green);
}

.action-card-v2.normal {
  border-left-color: var(--blue);
}

.action-card-v2.priority-high {
  background: linear-gradient(90deg, #fff7f7 0%, #fff 42%);
}

.action-card-v2.priority-medium {
  background: linear-gradient(90deg, #fffaf0 0%, #fff 42%);
}

.action-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.action-card-top span,
.action-card-top em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
}

.action-card-v2 strong,
.action-card-v2 a {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.22;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.action-card-v2 p,
.action-card-v2 small {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.action-card-v2 p {
  font-size: 13px;
  font-weight: 680;
}

.action-card-v2 small {
  color: var(--ink);
  font-size: 13px;
}

.action-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--soft-shadow);
}

.action-open:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: var(--bg);
}

.table-label-stack {
  display: grid;
  gap: 4px;
  align-items: start;
}

.table-open-link {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  background: #f7fbff;
  color: #155fc7;
  font-size: 12px;
  font-weight: 720;
}

.table-profile-link {
  width: fit-content;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}

.alert-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}

.alert-strip {
  overflow: hidden;
}

.alert-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 12px;
}

.alert-hero,
.alert-coverage {
  overflow: hidden;
}

.alert-hero-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

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

.alert-kpi span,
.alert-kpi em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.alert-kpi strong {
  display: block;
  margin-top: 5px;
  font-size: 21px;
  line-height: 1.15;
}

.alert-kpi em {
  margin-top: 5px;
  font-weight: 650;
}

.alert-column-body {
  padding: 12px 14px 14px;
}

.alert-column-body .meta {
  margin: 0;
}

.alert-table-wrap {
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.alert-table {
  font-size: 12px;
}

.alert-table th,
.alert-table td {
  padding: 8px 10px;
}

.alert-table th:nth-child(n + 2),
.alert-table td:nth-child(n + 2) {
  text-align: right;
}

.alert-table th:first-child,
.alert-table td:first-child {
  min-width: 180px;
  text-align: left;
}

.alert-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #f0d2d2;
  border-radius: 999px;
  background: #fff6f6;
  color: #9f2323;
  font-size: 12px;
  font-weight: 650;
}

.action-grid h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.action-card {
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
}

.action-card.risk {
  border-left-color: var(--red);
}

.action-card.attention {
  border-left-color: var(--amber);
}

.action-card.growth {
  border-left-color: var(--green);
}

.action-card.normal {
  border-left-color: var(--blue);
}

.action-card.anomaly {
  border-left-color: var(--blue);
}

.action-card strong {
  display: block;
  margin-bottom: 3px;
}

.action-card span {
  color: var(--muted);
  font-size: 12px;
}

.action-card p {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

pre {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: #26313d;
}

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(6px);
  transition: 0.16s ease;
  pointer-events: none;
  font-size: 13px;
  font-weight: 500;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

.inv-head .panel-head {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.inv-head-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inv-snapshot-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eef2f6;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.inv-date-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.inv-date-picker select {
  height: 32px;
  padding: 0 10px;
  min-width: 140px;
}

.inv-warn { color: #b45309; font-weight: 700; }

.inv-silent {
  margin-top: 12px;
}

.inv-silent .panel-head {
  padding: 16px 16px 8px;
  flex-wrap: wrap;
  gap: 12px;
}

.inv-silent-tabs {
  display: inline-flex;
  gap: 6px;
}

.inv-silent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.inv-silent-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  border-radius: 999px;
  font-size: 12px;
}

.inv-silent-chip strong { font-weight: 650; color: #991b1b; }
.inv-silent-chip em { font-style: normal; font-weight: 700; color: #b91c1c; }
.inv-silent-chip small { color: var(--muted); }

.inv-silent-table {
  display: grid;
  gap: 6px;
  padding: 0 16px 16px;
}

.inv-silent-row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) minmax(180px, 1.5fr) minmax(100px, auto) 40px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
}

.inv-silent-row.inv-silent-head {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
}

.inv-silent-note {
  margin: 0 16px 16px;
  color: var(--muted);
  font-size: 12px;
}

.inv-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
}

.inv-ecosystem-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  align-items: start;
}

.inv-kpi {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}

.inv-kpi > span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.inv-kpi strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.inv-kpi small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.inv-kpi small .inv-pos,
.inv-kpi small .inv-neg,
.inv-kpi small .inv-neutral {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.inv-kpi small .inv-pos {
  color: var(--green, #15803d);
}

.inv-kpi small .inv-neg {
  color: var(--red, #b91c1c);
}

.inv-kpi small .inv-neutral {
  color: var(--muted-2);
}

.inv-pos { color: var(--green, #15803d); font-weight: 700; }
.inv-neg { color: var(--red, #b91c1c); font-weight: 700; }
.inv-neutral { color: var(--muted-2); font-weight: 600; }

.inv-mix {
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.inv-mix-head {
  display: grid;
  gap: 8px;
  padding: 14px 16px 12px;
}

.inv-mix-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.inv-mix-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.inv-mix-segments {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: #eef2f6;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.inv-mix-seg {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.inv-mix-seg:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.inv-mix-seg.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}

.inv-mix-body {
  padding: 2px 16px 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 18px;
}

.inv-right-column {
  display: grid;
  gap: 12px;
  align-content: start;
  position: sticky;
  top: 84px;
}

.inv-ecosystem-layout .inv-mix {
  margin-top: 0;
}

.inv-ecosystem-layout .inv-mix-body {
  grid-template-columns: 1fr;
}

.inv-bar-row { display: grid; gap: 6px; }
.inv-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.inv-bar-head strong { font-weight: 650; }
.inv-bar-head span { color: var(--muted); font-size: 12px; }

.inv-departments { margin-top: 12px; }
.inv-ecosystem-layout .inv-departments { margin-top: 0; }
.inv-map-intro {
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--line-sm);
}

.inv-map-intro h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.inv-map-intro p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.inv-dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  padding: 10px 16px 16px;
}

.inv-dept-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  box-shadow: var(--soft-shadow);
}

.inv-dept-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.inv-dept-card:focus-visible {
  outline: 2px solid #8ab6ea;
  outline-offset: 2px;
}

.inv-dept-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.inv-dept-card-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 720;
}

.inv-dept-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inv-dept-card-activity {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-sm);
}

.inv-act-meter {
  height: 4px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.inv-act-meter i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.2s ease;
}

.inv-dept-card-activity--warn .inv-act-meter i {
  background: var(--amber);
}

.inv-dept-card-activity--bad .inv-act-meter i {
  background: #cbd5e1;
}

.inv-act-summary {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.inv-act-summary strong {
  font-weight: 700;
  color: var(--ink);
}

.inv-dept-card-activity--ok .inv-act-summary strong {
  color: #047857;
}

.inv-dept-card-activity--warn .inv-act-summary {
  color: #92400e;
}

.inv-dept-card-activity--warn .inv-act-summary strong {
  color: #b45309;
}

.inv-dept-card-activity--bad .inv-act-summary {
  color: #991b1b;
}

.inv-dept-card-activity--bad .inv-act-summary strong {
  color: #b91c1c;
}

.inv-modal-body {
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 14px 16px 20px;
}

.inv-dept-card .inv-dept-platforms {
  border-top: 0;
  padding: 0;
  margin: 0;
}

.inv-modal-split {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.inv-project-nav {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
  padding: 8px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  display: grid;
  gap: 6px;
  align-self: start;
}

.inv-project-search {
  display: block;
  margin-bottom: 4px;
}

.inv-project-search input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
}

.inv-project-item {
  height: auto;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  display: grid;
  gap: 2px;
}

.inv-project-item strong {
  font-size: 13px;
  line-height: 1.25;
}

.inv-project-item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.inv-project-item.active {
  border-color: #1764bf;
  background: #eef6ff;
}

.inv-project-detail {
  min-width: 0;
}

.inv-dept {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: block;
  overflow: hidden;
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}
.inv-dept:hover { box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06); }
.inv-dept.open { box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08); border-color: #cbd5e1; }

.inv-dept-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  cursor: pointer;
  width: 100%;
  outline: none;
}
.inv-dept-head:focus-visible { box-shadow: inset 0 0 0 2px #2563eb; border-radius: 8px; }

.inv-dept-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-dept-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inv-dept-name h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  line-height: 1.25;
}

.inv-region-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inv-dept-chevron {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1;
  user-select: none;
  flex: 0 0 12px;
}

.inv-dept-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 16px 12px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: -2px;
}

.inv-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12.5px;
  color: var(--muted);
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.inv-meta-line strong {
  color: #0f172a;
  font-weight: 700;
}
.inv-meta-line-small {
  font-size: 12px;
  gap: 3px 12px;
}
.inv-meta-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11.5px;
}
.inv-meta-active strong { font-weight: 700; }
.inv-meta-active.inv-active-ok { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.inv-meta-active.inv-active-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.inv-meta-active.inv-active-bad { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.inv-dept-share {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 70px;
}
.inv-share-val {
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.bar-track.tiny {
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: #eef2f6;
  overflow: hidden;
}
.bar-track.tiny .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 2px;
}

/* Platform pills - subtle brand tints */
.inv-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid transparent;
}
.inv-pill-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.inv-pill-logo-img {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: block;
  flex: 0 0 16px;
  object-fit: contain;
  object-position: center;
}

.social-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  max-width: 100%;
}

.social-inline img {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  flex: 0 0 14px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.social-inline > span {
  line-height: 1.2;
}

.bar-label .social-inline > span,
.table-link .social-inline > span,
.ranking-item button .social-inline > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inv-pill em { font-style: normal; font-weight: 600; color: rgba(0, 0, 0, 0.45); }
.inv-pill-mini { padding: 1px 6px; font-size: 10px; }

.inv-pill-compact {
  max-width: 100%;
  min-width: 0;
}

.inv-pill-compact .inv-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.inv-pill.pill-vk      { background: #e7f0fb; color: #0a5fb8; }
.inv-pill.pill-vk em   { color: #0a5fb8aa; }
.inv-pill.pill-tg      { background: #e3f3fb; color: #0088cc; }
.inv-pill.pill-tg em   { color: #0088ccaa; }
.inv-pill.pill-yt      { background: #fde7e7; color: #c1272d; }
.inv-pill.pill-yt em   { color: #c1272daa; }
.inv-pill.pill-ig      { background: #fde7f3; color: #c13584; }
.inv-pill.pill-ig em   { color: #c13584aa; }
.inv-pill.pill-tt      { background: #1f2937; color: #f8fafc; }
.inv-pill.pill-tt em   { color: #f8fafcaa; }
.inv-pill.pill-ok      { background: #fef0e1; color: #ee8208; }
.inv-pill.pill-ok em   { color: #ee8208aa; }
.inv-pill.pill-zen     { background: #ecfaf1; color: #0f7c39; }
.inv-pill.pill-zen em  { color: #0f7c39aa; }
.inv-pill.pill-nutson  { background: #f3e8ff; color: #6d28d9; }
.inv-pill.pill-nutson em { color: #6d28d9aa; }
.inv-pill.pill-max     { background: #fff1e0; color: #c25e00; }
.inv-pill.pill-max em  { color: #c25e00aa; }
.inv-pill.pill-likee   { background: #ffe9f3; color: #d63a8c; }
.inv-pill.pill-likee em { color: #d63a8caa; }
.inv-pill.pill-rutube  { background: #f3e9fb; color: #6f1bb0; }
.inv-pill.pill-rutube em { color: #6f1bb0aa; }
.inv-pill.pill-yappy   { background: #e9f9ec; color: #1f8a3d; }
.inv-pill.pill-yappy em { color: #1f8a3daa; }
.inv-pill.pill-threads { background: #1f2937; color: #f8fafc; }
.inv-pill.pill-threads em { color: #f8fafcaa; }
.inv-pill.pill-x       { background: #1f2937; color: #f8fafc; }
.inv-pill.pill-x em    { color: #f8fafcaa; }
.inv-pill.pill-pikabu  { background: #ecfdf5; color: #047857; }
.inv-pill.pill-pikabu em { color: #047857aa; }
.inv-pill.pill-other   { background: #f1f5f9; color: #64748b; }
.inv-pill.pill-other em { color: #64748baa; }

.inv-projects {
  display: grid;
  gap: 6px;
  padding: 6px 16px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

.inv-project {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  background: #fff;
  display: block;
  overflow: hidden;
}
.inv-project.open { border-color: #cbd5e1; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04); }

.inv-project-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  width: 100%;
  outline: none;
}
.inv-project-head:focus-visible { box-shadow: inset 0 0 0 2px #2563eb; border-radius: 6px; }
.inv-project-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.inv-project-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.inv-project-name strong {
  font-size: 13.5px;
  font-weight: 680;
  color: #0f172a;
}
.inv-project-chevron {
  color: #94a3b8;
  font-size: 11px;
  flex: 0 0 12px;
}

.inv-communities {
  display: grid;
  gap: 1px;
  font-size: 12px;
  padding: 4px 12px 12px;
  background: #fff;
}
.inv-community-row {
  display: grid;
  grid-template-columns: minmax(140px, 170px) minmax(180px, 2fr) 100px 110px 40px;
  gap: 12px;
  padding: 6px 10px;
  align-items: center;
  border-radius: 6px;
}
.inv-community-row.with-activity {
  grid-template-columns: minmax(140px, 170px) minmax(180px, 2fr) 100px 110px minmax(140px, 1.2fr) 40px;
}
.inv-community-row:nth-child(even) { background: #f8fafc; }
.inv-community-row.inv-community-silent { color: #64748b; }
.inv-community-row.inv-community-silent .inv-community-name { color: #475569; }
.inv-act-silent-cell {
  color: #b91c1c;
  font-style: normal;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.inv-community-head {
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  background: transparent !important;
  padding-bottom: 4px;
}
.inv-community-row > span { min-width: 0; }
.inv-community-name {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-community-muted { color: var(--muted); }
.inv-community-num { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; }
.inv-community-row a { color: var(--blue); text-decoration: none; font-weight: 650; }
.inv-community-row a:hover { text-decoration: underline; }

.inv-changes-teaser {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  margin: 0;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  cursor: pointer;
  box-shadow: var(--soft-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.inv-changes-teaser:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.inv-changes-teaser:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.inv-changes-teaser-muted {
  cursor: default;
  background: #f8fafc;
  box-shadow: none;
}

.inv-changes-teaser-muted:hover {
  border-color: var(--line);
  box-shadow: none;
}

.inv-changes-teaser-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.inv-changes-teaser h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.inv-changes-teaser-link {
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.inv-changes-teaser-period {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.inv-changes-teaser-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-changes-stat {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f6;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

.inv-changes-stat.is-added { background: #dcfce7; color: #166534; }
.inv-changes-stat.is-removed { background: #fee2e2; color: #991b1b; }
.inv-changes-stat.is-up { background: #dbeafe; color: #1d4ed8; }
.inv-changes-stat.is-down { background: #ffedd5; color: #c2410c; }
.inv-changes-stat.is-moved { background: #fef3c7; color: #b45309; }

.inv-changes-teaser-copy,
.inv-changes-teaser-foot {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inv-changes-teaser-foot {
  color: #475569;
}

.inv-events-modal-card {
  width: min(920px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.inv-events-modal-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.inv-events-modal-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.inv-events-modal-body .inv-events-head {
  padding: 12px 16px 0;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.inv-events-modal-body .inv-events-list {
  overflow: auto;
  max-height: none;
}

.inv-events-modal-body .empty-state {
  padding: 24px 16px 32px;
}

.inv-events-head { padding: 12px 16px 0; }
.inv-events-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.inv-event-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  color: #1f2937;
}
.inv-event-chip em { font-style: normal; color: var(--muted); margin-left: 6px; }
.inv-event-chip.active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}
.inv-event-chip.active em { color: rgba(255,255,255,0.7); }

.inv-events-list {
  display: grid;
  gap: 8px;
  padding: 12px 16px 18px;
}

.inv-event {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.inv-event.added { border-left: 4px solid #16a34a; }
.inv-event.removed { border-left: 4px solid #b91c1c; }
.inv-event.growth { border-left: 4px solid #2563eb; }
.inv-event.risk { border-left: 4px solid #ea580c; }
.inv-event.attention { border-left: 4px solid #d97706; }

.inv-event-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f6;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  width: fit-content;
}

.inv-event-body { display: grid; gap: 2px; }
.inv-event-body strong { font-size: 14px; }
.inv-event-body span { color: var(--muted); font-size: 12px; }
.inv-event-body small { color: #0f172a; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.inv-event a { color: var(--blue); font-weight: 650; }

@media (max-width: 1100px) {
  .kpi-grid,
  .executive-metrics,
  .comparison-grid,
  .overview-scoreboard {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .layout,
  .executive-grid,
  .trend-grid,
  .ai-grid,
  .alert-dashboard,
  .quality-explainer-body,
  .overview-layout,
  .overview-rankings,
  .overview-posts,
  .action-center-board {
    grid-template-columns: 1fr;
  }

  .overview-chart-panel,
  .overview-factors {
    grid-column: auto;
  }

  .inv-ecosystem-layout {
    grid-template-columns: 1fr;
  }

  .inv-ecosystem-layout .inv-right-column,
  .inv-ecosystem-layout .inv-mix {
    position: static;
  }
}

@media (max-width: 720px) {
  /* ── Topbar ──────────────────────────────────── */
  .topbar {
    position: sticky;
    height: auto;
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 10px 16px;
  }

  .topbar-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-title {
    display: none;
  }

  .topbar-divider {
    display: none;
  }

  .toolbar {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }

  .range-picker {
    flex: 1 1 100%;
    width: 100%;
  }

  .date-range-button {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  #saveSnapshotBtn,
  #forceRefreshBtn {
    flex: 1;
  }

  .logout-form {
    flex: 0 0 auto;
  }

  .logout-form button {
    background: var(--panel);
    color: var(--ink);
    border-color: var(--line);
  }

  .calendar-presets > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  /* ── Tabs: keep horizontal scroll, never wrap to grid ─── */
  .tab-group-separator {
    display: none;
  }

  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0;
    margin-bottom: 16px;
    padding: 0;
    border-bottom: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 0;
  }

  .calendar-popover {
    left: 0;
    right: auto;
    width: min(100%, calc(100vw - 28px));
  }

  .calendar-months {
    grid-template-columns: 1fr;
  }

  main {
    padding: 14px 16px 40px;
  }

  /* ── KPI grids: 2 columns on mobile, not 1 ──── */
  .overview-scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid,
  .executive-metrics,
  .comparison-grid,
  .topic-grid,
  .action-center-preview-grid,
  .action-center-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* ── Main padding ───────────────────────────── */

  .overview-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
    margin-bottom: 16px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .panel-ref-tab {
    width: 100%;
    justify-content: center;
  }

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

  .metric-chart {
    grid-template-columns: 1fr;
  }

  .metric-chart-plot {
    height: 250px;
    padding: 4px;
  }

  .ranking-item {
    grid-template-columns: 1fr;
  }

  .executive-hero {
    flex-direction: column;
  }

  .executive-hero h2 {
    font-size: 20px;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  /* ── Layout grid: stack columns vertically ───── */
  .layout,
  .overview-layout,
  .action-center-board,
  .workspace {
    grid-template-columns: 1fr !important;
  }

  .factor-list {
    padding: 10px 12px;
  }

  .factor-card {
    padding: 12px 14px;
  }

  .rank-row,
  .trend-item,
  .quality-post {
    grid-template-columns: 1fr;
  }

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

  .profile-grid,
  .profile-layout,
  .entity-brief-grid {
    grid-template-columns: 1fr;
  }

  .slice-kpi-grid,
  .slice-diagnosis,
  .slice-grid,
  .group-tools,
  .post-tools,
  .modal-kpis,
  .post-detail {
    grid-template-columns: 1fr;
  }

  .slice-hero {
    flex-direction: column;
  }

  .slice-page-link {
    width: 100%;
    justify-content: center;
  }

  .group-tools-count {
    justify-self: start;
  }

  .group-filter-menu,
  .group-filter-menu summary {
    width: 100%;
  }

  .group-filter-menu summary {
    justify-content: center;
  }

  .group-filter-popover {
    position: static;
    width: auto;
    margin-top: 8px;
  }

  .table-panel--group .table-wrap {
    overflow-x: visible;
  }

  .table-panel--group table {
    border-collapse: separate;
    border-spacing: 0 10px;
    margin: -10px 0 0;
  }

  .table-panel--group thead {
    position: static;
    display: none;
  }

  .table-panel--group tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    margin-bottom: 2px;
    overflow: hidden;
  }

  .table-panel--group tbody tr td {
    display: grid;
    grid-template-columns: minmax(96px, 40%) 1fr;
    gap: 8px 12px;
    align-items: start;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .table-panel--group tbody tr td:last-child {
    border-bottom: 0;
  }

  .table-panel--group tbody tr td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: left;
    line-height: 1.3;
    padding-top: 2px;
  }

  .table-panel--group tbody tr td:first-child {
    grid-template-columns: 1fr;
    text-align: left;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }

  .table-panel--group tbody tr td:first-child::before {
    content: none;
  }

  .table-panel--group tbody tr td:first-child .table-link,
  .table-panel--group tbody tr td:first-child a {
    text-align: left;
    justify-self: start;
  }

  .table-panel--group tbody tr td[colspan] {
    display: block;
    text-align: center;
    grid-template-columns: 1fr;
  }

  .table-panel--group tbody tr td[colspan]::before {
    content: none;
  }

  .pager {
    justify-content: stretch;
  }

  .pager button {
    width: 100%;
  }

  .inv-ecosystem-layout {
    grid-template-columns: 1fr;
  }

  .inv-dept-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .inv-dept-share {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }
  .bar-track.tiny { width: 100%; }
  .inv-project-head {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .inv-project-chevron { display: none; }
  .inv-community-row,
  .inv-community-row.with-activity {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    row-gap: 4px;
  }
  .inv-community-head { display: none; }
  .inv-event {
    grid-template-columns: 1fr;
  }

  .inv-head-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .inv-snapshot-pill {
    justify-content: center;
  }
  .inv-date-picker {
    width: 100%;
    justify-content: space-between;
  }
  .inv-date-picker select {
    flex: 1;
    min-width: 0;
  }
  .inv-mix-body {
    grid-template-columns: 1fr;
  }
  .inv-silent-row {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    row-gap: 4px;
  }
  .inv-silent-tabs {
    width: 100%;
    flex-wrap: wrap;
  }
  .inv-meta-line {
    gap: 2px 12px;
    font-size: 12px;
  }

  .inv-modal-split {
    grid-template-columns: 1fr;
  }

  .inv-project-nav {
    max-height: 220px;
  }
}

/* ════════════════════════════════════════════════════════════
   Inventory department modal — tabs + overview tab
   ════════════════════════════════════════════════════════════ */

/* Modal card: taller to fit overview content */
.inv-dept-modal-card {
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}

/* Header: title + tabs + close button in one row */
.inv-dept-modal-head {
  flex-shrink: 0;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.inv-dept-modal-title {
  flex: 1 1 auto;
  min-width: 0;
}

.inv-dept-modal-title h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-dept-modal-title span {
  color: var(--muted);
  font-size: 12px;
}

/* Tab nav inside the modal header */
.inv-dept-modal-tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 3px;
}

.inv-dept-modal-tab {
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.inv-dept-modal-tab:hover {
  background: var(--panel);
  color: var(--ink);
}

.inv-dept-modal-tab.active {
  background: var(--panel);
  color: var(--blue);
  font-weight: 600;
  box-shadow: var(--soft-shadow);
}

/* ── Overview tab layout ─────────────────────────────────── */
.inv-ov-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* KPI strip */
.inv-ov-kpi-strip {
  display: grid;
  grid-template-columns: repeat(var(--inv-kpi-count, 7), minmax(0, 1fr));
  gap: 10px;
}

.inv-ov-kpi {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 84px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.inv-ov-kpi span {
  display: flex;
  align-items: flex-end;
  flex: 1 1 auto;
  min-height: 2.5em;
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.25;
  color: var(--muted);
}

.inv-ov-kpi strong {
  flex: 0 0 auto;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

/* Split: platforms left, projects right */
.inv-ov-split {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.inv-ov-platforms,
.inv-ov-projects {
  min-width: 0;
}

.inv-ov-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.inv-ov-section-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}

.inv-ov-section-head span {
  font-size: 12px;
  color: var(--muted);
}

/* Platform bars */
.inv-ov-platform-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-ov-platform-row {
  display: grid;
  grid-template-columns: minmax(0, 118px) minmax(0, 1fr) 76px;
  gap: 10px 12px;
  align-items: center;
}

.inv-ov-platform-name {
  min-width: 0;
}

.inv-ov-platform-name .inv-pill {
  max-width: 100%;
}

.inv-ov-platform-chart {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.inv-ov-bar-track {
  height: 8px;
  min-width: 0;
}

.inv-ov-platform-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}

.inv-ov-platform-val {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Projects summary table */
.inv-ov-proj-table {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
}

.inv-ov-proj-head,
.inv-ov-proj-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px minmax(100px, 116px) minmax(120px, 0.9fr);
  gap: 10px 16px;
  padding: 10px 14px;
  align-items: center;
}

.inv-ov-proj-head {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.inv-ov-proj-head > span:nth-child(2),
.inv-ov-proj-head > span:nth-child(3) {
  text-align: right;
}

.inv-ov-proj-body .inv-ov-proj-row + .inv-ov-proj-row {
  border-top: 1px solid var(--line);
}

.inv-ov-proj-row {
  cursor: pointer;
  transition: background 0.1s;
}

.inv-ov-proj-row:hover {
  background: #f8fafc;
}

.inv-ov-proj-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.inv-ov-proj-num {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 600;
  min-width: 0;
}

.inv-ov-proj-num--plain {
  text-align: right;
}

.inv-ov-proj-num--subs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.2;
}

.inv-ov-proj-subs-main {
  font-weight: 650;
}

.inv-ov-proj-delta {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.inv-ov-proj-act {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.inv-ov-proj-act-col {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  min-width: 0;
}

/* Inv active tone colours (reuse existing classes) */
.inv-ov-proj-act.inv-active-ok { color: var(--green); }
.inv-ov-proj-act.inv-active-warn { color: var(--amber); }
.inv-ov-proj-act.inv-active-bad { color: var(--red); }

/* Projects tab: body should scroll too */
.inv-modal-body {
  flex: 1 1 auto;
  overflow: hidden;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .inv-ov-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .inv-ov-split {
    grid-template-columns: 1fr;
  }

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

  .inv-ov-proj-table {
    overflow-x: auto;
  }

  .inv-ov-proj-head,
  .inv-ov-proj-row {
    grid-template-columns: minmax(160px, 1fr) 48px minmax(92px, 108px);
    min-width: 420px;
  }

  .inv-ov-proj-act-col,
  .inv-ov-proj-head > span:last-child {
    display: none;
  }
}

@media (max-width: 640px) {
  .inv-dept-modal-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .inv-dept-modal-title { flex: 1 1 100%; }
  .inv-dept-modal-tabs { flex: 1; justify-content: center; }
  .inv-ov-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inv-ov-proj-head { display: none; }
  .inv-ov-proj-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .inv-ov-proj-act-col,
  .inv-ov-proj-head > span:last-child { display: none; }
}

/* ════════════════════════════════════════════════════════════
   Login page
   ════════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  background: var(--bg);
}

.login-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  background: #0f172a;
  color: rgba(255,255,255,.9);
}

.login-brand-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-brand-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.login-brand-tagline {
  color: rgba(255,255,255,.45);
  font-size: 13px;
  margin-top: 2px;
}

.login-brand-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-brand-body h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.25;
}

.login-brand-body p {
  color: rgba(255,255,255,.55);
  font-size: 15px;
  line-height: 1.6;
  max-width: 360px;
}

.login-brand-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.login-brand-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.login-brand-stat span {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  font-weight: 500;
}

.login-brand-footer {
  color: rgba(255,255,255,.28);
  font-size: 12px;
}

.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  background: var(--panel);
}

.login-card {
  width: min(400px, 100%);
}

.login-card h1 {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.login-form input {
  height: 44px;
  font-size: 14px;
  border-color: var(--line);
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 0 14px;
}

.login-form input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
  background: #fff;
}

.login-form button {
  height: 44px;
  margin-top: 4px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.login-alert,
.login-error {
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid #fecaca;
  border-radius: var(--r-md);
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-brand {
    display: none;
  }
  .login-form-side {
    padding: 32px 24px;
  }
}

.login-error {
  margin: 0;
}

.admin-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.admin-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid transparent;
}

.swatch-final {
  background: #dcfce7;
  border-color: #86efac;
}

.swatch-pending {
  background: #fef3c7;
  border-color: #fcd34d;
}

.swatch-empty {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.admin-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

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

.admin-calendar-month h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.admin-calendar-weekdays,
.admin-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.admin-calendar-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.admin-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 650;
}

.admin-day-final {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.admin-day-pending {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.admin-day-no_data {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.admin-day-empty {
  background: transparent;
}

.snapshot-main {
  display: grid;
  gap: 16px;
}

.snapshot-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 24px;
}

.snapshot-hero h2 {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.snapshot-hero p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.snapshot-actions {
  align-items: start;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.snapshot-table td:nth-child(n + 2),
.snapshot-table th:nth-child(n + 2) {
  text-align: right;
}

.snapshot-page .topbar h1 {
  max-width: 920px;
}

@media (max-width: 1100px) {
  .snapshot-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-hero {
    flex-direction: column;
  }
}
