/* Fonts served by DevHub itself (SIL OFL 1.1, assets/fonts): no request to Google. */
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:400 600;font-display:swap;src:url(fonts/instrument-sans-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:400 600;font-display:swap;src:url(fonts/instrument-sans-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 500;font-display:swap;src:url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 500;font-display:swap;src:url(fonts/jetbrains-mono-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
/* DevHub design system — "Console VPS" direction, light and dark.
   Warm greys as material, terracotta as the only action signal, 1 px borders and no
   shadows, machine values in JetBrains Mono. Tokens first; the theme follows the
   device unless html[data-theme] forces it. */

:root {
  --bg: #fcfcfb;
  --card: #ffffff;
  --card-2: #f6f5f3;
  --hover: #f1efeb;
  --border: #e6e4e0;
  --border-2: #dcd8d2;
  --line: #f0eeea;
  --text: #1a1917;
  --text-body: #4a463f;
  --text-2: #5a564f;
  --text-3: #6b6762;
  --faint: #8c877f;
  --accent: #b4541f;
  --accent-hover: #8c3f14;
  --accent-soft: #f3e7dc;
  --accent-ink: #8c3f14;
  --on-accent: #ffffff;
  --sel: #faf6f2;
  --sel-border: #edd9c9;
  --ok: #2f7d5d;
  --warn: #8a6a12;
  --err: #9c2f22;
  --err-border: #e6d3cf;
  --meter: #56524b;
  --track: #efedeb;
  --drop: #d5d1ca;
  --r: 10px;
  --r-sm: 6px;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Code surfaces (logs, terminal, editor) stay dark in both themes. */
  --term: #141413;
  --term-border: #2c2b28;
  --term-ctl: #3a3934;
  --term-text: #f2f1ed;
  --term-2: #bdb9b2;
  --term-3: #a8a49e;
  --term-dim: #6e6a63;
  --term-ok: #5fb08a;
  --term-warn: #d9a43b;
  --term-err: #e8705f;
  --term-accent: #e08350;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #121211;
  --card: #1a1a18;
  --card-2: #141413;
  --hover: #22221f;
  --border: #2c2b28;
  --border-2: #3a3934;
  --line: #262521;
  --text: #f2f1ed;
  --text-body: #bdb9b2;
  --text-2: #a8a49e;
  --text-3: #a8a49e;
  --faint: #8c877f;
  --accent: #e08350;
  --accent-hover: #f0a076;
  --accent-soft: #33241a;
  --accent-ink: #f0a076;
  --on-accent: #1a1208;
  --sel: #221c17;
  --sel-border: #4a3324;
  --ok: #5fb08a;
  --warn: #d9a43b;
  --err: #e8705f;
  --err-border: #4a2a24;
  --meter: #8c877f;
  --track: #2c2b28;
  --drop: #3a3934;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #121211;
    --card: #1a1a18;
    --card-2: #141413;
    --hover: #22221f;
    --border: #2c2b28;
    --border-2: #3a3934;
    --line: #262521;
    --text: #f2f1ed;
    --text-body: #bdb9b2;
    --text-2: #a8a49e;
    --text-3: #a8a49e;
    --faint: #8c877f;
    --accent: #e08350;
    --accent-hover: #f0a076;
    --accent-soft: #33241a;
    --accent-ink: #f0a076;
    --on-accent: #1a1208;
    --sel: #221c17;
    --sel-border: #4a3324;
    --ok: #5fb08a;
    --warn: #d9a43b;
    --err: #e8705f;
    --err-border: #4a2a24;
    --meter: #8c877f;
    --track: #2c2b28;
    --drop: #3a3934;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
/* Pages are laid out on the full window width, scrollbar or not: when a page scrolls, the bar
   sits over the right edge (padding) instead of narrowing the page, so nothing shifts. */
html { overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.app, body.errpage { width: 100vw; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--accent); font-weight: 500; }
a.link:hover, .prose a:hover { color: var(--accent-hover); }
code, .mono, pre, kbd { font-family: var(--mono); }
code { font-size: .9em; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
b, strong { font-weight: 600; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 20px; height: 20px; }
.muted { color: var(--text-2); }
.dim { color: var(--faint); }
.grad-text { color: inherit; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 8px; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 24px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.split.wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
/* Section label: uppercase, spaced, quiet. */
.label, .nav-label { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 14px 32px; background: var(--card); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; flex: none; }
.brand .ver { font: 11px var(--mono); color: var(--text-2); }
.logo { display: inline-block; border-radius: 5px; background: var(--accent); flex: none; }
.srv-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); font: 12px var(--mono); color: var(--text-body); white-space: nowrap; flex: none; }
.search { position: relative; flex: 1 1 200px; min-width: 0; max-width: 560px; }
.search input { width: 100%; min-height: 42px; padding: 9px 40px 9px 14px; background: var(--bg); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.topbar .acts { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.sidebar { position: sticky; top: 71px; height: calc(100vh - 71px); overflow-y: auto; padding: 24px 16px 16px; display: flex; flex-direction: column; gap: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 18px 14px 6px; font-size: 11px; }
.nav-label:first-child { padding-top: 0; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 14px; border-radius: var(--r-sm); color: var(--text-body); font-size: 14px; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: var(--hover); color: var(--text); font-weight: 500; }
.nav a .end { margin-left: auto; font: 11.5px var(--mono); color: var(--text-2); }
.count { margin-left: auto; min-width: 22px; text-align: center; font: 500 11px/20px var(--mono); padding: 0 7px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); color: var(--text-2); }
.count.solid { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.tag-admin { margin-left: auto; font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
/* Status dot: running green, stopped an empty ring, failure red, in-between amber. */
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot.running { background: var(--ok); }
.dot.exited, .dot.absent, .dot.paused, .dot.unknown { background: transparent; border: 1.5px solid var(--faint); }
.dot.dead { background: var(--err); }
.dot.restarting, .dot.created { background: var(--warn); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; padding-top: 24px; }
.srv { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--border); border-radius: var(--r); padding: 16px; background: var(--card); }
.srv-h { display: flex; align-items: baseline; gap: 8px; }
.srv-h .dim { margin-left: auto; font: 11px var(--mono); }
.meter { display: flex; flex-direction: column; gap: 7px; }
.meter-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 500; }
.meter-h b { font: 400 12px var(--mono); color: var(--text-2); }
.me { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.me .who { line-height: 1.3; font-size: 13px; font-weight: 500; min-width: 0; }
.me .who span { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .row { margin-left: auto; gap: 6px; flex-wrap: nowrap; }
.main { min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
.update-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; box-sizing: border-box; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--card); font: 500 13px var(--sans); color: var(--text); white-space: nowrap; cursor: pointer; }
.update-pill.avail { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); list-style: none; }
.update-pill.avail::-webkit-details-marker { display: none; }
.update-pill.avail:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.update-pill .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.update-pill.failed { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.update-pill.done { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.update-pill .ring circle { fill: none; stroke: var(--border-2); stroke-width: 2; }
.update-pill .ring circle.v { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dasharray .4s; }
.upd-pop { position: relative; }
.upd-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 380px; max-width: calc(100vw - 32px); border-radius: 14px; background: var(--card); border: 1px solid var(--border-2); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); overflow: hidden; }
.upd-menu .h { padding: 16px 18px 10px; display: flex; flex-direction: column; gap: 4px; }
.upd-menu .h > b { font-size: 15px; }
.upd-menu .h > span { font-size: 12.5px; color: var(--text-2); }
.upd-menu .h .mono { font-size: 12px; color: var(--text); }
.upd-menu .h .accent { color: var(--accent); }
.upd-menu ol { margin: 0; padding: 4px 18px 12px; list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.upd-menu li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.upd-menu li .d { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); }
.upd-menu li .d.new { background: var(--accent); }
.upd-menu li .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-menu li .when { font-size: 12px; color: var(--faint); }
.upd-menu li.more { display: block; color: var(--text-2); font-size: 12.5px; padding-left: 18px; }
.upd-menu .f { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.upd-menu .f > span { flex: 1; font-size: 12px; color: var(--text-2); }
@media (max-width: 640px) {
  .update-pill { padding: 0 12px 0 10px; }
  .upd-menu { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; max-width: none; }
}
.content { padding: 32px 32px 64px; width: 100%; max-width: 1400px; margin-inline: auto; box-sizing: border-box; }
.back { display: inline-flex; margin-bottom: 14px; font-size: 13px; font-weight: 500; color: var(--accent); }
.back:hover { color: var(--accent-hover); }
.page-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.page-head .lead { color: var(--text-body); margin-top: 8px; max-width: 680px; font-size: 15px; }
.page-head .meta { font: 13px var(--mono); color: var(--text-2); }
.page-head .acts { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; align-self: center; }
.mobile-head, .bottom-nav { display: none; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-h h3 { font-size: 15px; font-weight: 600; }
.card-h .sub { color: var(--text-2); font-size: 13px; }
.card-h .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 22px 24px; }
.card-f { padding: 14px 24px; border-top: 1px solid var(--line); background: var(--card-2); border-radius: 0 0 var(--r) var(--r); font-size: 13px; }
.card.glow { border-color: var(--border); }
.card.danger { border-color: var(--err-border); }
.dka { border: 1px solid var(--border); border-radius: var(--r); background: var(--card-2); padding: 16px; margin-bottom: 22px; }
.dka.on { border-color: color-mix(in srgb, var(--st-err) 45%, var(--border)); background: color-mix(in srgb, var(--st-err) 6%, var(--card)); }
.dka-top { display: flex; align-items: flex-start; gap: 14px; }
.dka-ic { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--st-err) 14%, transparent); color: var(--st-err); }
.dka-ic svg { width: 18px; height: 18px; }
.dka-t { flex: 1; min-width: 0; }
.dka-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dka-h b { font-size: 14.5px; font-weight: 600; }
.dka-live { font-size: 11.5px; font-weight: 600; color: var(--st-err); display: inline-flex; align-items: center; gap: 6px; }
.dka-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dka-t p { margin: 3px 0 0; font-size: 13px; color: var(--text-2); }
.dka .switch { margin-top: 6px; }
.dka.on .switch[aria-checked="true"] { background: var(--st-err); border-color: var(--st-err); }
.dka-risks { list-style: none; margin: 14px 0 0 50px; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.dka-risks li { display: flex; gap: 8px; align-items: flex-start; }
.dka-risks svg { flex: none; width: 13px; height: 13px; margin-top: 2px; color: var(--st-err); }
.dka-note { margin: 12px 0 0 50px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.dka-note b { color: var(--text); font-weight: 600; }
@media (max-width: 640px) { .dka-risks, .dka-note { margin-left: 0; } }
.pill.docker { background: color-mix(in srgb, var(--st-err) 14%, transparent); border-color: transparent; color: var(--st-err); }
.lift { transition: border-color .15s; }
.lift:hover { border-color: var(--border-2); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row .t { flex: 1; min-width: 0; }
.list-row .when { font: 12px var(--mono); color: var(--text-2); white-space: nowrap; }
a.list-row:hover { background: var(--card-2); }

/* ---------- Buttons ---------- */
/* Filled terracotta, outline, ghost, destructive. Destructive stays an outline: only the label turns red. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--card); color: var(--text); font: 500 14px/1.2 var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--card-2); }
.btn:active { transform: translateY(1px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
html[data-theme="dark"] .btn.primary:hover { background: var(--accent-hover); }
.btn.solid { background: var(--card); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-body); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger, .btn.danger-outline { background: var(--card); border-color: var(--border-2); color: var(--err); }
.btn.danger:hover, .btn.danger-outline:hover { background: var(--card-2); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn.lg { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--card); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--card-2); }
.icon-btn.bare { border-color: transparent; background: transparent; }
.icon-btn.bare:hover { background: var(--hover); }
form.inline { display: inline; margin: 0; }
kbd { font-size: 11px; border: 1px solid var(--border-2); border-radius: 4px; padding: 0 5px; color: var(--text-2); background: var(--card); }
.btn.primary kbd { border-color: color-mix(in srgb, var(--on-accent) 40%, transparent); background: transparent; color: inherit; }
@media (pointer: coarse) {
  .btn, .btn.sm { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
}

/* ---------- Pills, chips, badges, avatars ---------- */
/* Status pill: neutral capsule, a coloured dot and a text label — colour never carries the information alone. */
.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid var(--border); background: var(--card-2); color: var(--text); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; box-sizing: border-box; }
.pill.running::before, .pill.ok::before { background: var(--ok); }
.pill.dead::before, .pill.err::before { background: var(--err); }
.pill.restarting::before, .pill.created::before, .pill.warn::before { background: var(--warn); }
.pill.exited, .pill.paused, .pill.unknown { color: var(--text-2); }
.pill.exited::before, .pill.paused::before, .pill.unknown::before { background: transparent; border: 1.5px solid var(--faint); }
.pill.absent { color: var(--text-2); }
.pill.absent::before { background: none; width: 9px; height: 9px; border: 1.5px solid var(--faint); border-right-color: transparent; animation: spin 1s linear infinite; }
.pill.absent.plain::before { width: 7px; height: 7px; border-right-color: var(--faint); animation: none; }
/* Exposure tags: only "public" carries colour, it is the only one that reaches the Internet. */
.pill.public { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.pill.private { background: var(--hover); border-color: transparent; color: var(--text-body); }
.pill.public::before, .pill.private::before, .pill.docker::before { display: none; }
.pill.private svg, .pill.docker svg { width: 12px; height: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 999px; background: var(--hover); color: var(--text-body); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag.mono { font-family: var(--mono); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--hover); font: 500 11.5px var(--mono); color: var(--text-body); white-space: nowrap; }
.chip.ok { color: var(--ok); }
.chip.bad { color: var(--err); }
.actor { display: inline-block; font: 500 11px var(--mono); padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--hover); color: var(--text-body); }
.actor.claude, .actor.claude-admin { background: var(--accent-soft); color: var(--accent-ink); }
.actor.system { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.actor.fail { color: var(--err); }
.avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--border); color: var(--text-body); font: 500 12px var(--mono); }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.round { border-radius: 50%; }

/* ---------- Gauges ---------- */
/* Dark grey while normal; amber from 80 %, red from 92 %. */
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--meter); transition: width .6s ease; }
.bar.warn > i { background: var(--warn); }
.bar.err > i { background: var(--err); }
.bar.accent > i { background: var(--accent); }
.bar.thick { height: 8px; }
/* History columns: dashed top = the scale shown at the right; tip on hover / tap. */
.spark-w { position: relative; margin-top: 24px; }
.spark { display: flex; gap: 3px; height: 38px; border-top: 1px dashed var(--line); }
.spark i { flex: 1; min-width: 0; display: flex; align-items: flex-end; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.spark i b { display: block; width: 100%; min-height: 3px; border-radius: 2px; background: var(--border-2); transition: background .12s; }
.spark i.hi b { background: var(--meter); }
.spark i.none b { height: 3px !important; opacity: .45; }
.spark i:hover b, .spark i.on b { background: var(--accent); }
.spark-max { position: absolute; right: 0; top: -16px; font: 10.5px var(--mono); color: var(--faint); }
.spark-axis { display: flex; justify-content: space-between; margin-top: 6px; font: 10.5px var(--mono); color: var(--faint); }
.spark-tip { position: absolute; bottom: calc(100% + 6px); left: 0; transform: translateX(-50%); z-index: 5; pointer-events: none;
  padding: 6px 10px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 11.5px; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.spark-tip:not([hidden]) { display: flex; flex-direction: column; }
.spark-tip b { font: 600 13px var(--mono); }
.spark-tip span { opacity: .72; }
.alloc { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--track); gap: 2px; }
.alloc i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- KPI / metrics ---------- */
.kpi { padding: 20px 24px; }
.kpi-h { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.kpi-h .ic { display: inline-grid; place-items: center; color: var(--faint); }
.kpi-h .ic.warn { color: var(--warn); }
.kpi-h .end { margin-left: auto; font: 11px var(--mono); letter-spacing: 0; text-transform: none; color: var(--text-2); }
.kpi-v { font: 500 28px/1.15 var(--mono); letter-spacing: -.02em; }
.kpi-v small { font-size: 14px; font-weight: 400; color: var(--text-2); letter-spacing: 0; }
.kpi .foot { font-size: 13px; color: var(--text-2); margin-top: 10px; }
.kpi .bar { margin-top: 12px; }
.vitals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.vseg { display: flex; flex-direction: column; justify-content: center; padding: 22px 26px; border-left: 1px solid var(--line); min-width: 0; }
.vseg:first-child { border-left: 0; }
.vseg .kpi-h { margin-bottom: 8px; }
.vseg .kpi-v { font-size: 30px; }
.vsub { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.vseg .spark-w { margin-top: 26px; }
.vseg .spark { height: 30px; }
.vseg .spark-axis { display: none; }
.vseg .bar { margin-top: 16px; }
.vports { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.vports .chip { height: 20px; padding: 0 7px; font: 11px var(--mono); }
.upbar { display: flex; gap: 2px; height: 16px; margin-top: 16px; }
.upbar i { flex: 1; min-width: 0; border-radius: 2px; background: var(--ok); opacity: .8; }
.upbar i.off { background: var(--track); opacity: 1; }
.upbar i.pre { background: transparent; border: 1px dashed var(--line); opacity: 1; }
@media (max-width: 900px) {
  .vitals { grid-template-columns: minmax(0, 1fr); }
  .vseg { border-left: 0; border-top: 1px solid var(--line); padding: 18px 20px; }
  .vseg:first-child { border-top: 0; }
}
.metrics { display: flex; flex-wrap: wrap; gap: 28px; }
.metric { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.metric .v { font: 14px var(--mono); white-space: nowrap; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); padding: 11px 20px; border-bottom: 1px solid var(--border); background: var(--card-2); white-space: nowrap; }
.tbl td { padding: 12px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.hl td { background: var(--sel); }
.tbl tr.bad td.act { color: var(--err); }
.tbl tr.day td { background: var(--card-2); font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); padding: 9px 20px; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl .mono, .tbl td.mono { font-size: 13px; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--card-2) 70%, transparent); }
.tbl tr.day:hover td { background: var(--card-2); }
.cell-p { display: flex; align-items: center; gap: 12px; }
.cell-p b { display: block; font-weight: 600; }
.cell-p .mono { font-size: 12px; color: var(--text-2); }
.mem { min-width: 150px; }
.mem .mono { font-size: 12px; color: var(--text-2); margin-bottom: 6px; display: block; }

/* ---------- Segmented, filters, tabs ---------- */
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--card); gap: 2px; }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 4px; font: 500 13px var(--sans); color: var(--text-2); border: 0; background: transparent; cursor: pointer; }
.seg a.on, .seg button.on { background: var(--hover); color: var(--text); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.fchip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--card); font-size: 13px; font-weight: 500; color: var(--text); }
.fchip:hover { background: var(--card-2); }
.fchip .n { color: var(--text-2); font: 400 12px var(--mono); }
.fchip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.fchip.on .n { color: inherit; opacity: .8; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 12px 14px; color: var(--text-body); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); font-weight: 500; border-bottom-color: var(--accent); }
.tabs a svg { display: none; }
.tabs .count { margin-left: 0; }
select.sel, .sel { min-height: 40px; padding: 0 30px 0 12px; }

/* ---------- Forms ---------- */
input, select, textarea { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border-2); border-radius: var(--r-sm); min-height: 42px; padding: 10px 14px; width: 100%; transition: border-color .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--border-2); }
input[readonly] { background: var(--card-2); color: var(--text-2); }
input:disabled { opacity: .55; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
textarea { font-family: var(--mono); font-size: 13px; line-height: 1.7; min-height: 140px; resize: vertical; }
.field { display: block; }
.field > .lbl { display: block; font-weight: 500; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.field > .lbl .dim { font-weight: 400; }
.help { font-size: 12.5px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }
.err-text { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--err); margin-top: 6px; }
.ig { display: flex; align-items: stretch; border-radius: var(--r-sm); }
.ig > input { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1; min-width: 0; }
/* One focus ring around the whole group, not around the field alone. */
.ig > input:focus { outline: none; }
.ig:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.port-ok { color: var(--ok); }
.compose-plan { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.compose-plan li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card-2); }
.compose-plan .dim { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-warn { margin: 6px 0 0; padding-left: 18px; }
.compose-form textarea { width: 100%; font-size: 12.5px; }
.links-pick { display: grid; gap: 8px; margin: 4px 0 6px; }
.net .nlinks .lk-list { display: grid; gap: 6px; margin-top: 12px; }
.net .lk-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line); font-size: 13.5px; }
.net .lk-row .ic { display: inline-flex; color: var(--accent-ink); }
.net .lk-row .muted { margin-left: auto; font-size: 12.5px; }
.net .lk-add { margin-top: 14px; flex-wrap: wrap; gap: 10px; }
.net .lk-add .sel { width: auto; min-width: 200px; }
.net .dbfields { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.links-pick .row { font-size: 13.5px; }
.port-bad { color: var(--err); }
.ig > .suf, .ig > .pre { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-2); background: var(--card-2); color: var(--text-2); font: 12.5px var(--mono); white-space: nowrap; }
.ig > .suf { border-left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.ig > .pre { border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.ig > .pre + input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.ig.bad > input, .ig.bad > .suf, .ig.bad > .pre { border-color: var(--err); }
.mono-input { font-family: var(--mono); font-size: 13px; }
.step-h { display: flex; align-items: center; gap: 12px; }
.step-n { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-2); color: var(--accent); font: 500 12px var(--mono); }

/* Radio tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; display: block; cursor: pointer; border: 1px solid var(--border); border-radius: var(--r); padding: 16px; background: var(--card); transition: border-color .15s, background .15s; }
.tile:hover { border-color: var(--border-2); background: var(--card-2); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile .ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--border); color: var(--text-body); margin-bottom: 14px; }
.tile b { display: block; font-size: 14px; font-weight: 600; }
.tile .mono { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 4px; }
.tile .radio { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-2); }
.tile:has(input:checked) { border-color: var(--accent); background: var(--card); }
.tile:has(input:checked) .radio { border: 5px solid var(--accent); }
.tile:has(input:checked) .ic { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Access choice + switch */
.access { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.access button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--card); }
.access button:hover { border-color: var(--border-2); background: var(--card-2); }
.access button.on { border-color: var(--accent); background: var(--card); }
.access button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.access .ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--border); color: var(--text-body); }
.access button.on .ic { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.access b { display: block; font-size: 14px; font-weight: 600; }
.access span.d { display: block; font-size: 13px; color: var(--text-body); margin-top: 2px; }
.access .sw { margin-left: auto; }
.sw { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--track); border: 1px solid var(--border-2); flex: none; transition: background .2s, border-color .2s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw.on { background: var(--accent); border-color: var(--accent); }
.sw.on::after { transform: translateX(16px); }

/* ---------- Alerts / banners ---------- */
/* No tinted floods: a surface, a tinted 1 px border and a coloured icon. */
.alert { display: flex; gap: 11px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r); border: 1px solid var(--border); background: var(--card); font-size: 14px; color: var(--text); }
.alert svg { margin-top: 2px; }
.alert.info svg { color: var(--accent); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.alert.warn svg { color: var(--warn); }
.alert.err { border-color: var(--err-border); }
.alert.err svg { color: var(--err); }
.alert.ok svg { color: var(--ok); }
.flash { margin-bottom: 24px; }

/* Copy block */
.copy { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--card-2); border-radius: var(--r-sm); padding: 4px 4px 4px 14px; }
.copy code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12.5px; scrollbar-width: thin; }
.addr { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 6px 6px 14px; background: var(--card-2); }
.addr a { flex: 1; min-width: 0; font: 13px var(--mono); color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr a:hover { color: var(--accent-hover); }
.addr + .addr { margin-top: 10px; }

/* ---------- Project cards ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 20px; align-items: stretch; }
.pcard { display: flex; flex-direction: column; overflow: hidden; }
/* The whole top opens the project. */
.pcard .ptop { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 14px; color: inherit; text-decoration: none; transition: background .12s; }
.pcard .ptop:hover { background: var(--hover); }
.pcard .ptop:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r) var(--r) 0 0; }
.pcard .hd { display: flex; align-items: center; gap: 12px; }
.pcard .hd .avatar { width: 32px; height: 32px; }
.pcard .hd .avatar svg { width: 16px; height: 16px; }
.pcard .hd .t { flex: 1; min-width: 0; }
.pcard .nm { display: block; font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .paddr { display: block; margin-top: 1px; font: 12px var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .paddr.web { color: var(--accent); }
.pill.bare { height: auto; padding: 0; border: 0; background: none; color: var(--text-body); font-size: 12.5px; flex: none; }
.pcard .gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pcard .g .row { justify-content: space-between; margin-bottom: 5px; font-size: 12px; color: var(--text-2); flex-wrap: nowrap; }
.pcard .g b { font: 500 12.5px var(--mono); color: var(--text); white-space: nowrap; }
.pcard .g .bar { height: 5px; }
.pcard .stopnote { margin: 0; height: 27px; line-height: 25px; padding: 0 10px; text-overflow: ellipsis; border-radius: 7px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-body); white-space: nowrap; overflow: hidden; }
.pcard .stopnote .err { font-family: var(--mono); color: var(--err); }
/* One line of badges: what doesn't fit is cut, the uptime stays at the right. */
.pcard .chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.pcard .chips .chip { height: 22px; padding: 0 8px; font: 12px var(--sans); flex: none; }
.pcard .chips .chip.mono { font: 11.5px var(--mono); }
.pcard .chips .chip.pub { background: var(--accent-soft); color: var(--accent-ink); }
.pcard .chips .chip.warn { color: var(--warn); }
.pcard .chips .chip svg, .pcard .up svg { width: 11px; height: 11px; }
.pcard .up { margin-left: auto; padding-left: 8px; display: inline-flex; align-items: center; gap: 5px; font: 11.5px var(--mono); color: var(--faint); flex: none; }
.pcard .pbuild { padding: 0 18px 14px; }
.pcard .pbuild .note { font-size: 13px; }
.pcard .ft { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 18px 12px; border-top: 1px solid var(--line); }
.pcard .ft .end { margin-left: auto; }
.pcard .ft .icon-btn { width: 34px; height: 34px; background: transparent; border-color: var(--border); }
.pcard .ft .btn.sm { min-height: 32px; }
/* The server's other containers, below the projects (administrators). */
.osec-h { margin: 40px 0 16px; }
.osec-h h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; }
.osec-h p { margin: 0; font-size: 13px; max-width: 720px; }
.avatar.oc { background: var(--hover); color: var(--text-2); }
.avatar.oc svg { width: 16px; height: 16px; }
.ocard .nm { font: 600 14.5px var(--mono); }
.masked-note { display: flex; align-items: center; gap: 8px; margin: 28px 0 0; font-size: 13.5px; }
.osec-h > .row { align-items: center; }
/* « Rattacher à un projet » on the page of a container created outside DevHub */
.takeover .tile .d { display: block; font-size: 12.5px; color: var(--text-body); margin-top: 6px; line-height: 1.45; padding-right: 22px; }
.takeover:has(input[name=mode][value=follow]:checked) .if-take, .takeover:has(input[name=mode][value=take]:checked) .if-follow { display: none; }
.recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.45; }
.recap li { display: flex; gap: 8px; align-items: flex-start; }
.recap li > svg { flex: none; margin-top: 2px; color: var(--ok); }
.recap li.no > svg { color: var(--warn); }
.recap li.err > svg { color: var(--err); }
.tbl.cmp td.ok { color: var(--ok); }
@media (max-width: 760px) { .attach.grid2, .takeover .access { grid-template-columns: minmax(0, 1fr); } }
.newcard { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px; margin-top: 24px; border: 1.5px dashed var(--drop); border-radius: var(--r); color: var(--text-2); }
.newcard:hover { border-color: var(--accent); color: var(--text); }
.newcard b { color: var(--text); font-weight: 500; }
.newcard .accent { color: var(--accent); }

