:root {
  color-scheme: light;
  --portal-ink: #102b3d;
  --portal-ink-strong: #0b1f2d;
  --portal-ink-soft: #1b465b;
  --portal-muted: #637580;
  --portal-paper: #f4f8f7;
  --portal-white: #ffffff;
  --portal-line: #d7e2e3;
  --portal-line-dark: rgba(255, 255, 255, .14);
  --portal-soft: #e9f2f0;
  --portal-soft-blue: #edf4f8;
  --portal-coral: #ec714d;
  --portal-coral-dark: #c95739;
  --portal-mint: #cfe9e2;
  --portal-teal: #4e9f97;
  --portal-green: #258163;
  --portal-gold: #d59b3d;
  --portal-max: 1320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--portal-ink);
  background: var(--portal-paper);
  font-size: 15px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(236, 113, 77, .42);
  outline-offset: 3px;
}

.is-hidden { display: none !important; }
.portal-shell { min-height: 100vh; }

.portal-sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 258px;
  padding: 28px 18px 20px;
  flex-direction: column;
  color: #e8f0f0;
  background: var(--portal-ink);
}

.sidebar-top { padding: 0 10px; }

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  letter-spacing: -.035em;
}

.portal-brand strong { font-weight: 850; }

.brand-mark {
  display: inline-flex;
  width: 25px;
  height: 25px;
  padding: 4px;
  align-items: flex-end;
  gap: 3px;
  background: var(--portal-coral);
  border-radius: 4px;
}

.brand-mark span {
  display: block;
  width: 4px;
  background: #fff;
  border-radius: 3px 3px 1px 1px;
}

.brand-mark span:nth-child(1) { height: 7px; }
.brand-mark span:nth-child(2) { height: 12px; }
.brand-mark span:nth-child(3) { height: 17px; }

.portal-label {
  display: block;
  margin-top: 12px;
  color: #8ea5ad;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portal-nav {
  display: grid;
  gap: 5px;
  margin-top: 50px;
}

.portal-nav-item {
  display: flex;
  width: 100%;
  min-height: 47px;
  padding: 10px 12px;
  align-items: center;
  gap: 12px;
  color: #a9bcc2;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 720;
  text-align: left;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.portal-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.portal-nav-item.is-active {
  color: #fff;
  background: var(--portal-ink-soft);
  border-color: rgba(143, 198, 188, .22);
}

.nav-icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: #90c8bf;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.portal-nav-item.is-active .nav-icon { color: #fff; }

.sidebar-bottom {
  display: grid;
  gap: 15px;
  margin-top: auto;
  padding: 17px 10px 0;
  border-top: 1px solid var(--portal-line-dark);
}

.source-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #dce9e8;
  font-size: 12px;
}

.source-status strong,
.source-status small { display: block; }

.source-status small {
  margin-top: 2px;
  color: #8ea5ad;
  font-size: 11px;
  line-height: 1.35;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  flex: 0 0 auto;
  background: #79c69b;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(121, 198, 155, .12);
}

.sidebar-link {
  display: flex;
  width: 100%;
  padding: 0;
  justify-content: space-between;
  color: #9fb3ba;
  background: transparent;
  border: 0;
  font-size: 13px;
  text-align: left;
}

.sidebar-link:hover { color: #fff; }
.sidebar-signout { color: #d9a899; }

.portal-main {
  min-width: 0;
  min-height: 100vh;
  margin-left: 258px;
}

.portal-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  padding: 0 42px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(244, 248, 247, .94);
  border-bottom: 1px solid var(--portal-line);
  backdrop-filter: blur(14px);
  transition: min-height .2s ease, padding .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.portal-topbar.is-compact {
  min-height: 58px;
  padding-right: 28px;
  padding-left: 28px;
  background: rgba(244, 248, 247, .98);
  border-color: rgba(129, 151, 158, .58);
  box-shadow: 0 10px 26px rgba(16, 43, 61, .12);
}

.topbar-left, .topbar-actions, .breadcrumb, .user-chip {
  display: flex;
  align-items: center;
}

.breadcrumb {
  gap: 10px;
  color: #8999a0;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
}

.breadcrumb i {
  color: #b2bec2;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
}

.breadcrumb strong {
  color: var(--portal-ink);
  font-size: 11px;
}

.topbar-actions { gap: 20px; }

.topbar-export,
.topbar-public-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--portal-muted);
  font-size: 13px;
  font-weight: 750;
}

