:root {
  --bg: #0b0b0c;
  --ink: #f2f0ea;
  --muted: #9b968c;
  --rule: #2a2a2c;
  --mark: #e8b07a;
  --chip: #1a1a1d;
  --chip-line: #2e2e32;
  --nav: 248px;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}

.shell {
  display: grid;
  grid-template-columns: var(--nav) minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
}

nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 28px 16px 28px 22px;
  border-right: 1px solid var(--rule);
  overflow-y: auto;
}

nav .suite-link {
  display: inline-flex;
  align-items: center;
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px solid var(--mark);
  border-radius: 999px;
  color: var(--mark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

nav .suite-link:hover {
  background: rgba(232, 176, 122, 0.12);
  color: #f0c89a;
}

nav .nav-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mark);
  margin: 0 0 14px;
}

nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 10px;
  margin: 0 0 2px;
  border-radius: 8px;
}

nav a .nav-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

nav a .nav-en {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #6f6b63;
}

nav a .count {
  flex: none;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

nav a:hover { background: var(--chip); color: var(--ink); }

nav a.active {
  background: var(--ink);
  color: var(--bg);
}

nav a.active .nav-en {
  color: inherit;
  opacity: 0.62;
}

nav .nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 16px 10px 6px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

nav .nav-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

nav .nav-group .nav-zh {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mark);
}

nav .nav-group .nav-en {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  color: #6f6b63;
}

.group-head {
  scroll-margin-top: 20px;
  margin: 32px 0 0;
}

.group-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
  border-bottom: 0;
  padding-bottom: 0;
}

.group-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page {
  padding: 36px 48px 72px 48px;
}

header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.top-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--mark);
  border-radius: 999px;
  color: var(--mark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.top-links a:hover {
  background: rgba(232, 176, 122, 0.12);
  color: #f0c89a;
}

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mark);
  margin: 0 0 8px;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 52em;
}

section {
  scroll-margin-top: 20px;
  padding-top: 28px;
}

h2 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mark);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
}

ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--rule);
}

.num {
  font-size: 12px;
  font-weight: 700;
  color: var(--mark);
}

.say {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  margin: 0 0.35em 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mark);
  cursor: pointer;
  vertical-align: -0.22em;
  flex: 0 0 auto;
}

.say svg {
  width: 1em;
  height: 1em;
  display: block;
}

.say:hover { background: rgba(232, 176, 122, 0.16); }

.say.is-on {
  background: var(--mark);
  color: #1a120c;
}

.say.is-wait { opacity: 0.4; }

.en {
  margin: 6px 0 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

.en em {
  font-style: normal;
  font-weight: 700;
  text-decoration: underline dashed;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--mark);
}

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

.scale-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.scale span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 7.5rem;
  padding: 8px 12px;
  background: var(--chip);
  border: 1px solid var(--chip-line);
  border-radius: 8px;
  color: var(--ink);
}

.scale span b {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.scale span b .say { margin: 0; }

.scale span small {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.scale .arrow {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  color: #5a5750;
  font-weight: 400;
}

.extra {
  margin: 18px 0 8px;
  padding: 14px 16px 12px;
  background: #17140f;
  border: 1px solid #3d3428;
  border-left: 4px solid var(--mark);
  border-radius: 10px;
}

.extra-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.extra-head b {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mark);
}

.extra-head span {
  font-size: 12px;
  font-weight: 500;
  color: #a89880;
}

.extra-list {
  display: flex;
  flex-direction: column;
}

.extra-list span {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid #2c261e;
}

.extra-list b {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  color: #f6eadc;
}

.extra-list b .say { margin: 0; }

.extra-list small {
  font-size: 12px;
  font-weight: 500;
  color: #b7a48c;
}

.zh .note,
.scale span small .note,
.extra-list small .note {
  color: #8eb8c9;
}

footer {
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}

/* Mobile chrome (top bar / chapter sheet / player dock) lives in theme_learn.css @ 720px.
   Keep page-01 desktop shell; only soften padding below the shared breakpoint. */
@media (max-width: 720px) {
  .page { padding: 6px 10px 12px; }
  header .top-links { display: none; }
}
