:root {
  --background: #ffffff;
  --surface: #f7f7f7;
  --surface-strong: #efefef;
  --foreground: #242426;
  --muted: #6b6b70;
  --border: #e8e7e3;
  --brand: #4f66d9;
  --brand-hover: #4055c2;
  --on-brand: #ffffff;
  --card: #ffffff;
  --card-muted: #f7f7f7;
  --paper: #f5f1e7;
  --code: #202025;
  --shadow-soft: 0 2px 10px rgb(24 24 28 / 6%);
  --shadow-card: 0 16px 45px rgb(24 24 28 / 9%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-card: 22px;
  --radius-panel: 30px;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI",
    Helvetica, Arial, "Apple Color Emoji", sans-serif;
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

.dark {
  --background: #242428;
  --surface: #2d2d32;
  --surface-strong: #39393f;
  --foreground: #f5f5f2;
  --muted: #aaa9ad;
  --border: #414147;
  --brand: #8292ec;
  --brand-hover: #95a3f3;
  --on-brand: #17171a;
  --card: #2d2d32;
  --card-muted: #29292d;
  --paper: #303034;
  --code: #17171a;
  --shadow-soft: 0 2px 12px rgb(0 0 0 / 20%);
  --shadow-card: 0 18px 48px rgb(0 0 0 / 28%);
  color-scheme: dark;
}

:lang(zh) {
  --font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-serif: var(--font-sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--brand);
  color: #fff;
}

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

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

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

h1,
h2 {
  font-family: var(--font-serif);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 70%, white);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: min(calc(100vw - 40px), 1200px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: 14px;
  z-index: 100;
  transform: translateY(-140%);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--foreground);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--brand);
  color: var(--on-brand);
}

.button--primary:hover {
  background: var(--brand-hover);
}

.button--ghost {
  border-color: var(--border);
  background: color-mix(in srgb, var(--background) 84%, transparent);
}

.button--ghost:hover {
  border-color: var(--foreground);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--background) 86%, transparent);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: grid;
  min-height: 64px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.wordmark__mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  overflow: hidden;
  border-radius: 8px;
  background: #17171a;
}

.wordmark__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.site-nav a {
  transition: color 160ms ease;
}

.site-nav a:hover {
  color: var(--foreground);
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.language-switcher {
  position: relative;
}

.language-switcher summary::-webkit-details-marker {
  display: none;
}

.icon-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: color-mix(in srgb, var(--background) 72%, transparent);
  color: var(--foreground);
  list-style: none;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.icon-button:hover {
  border-color: color-mix(in srgb, var(--foreground) 28%, var(--border));
  background: var(--surface);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.theme-toggle__sun {
  display: none;
}

.dark .theme-toggle__moon {
  display: none;
}

.dark .theme-toggle__sun {
  display: block;
}

.language-switcher__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: 170px;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background);
  box-shadow: var(--shadow-card);
}

.language-switcher__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
}

.language-switcher__menu a:hover,
.language-switcher__menu a.is-active {
  background: var(--surface);
  color: var(--foreground);
}

.language-switcher__menu a span:last-child {
  color: var(--brand);
  font-size: 8px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 0;
  border-bottom: 1px solid var(--border);
}

.hero__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 18%, color-mix(in srgb, var(--brand) 13%, transparent), transparent 32%),
    linear-gradient(to bottom, color-mix(in srgb, var(--paper) 62%, var(--background)), var(--background));
  pointer-events: none;
}

.hero__wash::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--foreground) 10%, transparent) 0.8px, transparent 0.8px);
  background-size: 18px 18px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.78fr);
  align-items: center;
  gap: 72px;
}

.hero__inner > *,
.note-hero__grid > *,
.section-heading--split > *,
.method-grid > *,
.site-footer__panel > * {
  min-width: 0;
}

.hero__copy {
  padding-bottom: 54px;
}

.hero h1 {
  max-width: 830px;
  margin-bottom: 22px;
  font-size: clamp(44px, 6.2vw, 76px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

:lang(zh) .hero h1 {
  letter-spacing: 0;
}

.hero h1 em {
  color: var(--brand);
  font-weight: 400;
  font-style: normal;
}

.hero__description {
  max-width: 650px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 390px;
  overflow: hidden;
  padding: 34px 34px 30px;
  border: 1px solid rgb(31 31 33 / 18%);
  border-radius: 4px;
  background: #fffdf7;
  color: #252527;
  box-shadow:
    0 30px 70px rgb(35 31 22 / 16%),
    0 3px 0 rgb(0 0 0 / 7%);
  rotate: 2.2deg;
}

.hero-note::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgb(29 29 31 / 10%);
  content: "";
  pointer-events: none;
}

.hero-note__tape {
  position: absolute;
  z-index: 1;
  top: -17px;
  left: 50%;
  width: 116px;
  height: 37px;
  background: rgb(229 240 130 / 75%);
  box-shadow: 0 2px 5px rgb(0 0 0 / 8%);
  rotate: -3deg;
  translate: -50% 0;
}

.hero-note__header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid #bbb8ae;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.hero-note__scribble {
  max-width: 100%;
  margin: 25px 0 20px;
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 30px;
  font-style: italic;
  line-height: 1.2;
  overflow-wrap: anywhere;
  rotate: -1deg;
}