.topbar-export {
  padding: 0;
  background: transparent;
  border: 0;
}

.topbar-export:hover,
.topbar-public-link:hover { color: var(--portal-coral-dark); }

.topbar-action-icon {
  display: inline-block;
  color: var(--portal-coral);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.topbar-public-link .topbar-action-icon {
  color: var(--portal-muted);
  font-size: 15px;
}

.portal-topbar.is-compact .breadcrumb > span,
.portal-topbar.is-compact .topbar-action-label,
.portal-topbar.is-compact .user-chip-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.portal-topbar.is-compact .topbar-export,
.portal-topbar.is-compact .topbar-public-link {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  gap: 0;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
}

.portal-topbar.is-compact .topbar-action-icon {
  margin: 0;
  font-size: 19px;
}

.portal-topbar.is-compact .user-chip {
  gap: 0;
  padding-left: 0;
  border-left: 0;
}

.portal-topbar.is-compact .user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.user-chip {
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--portal-line);
}

.user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--portal-ink);
  background: var(--portal-mint);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.user-chip-copy strong,
.user-chip-copy small { display: block; }

.user-chip-copy strong {
  max-width: 170px;
  overflow: hidden;
  color: var(--portal-ink);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-copy small {
  max-width: 170px;
  overflow: hidden;
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-button {
  display: none;
  width: 37px;
  height: 37px;
  margin-right: 12px;
  color: var(--portal-ink);
  background: var(--portal-white);
  border: 1px solid var(--portal-line);
  border-radius: 5px;
  font-size: 18px;
}

.portal-scrim { display: none; }

.portal-content {
  width: min(var(--portal-max), calc(100% - 76px));
  margin: 0 auto;
  padding: 42px 0 78px;
}

.portal-loading {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--portal-muted);
}

.portal-loading strong {
  color: var(--portal-ink);
  font-size: 17px;
}

.portal-loading > span:last-child { font-size: 14px; }

.loading-orbit {
  display: block;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border: 3px solid var(--portal-mint);
  border-top-color: var(--portal-coral);
  border-radius: 50%;
  animation: portal-spin 850ms linear infinite;
}

@keyframes portal-spin { to { transform: rotate(360deg); } }

.portal-state {
  max-width: 560px;
  margin: 80px auto;
  padding: 35px;
  text-align: center;
  background: var(--portal-white);
  border: 1px solid var(--portal-line);
}

.state-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  place-items: center;
  color: #fff;
  background: var(--portal-coral);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
}

.portal-state h1 {
  margin: 0 0 8px;
  color: var(--portal-ink-strong);
  font-size: 27px;
  letter-spacing: -.04em;
}

.portal-state p {
  margin: 0;
  color: var(--portal-muted);
}

.state-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 23px;
}

.portal-views { min-width: 0; }
.portal-view { display: none; }
.portal-view.is-active { display: block; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 29px;
}

