:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --panel: #ffffff;
  --ink: #171717;
  --muted: #68645f;
  --line: #ded8ce;
  --red: #b8322a;
  --green: #177a58;
  --blue: #2557b8;
  --gold: #a06f20;
  --shadow: 0 18px 42px rgba(31, 25, 18, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, .94);
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  min-width: 76px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.nav a[aria-current="page"],
.nav a:hover {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.shell.narrow {
  width: min(860px, calc(100% - 40px));
}

.page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 34px;
}

.page-head.compact {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-strip div {
  padding: 14px 16px;
  border-left: 1px solid var(--line);
}

.stat-strip div:first-child {
  border-left: 0;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-strip strong,
.trade-result {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  line-height: 1.3;
}

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

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.side-panel h2 {
  margin-bottom: 14px;
  font-size: 16px;
}

.month-link,
.rule-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
}

.month-link:hover,
.rule-link:hover {
  background: #f1eee7;
  color: var(--ink);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.section-title span {
  color: var(--ink);
  font-weight: 800;
}

.record-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.record-date {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.record-date span {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.record-date small,
.record-meta,
.text-link {
  color: var(--muted);
  font-size: 13px;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.record-meta span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf7;
}

.record-body h2 {
  margin-bottom: 8px;
}

.record-body p {
  max-width: 720px;
  margin-bottom: 12px;
  color: var(--muted);
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

.article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.article section + section {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article p,
.article li {
  color: #36322d;
}

.article ul {
  margin: 0;
  padding-left: 20px;
}

.chart-image {
  display: block;
  width: 100%;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.trade-result {
  min-width: 148px;
  padding: 12px 16px;
  border: 1px solid rgba(184, 50, 42, .25);
  border-radius: 8px;
  background: #fff7f4;
  text-align: center;
  font-weight: 900;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.timeline span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.timeline p {
  margin-bottom: 0;
}

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

.check-grid div,
.callout,
.question-box {
  border-radius: 8px;
  background: #fbfaf7;
}

.check-grid div {
  min-height: 56px;
  padding: 14px;
  border: 1px solid var(--line);
  font-weight: 800;
}

.callout {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(160, 111, 32, .28);
  color: var(--gold);
  font-weight: 800;
}

.question-box {
  padding: 20px;
  border: 1px solid rgba(37, 87, 184, .24);
}

.question-box p:last-child,
.question-box ul:last-child {
  margin-bottom: 0;
}

.danger-list li::marker {
  color: var(--red);
}

@media (max-width: 820px) {
  .topbar {
    padding: 0 20px;
  }

  .page-head,
  .layout {
    grid-template-columns: 1fr;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .stat-strip div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .stat-strip div:first-child {
    border-top: 0;
  }

  .side-panel {
    position: static;
  }

  h1 {
    font-size: 30px;
  }
}

@media (max-width: 560px) {
  .shell,
  .shell.narrow {
    width: min(100% - 28px, 1120px);
    padding-top: 26px;
  }

  .topbar {
    min-height: 58px;
  }

  .nav a {
    min-width: 58px;
    padding: 7px 9px;
  }

  .record-card {
    grid-template-columns: 1fr;
  }

  .record-date {
    width: 86px;
  }

  .article {
    padding: 20px;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }
}
