:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e7eb;
  --paper: #f5f5f7;
  --surface: #ffffff;
  --navy: #203d5c;
  --green: #16856f;
  --orange: #f97316;
  --orange-soft: #fff1e8;
  --blue: #2563eb;
  --blue-soft: #edf5ff;
  --red: #dc2626;
  --shadow: 0 18px 50px rgba(25, 45, 70, 0.08);
  --soft-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 20px 55px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.92) 0, rgba(245, 245, 247, 0) 420px),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 580px),
    var(--paper);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(251, 251, 253, 0.82);
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
  backdrop-filter: saturate(180%) blur(22px);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: cover;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.desktop-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  color: #334155;
  font-size: 14px;
}

.desktop-nav a:hover {
  background: rgba(245, 245, 247, 0.92);
  color: var(--navy);
}

.update-pill {
  white-space: nowrap;
  padding: 8px 12px;
  color: var(--green);
  background: rgba(232, 246, 243, 0.9);
  border: 1px solid rgba(204, 235, 228, 0.88);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 106px;
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(460px, 1.04fr);
  align-items: stretch;
  gap: 18px;
  min-height: 430px;
}

.overview-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin: 0;
  color: #1f2f44;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.03;
  font-weight: 800;
}

h2 {
  margin: 0;
  color: #1f2f44;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.18;
}

h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.lead {
  margin: 22px 0 0;
  max-width: 680px;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.mode-button,
.segment {
  border: 1px solid #d7dde5;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  cursor: pointer;
  transition: 0.18s ease;
}

.mode-button:hover,
.segment:hover {
  border-color: #b7c3d0;
  background: #f8fafc;
}

.mode-button {
  min-width: 86px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 800;
}

.mode-button.active,
.segment.active {
  color: white;
  background: linear-gradient(180deg, #2f5a85, #214565);
  border-color: #214565;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px rgba(32, 61, 92, 0.16);
}

.signal-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.signal-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 206px;
  padding: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: var(--soft-shadow);
}

.signal-panel.active-signal {
  outline: 3px solid rgba(35, 71, 109, 0.18);
  outline-offset: 3px;
}

.signal-panel > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.signal-panel strong {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;
}

.panel-label {
  font-size: 24px;
  font-weight: 900;
}

.signal-panel dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0 0;
}