:lang(zh) .hero-note__scribble {
  font-style: normal;
}

.hero-note ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-note li {
  display: grid;
  grid-template-columns: 31px 1fr;
  align-items: start;
  gap: 10px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.hero-note li span {
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  border: 1px solid #2c2c2e;
  border-radius: 50%;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.hero-note__stamp {
  width: fit-content;
  margin: 28px 0 0 auto;
  padding: 7px 10px;
  border: 2px solid #d55b45;
  color: #d55b45;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  rotate: -2deg;
}

.section {
  padding: 72px 0 76px;
}

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

.section-heading h2,
.method-intro h2 {
  margin-bottom: 14px;
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.18;
}

:lang(zh) .section-heading h2,
:lang(zh) .method-intro h2 {
  letter-spacing: 0;
}

.section-heading > p:last-child,
.method-intro > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.section-heading--split {
  display: grid;
  max-width: none;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: end;
  gap: 48px;
}

.section-heading--split h2 {
  margin-bottom: 0;
}

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

.note-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.note-card {
  --card-color: var(--card);
  align-self: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--foreground) 11%, transparent);
  border-radius: var(--radius-card);
  background: var(--card-color);
  color: var(--foreground);
  box-shadow: var(--shadow-soft);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.note-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-5px);
}

.note-card--default {
  --card-color: var(--card);
}

.note-card__link {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 22px;
}

.note-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--foreground) 18%, transparent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.note-card__media {
  display: grid;
  min-height: 0;
  aspect-ratio: 2.35 / 1;
  margin: 16px 0 0;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  overflow: hidden;
}

.note-card:not(.note-card--with-category) .note-card__media {
  margin-top: 0;
}

.note-card__media img {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: contain;
}

.note-card__body {
  flex: 1;
  padding: 20px 0 18px;
}

.note-card__body h3 {
  margin-bottom: 10px;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.28;
}

:lang(zh) .note-card__body h3 {
  font-family: var(--font-sans);
  font-weight: 800;
}

.note-card__body p {
  max-width: 560px;
  margin-bottom: 0;
  color: color-mix(in srgb, var(--foreground) 73%, transparent);
  font-size: 15px;
  line-height: 1.6;
}

.note-card__meta {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  margin-top: 0;
  font-size: 12px;
  font-weight: 700;
}

.note-card__meta > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: color-mix(in srgb, var(--foreground) 65%, transparent);
}

.note-card__meta strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  white-space: nowrap;
}

.section--library {
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.section--library .note-card {
  --card-color: var(--card-muted);
}

.series-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 38px;
}

.series-index a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.series-index a:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}

.series-index small {
  color: var(--brand);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.series-block {
  margin: 0 0 50px;
}

.series-block:last-child {
  margin-bottom: 0;
}

.series-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--foreground);
}

.series-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.series-heading span {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 13px;
}

.section--method {
  overflow: hidden;
  background: var(--paper);
}

.method-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1.1fr);
  align-items: start;
  gap: 64px;
}

.method-intro {
  position: sticky;
  top: 120px;
}

.method-intro > p {
  max-width: 490px;
}

.method-orbit {
  position: relative;
  display: flex;
  width: 260px;
  height: 160px;
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
  padding: 0 20px;
}

.method-orbit::before,
.method-orbit::after {
  position: absolute;
  inset: 15px;
  border: 1px solid color-mix(in srgb, var(--foreground) 22%, transparent);
  border-radius: 50%;
  content: "";
  rotate: -12deg;
}

.method-orbit::after {
  inset: 38px 0;
  border-color: color-mix(in srgb, var(--brand) 48%, transparent);
  rotate: 18deg;
}

.method-orbit span {
  position: relative;
  z-index: 1;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.method-orbit strong {
  position: relative;
  z-index: 1;
  display: flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-family: var(--font-serif);
  font-size: 24px;
}

.method-steps {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.method-steps li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--border);
}

.method-steps li > span {
  padding-top: 3px;
  color: var(--brand);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
}

.method-steps h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.method-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.note-hero {
  --note-color: var(--paper);
  padding: 46px 0 50px;
  border-bottom: 1px solid color-mix(in srgb, var(--foreground) 13%, transparent);
  background:
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--background) 45%, transparent), transparent 28%),
    var(--note-color);
}

.note-hero--default {
  --note-color: var(--paper);
}

.note-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: end;
  gap: 64px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  font-size: 13px;
  font-weight: 750;
}

.series {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.note-hero h1 {
  max-width: 920px;
  margin: 0 0 24px;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.052em;
  line-height: 1.12;
}

:lang(zh) .note-hero h1 {
  letter-spacing: 0;
}

.note-hero p:not(.series) {
  max-width: 760px;
  margin: 0;
  font-size: 19px;
  line-height: 1.72;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.article-meta a {
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--foreground) 20%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--foreground) 72%, transparent);
  font-size: 12px;
  font-weight: 700;
}

