:root {
  --hub-bg: #091321;
  --hub-surface: #0f1b2d;
  --hub-surface-soft: #16253c;
  --hub-surface-strong: #1d304d;
  --hub-line: #28405f;
  --hub-text: #e5edf8;
  --hub-text-muted: #9eb1ca;
  --hub-accent: #f2c300;
  --hub-accent-strong: #2563eb;
  --hub-scrollbar-track: #0c1728;
  --hub-scrollbar-thumb: #415675;
  --hub-scrollbar-thumb-hover: #5d7699;
  --hub-shadow: 0 18px 42px rgba(3, 8, 20, 0.34);
  --hub-space-1: 4px;
  --hub-space-2: 8px;
  --hub-space-3: 12px;
  --hub-space-4: 16px;
  --hub-space-5: 20px;
  --hub-space-6: 24px;
  --hub-font-family-sans: "Aptos", "Segoe UI Variable", "Segoe UI", Roboto, Arial, sans-serif;
  --hub-font-family-display: "Segoe UI Variable Display", "Aptos Display", "Aptos", "Segoe UI", Roboto, Arial, sans-serif;
  --hub-font-size-title: 30px;
  --hub-font-size-section: 19px;
  --hub-font-size-kpi: 20px;
  --hub-font-size-label: 12px;
  --hub-font-size-body: 14px;
  --hub-font-size-meta: 12px;
  --hub-font-weight-regular: 400;
  --hub-font-weight-medium: 500;
  --hub-font-weight-semibold: 600;
  --hub-font-weight-bold: 700;
  --hub-letter-spacing-label: 0.06em;
  --hub-line-height-heading: 1.25;
  --hub-line-height-body: 1.55;
}

body[data-theme="light"] {
  --hub-bg: #eef3fa;
  --hub-surface: #ffffff;
  --hub-surface-soft: #f3f7fc;
  --hub-surface-strong: #e5edf8;
  --hub-line: #ccd8e7;
  --hub-text: #0f172a;
  --hub-text-muted: #5f7491;
  --hub-accent: #f2c300;
  --hub-accent-strong: #2563eb;
  --hub-scrollbar-track: #e7eef7;
  --hub-scrollbar-thumb: #a8b6c8;
  --hub-scrollbar-thumb-hover: #8697ae;
  --hub-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: radial-gradient(circle at top left, #14253a 0%, #091321 48%, #08101d 100%);
  color: var(--hub-text);
  font-family: var(--hub-font-family-sans);
  font-size: var(--hub-font-size-body);
  font-weight: var(--hub-font-weight-regular);
  line-height: var(--hub-line-height-body);
  overflow: hidden;
  color-scheme: dark;
}

body[data-theme="light"] {
  background: radial-gradient(circle at top left, #f7fbff 0%, #eef3fa 48%, #e7edf6 100%);
  color-scheme: light;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--hub-scrollbar-thumb) var(--hub-scrollbar-track);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--hub-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--hub-scrollbar-thumb);
  border-radius: 999px;
  border: 3px solid var(--hub-scrollbar-track);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--hub-scrollbar-thumb-hover);
}

button,
a {
  font: inherit;
}

.hub-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
}

.hub-sidebar {
  padding: 18px 14px;
  background: linear-gradient(180deg, rgba(15, 27, 45, 0.98) 0%, rgba(10, 19, 33, 0.98) 100%);
  border-right: 1px solid var(--hub-line);
  display: grid;
  gap: 14px;
  align-content: start;
  grid-template-rows: auto auto 1fr auto;
  min-height: 100vh;
}

body[data-theme="light"] .hub-sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 246, 252, 0.96) 100%);
}

.hub-kicker {
  margin: 0 0 10px;
  color: var(--hub-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--hub-font-size-meta);
  font-weight: var(--hub-font-weight-semibold);
}

.hub-brand h1,
.hub-header h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.hub-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.hub-brand-link {
  display: inline-flex;
  border-radius: 16px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hub-brand-link:hover {
  transform: translateY(-1px);
}

.hub-brand-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(242, 195, 0, 0.35);
}

.hub-brand-logo {
  display: block;
  width: min(132px, 100%);
  height: auto;
  object-fit: contain;
}

