* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #faf9f6;
  --ink: #16130e;
  --soft: #3d392f;
  --mut: #8a8474;
  --faint: #a09a89;
  --line: #e3e0d5;
  --acc: #1d4ed8;
  --card: rgba(255, 255, 255, 0.6);
}
html[data-theme="dark"] {
  --bg: #131210;
  --ink: #ece7dd;
  --soft: #c9c3b4;
  --mut: #8f8875;
  --faint: #6b6557;
  --line: #2c2a24;
  --acc: #7aa2ff;
  --card: rgba(255, 255, 255, 0.04);
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  line-height: 1.65;
  padding: 72px 24px 96px;
  transition: background 0.3s, color 0.3s;
}
main {
  max-width: 600px;
  margin: 0 auto;
}
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 20px;
}
h1 {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.lede {
  font-size: 19px;
  color: var(--soft);
  margin-bottom: 64px;
  max-width: 34em;
}
h2 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 20px;
}
h3 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--acc);
  margin: 28px 0 4px;
}
h3:first-of-type {
  margin-top: 0;
}
.rows {
  margin-bottom: 8px;
}
.rows p {
  font-size: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.rows p:last-child {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
h2 + h3 {
  margin-top: 0;
}
.elsewhere-h {
  margin-top: 60px;
}
.links {
  display: flex;
  gap: 24px;
  margin: 20px 0 72px;
  font-size: 17px;
}
a {
  color: var(--acc);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
footer {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--faint);
}
.w {
  display: inline-block;
  white-space: nowrap;
}
.ch {
  display: inline-block;
}
.theme-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--mut);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.theme-btn:hover {
  color: var(--ink);
  border-color: var(--mut);
  transform: scale(1.06);
}
.md-btn {
  position: fixed;
  top: 70px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--mut);
  border-radius: 50%;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.md-btn:hover {
  color: var(--ink);
  border-color: var(--mut);
  transform: scale(1.06);
}
.md-btn.on {
  color: var(--acc);
  border-color: var(--acc);
}
#md-view {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0 96px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}
.md-line {
  display: block;
}
.md-line.blank::after {
  content: '\00a0';
}
.theme-btn:active {
  transform: scale(0.94);
}
.theme-btn svg {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 0.35s, transform 0.55s cubic-bezier(.2,.7,.2,1.2);
}
html[data-theme="light"] .icon-sun,
html:not([data-theme="dark"]) .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
html[data-theme="light"] .icon-moon,
html:not([data-theme="dark"]) .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}
html[data-theme="dark"] .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}
html[data-theme="dark"] .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  z-index: 2;
}
.ripple-ring {
  position: fixed;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--acc);
  border-radius: 50%;
  pointer-events: none;
  z-index: 60;
  opacity: 0.7;
}
@media (max-width: 520px) {
  body { padding: 48px 20px 72px; }
  h1 { font-size: 34px; }
}