/* Project header: a white band with the back link, name, status and tabs. */
.pband { margin: -32px -32px 32px; padding: 20px 32px 0; background: var(--card); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px;
  /* The content column is capped in width; the band still runs edge to edge. */
  border-image: linear-gradient(to top, var(--border) 1px, var(--card) 1px) fill 0 / 0 / 0 100vmax; }
.pband .back { margin: 0; align-self: flex-start; }
.phead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.phead h1 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.phead .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font: 12px var(--mono); color: var(--text-2); }
.phead .meta a.link { font: 12px var(--mono); }
.phead .acts { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.pin { color: var(--faint); }
.pin.on { color: var(--accent); }
.pin.on svg { fill: currentColor; }

/* ---------- Terminal & logs (dark in both themes) ---------- */
.term { background: var(--term); border: 1px solid var(--term-border); border-radius: var(--r); overflow: hidden; color: var(--term-text); }
.term-h { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--term-border); font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--term-3); }
.term-h .lights { display: none; }
.term-h .end { margin-left: auto; display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; }
.term-h .pill { background: transparent; border-color: var(--term-border); color: var(--term-3); }
.term-h .btn, .term-f .btn { background: transparent; border-color: var(--term-ctl); color: var(--term-text); }
.term-h .btn:hover, .term-f .btn:hover { background: #1f1f1d; }
.term-h .seg { background: transparent; border-color: var(--term-ctl); }
.term-h .seg a, .term-h .seg button { color: var(--term-3); }
.term-h .seg .on { background: #262521; color: var(--term-text); }
.term-f { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--term-border); font: 11px var(--mono); color: var(--term-3); }
.term-body { padding: 12px 14px; height: 58vh; }
.keys { display: none; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--term-border); overflow-x: auto; }
.keys button { flex: none; min-height: 40px; min-width: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--term-ctl); background: transparent; color: var(--term-text); font: 500 12.5px var(--mono); cursor: pointer; }
.keys button.on { background: var(--term-accent); border-color: var(--term-accent); color: #1a1208; }
@media (pointer: coarse) { .keys { display: flex; } }
.logs { margin: 0; background: var(--term); color: var(--term-2); font: 12px/1.7 var(--mono); padding: 14px 18px; overflow: auto; max-height: 460px; white-space: pre; border-radius: 0 0 var(--r) var(--r); }
.card > .logs:last-child { border-radius: 0 0 calc(var(--r) - 1px) calc(var(--r) - 1px); }
.logs.short { max-height: 250px; }
.logs .ts { color: var(--term-dim); }
.logs .m { color: var(--term-text); }
.logs .s2 { color: var(--term-ok); }
.logs .s4 { color: var(--term-warn); }
.logs .s5, .logs .e { color: var(--term-err); }
.logs .u { color: var(--term-3); }
.logs .l.err { color: var(--term-err); }
.logs .l.hd { color: var(--term-accent); }
.logs.only-err .l:not(.err) { display: none; }
.logs .l { display: block; }
.live-tag { display: inline-flex; align-items: center; gap: 7px; font: 12px var(--mono); color: var(--text-2); }
.live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.live-tag.off::before { background: transparent; border: 1.5px solid var(--faint); }
.live-tag.bad::before { background: var(--err); }

/* ---------- Files ---------- */
.files { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: start; }
.files.single { grid-template-columns: minmax(0, 1fr); }
.crumb-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 12px var(--mono); color: var(--faint); }
.crumb-path a { color: var(--accent); }
.crumb-path a:hover { color: var(--accent-hover); }
.crumb-path b { color: var(--text); font-weight: 400; }
.frow { display: grid; grid-template-columns: 20px minmax(0, 1fr) 80px 130px 104px; gap: 16px; align-items: center; padding: 0 20px; min-height: 48px; border-top: 1px solid var(--line); }
.frow:first-child { border-top: 0; }
.frow .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 13px var(--mono); }
.frow .n a:hover { color: var(--accent); }
.frow .sz, .frow .dt { font: 12px var(--mono); color: var(--text-2); white-space: nowrap; text-align: right; }
.frow .ac { display: flex; gap: 2px; justify-content: flex-end; opacity: .6; transition: opacity .15s; }
.frow:hover .ac, .frow.on .ac { opacity: 1; }
.frow.on { background: var(--sel); }
.frow .ac .icon-btn { width: 30px; height: 30px; }
.frow svg { color: var(--faint); }
.modified { display: inline-flex; font: 500 11px var(--sans); padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); margin-left: 8px; }
.modified:empty { width: 7px; height: 7px; padding: 0; background: var(--accent); }
.drop { display: block; margin: 20px 20px 0; padding: 28px 24px; border: 1.5px dashed var(--drop); border-radius: var(--r); background: var(--card); text-align: center; color: var(--text-2); font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--sel); }
.drop b { color: var(--text); font-weight: 500; }
.drop .help { margin-top: 6px; font-family: var(--mono); font-size: 11px; }
.drop input { display: none; }
.editor { display: grid; grid-template-columns: auto minmax(0, 1fr); background: var(--term); }
.editor .gut { padding: 16px 10px 16px 18px; text-align: right; color: var(--term-dim); font: 12px/1.75 var(--mono); user-select: none; white-space: pre; overflow: hidden; }
.editor textarea { border: 0; border-radius: 0; background: transparent !important; color: var(--term-text); padding: 16px 18px 16px 8px; min-height: 60vh; resize: vertical; white-space: pre; overflow: auto; tab-size: 4; font-size: 12px; line-height: 1.75; }
.editor textarea:focus { outline: none; }

