/* The page's own rules, on Republika's tokens (republika/republika.css). */
* { box-sizing: border-box; }
/* The homepage (VibishWeb.Hologram.HomePage), from Republika's board (vibish-homepage.html). */
.home { max-width: 70rem; margin-inline: auto; padding: var(--space-s) var(--space-m) var(--space-xl); display: flex; flex-direction: column; gap: var(--space-2xl); }
.home :is(h1, h2, h3, p, ol, figure) { margin: 0; }
.home a { color: inherit; }
.home-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-m); }
.home-name { font-size: var(--step-1); font-weight: 740; letter-spacing: -0.025em; text-decoration: none; }
.home-head nav { display: flex; gap: var(--space-s); font-weight: 600; }
.home-head nav a { text-decoration: none; }
.home .band { display: flex; flex-direction: column; gap: var(--space-m); }
.home .home-main { gap: var(--space-2xl); }
.home .band h2 { font-size: var(--step-3); font-weight: 740; letter-spacing: -0.03em; line-height: 1.1; }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: var(--space-xl); align-items: center; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); }
.home h1 { font-size: var(--step-5); font-weight: 740; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
.home-lead { font-size: var(--step-1); color: var(--muted); line-height: 1.35; }
.install { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.install a { text-decoration: none; }
.note { font-size: var(--step--1); color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--space-s); }
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: var(--space-3xs); }
.steps li::before { content: counter(step); font-size: var(--step-2); font-weight: 740; color: var(--accent); }
.cols h3 { font-size: var(--step-0); font-weight: 700; }
.cols p { color: var(--muted); }
.cols .rk-tile { padding: var(--space-s); border-radius: var(--radius); font-size: var(--step-0); gap: var(--space-3xs); }
a.rk-tile { text-decoration: none; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-s); }
.compare .rk-tile { padding: var(--space-s); border-radius: var(--radius); gap: var(--space-2xs); }
.compare h3 { font-size: var(--step-1); font-weight: 700; }
.compare ol { padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--space-3xs); }
.compare .without { color: var(--muted); }
/* The hero's process: four numbered steps over four small pages. The current step's bar fills
   (a transition, so its transitionend moves the page to the next step); reduced motion stops it. */
.process { display: flex; flex-direction: column; gap: var(--space-s); }
.process-strip { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2xs); counter-reset: step; }
.process-strip li { counter-increment: step; display: flex; }
.process-strip button { flex: 1; position: relative; display: flex; align-items: flex-start; gap: var(--space-3xs); padding: var(--space-2xs) 0 0; border: 0; border-top: 2px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: var(--step--2); font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer; }
.process-strip button::before { content: counter(step); display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--line); color: var(--fg); flex: none; }
.process-strip button::after { content: ''; position: absolute; top: -2px; left: 0; height: 2px; width: 0; background: var(--accent); }
.process-strip button[aria-current] { color: var(--fg); }
.process-strip button[aria-current]::before { background: var(--accent); color: var(--bg); }
.process-strip button[aria-current]::after { width: 100%; transition: width 5s linear; }
@starting-style { .process-strip button[aria-current]::after { width: 0; } }
@media (prefers-reduced-motion: reduce) { .process-strip button[aria-current]::after { transition: none; } }
.process-slides { list-style: none; padding: 0; display: grid; }
.process-slides > li { grid-area: 1 / 1; display: flex; flex-direction: column; gap: var(--space-2xs); transition: opacity 0.3s; }
.process-slides > li[inert] { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .process-slides > li { transition: none; } }
.process .frame { border-radius: var(--radius); background: var(--overlay); padding: var(--space-s); display: flex; flex-direction: column; gap: var(--space-2xs); font-size: var(--step--1); min-height: 9rem; }
.process .frame b { font-size: var(--step-0); }
.frame-ask { border-radius: 1.4rem; background: var(--bg); padding: var(--space-2xs) var(--space-s); color: var(--faint); }
.frame-working { color: var(--muted); }
.process-slides > li > p { color: var(--muted); font-size: var(--step--1); }
.soon { border-radius: var(--radius); background: var(--overlay); padding: var(--space-m); display: flex; flex-direction: column; gap: var(--space-2xs); }
.soon small { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--step--2); }
.home .soon h2 { font-size: var(--step-2); }
.soon p { color: var(--muted); }
/* Setup: the extension and the agent side by side. */
.setup ol { padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--space-3xs); color: var(--muted); }
.setup pre { margin: 0; padding: var(--space-2xs) var(--space-xs); border-radius: 0.5rem; background: var(--bg); font-size: var(--step--1); overflow-x: auto; }

