/* ryke forge — visual system.
 *
 * Identity: a precise "instrument panel" for an agent-native VCS. The one
 * memorable device is the mono/sans duality — machine truth (ids, branches,
 * actors, the op-log) is set in monospace; human narration (prose, headings,
 * READMEs) in sans — plus the recurring provenance line (Human/Agent chip +
 * signature seal). Brand accent is iris (keys/crypto); teal = human, amber =
 * agent, green = signed. Light/dark via prefers-color-scheme. */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --bg: #fafafc;
  --surface: #ffffff;
  --surface-2: #f4f4f8;
  --border: #e6e6ee;
  --border-strong: #d2d2de;
  --ink: #16161c;
  --muted: #6a6a78;
  --faint: #9a9aa8;

  --iris: #5a4fcf;
  --iris-hover: #4a40b8;
  --iris-soft: #ecebfb;
  --on-iris: #ffffff;

  --human: #0e8b7e;
  --human-soft: #e2f6f2;
  --agent: #a85a0b;
  --agent-soft: #fbefdf;

  --ok: #16a34a;
  --ok-soft: #e5f6ea;
  --danger: #c4351f;
  --danger-soft: #fcecea;
  --warn: #a86a0b;

  --add-bg: #e6f6ec;
  --add-gutter: #cdeed8;
  --del-bg: #fcebe9;
  --del-gutter: #f6d5d1;

  --radius: 7px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 1px 1px rgba(20, 20, 40, .04);
  --shadow-pop: 0 6px 24px rgba(20, 20, 40, .14);
  --tap: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d12;
    --surface: #16161d;
    --surface-2: #1e1e28;
    --border: #262631;
    --border-strong: #363644;
    --ink: #ececf2;
    --muted: #9797a6;
    --faint: #6b6b7a;

    --iris: #8b82f0;
    --iris-hover: #a29bf6;
    --iris-soft: #211f3a;
    --on-iris: #12101f;

    --human: #2dd4bf;
    --human-soft: #10312e;
    --agent: #f5a524;
    --agent-soft: #33240c;

    --ok: #4ade80;
    --ok-soft: #123020;
    --danger: #f87171;
    --danger-soft: #33191a;
    --warn: #f5a524;

    --add-bg: rgba(45, 212, 191, .10);
    --add-gutter: rgba(45, 212, 191, .20);
    --del-bg: rgba(248, 113, 113, .10);
    --del-gutter: rgba(248, 113, 113, .22);

    --shadow: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-pop: 0 8px 30px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--iris); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -.01em; }

code, kbd, pre, samp, .mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--iris-soft); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 460px; margin: 0 auto; padding: 0 24px; }

/* ---- top bar --------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand .spark {
  width: 11px; height: 11px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--iris), color-mix(in srgb, var(--iris) 55%, var(--human)));
  box-shadow: 0 0 0 3px var(--iris-soft);
}
.brand .dim { color: var(--faint); font-weight: 500; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topnav .who {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  padding: 0 6px;
}

/* ---- buttons & inputs ------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  line-height: 1;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--iris);
  border-color: var(--iris);
  color: var(--on-iris);
}
.btn-primary:hover { background: var(--iris-hover); border-color: var(--iris-hover); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border-strong)); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

label.field { display: block; margin-bottom: 16px; }
label.field > .lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
label.field > .hint { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="password"], input[type="email"], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}
input.mono { font-family: var(--font-mono); }
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--iris); outline: none; box-shadow: 0 0 0 3px var(--iris-soft); }

.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card {
  flex: 1 1 200px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.radio-card:hover { background: var(--surface-2); }
.radio-card input { width: auto; margin-top: 3px; }
.radio-card .rc-title { font-weight: 600; font-size: 14px; }
.radio-card .rc-desc { font-size: 13px; color: var(--muted); }

/* ---- panels & layout building blocks --------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-pad { padding: 20px; }
.panel-hd {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.panel-hd h2 { font-size: 14px; font-weight: 650; }
.stack > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { margin-left: auto; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
section { margin: 28px 0; }
main { padding-bottom: 64px; }

/* ---- pills / badges -------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  background: var(--surface);
  line-height: 1.5;
}
.pill-vis-public { color: var(--human); border-color: color-mix(in srgb, var(--human) 40%, var(--border)); background: var(--human-soft); }
.pill-vis-private { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); background: var(--agent-soft); }
.pill-default { color: var(--iris); border-color: color-mix(in srgb, var(--iris) 45%, var(--border)); background: var(--iris-soft); }

.id {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ---- provenance line: the signature element -------------------------- */

.actor {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  vertical-align: middle;
}
.actor .mark {
  width: 13px; height: 13px;
  flex: none;
  display: inline-block;
}
.actor.human .mark {
  background: var(--human);
  border-radius: 3px;
  box-shadow: 0 0 0 3px var(--human-soft);
}
.actor.agent .mark {
  background: var(--agent);
  transform: rotate(45deg) scale(.82);
  box-shadow: 0 0 0 3px var(--agent-soft);
}
.actor .who-name { font-weight: 600; }
.actor .who-role {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
}
.actor.human .who-role { color: var(--human); }
.actor.agent .who-role { color: var(--agent); }
.actor .sub { color: var(--muted); font-weight: 400; }