.hub-brand h1 {
  font-size: clamp(22px, 2.4vw, var(--hub-font-size-title));
  line-height: 1.2;
  font-weight: var(--hub-font-weight-semibold);
  font-family: var(--hub-font-family-display);
}

.hub-header-main {
  display: grid;
  gap: var(--hub-space-3);
  min-width: 0;
  transition: gap 180ms ease;
}

.hub-header h2 {
  font-size: clamp(22px, 1.8vw, var(--hub-font-size-title));
  line-height: 1.2;
  font-weight: var(--hub-font-weight-semibold);
  font-family: var(--hub-font-family-display);
  transition: font-size 180ms ease, line-height 180ms ease;
}

.hub-brand p:last-child {
  margin: 8px 0 0;
  color: var(--hub-text-muted);
  line-height: var(--hub-line-height-body);
  font-size: var(--hub-font-size-body);
}

.hub-nav {
  display: grid;
  gap: 10px;
}

.hub-weather {
  padding: 14px 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--hub-line);
  background: linear-gradient(180deg, rgba(22, 37, 60, 0.84) 0%, rgba(13, 22, 35, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hub-sidebar-footer {
  display: grid;
  gap: 16px;
  align-content: end;
}

body[data-theme="light"] .hub-weather {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 246, 252, 0.94) 100%);
}

.hub-weather .hub-kicker {
  margin-bottom: 0;
}

.hub-weather-header {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.hub-feed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 0;
}

.hub-feed-tab {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hub-text);
  transition: transform 120ms ease, opacity 120ms ease;
  opacity: 0.88;
}

.hub-feed-tab:hover {
  transform: translateY(-1px);
  opacity: 1;
}

.hub-feed-tab-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: transparent;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.hub-feed-tab.is-active .hub-feed-tab-dot {
  background: currentColor;
  transform: scale(0.92);
}

.hub-feed-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  border-radius: 999px;
}

.hub-feed-panel {
  display: none;
}

.hub-feed-panel.is-active {
  display: block;
}

.hub-weather-row {
  display: grid;
  gap: 6px;
}

.hub-weather-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-weather-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.08));
}

.hub-weather-temp {
  margin: 0;
  color: var(--hub-text);
  font-size: var(--hub-font-size-kpi);
  font-weight: var(--hub-font-weight-bold);
  letter-spacing: -0.03em;
}

.hub-weather-summary {
  margin: 2px 0 0;
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-body);
  line-height: var(--hub-line-height-body);
}

.hub-weather-meta {
  display: grid;
  gap: 4px;
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-meta);
  line-height: var(--hub-line-height-body);
}

.hub-sports-row {
  display: grid;
  gap: 6px;
}

.hub-sports-league {
  margin: 0;
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-meta);
  font-weight: var(--hub-font-weight-medium);
  letter-spacing: var(--hub-letter-spacing-label);
  text-transform: uppercase;
}

.hub-sports-match {
  margin: 0;
  color: var(--hub-text);
  font-size: var(--hub-font-size-body);
  font-weight: var(--hub-font-weight-semibold);
  line-height: var(--hub-line-height-heading);
  letter-spacing: -0.02em;
}

.hub-sports-meta {
  display: grid;
  gap: 4px;
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-meta);
  line-height: var(--hub-line-height-body);
}

.hub-nav-item {
  padding: 14px 14px 13px;
  border-radius: 16px;
  border: 1px solid var(--hub-line);
  background: var(--hub-surface);
  color: var(--hub-text);
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 6px;
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}

body.is-theme-switching .hub-nav-item {
  transition: none;
}

.hub-nav-item:hover {
  transform: translateY(-1px);
  border-color: #39577d;
  background: var(--hub-surface-soft);
}

.hub-nav-item.is-active {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.2) 0%, rgba(22, 37, 60, 0.95) 100%);
  border-color: #4b6fa0;
  box-shadow: inset 0 0 0 1px rgba(242, 195, 0, 0.16);
}

body[data-theme="light"] .hub-nav-item.is-active {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.10) 0%, rgba(232, 240, 251, 0.95) 100%);
  border-color: #9cb4d2;
}

