/* Hub-owned native documents. Semon's neutral hierarchy is a design reference;
   the paired Tolmap viewer still owns its fonts, renderer and map tokens. */
:root {
  --hub-ground: #fff; --hub-side: #f7f7f5; --hub-sunken: #f1f2ef;
  --hub-ink: #191d1b; --hub-secondary: #3d4440; --hub-muted: #5d6561;
  --hub-line: #e5e7e3; --hub-line-strong: #d3d7d2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --hub-ground: #141817; --hub-side: #181c1b; --hub-sunken: #222725;
    --hub-ink: #e6e9e7; --hub-secondary: #c5cbc7; --hub-muted: #9ba39f;
    --hub-line: #2a302d; --hub-line-strong: #3d4541;
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --hub-ground: #141817; --hub-side: #181c1b; --hub-sunken: #222725;
  --hub-ink: #e6e9e7; --hub-secondary: #c5cbc7; --hub-muted: #9ba39f;
  --hub-line: #2a302d; --hub-line-strong: #3d4541;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: auto; min-height: 100%; overflow: auto; }
body { margin: 0; background: var(--hub-ground); color: var(--hub-ink); font: 14px/1.5 Archivo, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 36px; border: 1px solid var(--hub-line-strong); border-radius: 10px; padding: 8px 14px; background: var(--hub-ground); cursor: pointer; text-decoration: none; }
button:disabled { cursor: wait; opacity: .65; }
button.primary { background: var(--hub-ink); color: var(--hub-ground); border-color: var(--hub-ink); }
button.quiet { background: transparent; border-color: transparent; }
input, select { width: 100%; min-height: 40px; border: 1px solid var(--hub-line-strong); border-radius: 10px; padding: 9px 12px; background: var(--hub-ground); }
input[type=radio] { width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; flex: none; accent-color: var(--hub-ink); }
label { display: grid; gap: 8px; margin: 16px 0; font-size: 13px; }
:focus-visible { outline: 2px solid var(--hub-ink); outline-offset: 3px; }
.hub-header { min-height: 64px; padding: 10px 32px; border-bottom: 1px solid var(--hub-line); display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; min-height: 36px; font-size: 18px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--hub-muted); font-size: 13px; font-weight: 400; margin-left: 4px; }
.hub-header nav { display: flex; gap: 24px; flex: 1; flex-wrap: wrap; }
.hub-header nav a { display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; color: var(--hub-muted); text-decoration: none; }
.hub-header form { margin-left: auto; }
.hub-header button { font-size: 13px; white-space: nowrap; }
main { max-width: 824px; margin: 56px auto 0; padding: 0 32px 64px; }
main a { display: inline-flex; align-items: center; min-height: 36px; max-width: 100%; }
main:has(.welcome) { max-width: 1040px; margin-top: clamp(40px, 10vh, 112px); }
h1 { margin: 12px 0 16px; font-size: 30px; line-height: 1.2; letter-spacing: -.035em; font-weight: 600; }
h2 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; font-weight: 600; }
p { margin: 8px 0 16px; overflow-wrap: anywhere; }
strong { font-weight: 600; }
.lede { font-size: 16px; color: var(--hub-secondary); }
.muted, .footnote { color: var(--hub-muted); }
.footnote { font-size: 12px; margin-top: 24px; }
.eyebrow { font-size: 12px; letter-spacing: .06em; color: var(--hub-muted); }
section, article { border: 1px solid var(--hub-line); border-radius: 14px; padding: 24px; margin: 24px 0; }
.welcome { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 64px; }
.welcome .intro > p { max-width: 440px; }
.signin-panel { margin: 0; background: var(--hub-side); padding: 32px; }
.signin-panel .primary { width: 100%; margin-top: 16px; }
.signin-panel .primary span { margin-left: auto; }
summary { cursor: pointer; color: var(--hub-secondary); min-height: 36px; padding: 8px 0; font-size: 13px; }
.journey { list-style: none; padding: 0; margin: 32px 0 0; }
.journey li { display: flex; align-items: flex-start; gap: 16px; padding: 0 0 24px; }
.journey li:last-child { padding-bottom: 0; }
.step-number { width: 28px; height: 28px; display: inline-flex; justify-content: center; align-items: center; flex: none; border: 1px solid var(--hub-line-strong); border-radius: 50%; font-size: 12px; color: var(--hub-muted); }
.journey p { color: var(--hub-muted); font-size: 13px; margin: 4px 0 0; }
.journey li > div { min-width: 0; flex: 1; }
.journey [aria-current=step] .step-number { color: var(--hub-ground); background: var(--hub-ink); border-color: var(--hub-ink); }
.journey form { margin-top: 16px; }
.journey form p { margin-top: 8px; }
.setup-panel { background: var(--hub-side); margin-top: 32px; }
.setup-panel > h2 { font-size: 16px; }
.notice { background: var(--hub-sunken); color: var(--hub-secondary); border: 1px solid var(--hub-line); border-radius: 10px; padding: 12px 16px; }
.back-link { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 24px; color: var(--hub-muted); font-size: 13px; text-decoration: none; }
.picker-panel { padding: 0; overflow: hidden; }
.search-row { display: flex; align-items: end; gap: 8px; padding: 20px 20px 0; }
.search-row label { flex: 1; min-width: 0; margin: 0; }
.search-row button { min-height: 40px; flex: none; font-size: 13px; }
[data-repository-count] { padding: 0 20px; margin: 16px 0 12px; font-size: 13px; }
.repository-list { border: 0; padding: 0; margin: 0; min-width: 0; }
.repository-option { display: flex; align-items: center; gap: 16px; min-height: 72px; margin: 0; padding: 16px 20px; border-top: 1px solid var(--hub-line); cursor: pointer; }
.repository-option > span { min-width: 0; }
.repository-option strong { font: 13px/1.5 'IBM Plex Mono', monospace; overflow-wrap: anywhere; }
.repository-option small { display: block; font-size: 12px; color: var(--hub-muted); margin-top: 4px; }
.repository-option:has(input:checked) { background: var(--hub-sunken); }
.import-footer { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 20px; border-top: 1px solid var(--hub-line); background: var(--hub-side); }
.import-footer p { margin: 0; min-width: 0; flex: 1; font-size: 13px; color: var(--hub-muted); }
.import-submit { flex: none; }
.empty-state { padding: 32px 24px; }
.empty-state h2 { font-size: 16px; }
.empty-state p { margin-bottom: 0; color: var(--hub-muted); }
.repository-help { margin: 24px 0; }
.repository-help > p { font-size: 13px; }
.repository-help form { margin-top: 16px; }
[data-navigation-status]:empty { display: none; }
.state { font-weight: 600; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
form.actions { display: inline-block; margin: 8px 8px 8px 0; }
code { font: 13px 'IBM Plex Mono', monospace; overflow-wrap: anywhere; }
.snapshot-frame { width: 100%; height: 72vh; border: 1px solid var(--hub-line); border-radius: 12px; }
body:has(.snapshot-frame) main { max-width: 1400px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 10; padding: 12px; background: var(--hub-ground); }
.skip-link:focus { top: 8px; }
@media (hover: hover) {
  button:not(:disabled):not(.primary):hover, .repository-option:hover { background: var(--hub-sunken); }
  a:hover { text-decoration: underline; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  main, main:has(.welcome) { margin-top: 32px; padding: 0 20px 48px; }
  .hub-header { padding: 8px 20px; gap: 12px; flex-wrap: wrap; }
  .hub-header nav { order: 3; flex-basis: 100%; gap: 24px; }
  h1 { font-size: 26px; }
  .welcome { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .intro .journey { display: none; }
  .signin-panel { padding: 24px; }
  .search-row { padding: 16px 16px 0; align-items: center; flex-wrap: wrap; }
  .search-row label { flex-basis: 100%; }
  .search-row button { padding-left: 0; }
  .repository-option { padding: 16px; }
  .import-footer { flex-direction: column; align-items: stretch; padding: 16px; }
  .import-footer button { width: 100%; }
  .snapshot-frame { height: 78vh; }
}
@media (max-width: 700px), (pointer: coarse) {
  button, .button, summary, .brand, .back-link, main a, .hub-header nav a { min-height: 44px; min-width: 44px; }
  input:not([type=radio]), select { min-height: 44px; font-size: 16px; }
  .search-row button { min-height: 44px; }
}
