/* Hub — component stylesheet. Every colour, length and face comes from tokens.css (var(--…));
   this file only arranges them. Classes are prefixed hub-. The markup contract is in index.d.ts. */

/* ---- ground ------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font-sans); font-size: 14.5px; line-height: 22px; -webkit-font-smoothing: antialiased; }
.hub-preview { padding: var(--space-4); }
.hub-preview-row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; padding: var(--space-4); }
.hub-wrap { width: min(var(--page-width), 100% - 2 * var(--space-4)); margin: 0 auto; }
a, .hub-link { color: var(--link); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover, .hub-link:hover { text-decoration-color: var(--ink); }
code, kbd, pre, .hub-mono { font-family: var(--font-mono); font-size: 13px; }
pre { margin: 0; line-height: 19.5px; white-space: pre; overflow: auto; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.hub-muted { color: var(--ink-2); } .hub-faint { color: var(--ink-3); }
.hub-hide { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- micro-label: the one voice of every head --------------------------------------------- */
.hub-label { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.hub-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin: var(--space-10) 0 0; padding-bottom: var(--space-2); border-bottom: var(--rule-weight) solid var(--rule); }
.hub-section-head h2 { margin: 0; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.hub-section-head a { font-size: 13.5px; line-height: 20px; }
.hub-page-head { padding: var(--space-8) 0 var(--space-5); }
.hub-page-head h1 { margin: 0 0 var(--space-2); font-family: var(--font-serif); font-size: 38px; line-height: 40px; font-weight: 400; letter-spacing: -0.005em; }
.hub-page-head p { margin: 0; font-size: 16px; line-height: 24px; color: var(--ink-2); max-width: 72ch; }
.hub-hint { font-size: 13.5px; line-height: 20px; color: var(--ink-3); }
.hub-count { font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink-2); margin: var(--space-3) 0 var(--space-2); }

/* ---- Mark: the formula --------------------------------------------------------------------- */
.hub-mark { font-family: var(--font-serif); font-size: 26px; line-height: 26px; font-weight: 400; color: var(--ink); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: baseline; }
.hub-mark var { font-style: italic; font-weight: 400; }
.hub-mark .rel { font-style: normal; margin: 0 0.28em; color: var(--ink-3); }
.hub-mark .word { font-style: normal; letter-spacing: 0.005em; }
.hub-mark-lg { font-size: 64px; line-height: 64px; }
.hub-mark-sm { font-size: 18px; line-height: 18px; }

/* ---- Header -------------------------------------------------------------------------------- */
.hub-header { background: var(--surface); border-bottom: var(--rule-weight) solid var(--rule); position: sticky; top: 0; z-index: 20; }
.hub-header-inner { display: flex; align-items: stretch; height: var(--header-height); }
.hub-header-inner > .hub-mark { align-self: center; padding-right: var(--space-6); border-right: var(--hair-weight) solid var(--line); height: 100%; display: inline-flex; align-items: center; }
.hub-nav { display: flex; align-items: stretch; }
.hub-nav a { display: flex; align-items: center; padding: 0 var(--space-4); font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); text-decoration: none; border-right: var(--hair-weight) solid var(--line); }
.hub-nav a:hover { color: var(--ink); background: var(--surface-2); }
.hub-nav a.on { color: var(--mark-ink); background: var(--mark); }
.hub-header-tools { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.hub-search { position: relative; display: flex; align-items: center; width: 320px; max-width: 100%; }
.hub-search .hub-input { width: 100%; padding-right: 36px; font-family: var(--font-mono); font-size: 13px; }
.hub-search kbd { position: absolute; right: var(--space-2); top: 50%; transform: translateY(-50%); font-size: 11px; line-height: 14px; color: var(--ink-3); border: var(--hair-weight) solid var(--line); padding: 1px 5px; background: var(--surface); }
.hub-theme { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: none; border: var(--hair-weight) solid var(--line); height: var(--control-height-sm); padding: 0 var(--space-2); cursor: pointer; }
.hub-theme:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 900px) {
  .hub-header-inner { height: auto; flex-wrap: wrap; padding: var(--space-2) 0; row-gap: var(--space-2); }
  .hub-header-inner > .hub-mark { border-right: 0; padding-right: var(--space-4); height: 36px; }
  .hub-nav { order: 3; width: 100%; border-top: var(--hair-weight) solid var(--line); }
  .hub-nav a { flex: 1; justify-content: center; height: 36px; }
  .hub-nav a:last-child { border-right: 0; }
  .hub-header-tools { margin-left: auto; }
  .hub-search { order: 4; width: 100%; }
}