.hub-nav-label {
  font-size: var(--hub-font-size-section);
  font-weight: var(--hub-font-weight-semibold);
  line-height: var(--hub-line-height-heading);
}

.hub-nav-meta {
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-body);
  line-height: var(--hub-line-height-body);
}

.hub-sidebar-note {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--hub-line);
  background: rgba(22, 37, 60, 0.74);
}

body[data-theme="light"] .hub-sidebar-note {
  background: rgba(243, 247, 252, 0.88);
}

.hub-sidebar-note span,
.hub-sidebar-note strong {
  display: block;
}

.hub-sidebar-note span {
  color: var(--hub-text-muted);
  font-size: 0.82rem;
}

.hub-sidebar-note strong {
  margin-top: 8px;
  font-size: 0.95rem;
}

.hub-main {
  padding: var(--hub-space-3);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: var(--hub-space-3);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  transition: gap 180ms ease;
}

.hub-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  transition: gap 180ms ease, padding 180ms ease;
}

.hub-header-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  align-self: start;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  transition: gap 180ms ease;
}

.hub-share-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
  align-self: end;
}

.hub-icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid #43618a;
  background: rgba(22, 37, 60, 0.78);
  color: var(--hub-text);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.hub-icon-button:hover {
  transform: translateY(-1px);
  background: rgba(31, 51, 79, 0.92);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

body[data-theme="light"] .hub-icon-button {
  border-color: #adc1d9;
  background: rgba(255, 255, 255, 0.84);
}

body[data-theme="light"] .hub-icon-button:hover {
  background: rgba(243, 247, 252, 0.96);
}

.hub-icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.hub-icon-button.is-copied {
  border-color: #3b82f6;
  background: rgba(37, 99, 235, 0.18);
}

body[data-theme="light"] .hub-icon-button.is-copied {
  background: rgba(37, 99, 235, 0.12);
}

.hub-kpi-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 168px));
  max-height: 154px;
  opacity: 1;
  overflow: hidden;
  transform-origin: top left;
  transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.hub-kpi-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--hub-line);
  background: linear-gradient(180deg, rgba(22, 37, 60, 0.82) 0%, rgba(13, 22, 35, 0.96) 100%);
  display: grid;
  gap: 6px;
  min-width: 0;
  transition: padding 180ms ease, border-color 180ms ease, background 180ms ease;
}

body[data-theme="light"] .hub-kpi-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 246, 252, 0.94) 100%);
}

.hub-kpi-label {
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-label);
  font-weight: var(--hub-font-weight-medium);
  letter-spacing: var(--hub-letter-spacing-label);
  text-transform: uppercase;
}

.hub-kpi-value {
  color: var(--hub-text);
  font-size: var(--hub-font-size-kpi);
  font-weight: var(--hub-font-weight-bold);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hub-kpi-note {
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-body);
  line-height: var(--hub-line-height-body);
}

.hub-rollup {
  display: grid;
  gap: var(--hub-space-3);
  grid-template-columns: minmax(260px, 1.05fr) minmax(0, 1.95fr);
  max-height: 420px;
  opacity: 1;
  overflow: hidden;
  transform-origin: top left;
  transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.hub-command-card,
.hub-priority-card {
  border-radius: 16px;
  border: 1px solid var(--hub-line);
  background: linear-gradient(180deg, rgba(22, 37, 60, 0.82) 0%, rgba(13, 22, 35, 0.96) 100%);
  box-shadow: var(--hub-shadow);
}

body[data-theme="light"] .hub-command-card,
body[data-theme="light"] .hub-priority-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 246, 252, 0.94) 100%);
}

.hub-command-card {
  padding: var(--hub-space-4) 18px;
  display: grid;
  gap: var(--hub-space-3);
  background:
    radial-gradient(circle at top right, rgba(242, 195, 0, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(22, 37, 60, 0.82) 0%, rgba(13, 22, 35, 0.96) 100%);
}

.hub-command-head,
.hub-priority-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.hub-command-title {
  color: var(--hub-text);
  font-size: 16px;
  font-weight: var(--hub-font-weight-semibold);
  line-height: var(--hub-line-height-heading);
  font-family: var(--hub-font-family-display);
  letter-spacing: -0.01em;
}

.hub-command-chip,
.hub-priority-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--hub-font-size-label);
  font-weight: var(--hub-font-weight-semibold);
  letter-spacing: var(--hub-letter-spacing-label);
  text-transform: uppercase;
}

