:root {
  color-scheme: light;
  --paper: #f8fbff;
  --paper-strong: #ffffff;
  --ink: #0a1020;
  --muted: #5b6678;
  --line: rgba(10, 16, 32, 0.12);
  --line-strong: rgba(10, 16, 32, 0.22);
  --teal: #1db9ab;
  --blue: #2d6cdf;
  --amber: #ffb84d;
  --coral: #ff6f61;
  --shadow: 0 24px 70px rgba(19, 44, 72, 0.12);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

a,
button {
  -webkit-tap-highlight-color: transparent !important;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(10, 16, 32, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(10, 16, 32, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #f9fcff 0%, #eef9f6 48%, #fffaf1 100%);
  background-size: 44px 44px, 44px 44px, auto;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 16px 42px;
  border-bottom: 1px solid rgba(10, 16, 32, 0.08);
  background: rgba(248, 251, 255, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 9px;
  background: linear-gradient(135deg, #18c9b8 0%, #0a9289 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -12px 20px rgba(4, 66, 70, 0.2);
  color: #ffffff;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 1.78rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  user-select: none;
}

.brand-name {
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.brand:focus-visible {
  outline: 3px solid rgba(45, 108, 223, 0.36);
  outline-offset: 6px;
}

.site-nav,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-nav a,
.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"],
.footer-links a:hover,
.footer-links a:focus-visible,
.footer-links a[aria-current="page"] {
  color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  border-color: rgba(45, 108, 223, 0.34);
  color: var(--blue);
}

.menu-toggle:focus-visible {
  outline: 3px solid rgba(45, 108, 223, 0.28);
  outline-offset: 3px;
}

.menu-toggle:active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.theme-toggle *,
.menu-toggle * {
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(45, 108, 223, 0.34);
  color: var(--blue);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(45, 108, 223, 0.28);
  outline-offset: 3px;
}

.theme-toggle:active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(10, 16, 32, 0.1);
  box-shadow: inset 0 0 0 1px rgba(10, 16, 32, 0.08);
}

.theme-toggle-thumb {
  position: absolute;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #e8eff8);
  box-shadow: 0 2px 8px rgba(10, 16, 32, 0.18);
  transition: transform 180ms ease;
}

.theme-toggle-text {
  min-width: 35px;
  text-align: left;
}

.site-nav .theme-toggle {
  display: none;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1728;
  --paper-strong: #0b1220;
  --ink: #f5f8ff;
  --muted: #b8c3d6;
  --line: rgba(226, 232, 240, 0.15);
  --line-strong: rgba(226, 232, 240, 0.24);
  --teal: #31d5c6;
  --blue: #8fb4ff;
  --amber: #ffd37a;
  --coral: #ff8f82;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] body {
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(226, 232, 240, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #07101f 0%, #0c1d22 48%, #151221 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

html[data-theme="dark"] .site-header {
  border-bottom-color: rgba(226, 232, 240, 0.09);
  background: rgba(7, 12, 23, 0.78);
}

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.76);
}

html[data-theme="dark"] .theme-toggle:active {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.76);
  color: var(--muted);
}

html[data-theme="dark"] .menu-toggle {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.76);
}

html[data-theme="dark"] .menu-toggle:active {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.76);
  color: var(--ink);
}

html[data-theme="dark"] .theme-toggle-track {
  background: rgba(226, 232, 240, 0.14);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.18);
}

html[data-theme="dark"] .theme-toggle-thumb {
  background: linear-gradient(135deg, #f5f8ff, #8fb4ff);
  transform: translateX(16px);
}

html[data-theme="dark"] .hero {
  background:
    linear-gradient(115deg, rgba(7, 12, 23, 0.98) 0%, rgba(7, 12, 23, 0.9) 42%, rgba(10, 29, 34, 0.72) 100%),
    linear-gradient(35deg, rgba(255, 211, 122, 0.1), transparent 46%),
    linear-gradient(145deg, transparent 0%, rgba(143, 180, 255, 0.1) 100%);
}

html[data-theme="dark"] .hero::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.34;
}

html[data-theme="dark"] .hero::after {
  background:
    linear-gradient(90deg, rgba(255, 143, 130, 0.12), transparent 28%),
    linear-gradient(0deg, rgba(49, 213, 198, 0.13), transparent 34%);
  mix-blend-mode: screen;
}

html[data-theme="dark"] .hero-copy,
html[data-theme="dark"] .post-feature-copy,
html[data-theme="dark"] .page-hero p:not(.eyebrow),
html[data-theme="dark"] .article-deck {
  color: #d7dfec;
}

html[data-theme="dark"] .topic-strip span,
html[data-theme="dark"] .signal-dock span,
html[data-theme="dark"] .article-meta span,
html[data-theme="dark"] .toc a {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.74);
  color: #d7dfec;
}

