/* One ink colour, one paper colour, and the greys between them carry the
   page; themes swap the two. Hue is added only to panels that say something,
   and each hue has one meaning:

   - Blue informs: the plan and its limits, stated before anything is typed.
   - Yellow (amber) cautions: advisory screening findings, and the panels
     that ask permission rather than report a result. Deployment still goes
     ahead.
   - Red stops you: a blocked screening, a refused repository, a plan with
     no room left, a failed deployment, an error, a destructive action.
   - Peach marks the agent setup block on the tokens page, the one card that
     invites you in. It is warm on purpose and kept clear of amber, so an
     invitation never reads as a caution.

   Warnings used to stay grey, so that red kept meaning "this will not
   proceed". They are yellow now, which keeps them apart from red just as
   well and lets them be noticed. Every hue is a soft ground, a border in the
   same hue and text dark enough to read; dark mode has its own set, because
   the light values vanish against near-black. */

/* The user agent gives [hidden] `display: none`, at the weakest possible
   specificity, so any rule of ours that sets `display` silently defeats it.
   That is not theoretical: `.steps-live li { display: flex }` kept the five
   teardown rows on screen through every deployment, and the same shape put a
   "show" button over a password that did not exist. Making it explicit and
   !important means `el.hidden = true` does what it reads like, everywhere,
   and a layout rule added later cannot quietly take it back. */
[hidden] { display: none !important; }

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --raised: #fafafa;
  --focus: #0a0a0a;
  --danger: #c1272d;
  --danger-line: #e3b3b5;
  --danger-bg: #fdf4f4;
  /* Amber, for panels that caution: advisory screening findings, and the
     panels that ask permission rather than report a result. Deliberately
     darker than the colour suggests: yellow text on paper is close to
     unreadable, so the hue lives in the ground and the border while the
     writing stays legible. */
  --warn: #8a6100;
  --warn-line: #e0be5a;
  --warn-bg: #fdf7e6;
  /* Peach, for the agent setup block. The hue is in the ground, the border
     and the active tab; text stays ink or a darkened terracotta so it
     reads at normal contrast. */
  --peach: #a1461c;
  --peach-line: #efc9b0;
  --peach-bg: #fdf3ec;
  --peach-well: #fffaf6;
  --peach-hover: #f9e4d6;
  /* Blue, for panels that inform: the plan and its limits. */
  --info: #1e4fae;
  --info-line: #b7caf0;
  --info-bg: #f2f6fd;
  /* Keyboard focus, drawn outside the control so it never shifts layout. */
  --ring: rgba(37, 99, 235, .32);
  --radius: 2px;
  --w: 34rem;
  --wide: 50rem;
  --widest: 66rem;
  --ctl: 2.25rem;       /* height of every control in the top bar */
  --bar-h: 4.6rem;      /* the pinned bar; anchors land below it */
}

:root[data-theme="dark"],
:root[data-theme="auto"] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --paper: #0a0a0a;
    --ink: #f2f2f2;
    --muted: #8f8f8f;
    --line: #262626;
    --raised: #141414;
    --focus: #f2f2f2;
    --danger: #ff7b72;
    --danger-line: #5e2a28;
    --danger-bg: #1d1211;
    --warn: #f0c04a;
    --warn-line: #5c4a1c;
    --warn-bg: #1e1a0e;
    --peach: #f2a27a;
    --peach-line: #4d3122;
    --peach-bg: #1b120d;
    --peach-well: #0f0a07;
    --peach-hover: #2a1c14;
    --info: #9dbcff;
    --info-line: #27406b;
    --info-bg: #0f1624;
    --ring: rgba(125, 165, 255, .45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a0a0a;
  --ink: #f2f2f2;
  --muted: #8f8f8f;
  --line: #262626;
  --raised: #141414;
  --focus: #f2f2f2;
  --danger: #ff7b72;
  --danger-line: #5e2a28;
  --danger-bg: #1d1211;
  --warn: #f0c04a;
  --warn-line: #5c4a1c;
  --warn-bg: #1e1a0e;
  --peach: #f2a27a;
  --peach-line: #4d3122;
  --peach-bg: #1b120d;
  --peach-well: #0f0a07;
  --peach-hover: #2a1c14;
  --info: #9dbcff;
  --info-line: #27406b;
  --info-bg: #0f1624;
  --ring: rgba(125, 165, 255, .45);
}

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

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

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Inter, system-ui, sans-serif;
  letter-spacing: -0.006em;
  display: flex;
  flex-direction: column;
}

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

.bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  /* Pinned, so the way to every other page is never a scroll away. It
     needs its own background, or the page scrolls visibly underneath. */
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
}
/* A jump to an anchor - Pricing to #plans, the manual's contents - would
   otherwise put the heading under the pinned bar. */
html { scroll-padding-top: calc(var(--bar-h) + 1rem); }

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 1.4rem 1.5rem;
  text-align: center; font-size: .8rem; color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer .policies { margin-top: .35rem; }
.site-footer a { color: var(--muted); text-decoration: underline;
                 text-underline-offset: 2px; }
.site-footer a:hover { color: var(--ink); }
.brand {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--ink); text-decoration: none;
}
.logo-mark { display: block; flex: none; }
.logo-word { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.035em; }
.bar-title { font-weight: 600; letter-spacing: -0.02em; }
/* In the app: the mark says whose it is, this says it is the part you act
   in. A rule between them keeps the two from reading as one word. */
.app-title { padding-left: .65rem; border-left: 1px solid var(--line); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
/* Everything on the right of the bar is one height, so a square theme
   toggle and a text button sit level instead of a small square beside a
   tall slab. */
.bar-right .btn, .bar-right .ghost, .bar-right a.btn {
  height: var(--ctl); padding: 0 .95rem; font-size: .85rem;
}
.who { color: var(--muted); font-size: .85rem; }

.icon-btn {
  background: none; border: 1px solid var(--line); color: var(--ink);
  width: var(--ctl); height: var(--ctl); border-radius: var(--radius);
  cursor: pointer; font-size: .95rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--ink); }

/* --------------------------------------------------------------- main -- */

main {
  flex: 1;
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  /* Only the width animates, so switching between the wizard and a table
     view reads as the page opening out rather than as a reload. */
  transition: max-width .25s cubic-bezier(.22,.61,.36,1);
}

/* Three widths, because the views genuinely differ.
   34rem is right for a form: one column of fields the eye scans without
   travelling. The projects table needs about 50rem to fit three actions on a
   row - more than that and the address column, which is the only one that
   absorbs slack, opens a gap wide enough that the row stops reading as a row.
   The log and Admin tables carry long output and five columns, and use
   whatever they can get. */
main.wide { max-width: var(--wide); }
main.widest { max-width: var(--widest); }

.view { animation: rise .18s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

h1 {
  font-size: 1.9rem; font-weight: 600; letter-spacing: -0.035em;
  margin-bottom: .6rem;
}
h2 { font-size: .8rem; font-weight: 600; text-transform: uppercase;
     letter-spacing: .09em; color: var(--muted); margin-bottom: .9rem; }

.lede { color: var(--muted); margin-bottom: 1.8rem; }
.fine { font-size: .82rem; color: var(--muted); margin-top: .9rem; }
.fine.error { color: var(--danger); font-weight: 500; }

/* "Too many requests - try again in N s": amber, because it cautions
   rather than refuses for good. Fixed to the foot of the viewport, since
   the call it answers may belong to any view, including one not shown. */
.rate-note {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 50; max-width: calc(100vw - 32px); margin: 0;
  padding: 10px 16px; border-radius: 8px;
  background: var(--warn-bg); color: var(--warn);
  border: 1px solid var(--warn-line); font-weight: 500;
}
.hint { font-size: .8rem; color: var(--muted); margin: .4rem 0 1.3rem; }
code {
  font: 500 .84em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--raised); border: 1px solid var(--line);
  padding: .05em .35em; border-radius: var(--radius);
}

/* -------------------------------------------------------------- steps -- */

.steps {
  display: flex; gap: 1.4rem; list-style: none;
  margin-bottom: 2.4rem; font-size: .82rem; color: var(--muted);
  counter-reset: s;
}
.steps li { counter-increment: s; display: flex; align-items: center; gap: .45rem; }
.steps li::before {
  content: counter(s);
  width: 19px; height: 19px; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; font-size: .68rem;
}
.steps li.on { color: var(--ink); font-weight: 500; }
.steps li.on::before { border-color: var(--ink); }
.steps li.did::before {
  content: "✓"; background: var(--ink); color: var(--paper); border-color: var(--ink);
}

/* -------------------------------------------------------------- forms -- */

fieldset { border: 0; }

label {
  display: block; font-size: .82rem; font-weight: 500;
  margin-bottom: .4rem;
}

input[type="text"], input:not([type]), input[type="email"], textarea {
  width: 100%;
  padding: .62rem .7rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  outline: none;
  transition: border-color .12s;
}
textarea {
  font: 400 .82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: vertical;
}
input:focus, textarea:focus { border-color: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .65; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.row + .row, .row { margin-bottom: 1.3rem; }

details { margin: 0 0 1.4rem; }
summary {
  cursor: pointer; font-size: .82rem; color: var(--muted);
  padding: .3rem 0; user-select: none;
}
summary:hover { color: var(--ink); }
details[open] { padding-bottom: .2rem; }
details label { margin-top: .9rem; }

/* choices */
.choice {
  display: flex; gap: .7rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem .9rem; margin-bottom: .6rem; cursor: pointer;
  font-weight: 400; transition: border-color .12s;
}
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--raised); }
.choice input { margin-top: .25rem; accent-color: var(--ink); }
.choice strong { display: block; font-size: .9rem; font-weight: 600; }
.choice em { font-style: normal; font-size: .82rem; color: var(--muted); }
/* An option the plan does not include: still visible, so the person can see
   what another plan would give them, but plainly not selectable. */
