:root {
  color-scheme: dark;
  font-size: 80%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #050505;
  color: #f0f0f0;
  --bg: #050505;
  --surface: #0b0b0b;
  --surface-raised: #111;
  --border: #2a2a2a;
  --border-strong: #505050;
  --text: #f0f0f0;
  --muted: #aaa;
  --focus: #fff;
  --danger: #ff9a9f;
  --danger-bg: #32191c;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); line-height: 1.5; padding-bottom: env(safe-area-inset-bottom); }
a { color: #eee; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10; padding: .65rem .9rem; background: #eee; color: #050505; font-weight: 800; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell { width: min(1180px, calc(100% - clamp(1.25rem, 5vw, 4rem))); margin-inline: auto; }
.top { border-bottom: 1px solid var(--border); background: #090909; box-shadow: 0 8px 32px #000; padding-top: env(safe-area-inset-top); }
.top .shell { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { color: var(--text); font-weight: 800; font-size: 1.05rem; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--text); }
nav { display: flex; align-items: center; justify-content: flex-end; gap: .85rem; flex-wrap: wrap; }
nav a { white-space: nowrap; }
.admin-links { justify-content: flex-start; gap: .55rem 1rem; margin-block: 1rem 1.5rem; }
main { padding: clamp(1.5rem, 4vw, 3.5rem) 0 4rem; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.03em; }
h1 { margin: 0 0 1.5rem; font-size: clamp(1.55rem, 2.4vw, 2.15rem); }
h2 { margin-top: 0; font-size: 1.05rem; }
p { margin-block: .75rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.card { margin: 1rem 0; padding: clamp(1rem, 2.5vw, 1.5rem); background: var(--surface-raised); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 14px 30px #000; }
.card h2 { color: var(--text); }
.notice { border-color: var(--border-strong); background: #171717; }
.error { border-color: #8e4048; background: var(--danger-bg); }
label { display: block; margin: 1rem 0 .4rem; color: #ddd; font-size: .9rem; }
input, select, button, textarea { min-height: 36px; font: inherit; }
input, select, textarea { width: 100%; padding: .65rem .75rem; border: 1px solid var(--border-strong); border-radius: 3px; background: #080808; color: var(--text); }
textarea { resize: vertical; }
select { cursor: pointer; }
input::placeholder { color: #888; }
button, .button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: .4rem; padding: .45rem .8rem; border: 1px solid #eee; border-radius: 3px; background: #eee; color: #050505; font-weight: 800; line-height: 1.15; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #fff; color: #000; }
button.secondary, .button.secondary { border-color: var(--border-strong); background: #1a1a1a; color: #eee; }
button.secondary:hover, .button.secondary:hover { border-color: #ddd; background: #292929; color: #fff; }
button.danger, .button.danger { border-color: var(--danger); background: var(--danger-bg); color: #ffd9dc; }
button.danger:hover, .button.danger:hover { background: #5a2028; }
button:disabled { cursor: not-allowed; opacity: .55; }
form.inline { display: inline-flex; margin: .2rem; }
.language { display: inline-flex; align-items: center; gap: .4rem; }
.language label { margin: 0; }
.top nav select, .top nav button { height: 36px; min-height: 36px; }
.language select { width: auto; min-width: 5rem; padding-block: .3rem; }
.language button { padding-block: .3rem; }
.confirm { display: block; margin: .65rem 0; color: var(--muted); font-size: .83rem; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.status { display: inline-block; padding: .16rem .55rem; border: 1px solid var(--border-strong); border-radius: 999px; color: #eee; font-size: .78rem; white-space: nowrap; }
.amount { color: var(--text); font-size: 1.65rem; font-weight: 800; }
.row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
code, .mono { font-family: inherit; color: #eee; overflow-wrap: anywhere; }
.auth { width: min(100%, 480px); margin: clamp(1rem, 8vh, 5rem) auto; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .8rem .65rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; word-break: break-word; }
th { color: #ddd; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; word-break: normal; }
tbody tr:hover { background: #191919; }
.kv-table { font-size: .88rem; }
.kv-table th { width: 30%; color: var(--muted); font-size: .88rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.kv-table td { color: var(--text); }
.shell:has(.admin-links), .shell:has(.kv-table), .shell:has(.admin-form-card) { width: min(1680px, calc(100% - clamp(1.25rem, 3vw, 3rem))); }
.admin-form-card { width: 100%; }
dialog { width: min(100% - 2rem, 460px); padding: 0; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface-raised); color: var(--text); box-shadow: 0 24px 80px #000; }
dialog::backdrop { background: rgb(0 0 0 / .72); }
.dialog-body { padding: 1.25rem; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
.dialog-actions form { margin: 0; }
@media (max-width: 720px) {
  .top .shell { align-items: flex-start; flex-direction: column; padding-block: .75rem; }
  nav { width: 100%; justify-content: flex-start; gap: .55rem .8rem; }
  nav .small { max-width: 100%; overflow-wrap: anywhere; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .table-scroll { margin-inline: -.25rem; width: calc(100% + .5rem); padding-inline: .25rem; }
  table { display: block; width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
  .table-scroll table { display: table; width: 100%; min-width: 640px; max-width: none; overflow: visible; }
  .actions { align-items: stretch; flex-direction: column; }
  .actions form.inline, .actions .button { width: 100%; margin-inline: 0; }
  .actions button, .actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Public landing and user documentation. */
.public-page, .docs-page {
  --public-width: 1180px;
  background:
    linear-gradient(rgb(255 255 255 / .022) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .022) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
}
.public-shell { width: min(var(--public-width), calc(100% - clamp(1.5rem, 6vw, 5rem))); margin-inline: auto; }
.public-top { position: relative; z-index: 2; border-bottom: 1px solid var(--border); background: rgb(5 5 5 / .92); padding-top: env(safe-area-inset-top); }
.public-top .public-shell { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand-large { font-size: 1.2rem; letter-spacing: -.06em; }
.prompt-mark { color: #777; animation: prompt-blink 1.1s steps(1, end) infinite; }
@keyframes prompt-blink { 50% { opacity: 0; } }
.hero { min-height: min(720px, calc(100vh - 76px)); padding-block: clamp(4rem, 10vw, 8rem); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr); align-items: center; gap: clamp(2.5rem, 7vw, 6rem); }
.eyebrow, .section-index { color: #a7a7a7; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: .75rem 0 1.5rem; font-size: clamp(3rem, 7vw, 6.7rem); line-height: .92; letter-spacing: -.075em; }
.hero h1 span { color: #858585; }
.hero-lead { max-width: 690px; color: #c5c5c5; font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.65; }
.hero-actions { margin-top: 2rem; display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; }
.hero-actions .button { min-height: 44px; padding-inline: 1.15rem; }
.hero-note { margin-top: 1.2rem; color: #777; font-size: .78rem; }
.terminal-window { min-width: 0; overflow: hidden; border: 1px solid #333; border-radius: 7px; background: #090909; box-shadow: 0 32px 100px #000, inset 0 1px rgb(255 255 255 / .04); transform: rotate(.8deg); }
.terminal-title { min-height: 42px; padding: 0 .85rem; display: flex; align-items: center; gap: .45rem; border-bottom: 1px solid #262626; background: #111; color: #777; }
.terminal-title span { width: 8px; height: 8px; border: 1px solid #666; border-radius: 50%; }
.terminal-title b { margin-left: .45rem; font-size: .72rem; font-weight: 400; }
.terminal-window pre { min-height: 330px; margin: 0; padding: clamp(1.25rem, 3vw, 2rem); overflow: auto; color: #f2f2f2; font: inherit; font-size: clamp(.76rem, 1.2vw, .92rem); line-height: 1.9; }
.terminal-dim { color: #777; }
.terminal-ok { color: #d0d0d0; }
.public-section { padding-block: clamp(4rem, 9vw, 8rem); border-top: 1px solid var(--border); }
.public-section > h2, .public-cta h2 { max-width: 800px; margin: .7rem 0 2.5rem; font-size: clamp(2rem, 4vw, 4.1rem); letter-spacing: -.055em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); background: var(--bg); }
.feature-grid article { min-height: 270px; padding: clamp(1.4rem, 3vw, 2.2rem); border-right: 1px solid var(--border); }
.feature-grid article:last-child { border-right: 0; }
.feature-grid h3 { margin: 2.5rem 0 .8rem; font-size: 1.2rem; }
.feature-grid p { color: #aaa; line-height: 1.7; }
.feature-glyph { color: #777; font-size: 1.15rem; }
.steps ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; counter-reset: landing-step; border-top: 1px solid #555; }
.steps li { position: relative; min-height: 190px; padding: 2rem 1.3rem 1rem 0; counter-increment: landing-step; border-right: 1px solid var(--border); }
.steps li::before { content: "0" counter(landing-step); display: block; margin-bottom: 3.5rem; color: #777; }
.steps li b, .steps li span { display: block; }
.steps li span { margin-top: .6rem; color: #999; line-height: 1.6; }
.plan-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 3rem; }
.plan-panel h2 { margin-bottom: 1rem; }
.plan-panel > div:first-child > p:last-child { max-width: 680px; color: #aaa; line-height: 1.7; }
.price { min-width: 230px; padding-left: 2rem; border-left: 1px solid var(--border-strong); }
.price strong, .price span, .price small { display: block; }
.price strong { font-size: clamp(3.5rem, 7vw, 6rem); line-height: .9; letter-spacing: -.08em; }
.price span { margin-top: .75rem; color: #bbb; }
.price small { margin-top: .35rem; color: #777; }
.public-cta { padding-block: clamp(5rem, 12vw, 10rem); border-block: 1px solid var(--border); background: #0a0a0a; }
.public-footer { background: #050505; color: #777; }
.public-footer .public-shell { min-height: 100px; display: flex; align-items: center; gap: 1rem; }
.public-footer nav { margin-left: auto; }
.auth-heading { margin-bottom: 2rem; display: flex; align-items: center; justify-content: space-between; }

.docs-brand { display: flex; align-items: baseline; }
.docs-label { margin-left: .4rem; color: #777; font-weight: 400; text-decoration: none; }
.docs-label:hover { color: #fff; }
.docs-layout { min-height: calc(100vh - 176px); display: grid; grid-template-columns: 235px minmax(0, 760px); gap: clamp(2rem, 7vw, 7rem); justify-content: start; }
.docs-sidebar { position: sticky; top: 0; align-self: start; max-height: 100vh; padding: 3rem 0; overflow-y: auto; }
.docs-tree-title { margin: 0 0 1rem; color: #777; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.docs-sidebar nav { display: flex; align-items: stretch; flex-direction: column; gap: .15rem; }
.docs-sidebar a { padding: .55rem .7rem; border-left: 1px solid #333; color: #999; text-decoration: none; }
.docs-sidebar a:hover { color: #fff; border-color: #888; }
.docs-sidebar a[aria-current="page"] { border-color: #fff; background: #111; color: #fff; }
.docs-main { min-width: 0; padding: 3rem 0 6rem; }
.docs-meta { padding-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); color: #777; font-size: .78rem; }
.markdown-body { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 1.03rem; line-height: 1.75; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body code, .markdown-body pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.markdown-body h1 { margin: 2.5rem 0 2rem; font-size: clamp(2.3rem, 5vw, 4rem); letter-spacing: -.06em; }
.markdown-body h2 { margin: 3rem 0 1rem; padding-top: 1rem; font-size: 1.5rem; }
.markdown-body h3 { margin-top: 2rem; font-size: 1.1rem; }
.markdown-body p, .markdown-body li { color: #c4c4c4; }
.markdown-body strong { color: #fff; }
.markdown-body pre { padding: 1rem 1.2rem; overflow-x: auto; border: 1px solid var(--border); border-radius: 4px; background: #090909; color: #f0f0f0; }
.markdown-body :not(pre) > code { padding: .12rem .35rem; border: 1px solid #333; border-radius: 3px; background: #101010; }
.markdown-body blockquote { margin-inline: 0; padding-left: 1.2rem; border-left: 2px solid #777; }
.docs-pager { margin-top: 4rem; padding-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.docs-pager a:last-child { text-align: right; }
.docs-footer .public-shell { justify-content: space-between; }

@media (max-width: 840px) {
  .public-top nav { width: auto; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .terminal-window { transform: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .feature-grid article:last-child { border-bottom: 0; }
  .feature-grid h3 { margin-top: 1.5rem; }
  .steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; }
  .docs-layout { grid-template-columns: 1fr; gap: 0; }
  .docs-sidebar { position: static; max-height: none; padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
  .docs-sidebar nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; }
  .docs-sidebar a { flex: 0 0 auto; border-left: 0; border-bottom: 1px solid #333; }
  .docs-sidebar a[aria-current="page"] { border-bottom-color: #fff; }
  .docs-main { padding-top: 1.5rem; }
}
@media (max-width: 560px) {
  .public-top .public-shell { min-height: 66px; }
  .public-top nav { width: auto; }
  .public-top nav .button { min-height: 36px; }
  .hero { padding-block: 3.5rem; }
  .hero h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .terminal-window pre { min-height: 290px; }
  .steps ol { grid-template-columns: 1fr; }
  .steps li { min-height: 0; padding-block: 1.3rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .steps li::before { margin-bottom: 1.5rem; }
  .plan-panel { grid-template-columns: 1fr; }
  .price { padding: 1.5rem 0 0; border-top: 1px solid var(--border-strong); border-left: 0; }
  .public-footer .public-shell { padding-block: 1.5rem; align-items: flex-start; flex-direction: column; }
  .public-footer nav { width: 100%; margin-left: 0; justify-content: flex-start; }
  .docs-top .brand-large { font-size: 1rem; }
  .markdown-body { font-size: .98rem; }
}
@media (prefers-reduced-motion: reduce) {
  .prompt-mark { animation: none; }
}