.hub-command-chip {
  background: rgba(242, 195, 0, 0.16);
  color: #f7d547;
}

body[data-theme="light"] .hub-command-chip {
  background: rgba(242, 195, 0, 0.18);
  color: #8a6600;
}

.hub-command-chip.focus {
  background: rgba(242, 195, 0, 0.18);
  color: #f7d547;
}

body[data-theme="light"] .hub-command-chip.focus {
  background: rgba(242, 195, 0, 0.18);
  color: #8a6600;
}

.hub-command-chip.elevated {
  background: rgba(185, 28, 28, 0.2);
  color: #fca5a5;
}

body[data-theme="light"] .hub-command-chip.elevated {
  background: rgba(185, 28, 28, 0.12);
  color: #b42318;
}

.hub-command-chip.watch {
  background: rgba(234, 179, 8, 0.18);
  color: #fde68a;
}

body[data-theme="light"] .hub-command-chip.watch {
  background: rgba(234, 179, 8, 0.14);
  color: #8a5a00;
}

.hub-command-chip.stable {
  background: rgba(22, 163, 74, 0.18);
  color: #86efac;
}

body[data-theme="light"] .hub-command-chip.stable {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.hub-command-chip.baseline {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

body[data-theme="light"] .hub-command-chip.baseline {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.hub-command-chip.building {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

body[data-theme="light"] .hub-command-chip.building {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.hub-command-summary {
  margin: 0;
  color: var(--hub-text-muted);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  max-width: 32ch;
}

.hub-priority-grid {
  display: grid;
  gap: var(--hub-space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-priority-card {
  padding: 14px var(--hub-space-4);
  display: grid;
  gap: 10px;
  min-width: 0;
  border-left-width: 4px;
}

.hub-priority-title {
  color: var(--hub-text);
  font-size: 16px;
  font-weight: var(--hub-font-weight-semibold);
  line-height: var(--hub-line-height-heading);
  font-family: var(--hub-font-family-display);
  letter-spacing: -0.01em;
}

.hub-priority-chip {
  background: var(--hub-surface-strong);
  color: var(--hub-text-muted);
}

body[data-theme="light"] .hub-priority-chip {
  background: var(--hub-surface-strong);
  color: #48627f;
}

.hub-priority-note {
  margin: 0;
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-body);
  line-height: var(--hub-line-height-body);
}

.hub-priority-card-urgent {
  border-color: rgba(185, 28, 28, 0.18);
  border-left-color: #dc2626;
  background:
    linear-gradient(180deg, rgba(127, 29, 29, 0.16) 0%, rgba(13, 22, 35, 0.96) 100%);
}

body[data-theme="light"] .hub-priority-card-urgent {
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.hub-priority-card-urgent .hub-priority-chip {
  background: rgba(220, 38, 38, 0.12);
  color: #ef4444;
}

body[data-theme="light"] .hub-priority-card-urgent .hub-priority-chip {
  color: #b42318;
}

.hub-priority-card-warning {
  border-color: rgba(181, 71, 8, 0.18);
  border-left-color: #f59e0b;
  background:
    linear-gradient(180deg, rgba(146, 64, 14, 0.12) 0%, rgba(13, 22, 35, 0.96) 100%);
}

body[data-theme="light"] .hub-priority-card-warning {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.hub-priority-card-warning .hub-priority-chip {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

body[data-theme="light"] .hub-priority-card-warning .hub-priority-chip {
  color: #9a3412;
}

.hub-priority-card-info {
  border-color: rgba(37, 99, 235, 0.18);
  border-left-color: #2563eb;
}

.hub-priority-card-info .hub-priority-chip {
  background: rgba(37, 99, 235, 0.12);
  color: #93c5fd;
}

body[data-theme="light"] .hub-priority-card-info .hub-priority-chip {
  color: #1d4ed8;
}

.hub-priority-card-good {
  border-color: rgba(22, 163, 74, 0.18);
  border-left-color: #16a34a;
  background:
    linear-gradient(180deg, rgba(20, 83, 45, 0.12) 0%, rgba(13, 22, 35, 0.96) 100%);
}

body[data-theme="light"] .hub-priority-card-good {
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.hub-priority-card-good .hub-priority-chip {
  background: rgba(22, 163, 74, 0.12);
  color: #86efac;
}

body[data-theme="light"] .hub-priority-card-good .hub-priority-chip {
  color: #166534;
}

.hub-priority-card-neutral {
  border-left-color: #94a3b8;
}

.hub-datetime {
  display: grid;
  gap: 2px;
  justify-items: end;
  padding-right: 2px;
  align-self: start;
  transition: transform 180ms ease;
}

.hub-date,
.hub-time {
  display: block;
}

.hub-date {
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-meta);
  letter-spacing: var(--hub-letter-spacing-label);
  font-weight: var(--hub-font-weight-medium);
  text-transform: uppercase;
}

.hub-time {
  color: var(--hub-text);
  font-size: var(--hub-font-size-body);
  font-weight: var(--hub-font-weight-semibold);
  letter-spacing: -0.01em;
}

.hub-copy-icon,
.hub-open-icon {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
}

.hub-timeline-icon {
  width: 19px;
  height: 19px;
  display: block;
  overflow: visible;
}

.hub-viewer {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--hub-line);
  background: var(--hub-surface);
  box-shadow: var(--hub-shadow);
  position: relative;
  min-height: 0;
}

body.is-viewer-scrolled .hub-main {
  gap: 10px;
}

body.is-viewer-scrolled .hub-header {
  gap: 16px;
}

body.is-viewer-scrolled .hub-header-main {
  gap: 8px;
}

body.is-viewer-scrolled .hub-header .hub-kicker {
  margin-bottom: 4px;
}

body.is-viewer-scrolled .hub-header h2 {
  font-size: clamp(18px, 1.35vw, 20px);
  line-height: 1.2;
}

body.is-viewer-scrolled .hub-kpi-strip {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px) scaleY(0.92);
  pointer-events: none;
}

body.is-viewer-scrolled .hub-rollup {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px) scaleY(0.92);
  pointer-events: none;
}

body.is-viewer-scrolled .hub-header-actions {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

body.is-viewer-scrolled .hub-datetime {
  transform: translateY(-1px);
  justify-items: start;
  padding-right: 0;
  min-width: 0;
}

body.is-viewer-scrolled .hub-share-actions {
  justify-content: flex-start;
}

#dashboard-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
  transition: opacity 120ms ease;
}

#dashboard-frame.is-loading {
  opacity: 0;
}

.hub-viewer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hub-surface);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.hub-viewer.is-loading::after {
  opacity: 1;
}

.hub-theme-wrap {
  padding-top: 2px;
}

.hub-credit {
  margin: 0;
  color: var(--hub-text-muted);
  font-size: var(--hub-font-size-meta);
  line-height: var(--hub-line-height-body);
  letter-spacing: 0;
  align-self: end;
  text-align: center;
  padding-bottom: 4px;
}

.hub-theme-toggle {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
}

.hub-theme-switch {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid currentColor;
}

.hub-theme-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 180ms ease;
}

.hub-theme-label {
  color: var(--hub-text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

body[data-theme="dark"] .hub-theme-switch {
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .hub-theme-knob {
  transform: translateX(22px);
}

@media (max-width: 1080px) {
  .hub-shell {
    grid-template-columns: 1fr;
  }

  .hub-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--hub-line);
    grid-template-rows: none;
    min-height: auto;
  }

  .hub-main {
    padding: 16px;
    overflow: visible;
  }

  .hub-rollup {
    grid-template-columns: 1fr;
  }

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

  .hub-viewer,
  #dashboard-frame {
    min-height: 0;
    height: 74vh;
  }
}

@media (max-width: 720px) {
  .hub-header {
    flex-direction: column;
    align-items: start;
  }

  .hub-kpi-strip {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hub-priority-grid {
    grid-template-columns: 1fr;
  }

  .hub-header-actions,
  .hub-datetime {
    justify-items: start;
  }

  .hub-share-actions {
    justify-content: start;
  }
}