.choice.off { opacity: .55; cursor: not-allowed; }
.choice.off:hover { border-color: var(--line); }
.choice .plan-note { display: block; margin-top: .3rem; font-size: .78rem; color: var(--muted); }

#vps { margin: 1.2rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* alias */
.alias { display: flex; align-items: stretch; }
.alias input {
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.zone {
  display: flex; align-items: center; padding: 0 .7rem;
  border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--raised); color: var(--muted);
  font: 400 .85rem ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

/* ------------------------------------------------------------ buttons -- */

.actions { display: flex; gap: .6rem; margin-top: 1.8rem; }

.btn, .ghost, a.btn {
  font: 500 .88rem/1 inherit;
  padding: .68rem 1.15rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--ink);
  transition: opacity .12s, border-color .12s;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn, a.btn { background: var(--ink); color: var(--paper); }
.btn:hover, a.btn:hover { opacity: .85; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.ghost { background: none; color: var(--ink); border-color: var(--line); }
.ghost:hover { border-color: var(--ink); }

/* ----------------------------------------------------------- progress -- */

.track {
  height: 2px; background: var(--line);
  border-radius: 2px; overflow: hidden; margin: 1.6rem 0 1rem;
}
.fill {
  height: 100%; width: 0%; background: var(--ink);
  transition: width .45s cubic-bezier(.22,.61,.36,1);
}
.status { color: var(--muted); font-size: .88rem; }

.log {
  list-style: none; margin-top: 1.8rem;
  font: 400 .8rem/1.9 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
}
.log li { display: flex; gap: .6rem; }
.log li::before { content: "·"; }
.log li.ok::before { content: "✓"; color: var(--ink); }

/* ------------------------------------------------------------- result -- */

.url {
  display: inline-block; font-size: 1.05rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--ink); padding-bottom: 1px;
  margin-bottom: .3rem; word-break: break-all;
}
.url:hover { opacity: .7; }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; margin: 2rem 0 1.6rem; background: var(--raised);
}
dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; font-size: .88rem; }
dt { color: var(--muted); }
dd { word-break: break-all; }
.mono { font: 400 .85rem ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 520px) {
  main { padding: 2.5rem 1.2rem 4rem; }
  h1 { font-size: 1.55rem; }
  .row { grid-template-columns: 1fr; }
  .steps { gap: .9rem; font-size: .76rem; }
}

/* Port detection note. Confidence is shown by weight rather than colour so it
   stays legible in a monochrome palette. */
.hint.detect { margin-top: -0.9rem; margin-bottom: 1.3rem; }
.hint.detect .tick { color: var(--ink); font-weight: 600; }
.hint.detect .guess { font-style: italic; }

/* ------------------------------------------------------------------ nav -- */

.nav { display: flex; gap: .25rem; margin-left: 1.4rem; flex-shrink: 0; }
.navlink { white-space: nowrap;
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font: 500 .85rem inherit; padding: .3rem .55rem; border-radius: var(--radius);
}
.navlink:hover { color: var(--ink); }
.navlink.on { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }
/* The link to the manual. It uses .navlink for its type and hover, but it is
   an anchor rather than a button, so it needs the underline turning off that
   .navlink never had to. */
.doclink { text-decoration: none; }

.linklike {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--ink); text-decoration: underline;
}

/* ------------------------------------------------------- live progress -- */

.status { display: flex; align-items: center; gap: .5rem; }
.pct { margin-left: auto; font-variant-numeric: tabular-nums; font-size: .82rem; }

/* A spinner rather than a bare bar: a certificate wait can run a minute or
   more, and a bar that stops moving reads as a hang. */
.spinner {
  width: 11px; height: 11px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line); border-top-color: var(--ink);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner.stopped { animation: none; border-top-color: var(--line); }

.hint.detail { margin-top: .5rem; font-variant-numeric: tabular-nums; }

.steps-live {
  list-style: none; margin-top: 2rem; counter-reset: sl;
  font-size: .86rem; color: var(--muted);
}
.steps-live li {
  counter-increment: sl; display: flex; align-items: center; gap: .6rem;
  padding: .32rem 0; transition: color .2s;
}
.steps-live li::before {
  content: ""; width: 14px; height: 14px; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
}
.steps-live li.doing { color: var(--ink); font-weight: 500; }
.steps-live li.doing::before { border-color: var(--ink); border-style: dashed; }
.steps-live li.done { color: var(--ink); }
.steps-live li.done::before {
  content: "✓"; background: var(--ink); color: var(--paper);
  border-color: var(--ink); font-size: .62rem;
  display: grid; place-items: center;
}

/* ----------------------------------------------------------- completion -- */

h1.congrats { letter-spacing: -0.035em; }

.tls {
  display: flex; gap: .75rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; margin: 1.4rem 0;
}
.tls-mark { font-size: 1rem; line-height: 1.3; }
.tls strong { font-size: .88rem; }
.tls .fine { margin-top: .2rem; }

/* ------------------------------------------------------------ projects -- */