.portal-eyebrow,
.panel-kicker {
  margin: 0;
  color: var(--portal-coral-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.portal-eyebrow .live-dot { margin-right: 8px; }

.page-head h1 {
  max-width: 830px;
  margin: 12px 0 8px;
  color: var(--portal-ink-strong);
  font-size: clamp(35px, 4.1vw, 54px);
  font-weight: 820;
  letter-spacing: -.06em;
  line-height: 1;
}

.page-head p:last-child {
  margin: 0;
  color: var(--portal-muted);
  font-size: 17px;
}

.page-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.button {
  display: inline-flex;
  min-height: 43px;
  padding: 10px 15px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--portal-ink);
  background: transparent;
  border: 1px solid var(--portal-ink);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.2;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.button:hover { transform: translateY(-1px); }

.button-coral {
  color: #fff;
  background: var(--portal-coral);
  border-color: var(--portal-coral);
}

.button-coral:hover {
  background: var(--portal-coral-dark);
  border-color: var(--portal-coral-dark);
}

.button-dark {
  color: #fff;
  background: var(--portal-ink);
  border-color: var(--portal-ink);
}

.button-dark:hover {
  background: var(--portal-ink-strong);
  border-color: var(--portal-ink-strong);
}

.button-quiet {
  color: var(--portal-muted);
  background: var(--portal-white);
  border-color: var(--portal-line);
}

.button-quiet:hover {
  color: var(--portal-ink);
  border-color: #afc3c6;
}

.button-outline {
  color: var(--portal-ink);
  background: transparent;
  border-color: var(--portal-ink);
}

.status-banner {
  display: flex;
  min-height: 66px;
  padding: 14px 19px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  color: #dbeae9;
  background: var(--portal-ink);
  border-left: 4px solid var(--portal-coral);
}

.status-banner > div { min-width: 0; }
.status-banner strong,
.status-banner span { display: block; }

.status-banner strong {
  color: #fff;
  font-size: 14px;
}

.status-banner span {
  margin-top: 2px;
  color: #9fb2b8;
  font-size: 12px;
}

.status-banner .status-action {
  display: inline-flex;
  width: auto;
  min-height: 35px;
  margin-left: auto;
  padding: 7px 12px;
  color: #fff;
  background: var(--portal-coral);
  border: 1px solid var(--portal-coral);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-banner .status-action:hover { background: var(--portal-coral-dark); }
.status-banner.is-pending { border-left-color: var(--portal-gold); }

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

.metric-card {
  min-height: 124px;
  padding: 18px 18px 16px;
  background: var(--portal-white);
  border: 1px solid var(--portal-line);
}

.metric-card > span,
.metric-card > strong,
.metric-card > small { display: block; }

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

.metric-card > strong {
  margin-top: 15px;
  color: var(--portal-ink-strong);
  font-size: 30px;
  font-weight: 820;
  letter-spacing: -.065em;
  line-height: 1;
}

.metric-card > small {
  margin-top: 7px;
  color: var(--portal-muted);
  font-size: 11px;
}

.metric-card-accent { border-top: 3px solid var(--portal-coral); }
.metric-card-mint { border-top: 3px solid var(--portal-teal); }
.metric-card-gold { border-top: 3px solid var(--portal-gold); }
.metric-card-dark { border-top: 3px solid var(--portal-ink); }

.portal-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.portal-grid-main { grid-template-columns: minmax(0, 1.48fr) minmax(310px, .92fr); }
.portal-grid-secondary { grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); }

.portal-panel {
  min-width: 0;
  padding: 23px;
  background: var(--portal-white);
  border: 1px solid var(--portal-line);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 21px;
}

.panel-heading h2 {
  margin: 6px 0 0;
  color: var(--portal-ink-strong);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
}

.panel-period,
.panel-count {
  color: var(--portal-muted);
  font-size: 12px;
  white-space: nowrap;
}

.panel-count {
  padding: 5px 8px;
  color: var(--portal-ink);
  background: var(--portal-soft);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
}

.activity-chart {
  display: grid;
  height: 208px;
  padding: 0 3px;
  align-items: end;
  grid-template-columns: repeat(14, minmax(12px, 1fr));
  gap: 9px;
  border-bottom: 1px solid var(--portal-line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 51px, rgba(215, 226, 227, .6) 52px);
}

.activity-day {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: end;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.activity-bar {
  width: 100%;
  min-height: 4px;
  background: var(--portal-teal);
  border-radius: 3px 3px 0 0;
  transition: height .35s ease, background-color .16s ease;
}

.activity-day:last-child .activity-bar,
.activity-bar.is-latest { background: var(--portal-coral); }

.activity-day-label {
  overflow: hidden;
  width: 100%;
  padding-top: 8px;
  color: var(--portal-muted);
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-footer {
  display: flex;
  padding-top: 17px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--portal-muted);
  font-size: 12px;
}

.chart-footer strong {
  color: var(--portal-ink);
  font-size: 12px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  background: var(--portal-teal);
  border-radius: 50%;
}

.coverage-panel { background: #f9fbfa; }

.coverage-block + .coverage-block {
  margin-top: 24px;
  padding-top: 21px;
  border-top: 1px solid var(--portal-line);
}

.coverage-heading {
  display: flex;
  margin-bottom: 13px;
  align-items: center;
  justify-content: space-between;
  color: var(--portal-muted);
  font-size: 12px;
}

.coverage-heading strong {
  color: var(--portal-ink-strong);
  font-size: 20px;
  letter-spacing: -.05em;
}

.distribution-list { display: grid; gap: 11px; }
.distribution-row { display: grid; gap: 6px; }

.distribution-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--portal-ink);
  font-size: 12px;
}

.distribution-label span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-label strong { font-size: 12px; }

.distribution-track {
  height: 6px;
  overflow: hidden;
  background: #dbe9e7;
  border-radius: 99px;
}

.distribution-fill {
  height: 100%;
  min-width: 4px;
  background: var(--portal-teal);
  border-radius: 99px;
}

.distribution-row:nth-child(2) .distribution-fill { background: #7ab8ae; }
.distribution-row:nth-child(3) .distribution-fill { background: #a4cdc5; }
.distribution-row:nth-child(4) .distribution-fill { background: #b9dcd5; }

.suggestions-list { display: grid; gap: 10px; }

.suggestion-row {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 0;
  align-items: start;
  border-bottom: 1px solid var(--portal-line);
}

.suggestion-row:last-child { border-bottom: 0; }

.suggestion-number {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--portal-ink);
  background: var(--portal-mint);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
}

.suggestion-row h3 {
  overflow: hidden;
  margin: 0 0 3px;
  color: var(--portal-ink-strong);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-row p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.4;
}

.suggestion-score {
  color: var(--portal-coral-dark);
  font-size: 17px;
  font-weight: 850;
  white-space: nowrap;
}

.text-link {
  padding: 0;
  color: var(--portal-coral-dark);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

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

.brief-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.brief-item {
  min-height: 72px;
  padding: 13px;
  background: var(--portal-soft);
}

.brief-item span,
.brief-item strong { display: block; }

.brief-item span {
  color: var(--portal-muted);
  font-size: 11px;
}

.brief-item strong {
  margin-top: 7px;
  color: var(--portal-ink);
  font-size: 13px;
  line-height: 1.25;
}

.brief-note {
  margin: 15px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.45;
}

.latest-panel { margin-bottom: 0; }

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

.mini-signal {
  display: flex;
  min-height: 142px;
  padding: 15px;
  flex-direction: column;
  border: 1px solid var(--portal-line);
  border-top: 3px solid var(--portal-teal);
}

.mini-signal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mini-signal-top span {
  color: var(--portal-muted);
  font-size: 11px;
}

.mini-signal-score {
  color: var(--portal-coral-dark);
  font-size: 19px;
  font-weight: 850;
}

.mini-signal h3 {
  overflow: hidden;
  margin: 15px 0 5px;
  color: var(--portal-ink-strong);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-signal p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mini-signal button {
  margin-top: auto;
  padding: 0;
  align-self: flex-start;
  color: var(--portal-coral-dark);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 800;
}

.mini-signal button:hover { color: var(--portal-ink); }

.empty-block {
  padding: 26px;
  color: var(--portal-muted);
  background: var(--portal-soft-blue);
  border: 1px dashed #bdced7;
}

.empty-block h3 {
  margin: 0 0 6px;
  color: var(--portal-ink-strong);
  font-size: 16px;
}

.empty-block p { margin: 0; font-size: 13px; }

.filter-bar {
  display: flex;
  padding: 12px;
  align-items: end;
  gap: 9px;
  background: var(--portal-white);
  border: 1px solid var(--portal-line);
}

.search-field {
  display: flex;
  min-width: 220px;
  flex: 1;
  min-height: 42px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  color: var(--portal-muted);
  border: 1px solid var(--portal-line);
  border-radius: 3px;
}

.search-field span { font-size: 20px; }

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--portal-ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.filter-select {
  display: grid;
  min-width: 140px;
  gap: 4px;
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-select select {
  min-height: 42px;
  padding: 0 28px 0 10px;
  color: var(--portal-ink);
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
}

.filter-clear {
  min-height: 42px;
  padding: 0 8px;
  color: var(--portal-coral-dark);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.feed-toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--portal-muted);
  font-size: 12px;
}

.feed-source-label { color: var(--portal-green); }
.feed-source-label .live-dot { margin-right: 5px; }

.signals-list { display: grid; gap: 10px; }

.signal-card {
  padding: 20px 21px;
  background: var(--portal-white);
  border: 1px solid var(--portal-line);
  border-left: 4px solid var(--portal-teal);
}

.signal-card:hover { border-left-color: var(--portal-coral); }

.signal-card-head {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.score-badge {
  display: grid;
  width: 53px;
  height: 53px;
  place-items: center;
  color: var(--portal-coral-dark);
  background: var(--portal-soft);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.06em;
}

.score-badge small {
  margin-left: 1px;
  color: var(--portal-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}

.signal-card-title p,
.signal-card-title h3 { margin: 0; }

.signal-card-title p {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.signal-card-title h3 {
  overflow: hidden;
  margin-top: 6px;
  color: var(--portal-ink-strong);
  font-size: 20px;
  font-weight: 820;
  letter-spacing: -.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-card-meta {
  margin: 4px 0 0;
  color: var(--portal-muted);
  font-size: 13px;
}

.signal-open {
  min-height: 35px;
  padding: 7px 10px;
  color: var(--portal-coral-dark);
  background: transparent;
  border: 1px solid var(--portal-line);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
}

.signal-open:hover { color: #fff; background: var(--portal-coral); border-color: var(--portal-coral); }

.signal-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr);
  gap: 18px;
  margin: 17px 0 0 71px;
}

.signal-card-body > p {
  margin: 0;
  color: var(--portal-ink);
  font-size: 14px;
  line-height: 1.5;
}

.signal-evidence {
  padding-left: 15px;
  border-left: 1px solid var(--portal-line);
}

.signal-evidence span {
  color: var(--portal-coral-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.signal-evidence p {
  margin: 4px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.4;
}

.signal-card-foot {
  display: flex;
  margin: 18px 0 0 71px;
  padding-top: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--portal-line);
}

.signal-card-foot span {
  color: var(--portal-muted);
  font-size: 11px;
}

.signal-card-foot a {
  color: var(--portal-coral-dark);
  font-size: 11px;
  font-weight: 800;
}

.signal-card-foot a:hover { color: var(--portal-ink); }

.streams-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  gap: 14px;
}

.stream-list-panel,
.config-panel { min-height: 330px; }

.stream-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 15px 0;
  align-items: start;
  border-bottom: 1px solid var(--portal-line);
}

.stream-row:last-child { border-bottom: 0; }

.stream-row .live-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
}

.stream-row h3 {
  margin: 0 0 4px;
  color: var(--portal-ink-strong);
  font-size: 15px;
}

.stream-row p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 12px;
}

.stream-row-status {
  padding: 4px 7px;
  color: var(--portal-green);
  background: #e6f4ee;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-field {
  display: grid;
  gap: 6px;
  margin-bottom: 15px;
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 800;
}

.portal-field input,
.portal-field select,
.portal-field textarea {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  color: var(--portal-ink);
  background: #fff;
  border: 1px solid #c3d1d3;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
}

.portal-field textarea {
  min-height: 76px;
  resize: vertical;
}

.form-button { width: 100%; margin-top: 3px; }

.form-feedback {
  min-height: 18px;
  margin: 0 0 8px;
  color: var(--portal-coral-dark);
  font-size: 12px;
}

.form-feedback.is-success { color: var(--portal-green); }

.entitlement-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 14px;
  background: var(--portal-line);
  border: 1px solid var(--portal-line);
}

.entitlement-item {
  padding: 15px;
  background: var(--portal-white);
}

.entitlement-item span,
.entitlement-item strong { display: block; }

.entitlement-item span {
  color: var(--portal-muted);
  font-size: 11px;
}

.entitlement-item strong {
  margin-top: 6px;
  color: var(--portal-ink-strong);
  font-size: 17px;
  letter-spacing: -.04em;
}

.integration-grid { grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); }

.pill {
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pill-dark { color: #d8ebea; background: var(--portal-ink); }
.pill-mint { color: var(--portal-green); background: #e5f3ee; }
.pill-coral { color: var(--portal-coral-dark); background: #fbe9e3; }

.panel-lede {
  max-width: 560px;
  margin: 0 0 18px;
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.5;
}

.inline-form { display: flex; gap: 8px; }

.inline-form input {
  min-width: 0;
  flex: 1;
  min-height: 43px;
  padding: 9px 11px;
  color: var(--portal-ink);
  border: 1px solid #c3d1d3;
  border-radius: 3px;
  font-size: 13px;
}

.key-reveal {
  display: flex;
  margin-top: 15px;
  padding: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--portal-soft);
  border: 1px solid #b7dad3;
}

.key-reveal strong,
.key-reveal small { display: block; }

.key-reveal strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--portal-ink);
  font: 12px/1.45 "SFMono-Regular", Consolas, monospace;
}

.key-reveal small {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 11px;
}

.api-doc-link { display: inline-block; margin-top: 19px; }
.export-options { display: grid; gap: 9px; }

.export-option {
  display: grid;
  grid-template-columns: 41px minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 9px 11px;
  align-items: center;
  gap: 11px;
  color: var(--portal-ink);
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 3px;
  text-align: left;
}

.export-option:hover {
  border-color: var(--portal-teal);
  background: #f7fbfa;
}

.export-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--portal-ink);
  background: var(--portal-soft);
  border-radius: 4px;
  font: 10px "SFMono-Regular", Consolas, monospace;
  font-weight: 900;
}

.export-option strong,
.export-option small { display: block; }
.export-option strong { font-size: 13px; }
.export-option small { margin-top: 2px; color: var(--portal-muted); font-size: 11px; }
.export-option b { color: var(--portal-coral); font-size: 18px; }

.export-note {
  margin: 17px 0 0;
  color: var(--portal-green);
  font-size: 11px;
}

.export-note span { margin-right: 5px; font-weight: 900; }
.keys-panel { margin-top: 14px; }

.key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 15px;
  padding: 14px 0;
  align-items: center;
  border-bottom: 1px solid var(--portal-line);
}

.key-row:last-child { border-bottom: 0; }
.key-row strong,
.key-row span { display: block; }
.key-row strong { color: var(--portal-ink); font-size: 13px; }
.key-row span { margin-top: 3px; color: var(--portal-muted); font: 11px "SFMono-Regular", Consolas, monospace; }
.key-row time { color: var(--portal-muted); font-size: 11px; }

.revoke-key {
  padding: 0;
  color: var(--portal-coral-dark);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 800;
}

.key-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.revoke-key:hover { color: var(--portal-ink); }

.billing-status { margin-bottom: 14px; }

.billing-status-card {
  display: flex;
  padding: 15px 18px;
  align-items: center;
  gap: 11px;
  color: var(--portal-ink);
  background: var(--portal-soft);
  border-left: 4px solid var(--portal-teal);
}

.billing-status-card.is-pending {
  background: #fff4e1;
  border-left-color: var(--portal-gold);
}

.billing-status-card strong,
.billing-status-card span { display: block; }
.billing-status-card strong { font-size: 13px; }
.billing-status-card span { color: var(--portal-muted); font-size: 12px; }
.billing-ending-note { margin-top: 4px; color: var(--portal-coral-dark) !important; font-size: 11px !important; }

.billing-grid { grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); }

.billing-plan-hero {
  display: flex;
  min-height: 164px;
  padding: 20px;
  color: #fff;
  background: var(--portal-ink);
  flex-direction: column;
  justify-content: space-between;
}

.billing-plan-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.billing-plan-hero .plan-name {
  color: #fff;
  font-size: 27px;
  font-weight: 820;
  letter-spacing: -.05em;
}

.billing-plan-hero .plan-price {
  color: #a9d3cc;
  font-size: 13px;
}

.billing-plan-hero .plan-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  color: #cad8da;
  font-size: 12px;
}