.seal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px 1px 5px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
}
.seal svg { width: 12px; height: 12px; }
.seal.signed { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 42%, var(--border)); background: var(--ok-soft); }
.seal.unsigned { color: var(--faint); border-style: dashed; }

.op-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.op-tag.k-save { color: var(--human); border-color: color-mix(in srgb, var(--human) 35%, var(--border)); }
.op-tag.k-push { color: var(--iris); border-color: color-mix(in srgb, var(--iris) 35%, var(--border)); }
.op-tag.k-branchcreate, .op-tag.k-branchdelete { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, var(--border)); }
.op-tag.k-undo { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, var(--border)); }
.op-tag.k-merge, .op-tag.k-resolve { color: var(--agent); border-color: color-mix(in srgb, var(--agent) 32%, var(--border)); }

/* ---- repo header + tabs ---------------------------------------------- */

.repohead { padding-top: 26px; }
.repohead .title {
  font-family: var(--font-mono);
  font-size: 21px;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.repohead .title .owner { color: var(--muted); font-weight: 500; }
.repohead .title .slash { color: var(--faint); font-weight: 400; }
.repohead .title .name { color: var(--ink); font-weight: 700; }
.repohead .desc { color: var(--muted); margin-top: 6px; max-width: 70ch; }

.tabs {
  display: flex;
  gap: 2px;
  margin-top: 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  padding: 10px 13px 12px;
  border-top: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); border-radius: 6px 6px 0 0; }
.tab.active { color: var(--ink); font-weight: 650; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: -1px;
  height: 2px;
  background: var(--iris);
  border-radius: 2px 2px 0 0;
}
.tab .count { color: var(--faint); }

/* ---- clone box ------------------------------------------------------- */

.clonebox {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 460px;
}
.clonebox .lead {
  display: flex; align-items: center;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}
.clonebox input {
  border: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surface);
}
.clonebox input:focus { box-shadow: none; }
.clonebox .copy {
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  padding: 0 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.clonebox .copy:hover { background: var(--surface-2); color: var(--ink); }
.clonebox .copy.done { color: var(--ok); }

/* ---- file browser ---------------------------------------------------- */

.lastsnap {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px;
}
.lastsnap .msg { color: var(--ink); }

.filelist { list-style: none; margin: 0; padding: 0; }
.filelist li { border-top: 1px solid var(--border); }
.filelist li:first-child { border-top: 0; }
.filerow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 14px;
}
.filerow:hover { background: var(--surface-2); text-decoration: none; }
.filerow .glyph { width: 16px; text-align: center; color: var(--muted); flex: none; }
.filerow.dir .glyph { color: var(--iris); }
.filerow.conflict .glyph { color: var(--danger); }
.filerow .fname { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); }
.filerow .fsize { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.crumbs { font-family: var(--font-mono); font-size: 14px; }
.crumbs a { color: var(--iris); }
.crumbs .sep { color: var(--faint); padding: 0 3px; }

/* ---- code / blob ----------------------------------------------------- */

.code {
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  background: var(--surface);
}
.code table { border-collapse: collapse; width: 100%; }
.code td { padding: 0; vertical-align: top; }
.code .ln {
  width: 1%;
  min-width: 44px;
  text-align: right;
  padding: 0 12px 0 16px;
  color: var(--faint);
  user-select: none;
  white-space: nowrap;
  border-right: 1px solid var(--border);
}
.code .lc { padding: 0 16px; white-space: pre; color: var(--ink); }
.code tr:hover .ln { color: var(--muted); }

.blob-note { padding: 40px; text-align: center; color: var(--muted); }

/* ---- diff ------------------------------------------------------------ */

.difffile { margin-top: 16px; }
.difffile .df-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.diff {
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
}
.diff table { border-collapse: collapse; width: 100%; }
.diff td { padding: 0 16px; white-space: pre; }
.diff td.g { width: 1%; min-width: 30px; text-align: right; padding: 0 8px; color: var(--faint); user-select: none; }
.diff tr.add { background: var(--add-bg); }
.diff tr.add td.g { background: var(--add-gutter); color: color-mix(in srgb, var(--ink) 55%, transparent); }
.diff tr.del { background: var(--del-bg); }
.diff tr.del td.g { background: var(--del-gutter); color: color-mix(in srgb, var(--ink) 55%, transparent); }
.diff tr.ctx td.line { color: var(--muted); }
.diff .sign { width: 1%; padding: 0 6px 0 10px; color: var(--faint); user-select: none; }
.diff-trunc { padding: 8px 16px; color: var(--muted); font-size: 12px; }

/* ---- generic table (branches, ops) ---------------------------------- */

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--faint);
  font-weight: 600;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; }

/* ---- hero (dashboard) ------------------------------------------------ */