.table-wrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: .86rem; }
.grid th {
  text-align: left; font-weight: 500; color: var(--muted);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .07em;
  padding: 0 .7rem .55rem 0; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.grid td {
  padding: .7rem .7rem .7rem 0; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.grid th.right, .grid td.right { text-align: right; padding-right: 0; }
.grid a { color: var(--ink); }

/* The palette carries one ink colour and one accent; the browser's default
   link blue belongs to neither. Set once, globally, rather than per table -
   a link inside a definition list was rendering blue for exactly that
   reason. */
a { color: var(--ink); }
a:hover { opacity: .7; }

.pill {
  display: inline-block; font-size: .72rem; padding: .12rem .45rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.pill.running { border-color: var(--ink); font-weight: 600; }
.pill.exited, .pill.suspended { color: var(--muted); }
.pill.failed { border-color: var(--danger); color: var(--danger); font-weight: 600; }

.rowbtn {
  background: none; border: 1px solid var(--line); color: var(--ink);
  font: 500 .76rem inherit; padding: .28rem .6rem; cursor: pointer;
  border-radius: var(--radius); white-space: nowrap;
}
.rowbtn:hover { border-color: var(--ink); }
.rowbtn:disabled { opacity: .35; cursor: not-allowed; }
.rowbtn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* A flex row with a gap, rather than a margin on each button. The margin
   version put a leading gap on the first button, which is what pushed the
   group wide enough to wrap onto a second line. */
.rowacts { display: flex; gap: .3rem; justify-content: flex-end; flex-wrap: nowrap; }

/* Column sizing. The address is the only column that should absorb slack;
   the rest are shrink-to-fit around their contents, so the actions never
   have to choose between wrapping and pushing the table wide. */
.grid col.c-addr   { width: auto; }
.grid col.c-owner  { width: 11rem; }
.grid col.c-state  { width: 8.5rem; }
.grid col.c-acts   { width: 1px; }
.grid td.right, .grid th.right { white-space: nowrap; }
/* A failed build's reason, under its pill. It is Coolify's text: an image
   reference with a digest is one 116-character word, and with nothing to
   break it at the State column grew to fit it and pushed Actions past the
   right edge of the page. "anywhere" (not break-word) is what lowers the
   column's minimum width. Three lines, then the dashboard has the log; the
   whole message is the tooltip. */
.grid .fail-detail {
  overflow-wrap: anywhere; margin: .35rem 0 0;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}

/* Address cell: name and its log link share a baseline. They were in the
   same cell with nothing stopping a wrap, so the link dropped underneath and
   read as an indent rather than as a link belonging to the row. */
.addr { display: flex; align-items: baseline; gap: .5rem; }
.addr .name { font-weight: 500; }

@media (max-width: 760px) {
  .owner-col { display: none; }
  .nav { margin-left: .6rem; }
}

/* The dashboard's tabs sit in the middle of the bar. Between the two sides
   they are centred in whatever room is left; from 1200px, where there is
   room for both sides to be the same width, on the page itself - a grid of
   equal outer columns is the only way the middle of the bar is the middle
   of the window, since the logo and the account controls differ in width. */
.bar-left { display: flex; align-items: center; gap: .6rem; }
@media (min-width: 681px) {
  .app-bar .nav { margin: 0 auto; }
  .app-bar .bar-right { margin-left: 0; }
}
/* Just above the wrap, five tabs and the account controls share one line
   with little to spare; the Support tab took the last of it and put the page
   32px into a sideways scroll at 700px. Tighter tabs and a clipped login
   give that back without wrapping the bar sooner. */
@media (min-width: 681px) and (max-width: 900px) {
  .app-bar .nav { gap: 0; }
  .app-bar .navlink { padding: .3rem .3rem; }
  .app-bar .who { max-width: 7rem; overflow: hidden; text-overflow: ellipsis;
                  white-space: nowrap; }
  /* The mark already says where you are; the word beside it is the first
     thing to go, before "Sign out" is broken across two lines. */
  .app-bar .app-title { display: none; }
  .app-bar .bar-right .ghost { white-space: nowrap; }
}
@media (min-width: 1200px) {
  .app-bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .app-bar .nav { margin: 0; justify-self: center; }
  .app-bar .bar-right { justify-self: end; }
}

/* The bar is brand, nav and account controls on one line. Below this there is
   not room for all three, and letting them wrap in place staggered the nav
   links and broke "Sign out" across two lines. The bar wraps as a whole
   instead: identity and account on the first row, navigation on its own. */
@media (max-width: 680px) {
  /* The bar wraps onto more rows here, so anchors need more room. */
  :root { --bar-h: 9.5rem; }
  .bar { flex-wrap: wrap; padding: .9rem 1.2rem; row-gap: .7rem; }
  .bar-right { margin-left: auto; }
  /* Wraps rather than scrolls. It scrolled sideways with the scrollbar
     hidden, and a fifth link (Support) sat off the right edge of a phone
     with nothing to say it was there. */
  .nav {
    order: 3; width: 100%; margin-left: 0;
    flex-wrap: wrap; justify-content: center;
    column-gap: .9rem; row-gap: .35rem;
  }
  .ghost, .btn { white-space: nowrap; }
  .who { max-width: 9rem; overflow: hidden; text-overflow: ellipsis;
         white-space: nowrap; }
}

/* Below this the table stops being a table. Five columns of deployment state
   do not survive a phone, and horizontal scrolling hides the actions - which
   are the reason for visiting the page. Each row becomes a block with its
   own labels, so nothing is off-screen and nothing needs scrolling to find. */
@media (max-width: 560px) {
  .grid:not(.log), .grid:not(.log) tbody, .grid:not(.log) tr,
  .grid:not(.log) td { display: block; width: 100%; }
  .grid:not(.log) thead { display: none; }
  .grid:not(.log) colgroup { display: none; }
  .grid:not(.log) tr {
    border-bottom: 1px solid var(--line);
    padding: .9rem 0;
  }
  .grid:not(.log) td {
    border: 0; padding: .15rem 0;
    display: flex; gap: .8rem; align-items: baseline;
  }
  /* The header is gone, so each cell carries its own label. */
  .grid:not(.log) td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 5.5rem;
    color: var(--muted);
    font-size: .72rem; text-transform: uppercase; letter-spacing: .07em;
  }
  .grid:not(.log) td.right { text-align: left; }
  .grid:not(.log) td.right .rowacts { justify-content: flex-start; flex-wrap: wrap; gap: .35rem; }
  .owner-col { display: flex; }        /* room again once stacked */
}

/* ------------------------------------------------- transitional states -- */

/* A transition needs to read as "working", not as a finished state. The
   pill carries a small spinner so a slow suspend looks busy rather than stuck. */
.pill.busy { border-style: dashed; color: var(--ink); }
.mini-spin {
  display: inline-block; width: 7px; height: 7px; margin-right: .3rem;
  vertical-align: baseline; border-radius: 50%;
  border: 1.2px solid var(--line); border-top-color: var(--ink);
  animation: spin .7s linear infinite;
}
.busy-row td { opacity: .72; }
.busy-row td:first-child { opacity: 1; }

/* ------------------------------------------------------------ screening -- */

/* Severity is carried by hue and by weight, border and symbol together, so
   a blocked repository is unmistakable without colour too. Advisory findings
   are yellow and let the deployment go ahead; a block is red and does not. */
.scan {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem .9rem; margin: 0 0 1.3rem;
  font-size: .84rem;
}
.scan-head { display: flex; align-items: center; gap: .5rem; }

/* Screening runs against GitHub and Trivy and takes a few seconds. Without a
   moving element the panel reads as a finished scan that found nothing,
   which is the opposite of what it means. */
.scan-spin {
  display: inline-block; width: 11px; height: 11px;
  border: 1.5px solid var(--line); border-top-color: var(--ink);
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: -1px;
}
@media (prefers-reduced-motion: reduce) {
  /* Still distinguishable from a finished scan: the ring keeps the muted
     colour that no result state uses, and the button reads "Screening…". */
  .scan-spin { animation: none; border-top-color: var(--muted); }
}
.scan-mark { font-size: .9rem; line-height: 1; width: 1em; }
.scan.checking { color: var(--muted); }
.scan.clean .scan-mark { color: var(--ink); }
.scan.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.scan.warn .scan-head strong, .scan.warn .scan-mark { color: var(--warn); }
.scan.blocked {
  border-color: var(--danger); border-width: 2px; background: var(--danger-bg);
}
.scan.blocked .scan-head strong { font-weight: 700; color: var(--danger); }
.scan.blocked .scan-mark { color: var(--danger); }

/* The Dockerfile check shares the screening panel's three states. Its
   candidates are choices inside the panel, so they sit on the paper colour
   rather than on the tint, where a radio would read as part of the text. */
.df-text { margin: .45rem 0 0; }
.df-text:empty { display: none; }
.df-choices { margin-top: .6rem; }
.df-choices:empty { display: none; }
.df .choice { background: var(--paper); margin-bottom: .4rem; }
.df .choice strong { font: 500 .9em ui-monospace, SFMono-Regular, Menlo, monospace; }
.df #df-fix { margin: .7rem 0 0; }

/* The Dockerfile written for a repository, and the optional suggestions.
   Files are labelled above their snippet, so the copy button keeps its
   corner. */
.gen .choice { background: var(--paper); margin-bottom: .4rem; }
.gen-file { margin-top: .7rem; }
.gen-file > .fine { margin: 0 0 .3rem; }
.gen-file > .fine strong { font: 500 .95em ui-monospace, SFMono-Regular, Menlo, monospace; }
.gen #gen-again { margin: .7rem 0 0; }
.advice summary { cursor: pointer; font-weight: 600; }
.advice[open] summary { margin-bottom: .2rem; }
.advice .scan-list li.tip { color: var(--ink); }
.advice .scan-list .line { color: var(--muted); font-variant-numeric: tabular-nums; }
.advice > .fine { margin: .6rem 0 0; color: var(--muted); }

/* A port nobody has given yet: required, and marked as such, instead of a
   default that looked like an answer. */
input.needed { border-color: var(--warn-line); background: var(--warn-bg); }

/* Failure screen and inline errors. */
#view-error h1 { color: var(--danger); }
.fine.error, .lede.error { color: var(--danger); }
/* The form's own notes share its error line; one that says something is
   under way informs rather than refuses, so it takes the blue. */
.fine.info {
  color: var(--info); background: var(--info-bg);
  border: 1px solid var(--info-line); border-radius: var(--radius);
  padding: .55rem .8rem; font-weight: 500;
}

.scan-list { list-style: none; margin: .55rem 0 0; }
.scan-list li {
  padding: .28rem 0 .28rem .9rem; position: relative;
  color: var(--muted); line-height: 1.5;
}
.scan-list li::before { content: "·"; position: absolute; left: .15rem; }
.scan-list li.bad { color: var(--danger); font-weight: 500; }
.scan-list li.bad::before { content: "✕"; font-size: .7rem; top: .35rem; }
/* The list stays readable ink on the tint; the marker carries the hue. */
.scan-list li.warn { color: var(--ink); }
.scan-list li.warn::before { content: "!"; font-weight: 700; color: var(--warn); }
.scan-list code {
  font-size: .78em; padding: .02em .3em;
}
/* Secondary detail beside a primary value: a uuid after a project name, an
   "operator" tag after a login. Defined globally rather than inside the scan
   list, which is where it started - the admin tables used the same class and
   silently got no styling at all, so uuids rendered at the same weight as the
   names they qualify. */
.where {
  font: 400 .78em ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  opacity: .9;
}

/* -------------------------------------------------------- agent setup -- */

/* The block that invites you in, so it is the one card with warmth. Only
   the ground, the border and the active tab carry the hue; see the note at
   the top of this file for why it is peach and not amber. */
.card.agent {
  background: var(--peach-bg); border-color: var(--peach-line);
  padding: 1.4rem 1.5rem 1.5rem;
}
.card.agent h2 { color: var(--peach); margin-bottom: .5rem; }
.card.agent a { text-underline-offset: 2px; }
.card.agent a:hover { color: var(--peach); }
.card.agent dl {
  padding: .9rem 0; margin-top: .2rem;
  border-top: 1px solid var(--peach-line); border-bottom: 1px solid var(--peach-line);
}
.card.agent .copy { background: var(--peach-well); border-color: var(--peach-line); }
.card.agent .copy:hover { border-color: var(--peach); color: var(--peach); }

.mcp-intro { margin: 0 0 1rem; }
.agent-title { font-size: .95rem; font-weight: 600; margin: 1.4rem 0 .7rem; }

/* Folder tabs: the chosen one is cut from the same sheet as the panel under
   it, so which command you are looking at is never a guess. An underline
   alone read as a row of links. */
.agent-tabs {
  display: flex; flex-wrap: wrap; gap: .2rem;
  border-bottom: 1px solid var(--peach-line);
}
.agent-tabs button {
  background: none; border: 1px solid transparent; border-bottom: 0;
  border-radius: 5px 5px 0 0;
  padding: .5rem .85rem; margin-bottom: -1px; cursor: pointer;
  font: 500 .82rem inherit; color: var(--muted);
  transition: background .12s, color .12s;
}
.agent-tabs button:hover { color: var(--ink); background: var(--peach-hover); }
.agent-tabs button.on {
  color: var(--ink); font-weight: 600; background: var(--peach-well);
  border-color: var(--peach-line);
  /* Covers the row's bottom rule, joining the tab to its panel. */
  box-shadow: 0 1px 0 var(--peach-well);
}
.agent-tabs button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.agent-panel {
  background: var(--peach-well); border: 1px solid var(--peach-line); border-top: 0;
  border-radius: 0 0 5px 5px; padding: .9rem 1rem 1rem;
}
.agent-where { margin: 0 0 .5rem; }
/* The one-click install, above the steps by hand it saves. */
.agent-install {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem;
  margin: 0 0 .9rem; padding-bottom: .9rem; border-bottom: 1px solid var(--peach-line);
}
.agent-install .btn { text-decoration: none; }
.agent-install .fine { margin: 0; flex: 1 1 16rem; }
.agent-panel > .fine:last-child { margin-top: .7rem; }
.snippet { position: relative; }
.snippet pre {
  margin: 0; padding: .85rem 4.8rem .85rem 1rem;
  /* The card's own ground, set into the lighter panel: a grey well here
     read as a patch from another page. */
  background: var(--peach-bg); border: 1px solid var(--peach-line);
  border-radius: 4px; font-size: .8rem; line-height: 1.6;
  /* Wrapped, not scrolled: a command cut off at the edge reads as the
     whole command. Copy takes the text as written, line breaks and all. */
  white-space: pre-wrap; overflow-wrap: anywhere;
}
/* The page's inline-code chip, undone: this is already a block. */
.snippet pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.snippet .copy { position: absolute; top: .55rem; right: .55rem; margin: 0; }

/* Six folder tabs wrap into a ragged stack on a phone; a three-by-two grid
   of buttons keeps them tidy and every one in reach. */
@media (max-width: 520px) {
  .card.agent { padding: 1.1rem 1rem 1.2rem; }
  .agent-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem;
    border-bottom: 0; margin-bottom: .6rem;
  }
  .agent-tabs button {
    border: 1px solid var(--peach-line); border-radius: 5px; margin: 0;
    padding: .5rem .3rem; background: var(--peach-well);
  }
  .agent-tabs button.on {
    background: var(--ink); color: var(--paper); border-color: var(--ink);
    box-shadow: none;
  }
  .agent-panel { border-top: 1px solid var(--peach-line); border-radius: 5px; padding: .7rem; }
  .snippet pre { padding: 2.2rem .8rem .8rem; }
}

/* ----------------------------------------------------------- settings -- */

/* Three parts on one page: connect, what is connected, tokens. Space
   between them rather than rules, so the peach card stays the one accent. */
.settings-part + .settings-part { margin-top: 2.8rem; }
.settings-part .card.agent { margin-top: 0; }
#card-gate { margin-top: 0; margin-bottom: 1.2rem; }
.settings-lede { margin: 0 0 .8rem; }
/* dd breaks anywhere for long values; words here should wrap as words. */
.card.agent dd { word-break: normal; overflow-wrap: anywhere; }
.settings-h3 { font-size: .95rem; font-weight: 600; margin: 1.8rem 0 .7rem; }
/* The token snippet sits on the page, not in the peach card: a plain well. */
.api-snippet pre { background: var(--raised); border-color: var(--line); }
.api-snippet { margin-bottom: 1.4rem; }
.app-name { display: block; }
.app-self { display: block; margin: .1rem 0 0; }

/* ------------------------------------------------------------ billing -- */

.bill-head { display: flex; justify-content: space-between; align-items: flex-start;
             gap: 1rem; }
.bill-head h2 { margin: 0 0 .2rem; }
.bill-facts { display: grid; grid-template-columns: max-content 1fr;
              gap: .35rem 1.2rem; margin: 1rem 0 .6rem; font-size: .9rem; }
.bill-facts dt { color: var(--muted); }
.bill-facts dd { margin: 0; }
.bill-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }
/* Bandwidth against the allowance. The fill takes the meaning colours:
   blue informs, amber from 80% cautions, red once over is the thing that
   will pause the sites. All three are theme tokens with dark values. */
