:root {
  color-scheme: light;
  --page: #f4f5f7;
  --paper: #ffffff;
  --ink: #171a1f;
  --soft-ink: #3f4652;
  --muted: #737b88;
  --line: #e4e7ec;
  --line-strong: #cfd5df;
  --accent: #2457d6;
  --accent-ink: #173ea5;
  --warm: #b35a24;
  --quote-bg: #f7f8fa;
  --mark: rgba(255, 214, 102, 0.34);
  --shadow: 0 22px 70px rgba(19, 29, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(36, 87, 214, 0.08), transparent 34rem),
    linear-gradient(180deg, #fbfcfe 0%, var(--page) 38rem);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.82;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

nav {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 13px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

nav a {
  color: var(--soft-ink);
  text-decoration: none;
  font-size: 14px;
  margin-left: 18px;
}

nav a:hover {
  color: var(--accent);
}

.brand {
  color: var(--ink);
  font-weight: 800;
  margin-left: 0;
}

main {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 22px 80px;
}

.hero {
  min-height: 70vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 8px;
  background-image: url("notes/1912868579112712840/assets/class-images/03-003_aJR6Tk-01.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 21, 0.86), rgba(10, 14, 21, 0.48) 46%, rgba(10, 14, 21, 0.08)),
    linear-gradient(0deg, rgba(10, 14, 21, 0.62), transparent 42%);
}

.hero-copy {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 780px;
  padding: clamp(30px, 6vw, 72px);
  color: #fff;
}

.meta {
  color: #ffd87a;
  font-weight: 800;
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(44px, 7.5vw, 84px);
  line-height: 1;
  letter-spacing: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.lead {
  width: 100%;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2.2vw, 22px);
  margin: 26px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  text-decoration: none;
  font-weight: 750;
}

.button.primary {
  background: #fff;
  border-color: #fff;
  color: #10151c;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.08);
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-band div {
  background: var(--paper);
  padding: 18px 20px;
}

.summary-band span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 3px;
}

.summary-band strong {
  font-size: 17px;
  background: none;
}

.hub-section {
  margin-top: 44px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.note-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 14px 42px rgba(19, 29, 45, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.note-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(19, 29, 45, 0.1);
}

.note-card span {
  color: var(--warm);
  font-weight: 850;
  font-size: 14px;
}

.note-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.note-card p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 15px;
  line-height: 1.65;
}

.note-card small {
  color: var(--muted);
  font-size: 12px;
}

.article-hero {
  min-height: 48vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(12, 17, 25, 0.92), rgba(12, 17, 25, 0.76)),
    var(--hero-image, none),
    #151b24;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.article-hero-copy {
  width: 100%;
  min-width: 0;
  max-width: 860px;
  padding: clamp(28px, 5vw, 58px);
  color: #fff;
}

.article-hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5.8vw, 64px);
  line-height: 1.05;
}

.back-link {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  margin-bottom: 18px;
  font-size: 14px;
}

.back-link:hover {
  color: #fff;
}

.content {
  width: 100%;
  max-width: 880px;
  margin: 34px auto 0;
  background: var(--paper);
  padding: clamp(26px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 46px rgba(19, 29, 45, 0.06);
}

.source-content {
  max-width: 960px;
}

.source-content h2 {
  margin-top: 52px;
}

.source-content h3 {
  color: var(--accent-ink);
}

.source-content pre {
  white-space: pre-wrap;
}

.source-appendix {
  margin-top: 72px;
  padding-top: 10px;
}

.source-appendix > h2:first-child {
  margin-top: 0;
  border-top: 2px solid var(--accent);
}

.archive-content {
  max-width: 1020px;
}

.archive-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 18px 0 34px;
}

.archive-toc-item {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  text-decoration: none;
}

.archive-toc-item:hover {
  border-color: var(--line-strong);
}

.archive-toc-item span {
  color: var(--warm);
  font-size: 13px;
  font-weight: 850;
}

.archive-toc-item small {
  color: var(--muted);
  line-height: 1.55;
}

.archive-note {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.archive-note summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  cursor: pointer;
  padding: 18px 20px;
  background: #f7f8fa;
}

.archive-note summary span {
  grid-row: span 2;
  color: var(--warm);
  font-weight: 850;
}

.archive-note summary strong {
  background: none;
}

.archive-note summary small {
  color: var(--muted);
  font-size: 13px;
}

.archive-note-body {
  padding: 6px clamp(18px, 4vw, 38px) 34px;
}

.archive-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 8px;
}