.hero { padding: 64px 0 32px; }
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--iris);
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin-top: 14px;
  max-width: 16ch;
  font-weight: 700;
}
.hero h1 .mono { font-family: var(--font-mono); font-weight: 700; color: var(--iris); }
.hero .lede { font-size: 18px; color: var(--muted); margin-top: 18px; max-width: 56ch; }
.hero .cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

.provsample {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 620px;
}
.provsample .ps-hd {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.provsample .ps-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.provsample .ps-row:first-of-type { border-top: 0; }
.provsample .ps-msg { color: var(--ink); }
.provsample .ps-row .spacer { margin-left: auto; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 20px; }
.feature .fnum {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--iris);
  font-weight: 700;
}
.feature h3 { font-size: 16px; margin: 10px 0 8px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

.repocard {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 16px;
  border-top: 1px solid var(--border);
}
.repocard:first-child { border-top: 0; }
.repocard .rname { font-family: var(--font-mono); font-size: 15px; font-weight: 650; }
.repocard .rdesc { color: var(--muted); font-size: 14px; width: 100%; margin-top: 2px; }

/* ---- README rendering ------------------------------------------------ */

.readme { padding: 28px 32px; }
.readme > *:first-child { margin-top: 0; }
.readme h1, .readme h2, .readme h3, .readme h4 { margin: 26px 0 12px; }
.readme h1 { font-size: 26px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.readme h2 { font-size: 21px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.readme h3 { font-size: 17px; }
.readme p, .readme ul, .readme ol { margin: 12px 0; }
.readme ul, .readme ol { padding-left: 26px; }
.readme li { margin: 4px 0; }
.readme code {
  font-size: 85%;
  background: var(--surface-2);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.readme pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
}
.readme pre code { background: none; border: 0; padding: 0; font-size: 12.5px; }
.readme blockquote {
  margin: 12px 0;
  padding: 2px 16px;
  border-left: 3px solid var(--border-strong);
  color: var(--muted);
}
.readme hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.readme a { color: var(--iris); }

/* ---- notices --------------------------------------------------------- */

.notice {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-size: 14px;
  background: var(--surface-2);
}
.notice.error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: var(--danger-soft); }
.notice.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: var(--ok-soft); }

.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty .big { font-size: 16px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.empty p { max-width: 48ch; margin: 6px auto 0; }

/* history pagination controls */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.pager > div { flex: 1; display: flex; }
.pager > div:last-child { justify-content: flex-end; }

.tokenshow {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

.danger-zone {
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border));
  border-radius: var(--radius);
}
.danger-zone .panel-hd { border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); color: var(--danger); }

/* ---- branch selector (native <details>) ------------------------------ */

.refselect { position: relative; display: inline-block; }
.refselect > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.refselect > summary::-webkit-details-marker { display: none; }
.refselect > summary::after { content: "▾"; color: var(--faint); font-size: 11px; }
.refselect > summary:hover { background: var(--surface-2); }
.refselect .menu {
  position: absolute;
  z-index: 30;
  margin-top: 5px;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 5px;
}
.refselect .menu .mhd {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
  padding: 6px 8px;
}
.refselect .menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}
.refselect .menu a:hover { background: var(--surface-2); text-decoration: none; }
.refselect .menu a.cur { color: var(--iris); font-weight: 650; }

.inline-form { display: inline-flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }

/* ---- footer ---------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0;
  color: var(--faint);
  font-size: 13px;
}
.foot .foot-in { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot .brand-mini { font-family: var(--font-mono); font-weight: 700; color: var(--muted); }

/* ---- quick start (empty repo) ---------------------------------------- */

.qs-step { padding: 18px 20px; border-top: 1px solid var(--border); }
.qs-step:first-of-type { border-top: 0; }
.qs-h {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 8px;
}
.qs-clone { max-width: none; width: 100%; }
.qs-note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.cmd { position: relative; }
.cmd-pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  padding-right: 66px;
  overflow-x: auto;
  color: var(--ink);
  white-space: pre;
}
.cmd-pre .c-comment { color: var(--faint); }
.cmd-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.cmd-copy:hover { background: var(--surface-2); color: var(--ink); }
.cmd-copy.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 42%, var(--border)); }

/* ---- error / not-found page ------------------------------------------ */

.errpage { padding: 88px 0 64px; text-align: center; }
.err-code {
  display: block;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--iris);
}
.err-eyebrow {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--faint);
}
.err-title { font-size: 24px; margin-top: 12px; }
.err-detail { color: var(--muted); margin: 10px auto 0; max-width: 44ch; }
.err-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- responsive ------------------------------------------------------ */

@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .wrap, .topbar-in { padding: 0 16px; }
  .hero { padding: 40px 0 24px; }
  /* Clone box drops below the repo title and spans the row. */
  .repohead .row .clonebox, .clonebox { max-width: none; width: 100%; }
  .repohead .row .spacer { display: none; }
  .errpage { padding: 56px 0 40px; }
  .err-code { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .topbar { backdrop-filter: none; }
}
