/* The public page at the parent domain (docs/contracts/workspaces.md §2). Tokens only, from
   ui/styles/tokens.css; the eddies behind it are the workspace's own backdrop. Cards stay opaque. */
*, *::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-text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; }
.dot { font-family: var(--font-digits); font-weight: 800; font-variant-numeric: tabular-nums; }

.hub-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1040px; margin: 0 auto; padding: 22px 24px; }
.hub-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--fs-title); text-decoration: none; }
.hub-mark img { border-radius: 7px; }
.hub-top-link { font-size: var(--fs-fact); font-weight: 600; color: var(--ink-2); text-decoration: none; }
.hub-top-link:hover { color: var(--ink); }
.hub-top-links { display: flex; gap: 22px; align-items: center; white-space: nowrap; }

.hub { max-width: 1040px; margin: 0 auto; padding: 8px 24px 40px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px 28px; align-items: start; }
.hub-hero { grid-column: 1; grid-row: 1 / span 3; padding: 28px 0 8px; }
.hub-hero h1 { font-size: clamp(30px, 2.4vw + 14px, 46px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 16px; max-width: 13em; }
.hub-lede { font-size: 17px; line-height: 1.55; color: var(--ink-fact); margin: 0 0 28px; max-width: 34em; }

.hub-card { grid-column: 2; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; }
.hub-card h2 { font-size: 17px; margin: 0 0 4px; }
.hub-card.is-waiting { border-color: var(--signal); box-shadow: var(--ring-signal); }
.hub-meta { color: var(--ink-2); font-size: var(--fs-fact); margin: 0 0 14px; }
.hub-label { display: block; font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--ink-3); margin: 14px 0 6px; }
.hub-optional { text-transform: none; letter-spacing: 0; font-weight: 500; }
.hub-field { display: flex; align-items: center; height: 42px; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--surface); padding: 0 12px; }
.hub-field:focus-within { border-color: var(--ink-3); }
.hub-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); }
.hub-field input::placeholder { color: var(--ink-3); }
.hub-suffix { color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.hub-hint { margin: 6px 0 0; font-size: var(--fs-meta); color: var(--ink-3); min-height: 1.4em; }
.hub-hint.is-ok { color: var(--ink-2); }
.hub-hint.is-bad { color: var(--ink); font-weight: 600; }
.hub-error { margin: 12px 0 0; font-size: var(--fs-fact); font-weight: 600; }

.hub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--btn-big); padding: 0 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.hub-btn:hover { border-color: var(--ink-3); }
.hub-btn.is-primary { background: var(--ink); border-color: var(--ink); color: var(--white); margin-top: 18px; width: 100%; }
.hub-btn.is-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.hub-btn.is-quiet { border-color: transparent; color: var(--ink-3); height: auto; padding: 12px 0 0; }
.hub-btn[disabled] { opacity: .55; cursor: default; }
.hub-host { font-size: 17px; font-weight: 600; margin: 6px 0 10px; word-break: break-all; }
.hub-version { color: var(--ink-3); font-weight: 500; }
#status-text { margin: 0 0 14px; color: var(--ink-fact); }
#status-setup .hub-btn { margin: 0 0 10px; }
.hub-copy { display: flex; gap: 8px; }
.hub-copy input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: var(--r-tile); padding: 0 10px; font: inherit; font-size: 13px; color: var(--ink-2); background: var(--bg); }
.hub-hash { font-family: var(--font-digits); font-weight: 800; font-size: var(--fs-digit-badge); color: var(--ink-3); margin: 10px 0 0; word-break: break-all; }


