:root {
  color-scheme: light;
  --ink: #1f2925;
  --muted: #667069;
  --paper: #f5f3ec;
  --panel: #fcfbf7;
  --line: #d8d9d0;
  --moss: #2c5944;
  --brick: #b75d45;
  --sun: #d8a24e;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.nav {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand { font-size: 18px; font-weight: 800; }

.nav-links { display: flex; gap: 28px; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--moss); }

.hero {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: min(670px, calc(100vh - 108px));
  margin: 0 auto;
  overflow: hidden;
  color: #fff;
}

.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; object-position: center; }
.hero-shade { background: linear-gradient(90deg, rgba(24, 35, 29, .84) 0%, rgba(24, 35, 29, .55) 38%, rgba(24, 35, 29, .06) 72%); }

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100% - 48px));
  padding-top: clamp(96px, 16vw, 178px);
  margin-left: clamp(28px, 7vw, 112px);
}

.eyebrow, .section-kicker {
  margin: 0 0 14px;
  color: var(--sun);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 510px;
  margin: 26px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 18px;
  line-height: 1.9;
}

.text-link, .post-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 34px;
  font-size: 14px;
  font-weight: 800;
}
.text-link { border-bottom: 1px solid rgba(255,255,255,.72); padding-bottom: 6px; }

.content-section { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: clamp(70px, 10vw, 130px) 0; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.section-heading > span { color: var(--brick); font-size: 32px; font-weight: 800; }
h2 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.16; letter-spacing: 0; }
h3 { margin: 0; letter-spacing: 0; }
p { color: var(--muted); line-height: 1.85; }

