:root {
  color-scheme: dark;
  --text: #f6f1e7;
  --muted: #b4ab9d;
  --line: rgba(255, 255, 255, 0.1);
  --yellow: #ffd84d;
  --mint: #67f0b5;
  --blue: #8ecbff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --maxw: 860px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 216, 77, 0.12), transparent 20%),
    radial-gradient(circle at 84% 16%, rgba(142, 203, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #09090c 0%, #0e1119 50%, #08090d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 88%);
}

a { color: inherit; }

.page {
  width: min(calc(100% - 24px), var(--maxw));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 16%),
    linear-gradient(180deg, rgba(15, 17, 26, 0.96), rgba(9, 10, 16, 0.98));
  box-shadow: var(--shadow);
  padding: 30px;
}

.shell::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius-xl) - 10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.shell > * {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brandMark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(255, 216, 77, 0.24), rgba(103, 240, 181, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.brandText strong,
.brandText span {
  display: block;
}

.brandText strong {
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brandText span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.backLink,
.chip,
.eyebrow,
.metaItem {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.backLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  font-size: 0.72rem;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.backLink:hover,
.backLink:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.72rem;
}

.chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 16px rgba(103, 240, 181, 0.7);
}

.eyebrow {
  color: var(--yellow);
  font-size: 0.75rem;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.lede {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.74;
  font-size: 1rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.metaItem {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.66rem;
}

.article {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.article p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

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

.article h2 {
  margin: 28px 0 12px;
  font-family: "Syne", sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.article h3 {
  margin: 24px 0 10px;
  font-family: "Syne", sans-serif;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.diffLog {
  margin: 14px 0 22px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  overflow-x: auto;
}

.diffLog code {
  display: block;
  white-space: pre;
  line-height: 1.7;
  font-size: 0.9rem;
}

.diffLog .del {
  color: #ff9d86;
}

.diffLog .add {
  color: #98f5c9;
}

.diffLabel {
  display: inline-block;
  margin: 8px 0 10px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article ul {
  margin: 0 0 18px 18px;
  padding: 0;
  color: var(--muted);
  line-height: 1.8;
}

.article li {
  margin-bottom: 8px;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.article th,
.article td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.article th {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.article tr:first-child th,
.article tr:first-child td {
  border-top: 0;
}

.article blockquote {
  margin: 14px 0 22px;
  padding: 14px 16px;
  border-left: 3px solid rgba(255, 216, 77, 0.55);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.article pre {
  margin: 14px 0 22px;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  line-height: 1.7;
}

.footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.84rem;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95em;
}

@media (max-width: 720px) {
  .topbar {
    display: grid;
    justify-content: start;
  }

  .actions {
    justify-content: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