/* ---------- Claude ---------- */
.power { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.power i { display: block; height: 6px; border-radius: 999px; background: var(--track); }
.power i.on { background: var(--accent); }
.power span { font-size: 12.5px; color: var(--text-2); margin-top: 8px; display: block; }
.power span.on { color: var(--text); font-weight: 600; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; color: var(--text-body); }
.checks li svg { color: var(--ok); }
.checks.lock li svg { color: var(--faint); }
.hero-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.hero-ic svg { width: 20px; height: 20px; }

/* ---------- Update ---------- */
.versions { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.versions .k { margin-bottom: 4px; }
.versions .v { font: 500 22px var(--mono); margin: 2px 0 4px; }
.versions .v.new { color: var(--accent); }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty svg.ill { width: 110px; height: 82px; margin-bottom: 18px; color: var(--faint); }
.empty h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.empty p { color: var(--text-body); max-width: 380px; margin: 0 auto 20px; }

/* ---------- Skeleton & transitions ---------- */
.sk-line { height: 12px; margin: 12px 0; border-radius: 4px; background: var(--track); animation: pulse 1.2s ease-in-out infinite; }
.sk-line.h { height: 22px; width: 40%; }
@view-transition { navigation: auto; }
.content { view-transition-name: content; }
::view-transition-old(content) { animation: vt-out .12s ease both; }
::view-transition-new(content) { animation: vt-in .2s ease both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
/* The bars stay put: captured on their own, above the content (which would otherwise be
   drawn over them during the fade, hiding the bottom menu), and shown in their new state
   at once. Hidden bars (display: none) are not captured, so the names never clash. */
.topbar { view-transition-name: topbar; }
.sidebar.rail { view-transition-name: rail; }
.mobile-head { view-transition-name: mobile-head; }
.bottom-nav { view-transition-name: bottom-nav; }
::view-transition-group(topbar), ::view-transition-group(rail), ::view-transition-group(mobile-head), ::view-transition-group(bottom-nav),
::view-transition-new(topbar), ::view-transition-new(rail), ::view-transition-new(mobile-head), ::view-transition-new(bottom-nav) { animation: none; }
::view-transition-old(topbar), ::view-transition-old(rail), ::view-transition-old(mobile-head), ::view-transition-old(bottom-nav) { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(content), ::view-transition-new(content) { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.wide, .files { grid-template-columns: minmax(0, 1fr); }
  .srv-chip { display: none; }
}
@media (max-width: 900px) {
  .app { display: block; }
  .sidebar, .topbar { display: none; }
  .mobile-head { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; }
  .mobile-head .end { margin-left: auto; display: flex; gap: 8px; }
  .content { padding: 20px 16px 96px; }
  .pband { margin: -20px -16px 24px; padding: 16px 16px 0; }
  .grid2, .grid3, .access { grid-template-columns: minmax(0, 1fr); }
  .grid4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .page-head h1 { font-size: 24px; }
  .phead h1 { font-size: 22px; }
  .page-head .acts { margin-left: 0; }
  .phead .acts { margin-left: 0; width: 100%; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; }
  .tbl.cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .tbl.cards td { border: 0; padding: 4px 0; }
  .tbl.cards td.hide-m { display: none; }
  .frow { grid-template-columns: 20px minmax(0, 1fr) 84px; padding: 0 14px; }
  .frow .sz, .frow .dt { display: none; }
  .card-h, .card-b, .list-row { padding-left: 16px; padding-right: 16px; }
  .pcard .ptop { padding: 14px 16px 12px; }
  .pcard .ft { padding: 10px 16px 12px; }
  .tbl th, .tbl td { padding-left: 14px; padding-right: 14px; }
  .term-body { height: 52vh; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--border); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; font-size: 11px; color: var(--text-2); }
  .bottom-nav a svg { width: 20px; height: 20px; }
  .bottom-nav a.on { color: var(--accent); font-weight: 500; }
  .hide-m { display: none !important; }
}
@media (min-width: 901px) { .only-m { display: none !important; } }
@media (max-width: 900px) { .settings-grid { grid-template-columns: minmax(0, 1fr) !important; } }

/* Fine-tuning */
.tbl td.num, .tbl td.act, .tbl td.nowrap { white-space: nowrap; }
.cell-p > span { min-width: 0; }
.cell-p .mono { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { color: var(--accent); cursor: pointer; }
.help.row { display: block; }
.help.row > svg { margin-right: 6px; }
.card-h .sub { min-width: 0; }
@media (max-width: 900px) {
  .tbl.cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .tbl.cards td:first-child { flex-basis: 100%; }
  .tbl.cards td:last-child { margin-left: auto; }
  .tbl.cards tr.day { display: block; }
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps li b { display: block; font-size: 14px; font-weight: 600; }
.steps li .muted { font-size: 13px; }
.list-row .t code { max-width: 100%; }
.phead-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: -8px; font: 12px var(--mono); color: var(--text-2); }
.phead-meta a.link { font: 12px var(--mono); }
.tbl td .row.end { flex-wrap: nowrap; }
.term .live-tag { color: var(--term-3); font-size: 11px; }
.term .live-tag::before { background: var(--term-ok); }
.term .live-tag.off::before { border-color: var(--term-dim); }
.term > .logs { border-radius: 0; max-height: 520px; }
.term > .logs.short { max-height: 260px; min-height: 120px; }
.term > .logs:last-child { border-radius: 0 0 calc(var(--r) - 1px) calc(var(--r) - 1px); }
.kpi-v.txt { font: 600 22px/1.2 var(--sans); letter-spacing: -.01em; }
@media (max-width: 900px) { .tabs { flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px; } }
/* Build without container: failed (red dot) or interrupted (empty ring). */
.pill.failed::before, .dot.failed { background: var(--err); }
.pill.missing { color: var(--text-2); }
.pill.missing::before { background: transparent; border: 1.5px solid var(--faint); }
.dot.missing { background: transparent; border: 1.5px solid var(--faint); }
.note.build-err { color: var(--text-body); overflow-wrap: anywhere; }
.note.build-err b { color: var(--err); font-weight: 600; }
.build-line { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px var(--mono); color: var(--text-2); }
.build-line.err { color: var(--err); }
/* Projects table: keep the action buttons on one line without overflowing the card. */
.tbl th, .tbl td { padding-left: 16px; padding-right: 16px; }
.tbl .cell-p .mono { max-width: 190px; }
.tbl .mem { min-width: 120px; max-width: 190px; }
.tbl .build-line { max-width: 190px; }
@media (max-width: 1360px) { .tbl td .row.end { flex-wrap: wrap; } }
/* Medium screens: drop the CPU and access columns of the projects table rather than overflow. */
@media (min-width: 901px) and (max-width: 1180px) {
  .ptbl th:nth-child(3), .ptbl td:nth-child(3), .ptbl th:nth-child(5), .ptbl td:nth-child(5) { display: none; }
}
@media (min-width: 901px) and (max-width: 1060px) {
  .app { grid-template-columns: 208px minmax(0, 1fr); }
  .ptbl th:nth-child(4), .ptbl td:nth-child(4) { display: none; }
}
/* Profile row → "Paramètres" category (opens upward, above the row). */
.me-menu { display: flex; flex-direction: column-reverse; border: 1px solid transparent; border-radius: var(--r); }
.me-menu[open] { border-color: var(--border); background: var(--card); }
.me-menu > summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: var(--r); }
.me-menu > summary::-webkit-details-marker { display: none; }
.me-menu > summary:hover { background: var(--hover); }
.me-menu[open] > summary { border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.me-menu .chev { margin-left: auto; color: var(--faint); transform: rotate(90deg); transition: transform .15s; display: inline-flex; }
.me-menu[open] .chev { transform: rotate(-90deg); }
.me-menu .settings { padding: 12px 8px 8px; }
.me-menu .settings .nav-label { padding: 0 6px 6px; }
.me-menu .settings a { min-height: 36px; padding: 7px 10px; }
.me-acts { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 2px 0; margin-top: 6px; border-top: 1px solid var(--line); }
.me-acts .btn { padding: 6px 8px; }
@media (max-width: 900px) { .bottom-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; } }
.ro form[method="post"], .ro form[method="POST"], .ro .drop { display: none !important; }
/* Profile form */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.roles .tile { padding: 14px 40px 14px 14px; }
.roles .tile .d { display: block; font-size: 12.5px; color: var(--text-body); margin-top: 4px; line-height: 1.4; }
.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 16px; margin-top: 12px; }
.checks-grid .mono { font-size: 13px; }
/* An administrator sees every project: the list doesn't apply. */
form:has(input[name=role][value=admin]:checked) .scope { opacity: .45; pointer-events: none; }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr; } }
.sw-btn { all: unset; cursor: pointer; display: inline-flex; border-radius: 999px; } .sw-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Environment variables: one row per variable, an always-visible add row. */
.envrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 16px; align-items: center; padding: 10px 16px 10px 24px; border-bottom: 1px solid var(--line); }
.envrow .k { font: 500 13px var(--mono); overflow-wrap: anywhere; }
.envrow .v { font: 13px var(--mono); color: var(--text-body); overflow-wrap: anywhere; min-width: 0; }
.envrow .v summary { cursor: pointer; list-style: none; }
.envrow .v summary::-webkit-details-marker { display: none; }
.envrow .acts { display: flex; gap: 2px; }
.envadd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: end; padding: 18px 24px; }
.envadd .btn { min-height: 42px; }
@media (max-width: 900px) {
  .envrow { grid-template-columns: minmax(0, 1fr) auto; padding-left: 16px; }
  .envrow .v { grid-column: 1 / -1; grid-row: 2; }
  .envadd { grid-template-columns: minmax(0, 1fr); padding: 16px; }
}
/* Private / public: a radio mark, the selected card keeps its accent border. */
.access .radio { margin-left: auto; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-2); box-sizing: border-box; }
.access button.on .radio { border: 5px solid var(--accent); }
/* Both cards fill their grid cell: same width and height. */
.access > form { display: flex; margin: 0; }
.access > form > button { flex: 1; width: 100%; }
/* Claude page: numbered steps in one column. */
.csteps { max-width: 860px; display: flex; flex-direction: column; gap: 32px; }
.cstep { display: flex; gap: 20px; }
.cstep .step-n { margin-top: 2px; }
.cstep-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cstep-b h2.label { margin: 4px 0 0; }
.cswitch { display: flex; align-items: center; gap: 20px; }
.cswitch .t { flex: 1; min-width: 0; }
.sw.lg { width: 52px; height: 30px; }
.sw.lg::after { width: 24px; height: 24px; }
.sw.lg.on::after { transform: translateX(22px); }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary { list-style: none; }
details.card[open] > summary { border-bottom: 1px solid var(--border); }
@media (max-width: 900px) { .cstep { gap: 12px; } }
/* Logo: the traffic cone takes the accent colour, no tile behind it. */
.logo { background: none; color: var(--accent); border-radius: 0; flex: none; display: inline-block; }
/* App console: output above, one input line below, inside the same dark panel. */
.console-in { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 18px; border-top: 1px solid var(--term-border); background: var(--term); }
.console-in .prompt { font: 500 13px var(--mono); color: var(--term-accent); }
.console-in input { flex: 1; min-width: 0; min-height: 36px; padding: 6px 4px; background: transparent; border: 0; color: var(--term-text); font: 13px var(--mono); }
.console-in input:focus { outline: none; }
.console-in input::placeholder { color: var(--term-dim); }
.console-in .btn { background: transparent; border-color: var(--term-ctl); color: var(--term-text); }
.console-in .btn:hover { background: #1f1f1d; }
.console-in.busy .btn { opacity: .5; }
.console-in:focus-within { box-shadow: inset 0 0 0 1px var(--term-accent); }
.console-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; background: var(--term); }
.console-chips button { font: 12px var(--mono); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--term-ctl); background: transparent; color: var(--term-3); cursor: pointer; }
.console-chips button:hover { color: var(--term-text); }
.logs .l.cmd { color: var(--term-accent); }
.logs .l.reply { color: var(--term-text); }
.term.console > .logs:not(:last-child) { border-radius: 0; }
details.shell[open] > summary { border-bottom: 1px solid var(--border); }
details.shell > .term { border-radius: 0 0 var(--r) var(--r); }
/* Profile pictures */
img.avatar { object-fit: cover; padding: 0; background: var(--card-2); }
.avatar.xl { width: 72px; height: 72px; font-size: 22px; }
.avatar-card { display: flex; align-items: center; gap: 20px; }
.avatar-card .t { flex: 1; min-width: 0; }
.avatar-card label.btn { cursor: pointer; }
.avatar-card label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Réseau: address first, then ports, then subdomains ---------- */
.net .nhero { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.net .nhero-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.net .nhero-h h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.net .nhero-h .end { margin-left: auto; }
.net .nstate { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-body); white-space: nowrap; }
.net .nstate.dim { color: var(--text-2); }
.net .seg form { display: contents; }
.net .seg button svg { width: 13px; height: 13px; }
.net .nbig { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--line); }
.net .nurl { flex: 1; min-width: 0; font: 500 16px var(--mono); color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.net .nurl:hover { color: var(--accent-hover); }
.net .nbig .btn svg { width: 13px; height: 13px; }
.net .nalso { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.net .nalso .chip { text-decoration: none; color: var(--accent-ink); }
.net .nalso .end { margin-left: auto; }
.net .nfields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.net .nfield { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--line); min-width: 0; }
.net .nfield > div { flex: 1; min-width: 0; }
.net .nfield .k { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.net .nfield .v { display: block; margin-top: 2px; font: 500 17px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net .nhero .help { margin: 0; }
.net .chip.pub { background: var(--accent-soft); color: var(--accent-ink); font-family: var(--sans); }
.net .chip.warn { color: var(--warn); }
.net .chip .dot { width: 6px; height: 6px; }
.net .nrow { display: grid; grid-template-columns: 90px 150px minmax(0, 1fr) 130px 36px; gap: 16px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.net .nrow.nhead { border-top: 0; padding-top: 12px; padding-bottom: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.net .nrow b.mono { font-size: 14px; font-weight: 500; }
.net .nrow .addr-c { font-size: 12.5px; color: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net .nadd { border-top: 1px solid var(--line); }
.net .nadd summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; font-size: 13px; font-weight: 500; color: var(--accent); }
.net .nadd summary::-webkit-details-marker { display: none; }
.net .nadd summary svg { width: 13px; height: 13px; }
.net .nadd[open] summary { padding-bottom: 6px; }
.net .nadd form { padding: 4px 18px 14px; gap: 12px; }
.net .nadd .end { margin-left: auto; }
.seg.radio label { position: relative; }
.seg.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg.radio span { display: inline-flex; padding: 6px 12px; border-radius: 4px; font: 500 13px var(--sans); color: var(--text-2); }
.seg.radio input:checked + span { background: var(--hover); color: var(--text); }
.seg.radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.net .dchip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--hover); font-size: 12.5px; }
.net .dchip a { color: var(--accent-ink); text-decoration: none; }
.net .dchip.bad { box-shadow: inset 0 0 0 1px var(--err); }
.net .dchip.bad a { color: var(--err); }
.net .dchip button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; }
.net .dchip button:hover { background: var(--card); color: var(--text); }
.net .dchip button svg { width: 12px; height: 12px; }
.net .dadd { display: inline-flex; align-items: center; gap: 6px; }
.net .dinput { display: inline-flex; align-items: center; height: 32px; border: 1px dashed var(--border-2); border-radius: 999px; background: var(--card); }
.net .dinput.bad { border-color: var(--err); }
.net .dinput input { width: 110px; height: 30px; padding: 0 4px 0 12px; border: 0; background: transparent; color: var(--text); font: 12.5px var(--mono); outline: none; }
.net .dinput:focus-within { border-style: solid; border-color: var(--accent); }
.net .dinput span { padding-right: 12px; font: 12.5px var(--mono); color: var(--text-2); }
.net .dadd .sel { height: 32px; padding: 0 8px; width: auto; }
@media (max-width: 720px) {
  .net .nfields { grid-template-columns: minmax(0, 1fr); }
  .net .nrow { grid-template-columns: 64px minmax(0, 1fr) 36px; }
  .net .nrow > :nth-child(3) { grid-column: 2; grid-row: 2; }
  .net .nrow.nhead > :nth-child(3) { display: none; }
  .net .nalso .end { margin-left: 0; }
  .net .nadd .end { display: none; }
}

/* ---------- Bulk selection on the projects page ---------- */
.psel { display: none; }
.selecting .psel { display: grid; place-items: center; cursor: pointer; }
.psel input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.psel span { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2); background: var(--card); display: grid; place-items: center; }
.psel input:checked + span { background: var(--accent); border-color: var(--accent); }
.psel input:checked + span::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.psel input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard { position: relative; }
.pcard .psel { position: absolute; top: 12px; right: 12px; z-index: 2; width: 32px; height: 32px; }
.selecting .pcard .hd .pill.bare { margin-right: 30px; }
.selecting .pcard:has(.psel input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.selecting .pcard .ptop { cursor: pointer; }
.psel-c { width: 44px; padding-right: 0 !important; }
.selectable:not(.selecting) .psel-c { display: none; }
.selecting tr:has(.psel input:checked) td { background: var(--sel); }
.bulkbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 32px);
  padding: 8px 10px 8px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.bulkbar[hidden] { display: none; }
.bulkbar .n { font-size: 13px; white-space: nowrap; }
.bulkbar .sep { width: 1px; height: 22px; background: var(--border); }
.bulkbar .btn svg { width: 13px; height: 13px; }
.bulkbar .keep { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.bulkbar .end { margin-left: 4px; }
@media (max-width: 900px) {
  .bulkbar { bottom: calc(72px + env(safe-area-inset-bottom)); left: 16px; right: 16px; transform: none; max-width: none; }
  .bulkbar .sep { display: none; }
}

.chip .spin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: spin 1s linear infinite; display: inline-block; }

/* Result of an action sent in the background. */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: min(560px, calc(100vw - 32px)); padding: 11px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.toast[hidden] { display: none; }
.toast.err { background: var(--err); color: #fff; }
@media (max-width: 900px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }
/* DevHub restarting (app.js): over the whole page, shown before it stops; same look as the
   page Caddy shows while the panel doesn't answer (caddy/restarting.html). */
.restart-wait { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--bg);
  animation: vt-in .2s ease; }
.rw-card { width: 100%; max-width: 420px; padding: 32px 28px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); text-align: center; }
.rw-spin { width: 36px; height: 36px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 1s linear infinite; }
.rw-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 600; color: var(--text); }
.rw-card p { margin: 0; color: var(--text-2); }
.rw-card .rw-bar { margin-top: 18px; }
.rw-card .rw-bar[hidden] { display: none; }
.rw-card .rw-bar > i { background: var(--accent); }
.rw-card small { display: block; margin-top: 18px; color: var(--text-3); font-size: 12.5px; }
.btn.busy, .icon-btn.busy { position: relative; color: transparent !important; }
.btn.busy::after, .icon-btn.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text-2); border-right-color: transparent; animation: spin .8s linear infinite; }
.btn.primary.busy::after { border-color: var(--on-accent); border-right-color: transparent; }