.latest-section { border-bottom: 1px solid var(--line); }
.featured-post { padding: clamp(30px, 5vw, 58px); background: var(--moss); color: #fff; }
.featured-post h3 { max-width: 770px; margin-top: 12px; font-size: clamp(28px, 4.1vw, 52px); line-height: 1.2; }
.featured-post p:not(.post-meta) { max-width: 690px; color: rgba(255,255,255,.74); }
.featured-post .post-link { color: var(--sun); }
.post-meta { margin: 0; color: var(--brick); font-size: 13px; font-weight: 800; }
.featured-post .post-meta { color: #efc476; }
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; margin-top: 48px; }
.post-list article { border-top: 1px solid var(--line); padding-top: 20px; }
.post-list h3 { margin-top: 14px; font-size: 24px; }
.post-list p:not(.post-meta) { margin: 12px 0 0; }

.market-section { border-bottom: 1px solid var(--line); }
.market-heading { align-items: flex-end; }
.market-quote { display: grid; justify-items: end; gap: 3px; text-align: right; }
.market-quote strong { font-size: clamp(28px, 4vw, 42px); line-height: 1; font-variant-numeric: tabular-nums; }
.market-quote > span:last-child { color: var(--muted); font-size: 12px; }
.live-indicator { display: inline-flex; align-items: center; gap: 6px; color: var(--moss); font-size: 12px; font-weight: 800; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #4b9b70; box-shadow: 0 0 0 3px rgba(75, 155, 112, .13); }
.market-card { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); background: var(--panel); }
.market-card-header, .chart-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.chart-kicker { margin: 0; color: var(--brick); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.chart-window { margin: 6px 0 0; color: var(--ink); font-size: 14px; font-weight: 700; }
.chart-actions { display: flex; align-items: center; gap: 10px; }
.chart-zoom-actions { display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #f1efe8; }
.zoom-button { padding: 7px 10px; border: 0; border-right: 1px solid var(--line); color: var(--moss); background: transparent; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.zoom-button:last-child { border-right: 0; }
.zoom-button:hover:not(:disabled) { background: #e7e4d9; }
.zoom-button:disabled { color: #aab0aa; cursor: default; }
.period-switcher { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #f1efe8; }
.period-switcher button, .refresh-button { border: 0; color: var(--muted); background: transparent; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.period-switcher button { min-width: 34px; padding: 7px 8px; border-radius: 4px; }
.period-switcher button.is-active { color: #fff; background: var(--moss); }
.refresh-button { padding: 8px 4px; color: var(--moss); }
.refresh-button:disabled { color: var(--muted); cursor: wait; }
.chart-wrap { width: 100%; margin-top: 22px; overflow: hidden; }
.line-chart { display: block; width: 100%; min-width: 560px; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-label { fill: var(--muted); font-size: 12px; }
.chart-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot, .hover-dot { fill: var(--panel); stroke-width: 3; }
.chart-value-label { fill: var(--ink); font-size: 13px; font-weight: 800; }
.hover-capture { fill: transparent; cursor: crosshair; }
.hover-crosshair { stroke: #88928a; stroke-width: 1; stroke-dasharray: 3 4; }
.hover-label rect { fill: #1f2925; }
.hover-label text { fill: #fff; font-size: 12px; }
.chart-footer { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.market-disclaimer { margin: 13px 0 0; font-size: 12px; }

.mega-cap-section { border-bottom: 1px solid var(--line); }
.mega-cap-chart-card { padding: clamp(22px, 3vw, 34px); }
.mega-cap-chart-header { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding-bottom: 4px; }
.mega-cap-chart-header .chart-actions > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mega-cap-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 18px; border: 1px solid var(--line); background: var(--line); }
.mega-cap-card { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 64px; padding: 12px 14px; background: #f7f5ef; }
.mega-cap-swatch { width: 10px; height: 10px; border-radius: 50%; }
.mega-cap-name { display: grid; gap: 2px; min-width: 0; overflow: hidden; font-size: 13px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.mega-cap-name small { color: var(--muted); font-size: 11px; font-weight: 700; }
.mega-cap-latest { text-align: right; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mega-cap-change { display: block; margin-top: 3px; color: var(--moss); font-size: 11px; font-style: normal; font-weight: 800; }
.mega-cap-change.is-negative { color: var(--brick); }

.notes-section { border-bottom: 1px solid var(--line); }
.notes-grid { display: grid; grid-template-columns: 1.3fr .85fr .85fr; gap: 16px; }
.note-card { min-height: 275px; padding: 28px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; }
.note-wide { background: #e7e4d9; }
.note-index { color: var(--brick); font-size: 13px; font-weight: 800; }
.note-card h3 { margin-top: auto; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; }
.note-card p { margin: 12px 0 0; }

.topics-section { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 10vw, 140px); align-items: start; }
.topic-list { display: grid; gap: 0; }
.topic-list article { padding: 24px 0 26px; border-top: 1px solid var(--line); }
.topic-list article:last-child { border-bottom: 1px solid var(--line); }
.topic-list p { margin: 0; color: var(--brick); font-size: 13px; font-weight: 800; }
.topic-list h3 { margin-top: 12px; font-size: 25px; }
.topic-list span { display: block; margin-top: 12px; color: var(--muted); font-size: 14px; }

.footer { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0 42px; display: flex; justify-content: center; align-items: center; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer a { line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; }
.public-security-record { display: inline-flex; align-items: center; gap: 4px; }
.public-security-record img { width: 14px; height: 14px; flex: 0 0 14px; object-fit: contain; }

.back-link { color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--moss); }

.article-page { width: min(760px, calc(100% - 48px)); margin: 0 auto; padding: clamp(58px, 10vw, 112px) 0; }
.article h1 { max-width: 680px; margin: 12px 0 30px; font-size: clamp(42px, 6vw, 66px); line-height: 1.14; letter-spacing: 0; }
.article-lead { margin: 0 0 42px; color: var(--ink); font-size: clamp(19px, 2.4vw, 23px); line-height: 1.82; }
.article > p:not(.post-meta):not(.article-lead) { margin: 0 0 24px; font-size: 17px; line-height: 2; }
.article h2 { margin: 52px 0 18px; font-size: clamp(27px, 3.4vw, 38px); }
.article-source { margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-source p { margin: 0 0 8px; color: var(--brick); font-size: 13px; font-weight: 800; }
.article-source a { display: block; color: var(--moss); line-height: 1.7; text-decoration: underline; text-underline-offset: 4px; }
.article-footer { justify-content: center; }

@media (max-width: 760px) {
  .site-header, .content-section, .footer { width: min(100% - 36px, 1120px); }
  .nav { min-height: 68px; }
  .nav-links { gap: 16px; }
  .hero { width: 100%; min-height: 580px; }
  .hero-shade { background: linear-gradient(90deg, rgba(24, 35, 29, .8), rgba(24, 35, 29, .34)); }
  .hero-copy { width: calc(100% - 44px); margin-left: 22px; padding-top: 118px; }
  .hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .post-list, .notes-grid, .topics-section { grid-template-columns: 1fr; }
  .post-list { gap: 28px; }
  .note-card { min-height: 220px; }
  .topics-section { gap: 40px; }
  .article-page { width: min(100% - 36px, 760px); }
  .article h1 { font-size: 42px; }
  .article > p:not(.post-meta):not(.article-lead) { font-size: 16px; }
  .market-heading { align-items: flex-start; flex-direction: column; }
  .market-quote { justify-items: start; text-align: left; }
  .market-card-header { align-items: flex-start; flex-direction: column; }
  .mega-cap-list { grid-template-columns: 1fr; }
  .mega-cap-chart-header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .line-chart { min-width: 520px; }
  .chart-wrap { overflow-x: auto; }
  .chart-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (max-width: 390px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 16px 0; gap: 8px; }
}