.bw-meter { height: .5rem; max-width: 18rem; margin: .3rem 0 .35rem;
            background: var(--line); border-radius: var(--radius);
            overflow: hidden; }
.bw-meter > span { display: block; height: 100%; width: 0;
                   background: var(--info); }
.bw-meter.warn > span { background: var(--warn); }
.bw-meter.over > span { background: var(--danger); }
.bw-text.warn { color: var(--warn); }
.bw-text.over { color: var(--danger); }
.bw-banner { border: 1px solid var(--danger-line); background: var(--danger-bg);
             color: var(--danger); border-radius: var(--radius);
             padding: .6rem .9rem; margin: 0 0 1rem; font-size: .85rem; }
.bill-notice { border: 1px solid var(--ink); border-radius: var(--radius);
               padding: .6rem .8rem; color: var(--ink); }
.bill-cadence { display: inline-flex; border: 1px solid var(--line);
                border-radius: var(--radius); margin: 0 0 1rem; overflow: hidden; }
.bill-cadence .cad { background: none; border: 0; padding: .45rem .9rem;
                     font: 500 .82rem inherit; color: var(--muted); cursor: pointer; }
.bill-cadence .cad.on { background: var(--ink); color: var(--paper); }
.bill-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem;
              margin-bottom: 1rem; }
.bill-plan { border: 1px solid var(--line); border-radius: var(--radius);
             padding: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.bill-plan h3 { margin: 0; font-size: 1rem; }
.bill-plan p { margin: 0; }
.bill-plan .btn, .bill-plan .ghost { margin-top: auto; }
.bill-plan.current { border-color: var(--ink); }
.bill-amount { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
               margin: .3rem 0 !important; }
.bill-dialog {
  /* The page's reset takes away the browser's own centring of a modal. */
  margin: auto; inset: 0;
  width: min(32rem, calc(100vw - 2rem)); border: 1px solid var(--ink);
  border-radius: var(--radius); padding: 1.4rem 1.5rem;
  background: var(--paper); color: var(--ink);
}
.bill-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.bill-dialog h2 { margin: 0 0 .4rem; font-size: 1.15rem; text-transform: none;
                  letter-spacing: -0.01em; color: var(--ink); }
.bill-actions.end { justify-content: flex-end; }
@media (max-width: 760px) { .bill-plans { grid-template-columns: 1fr; } }

/* The danger zone: red because it is the destructive action the palette
   reserves red for, and set apart at the foot of the page so it is never
   the next thing after something routine. */
.danger-zone { margin-top: 3.2rem; }
.danger-zone .sub { color: var(--danger); }
.danger-box {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.2rem; border: 1px solid var(--danger-line);
  border-left: 3px solid var(--danger); border-radius: var(--radius);
  padding: 1rem 1.1rem; background: var(--danger-bg);
}
.danger-box strong { font-size: .92rem; }
.danger-box .fine { margin-top: .25rem; }
.btn-danger {
  font: 500 .88rem/1 inherit; padding: .68rem 1.15rem; flex: none;
  border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--danger); background: var(--paper);
  color: var(--danger); transition: background .12s, color .12s;
}
.btn-danger:hover { background: var(--danger); color: var(--paper); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--paper); }
@media (max-width: 520px) {
  .danger-box { flex-direction: column; align-items: stretch; }
}

.del-dialog { width: min(36rem, calc(100vw - 2rem)); }
.del-lede { font-size: .9rem; margin: .6rem 0 .5rem; }
.del-projects {
  list-style: none; margin: 0 0 .9rem; border: 1px solid var(--line);
  border-radius: var(--radius); max-height: 14rem; overflow-y: auto;
}
.del-projects li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: .8rem; padding: .5rem .7rem; font-size: .86rem;
}
.del-projects li + li { border-top: 1px solid var(--line); }
.del-projects .del-name { font-weight: 600; overflow-wrap: anywhere; }
.del-projects .del-where { display: block; color: var(--muted); font-size: .78rem;
                           overflow-wrap: anywhere; }
.del-projects .del-what { color: var(--muted); font-size: .78rem; }
.del-projects li.failed { background: var(--danger-bg); }
.del-projects li.failed .del-what { color: var(--danger); font-weight: 500; }
.del-effects { margin: .2rem 0 1rem 1.1rem; font-size: .86rem; }
.del-effects li { margin: .3rem 0; }
.del-effects li.stop { color: var(--danger); font-weight: 500; }
.del-agree {
  display: flex; gap: .6rem; align-items: flex-start; cursor: pointer;
  font-size: .88rem; padding: .7rem .8rem; margin-bottom: 1rem;
  border: 1px solid var(--danger-line); border-radius: var(--radius);
  background: var(--danger-bg);
}
.del-agree input { margin-top: .2rem; accent-color: var(--danger); flex: none; }
.del-type { font-weight: 400; }
.del-type strong { font-weight: 600; }

.farewell {
  max-width: 46rem; margin: 1.6rem auto 1.4rem; padding: .9rem 1.1rem;
  border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--raised); font-size: .9rem;
}
.farewell strong { display: block; margin-bottom: .3rem; font-weight: 600; }
.farewell p + p, .farewell ul { margin-top: .5rem; }
.farewell-links { margin-left: 1.1rem; }