.note-hero__card {
  position: relative;
  display: grid;
  min-height: 250px;
  align-content: end;
  padding: 26px;
  border: 1px solid color-mix(in srgb, var(--foreground) 18%, transparent);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--background) 35%, transparent);
  box-shadow: var(--shadow-soft);
}

.note-hero__card::before {
  position: absolute;
  inset: 14px;
  border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
  border-radius: 16px;
  content: "";
}

.note-hero__card span,
.note-hero__card small {
  position: relative;
  color: color-mix(in srgb, var(--foreground) 68%, transparent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-hero__card strong {
  position: relative;
  margin-top: 24px;
  font-family: var(--font-serif);
  font-size: 92px;
  line-height: 0.9;
}

.translation-note {
  width: min(calc(100vw - 40px), 760px);
  margin: 28px auto 0;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  padding: 44px 0 72px;
}

.article-content {
  min-width: 0;
  color: var(--foreground);
  font-size: 17px;
  line-height: 1.86;
}

.article-content h1 {
  display: none;
}

.article-content h2 {
  margin: 42px 0 14px;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.3;
}

.article-content h3 {
  margin: 28px 0 10px;
  font-size: 22px;
  line-height: 1.35;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
  max-width: 68ch;
}

.article-content p {
  margin: 0 0 16px;
}

.article-content a {
  color: color-mix(in srgb, var(--brand) 82%, var(--foreground));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

.article-content ul,
.article-content ol {
  padding-left: 1.25em;
}

.article-content li {
  margin: 8px 0;
}

.article-content blockquote {
  margin: 22px 0;
  padding: 15px 18px;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  color: var(--muted);
}

.article-content code {
  padding: 0.14em 0.34em;
  border-radius: 5px;
  background: var(--surface-strong);
  color: var(--foreground);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.9em;
}

.article-content pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 22px 0;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--code);
  color: #f3f1e8;
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-content img {
  width: 100%;
  height: auto;
  margin: 28px auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--background);
  box-shadow: var(--shadow-soft);
  object-fit: contain;
}

.related-notes {
  padding: 54px 0 58px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.related-notes__heading {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.related-notes__heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.related-notes__heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
}

.related-notes__all {
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.site-footer {
  padding: 36px 0 24px;
}

.site-footer__panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 52px;
  padding: 38px;
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.wordmark--footer {
  margin-bottom: 22px;
}

.site-footer__panel p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 30px;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-links strong {
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a {
  padding: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--foreground);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 5px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

@media (max-width: 1060px) {
  .hero__inner,
  .section-heading--split,
  .method-grid,
  .note-hero__grid,
  .site-footer__panel {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    padding-bottom: 10px;
  }

  .hero-note {
    margin-bottom: 44px;
  }

  .note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-intro {
    position: relative;
    top: auto;
  }

  .note-hero__card {
    display: none;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100vw - 28px), 1200px);
  }

  .site-header {
    position: relative;
  }

  .site-header__inner {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 0;
  }

  .site-nav {
    display: none;
  }

  .site-header__actions {
    position: static;
  }

  .hero {
    padding-top: 40px;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 58px);
    overflow-wrap: anywhere;
  }

  .hero__description {
    font-size: 17px;
    line-height: 1.68;
  }

  .hero-note {
    min-height: 340px;
    padding: 28px 24px 24px;
    rotate: 0deg;
  }

  .hero-note__scribble {
    font-size: 24px;
    line-height: 1.22;
  }

  .hero-note__header {
    gap: 12px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .section {
    padding: 50px 0 54px;
  }

  .section-heading,
  .section-heading--split {
    margin-bottom: 26px;
  }

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

  .note-card__link {
    min-height: auto;
    padding: 18px;
  }

  .note-card__media {
    min-height: 0;
  }

  .note-card__meta {
    flex-wrap: wrap;
  }

  .note-card__meta strong {
    width: 100%;
    margin-left: 0;
  }

  .method-grid {
    gap: 40px;
  }

  .method-orbit {
    display: none;
  }

  .method-steps li {
    grid-template-columns: 42px 1fr;
  }

  .note-hero {
    padding: 32px 0 36px;
  }

  .back-link {
    margin-bottom: 34px;
  }

  .note-hero h1 {
    font-size: clamp(34px, 10vw, 46px);
    line-height: 1.15;
  }

  .note-hero p:not(.series) {
    font-size: 17px;
    line-height: 1.65;
  }

  .article-shell {
    padding: 32px 0 54px;
  }

  .article-content {
    font-size: 17px;
    line-height: 1.8;
  }

  .article-content h2 {
    margin-top: 44px;
  }

  .site-footer__panel {
    gap: 32px;
    padding: 24px;
    border-radius: 22px;
  }

  .related-notes {
    padding: 44px 0 48px;
  }

  .related-notes__heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .related-notes__heading .eyebrow {
    grid-column: auto;
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: 4px;
  }
}

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