@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/jbm-var.woff2') format('woff2');
}
:root {
  --bg: #1a1418; --bg-2: #221a20; --bg-3: #2b2128; --bg-4: #33282f;
  --fg: #e8ddd9; --fg-dim: #b5a8a5; --fg-muted: #9b8f91;
  --hl: #d8992f; --accent: #b94738; --link: #efe4d9;
  --rule: #352e39; --ok: #61c554; --selection: #d8992f44;
  --wrap: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--fg);
  font-family: 'JetBrains Mono', Menlo, monospace;
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
body { overflow-x: hidden; }
::selection { background: var(--selection); color: var(--fg); }
a { color: var(--link); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; border-radius: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

header.top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); }
header.top .bar { max-width: var(--wrap); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 22px; }
.brand { color: var(--fg); font-weight: 700; font-size: 15px; }
.brand .accent { color: var(--hl); }
nav.primary { display: flex; gap: 18px; font-size: 12px; }
nav.primary a { color: var(--fg-dim); }
nav.primary a:hover { color: var(--hl); }
.kofi { margin-left: auto; font-size: 12px; color: var(--hl); white-space: nowrap; }
.kofi img { vertical-align: -2px; }
@media (max-width: 640px) { nav.primary { display: none; } .kofi-label { display: none; } }

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 72px 0 64px; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 44px 0 40px; } }
.eyebrow { color: var(--fg-muted); font-size: 12px; margin: 0 0 18px; }
.eyebrow .p { color: var(--hl); }
h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 18px; text-wrap: balance; }
h1 .accent { color: var(--hl); }
.lede { color: var(--fg-dim); font-size: 15px; max-width: 520px; margin: 0 0 22px; text-wrap: pretty; }
.privacy {
  display: inline-flex; align-items: center; gap: 7px; color: var(--ok); font-size: 12px;
  border: 1px solid var(--rule); border-left: 2px solid var(--ok);
  background: var(--bg-2); padding: 6px 12px; border-radius: 3px; margin: 0 0 28px;
}
.privacy::before { content: '●'; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 700;
  padding: 11px 18px; border-radius: 4px; border: 1px solid var(--rule); transition: background .15s, border-color .15s, color .15s; }