.trial-reset { margin-top: 0; }
.trial-reset .fine { margin: 0 0 1rem; }
.trial-reset-row { display: flex; gap: .6rem; }
.trial-reset + .trial-reset { margin-top: 1rem; }
.plan-grant-row { margin-top: .6rem; }
/* Admin's Capacity: the pause switch is a checkbox with its words beside it,
   not above it like the text fields. */
#cap-pause label.check { display: flex; gap: .5rem; align-items: center;
  font-weight: 600; margin: .4rem 0 .8rem; }
#cap-value { max-width: 8rem; }
/* Admin's Alerts panel: facts are free text from other people, and a
   long repository name must wrap rather than widen the table. */
#rec-alerts .fine { margin: 0 0 .6rem; }
.alert-facts { overflow-wrap: anywhere; color: var(--muted); }
.trial-reset-row select {
  font: inherit; padding: .55rem .6rem; background: var(--paper);
  color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
}
@media (max-width: 520px) { .trial-reset-row { flex-wrap: wrap; } }

/* ------------------------------------------------------------ support -- */

.support-form { margin-top: 0; }
.support-form .row { margin-bottom: 1.1rem; }
.support-form .field { min-width: 0; }
.support-form .field + .field { margin-top: 0; }
/* A message is prose, not a Dockerfile: the page's textarea is monospace
   for the fields that hold code. */
.support-form textarea {
  font: 400 .92rem/1.55 inherit; font-family: inherit;
  min-height: 11rem; background: var(--paper);
}
.support-form input[aria-invalid="true"],
.support-form textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error {
  color: var(--danger); font-size: .8rem; font-weight: 500;
  margin-top: .35rem;
}
.support-relay { margin: -.4rem 0 1.1rem; color: var(--warn); }
.support-under {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; min-height: 1.6rem;
}
.support-count {
  margin-left: auto; padding-top: .35rem;
  font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.support-count.over { color: var(--danger); font-weight: 500; }
.support-who { margin-top: .6rem; }
.support-who strong { color: var(--ink); font-weight: 500; }
.support-form .actions { margin-top: 1.2rem; }
.support-form .btn { min-width: 9.5rem; }
.support-sent { margin-top: 0; text-align: left; }
.support-sent-mark {
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: .8rem;
  background: var(--ink); color: var(--paper); font-weight: 700;
}
.support-sent-text {
  font-size: 1.05rem; font-weight: 500; overflow-wrap: anywhere;
}
.support-sent .fine { margin-top: .35rem; }
@media (max-width: 560px) {
  .support-form .row { grid-template-columns: 1fr; gap: 1.1rem; }
}

/* ----------------------------------------------------------- projects -- */

.projects-head { display: flex; align-items: center; justify-content: space-between;
                 gap: 1rem; }
.projects-head h1 { margin-bottom: 0; }
.refresh { padding: .45rem .85rem; font-size: .82rem; }
.refresh .mini-spin { margin-right: .4rem; }
.projects-updated { margin: -.6rem 0 1rem; min-height: 1.2em; }
/* A state read from our records while Coolify's answer is on its way. */
.pill.pending { opacity: .6; }

/* ------------------------------------------------------------ address -- */

.addr-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
                margin-bottom: 1rem; }
@media (max-width: 560px) { .addr-choices { grid-template-columns: 1fr; } }
.alias .generate { margin-left: .5rem; padding: .5rem .8rem; white-space: nowrap; }
.dns-box {
  border: 1px solid var(--ink); border-radius: var(--radius);
  padding: .8rem .9rem; margin: .2rem 0 1.2rem; font-size: .84rem;
}
.dns-box p { margin: 0 0 .6rem; }
.dns-record { width: 100%; border-collapse: collapse; margin-bottom: .6rem;
              table-layout: fixed; }
.dns-record th, .dns-record td {
  text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.dns-record th { font-weight: 500; color: var(--muted); font-size: .76rem; }
.dns-record th:first-child, .dns-record td:first-child { width: 3.5rem; }
.dns-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.dns-status.ok { font-weight: 500; }
.dns-status.bad { color: var(--ink); }
.consent-line { display: flex; gap: .5rem; align-items: center; margin: .4rem 0 0;
                font-weight: 400; }
.also-at { margin-top: -.4rem; }

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

.notices {
  list-style: none; margin: 1.2rem 0 1rem; padding: 0;
}
.notices li {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .9rem; margin-bottom: .6rem; font-size: .84rem;
}
.notices a { display: inline-block; margin-top: .35rem; }

/* -------------------------------------------------------- repo access -- */

/* How a repository will be read. Plain when all is well, outlined when
   something is needed from the person before Continue will work. */
.repo-access {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem .9rem; margin: 0 0 1.3rem; font-size: .84rem;
}
.repo-access p { margin: 0 0 .6rem; }
.repo-access p:last-child { margin-bottom: 0; }
.repo-access.ok { color: var(--muted); }
.repo-access.needed { border-color: var(--ink); }
.repo-access a.btn { margin-top: .2rem; }
.key-steps { margin: .4rem 0 .8rem; padding-left: 1.2rem; }
.key-steps li { margin-bottom: .6rem; }
.key-line {
  display: flex; gap: .5rem; align-items: flex-start; margin-top: .4rem;
}
.key-line code {
  flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .74rem;
  padding: .45rem .55rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--raised);
}
.dk-status { margin-left: .5rem; }
.dk-status.ok { color: var(--ink); font-weight: 500; }

/* --------------------------------------------------------------- plan -- */

/* Stated before the form, not after the build. The limits are the product
   here, so they are set in the informing blue rather than as a warning: a
   container that fits 512MB is not a problem being disclosed. A plan with
   no room left is the thing stopping you, so it turns red. */
.plan {
  display: flex; gap: .6rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .6rem .9rem; margin: 0 0 1rem;
  font-size: .82rem;
}
.plan.info {
  border-color: var(--info-line); background: var(--info-bg); color: var(--info);
}
.plan-ico {
  width: 1.1em; height: 1.1em; flex: none; margin-top: .22em;
}
.plan.full {
  border-color: var(--danger-line); background: var(--danger-bg);
  color: var(--danger); font-weight: 500;
}

/* Capacity notes sit in the screening panel but must not read as accusations,
   so they take the lightest treatment of the three severities. */
.scan-list li.note::before { content: "△"; font-size: .62rem; top: .42rem; }

/* ------------------------------------------------------- admin views -- */

.sub { font-size: .95rem; font-weight: 600; margin: 1.6rem 0 .6rem; }
.back { display: inline-block; margin: 0 0 1rem; font-size: .82rem; }