/* Project colour (random hue per project): tinted avatar. */
.avatar.pc { background: color-mix(in srgb, var(--pc) 20%, var(--card)); border-color: color-mix(in srgb, var(--pc) 35%, transparent); color: color-mix(in srgb, var(--pc) 75%, var(--text)); }
.avatar.pc svg { width: 16px; height: 16px; }

/* ---------- Confirmation dialog (replaces the browser's confirm / prompt) ---------- */
.cdlg { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border-2); border-radius: 14px; background: var(--card); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.cdlg::backdrop { background: rgba(10, 10, 9, .6); backdrop-filter: blur(2px); }
.cdlg form { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.cdlg-h { display: flex; gap: 14px; align-items: flex-start; }
.cdlg-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--hover); color: var(--text-body); }
.cdlg-ic svg { width: 18px; height: 18px; }
.cdlg.warn .cdlg-ic { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.cdlg.danger .cdlg-ic { background: color-mix(in srgb, var(--err) 16%, transparent); color: var(--err); }
.cdlg h2 { margin: 2px 0 0; font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.cdlg p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-body); }
.cdlg-items { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); }
.cdlg-items[hidden], .cdlg-field[hidden] { display: none; }
.cdlg-items span { height: 24px; padding: 0 9px; border-radius: 99px; background: var(--hover); font: 12px var(--mono); color: var(--text-body); display: inline-flex; align-items: center; }
.cdlg-field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.cdlg-field b { font: 500 12.5px var(--mono); color: var(--text); }
.cdlg-field input { height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font: 13.5px var(--mono); }
.cdlg-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.cdlg-ft { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; }
.cdlg-esc { margin-right: auto; font: 11px var(--mono); color: var(--faint); }
.cdlg .btn.ok { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.cdlg.danger .btn.ok { background: var(--err); border-color: var(--err); color: #fff; }
.cdlg .btn.ok:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) { .cdlg-esc { display: none; } }

/* ---------- Mise à jour: one card that changes with the state ---------- */
#upd { display: flex; flex-direction: column; gap: 20px; }
.upd-hero { padding: 26px; display: flex; flex-direction: column; gap: 20px; border-radius: 16px; }
.upd-hero.available { border-color: var(--sel-border); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent); }
.upd-hero.failed { border-color: var(--err-border); }
.upd-top { display: flex; align-items: center; gap: 18px; }
.upd-top .t { flex: 1; min-width: 0; }
.upd-badge { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.upd-badge svg { width: 24px; height: 24px; stroke-width: 2.2; }
.upd-hero.available .upd-badge, .upd-hero.running .upd-badge { background: var(--accent-soft); color: var(--accent-ink); }
.upd-hero.failed .upd-badge { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.upd-badge .spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 1s linear infinite; }
.upd-title { font-size: 21px; font-weight: 600; line-height: 1.3; }
.upd-sub { margin-top: 3px; font-size: 14px; color: var(--text-2); }
.upd-sub b, .upd-title .mono { font-family: var(--mono); font-weight: 500; color: var(--text); }
.upd-sub .accent { color: var(--accent-ink); }
.upd-pct { font: 500 26px var(--mono); color: var(--accent-ink); }
.upd-bar { height: 6px; }
.upd-bar > i { background: var(--accent); transition: width .15s linear; }
.upd-doing { margin-top: 8px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.upd-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.upd-steps li { padding: 14px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.upd-steps .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-2); box-sizing: border-box; }
.upd-steps .ic svg { width: 12px; height: 12px; stroke-width: 3; }
.upd-steps li.done .ic { border: 0; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.upd-steps li.now { border-color: var(--sel-border); background: var(--sel); }
.upd-steps li.now .ic { border-color: var(--accent); border-right-color: transparent; animation: spin 1s linear infinite; }
.upd-steps li.fail { border-color: var(--err-border); }
.upd-steps li.fail .ic { border: 0; background: color-mix(in srgb, var(--err) 16%, transparent); color: var(--err); }
.upd-steps li.todo { opacity: .5; }
.upd-steps b { font-size: 13.5px; font-weight: 600; }
.upd-steps .d { font: 12px var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-steps li.now .d { color: var(--accent-ink); }
.upd-steps li.fail .d { color: var(--err); }
.upd-why { padding: 16px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.upd-why p { margin: 0; font-size: 13.5px; color: var(--text-body); line-height: 1.55; }
.upd-why pre { margin: 0; width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; background: var(--term); color: var(--term-err); font: 12px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.upd-commits { margin: 0; padding: 0; list-style: none; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); }
.upd-commits li { display: grid; grid-template-columns: 14px 84px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.upd-commits li:first-child { border-top: 0; }
.upd-commits .dot { width: 9px; height: 9px; background: transparent; border: 2px solid var(--faint); box-sizing: border-box; }
.upd-commits .dot.new { background: var(--accent); border: 0; }
.upd-commits .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-commits .when { color: var(--text-2); font-size: 12.5px; }
.upd-log { border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); }
.upd-log summary { cursor: pointer; padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--text-body); }
.upd-log pre { margin: 0; padding: 0 16px 14px; max-height: 320px; overflow: auto; font: 12px/1.6 var(--mono); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.upd-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.upd-settings form { display: contents; }
.upd-set { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); min-width: 0; }
button.upd-set { cursor: pointer; }
button.upd-set:hover { border-color: var(--border-2); }
button.upd-set:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upd-set .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upd-set .t b { font-size: 14px; font-weight: 600; }
.upd-set .t span { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-hist .upd-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 120px 150px 70px; gap: 16px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 13.5px; }
.upd-row .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-row .dim { font-size: 12.5px; }
.upd-row .res { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.upd-row .res.ok { color: var(--ok); }
.upd-row .res.err { color: var(--err); }
@media (max-width: 900px) {
  .upd-top { flex-wrap: wrap; }
  .upd-top > form, .upd-top > .upd-pct { width: 100%; }
  .upd-top > form .btn { width: 100%; justify-content: center; }
  .upd-steps { grid-template-columns: minmax(0, 1fr); }
  .upd-settings { grid-template-columns: minmax(0, 1fr); }
  .upd-hist .upd-row { grid-template-columns: 70px minmax(0, 1fr) 60px; }
  .upd-hist .upd-row > :nth-child(3), .upd-hist .upd-row > :nth-child(4) { display: none; }
  .upd-commits li { grid-template-columns: 14px 70px minmax(0, 1fr); }
  .upd-commits .when { display: none; }
}

/* Volumes editor (new project, Paramètres): a mounting plan */
.vmap { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr) 36px; gap: 10px 8px; align-items: center; }
.vrows, .vrow { display: contents; }
.vh { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.vcard { padding: 11px 14px; border-radius: 11px; background: var(--bg); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vcard.shared { border-color: color-mix(in srgb, #6ea0dc 45%, var(--border)); }
.vtop { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vtop b { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtop .tag.shared { background: color-mix(in srgb, #6ea0dc 16%, transparent); color: color-mix(in srgb, #6ea0dc 70%, var(--text)); }
.vsz { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.vbar { height: 4px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.vbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--accent); transition: width .3s; }
.vcard.shared .vbar i { background: #6ea0dc; }
.varrow { color: var(--faint); justify-self: center; }
.varrow.dash { opacity: .6; }
.varrow.dash svg { stroke-dasharray: 3 4; }
.vpath { justify-self: start; max-width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 9px; background: var(--hover); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlock { display: grid; place-items: center; color: var(--faint); }
.vpath-in { min-height: 38px; padding: 6px 12px; font-size: 13px; }
.vadd { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 11px; border: 1px dashed var(--border-2); background: transparent; color: var(--accent); font: 500 13.5px inherit; font-family: inherit; cursor: pointer; text-align: left; }
.vadd:hover { border-color: var(--accent); }
.vaddhint { font-size: 12.5px; }
.vavail { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.vavail .row { gap: 10px; align-items: baseline; font-size: 13px; }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; }
.vchip { min-height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text); font: 13px inherit; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.vchip:hover { border-color: var(--accent); }
.vchip .warn { font-size: 11.5px; color: var(--warn, #e8a25f); }
.vchip .dim { font-size: 12px; }
@media (max-width: 640px) {
  .vmap { grid-template-columns: minmax(0, 1fr) 36px; }
  .vmap > .vh, .vmap > span:empty, .varrow, .vaddhint { display: none; }
  .vcard, .vadd { grid-column: 1 / -1; }
}

/* Mes images: one row per catalog image, its defaults edited in place */
.imgrow { border-top: 1px solid var(--border); }
.imgrow[open] { background: var(--card-2, var(--bg)); }
.imgsum { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto 18px; gap: 14px; align-items: center; padding: 14px 24px; cursor: pointer; }
.imgsum::-webkit-details-marker { display: none; }
.imgsum:hover { background: var(--hover); }
.imgsum .t { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.imgsum .t b { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.imgsum .t .mono { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imgchips { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.imgchips span { font-size: 11.5px; padding: 4px 8px; border-radius: 7px; background: var(--hover); color: var(--text-body); }
.imgst { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.imgst.ok { color: var(--ok); }
.imgst.bad { color: var(--err); }
.chev { color: var(--faint); display: grid; place-items: center; transition: transform .15s; }
.imgrow[open] .chev { transform: rotate(180deg); }
.imgrow.add .imgsum { grid-template-columns: auto minmax(0, 1fr); }
.imgadd { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 500; font-size: 14px; }
.imgedit { padding: 4px 24px 18px; display: flex; flex-direction: column; gap: 16px; }
.imgedit .tile .d { display: block; font-size: 13px; color: var(--text-body); margin-top: 4px; }
.imgfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 24px 18px; }
.paths { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pchip { min-height: 34px; padding: 0 4px 0 12px; border-radius: 8px; background: var(--hover); font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.pchip button { width: 26px; height: 26px; border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 15px; border-radius: 6px; }
.pchip button:hover { color: var(--text); }
.paths-in { width: 170px; min-height: 34px; padding: 4px 10px; font-size: 13px; border-style: dashed; }
@media (max-width: 640px) {
  .imgsum { grid-template-columns: minmax(0, 1fr) auto 18px; padding: 14px 16px; }
  .imgchips { display: none; }
  .imgsum .t { flex-direction: column; gap: 2px; }
  .imgedit { padding: 4px 16px 16px; }
  .imgfoot { padding: 0 16px 16px; }
  .imgedit .access { grid-template-columns: 1fr; }
}

/* Mon profil → GitHub */
.gh-acc { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.gh-acc .t { flex: 1; min-width: 0; }
.gh-acc b { font-size: 15px; }
.gh-uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.gh-uses > div { padding: 12px; border-radius: 10px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.gh-uses .ic { color: var(--accent); }
.gh-uses .dim { font-size: 12px; }
.gh-token { margin-top: 14px; }
.gh-token summary { cursor: pointer; font-size: 13px; font-weight: 500; }
@media (max-width: 900px) { .gh-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Project identity: header, tint, Général card ---------- */
.phead .phead-av { width: 40px; height: 40px; font-size: 14px; }
.phead-desc { margin: -10px 0 -4px; color: var(--text-body); font-size: 14px; max-width: 70ch; }
/* The project's colour drives its charts and gauges. */
.ptint .bar > i { background: color-mix(in srgb, var(--pc) 80%, var(--text)); }
.ptint .bar.warn > i { background: var(--warn); }
.ptint .bar.err > i { background: var(--err); }
.ptint .spark i.hi b, .ptint .spark i:hover b, .ptint .spark i.on b { background: var(--pc); }
.ptint .spark i b { background: color-mix(in srgb, var(--pc) 28%, var(--border-2)); }
.gen { display: flex; flex-direction: column; padding-top: 4px; padding-bottom: 4px; }
.gen-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--border); }
.gen-row:first-child { border-top: 0; }
.gen-l b { font-weight: 600; font-size: 14px; }
.gen-l .help { margin-top: 3px; }
.gen-r.row { gap: 10px; flex-wrap: wrap; }
.hues { display: flex; gap: 8px; flex-wrap: wrap; }
.hue { position: relative; cursor: pointer; }
.hue input { position: absolute; opacity: 0; pointer-events: none; }
.hue span { display: block; width: 28px; height: 28px; border-radius: 50%; background: hsl(var(--h) 62% 56%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); transition: transform .12s; }
.hue:hover span { transform: scale(1.08); }
.hue input:checked + span { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px hsl(var(--h) 62% 56%); }
.hue input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }
.hue-range { flex: 1; min-width: 160px; min-height: 0; height: 10px !important; padding: 0 !important; border: 0 !important; border-radius: 999px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: linear-gradient(90deg, hsl(0 62% 56%), hsl(60 62% 56%), hsl(120 62% 56%), hsl(180 62% 56%), hsl(240 62% 56%), hsl(300 62% 56%), hsl(359 62% 56%)); }
.hue-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 3px solid var(--text); }
.hue-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--text); }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--track); cursor: pointer; padding: 0; transition: background .15s; }
.switch span { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .15s, background .15s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(18px); background: #fff; }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .gen-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
.pcard .pdesc { margin: -4px 0 0; font-size: 13px; color: var(--text-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Claude page: the MCP tools, by right. */
.mcp-tools .tool-group { padding: 14px 24px 16px; border-top: 1px solid var(--border); }
.tool-group-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tool-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 16px; padding: 6px 0; font-size: 13.5px; color: var(--text-body); align-items: baseline; }
.tool-row code { font: 12.5px var(--mono); color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 640px) { .tool-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } .mcp-tools .tool-group { padding: 12px 16px 14px; } }

/* ---------- Dossiers gardés (Paramètres) ---------- */
.kexplain { margin: 18px 24px 6px; padding: 14px 16px; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 13px; }
.kx { display: flex; gap: 10px; align-items: center; min-width: 0; }
.kx b { font-weight: 600; }
.kxi { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); }
.kxi.dash { border: 1px dashed var(--border-2); }
.kxi.ok, .kic.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.kxi svg, .kic svg { width: 16px; height: 16px; }
.kxa { color: var(--faint); display: grid; place-items: center; }
.klist { list-style: none; margin: 14px 0 0; padding: 0; }
.krow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 80px minmax(0, auto); gap: 14px; align-items: center; padding: 13px 24px; border-top: 1px solid var(--border); transition: opacity .15s; }
.krow.new { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.kic { width: 34px; height: 34px; border-radius: 8px; background: var(--card-2); color: var(--text-2); display: grid; place-items: center; }
.kt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kt b.mono { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.kt input { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.knew { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge-new { padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 11px; font-weight: 600; }
.ks { font-size: 12.5px; color: var(--text-2); }
.okt { color: var(--ok); }
.warnt { color: var(--warn); }
.ksz { font-size: 12px; color: var(--text-2); text-align: right; }
.kact { justify-self: end; display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.kact.muted { gap: 6px; }
.koff { display: none; color: var(--warn); }
.krow[data-on="0"] .kic, .krow[data-on="0"] .kt, .krow[data-on="0"] .ksz { opacity: .45; }
.krow[data-on="0"] .kt b { text-decoration: line-through; }
.krow[data-on="0"] .koff { display: inline; }
.kadd { padding: 16px 24px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; }
.kchips { display: flex; gap: 8px; flex-wrap: wrap; }
.kchip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--border-2); background: transparent; color: var(--text); font: 12.5px var(--mono); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.kchip:hover { border-color: var(--accent); }
.kchip[hidden] { display: none; }
.kchip .plus { color: var(--accent); font-family: var(--sans, inherit); }
.kform { display: flex; gap: 10px; margin-top: 4px; }
.kin { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--bg); padding: 0 12px; }
.kin:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.kin input { border: 0; background: transparent; padding: 10px 0; min-height: 40px; outline: none; }
.kbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--border); background: var(--card-2); font-size: 13px; color: var(--text-body); flex-wrap: wrap; }
.kbar[hidden] { display: none; }
.kbar > svg { color: var(--warn); }
.kbar b { color: var(--text); font-weight: 600; }
@media (max-width: 640px) {
  .kexplain { grid-template-columns: minmax(0, 1fr); margin: 16px 16px 4px; }
  .kxa { display: none; }
  .krow { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 12px 16px; }
  .ksz { display: none; }
  .kadd, .kbar { padding-left: 16px; padding-right: 16px; }
  .kform { flex-wrap: wrap; }
}
/* Fichiers: kept folders outside /workspace */
.kbanner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 16px; margin-bottom: 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--card); font-size: 13px; color: var(--text-body); }
.kbanner b { color: var(--text); font-weight: 600; }
.kbanner > svg { flex: none; color: var(--text-2); }
.kbanner.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--card)); }
.kbanner.warn > svg { color: var(--warn); }
.kbanner.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--card)); }
.kbanner.ok > svg { color: var(--ok); }
.frow.kept > svg:first-child { color: var(--ok); }
.badge-kept { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font: 600 11px var(--sans, inherit); }
.keep-btn { opacity: 0; transition: opacity .12s; }
.keep-btn .btn { min-height: 28px; padding: 0 10px; color: var(--text); border: 1px solid var(--border-2); }
.frow:hover .keep-btn, .keep-btn:focus-within { opacity: 1; }
@media (hover: none) { .keep-btn { opacity: 1; } }
.flist-out .frow { grid-template-columns: 20px minmax(0, 1fr) 64px auto; }
.flist-out .frow .dt { display: none; }
@media (max-width: 900px) { .flist-out .frow { grid-template-columns: 20px minmax(0, 1fr) auto; } }
/* Réseau: automatic address switch */
.nauto { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.nauto > div { flex: 1; min-width: 0; font-size: 13.5px; }
.nauto b { font-weight: 600; }
.nauto .mono { font-size: 12.5px; overflow-wrap: anywhere; }
.nauto .help { margin-top: 2px; }
.nnone { padding: 4px 0; font-size: 14px; }

/* ---------- Menu: a rail of icons that unfolds over the page ---------- */
.app { grid-template-columns: 68px minmax(0, 1fr); }
.topbar { grid-column: 2; }
.sidebar.rail { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; height: 100vh; padding: 0; overflow: visible; z-index: 30; }
.rail-in { position: absolute; inset: 0 auto 0 0; width: 68px; box-sizing: border-box; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--card); border-right: 1px solid var(--border); overflow: hidden auto; scrollbar-width: none; transition: width .16s ease, box-shadow .16s ease; }
.rail-in:hover, .rail-in:focus-within { width: 232px; box-shadow: 12px 0 32px rgba(0, 0, 0, .28); }
.ritem, .rbrand, .rme { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 0 0 0; border-radius: 10px; color: var(--text-body); font-size: 14px; white-space: nowrap; text-decoration: none; }
.ric { flex: none; width: 44px; height: 44px; display: grid; place-items: center; position: relative; }
.ric > svg { width: 19px; height: 19px; }
.rlbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .12s; }
.rend { margin-left: auto; padding-right: 12px; font-size: 11.5px; color: var(--text-2); opacity: 0; transition: opacity .12s; }
.rail-in:hover .rlbl, .rail-in:focus-within .rlbl, .rail-in:hover .rend, .rail-in:focus-within .rend { opacity: 1; }
.ritem:hover { background: var(--hover); color: var(--text); }
.ritem.on { background: color-mix(in srgb, var(--accent) 12%, var(--hover)); color: var(--text); font-weight: 600; }
.ritem.on .ric > svg { color: var(--accent); }
.rbrand { margin-bottom: 12px; color: var(--text); }
.rbrand .rlbl { display: flex; align-items: baseline; gap: 8px; }
.rbrand b { font-size: 16px; font-weight: 600; }
.rbrand .ver { font: 11px var(--mono); color: var(--text-3); }
.rnav { display: flex; flex-direction: column; gap: 4px; }
.rsep { margin: 10px 4px 4px; min-height: 18px; border-top: 1px solid var(--line); padding-top: 10px; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.rpin { min-height: 40px; }
.rpin .ric { height: 40px; }
.rpin .avatar { width: 30px; height: 30px; }
.rpin .ric .dot { position: absolute; right: 4px; bottom: 4px; width: 10px; height: 10px; border: 2px solid var(--card); box-sizing: content-box; }
.rspace { flex: 1; min-height: 16px; }
.rbadge { position: absolute; left: 30px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card); }
.rme { margin-top: 6px; padding: 0; color: var(--text); }
.rme:hover { background: var(--hover); }
.rme.on { background: var(--hover); }
.rme .rlbl { display: flex; flex-direction: column; line-height: 1.25; }
.rme .rlbl b { font-size: 13px; font-weight: 600; }
.rme .rlbl span { font-size: 11.5px; color: var(--text-2); }
@media (max-width: 900px) { .sidebar.rail { display: none; } }

/* ---------- Project header: a card aligned with the content ---------- */
.phero-wrap { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.phero-wrap .back { margin: 0; align-self: flex-start; }
.phero { border-radius: 14px; background: var(--card); border: 1px solid var(--border); padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.phero-top { display: flex; align-items: center; gap: 16px; }
.avatar.phero-av { width: 56px; height: 56px; border-radius: 12px; font-size: 18px; }
.avatar.phero-av svg { width: 24px; height: 24px; }
.phero-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.phero-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phero-name h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.phero-desc { color: var(--text-body); font-size: 14px; max-width: 70ch; }
.phero-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font: 12.5px var(--mono); color: var(--text-2); min-width: 0; }
.phero-meta a.link { font: 12.5px var(--mono); overflow-wrap: anywhere; }
.phero-meta span { overflow-wrap: anywhere; }
.phero-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn.lg { width: 40px; height: 40px; border-radius: 8px; background: transparent; color: var(--text); }
.icon-btn.lg svg { width: 17px; height: 17px; }
.icon-btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.icon-btn.danger:hover { background: color-mix(in srgb, var(--err) 10%, transparent); color: var(--err); }
.pmore { position: relative; }
.pmore > summary { list-style: none; }
.pmore > summary::-webkit-details-marker { display: none; }
.pmore[open] > summary { background: var(--card-2); border-color: var(--faint); }
.pmenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; width: 250px; padding: 6px; border-radius: 12px; background: var(--card); border: 1px solid var(--border-2); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); display: flex; flex-direction: column; }
.pmenu form { display: block; }
.pmi { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: 13.5px var(--sans, inherit); text-align: left; cursor: pointer; text-decoration: none; }
.pmi:hover { background: var(--hover); color: var(--text); }
.pmi svg { color: var(--text-2); }
.ptabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ptabs a { padding: 7px 13px; border-radius: 7px; color: var(--text-body); font-size: 13.5px; white-space: nowrap; }
.ptabs a:hover { color: var(--text); background: var(--hover); }
.ptabs a.on { color: var(--text); background: color-mix(in srgb, var(--text) 11%, var(--bg)); font-weight: 600; }
@media (max-width: 900px) {
  .phero { padding: 16px; gap: 14px; }
  .phero-top { flex-wrap: wrap; align-items: flex-start; }
  .avatar.phero-av { width: 48px; height: 48px; }
  .phero-acts { width: 100%; justify-content: flex-start; }
  .pmenu { left: auto; right: 0; }
  .ptabs { align-self: stretch; }
}
.phero-acts .btn svg { width: 14px; height: 14px; }
.phero-acts .btn.primary svg { width: 13px; height: 13px; }
/* Project or container. A project: avatar, header tinted with its colour, « Projet », its
   containers under the header. A container of a project of several: « projet / conteneur ▾ »
   above a neutral header, its role's icon and « Conteneur · rôle ». */
.kind { display: inline-flex; align-items: center; gap: 6px; font: 600 10.5px/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--text-2); }
.kind svg { width: 12px; height: 12px; }
.kind.proj { color: color-mix(in srgb, var(--pc) 70%, var(--text)); }
.phero.proj { background: color-mix(in srgb, var(--pc) 7%, var(--card)); border-color: color-mix(in srgb, var(--pc) 30%, var(--border)); }
.cic.xl { width: 56px; height: 56px; border-radius: 12px; color: var(--text); }
.cic.xl svg { width: 24px; height: 24px; }
.csw { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.csw-proj { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 4px; border-radius: 9px; color: var(--text); font-weight: 600; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.csw-proj:hover { background: var(--hover); color: var(--text); }
.csw-slash { color: var(--faint); font-size: 18px; }
.csw-pick > summary.cpick { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 6px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--card); color: var(--text); font: 600 15px var(--sans); cursor: pointer; }
.cpick > svg { color: var(--text-2); }
.cpick .cic, .cmenu .cic { width: 26px; height: 26px; border-radius: 7px; }
.cpick .cic svg, .cmenu .cic svg { width: 14px; height: 14px; }
.pmenu.cmenu { left: 0; right: auto; width: 300px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; }
.cmenu .pmi { min-height: 44px; padding: 0 10px 0 6px; }
.cmenu .pmi small { margin-left: auto; font-size: 11.5px; color: var(--text-2); }
.cmenu .pmi.on { background: var(--sel); font-weight: 600; }
.cmenu .pmi.up, .cmenu .pmi.up svg { color: var(--accent); }
.cmenu .pmi.up { padding-left: 12px; }
.cmenu-sep { height: 1px; background: var(--line); margin: 4px 2px; flex: none; }
.csw-pos { font: 12.5px var(--mono); color: var(--text-2); }
@media (max-width: 900px) {
  .cic.xl { width: 48px; height: 48px; }
  .csw .csw-pick.pmore { position: static; }
  .csw .pmenu.cmenu { top: 50px; left: 0; right: 0; width: auto; max-width: none; }
}
.upd-slot { display: contents; }
/* Rail: the profile row opens the settings above it; the rail stays unfolded meanwhile. */
.rme-menu { display: flex; flex-direction: column-reverse; }
.rme-menu > summary { list-style: none; cursor: pointer; }
.rme-menu > summary::-webkit-details-marker { display: none; }
.rme-menu .rend svg { transition: transform .15s; transform: rotate(180deg); }
.rme-menu[open] .rend svg { transform: none; }
.rail-in:has(.rme-menu[open]) { width: 232px; box-shadow: 12px 0 32px rgba(0, 0, 0, .28); }
.rail-in:has(.rme-menu[open]) .rlbl, .rail-in:has(.rme-menu[open]) .rend { opacity: 1; }
.rsettings { padding-bottom: 6px; }
.rsub { min-height: 38px; padding-left: 14px; }
.rsub .rend { display: inline-flex; }
.rme-acts { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.rme-acts form { display: block; }
.rme-acts .btn { width: 100%; justify-content: flex-start; min-height: 38px; padding: 0 14px; border: 0; font-size: 14px; color: var(--text-body); }
.rme-acts .btn:hover { color: var(--text); background: var(--hover); }

/* Rail: the Claude button, a warm gradient that flows, a sheen, a breathing halo. */
@keyframes cl-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes cl-pulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(224, 131, 80, .15), 0 4px 16px -6px rgba(224, 131, 80, .5); } 50% { box-shadow: 0 0 0 1px rgba(240, 163, 192, .3), 0 8px 26px -6px rgba(226, 122, 134, .7); } }
@keyframes cl-sheen { 0% { transform: translateX(-150%) skewX(-20deg); } 45%, 100% { transform: translateX(520%) skewX(-20deg); } }
@keyframes cl-spark { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-2.5px); } 88% { transform: translateY(0); } 94% { transform: translateY(-1px); } }
.ritem.rclaude { overflow: hidden; color: #fff; font-weight: 600; background: linear-gradient(110deg, #7e3418, #b5532c, #b0566a, #82559a, #b5532c, #7e3418); background-size: 260% 100%; animation: cl-flow 7s ease-in-out infinite, cl-pulse 4s ease-in-out infinite; }
.ritem.rclaude:hover { color: #fff; background: linear-gradient(110deg, #7e3418, #b5532c, #b0566a, #82559a, #b5532c, #7e3418); background-size: 260% 100%; filter: brightness(1.06); }
.ritem.rclaude.on { color: #fff; box-shadow: 0 0 0 2px var(--text); animation: cl-flow 7s ease-in-out infinite; }
.ritem.rclaude .ric > svg { color: #fff; width: 20px; height: 20px; filter: drop-shadow(0 1px 1.5px rgba(80, 20, 0, .35)); animation: cl-spark 4s ease-out infinite; }
.ritem.rclaude .rlbl { text-shadow: 0 1px 2px rgba(80, 20, 0, .35); }
.rsheen { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.rsheen::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 40px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent); animation: cl-sheen 4.5s ease-in-out infinite; }
.rtag { padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .2); color: #fff; font: 600 10.5px var(--mono); letter-spacing: .04em; }
.ritem.rclaude .rend { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .ritem.rclaude, .ritem.rclaude .ric > svg, .rsheen::after { animation: none; }
}
.actor.ai { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent-ink); }
.actor.ai svg { width: 11px; height: 11px; }
/* Cards of a row share its height: the top part grows, the actions stay at the bottom. */
.pcard .ptop { flex: 1; }

/* ---------- Status colours: offline red, error orange, building yellow, starting blue ---------- */
:root { --st-off: #c2412f; --st-err: #c2600f; --st-build: #9a7400; --st-start: #2d6fca; }
html[data-theme="dark"] { --st-off: #ec7461; --st-err: #f0943f; --st-build: #e8c44f; --st-start: #6aa6f0; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --st-off: #ec7461; --st-err: #f0943f; --st-build: #e8c44f; --st-start: #6aa6f0; } }
.pill.exited { --st: var(--st-off); }
.pill.dead, .pill.failed, .pill.missing { --st: var(--st-err); }
.pill.absent { --st: var(--st-build); }
.pill.restarting, .pill.created { --st: var(--st-start); }
.pill.exited, .pill.dead, .pill.failed, .pill.missing, .pill.absent, .pill.restarting, .pill.created { color: var(--st); }
.pill:not(.bare).exited, .pill:not(.bare).dead, .pill:not(.bare).failed, .pill:not(.bare).missing, .pill:not(.bare).absent, .pill:not(.bare).restarting, .pill:not(.bare).created {
  background: color-mix(in srgb, var(--st) 12%, var(--card)); border-color: color-mix(in srgb, var(--st) 32%, transparent); }
.pill.exited::before, .pill.dead::before, .pill.failed::before, .pill.missing::before, .pill.restarting::before, .pill.created::before { background: var(--st); border: 0; }
.pill.absent::before { border-color: var(--st); border-right-color: transparent; }
.pill.absent.plain::before { border-right-color: var(--st); }
.dot.exited { background: var(--st-off); border: 0; }
.dot.dead, .dot.failed, .dot.missing { background: var(--st-err); border: 0; }
.dot.absent { background: var(--st-build); border: 0; }
.dot.restarting, .dot.created { background: var(--st-start); border: 0; }

/* Error pages (403, 404). */
body.errpage { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 22px 22px; }
.err { width: 100%; max-width: 520px; text-align: center; animation: err-in .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes err-in { from { opacity: 0; transform: translateY(10px); } }
.err-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 36px; }
.err-dot { width: 16px; height: 16px; border-radius: 5px; background: var(--accent); }
.err-code { font: 600 clamp(88px, 22vw, 140px)/1 var(--sans); letter-spacing: -.06em; margin: 0; color: var(--text); }
.err-code span { color: var(--accent); }
.err-label { font: 12px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .1em; margin: 10px 0 18px; }
.err h1 { font-size: 22px; font-weight: 600; margin: 0 0 8px; }
.err.in-app { margin: 9vh auto 40px; }
.err-msg { color: var(--text-2); margin: 0 auto 26px; max-width: 420px; }
.err-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .err { animation: none; } }

/* Installation guide (/setup): steps on the left, the current step on the right. */
body.setup-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 22px 22px; }
.wz { width: 100%; max-width: 940px; display: grid; grid-template-columns: 220px minmax(0, 1fr); background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; min-height: 560px; }
.wz.wz-done { grid-template-columns: minmax(0, 1fr); max-width: 620px; min-height: 0; }
.wz-steps { background: var(--card-2); border-right: 1px solid var(--border); padding: 22px 14px; display: flex; flex-direction: column; gap: 2px; }
.wz-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; margin: 0 0 18px 8px; }
.wz-st { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; font-size: 13px; color: var(--faint); }
.wz-st.link { text-decoration: none; transition: background .12s, color .12s; }
.wz-st.link:hover { background: var(--hover); color: var(--text); }
.wz-st.link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wz-st .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 500 11px var(--mono); border: 1px solid var(--border-2); flex: none; }
.wz-st .n svg { display: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wz-st.done { color: var(--text-2); }
.wz-st.done .n { background: color-mix(in srgb, var(--ok) 16%, transparent); border-color: transparent; color: var(--ok); }
.wz-st.done .n svg { display: block; }
.wz-st.done .num { display: none; }
.wz-st.cur { background: var(--accent-soft); color: var(--text); font-weight: 500; }
.wz-st.cur .n { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.wz-later { margin-top: auto; padding: 14px 8px 0; font-size: 12.5px; color: var(--faint); }
.wz-later:hover { color: var(--text); }
.wz-main { position: relative; padding: 34px 40px 26px; display: flex; flex-direction: column; min-width: 0; animation: wz-in .35s cubic-bezier(.2,.7,.2,1) both; }
.wz-lang { position: absolute; top: 14px; right: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); }
.wz-lang:hover { color: var(--text); }
@keyframes wz-in { from { opacity: 0; transform: translateY(6px); } }
.wz-main > section { display: contents; }
.wz-main > section[hidden] { display: none; }
.wz-kick { font: 12px var(--mono); color: var(--accent); }
.wz-progress { display: none; }
.wz-main h1 { font-size: 26px; font-weight: 600; letter-spacing: -.025em; margin: 6px 0 6px; }
.wz-lead { color: var(--text-2); margin: 0 0 22px; max-width: 560px; }
.wz-lead code, .wz-body code, .wz-tip code { font: 12px var(--mono); background: var(--card-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.wz-flash { margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; }
.wz-flash:empty { display: none; }
.wz-flash.err { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.wz-flash.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.wz-body { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.wz-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.wz-foot-r { display: flex; gap: 8px; margin-left: auto; }
.wz-card { border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); }
.wz-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.wz-ic svg { width: 18px; height: 18px; }
.wz-ic.lg { width: 46px; height: 46px; border-radius: 11px; } .wz-ic.lg svg { width: 22px; height: 22px; }
.wz-ic.xl { width: 56px; height: 56px; border-radius: 13px; background: var(--hover); color: var(--text); } .wz-ic.xl svg { width: 30px; height: 30px; }
.wz-ic.cl { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 16px; }
.wz-ic.gp { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-size: 16px; }
.wz-pk { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.wz-pk b, .wz-app b, .wz-toggle b { display: block; font-size: 14px; margin-bottom: 2px; }
.wz-pk .muted, .wz-app .muted, .wz-toggle .muted { font-size: 12.5px; }
/* Installation code */
.otp { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.otp input { width: 46px; min-height: 0; height: 56px; padding: 0; text-align: center; font: 500 22px var(--mono); text-transform: uppercase; border-radius: 9px; background: var(--card); caret-color: var(--accent); }
.otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.otp input.bad { border-color: var(--err); animation: wz-shake .3s; }
@keyframes wz-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.otp .dash { color: var(--faint); margin: 0 2px; }
.wz-hint { display: grid; gap: 8px; font-size: 13px; color: var(--text-2); }
.wz-hint b { color: var(--text); }
.wz-hint .muted { font-size: 12px; color: var(--faint); }
.wz-cmd { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-2); padding: 6px 6px 6px 12px; }
.wz-cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 12.5px var(--mono); background: none !important; border: 0 !important; padding: 0 !important; }
.wz-cmd.big code { font-size: 14px; }
/* Domain checks */
.wz-checks { overflow: hidden; }
.wz-check { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.wz-check:first-child { border-top: 0; }
.wz-check b { color: var(--text); font-weight: 500; }
.wz-check .side { font: 11.5px var(--mono); color: var(--faint); }
.mk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.mk svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mk.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.mk.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.mk.bad { background: color-mix(in srgb, var(--err) 16%, transparent); color: var(--err); }
.mk.off { background: var(--hover); color: var(--faint); }
.mk.spin { border: 2px solid var(--border-2); border-top-color: var(--accent); animation: wz-spin .9s linear infinite; }
/* Domain name, before sign-in */
.wz-dom { display: grid; gap: 14px; }
.wz-dns { padding: 12px 14px; font-size: 13px; color: var(--text-2); }
.wz-dns p { margin: 0; }
.wz-dns p.muted { margin-top: 8px; font-size: 12px; color: var(--faint); }
.wz-dns table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.wz-dns th { text-align: left; font: 500 11px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .04em; padding: 0 10px 6px 0; }
.wz-dns td { padding: 7px 10px 7px 0; border-top: 1px solid var(--line); color: var(--text); word-break: break-all; }
.wz-dns td:first-child { width: 52px; font: 12px var(--mono); color: var(--text-2); }
.wz-cf { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wz-cf .btn svg { width: 15px; height: 15px; }
.wz-cf-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.wz-cf-box p { margin: 0; font-size: 12.5px; color: var(--text-2); }
.wz-cf-box p b { color: var(--text); font-weight: 500; }
.wz-cf-box .wz-inline input { flex: 1; min-width: 0; }
.wz-cf-box .wz-checks { background: var(--card); }
.wz-cert { padding: 14px 16px; }
.wz-cert-h { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.wz-cert .seg span { padding: 5px 11px; border-radius: 4px; font: 500 12.5px var(--sans); color: var(--faint); }
.wz-cert .seg span.on { background: var(--accent-soft); color: var(--accent-ink); }
.wz-cert p { margin: 0; font-size: 13px; }
.wz-more { margin-top: 10px; font-size: 13px; }
.wz-more summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.wz-more ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }
.wz-more p { margin: 8px 0; font-size: 12.5px; }
/* Resources */
.wz-srv { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 12px 14px; font-size: 13px; }
.wz-slider { display: grid; gap: 8px; margin-bottom: 14px; }
.wz-slider .h { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.wz-slider .h b, .wz-slider .h output { color: var(--text); font-weight: 500; }
.wz-slider .f { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); }
.wz-slider .acc { color: var(--accent-ink); font-family: var(--sans); }
/* Sliders: the track fills up to the thumb (--p, set by the page), a white thumb with an
   accent ring; the focus ring goes on the thumb, never around the track. */
.wz input[type="range"] { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 24px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.wz input[type="range"]:focus { outline: none; }
.wz input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) 0 var(--p), var(--hover) var(--p) 100%); }
.wz input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--hover); }
.wz input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--accent); }
.wz input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgb(0 0 0 / .3); transition: box-shadow .15s, transform .15s; }
.wz input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgb(0 0 0 / .3); transition: box-shadow .15s, transform .15s; }
.wz input[type="range"]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px var(--accent-soft), 0 1px 4px rgb(0 0 0 / .3); }
.wz input[type="range"]:hover::-moz-range-thumb { box-shadow: 0 0 0 6px var(--accent-soft), 0 1px 4px rgb(0 0 0 / .3); }
.wz input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.wz input[type="range"]:active::-moz-range-thumb { transform: scale(1.12); }
.wz input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 6px var(--accent); }
.wz input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 6px var(--accent); }
.wz-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* GitHub */
.wz-gh { display: flex; align-items: center; gap: 18px; padding: 16px; }
.wz-gh ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.wz-gh li { display: flex; gap: 9px; align-items: center; }
.wz-gh li svg { width: 13px; height: 13px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wz-okline { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 13px; }
.btn.dark { background: var(--text); color: var(--bg); border-color: transparent; align-self: flex-start; }
.btn.dark svg { width: 16px; height: 16px; }
.wz-inline { display: flex; gap: 8px; }
.wz-inline input { min-height: 38px; padding: 8px 12px; }
/* Updates */
.wz-ver { display: grid; grid-template-columns: auto 1fr auto; }
.wz-ver .st b.ok { color: var(--ok); }
.wz-ver .st b.warn { color: var(--warn); }
.wz-dom-go { display: flex; justify-content: flex-end; margin-top: 4px; }
#dom-more .wz-dom { margin-top: 14px; }
.wz-ver > div { padding: 12px 14px; border-left: 1px solid var(--line); font-size: 13px; min-width: 0; }
.wz-ver > div:first-child { border-left: 0; }
.wz-ver .muted { display: block; font-size: 11.5px; color: var(--faint); }
.wz-choices { display: grid; gap: 10px; }
.wz-choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); cursor: pointer; }
.wz-choice input { position: absolute; opacity: 0; width: 1px; min-height: 0; }
.wz-choice .rd { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-2); flex: none; margin-top: 1px; transition: border-width .15s; }
.wz-choice b { display: block; font-size: 14px; }
.wz-choice .muted { font-size: 12.5px; }
.wz-choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card-2)); }
.wz-choice:has(input:checked) .rd { border: 5px solid var(--accent); }
.wz-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* AI */
.wz-toggle { display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer; }
.switch-ui { position: relative; margin-left: auto; width: 42px; height: 24px; border-radius: 99px; background: var(--track); border: 1px solid var(--border-2); flex: none; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .15s, background .15s; }
.wz-toggle input:checked + .switch-ui { background: var(--accent); border-color: var(--accent); }
.wz-toggle input:checked + .switch-ui::after { transform: translateX(18px); background: #fff; }
.wz-toggle input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.wz-app { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
/* First project */
.wz-tpl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.wz-tpl label { position: relative; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); cursor: pointer; }
.wz-tpl b { display: block; font-size: 14px; }
.wz-tpl .muted { font-size: 12px; }
.wz-tpl label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card-2)); }
.wz-tpl label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.wz-name { position: relative; display: flex; align-items: center; }
.wz-name #p-host { position: absolute; right: 14px; font-size: 12px; pointer-events: none; }
/* Done */
.wz-fin { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wz-big { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); margin-bottom: 8px; animation: wz-pop .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes wz-pop { from { transform: scale(.4); opacity: 0; } }
.wz-big svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.wz-fin .wz-lead { margin-bottom: 18px; }
.wz-rec { width: 100%; text-align: left; margin-bottom: 16px; }
.wz-rec > div { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.wz-rec > div:first-child { border-top: 0; }
.wz-rec b { color: var(--text); font-weight: 600; }
.wz-rec .spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--accent); flex: none; animation: wz-spin .9s linear infinite; }
@keyframes wz-spin { to { transform: rotate(360deg); } }
.wz-tip { font-size: 13px; color: var(--text-2); margin: 0 0 18px; max-width: 460px; }
.wz-tip b { color: var(--text); }
@media (max-width: 760px) {
  body.setup-page { padding: 0; place-items: stretch; background-image: none; }
  .wz { grid-template-columns: minmax(0, 1fr); border-radius: 0; border: 0; min-height: 100vh; }
  .wz-steps { display: none; }
  .wz-main { padding: 26px 20px 22px; }
  .wz-progress { display: block; height: 4px; border-radius: 99px; background: var(--hover); margin: 8px 0 4px; overflow: hidden; }
  .wz-progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
  .wz-grid2, .wz-tpl { grid-template-columns: 1fr 1fr; }
  .wz-ver { grid-template-columns: 1fr 1fr; }
  .wz-ver > .st { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .wz-gh { flex-direction: column; align-items: flex-start; }
  .wz-check { grid-template-columns: 24px minmax(0, 1fr); }
  .wz-check .side { display: none; }
  .otp input { width: 36px; height: 48px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .wz-main, .wz-big, .otp input.bad { animation: none; } }
.wz [hidden] { display: none !important; }
.wz-flash { text-align: left; }

/* ---------- Paramètres ---------- */
.settings [hidden] { display: none !important; }
.set-sec { display: grid; gap: 14px; }
.set-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.set-h h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.set-h .mono { font-size: 12.5px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 20px; margin-top: 32px; }
.set-card .card-b { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.set-card .card-b p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.set-card .card-b p b { color: var(--text); }
.set-card .card-b form { align-self: stretch; }
.set-card .upd-set { width: 100%; }
.set-card .upd-set .t span { white-space: normal; overflow: visible; text-overflow: clip; }
.settings #s-move { display: grid; gap: 14px; max-width: 720px; }

/* ---------- Projets de plusieurs conteneurs : liste, page du projet (chantier « pages ») ---------- */
/* Rôle d'un conteneur : une icône dans un carré, puis le nom du rôle */
.cic { flex: none; width: 28px; height: 28px; border-radius: 7px; display: inline-grid; place-items: center; background: var(--card-2); border: 1px solid var(--border); color: var(--text-body); }
.cic svg { width: 15px; height: 15px; }
.cic.lg { width: 36px; height: 36px; border-radius: 9px; }
.cic.lg svg { width: 18px; height: 18px; }
.role { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--hover); font: 500 11.5px var(--sans); color: var(--text-body); white-space: nowrap; }

/* Carte d'un projet dans la liste : ses conteneurs en lignes */
.cstack { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card-2); }
.crow { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 56px; gap: 10px; align-items: center; padding: 6px 10px 6px 8px; border-top: 1px solid var(--line); font-size: 13px; }
.crow:first-child { border-top: 0; }
.crow .cic { width: 24px; height: 24px; border-radius: 6px; }
.crow .cic svg { width: 13px; height: 13px; }
.crow .nm { font: 500 12.5px var(--mono); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow .nm span { font-weight: 400; color: var(--faint); }
.crow .st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.crow .v { font: 11.5px var(--mono); color: var(--text-2); text-align: right; white-space: nowrap; }
.crow.more { display: block; padding: 6px 10px; font-size: 12px; color: var(--text-2); }
/* Past three containers, the list scrolls: three rows and a half show, the cut says there is more. */
.cstack.scroll { max-height: 128px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
/* Icon of a container: a button that opens the icons to choose from (« manage »). */
.cicon > summary.cic { cursor: pointer; transition: border-color .12s, color .12s; }
.cicon > summary.cic:hover, .cicon[open] > summary.cic { border-color: var(--faint); color: var(--text); }
.pmenu.icon-menu { left: 0; right: auto; width: 268px; }
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 4px 4px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.icon-grid button { height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text-body); cursor: pointer; }
.icon-grid button:hover { background: var(--hover); color: var(--text); }
.icon-grid button.on { border-color: var(--sel-border); background: var(--accent-soft); color: var(--accent-ink); }
.icon-grid button svg { width: 16px; height: 16px; }
.icon-menu .pmi:disabled { opacity: .5; cursor: default; background: transparent; }
/* Settings of a container: the same icons, laid out in the « Icône » row. */
.gen-icon { display: flex; gap: 14px; align-items: flex-start; }
.gen-icons { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.icon-grid.wide { width: 100%; max-width: 440px; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); padding: 0; margin: 0; border: 0; }
.icon-grid.wide button { border-color: var(--border); }
.icon-grid.wide button.on { border-color: var(--sel-border); }
.gen-icons .btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) { .gen-icon > .cic.xl { display: none; } }

/* Dashboard KPIs: the same blocks in each card (title, value, a visual of the same height,
   one line under it), so the four cards line up without empty space. */
.kpis .kpi { display: flex; flex-direction: column; }
.kpi-viz { height: 74px; margin-top: 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.kpi-viz .spark-w { margin-top: 0; }
.kpi .kpi-viz .bar { margin-top: 0; }
.kpis .kpi .foot { margin-top: 12px; }
.ctiles { display: flex; gap: 2px; height: 8px; }
.ctiles i, .ctiles i.dot { flex: 1; min-width: 3px; width: auto; height: 100%; border: 0; border-radius: 2px; }
.ctiles i.none { background: var(--track); }
.ctiles i.dot.paused, .ctiles i.dot.unknown { background: var(--faint); }
.kleg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); }
.kleg li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.kleg .kl { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kleg .kl svg { width: 12px; height: 12px; flex: none; color: var(--faint); }
.kleg .kl .dot { width: 8px; height: 8px; border: 0; border-radius: 2px; }
.kleg b { font: 500 11.5px var(--mono); color: var(--text); white-space: nowrap; }
.kleg b.bad { color: var(--st-off); }
.kleg .ksw { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--meter); }
.kleg .ksw.img { background: var(--accent); }
.kleg .ksw.free { background: var(--track); box-shadow: inset 0 0 0 1px var(--border-2); }
.bar.dsegs { display: flex; }
.bar.dsegs > i { flex: none; border-radius: 0; }
.bar.dsegs > i.img { min-width: 3px; background: var(--accent); }
.ogrid { gap: 16px; }
@media (max-width: 900px) {
  .kpis .kpi { padding: 16px 14px; }
  .kpis .kpi-h { white-space: nowrap; }
  .kpis .kpi-v { font-size: 24px; }
  .kpis .kpi-v small { font-size: 12px; }
  .kpis .kpi .foot { font-size: 12px; }
}
.agg { display: inline-flex; align-items: center; gap: 6px; font: 12.5px var(--mono); color: var(--text-body); white-space: nowrap; flex: none; }
.segbar { display: flex; gap: 3px; }
.segbar i { width: 14px; height: 6px; border-radius: 3px; background: var(--ok); }
.selecting .pcard .hd .agg, .selecting .pcard .hd > .pill { margin-right: 30px; }
.pcard .pill { flex: none; }
.alert.pile { align-items: center; margin-bottom: 16px; }
.alert.pile > div { flex: 1; min-width: 0; }
.ptbl tr.srow td { background: var(--card-2); }
.ptbl tr.sub td:first-child + td { padding-left: 34px; }
.ptbl tr.sub .cell-p .cic { width: 26px; height: 26px; }