.billing-plan-hero .plan-features span::before {
  margin-right: 5px;
  color: #83c8b7;
  content: "✓";
  font-weight: 900;
}

.billing-actions {
  display: flex;
  margin-top: 15px;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.billing-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.billing-actions p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 1.4;
}

.usage-meter {
  padding: 16px;
  background: var(--portal-soft);
}

.usage-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.usage-meter-head span { color: var(--portal-muted); font-size: 12px; }
.usage-meter-head strong { color: var(--portal-ink-strong); font-size: 16px; }

.usage-track {
  height: 9px;
  margin: 14px 0 8px;
  overflow: hidden;
  background: #c7deda;
  border-radius: 99px;
}

.usage-fill {
  height: 100%;
  min-width: 3px;
  background: var(--portal-coral);
  border-radius: 99px;
}

.usage-meter small { color: var(--portal-muted); font-size: 11px; }

.usage-list {
  display: grid;
  gap: 0;
  margin-top: 19px;
}

.usage-row {
  display: flex;
  padding: 12px 0;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: 12px;
}

.usage-row:last-child { border-bottom: 0; }
.usage-row strong { color: var(--portal-ink); }

.invoice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  padding: 14px 0;
  align-items: center;
  border-bottom: 1px solid var(--portal-line);
}

.invoice-row:last-child { border-bottom: 0; }
.invoice-row strong,
.invoice-row span { display: block; }
.invoice-row strong { color: var(--portal-ink); font-size: 13px; }
.invoice-row span { margin-top: 3px; color: var(--portal-muted); font-size: 11px; }
.invoice-row > strong:last-of-type { margin: 0; font-size: 13px; }
.invoice-row a { color: var(--portal-coral-dark); font-size: 11px; font-weight: 800; }

