:root {
  --ink: #171717;
  --muted: #6f6d68;
  --paper: #f7f5ef;
  --card: #fffefb;
  --line: #dfdcd3;
  --accent: #b8452f;
  --accent-soft: #efe0d8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(223, 220, 211, .9);
  background: rgba(247, 245, 239, .92);
  backdrop-filter: blur(16px);
}
.site-header-inner {
  width: min(calc(100% - 40px), 1100px);
  min-height: 64px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-brand { margin-right: auto; color: var(--ink); font-weight: 760; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-language {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.article-shell { width: min(calc(100% - 40px), 820px); margin: 0 auto; padding: 72px 0 96px; }
.article-meta { margin-bottom: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 13px; }
.shortlink-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}
.shortlink-copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shortlink-copy:hover { color: var(--ink); border-bottom-color: var(--ink); }
.shortlink-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
article {
  color: #383632;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.82;
}
article h1, article h2, article h3, article h4 { color: var(--ink); line-height: 1.2; }
article h1 { margin: 0 0 38px; font-size: clamp(38px, 7vw, 64px); font-weight: 500; letter-spacing: -.045em; }
article h2 { margin: 2.15em 0 .75em; font-size: 31px; font-weight: 550; letter-spacing: -.025em; }
article h3 { margin: 1.8em 0 .65em; font-size: 23px; font-weight: 600; }
article p, article ul, article ol, article blockquote, article table { margin: 0 0 1.35em; }
article li { margin-bottom: .35em; }
article blockquote { padding: 3px 0 3px 22px; color: var(--muted); border-left: 3px solid var(--accent); }
article pre {
  overflow-x: auto;
  margin: 1.6em 0;
  padding: 20px;
  border-radius: 5px;
  color: #f5f1e8;
  background: #24231f;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
}
article code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; }
article :not(pre) > code { padding: .12em .36em; border-radius: 3px; background: var(--accent-soft); }
article table { width: 100%; border-collapse: collapse; font-family: Inter, sans-serif; font-size: 14px; }
article th, article td { padding: 9px 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
article th { background: #ece8de; }
article hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }
article figure, article img, article video { margin: 1.8em auto; }
article video { display: block; width: 100%; height: auto; background: #111; }
.file-panel { padding: 28px; border: 1px solid var(--line); background: var(--card); font-family: Inter, sans-serif; }
.file-panel iframe { width: 100%; height: 75vh; margin-top: 20px; border: 1px solid var(--line); }
.download-link { display: inline-block; padding: 9px 14px; color: #fff; background: var(--ink); text-decoration: none; }
.article-footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.email-copy { padding: 0; border: 0; color: var(--accent); background: transparent; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.email-copy:hover { color: var(--ink); }
.copy-toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; padding: 9px 15px; border-radius: 999px; color: #fff; background: rgba(23,23,23,.94); font: 700 13px/1.4 Inter,sans-serif; opacity: 0; transform: translate(-50%,12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.copy-toast.visible { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 680px) {
  .site-header-inner { width: min(calc(100% - 28px), 1100px); gap: 12px; }
  .site-nav a:first-child { display: none; }
  .article-shell { width: min(calc(100% - 28px), 820px); padding: 50px 0 72px; }
  article { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