/* Page du projet : en-tête de section, cartes des conteneurs */
.shead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.shead h2 { font-size: 18px; font-weight: 600; }
.shead .muted { font-size: 13px; }
.shead .end { margin-left: auto; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.ccard { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); min-width: 0; }
.ccard .hd { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.ccard .hd .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ccard .hd .t a { color: inherit; text-decoration: none; }
.ccard .hd .t b { display: block; font: 600 14px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard .hd .t span { font: 12px var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard .bd { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.ccard .kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 12.5px; }
.ccard .kv dt { color: var(--text-2); }
.ccard .kv dd { margin: 0; font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard .kv dd a { color: var(--accent); }
.ccard .gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ccard .g .row { justify-content: space-between; margin-bottom: 5px; font-size: 12px; color: var(--text-2); flex-wrap: nowrap; }
.ccard .g b { font: 500 12px var(--mono); color: var(--text); white-space: nowrap; }
.ccard .g .bar { height: 5px; }
.ccard .stopnote { margin: 0; padding: 4px 10px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-body); }
.ccard .stopnote .err { font-family: var(--mono); color: var(--err); }
.ccard .ft { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 10px 16px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ccard .ft .end { margin-left: auto; }
.ccard .ft .btn.sm { min-height: 32px; }
.ccard .ft .icon-btn { width: 32px; height: 32px; }
.ccard.add { align-items: center; justify-content: center; gap: 8px; min-height: 220px; border: 1.5px dashed var(--border-2); background: transparent; color: var(--text-2); font-size: 14px; text-align: center; padding: 16px; text-decoration: none; }
.ccard.add:hover { background: var(--hover); }
.ccard.add b { color: var(--text); font-weight: 500; }
.ctbl .cell-p .cic { width: 26px; height: 26px; }
.ctbl td.addr { font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctbl td.addr a { color: var(--accent); }
.sbottom { margin-top: 24px; }
.slogs .logs { border-radius: 0 0 calc(var(--r) - 1px) calc(var(--r) - 1px); }
.sres .card-b { display: flex; flex-direction: column; gap: 14px; }
.sres .help { margin: 0; }
.bar.segs { display: flex; gap: 2px; }
.bar.segs > i { flex: none; border-radius: 0; }
.caps { align-items: flex-end; gap: 12px; }
.caps .field { flex: 1 1 140px; min-width: 0; margin: 0; }
.slogf { margin-bottom: 14px; }
.logs .l .u { color: var(--term-3); }

/* Réseau du projet : qui parle à qui */
.flow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flow .node { display: flex; flex-direction: column; gap: 4px; min-width: 150px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--border-2); }
.flow .node b { display: flex; align-items: center; gap: 8px; font: 600 13px var(--mono); }
.flow .node span { font: 11.5px var(--mono); color: var(--text-2); }
.flow .node .to { color: var(--text-body); }
.flow .node.edge-in { background: var(--card-2); border-style: dashed; }
.flow .node.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.flow .arrow { font: 18px var(--mono); color: var(--faint); }
.flow .arrow.pub { color: var(--accent); }
.flow .zone { position: relative; flex: 1 1 420px; min-width: 0; padding: 20px 14px 14px; border: 1px dashed var(--border-2); border-radius: 14px; }
.flow .zone .zl { position: absolute; top: -10px; left: 14px; padding: 0 8px; background: var(--card); font: 500 11px var(--mono); letter-spacing: .04em; color: var(--text-2); }
.flow .nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.snet { margin-top: 24px; }
.snet .tbl td .tag { margin-left: 4px; }
.route-add { border-top: 1px solid var(--line); }
.route-add .row { align-items: flex-end; gap: 12px; }
.route-add .field { flex: 1 1 180px; min-width: 0; margin: 0; }
.nlinks .k { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); margin: 4px 0 8px; }
.nlinks .k ~ .k { margin-top: 18px; }
.sregroup .list-row { cursor: pointer; }
.sregroup .card-f { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sregroup .card-f .end { margin-left: auto; }

@media (max-width: 900px) {
  .ptbl tr.sub td:first-child + td { padding-left: 16px; }
}
@media (max-width: 640px) {
  /* Liste : nom, état et mémoire, comme la maquette mobile */
  .crow { grid-template-columns: 24px minmax(0, 1fr) auto auto; gap: 8px; }
  .crow .nm span { display: none; }
  .crow .st { font-size: 0; gap: 0; }
  .shead h2 { font-size: 16px; }
  .ccard .hd { padding: 12px 14px 0; }
  .ccard .bd { padding: 12px 14px; }
  .ccard .ft { padding: 10px 14px 12px; }
  .ccard .kv { grid-template-columns: 76px minmax(0, 1fr); }
  .ccard.add { min-height: 0; }
  .flow { flex-direction: column; align-items: stretch; }
  .flow .arrow { align-self: center; transform: rotate(90deg); }
  .flow .zone { flex-basis: auto; }
  .flow .nodes { grid-template-columns: 1fr 1fr; }
  .spage .phero-acts { width: 100%; }
  .spage .phero-acts form { flex: 1 1 40%; display: flex; }
  .spage .phero-acts .btn { flex: 1 1 40%; justify-content: center; }
  .ccard .ft { flex-wrap: nowrap; }
  .ccard .ft > a.icon-btn.bare { display: none; }
}
/* A log line marked as an error is not the error page's .err block. */
.logs .l.err { width: auto; max-width: none; text-align: left; animation: none; }
.phero-name a.tag.accent { gap: .3em; text-decoration: none; }
/* ---------- Ajouter un conteneur (projet de plusieurs conteneurs) ---------- */
.sadd [hidden] { display: none !important; }
.sadd .show-m { display: none; }
/* Fields and summary lines of the source and the access chosen (no script needed). */
.sadd:has([name=source][value=template]:not(:checked)) [data-for-src=template],
.sadd:has([name=source][value=image]:not(:checked)) [data-for-src=image],
.sadd:has([name=source][value=git]:not(:checked)) [data-for-src=git],
.sadd:has([name=access][value=internal]:not(:checked)) [data-for-access=internal],
.sadd:has([name=access][value=subdomain]:not(:checked)) [data-for-access=subdomain],
.sadd:has([name=access][value=path]:not(:checked)) [data-for-access=path] { display: none; }
.sadd-roles .tile .ic { margin-bottom: 10px; }
.sadd-roles .tile .d, .sadd-opts .tile .d { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.4; margin-top: 4px; }
.sadd-seg { margin-left: auto; }
.sadd-seg label { position: relative; display: inline-flex; cursor: pointer; }
.sadd-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sadd-seg span { padding: 6px 12px; border-radius: 4px; font: 500 13px var(--sans); color: var(--text-2); }
.sadd-seg input:checked + span { background: var(--hover); color: var(--text); }
.sadd-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.sadd-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.sadd-grid .wide { grid-column: 1 / -1; }
.sadd-grid .help { display: block; margin-top: 6px; }
.sadd-opts { display: flex; flex-direction: column; gap: 10px; }
.sadd-opts .tile { padding: 14px 44px 14px 16px; }
.sadd-opts .tile .accent { color: var(--accent); }
.sadd-opts .tile .mono { display: inline; margin: 0; font-size: 12.5px; color: inherit; overflow-wrap: anywhere; }
.sadd-opts .tile .mono.accent { color: var(--accent); }
.sadd-path { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 4px 2px 0; }
.sadd-path .field { flex: 1 1 200px; max-width: 320px; }
.sadd-path .row { min-height: 40px; }
.sadd-links { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.sadd-side { position: sticky; top: 84px; }
.sadd-recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.sadd-recap li { display: flex; gap: 10px; align-items: flex-start; }
.sadd-recap li > svg { flex: none; margin-top: 2px; color: var(--ok); }
.sadd-recap li > span { min-width: 0; overflow-wrap: anywhere; }
.sadd-res { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.sadd-res summary { cursor: pointer; list-style: none; }
.sadd-res summary::-webkit-details-marker { display: none; }
.sadd-res .grid2 { gap: 12px; margin-top: 12px; }
.sadd-res .help { margin-top: 8px; }
.sadd-raise p { margin: 8px 0 0; }
@media (max-width: 1180px) { .sadd-side { position: static; } }
@media (max-width: 640px) {
  .sadd .hide-m { display: none !important; }
  .sadd .show-m { display: inline; }
  .sadd-roles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sadd-roles .tile { display: flex; align-items: center; gap: 10px; padding: 10px 30px 10px 10px; }
  .sadd-roles .tile .ic { width: 28px; height: 28px; margin: 0; flex: none; }
  .sadd-roles .tile .ic svg { width: 15px; height: 15px; }
  .sadd-roles .tile .d { display: none; }
  .sadd-roles .tile .radio { top: 50%; right: 10px; margin-top: -8px; width: 16px; height: 16px; }
  .sadd-roles .tile b { font-size: 13.5px; }
  .sadd .card-h { flex-wrap: wrap; row-gap: 10px; }
  .sadd-seg { margin-left: 0; }
  .sadd-seg span { padding: 6px 10px; }
  .sadd-grid { grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; }
  .sadd-grid .repo, .sadd-grid .branch { grid-column: 1 / -1; }
  .sadd-opts .tile .d { font-size: 12px; }
  .sadd-links { font-size: 13.5px; }
  .sadd .card-f .btn.primary { flex: 1; justify-content: center; }
}
/* Réseau (/network): every project's addresses, open ports, private networks and links. */
.netpage .net-url { max-width: 380px; }
.netpage .net-url > a { overflow-wrap: anywhere; }
.netpage .net-list { display: grid; gap: 16px; padding: 18px 24px; }
.netpage .net-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.netpage .net-h .ic { display: inline-flex; color: var(--accent-ink); }
.netpage .net-h .end { margin-left: auto; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.netpage .net-item .lk-list { display: grid; gap: 6px; margin-top: 8px; }
.netpage .lk-row .mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.netpage .lk-row .end { margin-left: auto; font-size: 12px; white-space: nowrap; }
.netpage .lk-row .muted + .end { margin-left: 10px; }
.netpage .lk-row a.mono { color: var(--text); text-decoration: none; }
.netpage .lk-row a.mono:hover { color: var(--accent); }
.netpage .net-acc { cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; border-color: transparent; }
.netpage .net-acc:hover { filter: brightness(.96); box-shadow: inset 0 0 0 1px var(--border-2); }
.netpage .net-act { white-space: nowrap; width: 1%; }
.netpage .net-url form.inline { vertical-align: middle; }
@media (max-width: 900px) {
  .netpage .net-list { padding: 14px 16px; }
  .netpage .net-url { max-width: none; }
  .netpage .tbl .cell-p .mono { max-width: 120px; }
  .netpage .net-tbl th, .netpage .net-tbl td { padding-left: 8px; padding-right: 8px; }
  .netpage .net-tbl th:first-child, .netpage .net-tbl td:first-child { padding-left: 16px; }
  .netpage .net-tbl th:last-child, .netpage .net-tbl td:last-child { padding-right: 16px; }
  .netpage .net-tbl .cell-p { gap: 8px; }
  .netpage .net-url .mono { font-size: 12.5px; }
}
/* "Qui parle à qui" for the whole server (/network) and a project's Réseau tab. */
.gflow { align-items: stretch; }
.gflow > .arrow { align-self: center; }
.gflow > .edge-in { align-self: center; }
.gflow .gates { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.gflow .node.gate { border-color: color-mix(in srgb, var(--accent) 45%, var(--border-2)); }
.gflow .node.gate.direct { border-style: dashed; }
.gflow .zones { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 14px; padding-top: 10px; align-content: start; }
.gflow .zones .zone { flex: none; padding: 18px 10px 10px; }
.gflow .zones .zone.multi { grid-column: span 2; }
.gflow .zones .zone .zl { max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gflow .zones .zone .zl a { color: var(--text); font-weight: 600; text-decoration: none; }
.gflow .zones .zone .zl a:hover { color: var(--accent); }
.gflow .nodes { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.gflow .node { min-width: 0; }
.gflow .node b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow .node .ways { display: flex; flex-wrap: wrap; gap: 4px; }
.flow .node .ways .w { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; background: var(--hover); font: 500 10.5px var(--sans); color: var(--text-body); }
.flow .node .ways .w svg { width: 10px; height: 10px; }
.flow .node .ways .w.pub { background: var(--accent-soft); color: var(--accent-ink); }
.flow .node.me { border-color: var(--accent); border-width: 1.5px; }
.flow .node[data-name] { cursor: default; transition: opacity .15s, border-color .15s, box-shadow .15s; }
.flow .node[data-name]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.flow.tracing .node[data-name]:not(.lit):not(.in):not(.out) { opacity: .35; }
.flow .node.lit { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.flow .node.out { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.flow .node.in { border-color: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
@media (max-width: 900px) {
  .gflow .gates { flex-direction: row; }
  .gflow .gates .node { flex: 1; min-width: 0; }
  .gflow .zones { grid-template-columns: minmax(0, 1fr); flex-basis: auto; }
  .gflow .zones .zone.multi { grid-column: auto; }
  .gflow .nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gflow .zone:not(.multi) .nodes { grid-template-columns: minmax(0, 1fr); }
}
/* Réseau: shared networks and named network configurations. */
.flow .node .ways .w.lan { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--text-body); }
/* Réseau (/network), four tabs: the summary, what visitors reach, what projects reach, the
   named configurations. Forms open in a window (dialog.fdlg), Docker's details stay folded. */
.netpage .nhead { align-items: flex-end; margin-bottom: 20px; }
.netpage .nfilter { margin-left: auto; align-self: flex-end; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.netpage .nfilter label { display: inline-flex; align-items: center; gap: 6px; }
.netpage .nfilter .sel { width: auto; min-width: 180px; height: 38px; min-height: 38px; padding: 0 30px 0 12px; font-size: 13.5px; }
.netpage .ntabs { margin-bottom: 20px; overflow-x: auto; }
.netpage .ntabs a { display: inline-flex; align-items: center; gap: 8px; }
.netpage .ntabs a svg { color: var(--text-2); }
.netpage .ntabs a.on svg { color: var(--accent); }
.netpage .ntabs .n { font: 500 11px var(--mono); color: var(--text-2); padding: 1px 6px; border-radius: 999px; background: var(--hover); }
.netpage .tablead { margin: 0 0 16px; max-width: 760px; font-size: 14px; color: var(--text-body); }
.netpage .tablead b { color: var(--text); font-weight: 600; }
.netpage > .card, .netpage > .split, .netpage > .nsum, .netpage > .ncfgs { margin-bottom: 20px; }
.netpage .nsum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.netpage .nsum > a { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); text-decoration: none; }
.netpage .nsum > a:hover { border-color: var(--faint); }
.netpage .nsum .h { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.netpage .nsum .h svg { color: var(--faint); }
.netpage .nsum .v { margin-top: 6px; font-size: 15px; font-weight: 600; }
.netpage .nsum .v b { margin-right: 6px; font: 500 24px var(--mono); letter-spacing: -.02em; }
.netpage .nsum .d { font-size: 13px; color: var(--text-2); }
.netpage .nsum .go { margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--accent); }
.netpage .nreach { display: flex; align-items: center; gap: 10px 20px; padding: 12px 20px; font-size: 13px; }
.netpage .nreach .facts { flex: 1; min-width: 0; display: flex; gap: 10px 28px; flex-wrap: wrap; }
.netpage .nreach .facts > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.netpage .nreach > .btn { flex: none; }
.netpage .nreach .k { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.netpage .nreach .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.netpage .nlink { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
.netpage .nlink:first-child { border-top: 0; }
.netpage .nlink .a { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.netpage .nlink .a:hover { color: var(--accent); }
.netpage .nlink .arrow { color: var(--faint); font-family: var(--mono); }
.netpage .nlink .naddr { margin-left: auto; min-width: 0; font: 12px var(--mono); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.netpage .nnet { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.netpage .nnet:first-child { border-top: 0; }
.netpage .nnet .hd { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 30px; font-size: 14px; }
.netpage .nnet .hd > svg { flex: none; color: var(--accent-ink); }
.netpage .nnet .hd .desc { min-width: 0; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.netpage .nnet .hd .end { margin-left: auto; }
.netpage .nchips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.netpage .nchip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--hover); font-size: 12.5px; color: var(--text-body); white-space: nowrap; }
.netpage .nchip form { display: inline-flex; margin-right: -5px; }
.netpage .nchip .x { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--faint); cursor: pointer; }
.netpage .nchip .x:hover { background: var(--card); color: var(--text); }
.netpage .nchip .x svg { width: 11px; height: 11px; }
.netpage .nchip.add { background: none; border: 1px dashed var(--border-2); color: var(--text-2); font-family: var(--sans); cursor: pointer; }
.netpage .nchip.add:hover { border-color: var(--accent); color: var(--text); }
.netpage .nchip.add svg { width: 11px; height: 11px; }
.netpage .ndet > summary { display: inline-flex; align-items: center; gap: 4px; list-style: none; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.netpage .ndet > summary::-webkit-details-marker { display: none; }
.netpage .ndet > summary:hover { color: var(--text); }
.netpage .ndet > summary svg { width: 12px; height: 12px; }
.netpage .ndet[open] > summary svg, .netpage .nfold[open] > summary .end svg { transform: rotate(180deg); }
.netpage .ndet > div { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line); font: 12px var(--mono); color: var(--text-2); overflow-wrap: anywhere; }
.netpage .ndet b { color: var(--text-body); font-weight: 500; }
.netpage .nfold > summary { display: flex; align-items: center; gap: 10px; padding: 14px 20px; list-style: none; cursor: pointer; }
.netpage .nfold > summary .t { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.netpage .nfold > summary::-webkit-details-marker { display: none; }
.netpage .nfold > summary h3 { font-size: 15px; font-weight: 600; }
.netpage .nfold > summary .sub { min-width: 0; font-size: 13px; color: var(--text-2); }
.netpage .nfold > summary .end { flex: none; display: inline-flex; color: var(--text-2); }
.netpage .nfold[open] > summary { border-bottom: 1px solid var(--border); }
.netpage .ncfgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.netpage .ncfg { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); }
.netpage .ncfg .hd { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.netpage .ncfg .hd > svg { flex: none; color: var(--accent-ink); }
.netpage .ncfg .hd b { min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.netpage .ncfg .hd .end { margin-left: auto; }
.netpage .ncfg p { font-size: 13px; color: var(--text-2); }
.netpage .ncfg ul, .fdlg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-body); }
.netpage .ncfg li, .fdlg-list li { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.netpage .ncfg li svg, .fdlg-list li svg { flex: none; color: var(--text-2); }
.netpage .ncfg .ft { margin-top: auto; padding-top: 4px; }
.netpage .ncfg.new { align-items: center; justify-content: center; gap: 6px; min-height: 150px; border: 1.5px dashed var(--border-2); background: transparent; color: var(--text-2); font: inherit; font-size: 13px; text-align: center; cursor: pointer; }
.netpage .ncfg.new:hover { border-color: var(--accent); }
.netpage .ncfg.new b { color: var(--text); font-size: 14px; font-weight: 500; }
@media (max-width: 900px) {
  .netpage .nhead { margin-bottom: 16px; }
  .netpage .nfilter { margin-left: 0; width: 100%; }
  .netpage .nfilter .sel { flex: 1; min-width: 0; }
  .netpage .nsum { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .netpage .nreach, .netpage .nlink, .netpage .nnet, .netpage .nfold > summary { padding-left: 16px; padding-right: 16px; }
  .netpage .nreach { flex-direction: column; align-items: flex-start; }
  .netpage .nreach .facts { flex-direction: column; }
  .netpage .nlink { flex-wrap: wrap; }
  .netpage .nlink .naddr { margin-left: 0; flex-basis: 100%; order: 5; }
  .netpage .nlink form { margin-left: auto; }
}

/* ---------- A form in a window, opened by a button ([data-dialog], app.js) ---------- */
.fdlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--border-2); border-radius: 14px; background: var(--card); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: auto; }
.fdlg.wide { width: min(640px, calc(100vw - 32px)); }
.fdlg::backdrop { background: rgba(10, 10, 9, .6); backdrop-filter: blur(2px); }
.fdlg-h { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 0; }
.fdlg-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.fdlg-ic svg { width: 18px; height: 18px; }
.fdlg h2 { margin: 2px 0 0; font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.fdlg-h p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-body); }
.fdlg-b { display: grid; gap: 14px; padding: 18px 22px; }
.fdlg-b .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fdlg-b input:not([type=checkbox]), .fdlg-b select { width: 100%; min-height: 38px; padding: 6px 10px; font-size: 13.5px; }
.fdlg-b .dinput { display: flex; width: 100%; height: 38px; border-radius: var(--r-sm); border-style: solid; }
.fdlg-b .dinput input { flex: 1; width: auto; min-width: 0; height: 36px; min-height: 0; padding: 0 4px 0 10px; border: 0; }
.fdlg-b .help { display: block; margin: 6px 0 0; }
.fdlg-b p.help { margin: 0; }
.fdlg-b .checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 13.5px; }
.fdlg-b .checks label, .fdlg-b .check { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: nowrap; }
.fdlg-b .checks label > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fdlg-b .check { margin-top: 10px; font-size: 12.5px; }
.fdlg-b > .check { margin-top: 0; }
.fdlg-ft { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .fdlg-b .two, .fdlg-b .checks { grid-template-columns: minmax(0, 1fr); }
  .fdlg-h { padding: 18px 16px 0; }
  .fdlg-b { padding: 16px; }
  .fdlg-ft { padding: 12px 16px 16px; }
}
/* Right-click menu of a project or a container (web::ctxmenu); a long press on a phone
   opens it as a sheet at the bottom of the screen. Submenus open beside it on a computer,
   unfold in place in the sheet. */
[data-ctx].ctx-on { outline: 2px solid var(--accent); outline-offset: 2px; }
.crow[data-ctx].ctx-on { outline-offset: -2px; border-radius: 6px; }
.ctxm.pmenu { position: fixed; top: 0; left: 0; right: auto; z-index: 50; width: 236px; }
.ctxm[hidden], .ctxm [hidden] { display: none !important; }
.ctxm form { display: block; }
.ctxm .pmi { padding: 7px 10px; }
.ctxm .pmi:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ctxm .pmi.danger, .ctxm .pmi.danger svg { color: var(--err); }
.ctxm .pmi.stop svg { color: var(--err); }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 2px; flex: none; }
.ctx-hd { display: none; }
.ctx-has { position: relative; }
.ctx-has.open > .pmi { background: var(--hover); }
.ctx-chev { margin-left: auto; display: inline-flex; color: var(--text-3); transition: transform .15s; }
.ctx-chev svg { color: inherit; }
.ctxm .ctx-sub { display: none; position: absolute; top: -7px; left: calc(100% + 4px); right: auto; width: 214px; }
.ctxm .ctx-sub.icon-menu { width: 268px; }
.ctxm .ctx-has.open > .ctx-sub { display: flex; }
.ctxm .ctx-has.left > .ctx-sub { left: auto; right: calc(100% + 4px); }
.ctxm-scrim { position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, .5); }
.ctxm.sheet { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 82vh; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; border-width: 1px 0 0; box-shadow: 0 -18px 40px rgba(0, 0, 0, .4); }
.ctxm.sheet::before { content: ""; flex: none; width: 38px; height: 4px; margin: 2px auto 8px; border-radius: 4px; background: var(--border-2); }
.ctxm.sheet .ctx-hd { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ctx-hd > div { min-width: 0; }
.ctx-hd b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-hd small { display: block; font: 12px var(--mono); color: var(--text-2); }
.ctxm.sheet .pmi { min-height: 48px; padding: 0 12px; gap: 14px; font-size: 15px; }
.ctxm.sheet .pmi svg { width: 18px; height: 18px; }
.ctxm.sheet .ctx-sub { position: static; width: auto; padding: 0 0 4px 30px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.ctxm.sheet .ctx-sub .pmi { min-height: 44px; }
.ctxm.sheet .ctx-has.open .ctx-chev { transform: rotate(90deg); }
.ctxm.sheet .icon-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.ctxm.sheet .icon-grid button { height: 44px; }
@media (pointer: coarse) { [data-ctx] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
