:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f4f8;
  --text: #101318;
  --muted: #667085;
  --line: #d8dee8;
  --blue: #2563eb;
  --cyan: #0891b2;
  --indigo: #4f46e5;
  --violet: #7c3aed;
  --green: #0f9f6e;
  --red: #d92d20;
  --amber: #b7791f;
  --rose: #9e165f;
  --slate: #475467;
  --shadow: 0 18px 60px rgba(16, 19, 24, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1;
  font-weight: 780;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  min-height: 68px;
  padding: 14px 48px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.brand-title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.12);
}

.connection.live .dot {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.connection.error .dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.12);
}

.view-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  position: static;
  overflow-x: auto;
  scrollbar-width: none;
}

.view-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  position: relative;
  min-height: 36px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 520;
  white-space: nowrap;
  box-shadow: none;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(16, 19, 24, 0.05);
  box-shadow: inset 0 0 0 1px rgba(216, 222, 232, 0.65);
}

.nav-item.active {
  color: var(--text);
  background: rgba(16, 19, 24, 0.06);
  box-shadow: inset 0 0 0 1px rgba(216, 222, 232, 0.72);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 24px 48px 56px;
}

.view-panel {
  display: none;
}

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

.control-band {
  display: grid;
  grid-template-columns: auto minmax(170px, 230px) minmax(170px, 230px) auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 3px;
  min-height: 44px;
  padding: 3px;
  background: #edf2f7;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  box-shadow: inset 0 1px 2px rgba(16, 19, 24, 0.04);
}

.segment,
.command {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.segment {
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 780;
}

.segment.active {
  color: #1d4ed8;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--text);
  font-size: 14px;
  font-weight: 820;
}

.command:hover,
.segment:hover {
  transform: translateY(-1px);
}

.segment:hover {
  color: #1d4ed8;
}

.command svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: currentColor;
}

.filter {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.filter span {
  color: #475467;
  font-size: 11px;
  font-weight: 820;
}

.filter select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 14px;
  color: var(--text);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23667085' d='M5.6 7.4 10 11.8l4.4-4.4 1.2 1.2L10 14.2 4.4 8.6l1.2-1.2Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  outline: none;
  appearance: none;
  font-size: 14px;
  font-weight: 760;
  box-shadow: 0 8px 22px rgba(16, 19, 24, 0.045);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.filter select:hover {
  border-color: #b9c6d8;
  box-shadow: 0 10px 26px rgba(16, 19, 24, 0.07);
  transform: translateY(-1px);
}

.filter select:focus {
  border-color: #93b4ff;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.1),
    0 10px 26px rgba(16, 19, 24, 0.07);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 18px;
}

.metric,
.panel,
.market-section,
.source-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  min-height: 126px;
  padding: 18px;
  display: grid;
  gap: 8px;
  align-content: center;
}

.metric-primary {
  position: relative;
  min-height: 178px;
  padding: 24px;
  overflow: hidden;
  justify-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.64)),
    linear-gradient(135deg, #eef6ff 0%, #f4fbf8 52%, #ffffff 100%);
  border-color: #b7d6cb;
  border-left: 0;
  box-shadow: 0 22px 70px rgba(8, 145, 178, 0.1);
}

.metric-primary::before {
  content: "";
  position: absolute;
  inset: 0 18%;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #22c55e, var(--cyan), transparent);
}

.metric-primary > * {
  position: relative;
  z-index: 1;
}

.metric span,
.metric small,
.section-heading p,
.panel-heading p,
.panel-heading > span,
.panel-actions > span,
.weather-controls > span {
  color: var(--muted);
}

.metric span,
.panel-heading > span,
.panel-actions > span,
.weather-controls > span {
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
  white-space: nowrap;
}

.panel-actions > span,
.weather-controls > span {
  flex: 0 0 auto;
}

.metric strong {
  font-size: 30px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.metric small {
  font-size: 13px;
}

.metric-meta-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #475467;
  font-size: 11px;
  line-height: 1.3;
}