html[data-theme="dark"] .intro,
html[data-theme="dark"] .latest-post-section {
  border-top-color: rgba(226, 232, 240, 0.08);
  background: var(--paper-strong);
}

html[data-theme="dark"] .post-feature,
html[data-theme="dark"] .principle-grid article,
html[data-theme="dark"] .text-block,
html[data-theme="dark"] .policy-meta,
html[data-theme="dark"] .contact-notes,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .article-section,
html[data-theme="dark"] .formula-grid div,
html[data-theme="dark"] .mistake-grid div,
html[data-theme="dark"] .example-list article,
html[data-theme="dark"] .faq-list details {
  border-color: rgba(226, 232, 240, 0.14);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(12, 18, 31, 0.94)),
    linear-gradient(115deg, rgba(49, 213, 198, 0.08), rgba(143, 180, 255, 0.08));
}

html[data-theme="dark"] .quick-answer {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(10, 31, 36, 0.88)),
    linear-gradient(120deg, rgba(49, 213, 198, 0.11), rgba(255, 211, 122, 0.08));
}

html[data-theme="dark"] .prompt-box,
html[data-theme="dark"] .signal-note {
  border-color: rgba(49, 213, 198, 0.25);
  background: rgba(7, 12, 23, 0.68);
}

html[data-theme="dark"] .prompt-box p,
html[data-theme="dark"] .signal-note,
html[data-theme="dark"] .toc a,
html[data-theme="dark"] .faq-list summary {
  color: #e7edf8;
}

html[data-theme="dark"] .muted-box {
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(226, 232, 240, 0.045);
}

html[data-theme="dark"] .site-footer {
  border-top-color: rgba(226, 232, 240, 0.1);
  background:
    linear-gradient(180deg, rgba(9, 16, 29, 0.98), rgba(7, 13, 25, 1)),
    #070d19;
  color: #aeb9ca;
}

html[data-theme="dark"] .text-link,
html[data-theme="dark"] .sources-card a {
  color: var(--blue);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 82svh;
  padding: 124px 42px 86px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.86) 42%, rgba(238, 249, 246, 0.55) 100%),
    linear-gradient(35deg, rgba(255, 184, 77, 0.13), transparent 46%),
    linear-gradient(145deg, transparent 0%, rgba(45, 108, 223, 0.09) 100%);
}

.hero::before,
.hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(10, 16, 32, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(10, 16, 32, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 88%, transparent 100%);
  opacity: 0.45;
}

.hero::after {
  background:
    linear-gradient(90deg, rgba(255, 111, 97, 0.14), transparent 28%),
    linear-gradient(0deg, rgba(29, 185, 171, 0.16), transparent 34%);
  mix-blend-mode: multiply;
}

.signal-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin-bottom: 32px;
  font-size: 5.8rem;
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 26px;
  color: #28354a;
  font-size: 1.16rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.topic-strip,
.signal-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-strip span,
.signal-dock span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #263247;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 14px 38px rgba(19, 44, 72, 0.08);
}

.topic-strip span:nth-child(2) {
  border-color: rgba(29, 185, 171, 0.32);
}

.topic-strip span:nth-child(4) {
  border-color: rgba(255, 184, 77, 0.45);
}

.signal-dock {
  position: absolute;
  right: 42px;
  bottom: 16px;
  z-index: 2;
  justify-content: flex-end;
  width: min(500px, 100%);
  max-width: 500px;
}

.signal-dock span {
  min-height: 34px;
  color: var(--muted);
  font-size: 0.78rem;
}

.intro,
.latest-post-section {
  position: relative;
  padding: 76px 42px 86px;
  background: var(--paper-strong);
  border-top: 1px solid rgba(10, 16, 32, 0.08);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  min-width: 0;
}