/* ---- Footer -------------------------------------------------------------------------------- */
.hub-footer { margin-top: var(--space-14); border-top: var(--rule-weight) solid var(--rule); padding: var(--space-5) 0 var(--space-8); font-size: 13.5px; line-height: 20px; color: var(--ink-3); }
.hub-footer-inner { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.hub-footer nav { display: flex; gap: var(--space-4); flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; }
.hub-footer a { color: var(--ink-2); }

/* ---- Hero ---------------------------------------------------------------------------------- */
.hub-hero { padding: var(--space-8) 0 0; }
.hub-hero h1 { margin: 0 0 var(--space-3); font-family: var(--font-serif); font-size: 46px; line-height: 48px; font-weight: 400; letter-spacing: -0.01em; max-width: 24ch; }
.hub-hero h1 mark { background: var(--mark); color: var(--mark-ink); padding: 0 0.12em; }
.hub-hero p { margin: 0 0 var(--space-5); font-size: 16px; line-height: 24px; color: var(--ink-2); max-width: 64ch; }
.hub-hero-form { display: flex; max-width: 760px; border: var(--rule-weight) solid var(--rule); background: var(--surface); }
.hub-hero-form .hub-input { flex: 1; border: 0; height: 46px; font-family: var(--font-mono); font-size: 14px; padding: 0 var(--space-4); }
.hub-hero-form .hub-input:focus-visible { box-shadow: inset var(--focus-ring); }
.hub-hero-form .hub-btn { height: auto; border: 0; border-left: var(--rule-weight) solid var(--rule); padding: 0 var(--space-5); }
@media (max-width: 760px) { .hub-hero h1 { font-size: 36px; line-height: 38px; } }

/* ---- Stats: a ruled strip ------------------------------------------------------------------ */
.hub-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--rule-weight) solid var(--rule); margin-top: var(--space-6); background: var(--surface); }
.hub-stat { padding: var(--space-3) var(--space-4); border-right: var(--hair-weight) solid var(--line); min-width: 0; }
.hub-stat:last-child { border-right: 0; }
.hub-stat b { display: block; font-family: var(--font-mono); font-size: 26px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hub-stat span { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .hub-stats { grid-template-columns: 1fr 1fr; } .hub-stat:nth-child(2) { border-right: 0; } .hub-stat:nth-child(-n+2) { border-bottom: var(--hair-weight) solid var(--line); } }

/* ---- Button -------------------------------------------------------------------------------- */
.hub-btn { font-family: var(--font-mono); font-size: 13px; line-height: 20px; font-weight: 500; height: var(--control-height); padding: 0 var(--space-3); border: var(--rule-weight) solid var(--rule); background: var(--ink); color: var(--on-ink); border-radius: var(--radius-0); display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; cursor: pointer; text-decoration: none; }
.hub-btn:hover { background: var(--ink-2); border-color: var(--ink-2); text-decoration: none; }
.hub-btn-quiet { background: var(--surface); color: var(--ink); }
.hub-btn-quiet:hover { background: var(--surface-2); border-color: var(--rule); }
.hub-btn-mark { background: var(--mark); color: var(--mark-ink); border-color: var(--rule); }
.hub-btn-mark:hover { background: var(--mark); border-color: var(--rule); }
.hub-btn-sm { height: var(--control-height-sm); padding: 0 var(--space-2); font-size: 12px; }
.hub-btn:disabled, .hub-btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.hub-btn-count { font-family: var(--font-mono); font-size: 12px; line-height: 18px; font-weight: 600; background: var(--mark); color: var(--mark-ink); padding: 0 6px; }
.hub-btn-count:empty { display: none; }
.hub-btn-bare { background: none; border: 0; color: var(--ink-3); cursor: pointer; font-family: var(--font-mono); font-size: 14px; line-height: 1; padding: var(--space-1); }
.hub-btn-bare:hover { color: var(--bad); }

/* ---- Input, Select, Textarea --------------------------------------------------------------- */
.hub-input, .hub-select, .hub-textarea { font-family: var(--font-sans); font-size: 14.5px; line-height: 20px; color: var(--ink); background: var(--surface); border: var(--hair-weight) solid var(--line); border-radius: var(--radius-0); height: var(--control-height); padding: 0 var(--space-3); min-width: 0; }
.hub-input::placeholder, .hub-textarea::placeholder { color: var(--ink-3); }
.hub-input:hover, .hub-select:hover, .hub-textarea:hover { border-color: var(--ink-3); }
.hub-input:focus-visible, .hub-select:focus-visible, .hub-textarea:focus-visible { border-color: var(--rule); box-shadow: none; outline: 2px solid var(--rule); outline-offset: 1px; }
.hub-input-mono { font-family: var(--font-mono); font-size: 13px; }
.hub-select { padding-right: var(--space-8); appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.hub-textarea { width: 100%; height: auto; padding: var(--space-2) var(--space-3); font-family: var(--font-mono); font-size: 13px; line-height: 19.5px; resize: vertical; display: block; }
.hub-toolbar { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; margin: 0 0 var(--space-3); }
.hub-toolbar .hub-input { flex: 1; min-width: 220px; }

/* ---- Chip: a filter ------------------------------------------------------------------------ */
.hub-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.hub-chip { font-family: var(--font-mono); font-size: 12px; line-height: 18px; height: var(--control-height-sm); padding: 0 var(--space-2); border: var(--hair-weight) solid var(--line); background: var(--surface); color: var(--ink-2); display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; white-space: nowrap; }
.hub-chip:hover { border-color: var(--ink); color: var(--ink); }
.hub-chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.hub-chip .n { color: inherit; opacity: 0.7; }
.hub-chip input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ---- Tag: tier, trust flag, probe state ---------------------------------------------------- */
.hub-tag { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; padding: 1px 7px; border: var(--hair-weight) solid currentColor; color: var(--ink-2); background: var(--surface); white-space: nowrap; vertical-align: middle; }
.hub-tag i { width: var(--glyph); height: var(--glyph); background: currentColor; display: inline-block; flex: none; }
.hub-tag-open { color: var(--open); background: var(--open-soft); }
.hub-tag-auth { color: var(--auth); background: var(--auth-soft); }
.hub-tag-bad { color: var(--bad); background: var(--bad-soft); }
.hub-tag-none { color: var(--ink-3); background: var(--surface); }
.hub-tag-none i { background: transparent; border: var(--hair-weight) solid currentColor; }
.hub-probe { font-family: var(--font-mono); font-size: 12px; line-height: 16px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.hub-probe i { width: var(--glyph); height: var(--glyph); display: inline-block; background: var(--ink-3); flex: none; }
.hub-probe-ok i { background: var(--open); } .hub-probe-needs_auth i { background: var(--auth); } .hub-probe-failed i, .hub-probe-changed i { background: var(--bad); }
.hub-probe-unprobed i { background: transparent; border: var(--hair-weight) solid var(--ink-3); }

/* ---- Tier cards: one ruled strip ----------------------------------------------------------- */
.hub-tiers { display: grid; grid-template-columns: repeat(5, 1fr); }
.hub-tier { display: block; padding: var(--space-3) var(--space-3) var(--space-4) 0; margin-right: var(--space-3); border-right: var(--hair-weight) solid var(--line); border-bottom: var(--hair-weight) solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.hub-tier:last-child { border-right: 0; margin-right: 0; }
.hub-tier:hover { background: var(--surface-2); text-decoration: none; }
.hub-tier b { display: block; font-family: var(--font-mono); font-size: 26px; line-height: 28px; font-weight: 500; margin: var(--space-2) 0 2px; font-variant-numeric: tabular-nums; }
.hub-tier span.d { display: block; font-size: 13.5px; line-height: 20px; color: var(--ink-2); }
@media (max-width: 900px) { .hub-tiers { grid-template-columns: 1fr 1fr; } .hub-tier:nth-child(2n) { border-right: 0; margin-right: 0; } .hub-tier:last-child { grid-column: 1 / -1; } }

/* ---- Steps --------------------------------------------------------------------------------- */
.hub-steps { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--rule-weight) solid var(--rule); }
.hub-step { padding: var(--space-3) var(--space-4) var(--space-4); border-right: var(--hair-weight) solid var(--line); min-width: 0; }
.hub-step:last-child { border-right: 0; }
.hub-step .no { font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: 0.1em; color: var(--ink-3); }
.hub-step b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; margin: var(--space-1) 0; }
.hub-step p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 20px; }
@media (max-width: 760px) { .hub-steps { grid-template-columns: 1fr; } .hub-step { border-right: 0; border-bottom: var(--hair-weight) solid var(--line); } .hub-step:last-child { border-bottom: 0; } }

/* ---- Table: the server ledger -------------------------------------------------------------- */
.hub-table { width: 100%; border-collapse: collapse; border-bottom: var(--rule-weight) solid var(--rule); }
.hub-table th { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: var(--space-2) var(--space-3) var(--space-2) 0; border-bottom: var(--hair-weight) solid var(--line); white-space: nowrap; }
.hub-table td { padding: 11px var(--space-3) 11px 0; border-bottom: var(--hair-weight) solid var(--line-2); vertical-align: top; }
.hub-table th:last-child, .hub-table td:last-child { padding-right: 0; }
.hub-table tr.on td { background: var(--mark-soft); }
.hub-table tr:hover td { background: var(--surface-2); }
.hub-table tr.on:hover td { background: var(--mark-soft); }
.hub-row-name { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); text-decoration: none; }
.hub-row-name:hover { text-decoration: underline; }
.hub-row-id { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-3); }
.hub-row-desc { color: var(--ink-2); max-width: var(--measure); }
.hub-row-meta { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; margin-top: var(--space-1); font-size: 12.5px; line-height: 16px; color: var(--ink-3); }
.hub-td-num { font-family: var(--font-mono); font-size: 13px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hub-td-act { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .hub-table thead { display: none; }
  .hub-table tr { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); padding: var(--space-3) 0; border-bottom: var(--hair-weight) solid var(--line-2); }
  .hub-table td { display: block; padding: 0; border: 0; }
  .hub-table td:first-child { grid-column: 1; } .hub-table .hub-td-act { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
  .hub-table tr.on td, .hub-table tr:hover td { background: transparent; }
  .hub-table tr.on { background: var(--mark-soft); }
}

/* ---- Hit: one search result ---------------------------------------------------------------- */
.hub-hits { border: var(--rule-weight) solid var(--rule); }
.hub-hit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); padding: var(--space-3); border-bottom: var(--hair-weight) solid var(--line-2); }
.hub-hit:last-child { border-bottom: 0; }
.hub-hit .t { display: flex; gap: var(--space-3); align-items: baseline; flex-wrap: wrap; }
.hub-hit .t code { font-weight: 500; }
.hub-hit .srv { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.hub-hit p { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 80ch; }
.hub-hit .side { display: flex; gap: var(--space-2); align-items: center; align-self: start; }
.hub-hit .score { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---- Panel --------------------------------------------------------------------------------- */
.hub-panel { background: var(--surface); border: var(--rule-weight) solid var(--rule); }
.hub-panel + .hub-panel { margin-top: var(--space-5); }
.hub-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--surface-2); border-bottom: var(--hair-weight) solid var(--line); }
.hub-panel-head h2, .hub-panel-head h3 { margin: 0; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.hub-panel-head .hub-hint { font-size: 12.5px; line-height: 16px; }
.hub-panel-body { padding: var(--space-3); }

/* ---- Tabs + file panes --------------------------------------------------------------------- */
.hub-tabs { display: flex; border-bottom: var(--hair-weight) solid var(--line); overflow-x: auto; }
.hub-tabs button { font-family: var(--font-mono); font-size: 12.5px; line-height: 18px; background: none; border: 0; border-right: var(--hair-weight) solid var(--line-2); padding: var(--space-2) var(--space-3); color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.hub-tabs button:hover { color: var(--ink); background: var(--surface-2); }
.hub-tabs button.on { color: var(--mark-ink); background: var(--mark); }
.hub-pane { display: none; } .hub-pane.on { display: block; }
.hub-file { position: relative; }
.hub-file pre { padding: var(--space-3); max-height: 60vh; background: var(--surface); color: var(--ink); }
.hub-file .hub-btn { position: absolute; top: var(--space-2); right: var(--space-2); }
.hub-file .hub-file-bar { position: absolute; top: var(--space-2); right: var(--space-2); display: flex; gap: var(--space-1); z-index: 1; }
.hub-file .hub-file-bar .hub-btn { position: static; }

/* ---- Code: highlighted files, a highlighted editor, rendered markdown ---------------------- */
/* Ink only, by tone and weight; the one colour is auth, on a ${VAR} or CHANGE_ME you fill in. */
.hub-code .k { color: var(--ink); font-weight: 500; }
.hub-code .s, .hub-code .x { color: var(--ink-2); }
.hub-code .n { color: var(--ink); }
.hub-code .p, .hub-code .c { color: var(--ink-3); }
.hub-code .v { color: var(--auth); font-weight: 500; }
.hub-code .m { color: var(--ink-2); background: var(--surface-2); }
.hub-code .h, .hub-code .e { color: var(--ink); font-weight: 600; }
.hub-code-edit { position: relative; background: var(--surface); }
.hub-code-edit > pre { position: absolute; inset: 0; padding: var(--space-2) var(--space-3); border: var(--hair-weight) solid transparent; overflow: hidden; pointer-events: none; color: var(--ink); }
.hub-code-edit > .hub-textarea { position: relative; background: transparent; color: transparent; caret-color: var(--ink); white-space: pre; overflow-wrap: normal; }
.hub-md { padding: var(--space-3) var(--space-4); max-height: 60vh; overflow: auto; color: var(--ink); overflow-wrap: break-word; }
.hub-file .hub-md > :is(h1, h2, h3, p):first-child { padding-right: 136px; }
.hub-md > :first-child { margin-top: 0; }
.hub-md > :last-child { margin-bottom: 0; }
.hub-md h1 { margin: 0 0 var(--space-3); padding-bottom: var(--space-2); border-bottom: var(--rule-weight) solid var(--rule); font-size: 15px; line-height: 20px; font-weight: 600; }
.hub-md h2 { margin: var(--space-6) 0 var(--space-2); padding-bottom: var(--space-1); border-bottom: var(--hair-weight) solid var(--line); font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.hub-md h3, .hub-md h4, .hub-md h5, .hub-md h6 { margin: var(--space-4) 0 var(--space-1); font-family: var(--font-mono); font-size: 13px; line-height: 20px; font-weight: 500; }
.hub-md p, .hub-md ul, .hub-md ol, .hub-md blockquote, .hub-md pre, .hub-md .hub-md-table { margin: 0 0 var(--space-3); }
.hub-md ul, .hub-md ol { padding-left: var(--space-5); }
.hub-md li + li { margin-top: var(--space-1); }
.hub-md li > ul, .hub-md li > ol { margin: var(--space-1) 0 0; }
.hub-md strong { font-weight: 600; }
.hub-md del { color: var(--ink-3); }
.hub-md code { font-size: 12.5px; background: var(--surface-2); padding: 1px var(--space-1); }
.hub-md pre { background: var(--surface-2); padding: var(--space-3); font-size: 12.5px; }
.hub-md pre code { background: none; padding: 0; font-size: inherit; }
.hub-md blockquote { margin-left: 0; margin-right: 0; padding-left: var(--space-3); border-left: var(--rule-weight) solid var(--line); color: var(--ink-2); }
.hub-md hr { border: 0; border-top: var(--hair-weight) solid var(--line); margin: var(--space-5) 0; }
.hub-md .hub-md-table { overflow-x: auto; }
.hub-md .hub-lock th { white-space: nowrap; }
.hub-md .hub-lock td { vertical-align: top; }

/* ---- Tool list: details rows --------------------------------------------------------------- */
.hub-tools { list-style: none; margin: 0; padding: 0; }
.hub-tools li { border-bottom: var(--hair-weight) solid var(--line-2); }
.hub-tools li:last-child { border-bottom: 0; }
.hub-tools summary { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: var(--space-3); align-items: baseline; padding: var(--space-2) var(--space-3); cursor: pointer; list-style: none; }
.hub-tools summary::-webkit-details-marker { display: none; }
.hub-tools summary:hover { background: var(--surface-2); }
.hub-tools summary code { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-tools summary .d { color: var(--ink-2); font-size: 13.5px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-tools summary .hub-btn { visibility: hidden; }
.hub-tools li:hover summary .hub-btn, .hub-tools details[open] summary .hub-btn, .hub-tools summary .hub-btn-mark { visibility: visible; }
.hub-tool-body { padding: 0 var(--space-3) var(--space-3) var(--space-3); }
.hub-tool-body p { margin: 0 0 var(--space-2); color: var(--ink-2); }
.hub-tool-body .pin { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin: var(--space-2) 0; display: flex; gap: var(--space-2); align-items: center; }
.hub-tool-body pre { background: var(--surface-2); padding: var(--space-3); font-size: 12.5px; }
@media (max-width: 640px) { .hub-tools summary { grid-template-columns: 1fr auto; } .hub-tools summary .d { grid-column: 1 / -1; white-space: normal; } }

/* ---- Key-value ----------------------------------------------------------------------------- */
.hub-kv { display: grid; grid-template-columns: 88px 1fr; gap: var(--space-2) var(--space-3); margin: 0; padding: var(--space-3); font-size: 13.5px; line-height: 20px; }
.hub-kv dt { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.hub-kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.hub-kv dd code { font-size: 12.5px; }
.hub-kv .warn { color: var(--auth); font-size: 12.5px; }

/* ---- Toolset tray (popover) ---------------------------------------------------------------- */
.hub-tray-btn { position: relative; }
.hub-tray { position: absolute; right: 0; top: calc(100% + var(--space-2)); width: 340px; max-width: calc(100vw - 2 * var(--space-4)); background: var(--surface); border: var(--rule-weight) solid var(--rule); box-shadow: var(--shadow-stamp); padding: var(--space-3); z-index: 30; }
.hub-tray-static { position: static; display: inline-block; }
.hub-tray h3 { margin: 0 0 var(--space-2); display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.hub-tray h3 .count { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 12px; color: var(--ink-3); }
.hub-tray ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 40vh; overflow: auto; border-top: var(--hair-weight) solid var(--line); }
.hub-tray li { display: flex; align-items: center; gap: var(--space-2); height: var(--control-height-sm); border-bottom: var(--hair-weight) solid var(--line-2); font-size: 13.5px; }
.hub-tray li .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.hub-tray li .sub { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.hub-tray li.empty { color: var(--ink-3); height: auto; padding: var(--space-2) 0; }
.hub-tray .hub-btn { width: 100%; justify-content: center; margin-top: var(--space-3); }

/* ---- Toast --------------------------------------------------------------------------------- */
.hub-toast { position: fixed; bottom: var(--space-5); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); border: var(--rule-weight) solid var(--rule); box-shadow: var(--shadow-stamp); padding: var(--space-2) var(--space-3); font-family: var(--font-mono); font-size: 13px; line-height: 20px; opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 40; white-space: nowrap; }
.hub-toast.show { opacity: 1; }
.hub-toast-static { position: static; transform: none; opacity: 1; display: inline-block; }

/* ---- Pager, Empty -------------------------------------------------------------------------- */
.hub-pager { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-3) 0; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.hub-pager a { color: var(--ink); }
.hub-empty { padding: var(--space-10) var(--space-4); text-align: center; color: var(--ink-2); border: var(--hair-weight) dashed var(--line); }
.hub-empty b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; margin-bottom: var(--space-1); }
.hub-empty-flush { border: 0; }

/* ---- Field, options, picked list (the deployer's builder) ---------------------------------- */
.hub-builder { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-3); }
.hub-field { display: flex; flex-direction: column; gap: var(--space-1); }
.hub-field > label:not(.hub-check), .hub-field > .hub-field-label { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.hub-opts { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.hub-opt { border: var(--hair-weight) solid var(--line); background: var(--surface); padding: 0 var(--space-3); height: var(--control-height); display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: 14px; line-height: 20px; font-weight: 500; }
.hub-opt .hub-hint { font-weight: 400; }
.hub-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.hub-opt:hover { border-color: var(--ink); }
.hub-opt:has(input:checked) { background: var(--mark); color: var(--mark-ink); border-color: var(--rule); }
.hub-opt:has(input:checked) .hub-hint { color: var(--mark-ink); opacity: 0.75; }
.hub-opt:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.hub-check { display: inline-flex; gap: var(--space-2); align-items: center; font-size: 14px; cursor: pointer; }
.hub-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--ink); }
.hub-picked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.hub-picked li { border: var(--hair-weight) solid var(--line); padding: var(--space-2) var(--space-3); }
.hub-picked .h { display: flex; justify-content: space-between; gap: var(--space-2); align-items: center; }
.hub-picked .h .nm { font-family: var(--font-mono); font-size: 13px; }
.hub-picked .tl { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); font-family: var(--font-mono); font-size: 12.5px; }
.hub-picked .tl label { display: inline-flex; gap: var(--space-1); align-items: center; color: var(--ink-2); cursor: pointer; }
.hub-picked .tl .all { color: var(--ink); }
.hub-picked .tl input { accent-color: var(--ink); margin: 0; }

/* ---- Lock table, warnings, error ----------------------------------------------------------- */
.hub-lock { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hub-lock th { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: var(--space-2) var(--space-3); border-bottom: var(--hair-weight) solid var(--line); background: var(--surface-2); }
.hub-lock td { padding: 7px var(--space-3); border-bottom: var(--hair-weight) solid var(--line-2); }
.hub-lock td code { font-size: 12.5px; }
.hub-lock .warn { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--auth); margin-left: var(--space-1); }
.hub-warnings { margin: 0; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-8); color: var(--auth); font-size: 13.5px; line-height: 20px; }
.hub-error { color: var(--bad); padding: var(--space-3); font-family: var(--font-mono); font-size: 13px; }