.metric-meta-row span,
.metric-meta-row small,
.metric-meta-row b {
  color: inherit;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
}

.metric-meta-row > * + *::before {
  content: "/";
  margin-right: 8px;
  color: #98a2b3;
  font-weight: 400;
}

.metric-primary strong {
  display: inline-block;
  min-width: min(560px, 92%);
  margin-top: 0;
  padding: 12px 20px 14px;
  color: #62ff8f;
  background:
    linear-gradient(180deg, rgba(16, 24, 20, 0.96), rgba(5, 14, 10, 0.98)),
    #07110c;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 5px;
  box-shadow:
    inset 0 0 0 1px rgba(134, 239, 172, 0.08),
    inset 0 -18px 30px rgba(34, 197, 94, 0.06),
    0 16px 36px rgba(7, 17, 12, 0.16);
  font-family:
    "DSEG7 Classic", "Digital-7 Mono", "DS-Digital", "Quartz", "OCR A Std",
    "OCR A Extended", "Courier New", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  font-size: 58px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 7px rgba(98, 255, 143, 0.8),
    0 0 20px rgba(34, 197, 94, 0.44);
}

.metric-primary #bestBtcSource {
  font-weight: 400;
}

.metric-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 0;
  font-weight: 400;
}

.metric-time b {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.market-section,
.source-section {
  overflow: hidden;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.section-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.section-actions .filter {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  font-family:
    Inter, "SF Pro Text", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.section-actions .filter select {
  width: auto;
  min-width: 94px;
  min-height: 32px;
  padding: 0 28px 0 10px;
  background-position: right 9px center;
  background-size: 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 400;
  box-shadow: 0 5px 14px rgba(16, 19, 24, 0.04);
}

.section-actions .filter select:hover {
  box-shadow: 0 7px 16px rgba(16, 19, 24, 0.06);
}

.market-filter {
  min-width: 0;
}

.section-actions .market-filter {
  min-width: 0;
}

.section-actions .segmented {
  min-height: 32px;
  grid-template-columns: repeat(3, minmax(40px, 1fr));
  gap: 2px;
  padding: 2px;
  border-radius: 7px;
}

.section-actions .segment {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 400;
}

.refresh-command {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
  flex: 0 0 auto;
  white-space: nowrap;
}

.refresh-command:hover {
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.26);
}

.refresh-command span {
  line-height: 1;
  white-space: nowrap;
}

.refresh-compact {
  min-height: 32px;
  padding: 0 11px;
  gap: 6px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 400;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.panel-refresh {
  min-width: 72px;
  justify-content: center;
}

.refresh-compact svg {
  width: 14px;
  height: 14px;
  transform-origin: 50% 50%;
}

.refresh-compact:hover {
  box-shadow: 0 11px 22px rgba(37, 99, 235, 0.22);
}

.refresh-command.is-spinning svg {
  animation: refresh-spin 680ms cubic-bezier(0.22, 0.61, 0.36, 1) 1;
}

@keyframes refresh-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.market-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 14px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.summary-chip {
  min-height: 30px;
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.summary-chip span {
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.summary-chip strong {
  font-size: 13px;
  line-height: 1;
  font-weight: 860;
}

.summary-chip small {
  color: #475467;
  font-size: 11px;
  font-weight: 720;
}

.summary-quotes {
  color: #1d4ed8;
  background: #eef6ff;
  border-color: #bfd7ff;
}

.summary-health {
  color: #0e7490;
  background: #ecfeff;
  border-color: #a5f3fc;
}

.section-heading p,
.panel-heading p {
  margin-top: 5px;
  font-size: 14px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #eef4ff;
  color: var(--indigo);
  white-space: nowrap;
}

.status-pill.demo,
.badge.demo {
  background: #fff7e6;
  color: var(--amber);
}

.status-pill.error,
.badge.error {
  background: #fdf2fa;
  color: var(--rose);
}

.badge.status-ok {
  background: #eef4ff;
  color: var(--indigo);
}

.badge.status-demo,
.badge.status-stale {
  background: #fff7e6;
  color: var(--amber);
}

.badge.status-idle {
  background: #f2f4f7;
  color: #667085;
}

.badge.status-error {
  background: #fdf2fa;
  color: var(--rose);
}

.market-badge {
  min-width: 44px;
  justify-content: center;
}

.market-badge.spot {
  background: #e0f2fe;
  color: #0369a1;
}

.market-badge.perp {
  background: #ede9fe;
  color: var(--violet);
}

.table-frame {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  background: #fbfcfe;
  font-size: 12px;
  font-weight: 820;
}

td {
  font-size: 14px;
}

tbody tr:hover {
  background: #f8fafc;
}

.symbol-cell {
  font-weight: 800;
}

.exchange-cell {
  display: inline-flex;
  align-items: center;
  min-width: 84px;
  color: var(--text);
  font-weight: 560;
  white-space: nowrap;
}

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

.price {
  font-variant-numeric: tabular-nums;
  font-weight: 780;
}

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

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

.empty {
  height: 120px;
  color: var(--muted);
  text-align: center;
}

.spark {
  width: 90px;
  height: 30px;
  display: block;
}

.full-panel {
  min-height: 520px;
  padding: 0;
  overflow: hidden;
}

.panel-heading {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.weather-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 560px;
  justify-content: flex-end;
  min-width: 0;
}

.weather-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
  min-width: 180px;
}

.weather-form input {
  width: 100%;
  max-width: 260px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  font-weight: 720;
}

.weather-form input:focus {
  border-color: #b7c2d5;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.weather-local-time {
  font-variant-numeric: tabular-nums;
}

.icon-command {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 780;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(16, 19, 24, 0.06);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.icon-command svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 180ms ease;
}

.icon-command:hover {
  color: var(--blue);
  border-color: #b7c2d5;
  box-shadow: 0 12px 28px rgba(16, 19, 24, 0.1);
  transform: translateY(-1px);
}

.icon-command.inverted svg {
  transform: rotate(180deg);
}

.news-list,
.weather-list,
.fx-list,
.source-groups,
.sources-grid {
  display: grid;
  gap: 0;
}

.wide-list {
  padding: 4px 20px 20px;
}

.news-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px 6px;
  border-bottom: 1px solid var(--line);
}

.news-tag {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #d9e4f2;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.news-tag span {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 400;
}

.news-tag:hover {
  border-color: #b7c2d5;
  box-shadow: 0 8px 18px rgba(16, 19, 24, 0.06);
}

.news-tag.active {
  border-color: #bfdbfe;
  background: #eef6ff;
  color: #1d4ed8;
}

.news-tag.active span {
  color: #2563eb;
}

.weather-list.wide-list {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
  gap: 12px;
  padding-top: 14px;
}

.fx-list.wide-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: 16px;
  padding-top: 18px;
}

.news-item,
.weather-item,
.fx-item,
.source-item {
  display: grid;
  gap: 7px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.news-item:last-child,
.weather-item:last-child,
.fx-item:last-child,
.source-item:last-child {
  border-bottom: 0;
}

.news-item a {
  color: var(--text);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.45;
  text-decoration: none;
}

.news-item a:hover {
  color: var(--blue);
}

.news-item.is-read {
  opacity: 0.66;
}

.news-item.is-read a {
  color: #667085;
}

.news-item.is-read .news-summary,
.news-item.is-read .news-meta,
.news-item.is-read .news-inline-tag {
  color: #98a2b3;
}

.news-summary {
  max-width: 960px;
  margin: 0;
  color: #475467;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}

.news-meta span + span::before {
  content: "/";
  margin-right: 10px;
  color: #98a2b3;
}

.news-inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.news-inline-tag {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #f2f7ff;
  color: #475467;
  font-size: 11px;
  font-weight: 400;
}

.news-pager {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
  color: var(--muted);
  font-size: 12px;
}

.news-page-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.news-page-summary strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
}

.news-page-summary span {
  color: #667085;
  font-size: 12px;
}

.news-page-summary small {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 400;
}

.news-page-controls,
.news-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-page-controls {
  justify-self: center;
  min-height: 38px;
  padding: 4px;
  border: 1px solid #e4ebf5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06);
}

.news-page-jump {
  justify-self: end;
  min-height: 38px;
  padding: 4px 5px 4px 10px;
  border: 1px solid #e4ebf5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
}

.news-page-button {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475467;
  font-size: 12px;
  font-weight: 520;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.news-page-button:hover:not(:disabled) {
  background: #f2f6fc;
  color: #1d4ed8;
}

.news-page-button.active {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
}

.news-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.news-page-icon {
  width: 30px;
  padding: 0;
}

.news-page-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.news-page-gap {
  padding: 0 1px;
  color: #98a2b3;
}

.news-page-jump label {
  color: #667085;
  font-size: 11px;
  font-weight: 430;
}

.news-page-jump input {
  width: 54px;
  height: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: #f4f7fb;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.news-page-jump input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.16);
  background: #fff;
}

.news-page-go {
  background: #eef6ff;
  color: #1d4ed8;
}

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

.weather-item,
.fx-item,
.source-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.weather-item {
  grid-template-columns: 1fr;
  gap: 11px;
  align-content: start;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family:
    Inter, "SF Pro Text", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  box-shadow: 0 10px 26px rgba(16, 19, 24, 0.05);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.weather-list .weather-item:last-child {
  border-bottom: 1px solid var(--line);
}

.weather-item:hover {
  border-color: #c4ccda;
  box-shadow: 0 14px 34px rgba(16, 19, 24, 0.08);
  transform: translateY(-1px);
}

.weather-missing {
  gap: 0;
}

.weather-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.weather-primary {
  display: block;
  min-width: 0;
}

.weather-primary strong {
  display: block;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.weather-primary .meta-line {
  margin-top: 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}

.weather-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--slate);
  border: 1px solid var(--line);
  box-shadow: none;
}

.weather-icon svg {
  width: 16px;
  height: 16px;
}

.weather-sun,
.weather-partly-day {
  color: #d97706;
  background: #fffbeb;
}

.weather-moon,
.weather-partly-night {
  color: var(--indigo);
  background: #eef4ff;
}

.weather-rain {
  color: var(--cyan);
  background: #ecfeff;
}

.weather-snow {
  color: #0284c7;
  background: #f0f9ff;
}

.weather-fog,
.weather-cloud {
  color: var(--slate);
  background: #f8fafc;
}

.weather-storm {
  color: var(--violet);
  background: #f5f3ff;
}

.weather-condition {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 500;
}

.weather-reading {
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 88px;
}

.weather-reading strong {
  display: block;
  color: #111827;
  font-size: 23px;
  line-height: 1.05;
  font-weight: 620;
}

.weather-reading small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 7px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.weather-stat-wide {
  grid-column: 1 / -1;
}

.weather-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.weather-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}

.weather-stat strong {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 520;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.weather-stat-wide strong {
  white-space: normal;
}

.wind-arrow {
  width: 15px;
  height: 15px;
  display: inline-block;
  color: var(--blue);
  font-size: 15px;
  line-height: 15px;
  text-align: center;
}

.weather-remove {
  color: var(--muted);
  opacity: 0.74;
}

.weather-remove:hover {
  color: var(--rose);
  opacity: 1;
}

.weather-empty {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.fx-item {
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(16, 19, 24, 0.05);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.fx-list .fx-item:last-child {
  border-bottom: 1px solid var(--line);
}

.fx-item:hover {
  border-color: #c4ccda;
  box-shadow: 0 14px 34px rgba(16, 19, 24, 0.08);
  transform: translateY(-1px);
}

.fx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.fx-card-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.fx-card-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.currency-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.currency-flag {
  width: 42px;
  height: 28px;
  flex: 0 0 auto;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 5px 14px rgba(16, 19, 24, 0.07);
}

.currency-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.currency-name-primary {
  color: var(--text);
  font-size: 16px;
  line-height: 1.18;
  font-weight: 620;
  white-space: nowrap;
}

.currency-code {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  background: #eef4ff;
  color: #475467;
  font-size: 11px;
  line-height: 1;
  font-weight: 400;
}

.currency-direction {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.fx-rate {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fx-rate strong {
  display: block;
  color: #111827;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 620;
}

.fx-rate small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.fx-rate.unavailable strong {
  color: var(--muted);
}

.source-section {
  padding-bottom: 18px;
}

.source-groups {
  gap: 14px;
  padding: 14px;
}

.source-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 19, 24, 0.05);
}

.source-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.source-group-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.source-group-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.source-group-count {
  min-width: 52px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 650;
}

.sources-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.source-item {
  align-items: start;
  gap: 10px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 19, 24, 0.04);
}

.source-item strong {
  text-transform: uppercase;
}

.source-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.source-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.source-item .exchange-cell {
  min-width: 0;
  font-size: 13px;
  font-weight: 560;
}

.source-item .badge {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
}

.source-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 400;
}

.source-meta-row span {
  overflow-wrap: anywhere;
}

.source-meta-row span + span::before {
  content: "/";
  margin-right: 8px;
  color: #98a2b3;
}

.source-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-primary {
    grid-column: 1 / -1;
  }

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

@media (max-width: 760px) {
  h1 {
    font-size: 26px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 12px;
    min-height: 64px;
    padding: 14px 16px;
    position: sticky;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .connection {
    margin-left: auto;
    font-size: 12px;
  }

  .view-nav {
    order: 3;
    justify-content: flex-start;
    flex: 1 0 100%;
    width: 100%;
    padding: 2px 0 0;
  }

  .nav-item {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  .shell {
    padding: 18px 16px 42px;
  }

  .control-band,
  .metrics-grid,
  .sources-grid {
    grid-template-columns: 1fr;
  }

  .metric-primary {
    grid-column: auto;
    min-height: 160px;
    padding: 22px 16px 20px;
  }

  .market-summary {
    justify-content: flex-start;
    padding: 12px 14px 14px;
  }

  .summary-chip {
    width: 100%;
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .summary-chip small {
    text-align: right;
  }

  .segmented {
    width: 100%;
  }

  .section-actions .segmented {
    width: auto;
  }

  .section-heading,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .panel-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .weather-controls,
  .weather-form {
    width: 100%;
  }

  .weather-controls {
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .weather-form input {
    width: 100%;
  }

  .icon-command {
    flex: 0 0 38px;
  }

  .metric strong {
    font-size: 26px;
  }

  .metric-primary strong {
    font-size: 40px;
    min-width: 100%;
    padding: 10px 12px 12px;
  }

  .metric-meta-row {
    gap: 6px;
    font-size: 10px;
  }

  .metric-meta-row span,
  .metric-meta-row small,
  .metric-meta-row b {
    font-size: 10px;
  }

  .metric-meta-row > * + *::before {
    margin-right: 6px;
  }

  .weather-item,
  .fx-item,
  .source-item {
    grid-template-columns: 1fr;
  }

  .weather-card-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .weather-primary strong {
    font-size: 24px;
    line-height: 1.18;
  }

  .weather-reading {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .weather-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 10px;
  }

  .news-pager {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .news-page-controls {
    justify-self: stretch;
    flex-wrap: wrap;
    justify-content: center;
  }

  .news-page-jump {
    justify-self: stretch;
    justify-content: space-between;
  }

  .weather-stat-wide {
    grid-column: 1 / -1;
  }

  .fx-card-head {
    flex-direction: column;
  }

  .fx-rate {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .weather-list.wide-list {
    grid-template-columns: 1fr;
  }

  .fx-list.wide-list {
    grid-template-columns: 1fr;
  }

  .weather-details {
    grid-template-columns: 1fr;
  }
}