.plan-comparison {
  display: flex;
  margin-top: 14px;
  padding: 18px 21px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--portal-soft);
  border: 1px solid var(--portal-line);
}

.plan-comparison strong {
  display: block;
  margin-top: 4px;
  color: var(--portal-ink-strong);
  font-size: 14px;
}

.modal-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(11, 31, 45, .7);
}

.signal-modal {
  position: relative;
  width: min(100%, 640px);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 31px;
  background: var(--portal-white);
  border-top: 5px solid var(--portal-coral);
  box-shadow: 0 25px 80px rgba(11, 31, 45, .28);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  width: 33px;
  height: 33px;
  color: var(--portal-muted);
  background: transparent;
  border: 0;
  font-size: 25px;
  line-height: 1;
}

.modal-score {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  place-items: center;
  color: var(--portal-coral-dark);
  background: var(--portal-soft);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
}

.signal-modal h2 {
  margin: 10px 0 5px;
  color: var(--portal-ink-strong);
  font-size: 29px;
  letter-spacing: -.05em;
}

.modal-meta { margin: 0; color: var(--portal-muted); font-size: 13px; }

.modal-section {
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid var(--portal-line);
}

.modal-section p {
  margin: 7px 0 0;
  color: var(--portal-ink);
  font-size: 15px;
  line-height: 1.5;
}

