/* ============================================================
   前沿切片 · Frontier Slice
   配色：暖纸底 + 墨色字 + 学科色
   ============================================================ */

:root {
  --bg: #f7f4ed;
  --bg-deep: #efe9dd;
  --surface: #fffdf8;
  --surface-2: #faf7f0;
  --ink: #191712;
  --ink-2: #3d3931;
  --muted: #7d766a;
  --faint: #a79f90;
  --line: #e6dfd1;
  --line-strong: #d3c9b6;

  --chip: #3d6be5;
  --math: #7c5ce0;
  --physics: #df6435;
  --chem: #149c78;
  --bio: #d1467a;

  --radius: 16px;
  --radius-sm: 10px;
  --shell: 1120px;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", "Noto Serif SC", serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(40, 33, 20, 0.04), 0 4px 14px rgba(40, 33, 20, 0.04);
  --shadow-md: 0 2px 4px rgba(40, 33, 20, 0.05), 0 18px 40px -18px rgba(40, 33, 20, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(90, 78, 58, 0.055) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #ffe6a8;
  color: #191712;
}

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

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 32px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 237, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ink);
  overflow: hidden;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: -2px;
  width: 30px;
  height: 6px;
  transform: rotate(-28deg);
  background: #f7f4ed;
}
.brand-mark::before {
  top: 6px;
}
.brand-mark::after {
  top: 17px;
  background: var(--chem);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-text em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-link:hover {
  background: rgba(25, 23, 18, 0.06);
}
.nav-link[aria-current="page"] {
  background: var(--ink);
  color: #fbf8f1;
}

.nav-link .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--c, var(--ink));
  vertical-align: 2px;
  opacity: 0.85;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.ghost-btn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.ghost-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.ghost-btn .count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ghost-btn[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.ghost-btn[aria-current="page"] .count {
  background: #fff;
  color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  padding: 48px 0 26px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chem);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--chem);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.hero h1 {
  margin: 0;
  max-width: 15em;
  font-size: clamp(33px, 4.4vw, 50px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.hero h1 mark {
  background: linear-gradient(transparent 86%, rgba(20, 156, 120, 0.34) 86%);
  color: inherit;
  padding: 0 2px;
}

.hero-lede {
  max-width: 44em;
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: 16.5px;
}

.hero-stats {
  display: flex;
  gap: 38px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stats strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero-stats span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 254px;
  gap: 60px;
  align-items: start;
  padding-bottom: 90px;
}

.layout--single {
  display: block;
  max-width: 780px;
  margin: 0 auto;
}

.page-head {
  padding: 44px 0 8px;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.page-head .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  margin-right: 12px;
  vertical-align: 4px;
}
.page-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- Toolbar ---------- */

.toolbar {
  position: sticky;
  top: 66px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  background: var(--bg);
  margin-bottom: 6px;
}

.search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--faint);
  fill: none;
  stroke-width: 1.8;
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 42px;
  padding: 0 74px 0 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search input::placeholder {
  color: var(--faint);
}
.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.search input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(25, 23, 18, 0.07);
}
.search kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--surface-2);
}

.sort {
  position: relative;
  flex: none;
}
.sort select {
  appearance: none;
  height: 42px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.sort::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.feed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 14px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.feed-meta .clear {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Cards ---------- */

.feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  position: relative;
  padding: 26px 28px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--c, var(--ink));
  opacity: 0;
  transition: opacity 0.22s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card:hover::before {
  opacity: 1;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card-head > * {
  flex: none;
}
.card-head .tag,
.card-head time {
  white-space: nowrap;
}
.card-head .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c, var(--ink));
  background: color-mix(in srgb, var(--c, var(--ink)) 10%, transparent);
}

.pick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--c, var(--chem));
}

.star {
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--faint);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.star:hover {
  background: rgba(25, 23, 18, 0.06);
  color: var(--ink);
}
.star:active {
  transform: scale(0.9);
}
.star svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.star[aria-pressed="true"] {
  color: #e0a11b;
}
.star[aria-pressed="true"] svg {
  fill: currentColor;
}

.card-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.card-title a {
  background-image: linear-gradient(var(--c, var(--ink)), var(--c, var(--ink)));
  background-size: 0 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.28s ease, color 0.2s ease;
}
.card:hover .card-title a {
  background-size: 100% 1.5px;
}

.card-en {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 12.5px;
  font-style: italic;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-one {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.75;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pill-list li {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
}

.card-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}
.card-more .arrow {
  transition: transform 0.2s ease;
}
.card:hover .card-more .arrow {
  transform: translateX(3px);
}

.card--pick {
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c) 7%, transparent) 0%, transparent 55%),
    var(--surface);
  border-color: color-mix(in srgb, var(--c) 22%, var(--line));
}

.difficulty {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.difficulty i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}
.difficulty i.on {
  background: var(--c, var(--ink));
}

/* ---------- Aside ---------- */

.aside {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 60px;
}

