:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --accent: #1f4fd8;
  --accent-2: #2563eb;
  --surface: #f9fafb;
  --card: #ffffff;

  --radius: 6px;
  --max-width: 900px;
  --measure: 72ch;

  --shadow: none;
  --shadow-sm: none;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    "Courier New", monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  --serif: "Crimson Text", Georgia, "Times New Roman", serif;

  --lead: 1.75;
  color-scheme: light;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 32px 20px;
  display: flex;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: var(--lead);
}

.page {
  max-width: var(--max-width);
  width: 100%;
  background: transparent;
}

header.doc-header {
  border-bottom: 2px solid var(--accent);
  margin-bottom: 32px;
  padding-bottom: 14px;
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

h1.title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.byline {
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
}

main.article {
  background: transparent;
  padding: 0;
}

.content {
  max-width: var(--measure);
  margin: 0 auto;
  font-size: 1.02rem;
}

p {
  margin: 1.2rem 0;
  color: var(--text);
}

strong,
b {
  font-weight: 600;
  color: var(--text);
}

em,
i {
  font-style: italic;
  color: var(--text);
}

mark {
  background: #eef2ff;
  padding: 0.1em 0.3em;
}

del,
s {
  color: var(--muted);
}

small {
  font-size: 0.85em;
  color: var(--muted);
}

sub,
sup {
  font-size: 0.75em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-2);
}

abbr[title] {
  border-bottom: 1px dotted var(--muted);
  cursor: help;
}

kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f9fafb;
}

samp,
var,
dfn {
  font-family: var(--mono);
  font-style: italic;
}

cite {
  font-style: italic;
  color: var(--muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 2.5rem 0 1rem;
  font-weight: 600;
  color: var(--text);
}

h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 0.3rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
  font-style: italic;
}

h5,
h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

pre {
  margin: 1.8rem 0;
  padding: 1.2rem;
  background: #f6f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.88rem;
}

code {
  font-family: var(--mono);
  background: #eef2ff;
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
}

pre[class*="language-"] {
  background: #f6f8fa;
}

pre code[class*="language-"] {
  background: transparent !important;
}

.code-wrapper {
  position: relative;
}

.copy-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 0.8rem;
  padding: 4px 6px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
}

.lang-label {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--mono);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.8rem 1rem;
  border: 1px solid #e5e7eb;
}

th {
  background: #f9fafb;
  font-weight: 600;
}

figure {
  margin: 2.5rem 0;
  text-align: center;
}

img {
  max-width: 100%;
  height: auto;
}

figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

blockquote {
  margin: 2.5rem 0;
  padding: 1.4rem 2rem;
  border-left: 4px solid var(--accent);
  background: #f8fafc;
  font-family: var(--serif);
  font-style: normal;
}

blockquote cite {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

ul,
ol {
  margin: 1.2rem 0 1.8rem 1.5rem;
}

li {
  margin: 0.4rem 0;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }
}

@media print {
  body {
    padding: 0;
  }
  .copy-btn {
    display: none;
  }
}
