:root {
  --bg: #141413;
  --bg-2: #1c1b19;
  --bg-3: #262522;
  --line: #3a3833;
  --fg: #f0eee6;
  --muted: #a8a49a;
  --dim: #75716a;
  --accent: #d97757;
  --accent-2: #e8a184;
  --ok: #8fbf7f;
  --blue: #8fb3d9;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.65 var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { color: var(--accent-2); font-family: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.accent { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 4px 10px; }
.skip:focus { left: 8px; z-index: 10; }

/* nav */
.top { position: sticky; top: 0; z-index: 5; background: rgb(20 20 19 / .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--bg-3); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.brand { color: var(--fg); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.star { color: var(--accent); display: inline-block; }
.brand:hover .star { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.links { display: flex; gap: 18px; font-size: 13px; }
.links a { color: var(--muted); }
.links a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 560px) { .links a:not(:last-child) { display: none; } }

/* hero */
.hero { padding: 72px 16px 40px; }
.logo { margin: 0 0 28px; font-size: clamp(14px, 4.2vw, 30px); line-height: 1.15; color: var(--fg); white-space: pre; overflow: hidden; }
h1 { font-size: clamp(26px, 5vw, 44px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.02em; }
.lead { color: var(--muted); max-width: 680px; margin: 0 0 32px; font-size: 16px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.cmd { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 10px 10px 14px; }
.cmd code { color: var(--fg); overflow-x: auto; white-space: nowrap; }
.prompt { color: var(--accent); }
.btn { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--bg); font-weight: 700; }
.btn:hover { background: var(--accent-2); text-decoration: none; }
.works { color: var(--dim); font-size: 13px; margin: 18px 0 0; }
.works b { color: var(--muted); font-weight: 400; }

.copy { margin-left: auto; flex: none; font: 12px var(--mono); color: var(--muted); background: var(--bg-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 8px; cursor: pointer; }
.copy:hover { color: var(--fg); border-color: var(--dim); }
.copy.ok { color: var(--ok); }

/* terminal */
.term { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px -30px rgb(217 119 87 / .25), 0 0 0 1px rgb(0 0 0 / .3); }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--bg-3); }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); }
.term-title { color: var(--dim); font-size: 12px; flex: 1; }
.replay { font: 12px var(--mono); color: var(--dim); background: none; border: 0; cursor: pointer; }
.replay:hover { color: var(--fg); }
.term-body, .term-static { margin: 0; padding: 18px 18px 22px; min-height: 520px; font-size: 13.5px; line-height: 1.6;
  white-space: pre; overflow-x: auto; }
@media (max-width: 560px) { .term-body { font-size: 11.5px; min-height: 470px; padding: 14px; } }
.term-body .l { display: block; animation: in .18s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(2px); } }
.t-user { color: var(--fg); }
.t-dim { color: var(--dim); }
.t-mut { color: var(--muted); }
.t-acc { color: var(--accent); }
.t-ok { color: var(--ok); }
.t-blue { color: var(--blue); }
.t-sel { color: var(--accent-2); }
.t-box { color: var(--line); }
.cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--fg); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* manifesto */
.manifesto { padding-top: 88px; padding-bottom: 24px; }
blockquote { margin: 0 0 24px; padding-left: 18px; border-left: 3px solid var(--accent); }
blockquote p { margin: 0; font-size: clamp(19px, 3vw, 26px); line-height: 1.4; font-weight: 700; }
.manifesto > p { color: var(--muted); max-width: 720px; }

/* sections */
section[id], section[aria-labelledby] { scroll-margin-top: 64px; }
h2 { font-size: 20px; margin: 88px 0 24px; font-weight: 700; }
.hash { color: var(--accent); }
h3 { font-size: 15px; margin: 0 0 6px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1px;
  background: var(--bg-3); border: 1px solid var(--bg-3); border-radius: 10px; overflow: hidden; }
