/* Graphite / white working surface, with restrained static cyan light. */
:root {
  --glow-soft: 0 8px 28px #0284c71c;
  --glow-active: 0 5px 18px #0284c726, 0 0 24px #38bdf814;
}
.workspace {
  grid-template-columns: 276px minmax(0, 1fr);
}
.sidebar {
  background: linear-gradient(165deg, #fff 0%, #f6f9fc 65%, #edf6fc 100%);
  border-right-color: #dbe6ee;
  box-shadow: 4px 0 24px #1e5b7d06;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar > * {
  flex-shrink: 0;
}
.brand {
  height: 90px;
}
.brand img {
  filter: drop-shadow(0 3px 9px #0284c71c);
}
.hero-logo {
  filter: drop-shadow(0 0 16px #38bdf82e);
}
.nav-label {
  color: #64748b;
  padding-top: 12px;
  font-size: 0.75rem;
}
.nav-item {
  gap: 11px;
  min-height: 56px;
  padding: 7px 10px;
  margin: 5px 0;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #465767;
}
.ui-icon {
  display: block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border: 1px solid #dde8f0;
  border-radius: 12px;
  color: #416178;
  background: linear-gradient(145deg, #fff, #eaf1f6);
  box-shadow: 0 2px 5px #172c3e05;
}
.nav-item svg {
  width: 26px;
  height: 26px;
}
.nav-item.active {
  background: linear-gradient(120deg, #243440, #111a22);
  box-shadow:
    var(--glow-active),
    inset 3px 0 0 #55c9ff,
    inset 0 1px 0 #ffffff12;
  color: #fff;
}
.nav-item.active .nav-icon {
  color: #a1e5ff;
  border-color: #65cfff5c;
  background: linear-gradient(140deg, #244c64, #183043);
  box-shadow:
    0 0 16px #38bdf830,
    inset 0 1px 0 #ffffff14;
}
.nav-item.active svg {
  stroke: currentColor;
}
.nav-item .count {
  opacity: 1;
  border-radius: 7px;
  padding: 3px 6px;
  font-size: 0.75rem;
}
.nav-item:hover:not(.active) {
  background: #e5f1fa;
  color: #0b567f;
}
.page-intro {
  display: flex;
  align-items: flex-start;
  gap: 17px;
  min-width: 0;
}
.page-icon,
.section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 56px;
  height: 56px;
  border: 1px solid #bee3f8;
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #e1f2fd);
  box-shadow:
    var(--glow-soft),
    inset 0 1px 0 #fff;
  color: #03699e;
}
.page-icon .ui-icon,
.section-icon .ui-icon {
  width: 30px;
  height: 30px;
}
.page-intro h1 {
  margin-top: 0;
}
.page-intro p {
  line-height: 1.6;
  color: #617180;
}
.section-title {
  gap: 16px;
}
.section-title p {
  font-size: 0.875rem;
}
.section-icon {
  font-size: 1.8rem;
}
button.primary {
  background: linear-gradient(125deg, #263947, #121a22);
  border-color: #263f50;
  box-shadow:
    0 4px 12px #101e3329,
    0 0 18px #38bdf815,
    inset 0 1px 0 #ffffff1a;
}
button.primary:hover:not(:disabled) {
  background: linear-gradient(125deg, #304f65, #182a39);
  border-color: #467791;
  box-shadow: 0 5px 20px #0284c733;
}
button.accent {
  background: linear-gradient(125deg, #03699f, #0785bf);
  border-color: #087cae;
  box-shadow:
    0 5px 17px #0284c733,
    0 0 20px #38bdf818,
    inset 0 1px 0 #ffffff2b;
}
button.accent:hover:not(:disabled) {
  background: linear-gradient(125deg, #075b89, #027bab);
  box-shadow: 0 6px 23px #0284c747;
}
button.primary,
button.accent {
  min-height: 44px;
}
button:disabled {
  box-shadow: none;
}
.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.button-icon .ui-icon {
  width: 23px;
  height: 23px;
}
.icon-button {
  min-width: 40px;
  min-height: 40px;
}
.panel,
.card,
.stat {
  box-shadow: 0 4px 20px #152b3b08;
}
.search-box {
  padding: 26px;
  border: 1px solid #b8dcef;
  background: linear-gradient(150deg, #fff 70%, #eff9ff);
  box-shadow:
    0 0 0 4px #e2f2fc70,
    0 12px 34px #0284c717;
}
.search-box:focus-within {
  border-color: #67c6f0;
  box-shadow:
    0 0 0 4px #bae6fd66,
    0 12px 34px #0284c721;
}
.search-box textarea {
  background: transparent;
  margin: 12px 0;
  padding: 8px;
  border-radius: 8px;
}
.search-box .eyebrow {
  color: #075985;
}
.bar-fill {
  box-shadow: 0 0 12px #38bdf84d;
}
.storage-capacity {
  background:
    radial-gradient(ellipse at 100% 0, #1c5875 0, transparent 62%),
    linear-gradient(130deg, #1d2b36, #101820);
  border: 1px solid #30617d;
  box-shadow: 0 8px 28px #0284c724;
}
.drop-zone .upload-glyph {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #daf1ff);
  border: 1px solid #bae0f5;
  box-shadow: var(--glow-soft);
  font-size: 2rem;
}
.drop-zone .upload-glyph .ui-icon {
  width: 32px;
  height: 32px;
}
.sidebar-bottom {
  padding-top: 16px;
}
.admin {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 36px;
  gap: 9px;
  padding: 13px 9px;
  margin: 14px 0 0;
  border: 1px solid #d2e5f2;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #edf7ff);
  box-shadow:
    var(--glow-soft),
    inset 0 1px 0 #fff;
}
.admin .avatar {
  width: 42px;
  height: 46px;
  border: 1px solid #32576d;
  border-radius: 13px;
  background: linear-gradient(145deg, #2b4151, #121d26);
  color: #b7eaff;
  box-shadow:
    0 0 15px #38bdf827,
    inset 0 1px 0 #ffffff21;
  font-size: 1.1rem;
}
.admin-details {
  min-width: 0;
}
.admin-details strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.admin .admin-details small {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #286384;
}
.admin-details small .ui-icon {
  width: 14px;
  height: 14px;
}
.admin #logout {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 7px;
  min-width: 36px;
  min-height: 40px;
  color: #446176;
  background: #ffffffb3;
  border: 1px solid #d5e5ef;
  border-radius: 10px;
}
.admin #logout .ui-icon {
  width: 21px;
  height: 21px;
}
.admin #logout:hover {
  color: #075985;
  background: #daf0fd;
  border-color: #8dcced;
}
.source-intro {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 26px;
}
.source-intro p {
  margin: 0;
  line-height: 1.6;
  color: #4c6375;
  font-size: 0.9375rem;
}
.field-help {
  margin: -3px 0 24px;
  line-height: 1.6;
  color: #566d7e;
  font-size: 0.875rem;
}
.source-mode-help {
  background: #eff8fe;
  border: 1px solid #cfe7f6;
  border-radius: 13px;
  padding: 17px 19px;
  margin: 12px 0 24px;
}
.source-mode-help strong {
  color: #075985;
}
.source-mode-help p {
  margin: 7px 0 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #486477;
}
.source-schedule {
  min-width: 0;
  padding: 18px 20px 0;
  border: 1px solid #dce7f0;
  border-radius: 14px;
  margin: 22px 0;
}
.source-schedule legend {
  font-weight: 650;
  padding: 0 8px;
}
.source-format-details {
  margin: 0 0 22px;
  border: 1px solid #dbe5ed;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.875rem;
}
.source-format-details summary {
  cursor: pointer;
  color: #075985;
  font-weight: 600;
}
.source-format-details p {
  line-height: 1.6;
}
.source-format-details pre {
  background: #f4f7fa;
  padding: 14px;
  border-radius: 8px;
  overflow: auto;
  font-size: 0.8125rem;
}
.source-schedule[hidden],
.source-format-details[hidden] {
  display: none;
}
.research-composer {
  border-radius: 22px;
}
.composer-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.composer-heading label {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: #192c3b;
}
.composer-heading p {
  margin: 5px 0 0;
  color: #60778a;
  font-size: 0.875rem;
  line-height: 1.5;
}
.composer-label {
  margin-left: auto;
  padding: 7px 12px;
  background: #e2f3ff;
  border: 1px solid #c1e6fa;
  border-radius: 9px;
  color: #07628f;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.research-composer textarea {
  padding: 20px;
  min-height: 160px;
  background: #f6fafd;
  border: 1px solid #d8e8f3;
  border-radius: 15px;
  line-height: 1.65;
  margin: 0;
}
.research-composer textarea::placeholder {
  color: #6b8190;
  opacity: 1;
}
.query-guidance {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #687d8e;
  font-size: 0.8125rem;
  margin: 10px 3px 18px;
}
.query-examples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.query-examples > span {
  color: #5b7183;
  font-size: 0.875rem;
  margin-right: 4px;
}
.query-examples button {
  font-size: 0.875rem;
  padding: 7px 12px;
  background: white;
  color: #315a74;
  border-color: #cbdfea;
  border-radius: 9px;
}
.query-examples button:hover {
  background: #e6f6ff;
  box-shadow: 0 0 15px #38bdf817;
}
.model-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.model-panel > .ui-icon {
  color: #0284c7;
  width: 28px;
  height: 28px;
}
.model-panel label {
  color: #647a8b;
  font-size: 0.8125rem;
}
.model-panel select {
  margin-top: 5px;
  font-weight: 600;
  background: white;
  min-width: 210px;
  max-width: 100%;
}
.model-panel #model-hint {
  margin: 6px 0 0;
  color: #586e80;
  font-size: 0.8125rem;
}
.research-composer .search-bottom {
  padding-top: 23px;
}
.research-composer button.accent {
  padding: 14px 21px;
  min-height: 52px;
  border-radius: 14px;
}
.company-logo {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  background: white;
  border: 1px solid #d7e7f1;
  border-radius: 19px;
  box-shadow: 0 6px 22px #0284c71a;
  overflow: hidden;
}
.company-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.company-monogram {
  color: #216387;
  background: linear-gradient(135deg, #fff, #dff2ff);
  font-weight: 750;
  font-size: 1.65rem;
  letter-spacing: -0.05em;
}
.competitor-card {
  display: flex;
  flex-direction: column;
  border-top: 3px solid #b6e5fc;
  background: linear-gradient(160deg, #f0f9ff 0, white 145px);
}
.competitor-card .card-top {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
}
.competitor-card .card-top .pill {
  white-space: normal;
  font-size: 0.75rem;
}
.competitor-card .card-footer {
  margin-top: auto;
  padding-top: 18px;
  gap: 10px;
}
.competitor-card > p:last-of-type {
  padding-bottom: 18px;
}
.analytics-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}
.analytics-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: white;
  color: #496375;
  border-radius: 13px;
}
.analytics-tab .ui-icon {
  width: 23px;
  height: 23px;
}
.analytics-tab.active {
  background: linear-gradient(125deg, #263b49, #121c25);
  color: #fff;
  border-color: #2a4c60;
  box-shadow: var(--glow-active);
}
.analytics-tab.active .ui-icon {
  color: #9addff;
}
.analytics-filter-panel {
  margin-bottom: 20px;
}
.analytics-extra-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding: 0 20px 18px;
}
.analytics-extra-filters label,
.analytics-job-filters label {
  flex: 1 1 160px;
  margin: 0;
  font-size: 0.875rem;
  color: #435e72;
}
.analytics-extra-filters select,
.analytics-job-filters select {
  margin-top: 6px;
  font-size: 0.875rem;
  background-color: #fff;
}
.analytics-extra-filters button {
  margin-bottom: 2px;
  min-height: 40px;
}
.analytics-job-filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.analytics-filter-panel[hidden],
.analytics-job-filters[hidden],
[data-research-filter][hidden] {
  display: none;
}
.analytics-scope-note {
  color: #5d7386;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 12px 0 22px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.chart-card {
  padding: 25px;
  min-width: 0;
}
.chart-heading {
  margin-bottom: 24px;
}
.chart-heading h3 {
  margin: 0 0 7px;
  font-size: 1.08rem;
}
.chart-heading p,
.chart-note {
  margin: 0;
  color: #657c8e;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.analytics-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.analytics-bar > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.875rem;
  margin-bottom: 8px;
}
.analytics-bar strong {
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.analytics-track {
  height: 12px;
  border-radius: 6px;
  background: #edf3f8;
  overflow: hidden;
}
.analytics-track span {
  display: block;
  height: 100%;
  border-radius: 6px;
  box-shadow: 0 0 12px #38bdf840;
}
.donut-layout {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}
.donut {
  width: 190px;
  max-width: 100%;
  position: relative;
  flex-shrink: 0;
}
.donut svg {
  display: block;
  width: 100%;
  filter: drop-shadow(0 3px 8px #0284c715);
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
}
.donut-center strong {
  font-size: 2rem;
  letter-spacing: -0.05em;
}
.donut-center span {
  color: #5f7789;
  font-size: 0.8125rem;
}
.chart-legend {
  flex: 1;
  min-width: 160px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.chart-legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  font-size: 0.875rem;
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.chart-legend strong {
  font-variant-numeric: tabular-nums;
}
.chart-legend small {
  color: #698092;
  font-size: 0.75rem;
  margin-left: 4px;
}
.attention-list {
  display: grid;
  gap: 10px;
  margin-bottom: 15px;
}
.attention-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 16px;
  padding: 13px 15px;
  border-color: #dae9f3;
  background: #f5faff;
  font-size: 0.875rem;
}
.attention-list strong {
  font-size: 1.2rem;
  color: #075985;
}
.timeline-chart {
  display: block;
  width: 100%;
}
.timeline-chart text {
  fill: #60798d;
  font-family: inherit;
  font-size: 14px;
}
.chart-data {
  font-size: 0.875rem;
  margin-top: 10px;
}
.chart-data summary {
  color: #075985;
  cursor: pointer;
}
.chart-data .table-wrap {
  max-height: 220px;
  overflow: auto;
  margin-top: 12px;
}
.chart-card table {
  font-size: 0.8125rem;
}
.chart-card td,
.chart-card th {
  padding: 12px 8px;
}
.chart-card table small {
  display: block;
  font-size: 0.75rem;
  margin-top: 4px;
  color: #647c8d;
}
.chart-card .empty {
  padding: 35px 12px;
}
@media (max-width: 800px) {
  .sidebar {
    width: min(276px, calc(100vw - 56px));
  }
  .page-intro {
    gap: 12px;
  }
  .page-icon {
    flex-basis: 46px;
    height: 46px;
    border-radius: 14px;
  }
  .page-icon .ui-icon {
    width: 26px;
    height: 26px;
  }
  .search-box {
    padding: 20px;
  }
  .source-intro {
    gap: 12px;
  }
  .source-intro .section-icon {
    flex-basis: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .composer-heading {
    flex-wrap: wrap;
    gap: 12px;
  }
  .composer-label {
    display: none;
  }
  .research-composer textarea {
    padding: 15px;
  }
  .research-composer .search-bottom {
    align-items: stretch;
  }
  .research-composer .search-bottom > * {
    width: 100%;
  }
  .model-panel > div {
    min-width: 0;
    flex: 1;
  }
  .model-panel select {
    min-width: 0;
    width: 100%;
  }
  .analytics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .analytics-tab {
    flex: 1 1 40%;
    justify-content: center;
  }
  .chart-card {
    padding: 20px;
  }
  .analytics-extra-filters {
    padding: 0 15px 15px;
  }
  .donut {
    width: 155px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-contrast: more) {
  .nav-icon,
  .page-icon,
  .section-icon,
  .admin,
  .panel,
  .card,
  .search-box {
    border-color: currentColor;
    box-shadow: none;
  }
}