.signal-panel dt {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.signal-panel dd {
  margin: 5px 0 0;
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.signal-panel p {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.7;
}

.signal-weiler {
  color: white;
  background:
    linear-gradient(135deg, rgba(120, 45, 12, 0.18), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #dc5a13, #f97316 58%, #ffb179);
}

.signal-duofen {
  color: white;
  background:
    linear-gradient(135deg, rgba(13, 42, 92, 0.22), rgba(255, 255, 255, 0) 48%),
    linear-gradient(135deg, #1d5fb8, #2563eb 62%, #75b7ff);
}

.daily-image-band {
  margin-top: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.daily-image-band img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  object-fit: contain;
  border-radius: 6px;
  background: #0b4f72;
}

.section {
  scroll-margin-top: 88px;
  margin-top: 24px;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f2f4f7;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
}

.segment {
  min-width: 72px;
  padding: 9px 14px;
  border-radius: 6px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
}

.chart-surface {
  position: relative;
  min-height: 386px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  border: 1px solid #e1e7ee;
  border-radius: 8px;
}

#navChart {
  display: block;
  width: 100%;
  height: 366px;
}

.chart-tooltip {
  position: absolute;
  min-width: 176px;
  padding: 10px 12px;
  background: rgba(24, 35, 49, 0.94);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip span {
  margin-top: 4px;
  color: #dbeafe;
}

.metrics-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 78px;
  padding: 16px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  margin-top: 6px;
  color: #203d5c;
  font-size: 24px;
}

.metric.compact strong {
  font-size: 21px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.body-copy {
  margin: 14px 0 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.8;
}

.trade-extremes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trade-extremes article {
  min-height: 132px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  border: 1px solid #e1e7ee;
  border-radius: 8px;
}

.trade-extremes span,
.trade-extremes small {
  display: block;
  color: var(--muted);
}

.trade-extremes strong {
  display: block;
  margin: 12px 0;
  font-size: 28px;
}

.trade-extremes article:first-child strong {
  color: var(--green);
}

.trade-extremes article:last-child strong {
  color: var(--red);
}

.trade-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

select {
  min-width: 90px;
  padding: 9px 30px 9px 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #d7dde5;
  border-radius: 8px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #e7edf2;
  white-space: nowrap;
}

th {
  color: #506174;
  background: #f4f7fa;
  font-size: 13px;
}

tbody tr:hover {
  background: #f8fafc;
}

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

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

.tag {
  display: inline-flex;
  align-items: center;
  min-width: 48px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.tag.win {
  color: #0f766e;
  background: #e8f6f3;
}

.tag.loss {
  color: #b91c1c;
  background: #fff0f0;
}

.trade-cards {
  display: none;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.guide-grid article {
  padding: 18px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.guide-grid p {
  margin: 0;
  color: #4b5563;
  line-height: 1.75;
}

.disclaimer {
  margin: 22px 0 0;
  padding-top: 18px;
  color: var(--muted);
  border-top: 1px solid #e7edf2;
  font-size: 13px;
}

.mobile-nav {
  display: none;
}

.site-stats {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
  padding: 18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 251, 253, 0.92)),
    #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.96);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

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

.stats-grid article {
  min-height: 88px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  border: 1px solid #e1e7ee;
  border-radius: 8px;
}

.stats-grid span,
.stats-grid small {
  display: block;
}

.stats-grid article > span {
  color: var(--muted);
  font-size: 12px;
}

.stats-grid strong {
  display: block;
  margin: 8px 0 5px;
  color: #1f2f44;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.05;
}

.stats-grid small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 920px) {
  .topbar {
    min-height: 64px;
    padding: 10px 16px;
  }

  .desktop-nav,
  .update-pill {
    display: none;
  }

  main {
    width: min(100% - 24px, 760px);
    padding: 18px 0 84px;
  }

  .overview,
  .dashboard-grid,
  .split-section,
  .guide-grid,
  .site-stats {
    grid-template-columns: 1fr;
  }

  .overview-copy {
    padding: 26px;
  }

  .signal-panel {
    min-height: 186px;
    padding: 22px;
  }

  .signal-panel:not(.active-signal) {
    display: none;
  }

  .panel-label {
    font-size: 21px;
  }

  .daily-image-band {
    padding: 10px;
  }

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

  .segmented,
  .trade-tools {
    width: 100%;
  }

  .segment {
    flex: 1;
  }

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

  .chart-surface {
    min-height: 320px;
    padding: 10px;
  }

  #navChart {
    height: 300px;
  }

  .table-wrap {
    display: none;
  }

  .trade-cards {
    display: grid;
    gap: 10px;
  }

  .trade-card {
    padding: 14px;
    background: linear-gradient(180deg, #ffffff, #fbfcfd);
    border: 1px solid #e1e7ee;
    border-radius: 8px;
  }

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

  .trade-card-top strong {
    font-size: 18px;
  }

  .trade-card-grid {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 8px;
    box-shadow: 0 14px 38px rgba(25, 45, 70, 0.16);
    backdrop-filter: blur(16px);
  }

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

  .mobile-nav a {
    padding: 10px 8px;
    text-align: center;
    color: #334155;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-nav a:active {
    background: #edf4f9;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .overview-copy,
  .section,
  .site-stats {
    padding: 20px;
  }

  .signal-panel dl,
  .trade-extremes,
  .metrics-panel,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .signal-panel strong {
    font-size: 42px;
  }

  .signal-panel p {
    font-size: 14px;
  }

  .daily-image-band img {
    max-height: 360px;
  }

  .trade-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .select-label {
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }

  select {
    width: 100%;
  }
}