.intro h2 {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.intro-copy {
  max-width: 720px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.post-feature {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 252, 250, 0.98)),
    linear-gradient(115deg, rgba(45, 108, 223, 0.08), rgba(255, 184, 77, 0.08));
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
}

.post-feature:hover {
  border-color: rgba(45, 108, 223, 0.34);
}

.post-feature-meta {
  color: var(--blue);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.84rem;
  font-weight: 900;
}

.post-feature-title {
  max-width: 850px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 950;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.post-feature-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.68;
}

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

.principle-grid article {
  min-width: 0;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.94), rgba(255, 255, 255, 0.98)),
    linear-gradient(115deg, rgba(29, 185, 171, 0.08), rgba(255, 184, 77, 0.08));
  box-shadow: var(--shadow);
}

.principle-grid span {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--coral);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.86rem;
  font-weight: 900;
}

.principle-grid h3 {
  margin-bottom: 10px;
  font-size: 1.26rem;
  line-height: 1.15;
}

.principle-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.62;
}

.page {
  width: min(1120px, calc(100% - 52px));
  margin: 0 auto;
  padding: 132px 0 84px;
}

.page-hero {
  max-width: 820px;
  margin-bottom: 44px;
  min-width: 0;
}

.page-hero h1 {
  margin-bottom: 34px;
  font-size: clamp(3rem, 6vw, 5.2rem);
}

.page-hero p:not(.eyebrow) {
  max-width: min(760px, 100%);
  color: #28354a;
  font-size: 1.12rem;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.content-section,
.policy-content {
  display: grid;
  gap: 20px;
}

.text-block,
.policy-meta,
.contact-notes {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.text-block {
  padding: clamp(22px, 4vw, 34px);
}

.text-block h2 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.05;
}

.text-block p,
.contact-notes p,
.policy-meta p {
  color: var(--muted);
  line-height: 1.72;
}

.text-block p:last-child,
.contact-notes p:last-child,
.policy-meta p:last-child {
  margin-bottom: 0;
}

.text-link {
  color: var(--blue);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.compact-grid {
  margin-top: 2px;
}

.contact-panel {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  align-items: start;
}

.contact-notes,
.policy-meta {
  padding: 22px;
}

.contact-notes strong,
.policy-meta strong {
  color: var(--ink);
}

.article-shell {
  width: min(100% - 52px, 980px);
  margin: 0 auto;
  padding: 132px 0 84px;
}

.article {
  display: grid;
  gap: 24px;
}

.article-hero {
  max-width: 920px;
  padding-bottom: 18px;
}

.article-hero h1 {
  max-width: 940px;
  margin-bottom: 36px;
  font-size: clamp(3.2rem, 6vw, 5.6rem);
}

.article-deck {
  max-width: 840px;
  margin-bottom: 22px;
  color: #28354a;
  font-size: 1.16rem;
  line-height: 1.72;
}

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

.article-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.article-card,
.article-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.article-card {
  padding: clamp(22px, 4vw, 34px);
}

.article-section {
  padding: clamp(24px, 4vw, 42px);
}

.article-card h2,
.article-section h2 {
  margin-bottom: 16px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.02;
}

.article-section h3 {
  margin: 24px 0 10px;
  font-size: 1.28rem;
  line-height: 1.2;
}

.article-card p,
.article-section p,
.article-section li {
  color: var(--muted);
  line-height: 1.72;
}

.article-card p:last-child,
.article-section p:last-child {
  margin-bottom: 0;
}

.quick-answer {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 249, 246, 0.96)),
    linear-gradient(120deg, rgba(29, 185, 171, 0.1), rgba(255, 184, 77, 0.12));
}

.prompt-box,
.signal-note {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid rgba(29, 185, 171, 0.24);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.88);
}

.prompt-box p,
.signal-note {
  color: #263247;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.7;
}

.muted-box {
  border-color: rgba(10, 16, 32, 0.12);
  background: rgba(10, 16, 32, 0.035);
}

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

.toc h2 {
  grid-column: 1 / -1;
}

.toc a {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #263247;
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
}

.toc a:hover,
.toc a:focus-visible {
  border-color: rgba(45, 108, 223, 0.34);
  color: var(--blue);
}