.panel {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.panel h2 {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.count-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.count-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.16s ease;
}
.count-list a:hover {
  background: var(--surface-2);
}
.count-list .swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}
.count-list .num {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tips li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
}
.tips .n {
  font-family: var(--serif);
  font-style: italic;
  color: var(--faint);
}

.aside-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.75;
}

/* ---------- Detail ---------- */

.paper {
  padding: 30px 0 100px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 30px;
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.18s ease, gap 0.18s ease;
}
.back:hover {
  color: var(--ink);
  gap: 11px;
}
.back svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.paper h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 700;
  text-wrap: balance;
}

.paper-en {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.lede {
  position: relative;
  margin: 34px 0 0;
  padding: 26px 28px 26px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--ink);
}
.lede::before {
  content: "一句话";
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--c);
  font-weight: 600;
}

.why {
  margin: 22px 0 0;
  padding: 20px 24px;
  background: color-mix(in srgb, var(--c) 5%, var(--surface));
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-2);
}
.why b {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--c);
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink-2);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.btn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.btn--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fbf8f1;
}
.btn--dark:hover {
  background: #000;
}
.btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.paper-section {
  margin-top: 44px;
}
.paper-section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 19px;
  letter-spacing: 0.01em;
}
.paper-section h2 .n {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  color: var(--c);
}
.paper-section p {
  margin: 0;
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-2);
}

.analogy {
  margin-top: 44px;
  padding: 26px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.analogy h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 600;
}
.analogy p {
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-2);
}

.terms {
  margin-top: 44px;
}
.terms h2 {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 600;
}
.terms dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}
.terms .term {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.terms dl > .term:last-child:nth-child(odd) {
  grid-column: span 2;
}
.terms dt {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 5px;
  color: var(--ink);
}
.terms dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.abstract-box {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.abstract-box summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  list-style: none;
}
.abstract-box summary::-webkit-details-marker {
  display: none;
}
.abstract-box summary::before {
  content: "＋ ";
  font-family: var(--mono);
}
.abstract-box[open] summary::before {
  content: "－ ";
}
.abstract-box .en-abs {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.disclaimer {
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.8;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
}
.pager a {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.pager a:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.pager span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 5px;
}
.pager strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pager .next {
  text-align: right;
}

/* ---------- Empty / About ---------- */

.empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.empty p {
  margin: 0 0 6px;
  font-size: 15px;
}
.empty .hint {
  font-size: 13px;
  color: var(--faint);
}

.about {
  padding: 30px 0 100px;
  max-width: 700px;
  margin: 0 auto;
}
.about h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 10px;
}
.about .lead {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 0 36px;
}
.about h2 {
  margin: 38px 0 12px;
  font-size: 18px;
}
.about p {
  margin: 0 0 14px;
  color: var(--ink-2);
  line-height: 1.9;
}
.about code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}
.about ol {
  padding-left: 20px;
  color: var(--ink-2);
  line-height: 1.9;
}
.about ol li {
  margin-bottom: 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 46px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.footer-brand {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.footer-brand span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 12px;
  color: var(--faint);
  margin-left: 8px;
}
.footer-note {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--faint);
}
.footer-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--ink);
}

/* ---------- Motion ---------- */

.view {
  animation: rise 0.34s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .aside {
    display: none;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 0 20px;
  }
  .site-header {
    position: static;
  }
  .header-inner {
    height: auto;
    padding: 10px 0 0;
    gap: 14px;
    flex-wrap: wrap;
  }
  .brand-text em {
    display: none;
  }
  .main-nav {
    order: 3;
    flex-basis: 100%;
    margin: 0 -20px 0;
    padding: 4px 20px 10px;
    mask-image: linear-gradient(90deg, #000 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent 100%);
  }
  .nav-link {
    padding: 6px 11px;
    font-size: 13.5px;
  }
  .header-tools {
    margin-left: auto;
  }
  .ghost-btn span:not(.count) {
    display: none;
  }
  .toolbar {
    top: 0;
    padding: 12px 0;
  }
  .hero {
    padding: 30px 0 18px;
  }
  .hero-lede {
    font-size: 15.5px;
  }
  .hero-stats {
    gap: 26px;
    margin-top: 24px;
  }
  .hero-stats strong {
    font-size: 22px;
  }
  .card {
    padding: 20px 18px 16px;
  }
  .card-head {
    gap: 8px;
  }
  .card-head .difficulty,
  .feed-meta > span:last-child:not(:first-child) {
    display: none;
  }
  .card-title {
    font-size: 19px;
  }
  .card-one {
    font-size: 14.5px;
  }
  .card-foot {
    flex-wrap: wrap;
  }
  .card-more {
    margin-left: 0;
  }
  .terms dl {
    grid-template-columns: 1fr;
  }
  .terms dl > .term:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .paper h1 {
    font-size: 27px;
  }
  .lede {
    padding: 22px;
    font-size: 16px;
  }
  .paper-section p {
    font-size: 15.5px;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager .next {
    text-align: left;
  }
  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .search kbd {
    display: none;
  }
  .search input {
    padding-right: 16px;
  }
}
