:root {
  color-scheme: light;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-card: 1rem;
  --text-section: 1.125rem;
  --text-title: 1.5rem;
  --radius-control: 6px;
  --radius-panel: 8px;
  --control-height: 36px;
  --page: #f4f6f5;
  --paper: #fff;
  --ink: #19312c;
  --muted: #52665f;
  --line: #d4dfdb;
  --accent: #126352;
  --accent-surface: #e6f2ed;
  --rise: #23755c;
  --fall: #a03848;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  background: var(--page);
  color: var(--ink);
  font: var(--text-base)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:where(h1, h2, h3, p, li, th, td) { overflow-wrap: anywhere; }
time, .cutoff, .chart-value, th, td { font-variant-numeric: tabular-nums; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 1;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  background: var(--paper);
}

.shell { width: min(100% - 48px, 1056px); margin-inline: auto; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; min-height: 60px; padding-block: 8px; }
.brand {
  display: inline-grid;
  align-items: center;
  min-height: var(--control-height);
  color: var(--ink);
  font-size: var(--text-section);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--accent); }
.markets { display: flex; flex-wrap: wrap; gap: 4px; }
.markets a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.markets a:hover { background: var(--page); color: var(--accent); }
.markets a[aria-current="page"] { border-color: #b9d7cc; background: var(--accent-surface); color: var(--accent); font-weight: 650; }

#main { padding-block: 24px 48px; }
.index-heading { margin-bottom: 20px; }
h1, h2, h3 { margin: 0; line-height: 1.4; }
h1 { font-size: var(--text-title); font-weight: 720; }
.day + .day { margin-top: 24px; }
.day > h2 { margin-bottom: 8px; color: var(--muted); font-size: var(--text-sm); font-weight: 650; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--paper);
  padding: 16px;
}
.report-card:hover, .report-card:focus-within { border-color: #86b1a3; }
.report-card .market-name { color: var(--accent); font-weight: 650; font-size: var(--text-xs); }
.report-card h3 { font-size: var(--text-card); }
.report-card h3 a { display: flex; align-items: center; min-height: var(--control-height); color: var(--ink); text-decoration: none; }
.report-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.report-card p:last-child { color: var(--muted); }
.empty { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--paper); color: var(--muted); }

.report { max-width: 816px; margin-inline: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 24px 32px; }
.article-route { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: var(--text-sm); }
.article-route a { display: inline-flex; align-items: center; min-height: var(--control-height); }
.cutoff { margin-top: 8px; font-size: var(--text-xs); color: var(--muted); }
.opening { margin-top: 16px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-surface); font-weight: 600; }
.research-version { white-space: nowrap; margin-inline-start: 8px; }
.report-brief, .report-revision { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-panel); }
.report-brief { background: var(--accent-surface); }
.report-brief summary, .report-revision summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--control-height);
  padding: 4px 12px;
  cursor: pointer;
  border-radius: var(--radius-control);
}
.report-brief summary::-webkit-details-marker, .report-revision summary::-webkit-details-marker { display: none; }
.report-brief summary::after, .report-revision summary::after {
  content: '';
  inline-size: 7px;
  block-size: 7px;
  margin-inline-end: 2px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}
.report-brief[open] summary::after, .report-revision[open] summary::after { transform: translateY(2px) rotate(225deg); }
.report-brief summary h2, .report-revision summary h2 { font-size: var(--text-card); }
.revision-body { padding: 0 12px 12px; }
.brief-image { display: block; width: min(100% - 24px, 520px); margin: 0 auto 12px; }
.brief-image--archive { width: calc(100% - 24px); }
.brief-image img { display: block; width: 100%; height: auto; border-radius: var(--radius-control); }
.report-revision { margin-top: 8px; background: var(--page); }
.report-revision summary span { color: var(--muted); font-size: var(--text-xs); font-weight: 500; margin-inline-start: 4px; }
.revision-body h3 { font-size: var(--text-base); margin-bottom: 4px; }
.revision-body p + p { margin-top: 4px; }
.report-section { padding-top: 20px; }
.report-section + .report-section { margin-top: 20px; border-top: 1px solid var(--line); }
.report-section h2 { margin-bottom: 8px; font-size: var(--text-section); }
.report-section p + p { margin-top: 8px; }
.table-scroll { margin-top: 12px; overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-control); }
table { width: 100%; border-collapse: collapse; text-align: start; font-size: var(--text-sm); }
.table-caption { padding: 8px 12px; text-align: start; font-weight: 650; }
th, td { padding: 8px 12px; text-align: start; vertical-align: top; }
thead { background: var(--page); }
tbody tr { border-top: 1px solid var(--line); }
tbody th { min-width: 7ch; font-weight: 600; }
.chart { margin: 12px 0 0; border: 1px solid var(--line); border-radius: var(--radius-control); padding: 12px; }
.chart figcaption { font-weight: 650; margin-bottom: 8px; }
.chart ul, .sources ul { list-style: none; margin: 0; padding: 0; }
.chart-row { display: grid; grid-template-columns: minmax(5.5rem, 0.65fr) minmax(2rem, 2fr) minmax(5ch, auto); align-items: center; gap: 8px; min-height: 28px; font-size: var(--text-sm); }
.chart-track { position: relative; height: 12px; border-radius: 3px; background: var(--page); }
.chart-track::after { content: ''; position: absolute; inset-block: 0; left: 50%; border-left: 1px solid #758d83; }
.chart-bar { position: absolute; inset-block: 2px; width: var(--bar-width); }
.chart-bar.up { left: 50%; background: var(--rise); border-radius: 0 2px 2px 0; }
.chart-bar.down { right: 50%; background: var(--fall); border-radius: 2px 0 0 2px; }
.chart-value { text-align: right; }
.chart-value.up { color: var(--rise); }
.chart-value.down { color: var(--fall); }
.sources { font-size: var(--text-sm); color: var(--muted); }
.sources a { display: inline-flex; align-items: center; min-height: var(--control-height); }

@media (max-width: 640px) {
  :root { --control-height: 44px; }
  .shell { width: min(100% - 24px, 1056px); }
  .topbar { gap: 4px 12px; }
  .markets a { padding-inline: 8px; }
  #main { padding-block: 16px 32px; }
  .index-heading { margin-bottom: 16px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .report-card, .report { padding: 12px; }
  .report-section, .report-section + .report-section { padding-top: 16px; }
  .report-section + .report-section { margin-top: 16px; }
}