.loglink {
  font-size: .74rem; color: var(--muted); text-decoration: none;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.loglink:hover { color: var(--ink); border-color: var(--ink); }

/* The way into a project, and the only one. It used to read "log", which was
   true when the page held nothing else and became misleading once it carried
   health, credentials and push-to-deploy - a word that small, saying that
   little, is a door nobody opens. Ink rather than grey for the same reason. */
.loglink.dash {
  font-size: .78rem; color: var(--ink); border-bottom-color: var(--muted);
}

/* Long uuids and repository paths are the usual cause of a table forcing a
   horizontal scrollbar; they may break anywhere rather than widen a column. */
.grid .where { overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .sub { margin-top: 1.2rem; }
  .grid { font-size: .82rem; }
}

/* A build log is long and monospaced. It gets its own scroll box rather than
   stretching the page, and a fixed height so the audit table below it stays
   reachable without scrolling past a thousand lines. */
.grid.log { font-size: .76rem; }
.grid.log tbody { display: block; max-height: 60vh; overflow-y: auto; }
.grid.log thead, .grid.log tbody tr { display: table; width: 100%; table-layout: fixed; }
/* thead and tbody are separate `display: table` boxes here, so the browser
   cannot size their columns together - every width has to be stated for BOTH
   or the two drift apart. Column three had a width on the header only, which
   is why the DETAIL heading sat well left of the text under it. */
.grid.log th:nth-child(1), .grid.log td:nth-child(1) { width: 5.5rem; }
.grid.log th:nth-child(2), .grid.log td:nth-child(2) { width: 5rem; }
.grid.log th:nth-child(3), .grid.log td:nth-child(3) { width: 9rem; }
.grid.log th:nth-child(4), .grid.log td:nth-child(4) { width: auto; }

/* The body scrolls and the header does not, so the header needs the width of
   a scrollbar added back or its columns sit a few pixels left of the body's. */
.grid.log thead { padding-right: var(--sbw, 0px); }

/* On a narrow screen those three fixed columns would leave nothing for the
   message, which is the column anyone is actually reading. The step name goes
   first - it is the least informative of the three once the source is shown. */
@media (max-width: 560px) {
  .grid.log { font-size: .72rem; }
  .grid.log th:nth-child(1), .grid.log td:nth-child(1) { width: 4.2rem; }
  .grid.log th:nth-child(2), .grid.log td:nth-child(2) { width: 3.6rem; }
  .grid.log th:nth-child(3), .grid.log td:nth-child(3) { display: none; }
  .grid.log tbody { max-height: 50vh; }
}

.mono { font: 400 .95em ui-monospace, SFMono-Regular, Menlo, monospace; }
/* Build output contains long unbroken tokens - image digests, URLs - which
   would otherwise force the whole table wider than the screen. */
.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.grid tr.dim td { color: var(--muted); }
/* A discrepancy in the reconcile tables - an untracked project, an empty team
   - is something to act on. The row is tinted so it can be found by scanning,
   but only the verdict cell takes the accent: painting the whole row red
   colours the member count too, and the count is not what is wrong.
   The log table is deliberately excluded. tr.bad there means stderr, and
   stderr is mostly npm deprecation notices; painting every one of them red
   would train the reader to ignore red, which costs more than it buys. */
.grid:not(.log) tr.bad { background: var(--danger-bg); }
.grid:not(.log) tr.bad td:last-child {
  color: var(--danger); font-weight: 600;
}
.grid.log tr.bad td { color: var(--ink); font-weight: 500; }
.grid td.src { color: var(--muted); font-size: .92em; }

/* ------------------------------------------------------------- done -- */

/* One line drawing, large enough to register as a reward and quiet enough
   not to compete with the URL above it, which is what people came for. */
.cheer {
  display: flex; justify-content: center;
  margin: 2.4rem 0 1.8rem; color: var(--muted);
}
.cheer svg { width: 96px; height: 96px; }

/* Small inline action beside a value that has to be copied exactly. A
   password read off a screen gets mistyped; one behind a button does not. */
.copy {
  background: none; border: 1px solid var(--line); color: var(--muted);
  font: 500 .68rem inherit; padding: .1rem .38rem; margin-left: .45rem;
  border-radius: var(--radius); cursor: pointer; vertical-align: 1px;
  text-transform: uppercase; letter-spacing: .04em;
}
.copy:hover { border-color: var(--ink); color: var(--ink); }

.card.push { padding: 0; }
.card.push summary {
  cursor: pointer; padding: 1rem 1.2rem; font-size: .9rem;
  list-style: none;
}
.card.push summary::-webkit-details-marker { display: none; }
/* A trailing space in generated content collapses, so the marker needs a
   margin rather than a space to sit off the text. */
.card.push summary::before {
  content: "\25B8"; color: var(--muted); margin-right: .45rem;
}
.card.push[open] summary::before { content: "\25BE"; }
.card.push > *:not(summary) { padding: 0 1.2rem; }
.card.push > *:last-child { padding-bottom: 1.2rem; }
.card.push dl { margin-top: .7rem; }
.card.push dd { word-break: break-all; }

/* ------------------------------------------------------------ wizard -- */

/* A completed step is a way back. Rendered as a button so it is reachable by
   keyboard and announces itself as an action, then stripped of every button
   affordance so the stepper still reads as a stepper. */
.steps li button {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
}
.steps li button:disabled { cursor: default; }
.steps li.did button:hover { color: var(--ink); text-decoration: underline; }

/* Availability, answered while the address is typed. Weight carries the
   verdict; red is kept for things that stop you, and a taken address does
   stop you, so it takes the accent. */
.hint.good { color: var(--ink); }
.hint.bad { color: var(--danger); font-weight: 500; }

.opt {
  font-size: .72rem; color: var(--muted); font-weight: 400;
  text-transform: uppercase; letter-spacing: .06em; margin-left: .4rem;
}

/* What Deploy is about to do, on the step where Deploy lives. Everything it
   commits to was entered on steps the reader has already left. */
.review {
  border-top: 1px solid var(--line);
  margin: 1.8rem 0 0; padding-top: 1.2rem;
}
.review .sub { margin-top: 0; font-size: .78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em; font-weight: 500; }
.review dl { font-size: .86rem; gap: .45rem 1.2rem; }
.review dd { word-break: break-word; }

.elapsed {
  margin-left: .7rem; color: var(--muted);
  font-variant-numeric: tabular-nums; font-size: .82rem;
}

/* "watch" sits beside "log" and must not read as a different kind of thing. */
.loglink.watch {
  background: none; padding: 0; font-family: inherit; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--line);
}

/* ------------------------------------------------------------- admin -- */

/* A menu down the left and one section beside it. The menu is a list of
   links rather than buttons: each item is an address, so Back, a new tab and
   a link pasted into a chat all land on the same section. */
.admin {
  display: grid; grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 2.4rem; align-items: start;
}
/* Positioned so the items' offsetLeft is measured from the menu, which is
   what keeps the chosen one in view when the menu is a strip (app.js). */
.admin-menu { position: sticky; top: calc(var(--bar-h) + 1rem); }
.admin-menu ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .1rem;
}
.admin-menu a {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; padding: .45rem .7rem; font-size: .86rem; line-height: 1.3;
  color: var(--muted); text-decoration: none;
  border-left: 2px solid transparent;
}
.admin-menu a:hover { color: var(--ink); background: var(--raised); opacity: 1; }
.admin-menu a[aria-current="page"] {
  color: var(--ink); font-weight: 600;
  border-left-color: var(--ink); background: var(--raised);
}
.admin-menu a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* Amber, because it asks for a look rather than saying something failed;
   the section itself says how bad. Absent when there is nothing to say. */
.admin-badge {
  flex: none; min-width: 1.35rem; padding: .05rem .4rem;
  font-size: .7rem; font-weight: 600; line-height: 1.3; text-align: center;
  color: var(--warn); background: var(--warn-bg);
  border: 1px solid var(--warn-line); border-radius: 999px;
}
.admin-body { min-width: 0; }
.admin-body > #rec-error { margin: 0 0 1rem; }
.admin-section { animation: rise .18s ease both; }
.admin-section > .sub:first-child { margin-top: 0; }
/* "Nothing to report": said in the section, quietly, so an empty section
   reads as checked rather than as not loaded. */
.admin-calm {
  font-size: .86rem; color: var(--muted); margin: 1rem 0;
  padding: .7rem .9rem; background: var(--raised);
  border: 1px solid var(--line); border-radius: var(--radius);
}
/* Read by a screen reader, not shown: the badge's "to report". */
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Too narrow for two columns: the menu becomes a strip above the section
   that scrolls sideways. Its scrollbar stays visible - the top bar's nav once
   scrolled with it hidden, and the link past the edge had nothing to say it
   was there. */
@media (max-width: 760px) {
  .admin { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .admin-menu {
    position: relative; top: auto;
    overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: thin; border-bottom: 1px solid var(--line);
  }
  .admin-menu ul { flex-direction: row; gap: .2rem; width: max-content; }
  .admin-menu a {
    white-space: nowrap; padding: .5rem .6rem;
    border-left: 0; border-bottom: 2px solid transparent;
  }
  .admin-menu a[aria-current="page"] {
    background: none; border-bottom-color: var(--ink);
  }
}
@media (max-width: 520px) {
  main:has(> #view-admin:not([hidden])) { padding-left: 16px; padding-right: 16px; }
}

/* --------------------------------------------------------- reconcile -- */

/* The objects form a hierarchy - a team holds members and projects, a project
   holds applications - and reading that as three flat tables meant doing the
   join by eye. Indentation carries the relation; a left rule carries the
   nesting without a box around everything. */
.node { margin: 0 0 .2rem; }
.node.team {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem 1rem; margin-bottom: .7rem;
}
.node.team.spare { border-style: dashed; }
.node.project {
  margin: .7rem 0 0 .2rem; padding: .55rem 0 .2rem .9rem;
  border-left: 2px solid var(--line);
}
.node.project.spare { border-left-color: var(--danger); }
.node.app {
  margin: .3rem 0 0 .9rem; font-size: .82rem;
  padding-left: .8rem; border-left: 1px solid var(--line);
}

.node-head {
  display: flex; align-items: center; gap: .7rem;
  justify-content: space-between; flex-wrap: wrap;
}
.node-title { font-size: .9rem; font-weight: 500; }
.node-title code {
  font-size: .78em; color: var(--muted); font-weight: 400;
}
.node-why { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.node-why.empty { font-style: italic; margin-left: .9rem; }

/* A conflict is the one thing on this page that is actively wrong rather than
   untidy, so it is the one thing that takes the accent. */
.conflict {
  border: 2px solid var(--danger); background: var(--danger-bg);
  border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .8rem;
  font-size: .84rem;
}
.conflict strong { color: var(--danger); }
.conflict ul { list-style: none; margin: .5rem 0 0; }
.conflict li { padding: .2rem 0 .2rem .9rem; position: relative; }
.conflict li::before { content: "·"; position: absolute; left: .15rem; }
.conflict code { font-size: .88em; }
.cert-bad { color: var(--danger); }
.cert-warn { color: var(--warn); }

/* Armed by the first click, fired by the second. Wide enough for the longer
   label so the row does not reflow between the two. */
.rowbtn[data-armed="1"] { border-color: var(--danger); color: var(--danger); }

/* Hosting type. Not a status, so no pill: it never changes for a given
   deployment, and dressing it like state would invite reading it as one. */
.host { font-size: .8rem; white-space: nowrap; }
.host.managed { color: var(--muted); }
.host.own { color: var(--ink); }
.host.own::before { content: "\2197"; margin-right: .3rem; opacity: .55; }
.grid col.c-host { width: 9rem; }

/* ----------------------------------------------------------- consent -- */

/* Set apart from the fields above it. What is being agreed to is unusual
   enough - root on someone's machine - that it should not read as one more
   form control. */
.consent {
  border: 1px solid var(--warn-line); border-left-width: 3px;
  border-radius: var(--radius);
  padding: .9rem 1rem; margin-top: 1.2rem; background: var(--warn-bg);
}
/* Amber at rest because it is asking; red once it is the thing stopping you.
   Keeping the two apart is what stops red meaning "look at this" rather than
   "this will not proceed". */
.consent.needed { border-color: var(--danger); background: var(--danger-bg); }
.consent > strong {
  display: block; font-size: .88rem; margin-bottom: .55rem; color: var(--warn);
}
.consent.needed > strong { color: var(--danger); }
.consent ul { list-style: none; margin: 0 0 .8rem; }
.consent li {
  font-size: .82rem; color: var(--muted); line-height: 1.5;
  padding: .22rem 0 .22rem .9rem; position: relative;
}
.consent li::before {
  content: "·"; position: absolute; left: .15rem; color: var(--warn);
}

/* The agreement itself gets full contrast: it is the sentence being agreed
   to, not the explanation around it. */
.consent-agree {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .85rem; color: var(--ink); cursor: pointer;
  padding-top: .7rem; border-top: 1px solid var(--warn-line);
}
.consent.needed .consent-agree { border-top-color: var(--danger-line); }
.consent-agree input { margin-top: .25rem; accent-color: var(--ink); flex: 0 0 auto; }

/* --------------------------------------------------- deployment dashboard --
   The header pairs the live address with the container's real state, because
   those two are what someone opens this page to compare: a URL that looks
   right and a container that exited is the failure worth seeing at a glance.
   They wrap rather than truncate - an alias plus a state pill does not fit a
   phone on one line, and a shortened hostname is worse than a second line. */
.dash-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .6rem 1rem; flex-wrap: wrap; margin-bottom: .9rem;
}
.dash-head .url { margin-bottom: 0; }

/* Controls sit below the facts they act on, left-aligned: the row version is
   right-aligned because it is the last column of a table, which is not a
   reason to push a lone group of buttons to the far edge of a card. */
.dash-acts {
  justify-content: flex-start; flex-wrap: wrap; gap: .4rem;
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line);
}

/* A button that reveals a secret is not a row action and should not look like
   one; it matches the copy buttons it sits beside. The [hidden] rule at the
   top of this file is what keeps this from overriding `hidden`. */
#dep-hook-wrap dd {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}

/* ------------------------------------------------------------- tokens -- */

/* Minting is one field and one button; a stacked form would make a two-second
   task look like the deployment wizard. */
.row-inline {
  /* Stretch: the button takes the field's height, so the two read as one
     control rather than a short button beside a tall box. */
  display: flex; align-items: stretch; gap: .6rem; flex-wrap: wrap;
  margin: 1.6rem 0 .6rem;
}
.row-inline label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.row-inline input { flex: 1 1 18rem; }
.row-inline button { flex: none; height: auto; }
.row-inline input { margin: 0; }

/* Amber, like the consent panel and for the same reason: this is not a result
   being reported, it is the one moment a secret can be copied. */
.card.warn {
  border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn);
}
.card.warn h2, .card.warn .fine { color: var(--warn); }
.card.warn .mono { color: var(--ink); word-break: break-all; }