/* Sign-in: /login and /account (Hologram), and the magic-link confirm screen
   (ash_authentication_phoenix, classes set in VibishWeb.AuthOverrides). */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: var(--space-m); }
.auth-card { width: min(100%, 24rem); display: flex; flex-direction: column; gap: var(--space-s); }
.auth-wordmark, .auth-banner { margin: 0; font-size: var(--step-2); font-weight: 740; letter-spacing: -0.03em; }
.auth-wordmark a, .auth-banner a { color: inherit; text-decoration: none; }
.auth-form { display: flex; flex-direction: column; gap: var(--space-xs); }
.auth-form h1 { margin: 0; font-size: var(--step-1); font-weight: 650; }
.auth-form p { margin: 0; }
.auth-form label { display: flex; flex-direction: column; gap: var(--space-3xs); color: var(--muted); }
.auth-form input[type="email"], .auth-form input[type="text"] { font: inherit; color: var(--fg); background: var(--line); border: 0; border-radius: var(--radius); padding: var(--space-2xs) var(--space-s); }
.auth-form input[type="email"]:focus, .auth-form input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-form .rk-button { justify-content: center; text-decoration: none; }
.auth-form [type="submit"].rk-button { background: var(--accent); color: var(--on-accent); }
.auth-remember { display: flex; align-items: center; gap: var(--space-2xs); }
.auth-remember input { accent-color: var(--accent); }
.auth-notice { border-radius: var(--radius); background: var(--line); padding: var(--space-2xs) var(--space-s); }
.auth-actions { display: flex; align-items: center; gap: var(--space-s); flex-wrap: wrap; }

/* Passkeys: the list on /account, and the prompt once after sign-in (VibishWeb.Hologram.Layout). */
.auth-form h2 { margin: var(--space-s) 0 0; font-size: var(--step-0); font-weight: 650; }
.auth-hint { color: var(--muted); }
.passkey-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2xs); }
.passkey-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); }
.passkey-list small { color: var(--muted); }
.passkey-prompt { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--space-m); background: oklch(0 0 0 / 0.3); }
.passkey-prompt-card { width: min(100%, 26rem); display: flex; flex-direction: column; gap: var(--space-s); padding: var(--space-l); border-radius: 1.5rem; background: var(--bg); color: var(--fg); text-align: center; }
.passkey-prompt-card h2 { margin: 0; font-size: var(--step-2); font-weight: 740; letter-spacing: -0.03em; }
.passkey-prompt-card p { margin: 0; color: var(--muted); }
.passkey-prompt-card .rk-button { justify-content: center; text-decoration: none; }
.passkey-prompt-card form { display: contents; }

/* A site: /hosts/:host (VibishWeb.Hologram.HostPage), its threads and offers. */
.site { max-width: 40rem; margin-inline: auto; padding: var(--space-xl) var(--space-m); display: flex; flex-direction: column; gap: var(--space-s); }
.site h1 { margin: 0; font-size: var(--step-3); font-weight: 740; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.site p { margin: 0; }
.site-offer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); flex-wrap: wrap; border-radius: var(--radius); background: var(--line); padding: var(--space-xs) var(--space-s); }
.site-thread-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.site-thread-list li { display: flex; flex-direction: column; gap: var(--space-3xs); }
.site-thread-list small, .site-hosts small { color: var(--muted); }
.site-offer-mine { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2xs); }
.site-hosts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3xs); }
/* Projects and invites: /projects, /projects/:id; /invite/:token uses the auth card. */
.page { max-width: 40rem; margin-inline: auto; padding: var(--space-xl) var(--space-m); display: flex; flex-direction: column; gap: var(--space-m); }
.page h1 { margin: 0; font-size: var(--step-3); font-weight: 740; letter-spacing: -0.03em; }
.page p { margin: 0; }
.page-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2xs); }
.page-list li { display: flex; align-items: center; gap: var(--space-s); flex-wrap: wrap; }
.page-list small { color: var(--muted); }