.modal-next {
  padding: 15px;
  background: var(--portal-soft);
  border: 0;
}

.modal-next p {
  color: var(--portal-ink);
  font-weight: 700;
}

.modal-footer {
  display: flex;
  margin-top: 25px;
  padding-top: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--portal-line);
}

.modal-footer > span { color: var(--portal-muted); font-size: 11px; }

.portal-toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: 380px;
  padding: 14px 17px;
  color: #fff;
  background: var(--portal-ink);
  box-shadow: 0 12px 35px rgba(11, 31, 45, .23);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
}

.portal-toast.is-visible { opacity: 1; transform: translateY(0); }

.portal-footer {
  display: flex;
  max-width: var(--portal-max);
  margin: 0 auto;
  padding: 24px 24px 36px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--portal-muted);
  font-size: 11px;
}

.portal-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.portal-footer a { color: var(--portal-coral-dark); font-size: 11px; font-weight: 800; }

@media (max-width: 1120px) {
  .portal-content { width: min(var(--portal-max), calc(100% - 48px)); }
  .portal-topbar { padding-right: 24px; padding-left: 24px; }
  .portal-grid-main,
  .portal-grid-secondary,
  .streams-layout,
  .integration-grid,
  .billing-grid { grid-template-columns: 1fr; }
  .coverage-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .coverage-panel .panel-heading { grid-column: 1 / -1; margin-bottom: 0; }
  .coverage-block + .coverage-block { margin-top: 0; padding-top: 0; border-top: 0; }
}