/* A compact variant of .choice for picking among servers you already have:
   the same control, without the vertical weight that suits a two-way
   decision at the top of a step. */
.choice.compact { padding: .55rem .7rem; margin-bottom: .4rem; }
.choice.compact strong { font-size: .9rem; }
.choice.compact em { font-size: .78rem; }

#known-servers { margin-bottom: 1.2rem; }
#reuse-note { margin-top: .2rem; }

/* -------------------------------------------------------- new project -- */

/* The first page a signed-in person sees. Scoped to this view, so the other
   dashboard pages and the public ones keep their measure while this one is
   reviewed: a slightly larger type, softer corners, and the form set on a
   card of its own so it reads as one task rather than a column of fields. */
main:has(> #view-form:not([hidden])) { max-width: 40rem; }
#view-form {
  --radius: 8px;
  font-size: 16px;
}

.wiz-head {
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 1.4rem;
}
.wiz-intro { flex: 1; min-width: 0; }
.wiz-head h1 { font-size: 2.1rem; margin-bottom: .5rem; }
.wiz-head .lede { font-size: 1.02rem; line-height: 1.55; margin-bottom: 0; }
.wiz-art { width: 11rem; flex: none; color: var(--muted); }
.wiz-art .art-soft { fill: var(--raised); }
.wiz-art .art-flow { stroke: var(--info); stroke-dasharray: 2 4; }
.wiz-art .art-flow-head { stroke: var(--info); }
.wiz-art .art-accent { fill: var(--info-bg); stroke: var(--info); }
.wiz-art .art-accent-line { stroke: var(--info); }
.wiz-art .art-spark { stroke: var(--info); opacity: .55; stroke-width: 1.5; }

#view-form .plan { font-size: .9rem; margin: 0 0 1.8rem; padding: .7rem 1rem; }

/* The stepper: one dot per step with what it is about drawn inside, joined
   by a rule that fills in as the steps are done. */
#view-form .steps {
  gap: 0; margin-bottom: 1.4rem; font-size: .92rem; align-items: center;
}
#view-form .steps li { counter-increment: none; gap: 0; flex: none; }
#view-form .steps li::before { content: none; }
#view-form .steps li:not(:last-child) { flex: 1; }
#view-form .steps li:not(:last-child)::after {
  content: ""; flex: 1; height: 2px; margin: 0 .9rem; min-width: 1rem;
  background: var(--line); border-radius: 2px;
}
#view-form .steps li.did:not(:last-child)::after { background: var(--ink); }
#view-form .steps li button {
  display: inline-flex; align-items: center; gap: .6rem; border-radius: 999px;
}
.step-dot {
  width: 2.1rem; height: 2.1rem; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--muted);
  transition: background .15s, border-color .15s, color .15s;
}
.step-dot svg {
  width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.step-dot .step-done { display: none; stroke-width: 2.4; }
#view-form .steps li.on .step-dot {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
  box-shadow: 0 0 0 4px var(--raised);
}
#view-form .steps li.did .step-dot { border-color: var(--ink); color: var(--ink); }
#view-form .steps li.did .step-ico { display: none; }
#view-form .steps li.did .step-done { display: block; }
#view-form .steps li.did button:hover { text-decoration: none; }
#view-form .steps li.did button:hover .step-text { text-decoration: underline; }

/* Each step on a card: the task in one place, its controls at its foot. */
#view-form .step {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -18px rgba(0, 0, 0, .14);
}

/* Field labels only: .choice and the consent line are labels too, with
   spacing of their own. */
#view-form label:not([class]) { font-size: .9rem; margin-bottom: .45rem; }
#view-form .hint { font-size: .86rem; line-height: 1.55; margin: .5rem 0 1.4rem; }
#view-form .hint.detect { margin-top: -.9rem; }
#view-form .fine { font-size: .86rem; }
#view-form summary { font-size: .9rem; }
#view-form .choice strong { font-size: 1rem; }
#view-form .choice em { font-size: .88rem; }
#view-form .scan, #view-form .repo-access, #view-form .consent, #view-form .dns-box {
  font-size: .9rem; padding: .9rem 1rem;
}
#view-form .scan-list li { padding-top: .32rem; padding-bottom: .32rem; }
/* A clean result has no list; its margin left a blank line under the title. */
.scan-list:empty { display: none; }
/* The verdict as a small badge in its hue, so the panel's meaning is read
   before its title is. The spinner and an empty mark keep their own look. */
#view-form .scan-head strong { font-weight: 600; }
#view-form .scan:not(.checking) .scan-mark:not(:empty) {
  width: 1.35rem; height: 1.35rem; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: .75rem; font-weight: 700; line-height: 1;
  background: var(--ink); color: var(--paper);
}
#view-form .scan.warn .scan-mark:not(:empty) { background: var(--warn); color: var(--paper); }
#view-form .scan.blocked .scan-mark:not(:empty) { background: var(--danger); color: var(--paper); }
#view-form .scan.clean { background: var(--raised); }
#view-form code { font-size: .82em; }

/* 16px text in the fields also stops iOS zooming the page on focus. */
#view-form input[type="text"], #view-form input:not([type]),
#view-form input[type="email"], #view-form input[type="search"],
#view-form textarea, #view-form select {
  font-size: 1rem; padding: .7rem .8rem; min-height: 2.9rem;
}
/* The picker's filter and branch list, which the base field rule above the
   wizard does not cover. */
#view-form input[type="search"], #view-form select {
  width: 100%; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; outline: none;
}
#view-form select { appearance: none; padding-right: 2.2rem; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: .95rem; top: 50%;
  width: .45rem; height: .45rem; margin-top: -.3rem; pointer-events: none;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}
#view-form textarea { font-size: .86rem; }
#view-form input:hover:not(:focus), #view-form textarea:hover:not(:focus),
#view-form select:hover:not(:focus) {
  border-color: var(--muted);
}
#view-form input:not([type="radio"], [type="checkbox"]):focus,
#view-form textarea:focus, #view-form select:focus {
  border-color: var(--info); box-shadow: 0 0 0 3px var(--ring);
}
/* The ring for everything else a keyboard can reach: a mouse click draws
   nothing, a Tab always does. */
#view-form :is(button, a, summary):focus-visible {
  outline: none; box-shadow: 0 0 0 3px var(--ring);
}
#view-form :is(.choice, .repo-opt):has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--ring);
}
#view-form .linklike:focus-visible { border-radius: 3px; }