/* OAuth consent (VibishWeb.OauthConsentView) */
.oauth-consent h1 { margin: 0; font-size: var(--step-2); font-weight: 650; letter-spacing: -0.02em; }
.oauth-consent p { margin: 0; }

/* /account (VibishWeb.Hologram.AccountPage): full width, left-aligned; buttons keep their size. */
.account { padding: var(--space-l) var(--space-m); }
.account .auth-form { gap: var(--space-xs); align-items: flex-start; }
.account > .auth-form { gap: var(--space-s); }
.account .passkey-list li { justify-content: flex-start; }
/* Its keys: one Republika tile each, Revoke at the tile's foot. */
.key-list { list-style: none; margin: 0; padding: 0; width: min(100%, 32rem); display: flex; flex-direction: column; gap: var(--space-2xs); }
.key-list .rk-tile { gap: var(--space-3xs); }
.key-list .rk-plain { align-self: flex-start; }
.account h3 { margin: var(--space-2xs) 0 0; font-size: var(--step--1); font-weight: 650; }
/* A project card's keys: New key beside the headline, Revoke under each key. */
.keys-head { display: flex; align-items: center; gap: var(--space-s); margin-top: var(--space-2xs); }
.keys-head h3 { margin: 0; }
.keys-hint { color: var(--muted); }
.account .key-rows li { flex-direction: column; align-items: flex-start; gap: var(--space-3xs); }
/* Its Agent section: the runner's processes (priv/static/runner.js). */
.runner-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-l); }
.runner-flow li { position: relative; display: flex; flex-direction: column; padding: var(--space-xs) var(--space-s); border: 1px solid var(--line); border-radius: var(--radius, 6px); }
.runner-flow li + li::before { content: "↓"; position: absolute; top: calc(-1 * var(--space-l)); left: var(--space-s); line-height: var(--space-l); color: var(--muted); }
.runner-flow span { color: var(--muted); font-size: var(--step--1); }
.brain-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; font-size: var(--step--1); }
.brain-list li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-s); padding: var(--space-3xs) 0; border-bottom: 1px solid var(--line); }
.brain-list .brain-what { flex-basis: 100%; color: var(--muted); }
.brain-list .brain-more { flex-basis: 100%; font-family: ui-monospace, monospace; color: var(--muted); overflow-wrap: anywhere; }
.brain-list code { overflow-wrap: anywhere; }
.brain-list .rk-plain { margin-left: auto; }
.site-hosts > li { display: flex; flex-direction: column; gap: var(--space-2xs); padding-block-end: var(--space-s); }
.site-hosts .site-thread-list { padding-inline-start: var(--space-s); border-inline-start: 1px solid var(--line); }
.tab-hidden { display: none; }
/* Its Projects section: one card per project, environments and team inside. */
.project-cards { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); gap: var(--space-s); }
.project-card { gap: var(--space-3xs); padding: var(--space-s); }
.project-card > b { font-size: var(--step-0); }
.project-card li { overflow-wrap: anywhere; }
.project-card > .rk-button { align-self: flex-start; margin-top: var(--space-2xs); }

/* /roadmap and /architecture, dev only (VibishWeb.Hologram.RoadmapPage, ArchitecturePage): moved
   from Republika's vibi.sh tab, in its Tailwind classes (DocsHead); these are its page rules. */
