:root {
  --bg: #0a0d0a;
  --bg-raise: #0e120e;
  --ink: #e9e6dc;
  --muted: #8d978b;
  --faint: #5a635a;
  --green: #8de07a;
  --green-deep: #3f7a3a;
  --hairline: rgba(233, 230, 220, 0.09);
  --soft-green: rgba(141, 224, 122, 0.08);
  --serif: "Fraunces", "Georgia", serif;
  --sans: "Instrument Sans", "Helvetica Neue", sans-serif;
  --mono: "Fragment Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 42% at 50% -12%, rgba(141, 224, 122, 0.10), transparent 67%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::after {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--green);
  color: var(--bg);
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 5px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.8rem;
  transform: translateY(-180%);
  background: var(--green);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(100% - 2.5rem, 1120px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
}

.brand-name {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand-name b {
  color: var(--green);
  font-weight: 400;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--green); }

.eyebrow,
.post-meta,
.post-status {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow { color: var(--muted); }
.eyebrow .tick { color: var(--green); }

.notes-hero {
  max-width: 790px;
  padding: clamp(5.5rem, 15vh, 10rem) 0 clamp(4rem, 10vh, 7rem);
}

.notes-hero h1,
.article-header h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 380;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.notes-hero h1 {
  margin: 1.4rem 0 1.8rem;
  font-size: clamp(3.4rem, 10vw, 7.6rem);
}

.notes-hero h1 em,
.article-header h1 em {
  color: var(--green);
  font-style: italic;
  font-weight: 420;
}

.notes-hero > p:last-child {
  max-width: 39rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.post-index {
  padding: 0 0 clamp(6rem, 14vh, 10rem);
}

.index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hairline);
}

.index-head a {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-decoration: none;
}

.index-head a:hover { color: var(--green); }

.post-card {
  display: grid;
  grid-template-columns: minmax(7rem, 0.25fr) minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(2.2rem, 5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--hairline);
}

.post-meta { color: var(--faint); }

.post-card h2 {
  margin-bottom: 0.7rem;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 390;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.post-card p {
  max-width: 39rem;
  color: var(--muted);
}

.post-status {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--green-deep);
  color: var(--green);
  letter-spacing: 0.08em;
}

.article-header {
  max-width: 900px;
  padding: clamp(5rem, 13vh, 9rem) 0 clamp(3.5rem, 8vh, 5.5rem);
}

.article-header h1 {
  max-width: 850px;
  margin: 1.4rem 0 1.7rem;
  font-size: clamp(3rem, 8vw, 6.6rem);
}

.dek {
  max-width: 690px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.42;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 2.2rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(10rem, 1fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: start;
  padding-bottom: clamp(6rem, 14vh, 10rem);
}

.article-body {
  min-width: 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  line-height: 1.78;
}

.article-body > * + * { margin-top: 1.5rem; }

.article-body h2 {
  margin-top: 4.5rem;
  font-family: var(--sans);
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.article-body h3 {
  margin-top: 3rem;
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
}

.article-body a {
  color: var(--green);
  text-decoration-color: var(--green-deep);
  text-underline-offset: 0.18em;
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body ul,
.article-body ol { padding-left: 1.3em; }

.article-body li + li { margin-top: 0.55rem; }

.article-body blockquote {
  margin: 2.5rem 0;
  padding: 0.2rem 0 0.2rem 1.5rem;
  border-left: 2px solid var(--green);
  color: var(--ink);
  font-size: 1.15em;
  font-style: italic;
}

.article-body code,
.article-body pre,
.draft-box,
.article-aside { font-family: var(--mono); }

.article-body code {
  padding: 0.08em 0.28em;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: var(--bg-raise);
  font-size: 0.76em;
}

.article-body pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1.4rem;
  border: 1px solid var(--hairline);
  background: var(--bg-raise);
  color: #cad5c8;
  font-size: 0.78rem;
  line-height: 1.7;
}

.article-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
}

.article-body table {
  width: 100%;
  margin: 2.2rem 0;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.5;
}

.article-body th,
.article-body td {
  padding: 0.8rem 0.65rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.draft-box {
  margin: 0 0 3rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--green-deep);
  background: var(--soft-green);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.draft-box strong {
  color: var(--green);
  font-weight: 400;
}

.article-note {
  padding: 1rem 1.15rem;
  border-left: 2px solid var(--green-deep);
  background: var(--soft-green);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
}

.verifier-card {
  position: relative;
  margin: 3.5rem 0;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  overflow: hidden;
  border: 1px solid var(--green-deep);
  background:
    radial-gradient(circle at 100% 0%, rgba(121, 255, 89, 0.1), transparent 35%),
    var(--panel);
}

.verifier-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4rem;
  height: 2px;
  background: var(--green);
  content: "";
}

.article-body .verifier-card > * + * { margin-top: 1rem; }

.article-body .verifier-card h3 {
  margin-top: 0.55rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.08;
}

.article-body .verifier-card pre {
  margin: 1.5rem 0;
  border-color: var(--green-deep);
  background: rgba(0, 0, 0, 0.28);
}

.verifier-scope {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.65;
}

.verifier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  padding-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.article-body .verifier-actions a {
  text-decoration: none;
}

.article-body .verifier-actions .verifier-download {
  padding: 0.75rem 1rem;
  border: 1px solid var(--green);
  color: var(--green);
  text-transform: uppercase;
}

.article-body .verifier-actions .verifier-download:hover {
  background: var(--green);
  color: var(--black);
}

.article-aside {
  position: sticky;
  top: 2rem;
  padding-top: 0.4rem;
  color: var(--faint);
  font-size: 0.7rem;
  line-height: 1.7;
}

.article-aside strong {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-aside a {
  color: var(--muted);
  text-decoration: none;
}

.article-aside a:hover { color: var(--green); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 3rem 0 3.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--green); }

@media (max-width: 760px) {
  .shell { width: min(100% - 2rem, 1120px); }
  .brand-name { letter-spacing: 0.19em; }
  .site-nav a:first-child { display: none; }
  .post-card { grid-template-columns: 1fr auto; }
  .post-card .post-meta { grid-column: 1 / -1; }
  .article-grid { grid-template-columns: 1fr; }
  .article-aside { position: static; border-top: 1px solid var(--hairline); padding-top: 2rem; }
  .article-body table { display: block; overflow-x: auto; }
}

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

@media print {
  body { background: #fff; color: #111; }
  body::after, .site-header, .site-footer, .skip-link, .draft-box, .article-aside { display: none; }
  .shell { width: 100%; }
  .article-grid { display: block; }
  .article-body a { color: inherit; }
  .verifier-actions { display: none; }
}