/* A GitHub mark inside the repository field says what kind of address goes
   there before a word is read. */
.field-icon { position: relative; }
.field-icon > .gh-mark {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  width: 1.05rem; height: 1.05rem; color: var(--muted); pointer-events: none;
}
#view-form .field-icon input { padding-left: 2.5rem; }


/* Buttons: one filled action per step, at the card's foot on the right
   where the eye ends; Back is outlined, on the left. */
#view-form .actions {
  justify-content: flex-end; margin-top: 1.6rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
#view-form .actions [data-back] { margin-right: auto; }
#view-form .btn, #view-form .ghost {
  font-size: .95rem; padding: .78rem 1.35rem; min-height: 2.9rem;
  transition: opacity .12s, border-color .12s, box-shadow .12s, transform .12s;
}
#view-form .btn:not(:disabled):active { transform: translateY(1px); }
#view-form [data-next]::after { content: "\2192"; margin-left: .55rem; }
#view-form .btn.sm, #view-form .ghost.sm {
  font-size: .88rem; padding: .55rem .95rem; min-height: 0; gap: .5rem;
}
#view-form .alias .generate { min-height: 0; padding: .5rem .9rem; }
/* Push-to-deploy on a public repository is optional, so it must not wear
   the same weight as Continue. Required access keeps the filled button. */
#view-form .repo-access.ok a.btn {
  background: none; color: var(--ink); border-color: var(--line);
}
#view-form .repo-access.ok a.btn:hover { border-color: var(--ink); opacity: 1; }
#view-form .repo-access.ok { background: var(--raised); }

/* The offer to install the GitHub App, at the top of step 1. Its button is
   outlined: Continue is the one filled action on the step, and this is an
   invitation, not the way forward. */
.gh-connect {
  display: flex; gap: .95rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--raised); padding: 1rem 1.1rem; margin-bottom: 1.5rem;
}
.gh-badge {
  width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--paper);
}
.gh-badge .gh-mark { width: 1.35rem; height: 1.35rem; }
.gh-connect-body strong { display: block; font-size: 1rem; margin-bottom: .2rem; }
.gh-connect-body p { font-size: .88rem; color: var(--muted); line-height: 1.55; }
.gh-connect-acts { display: flex; align-items: center; gap: 1rem; margin-top: .8rem; }
.gh-connect-acts .gh-mark { width: 1rem; height: 1rem; }
.gh-connect-acts .ghost { background: var(--paper); }
.linklike.quiet { color: var(--muted); font-size: .88rem; text-decoration: none; }
.linklike.quiet:hover { color: var(--ink); text-decoration: underline; }

/* The repositories the installation can read for this person: a filter, a
   scrolling list of radio rows, and a way back to the typed field. */
.repo-picker { margin-bottom: .2rem; }
.picker-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: .45rem;
}
#view-form .picker-head label {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0;
}
.picker-head .gh-mark { width: 1rem; height: 1rem; }
.picker-manage { font-size: .84rem; color: var(--muted); }
.repo-list {
  margin-top: .5rem; border: 1px solid var(--line); border-radius: var(--radius);
  max-height: 15.5rem; overflow-y: auto; background: var(--paper);
}
#view-form .repo-opt {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .9rem; margin: 0; cursor: pointer;
  font-size: .95rem; font-weight: 400; border-bottom: 1px solid var(--line);
  transition: background .12s;
}
#view-form .repo-opt:last-child { border-bottom: 0; }
#view-form .repo-opt:hover { background: var(--raised); }
#view-form .repo-opt:has(input:checked) {
  background: var(--raised); box-shadow: inset 3px 0 0 var(--ink);
}
.repo-opt input { accent-color: var(--ink); flex: none; }
.repo-name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.repo-owner { color: var(--muted); font-weight: 400; }
.repo-vis {
  display: inline-flex; align-items: center; gap: .3rem; flex: none;
  font-size: .76rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .08rem .5rem;
}
.repo-vis .lock {
  width: .8rem; height: .8rem; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round;
}
.repo-meta { flex: none; font-size: .8rem; color: var(--muted); min-width: 5.5rem;
             text-align: right; }
.repo-empty { padding: .9rem; font-size: .88rem; color: var(--muted); }
.repo-empty p { margin: 0 0 .65rem; }
#view-form .repo-empty .ghost {
  font-size: .88rem; padding: .5rem .9rem; min-height: 0;
  background: var(--paper);
}
/* An address the list does not have: a row like the others, but a button,
   since choosing it leaves the list for the address field. */
#view-form .repo-use {
  width: 100%; text-align: left; color: var(--ink);
  font-family: inherit; line-height: inherit;
  background: none; border: 0; border-bottom: 1px solid var(--line);
}
.repo-use-text { flex: 1; min-width: 0; display: flex; flex-direction: column;
                 gap: .15rem; }
.repo-use-note { font-size: .8rem; color: var(--muted); }
.repo-use-go { flex: none; color: var(--muted); }
.repo-picker .hint { margin-top: .6rem; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] #view-form .step { background: var(--raised); box-shadow: none; }
}
:root[data-theme="dark"] #view-form .step { background: var(--raised); box-shadow: none; }

@media (max-width: 620px) {
  .wiz-art { display: none; }
  .wiz-head h1 { font-size: 1.7rem; }
  .wiz-head .lede { font-size: .98rem; }
  #view-form .step { padding: 1.25rem 1.1rem 1.1rem; border-radius: 10px; }
  /* Three labels and two rules do not fit a phone; the step in hand keeps
     its name and the others their icons. */
  #view-form .steps li:not(.on) .step-text { display: none; }
  #view-form .steps li:not(:last-child)::after { margin: 0 .6rem; }
  .gh-connect { padding: .9rem; gap: .75rem; }
  .gh-badge { width: 2.1rem; height: 2.1rem; }
  .repo-meta { display: none; }
  #view-form .actions .btn { flex: 1; }
}
/* The access sentence is often the panel's only line; its bottom margin was
   meant for the button under it and left a gap when there was none. */
#view-form #repo-access-text { margin-bottom: 0; }
#view-form #repo-install { margin-top: .75rem; }
#view-form #deploy-key-box { margin-top: .6rem; }

/* ----------------------------------------------------------- timeline -- */

/* One account's history, newest first unless the operator turns it round.
   A rule down the left carries the
   sequence; the source is a small tag so the eye can follow one kind of
   record through the others. Messages wrap anywhere: they hold URLs, paths
   and build output that have no spaces to break at. */
.tl-toolbar {
  display: flex; gap: 1rem; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap; margin: .6rem 0 .4rem;
}
.tl-filters {
  border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap;
  gap: .35rem 1rem; font-size: .82rem;
}
.tl-filters legend {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: .3rem; padding: 0;
}
.tl-filter { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.tl-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.tl-order { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); }
.tl-order select {
  font: inherit; color: var(--ink); padding: .5rem .6rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.tl-text { width: 100%; min-height: 12rem; margin: .4rem 0; font-size: .78rem; }
.tl-list { list-style: none; margin: .8rem 0 0; padding: 0; }
.tl-item {
  border-left: 2px solid var(--line); padding: .35rem 0 .55rem .9rem;
  position: relative;
}
.tl-item::before {
  content: ""; position: absolute; left: -5px; top: .72rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line);
}
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.tl-kind { font-size: .8rem; font-weight: 600; }
.tl-alias { font-size: .76rem; color: var(--muted); }
.tl-msg {
  font-size: .86rem; margin-top: .15rem; overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.tl-item details { margin-top: .2rem; font-size: .76rem; color: var(--muted); }
.tl-item details summary { cursor: pointer; }
.tl-item details pre {
  margin-top: .3rem; padding: .5rem .6rem; background: var(--raised);
  border: 1px solid var(--line); border-radius: var(--radius);
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink);
}
.tl-src {
  display: inline-block; font-size: .66rem; padding: .05rem .4rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.tl-src-activity { color: var(--info); border-color: var(--info-line); background: var(--info-bg); }
.tl-src-audit { color: var(--peach); border-color: var(--peach-line); background: var(--peach-bg); }
.tl-src-events { color: var(--ink); border-color: var(--ink); }
.tl-src-account { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.tl-activity::before { border-color: var(--info-line); }
.tl-audit::before { border-color: var(--peach-line); }
.tl-events::before { border-color: var(--ink); }
.tl-account::before { border-color: var(--warn-line); }

/* ------------------------------------------------------------ consent -- */

/* The OAuth consent page. The client's name is self-chosen, so the host it
   returns to sits right under it, and the loopback warning is amber. */
.oauth-page h1 { font-size: 1.6rem; line-height: 1.3; }
.oauth-client, .oauth-login { word-break: break-word; }
.oauth-host { font-size: .95em; color: var(--ink); word-break: break-all; }
.oauth-scope ul { margin: 0 0 1.1rem 1.1rem; font-size: .9rem; }
.oauth-scope ul:last-child { margin-bottom: 0; }
.oauth-scope h2 { margin-bottom: .5rem; }
.oauth-note {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; margin: 1.2rem 0; font-size: .9rem;
}
.oauth-note p + p { margin-top: .6rem; }
.oauth-note.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.oauth-note.danger { border-color: var(--danger-line); background: var(--danger-bg); }
.oauth-note.danger strong { color: var(--danger); }