/* The guide for testers (guide.html): one readable column, the same card as the page. */
.hub-guide { max-width: 760px; margin: 0 auto 24px; padding: 28px 32px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.hub-guide h1 { font-size: clamp(26px, 1.6vw + 16px, 34px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 14px; }
.hub-guide h2 { font-size: 19px; line-height: 1.25; margin: 34px 0 10px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.hub-guide h3 { font-size: 15px; margin: 22px 0 6px; }
.hub-guide p, .hub-guide li { color: var(--ink-fact); line-height: 1.6; }
.hub-guide p { margin: 0 0 12px; }
.hub-guide ul, .hub-guide ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 6px; }
.hub-guide strong { color: var(--ink); font-weight: 600; }
.hub-guide a { color: var(--signal-text); }
.hub-guide code { padding: 1px 5px; border: 1px solid var(--hairline); border-radius: 5px; background: var(--bg); font-family: var(--font-text); font-size: .93em; overflow-wrap: anywhere; }
.hub-guide pre { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-tile); background: var(--bg); overflow-x: auto; }
.hub-guide pre code { padding: 0; border: 0; background: none; font-size: var(--fs-fact); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.hub-guide-table { margin: 0 0 14px; overflow-x: auto; }
.hub-guide table { width: 100%; border-collapse: collapse; }
.hub-guide th, .hub-guide td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; font-size: var(--fs-body); line-height: 1.5; color: var(--ink-fact); }
.hub-guide td:first-child { min-width: 9.5em; }
.hub-guide tr:last-child td { border-bottom: 0; }
.hub-guide > .hub-meta { margin: 0; }
.hub-guide-link { margin: 18px 0 0; font-size: var(--fs-fact); color: var(--ink-2); }
.hub-guide-link a { color: var(--ink); font-weight: 600; }

.hub-foot { max-width: 1040px; margin: 0 auto; padding: 8px 24px 32px; display: flex; gap: 8px; color: var(--ink-3); font-size: var(--fs-meta); }

@media (max-width: 860px) {
  .hub { grid-template-columns: minmax(0, 1fr); padding: 0 16px 32px; }
  .hub-hero, .hub-card { grid-column: 1; grid-row: auto; }
  .hub-hero { padding-top: 12px; }
  .hub-top { padding: 18px 16px; }
  .hub-foot { padding: 8px 16px 28px; }
  .hub-guide { margin: 0 16px 20px; padding: 20px 18px 24px; }
}
@media (max-width: 560px) {
  /* The line under the three steps carries the guide on a phone; the top keeps one link. */
  .hub-top-links .hub-top-link[href="/guide"] { display: none; }
}
@media (max-width: 420px) {
  .hub-suffix { font-size: 12px; }
}

/* The address a person is told rather than asked for (workspace-name.js). It reads as a sentence,
   so the name sits in the line and the way to change it is a word, not a second field. */
.hub-address {
  margin: 6px 0 0;
  font-size: var(--fs-meta);
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem;
}
.hub-address b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.hub-plain {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.hub-plain:hover { text-decoration-thickness: 2px; }
.hub-plain:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }

/* ── the wizard at /start ──────────────────────────────────────────────────────────────────
   One job, one step of it on the screen. It was a two-column page with the form in the right
   column and three more cards stacked under it — an app download, a site request and a second
   way to open a workspace — so the one thing a visitor came to do competed with three things
   they had not asked about (owner, 5 October: "dit is een rommelige pagina ... niet alles onder
   elkaar op 1 pagina dat is niet wizard stijl"). One column, one card, and a rail that says
   where you are. */
.hub-wiz { max-width: 560px; margin: 0 auto; padding: 8px 24px 40px; display: grid; gap: 18px; }
.hub-wiz .hub-card { grid-column: auto; }

.hub-rail { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; padding: 0; }
.hub-rail li {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 0 0 10px; border-bottom: 2px solid var(--line);
  font-size: var(--fs-meta); color: var(--ink-3); white-space: nowrap;
}
/* The number is the part that carries the state, because a 2px rule is not enough on its own and
   colour alone would be the only signal for someone who cannot see it. `is-done` is also marked
   in the rail's text for a screen reader by `aria-current` on the step you are on (hub.js). */
.hub-rail .dot {
  display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: var(--fs-digit-badge); color: var(--ink-3);
}
.hub-rail li.is-done { color: var(--ink-2); border-bottom-color: var(--ink-3); }
.hub-rail li.is-done .dot { border-color: var(--ink-3); color: var(--ink-2); }
.hub-rail li.is-now { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.hub-rail li.is-now .dot { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* The disclosure, at the moment of consent rather than as a wall further down the page. */
.hub-terms { margin: 18px 0 0; border-top: 1px solid var(--hairline); padding-top: 14px; }
.hub-terms summary { cursor: pointer; font-size: var(--fs-meta); color: var(--ink-2); }
.hub-terms summary:hover { color: var(--ink); }
.hub-terms ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.hub-terms li { font-size: var(--fs-fact); color: var(--ink-fact); line-height: 1.5; }
.hub-terms b { color: var(--ink); font-weight: 600; }

/* Everything that is a way out rather than the way on sits together, under the step. */
.hub-wiz-foot { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.hub-wiz-foot:empty { display: none; }
/* Full width, and allowed to wrap: `.hub-btn` is `nowrap` by default, which at 390px pushed
   "Download the app 0.2.0-preview.45" straight past the edge of the screen. */
#status-setup .hub-btn { width: 100%; white-space: normal; text-align: center; padding: 0 12px; }
#status-setup .hub-btn.is-primary { margin-top: 12px; }
#status-setup .hub-meta { margin-top: 10px; }
/* The APK's hash is worth having and not worth shouting: it is 64 characters under a button. */
#status-setup .hub-hash { font-size: var(--fs-meta); line-height: 1.45; margin: 8px 0 0; }

@media (max-width: 560px) {
  .hub-wiz { padding: 8px 16px 32px; }
  .hub-rail li { font-size: var(--fs-digit-badge); gap: 6px; }
}

/* The site request, now below the guide rather than under a signup form. Same card as the guide
   above it, so the page reads as one column rather than a guide with a stranger stapled on. */
.hub-ask-site { margin-top: 0; }
.hub-ask-site h2 { margin-top: 0; padding-top: 0; border-top: 0; font-size: 19px; }
.hub-ask-site .hub-btn.is-primary { width: auto; }

/* ── the wait after confirmation (workspace-wait.js) ─────────────────────────────────────────
   The class meter's squares, in a row as wide as the card: 6px squares, 2px gaps, whole pixels
   only (hub.js counts how many fit), filled in ink, the next one blinking. Not the signal blue:
   nothing here needs the person. */
.hub-wait { margin: 2px 0 6px; }
.hub-meter { display: flex; gap: 2px; height: 6px; max-width: 100%; overflow: hidden; }
.hub-meter i { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 1px; background: var(--class-empty); }
.hub-meter i.is-on { background: var(--ink); }
.hub-meter i.is-next { background: var(--ink); animation: var(--blink); }
.hub-eta { margin: 12px 0 0; font-size: var(--fs-fact); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.hub-wait-mail { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--hairline); font-size: var(--fs-fact); color: var(--ink-2); line-height: 1.5; }
.hub-keep { margin-top: 14px; }
.hub-keep .hub-meta { margin: 12px 0 10px; }
.hub-eta.is-late { font-weight: 500; color: var(--ink-2); }