@media (max-width: 820px) {
  .portal-sidebar {
    width: 245px;
    transform: translateX(-101%);
    transition: transform .22s ease;
  }
  .portal-sidebar.is-open { transform: translateX(0); }
  .portal-scrim.is-visible {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    background: rgba(11, 31, 45, .42);
  }
  .portal-main { margin-left: 0; }
  .mobile-menu-button { display: block; }
  .portal-topbar { min-height: 68px; }
  .topbar-public-link { display: none; }
  .user-chip { padding-left: 0; border-left: 0; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .latest-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-wrap: wrap; }
  .search-field { flex: 1 1 100%; }
  .filter-select { flex: 1; }
  .signal-card-body { grid-template-columns: 1fr; }
  .signal-evidence {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--portal-line);
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .portal-content { width: calc(100% - 32px); padding-top: 30px; }
  .portal-topbar { padding: 0 16px; }
  .breadcrumb span { display: none; }
  .topbar-actions { gap: 11px; }
  .topbar-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .topbar-export .topbar-action-icon { margin: 0; font-size: 22px; }
  .user-chip-copy { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 18px; }
  .page-head h1 { font-size: 39px; }
  .page-head p:last-child { font-size: 15px; }
  .page-head-actions { width: 100%; }
  .page-head-actions .button { flex: 1; }
  .status-banner { align-items: flex-start; flex-direction: column; gap: 12px; }
  .status-banner .status-action { margin-left: 0; }
  .metric-grid { gap: 8px; }
  .metric-card { min-height: 108px; padding: 14px; }
  .metric-card > strong { margin-top: 12px; font-size: 25px; }
  .metric-card > small { font-size: 10px; }
  .portal-panel { padding: 18px; }
  .coverage-panel { display: block; }
  .coverage-block + .coverage-block { margin-top: 24px; padding-top: 21px; border-top: 1px solid var(--portal-line); }
  .brief-content-grid { grid-template-columns: 1fr; }
  .activity-chart { gap: 4px; }
  .activity-day-label { font-size: 9px; }
  .chart-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .filter-select { min-width: 0; }
  .filter-select select { width: 100%; }
  .signal-card { padding: 16px; }
  .signal-card-head { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
  .score-badge { width: 44px; height: 44px; font-size: 17px; }
  .signal-card-title h3 { font-size: 17px; }
  .signal-open { grid-column: 2; justify-self: start; }
  .signal-card-body,
  .signal-card-foot { margin-left: 0; }
  .signal-card-foot { align-items: flex-start; flex-direction: column; gap: 8px; }
  .entitlement-strip { grid-template-columns: 1fr 1fr; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .key-reveal { align-items: flex-start; flex-direction: column; }
  .key-row { grid-template-columns: minmax(0, 1fr) auto; }
  .key-row time { grid-column: 1; }
  .key-row .key-actions { grid-column: 2; grid-row: 1 / span 2; align-items: flex-end; flex-direction: column; gap: 6px; }
  .invoice-row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .invoice-row > strong:last-of-type { grid-column: 2; grid-row: 1; }
  .invoice-row a { grid-column: 1 / -1; }
  .plan-comparison { align-items: flex-start; flex-direction: column; }
  .modal-footer { align-items: flex-start; flex-direction: column; }
  .modal-footer .button { width: 100%; }
  .portal-toast { right: 15px; bottom: 15px; left: 15px; max-width: none; }
  .portal-footer { align-items: flex-start; flex-direction: column; }
  .portal-footer nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
