:root {
  color-scheme: light;
  --sidebar-width: 320px;
  --sidebar-motion: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --backdrop-motion: 180ms ease;
  --bg: #efefef;
  --panel: #f6f6f6;
  --card: #ffffff;
  --border: #d2d2d2;
  --text: #111111;
  --muted: #666666;
  --accent: #111111;
  --accent-soft: #f0f0f0;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

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

.drawer-backdrop {
  display: none;
}

.drawer-toggle {
  appearance: none;
  background: #111111;
  border: 1px solid #111111;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  color: #ffffff;
  cursor: pointer;
  display: block;
  font-size: 14px;
  font-weight: 700;
  left: 14px;
  line-height: 1;
  min-width: 58px;
  padding: 12px 14px;
  position: fixed;
  top: 14px;
  z-index: 50;
}

.shell {
  background: #ffffff;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns var(--sidebar-motion);
}

.sidebar {
  background: #ffffff;
  padding: 74px 20px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  transition:
    transform var(--sidebar-motion),
    box-shadow var(--backdrop-motion);
  will-change: transform;
}

body.nav-collapsed .shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

body.nav-collapsed .sidebar {
  pointer-events: none;
  transform: translateX(-104%);
}

.sidebar__header h1,
.content__header h2 {
  margin: 0;
  line-height: 1.2;
}

.sidebar__header p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.report-link {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 14px 14px 12px;
  text-align: left;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.report-link:hover {
  transform: translateY(-1px);
  border-color: #888888;
}

.report-link.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
}

.report-link__rank,
.report-link__date {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.report-link__title {
  display: block;
  margin: 8px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}

.content {
  background: #ffffff;
  border-left: 1px solid rgba(210, 210, 210, 0.92);
  border-radius: 20px 0 0 20px;
  height: 100vh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px;
  scrollbar-gutter: stable;
  min-width: 0;
}

body.nav-collapsed .content {
  border-left: 0;
  border-radius: 0;
}

.content__header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.content__subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}

.standalone-link {
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  text-decoration: none;
}

.overview {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.overview__cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(210, 210, 210, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 120px;
  padding: 18px;
}

.metric-card__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-card__value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 14px;
}

.metric-card--accent {
  background: linear-gradient(180deg, #ffffff 0%, #f1f1f1 100%);
}

.metric-card--up {
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
}

.metric-card--down {
  background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
}

.overview__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.05fr 1.45fr;
}

.panel {
  overflow: hidden;
}

.panel__header {
  align-items: center;
  border-bottom: 1px solid rgba(210, 210, 210, 0.88);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.panel__header h3 {
  font-size: 18px;
  margin: 0;
}

.panel__header span {
  color: var(--muted);
  font-size: 12px;
}

.summary-list {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.summary-item {
  align-items: flex-start;
  display: grid;
  gap: 10px;
  grid-template-columns: 10px minmax(0, 1fr);
}

.summary-item__dot {
  background: #2b2b2b;
  border-radius: 999px;
  height: 10px;
  margin-top: 7px;
  width: 10px;
}

.summary-item p {
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
}

.chart-wrap {
  height: 360px;
  padding: 12px 16px 18px;
}

.layer-fallback {
  display: grid;
  gap: 12px;
  height: 100%;
  overflow: auto;
  padding: 6px 4px;
}

.layer-fallback__row {
  display: grid;
  gap: 8px;
  grid-template-columns: 150px minmax(0, 1fr);
}

.layer-fallback__row strong {
  align-self: center;
  font-size: 12px;
  line-height: 1.35;
}

.layer-fallback__bars {
  display: grid;
  gap: 5px;
}

.bar {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 32px minmax(0, 1fr) 70px;
}

.bar em,
.bar i {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.bar b {
  background: #999999;
  border-radius: 999px;
  display: block;
  height: 9px;
  width: var(--bar-width);
}

.bar--pos b {
  background: #0f766e;
}

.bar--neg b {
  background: #b91c1c;
}

.bar--pos i {
  color: #0f766e;
}

.bar--neg i {
  color: #b91c1c;
}

.content__report {
  background: #ffffff;
  border-radius: 14px;
}

.report-content {
  padding: 30px 34px 42px;
}

.report-content h1:first-child {
  margin-top: 0;
}

.report-content h1 {
  font-size: clamp(30px, 2.8vw, 42px);
  line-height: 1.18;
  margin: 0 0 24px;
}

.report-content h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 34px 0 14px;
}

.report-content h3 {
  font-size: 18px;
  line-height: 1.35;
  margin: 26px 0 10px;
}

.report-content p {
  margin: 10px 0;
}

.report-content ul,
.report-content ol {
  margin: 12px 0 18px;
  padding-left: 24px;
}

.report-content li {
  margin: 6px 0;
}

.report-content blockquote {
  border-left: 4px solid #111111;
  color: #444444;
  margin: 18px 0;
  padding: 10px 16px;
}

.report-content .table-wrap {
  margin: 16px 0 24px;
  overflow-x: auto;
}

.report-content table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

.report-content th,
.report-content td {
  border-bottom: 1px solid rgba(210, 210, 210, 0.72);
  font-size: 13px;
  line-height: 1.55;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.report-content th {
  background: #eeeeee;
  font-weight: 700;
  white-space: nowrap;
}

.report-content tr:nth-child(even) td {
  background: rgba(247, 247, 247, 0.68);
}

.report-content a {
  color: #111111;
}

.empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .drawer-toggle {
    left: 12px;
    top: 12px;
  }

  .drawer-backdrop {
    background: rgba(0, 0, 0, 0.28);
    display: block;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity var(--backdrop-motion);
    z-index: 30;
  }

  body.drawer-open {
    overflow: hidden;
  }

  body.drawer-open .drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    border-bottom: 0;
    box-shadow: none;
    height: 100dvh;
    left: 0;
    max-width: 86vw;
    padding-top: 66px;
    position: fixed;
    top: 0;
    transform: translateX(-104%);
    width: var(--sidebar-width);
    z-index: 40;
  }

  body.drawer-open .sidebar {
    box-shadow: 22px 0 42px rgba(0, 0, 0, 0.16);
    transform: translateX(0);
  }

  .content {
    border-left: 0;
    border-radius: 0;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 68px 12px 18px;
  }

  .overview__cards,
  .overview__grid {
    grid-template-columns: 1fr;
  }

  .report-content {
    padding: 22px 18px 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell,
  .sidebar,
  .drawer-backdrop,
  .report-link {
    transition: none;
  }
}