.btn.primary { background: var(--hl); color: var(--bg); border-color: var(--hl); }
.btn.primary:hover { background: #e6a83d; }
.btn.ghost { color: var(--fg); background: var(--bg-2); }
.btn.ghost:hover { border-color: var(--hl); color: var(--hl); }

.term { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 28px 70px -20px #000a, 0 0 0 1px #0003; overflow: hidden; min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--bg-3); border-bottom: 1px solid var(--rule); flex: none; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-4); }
.term-bar i:nth-child(1) { background: var(--accent); }
.term-bar i:nth-child(2) { background: var(--hl); }
.term-bar i:nth-child(3) { background: #5a8f4e; }
.term-bar .t { margin-left: 10px; color: var(--fg-muted); font-size: 11px; }
.term-body { height: 340px; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px; font-size: 13px; line-height: 1.7; cursor: text;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
@media (max-width: 900px) { .term-body { height: 320px; } }
.term-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 14px; border-top: 1px solid var(--rule); background: var(--bg-3); font-size: 11px; color: var(--fg-muted); }
.term-foot kbd { font: inherit; color: var(--fg-dim); background: var(--bg-2); border: 1px solid var(--rule); border-radius: 3px; padding: 0 5px; margin-right: 2px; }
.term-help { font: inherit; font-size: 11px; color: var(--hl); background: none; border: 1px solid var(--rule); border-radius: 3px; padding: 1px 8px; cursor: pointer; }
.term-help:hover { border-color: var(--hl); }
.term .intro { opacity: 0; animation: appear .01s forwards; }
@keyframes appear { to { opacity: 1; } }
.term .line { white-space: pre-wrap; word-break: break-word; }
.term .ps { white-space: pre; flex-shrink: 0; color: var(--fg-muted); }
.term .ps .u, .term .ps .h { color: var(--hl); }
.term .ps .at, .term .ps .p { color: var(--fg-muted); }
.term .ps .hl { color: var(--fg); }
.term .cmd-echo { color: var(--fg); margin-left: 1ch; }
.term .hl { color: var(--hl); }
.term .dim { color: var(--fg-dim); }
.term .muted { color: var(--fg-muted); }
.term .accent { color: var(--accent); }
.term .ok { color: var(--ok); }
.term .err { color: var(--accent); }
.term .ls { list-style: none; margin: 2px 0 10px; padding: 0; }
.term .ls a { color: var(--link); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.term .ls a .n { color: var(--hl); font-weight: 600; }
.term .ls a:hover .n { text-decoration: underline; text-underline-offset: 3px; }
.term .ls .c { color: var(--fg-muted); text-align: right; }
@media (max-width: 420px) { .term .ls a { grid-template-columns: minmax(0, 1fr); gap: 0; } .term .ls .c { text-align: left; font-size: 11px; margin-bottom: 4px; } }
.term .input-line { display: flex; align-items: baseline; margin-top: 2px; }
.term .input { flex: 0 1 auto; min-width: 1ch; max-width: 100%; background: transparent; border: none; outline: none; color: var(--fg); font: inherit; caret-color: transparent; margin-left: 1ch; padding: 0; }
.term .input.ghost { color: var(--fg-muted); font-style: italic; }
@media (pointer: coarse) { .term .input { font-size: 16px; } }
.term .cursor { display: inline-block; width: .55em; height: 1em; background: var(--fg-muted); vertical-align: -2px; animation: blink 1.05s steps(1) infinite; flex-shrink: 0; }
.term .input:focus + .cursor { background: var(--hl); }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .term .intro { opacity: 1; animation: none; } .term .cursor { animation: none; } html { scroll-behavior: auto; } }
.term pre { margin: 0; font: inherit; }
.term .banner { color: var(--hl); line-height: 1.2; font-size: 11px; overflow-x: auto; }
.term .help-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 16px; font-size: 12px; }
.term .help-grid .c { color: var(--hl); white-space: nowrap; }
.term .help-grid .d { color: var(--fg-dim); }
.term .help-section { color: var(--hl); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin: 10px 0 4px; opacity: .85; }
@media (max-width: 480px) { .term .help-grid { grid-template-columns: minmax(0, 1fr); gap: 0; } .term .help-grid .d { margin-bottom: 4px; } }
.term .ls-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 1px 12px; font-size: 12px; }
.term .ls-grid .perm { display: none; }
.term .ls-grid .name.dir { color: var(--hl); }
.term .ls-grid .name.dir::after { content: '/'; color: var(--fg-muted); }
.term .ls-grid .name.file { color: var(--fg); }
.term .ls-grid .meta { color: var(--fg-muted); font-size: 11px; text-align: right; }
@media (max-width: 480px) { .term .ls-grid { grid-template-columns: max-content minmax(0, 1fr); } .term .ls-grid .meta { display: none; } }
.term .pd-card, .term .info-card, .term .md { background: var(--bg); border: 1px solid var(--rule); border-left: 2px solid var(--hl); border-radius: 3px; padding: 12px 14px; margin: 6px 0; font-size: 12px; }
.term .pd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px dashed var(--rule); padding-bottom: 6px; margin-bottom: 10px; }
.term .pd-name { font-size: 15px; font-weight: 700; color: var(--fg); }
.term .pd-name::before { content: '◆ '; color: var(--hl); }
.term .pd-name.with-icon { display: flex; align-items: center; gap: 8px; }
.term .pd-name.with-icon::before { content: none; }
.term .pd-icon { width: 22px; height: 22px; border-radius: 5px; display: block; }
.term .pd-stars { color: var(--hl); font-size: 11px; }
.term .pd-desc, .term .pd-why { color: var(--fg-dim); margin-bottom: 8px; text-wrap: pretty; }
.term .pd-label { font-size: 10px; color: var(--hl); letter-spacing: .08em; text-transform: uppercase; margin: 10px 0 4px; }
.term .pd-tags { font-size: 11px; color: var(--fg-muted); margin-top: 6px; }
.term .pd-tags span { margin-right: 10px; }
.term .pd-tags span::before { content: '#'; color: var(--accent); }
.term .pd-actions { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule); display: flex; gap: 8px; flex-wrap: wrap; }
.term .btn { background: transparent; border: 1px solid var(--rule); color: var(--fg-dim); padding: 4px 10px; font: inherit; font-size: 11px; font-weight: 400; border-radius: 3px; cursor: pointer; }
.term .btn:hover { border-color: var(--hl); color: var(--hl); }
.term .btn.primary { background: var(--hl); color: var(--bg); border-color: var(--hl); font-weight: 700; }
.term .btn.primary:hover { background: #e6a83d; color: var(--bg); }
.term .info-card .row { display: flex; gap: 12px; }
.term .info-card .k { color: var(--fg-muted); width: 9ch; flex-shrink: 0; }
.term .info-card a { color: var(--link); border-bottom: 1px dotted var(--link); overflow-wrap: anywhere; }
.term .info-card a:hover { color: var(--hl); border-color: var(--hl); }
.term .md h1 { font-size: 15px; margin: 0 0 4px; }
.term .md .meta { font-size: 11px; color: var(--fg-muted); margin-bottom: 10px; }
.term .md p { color: var(--fg-dim); margin: 0 0 8px; }
.term .sign-prompt { border-left: 2px solid var(--accent); padding: 8px 12px; margin: 6px 0; background: var(--bg); border-radius: 0 3px 3px 0; }
.term .sign-prompt .q { color: var(--fg-dim); font-size: 12px; margin-bottom: 6px; }
.term .sign-prompt input { width: 100%; background: var(--bg-2); border: 1px solid var(--rule); color: var(--fg); padding: 5px 8px; font: inherit; font-size: 13px; border-radius: 2px; outline: none; }
@media (pointer: coarse) { .term .sign-prompt input { font-size: 16px; } }
.term .sign-prompt input:focus { border-color: var(--hl); }
.term .sign-prompt .hint { color: var(--fg-muted); font-size: 11px; margin-top: 6px; }
.term .sign-prompt .hint kbd { background: var(--bg-3); padding: 0 5px; border: 1px solid var(--rule); border-radius: 2px; font-size: 10px; color: var(--fg); }
.term .gb-entry { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 12px; }
.term .gb-entry .when { color: var(--fg-muted); font-size: 11px; }
.term .gb-entry .who { color: var(--hl); font-weight: 600; }
.term .gb-entry .who::before { content: '@'; color: var(--fg-muted); font-weight: 400; }
.term .now-report { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; font-size: 12px; border-left: 2px solid var(--ok); padding: 8px 12px; background: var(--bg); border-radius: 0 3px 3px 0; }
.term .now-report .k { color: var(--fg-muted); }
.term .now-report .v { color: var(--fg-dim); }
.term .now-report .v.hl { color: var(--hl); }

section.block { padding: 56px 0; border-top: 1px solid var(--rule); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 26px; }
h2 { font-size: 22px; letter-spacing: -0.02em; font-weight: 800; margin: 0; }
h2 .path { color: var(--fg-muted); font-weight: 500; font-size: 13px; letter-spacing: 0; display: block; margin-bottom: 6px; }
.sec-note { color: var(--fg-muted); font-size: 12px; margin: 0; }

.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .products { grid-template-columns: minmax(0, 1fr); } }
.product { position: relative; display: flex; flex-direction: column; border: 1px solid var(--rule); border-left: 2px solid var(--hl);
  background: var(--bg-2); border-radius: 6px; padding: 24px; transition: border-color .15s, background .15s; }
