:root {
  --night: #060D12; --night-2: #0B161D;
  --ice: #F1F5F6; --snow: #ffffff;
  --ink: #0A1217; --ink-2: #47565F; --ink-3: #7C8B93;
  --line: #DAE3E7; --line-d: rgba(255,255,255,.09);
  --glacier: #8EDCF0; --glacier-deep: #0A6C87; --melt: #D8F4FA;
  --ok: #4ADE9F; --warn: #F6C356;
  --sans: 'Geist', 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  --prose: 46rem;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--night); color-scheme: dark; }
body { font-family: var(--sans); color: #fff; background: var(--night); line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: var(--glacier); color: var(--night); }
:focus-visible { outline: 2px solid var(--glacier); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; color: var(--night); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.narrow { width: min(var(--prose), calc(100% - 48px)); margin-inline: auto; }
main { transition: opacity .17s ease; }
body.swapping main, body.swapping .nav-links, body.swapping .foot-top { opacity: 0; }
.nav-links, .foot-top { transition: opacity .17s ease; }

/* ───── nav ───── */
.nav { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50; width: min(1160px, calc(100% - 24px)); height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 18px; border-radius: 16px; background: rgba(8,17,23,.9); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 12px 40px -14px rgba(0,0,0,.55); }
.logo svg { height: 27px; width: auto; }
.nav-links { display: flex; gap: 2px; margin-left: 22px; margin-right: auto; }
.nav-links a { font-size: 14px; color: rgba(255,255,255,.7); padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-links a[aria-current="page"] { color: #fff; }
.lang { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.08); font-family: var(--mono); font-size: 12px; flex: none; }
.lang::before { content: ''; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 7px; background: #fff; transition: transform .3s var(--ease); }
html[lang="en"] .lang::before { transform: translateX(100%); }
.lang button { position: relative; z-index: 1; padding: 6px 10px; border: 0; background: none; color: rgba(255,255,255,.62); cursor: pointer; border-radius: 7px; letter-spacing: .05em; transition: color .25s; }
.lang button[aria-pressed="true"] { color: var(--night); }
.nav .btn { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.burger { display: none; width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); cursor: pointer; place-items: center; }
.burger span { display: block; width: 16px; height: 1.5px; background: #fff; box-shadow: 0 5px 0 #fff, 0 -5px 0 #fff; }
.mnav { position: fixed; z-index: 49; top: 80px; left: 12px; right: 12px; padding: 10px; border-radius: 16px; background: #0B161D; border: 1px solid rgba(255,255,255,.1); display: none; flex-direction: column; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.mnav a { padding: 14px 14px; font-size: 18px; border-radius: 10px; color: rgba(255,255,255,.85); }
.mnav a:active { background: rgba(255,255,255,.07); }
body.menu .mnav { display: flex; }

/* ───── buttons ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 12px; font-size: 15.5px; font-weight: 500; letter-spacing: -.005em; border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: #fff; color: var(--night); }
.btn-primary:hover { background: var(--melt); }
.btn-glacier { background: var(--glacier); color: var(--night); }
.btn-glacier:hover { background: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.22); }
.btn-ghost:hover { border-color: #fff; }

/* ───── type ───── */
.label { display: block; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.dark .label { color: rgba(255,255,255,.45); }
.label + h1, .label + h2 { margin-top: 20px; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
.sub { font-size: clamp(16.5px, 1.4vw, 19px); color: var(--ink-2); max-width: 46ch; margin-top: 22px; text-wrap: pretty; }
.dark .sub { color: rgba(255,255,255,.66); }

section { position: relative; }
.sheet { background: var(--ice); color: var(--ink); border-radius: clamp(22px, 3vw, 36px); color-scheme: light; }
.dark { color: #fff; }

.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }

/* ───── hero ───── */
.hero { position: relative; padding: 148px 0 72px; overflow: hidden; isolation: isolate; }
.hero.compact { padding: 140px 0 64px; }
.topo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; -webkit-mask-image: radial-gradient(110% 85% at 50% 8%, #000 30%, transparent 78%); mask-image: radial-gradient(110% 85% at 50% 8%, #000 30%, transparent 78%); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 46% at 50% -8%, rgba(142,220,240,.2), transparent 70%), radial-gradient(46% 36% at 50% 46%, rgba(6,13,18,.9), transparent 78%); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: rgba(255,255,255,.5); margin-bottom: 28px; }
.crumbs a:hover { color: #fff; }
.crumbs span[aria-hidden] { color: rgba(255,255,255,.28); }
h1 { font-size: clamp(36px, 5.6vw, 72px); line-height: .98; letter-spacing: -.045em; max-width: 16ch; }
.hero h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; background: linear-gradient(180deg, #fff 38%, #A6D5E2); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.post-hero h1 { max-width: 18ch; font-size: clamp(40px, 6vw, 68px); line-height: 1.05; }
.lede { font-size: clamp(17px, 1.55vw, 20.5px); line-height: 1.5; color: rgba(255,255,255,.68); max-width: 38em; margin-top: 22px; text-wrap: pretty; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 22px; font: 500 12.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.draft-banner { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(246,195,86,.4); background: rgba(246,195,86,.1); color: var(--warn); font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* ───── index ───── */
.feed { padding: clamp(48px, 6vw, 80px) 0 clamp(80px, 10vw, 120px); }
.feed-list { list-style: none; margin-top: 12px; }
.feed-list a { display: grid; gap: 10px; padding: 32px 4px; border-top: 1px solid var(--line); transition: padding .35s var(--ease); }
.feed-list li:last-child a { border-bottom: 1px solid var(--line); }
.feed-list time { font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.feed-list h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.02em; line-height: 1.12; max-width: 22ch; }
.feed-list p { font-size: 17px; color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.feed-list .more { font-size: 14.5px; font-weight: 500; color: var(--glacier-deep); }
@media (hover: hover) {
  .feed-list a:hover { padding-left: 18px; }
  .feed-list a:hover h2 { color: var(--glacier-deep); }
}
.empty { padding: 48px 0 8px; border-top: 1px solid var(--line); }
.empty h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.02em; max-width: 20ch; }
.empty p { font-size: 17px; color: var(--ink-2); margin-top: 14px; max-width: 54ch; text-wrap: pretty; }
.empty .mail { display: inline-block; margin-top: 22px; color: var(--glacier-deep); border-bottom: 1px solid rgba(10,108,135,.3); padding-bottom: 2px; }
.empty .mail:hover { border-color: var(--glacier-deep); }

/* ───── post body ───── */
.article { padding: clamp(40px, 5vw, 64px) 0 clamp(72px, 8vw, 104px); }
.tldr { margin: 0 0 48px; padding: 28px 28px 26px; border-radius: 18px; background: var(--melt); border: 1px solid rgba(10,108,135,.14); }
.tldr .label { color: var(--glacier-deep); }
.tldr ul { margin: 14px 0 0 1.15em; display: grid; gap: 10px; }
.tldr li { font-size: 17px; line-height: 1.45; text-wrap: wrap; }
.tldr li::marker { color: var(--glacier-deep); }

.prose { font-size: 18px; line-height: 1.7; color: var(--ink); }
.prose > * + * { margin-top: 1.15em; }
.prose > h2, .prose > h3 { margin-top: 2.1em; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.15; }
.prose h3 { font-size: 21px; letter-spacing: -.02em; }
.prose p, .prose li { text-wrap: pretty; }
.prose a { color: var(--glacier-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2em; display: grid; gap: 8px; }
.prose li + li { margin-top: 0; }
.prose blockquote { border-left: 3px solid var(--glacier); padding: 4px 0 4px 18px; color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose strong { font-weight: 600; }
.prose em { font-family: var(--serif); font-size: 1.08em; }

.prose pre, .prose .hljs { font-family: var(--mono); }
.prose pre { margin: 1.6em 0; padding: 18px 18px 20px; border-radius: 14px; background: #0A151B; color: #E7F2F6; border: 1px solid rgba(255,255,255,.08); overflow-x: auto; font-size: 14px; line-height: 1.65; -webkit-overflow-scrolling: touch; }
.prose code { font-family: var(--mono); font-size: .88em; }
.prose :not(pre) > code { background: rgba(10,18,23,.06); border: 1px solid var(--line); border-radius: 6px; padding: .12em .38em; }

.hljs-comment, .hljs-quote { color: #7C8B93; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal { color: #8EDCF0; }
.hljs-attr, .hljs-attribute { color: #8EDCF0; }
.hljs-string, .hljs-addition { color: #4ADE9F; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #F6C356; }
.hljs-title, .hljs-section, .hljs-name { color: #fff; }
.hljs-variable, .hljs-template-variable, .hljs-type, .hljs-built_in { color: #D8F4FA; }
.hljs-punctuation { color: #A9B8BF; }
.hljs-meta { color: #F6C356; }

.table-wrap { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--snow); -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; }
.prose thead th { font: 500 11.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); background: rgba(10,18,23,.035); border-bottom: 1px solid var(--line); }
.prose tbody tr + tr td { border-top: 1px solid var(--line); }
.prose tbody tr:nth-child(even) td { background: rgba(10,18,23,.02); }

.faq { margin-top: 56px; padding-top: 8px; }
.faq h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 36px); letter-spacing: -.02em; margin-bottom: 8px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 18px; font-weight: 500; letter-spacing: -.015em; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); color: var(--glacier-deep); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 12px; color: var(--ink-2); font-size: 16.5px; text-wrap: pretty; }

/* ───── cta ───── */
.cta { overflow: hidden; isolation: isolate; padding: clamp(80px, 10vw, 128px) 0 clamp(72px, 9vw, 120px); }
.cta .topo { -webkit-mask-image: radial-gradient(90% 90% at 20% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(90% 90% at 20% 40%, #000 20%, transparent 75%); }
.cta h2 { font-size: clamp(32px, 4.6vw, 58px); max-width: 14ch; letter-spacing: -.04em; line-height: 1.04; }
.cta .mail { display: inline-block; margin-top: 28px; font-size: 17px; color: rgba(255,255,255,.85); border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 2px; transition: border-color .2s, color .2s; }
.cta .mail:hover { color: #fff; border-color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ───── footer ───── */
footer { border-top: 1px solid var(--line-d); padding: 44px 0 0; color: rgba(255,255,255,.6); overflow: hidden; }
.foot-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.foot-top p { font-size: 14.5px; max-width: 30ch; margin-top: 14px; }
.foot-nav { display: flex; gap: 8px 28px; flex-wrap: wrap; font-size: 14.5px; }
.foot-nav a:hover { color: #fff; }
.foot-fine { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; font: 12px/1.5 var(--mono); color: rgba(255,255,255,.38); }
.foot-mark { margin: 40px auto -2.6vw; width: 100%; color: rgba(255,255,255,.055); }
.foot-mark svg { width: 100%; height: auto; }

@media (max-width: 980px) {
  .nav-links, .nav .btn { display: none; }
  .burger { display: grid; }
  .lang { margin-left: auto; }
}
@media (max-width: 600px) {
  .wrap, .narrow { width: calc(100% - 36px); }
  .hero, .hero.compact { padding: 124px 0 56px; }
  .tldr { padding: 22px 18px; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .nav .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  main, .nav-links, .foot-top { transition: none; }
}