.steps li { background: var(--bg); padding: 22px 20px; transition: background .2s; }
.steps li:hover { background: var(--bg-2); }
.steps .n { color: var(--accent); font-size: 12px; display: block; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card { background: var(--bg-2); border: 1px solid var(--bg-3); border-radius: 10px; padding: 22px; }
.card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap-reverse; }
.card h3 { font-size: 17px; }
.card p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.tag { font-size: 12px; color: var(--accent-2); background: rgb(217 119 87 / .12); border-radius: 4px; padding: 1px 7px; }
.chain { color: var(--fg) !important; font-size: 13px !important; }
.tools { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tools li { font-size: 12px; color: var(--blue); border: 1px solid var(--bg-3); border-radius: 4px; padding: 1px 8px; }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 20px; font-size: 13px; color: var(--muted); }
.facts li::before { content: "✓ "; color: var(--ok); }
.facts b { color: var(--fg); font-weight: 400; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--bg-3); overflow-x: auto; }
.tabs button { font: 14px var(--mono); color: var(--dim); background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 14px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.panel { padding-top: 18px; }
.panel > p { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.code { position: relative; margin: 0; background: var(--bg-2); border: 1px solid var(--bg-3); border-radius: 8px;
  padding: 16px 18px; padding-right: 70px; font-size: 13.5px; overflow-x: auto; }
.code .copy { position: absolute; right: 10px; top: 10px; }
.c { color: var(--dim); }
.hint { color: var(--dim) !important; font-size: 13px !important; margin-top: 12px !important; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 800px; }
.checks li { position: relative; padding-left: 28px; color: var(--muted); font-size: 14px; }
.checks li::before { content: "⏺"; position: absolute; left: 0; top: 0; color: var(--ok); font-size: 12px; line-height: 2; }
.checks b { color: var(--fg); }


/* footer */
.foot { margin-top: 110px; border-top: 1px solid var(--bg-3); padding: 26px 0 32px; font-size: 13px; color: var(--dim); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot-links { display: flex; gap: 18px; }
.foot a { color: var(--muted); }
.disclaimer { font-size: 12px; margin-top: 14px; color: var(--dim); }

/* legal pages */
.legal { padding-top: 56px; max-width: 760px; }
.legal h1 { font-size: 28px; }
.legal h2 { font-size: 17px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--muted); font-size: 14px; }
.legal .todo { color: var(--bg); background: var(--accent); padding: 0 4px; }

/* language menu */
.lang-menu { position: relative; display: flex; }
.lang-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 28px; padding: 0 10px;
  font: 12px/1 var(--mono); letter-spacing: .02em; color: var(--muted); background: none;
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.lang-btn svg { display: block; flex: none; }
.links { align-items: center; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { color: var(--fg); border-color: var(--dim); }
.lang-list { position: absolute; right: 0; top: calc(100% + 14px); z-index: 20; list-style: none; margin: 0; padding: 6px;
  width: 210px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / .6); animation: drop .12s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.lang-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 6px;
  color: var(--muted); font-size: 13px; }
.lang-list a:hover, .lang-list a:focus-visible { background: var(--bg-3); color: var(--fg); text-decoration: none; outline: none; }
.lang-list .lang-code { font-size: 11px; color: var(--dim); }
.lang-list a[aria-current] { color: var(--accent-2); }
.lang-list a[aria-current] .lang-code::before { content: "✓ "; color: var(--accent); }
@media (max-width: 560px) { .links a:not(:last-child) { display: none; } .links { gap: 12px; } }

/* first-visit language hint: small card bottom right */
.lang-hint { position: fixed; right: 20px; bottom: 20px; z-index: 30; max-width: 340px; display: grid; gap: 10px; padding: 14px 16px;
  font-size: 13px; color: var(--fg); background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; box-shadow: 0 18px 40px -12px rgb(0 0 0 / .6); animation: drop .2s ease-out; }
.lang-hint-actions { display: flex; gap: 16px; align-items: center; }
.lang-hint a { color: var(--bg); background: var(--accent); padding: 4px 10px; border-radius: 6px; font-weight: 700; }
.lang-hint a:hover { background: var(--accent-2); text-decoration: none; }
.lang-hint button { font: inherit; color: var(--dim); background: none; border: 0; cursor: pointer; padding: 0; }
.lang-hint button:hover { color: var(--fg); }
@media (max-width: 560px) { .lang-hint { left: 16px; right: 16px; bottom: 16px; max-width: none; } }
.foot-langs { margin-top: 14px; font-size: 12px; color: var(--dim); }
.foot-langs a { color: var(--dim); }
.foot-langs a[aria-current] { color: var(--muted); }
.section-lead { color: var(--muted); max-width: 760px; margin: 0 0 16px; }
.legal-langs { margin-top: 40px !important; }
.lang-hint[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .lang-list, .lang-hint { animation: none; } }