.formula-grid,
.mistake-grid,
.example-list {
  display: grid;
  gap: 14px;
}

.formula-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0;
}

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

.formula-grid div,
.mistake-grid div,
.example-list article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.72);
}

.formula-grid span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--coral);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 900;
}

.formula-grid h3,
.mistake-grid h3,
.example-list h3 {
  margin-top: 0;
}

.step-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.72);
}

.faq-list summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--ink);
  font-weight: 900;
}

.faq-list details p {
  padding: 0 18px 18px;
}

.sources-card ul {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding-left: 20px;
}

.sources-card a {
  color: var(--blue);
  font-weight: 850;
}

.site-footer {
  flex-shrink: 0;
  padding: 30px 42px 38px;
  border-top: 1px solid rgba(10, 16, 32, 0.08);
  background: #f7fafc;
  color: #687386;
  text-align: center;
}

.site-footer p {
  max-width: 820px;
  margin: 0 auto;
  font-size: 0.84rem;
  line-height: 1.6;
}

.footer-links {
  justify-content: center;
  margin-bottom: 14px;
}

@media (max-width: 920px) {
  .site-header,
  .hero,
  .intro,
  .latest-post-section,
  .site-footer {
    padding-left: 26px;
    padding-right: 26px;
  }

  .hero {
    min-height: 84svh;
    padding-top: 116px;
    padding-bottom: 120px;
  }

  h1 {
    font-size: 4.35rem;
  }

  .intro h2 {
    font-size: 2.55rem;
  }

  .page {
    width: min(100% - 52px, 820px);
  }

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

  .principle-grid article {
    min-height: 0;
  }

  .principle-grid span {
    margin-bottom: 18px;
  }

  .signal-dock {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 24px;
    justify-content: flex-start;
    width: auto;
    max-width: 500px;
    margin-top: 0;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .article-shell {
    width: min(100% - 52px, 820px);
  }

  .toc,
  .formula-grid,
  .mistake-grid,
  .example-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    min-height: 68px;
    padding: 12px 18px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .brand-name {
    display: none;
  }

  .header-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .menu-toggle {
    display: inline-flex;
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 22;
  }

  .header-actions > .theme-toggle {
    display: none;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 18px;
    left: 18px;
    display: grid;
    align-items: stretch;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(248, 251, 255, 0.96);
    box-shadow: 0 18px 48px rgba(10, 16, 32, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      visibility 180ms ease;
    visibility: hidden;
  }

  .site-header[data-menu-open="true"] .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.9rem;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible,
  .site-nav a[aria-current="page"] {
    background: rgba(45, 108, 223, 0.08);
  }

  .site-nav .theme-toggle {
    display: inline-flex;
    justify-self: start;
    margin: 6px 12px 8px;
    min-height: 34px;
    padding: 5px 10px 5px 6px;
    border-color: var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: none !important;
    color: var(--muted);
    outline: 0 !important;
  }

  .site-nav .theme-toggle:hover,
  .site-nav .theme-toggle:focus-visible,
  .site-nav .theme-toggle:active {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: none !important;
    color: var(--muted);
    outline: 0 !important;
  }

  .site-nav .theme-toggle-track {
    display: inline-flex;
    background: rgba(10, 16, 32, 0.1);
    box-shadow: inset 0 0 0 1px rgba(10, 16, 32, 0.08);
  }

  .site-nav .theme-toggle-thumb {
    display: block;
  }

  html[data-theme="dark"] .site-nav {
    background: rgba(7, 12, 23, 0.96);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  }

  html[data-theme="dark"] .site-nav .theme-toggle {
    border-color: rgba(226, 232, 240, 0.16);
    background: rgba(15, 23, 42, 0.76);
  }

  html[data-theme="dark"] .site-nav .theme-toggle-track {
    background: rgba(226, 232, 240, 0.14);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.18);
  }

  html[data-theme="dark"] .site-nav a:hover,
  html[data-theme="dark"] .site-nav a:focus-visible,
  html[data-theme="dark"] .site-nav a[aria-current="page"] {
    background: rgba(143, 180, 255, 0.12);
  }

  html[data-theme="dark"] .site-nav .theme-toggle:hover,
  html[data-theme="dark"] .site-nav .theme-toggle:focus-visible,
  html[data-theme="dark"] .site-nav .theme-toggle:active {
    border-color: rgba(226, 232, 240, 0.16);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: none !important;
    color: var(--muted);
  }
}

@media (hover: none) and (pointer: coarse) {
  .menu-toggle:hover,
  .menu-toggle:focus-visible,
  .theme-toggle:hover,
  .theme-toggle:focus-visible {
    border-color: var(--line);
    color: var(--muted);
    outline: 0;
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    color: var(--ink);
  }

  html[data-theme="dark"] .menu-toggle:hover,
  html[data-theme="dark"] .menu-toggle:focus-visible,
  html[data-theme="dark"] .theme-toggle:hover,
  html[data-theme="dark"] .theme-toggle:focus-visible {
    border-color: rgba(226, 232, 240, 0.16);
    color: var(--muted);
    outline: 0;
  }

  html[data-theme="dark"] .menu-toggle:hover,
  html[data-theme="dark"] .menu-toggle:focus-visible {
    color: var(--ink);
  }
}

@media (max-width: 600px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    min-height: 68px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-nav {
    gap: 6px;
  }

  .site-nav a {
    font-size: 0.86rem;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .hero {
    min-height: 90svh;
    padding-top: 102px;
    padding-bottom: 152px;
  }

  .hero-content,
  .signal-dock {
    width: 100%;
    max-width: 320px;
  }

  .eyebrow,
  .section-kicker {
    font-size: 0.72rem;
  }

  h1 {
    font-size: 2.94rem;
  }

  .hero-copy,
  .intro-copy {
    font-size: 1rem;
  }

  .topic-strip span {
    min-height: 34px;
    font-size: 0.78rem;
  }

  .signal-dock {
    position: absolute;
    right: 26px;
    bottom: 20px;
    left: 26px;
    gap: 8px;
    width: auto;
    max-width: 320px;
    margin-top: 0;
    justify-content: flex-start;
  }

  .signal-dock span {
    min-height: 30px;
    font-size: 0.72rem;
  }

  .intro {
    padding-top: 56px;
    padding-bottom: 62px;
  }

  .latest-post-section {
    padding-top: 56px;
    padding-bottom: 62px;
  }

  .page {
    width: 100%;
    max-width: 320px;
    margin-right: auto;
    margin-left: 18px;
    padding-top: 142px;
    padding-bottom: 58px;
  }

  .intro h2 {
    font-size: 1.92rem;
    line-height: 1.08;
  }

  .page-hero {
    margin-bottom: 30px;
  }

  .page-hero p:not(.eyebrow) {
    font-size: 1rem;
  }

  .page-hero h1 {
    font-size: 2.34rem;
    line-height: 1.03;
  }

  .principle-grid article {
    padding: 20px;
  }

  .post-feature-title {
    font-size: 2.2rem;
  }

  .article-shell {
    width: 100%;
    max-width: 320px;
    margin-right: auto;
    margin-left: 18px;
    padding-top: 142px;
    padding-bottom: 58px;
  }

  .article-hero h1 {
    font-size: 2.36rem;
    line-height: 1.03;
  }

  .article-deck {
    font-size: 1rem;
  }

  .article-card,
  .article-section {
    padding: 20px;
  }

  .article-card h2,
  .article-section h2 {
    font-size: 1.8rem;
  }

  .prompt-box p,
  .signal-note {
    font-size: 0.82rem;
  }
}

@media (max-width: 420px) {
  .site-header {
    gap: 8px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .header-actions {
    gap: 6px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .theme-toggle {
    justify-content: center;
    width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .theme-toggle-track {
    width: 30px;
    height: 18px;
  }

  .theme-toggle-thumb {
    width: 12px;
    height: 12px;
  }

  .theme-toggle-text {
    display: none;
  }

  html[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(12px);
  }

  .site-nav .theme-toggle {
    width: auto;
    min-height: 34px;
    padding: 5px 10px 5px 6px;
  }

  .site-nav .theme-toggle-track {
    width: 38px;
    height: 22px;
  }

  .site-nav .theme-toggle-thumb {
    width: 16px;
    height: 16px;
  }

  html[data-theme="dark"] .site-nav .theme-toggle-thumb {
    transform: translateX(16px);
  }

  .site-nav .theme-toggle-text {
    display: inline;
  }
}