.product:hover { border-color: var(--hl); background: var(--bg-3); }
.p-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.p-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--bg); border: 1px solid var(--rule); color: var(--hl); }
.p-ico svg { width: 22px; height: 22px; }
.p-ico img { width: 24px; height: 24px; }
.p-name { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.p-name a { color: var(--fg); }
.p-name a::after { content: ''; position: absolute; inset: 0; border-radius: 6px; }
.p-url { color: var(--fg-muted); font-size: 11px; }
.p-tag { margin-left: auto; align-self: flex-start; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bg); background: var(--hl); padding: 2px 7px; border-radius: 2px; font-weight: 700; }
.p-desc { color: var(--fg-dim); font-size: 13px; margin: 0 0 16px; text-wrap: pretty; }
.p-links { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; font-size: 12px; }
@media (max-width: 420px) { .p-links { grid-template-columns: minmax(0, 1fr); } }
.p-links a { position: relative; z-index: 1; color: var(--fg-dim); }
.p-links a::before { content: '→ '; color: var(--fg-muted); }
.p-links a:hover { color: var(--hl); }
.p-open { margin-top: auto; font-size: 12px; font-weight: 700; color: var(--hl); }

.exts { margin-top: 24px; display: grid; gap: 10px; }
.ext-label { color: var(--fg-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.ext .t span.badge { display: inline-block; max-width: 120px; margin-left: 6px; font-size: 9px; line-height: 1.5; text-transform: uppercase; letter-spacing: .08em; color: var(--bg); background: var(--hl); padding: 1px 6px; border-radius: 2px; font-weight: 700; vertical-align: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext img { border-radius: 6px; }
.ext { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg-2); padding: 16px 20px; }
.ext img { width: 28px; height: 28px; }
.ext .t { flex: 1 1 280px; min-width: 0; }
.ext .t strong { color: var(--fg); }
.ext .t span { color: var(--fg-dim); font-size: 12px; display: block; }
.ext a.go { color: var(--hl); font-size: 12px; font-weight: 700; }
@media (min-width: 640px) { .ext a.go { white-space: nowrap; } }

.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
@media (max-width: 860px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .principles { grid-template-columns: minmax(0, 1fr); } }
.principle { background: var(--bg-2); padding: 22px 20px; }
.principle .k { color: var(--hl); font-size: 12px; margin-bottom: 8px; }
.principle h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.principle p { margin: 0; color: var(--fg-dim); font-size: 12px; text-wrap: pretty; }

.popular { columns: 3 220px; column-gap: 28px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.popular li { break-inside: avoid; padding: 5px 0; border-bottom: 1px dashed var(--rule); display: flex; justify-content: space-between; gap: 12px; }
.popular a { color: var(--fg); }
.popular a:hover { color: var(--hl); }
.popular .where { color: var(--fg-muted); font-size: 11px; white-space: nowrap; }

.about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 760px) { .about { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.about p { color: var(--fg-dim); margin: 0 0 14px; max-width: 580px; text-wrap: pretty; }
.about p strong { color: var(--fg); font-weight: 600; }
.contact { background: var(--bg-2); border: 1px solid var(--rule); border-radius: 6px; padding: 18px 20px; font-size: 13px; }
.contact dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.contact dt { color: var(--fg-muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }
.contact dd a:hover { color: var(--hl); }

footer.site { border-top: 1px solid var(--rule); margin-top: 24px; padding: 28px 0 48px; color: var(--fg-muted); font-size: 12px; }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 14px; }
footer.site a { color: var(--fg-dim); }
footer.site a:hover { color: var(--hl); }

.term .intro.d1 { animation-delay: .15s; }
.term .intro.d2 { animation-delay: .55s; }
.term .intro.d3 { animation-delay: .95s; }
.term .intro.d4 { animation-delay: 1.35s; }
.term .intro.d5 { animation-delay: 1.6s; }
.term pre.wrap { white-space: pre-wrap; }
.term pre.tight { line-height: 1.3; }
.term .help-hint { margin-top: 8px; font-size: 12px; }
.term .brand-lg { font-size: 16px; font-weight: 700; }
.term .matrix { color: #4ae04a; }
#about-h { margin-bottom: 16px; }
a.hl-link { color: var(--hl) !important; }