.docs-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-m); padding: var(--space-m) var(--space-m) var(--space-l); }
.docs-head .home-name { color: inherit; }
.docs-head nav { display: flex; gap: var(--space-s); font-weight: 600; }
.docs-head nav a { color: inherit; text-decoration: none; }
.docs-head nav a[aria-current] { color: var(--accent); }
.docs-side { top: var(--space-s); max-height: calc(100dvh - 2 * var(--space-s)); overflow-y: auto; scrollbar-width: thin; }
.docs-side a { color: inherit; text-decoration: none; }
.docs-side a.docs-sub { padding-left: var(--space-s); font-weight: 400; }
.docs-body > section { scroll-margin-top: var(--space-s); }
.docs-body > [data-sub] > h2 { font-size: var(--step-0); }
/* The body fits a 900-wide diagram; text keeps the reading width. In base, so a max-w-* wins. */
@layer base { .docs-body :is(p, ul, ol, dl, figcaption):not(.wide, .wide *, .spec-cards) { max-width: 38rem; } }
.spec-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-2xs); }
.spec-card { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3xs); padding: var(--space-xs) var(--space-s); text-align: left; font: inherit; color: var(--fg); cursor: pointer; }
.spec-meta { display: flex; align-items: baseline; gap: var(--space-2xs); }
.spec-bar { align-self: stretch; height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p), var(--line) var(--p)); }
@media (min-width: 701px) { .spec-panel { width: min(56rem, calc(100vw - 2 * var(--space-s))); } }
/* The diagrams' rules, from Republika's page-vibi.html and index.html. */
#data-links .wire { marker-end: url(#data-arrow); } #data-links .cat-who { --c: var(--accent); } #data-links .cat-talk { --c: var(--green); } #data-links .cat-in { --c: light-dark(oklch(0.6 0.15 65), oklch(0.75 0.15 65)); } #data-links [class*="cat-"] { fill: color-mix(in oklch, var(--c) 12%, var(--bg)); stroke: var(--c); }
#messages-api .wire { marker-end: url(#msg-arrow); }
#events-map .wire, #events-map .pipe.to { marker-end: url(#events-arrow); } #events-map .ev { font: 600 12.5px ui-monospace, monospace; fill: var(--fg); }
#socket-life .wire { marker-end: url(#life-arrow); } #socket-life .ev { font: 600 12.5px ui-monospace, monospace; fill: var(--fg); }
#vibi-cuts text { font: 12px var(--font); fill: var(--fg); }
#vibi-cuts .sub { font-size: 10.5px; fill: var(--muted); }
#vibi-cuts .lane-t { font-weight: 600; }
#vibi-cuts .cut { font-size: 11px; font-weight: 600; }
#vibi-cuts .box { fill: var(--bg); stroke: var(--line); }
#vibi-cuts .wire { fill: none; stroke: var(--muted); stroke-width: 1.25; marker-end: url(#vibi-cuts-arrow); }
#vibi-cuts .pipe { fill: none; stroke: var(--line); stroke-width: 1.25; }
#vibi-graph text { font: 15px var(--font); fill: var(--fg); }
#vibi-graph .sub { font-size: 13px; fill: var(--muted); }
#vibi-graph .lane-t { font-weight: 600; }
#vibi-graph .n { font-weight: 700; font-size: 14px; }
#vibi-graph .box { fill: var(--bg); stroke: var(--line); }
#vibi-graph .store { fill: color-mix(in srgb, var(--line) 50%, var(--bg)); stroke: var(--line); }
#vibi-graph .wire { fill: none; stroke: var(--muted); stroke-width: 1.5; marker-end: url(#vibi-arrow); }
#vibi-graph .pipe { fill: none; stroke: var(--line); stroke-width: 1.5; }
.case-graph text { font: 14px var(--font); fill: var(--fg); }
.case-graph .sub { font-size: 12.5px; fill: var(--muted); }
.case-graph .lane-t { font-size: 13px; font-weight: 600; }
.case-graph .n { font-size: 13px; font-weight: 700; }
.case-graph .box { fill: var(--bg); stroke: var(--line); }
.case-graph .store { fill: color-mix(in srgb, var(--line) 50%, var(--bg)); stroke: var(--line); }
.case-graph .core { fill: color-mix(in srgb, var(--line) 50%, var(--bg)); stroke: var(--accent); stroke-dasharray: 5 4; }
.case-graph .server { fill: var(--bg); stroke: var(--green); stroke-dasharray: 5 4; }
.case-graph .outside { fill: none; stroke: var(--line); stroke-dasharray: 3 3; }
.case-graph .wire { fill: none; stroke: var(--muted); stroke-width: 1.5; marker-end: url(#case-arrow); }
.case-graph .pipe { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 3 3; }
.case-graph .is-core { fill: var(--accent); }
.case-graph .is-server { fill: var(--green); }
.case-graph .is-never { fill: var(--red); }
#vibi-links text { font: 12px var(--font); fill: var(--fg); }
#vibi-links .sub { font-size: 10.5px; fill: var(--muted); }
#vibi-links .lane-t { font-weight: 600; }
#vibi-links .cut { font-size: 11px; font-weight: 600; }
#vibi-links .box { fill: var(--bg); stroke: var(--line); }
#vibi-links .wire { fill: none; stroke: var(--muted); stroke-width: 1.25; marker-end: url(#vibi-links-arrow); }
#vibi-deps text { font: 12px var(--font); fill: var(--fg); }
#vibi-deps .sub { font-size: 10.5px; fill: var(--muted); }
#vibi-deps .box { fill: var(--bg); stroke: var(--line); }
#vibi-deps .contract { fill: var(--bg); stroke: var(--line); stroke-dasharray: 4 3; }
#vibi-deps .dep { stroke: var(--muted); }
#deps-arrow path { fill: var(--muted); }
#vibi-integrated text { font: 15px var(--font); fill: var(--fg); }
#vibi-integrated .sub { font-size: 13px; fill: var(--muted); }
#vibi-integrated .lane-t { font-weight: 600; }
#vibi-integrated .n { font-weight: 700; font-size: 14px; }
#vibi-integrated .box { fill: var(--bg); stroke: var(--line); }
#vibi-integrated .store { fill: color-mix(in srgb, var(--line) 50%, var(--bg)); stroke: var(--line); }
#vibi-integrated .wire { fill: none; stroke: var(--muted); stroke-width: 1.5; marker-end: url(#vibi-integrated-arrow); }
#flows-map .wire { marker-end: url(#flows-arrow); }
/* How it works (Brain): the system as boxes and arrows; the numbered arrows are the steps listed under it. */
.sys { display: block; width: 100%; min-width: 40rem; max-width: 56rem; height: auto; font-family: var(--font); }
.sys-group { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 5; }
.sys-head { fill: var(--muted); font-size: 13px; font-weight: 600; }
.sys-box { fill: var(--overlay); stroke: var(--line); stroke-width: 1.5; }
.sys-store { stroke-dasharray: 4 3; }
.sys text { text-anchor: middle; }
.sys .sys-head, .sys .sys-left { text-anchor: start; }
.sys .sys-right { text-anchor: end; }
.sys-name { fill: var(--fg); font-size: 14px; font-weight: 700; }
.sys-sub { fill: var(--muted); font-size: 11px; }
.sys-label { fill: var(--muted); font-size: 11px; }
.sys-flow path { fill: none; stroke: var(--accent); stroke-width: 1.75; marker-end: url(#sys-arrow); }
.sys-flow path.sys-back { stroke: var(--faint); marker-end: url(#sys-arrow-back); }
#sys-arrow path { fill: var(--accent); }
#sys-arrow-back path { fill: var(--faint); }
.sys-step circle { fill: var(--accent); }
.sys-step text { fill: var(--on-accent); font-size: 11px; font-weight: 700; }