.archive-note-meta a {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-ink);
  text-decoration: none;
  font-size: 14px;
}

.content h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
  color: var(--ink);
}

.content h2 {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: clamp(25px, 3.3vw, 34px);
  line-height: 1.28;
  color: #111827;
}

.content h3 {
  margin-top: 38px;
  font-size: 23px;
  line-height: 1.38;
  color: #202631;
}

.content h4 {
  font-size: 18px;
  color: var(--accent-ink);
}

.content p,
.content li {
  font-size: 17px;
  color: var(--soft-ink);
  overflow-wrap: anywhere;
}

.content p {
  margin: 14px 0;
}

.content ul {
  padding-left: 1.35em;
}

.content li + li {
  margin-top: 6px;
}

.content strong {
  color: #111827;
  font-weight: 800;
  background: linear-gradient(transparent 58%, var(--mark) 0);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.content blockquote {
  margin: 26px 0 30px;
  padding: 20px 24px;
  border-left: 5px solid #2d3748;
  background: var(--quote-bg);
  color: #293241;
  border-radius: 0 8px 8px 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.content blockquote p,
.content blockquote {
  font-size: 18px;
  line-height: 1.8;
}

.content blockquote p {
  margin: 0;
}

.content code {
  background: #f1f3f6;
  color: #1f2937;
  padding: 2px 5px;
  border-radius: 4px;
}

.content pre {
  overflow-x: auto;
  background: #121820;
  color: #edf4f8;
  padding: 20px;
  border-radius: 8px;
}

.table-wrap {
  overflow-x: auto;
  margin: 22px 0 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  font-size: 15px;
}

th {
  background: #f4f6f9;
  color: #111827;
}

td {
  color: #3f4652;
}

tr:last-child td {
  border-bottom: 0;
}

.material-single,
.material-cluster {
  margin: 24px 0 34px;
}

.material-cluster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.inline-material {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(19, 29, 45, 0.08);
}

.inline-material img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  background: #e9edf3;
}

.material-cluster .inline-material img {
  aspect-ratio: 4 / 3;
  max-height: none;
}

.inline-material figcaption {
  display: grid;
  gap: 4px;
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.inline-material figcaption strong {
  color: #111827;
  font-size: 15px;
  background: none;
}

.inline-material figcaption span {
  color: var(--muted);
}

@media (max-width: 820px) {
  nav {
    width: 100vw;
    max-width: 100vw;
    align-items: flex-start;
    flex-direction: column;
  }

  nav a {
    margin-left: 0;
    margin-right: 14px;
  }

  main {
    width: 100vw;
    max-width: 100vw;
    padding: 16px 14px 60px;
  }

  .hero {
    width: calc(100vw - 28px);
    min-height: 74vh;
    border-radius: 8px;
  }

  .hero-copy {
    padding: 28px 22px;
  }

  .hero-copy h1 {
    font-size: clamp(36px, 10.5vw, 42px);
    line-height: 1.08;
  }

  .lead {
    font-size: 16px;
    line-height: 1.78;
    max-width: 100%;
    word-break: break-all;
  }

  .summary-band {
    grid-template-columns: 1fr;
  }

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

  .note-card {
    min-height: 210px;
  }

  .article-hero {
    width: calc(100vw - 28px);
    min-height: 58vh;
    border-radius: 8px;
  }

  .article-hero-copy {
    padding: 28px 22px;
  }

  .article-hero-copy h1 {
    font-size: clamp(30px, 9.2vw, 42px);
    line-height: 1.1;
    max-width: 8.5em;
    word-break: break-all;
  }

  .article-hero-copy .lead {
    max-width: 18em;
  }

  .content {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    padding: 24px 18px;
    margin-top: 18px;
  }

  .content p,
  .content li {
    font-size: 16px;
  }

  .content h2 {
    margin-top: 46px;
  }
}
