/* Homelab hub + ClipNet on GitHub's Primer design system (web/static/vendor/primer, MIT).
   Primer supplies the tokens (the nine colour themes, sizes, type) and the components (Box, Label,
   flash, Subhead, UnderlineNav, btn, Toast, blankslate, Progress, form-control, dropdown). This file
   only lays out the hub's own screens. It defines no colours: every colour is a Primer token, so each
   theme a person picks in Preferences works on every screen. One radius (Primer's medium, 6px). */

:root { --fontStack-sansSerif: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif; }
body { font-family: var(--fontStack-sansSerif); -webkit-font-smoothing: antialiased; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--bgColor-accent-emphasis); }
.num, .tile-value, .hero-figure, .table td.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus-outlineColor, var(--fgColor-accent)); outline-offset: -2px; }
.skip-link { position: absolute; left: var(--base-size-16); top: -48px; z-index: 100; padding: var(--base-size-8) var(--base-size-12);
  background: var(--bgColor-default); border: var(--borderWidth-thin) solid var(--borderColor-default); border-radius: var(--borderRadius-medium); }
.skip-link:focus { top: var(--base-size-8); }

/* ---------- shell: the header (GitHub's global bar + underline nav) and the page ---------- */
.app-header { background: var(--bgColor-inset); }
.app-header-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--base-size-16);
  height: 56px; padding: 0 var(--base-size-24); }
.app-brand { display: inline-flex; align-items: center; gap: var(--base-size-8); color: var(--fgColor-default); font-weight: 600; font-size: 15px; }
.app-brand:hover { text-decoration: none; }
.app-mark { width: 22px; height: 22px; border-radius: var(--borderRadius-medium); background: var(--bgColor-severe-emphasis);
  box-shadow: inset 0 0 0 5px var(--bgColor-severe-emphasis), inset 0 0 0 11px var(--fgColor-onEmphasis); }
.app-header-right { display: flex; align-items: center; gap: var(--base-size-8); }
.app-nav { background: var(--bgColor-inset); }
.app-nav .UnderlineNav-body { width: 100%; padding: 0 var(--base-size-16); overflow-x: auto; scrollbar-width: none; }
.app-nav .UnderlineNav-body::-webkit-scrollbar { display: none; }
.app-main { padding: var(--base-size-24) var(--base-size-24) var(--base-size-64); }
.app-main:focus { outline: 0; }
@media (max-width: 767px) {
  .app-header-bar { padding: 0 var(--base-size-16); }
  .app-main { padding: var(--base-size-16) var(--base-size-16) var(--base-size-48); }
}
body.laplace-full .app-header { display: none; }
body[data-auth="pending"] .app-nav, body[data-auth="out"] .app-nav { display: none; }

/* who's signed in: a Primer dropdown */
.who-summary { display: inline-flex; align-items: center; gap: var(--base-size-8); padding: var(--base-size-4) var(--base-size-8);
  border-radius: var(--borderRadius-medium); color: var(--fgColor-default); font-weight: 500; cursor: pointer; list-style: none; }
.who-summary::-webkit-details-marker { display: none; }
.who-summary:hover { background: var(--control-transparent-bgColor-hover); text-decoration: none; }
.who-avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--bgColor-default); box-shadow: inset 0 0 0 1px var(--borderColor-default); color: var(--fgColor-muted); }
.who-menu .dropdown-menu { width: 240px; top: calc(100% + 4px); }
.who-menu .dropdown-item { display: flex; align-items: center; gap: var(--base-size-8); width: 100%; text-align: left; }
.who-menu .dropdown-item:hover .octicon { color: inherit; }
@media (max-width: 543px) { .who-name { display: none; } }

/* ---------- page structure ---------- */
.page-head { margin-bottom: var(--base-size-24); }
.page-head .Subhead-heading { font-size: var(--text-title-size-medium, 20px); font-weight: 600; }
.head-actions { display: flex; align-items: center; gap: var(--base-size-8); flex-wrap: wrap; }
.section { margin-top: var(--base-size-32); }
.section:first-child, .page-head + .section { margin-top: 0; }
.section-head { margin-bottom: var(--base-size-12); }
.section-head h2 { margin: 0; }
.section-head .meta { margin: 2px 0 0; max-width: 72ch; }
.meta { color: var(--fgColor-muted); font-size: 12px; }
p.meta { margin: 0; }
.note { color: var(--fgColor-muted); font-size: 12px; margin: var(--base-size-4) 0 0; }

/* Primer components, as the hub uses them */
.flash.callout { display: flex; align-items: flex-start; gap: var(--base-size-12); }
.flash.callout > .octicon { margin: 2px 0 0; flex: none; }
.flash.callout .callout-body { flex: 1; min-width: 0; }
.flash.callout .callout-body > strong { display: block; }
.flash.callout .callout-body p { margin: 2px 0 0; }
.flash.callout .flash-action { order: 3; margin: 0; display: flex; gap: var(--base-size-8); flex-wrap: wrap; }
.flash + .flash { margin-top: var(--base-size-8); }
.flash + .kpis, .kpis + .flash, .flash + .Box { margin-top: var(--base-size-16); }
.blankslate.empty { border: var(--borderWidth-thin) dashed var(--borderColor-default); border-radius: var(--borderRadius-medium); }
.blankslate > strong { display: block; font-size: 16px; font-weight: 600; margin-bottom: var(--base-size-4); color: var(--fgColor-default); }
.blankslate { color: var(--fgColor-muted); }
.blankslate-heading { color: var(--fgColor-default); }
.tile-sub .Label { white-space: normal; text-align: left; }
.Label { font-weight: 500; }
.Progress.meter { height: 6px; }
.Box.p-3 > h3:first-child, .Box > .run-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.form-control, .form-select { max-width: 100%; }
.field > .form-control, .field > .form-select, .field > textarea, .auth-form .form-control { width: 100%; }
textarea.form-control { min-height: 64px; line-height: 1.5; }
.btn .octicon, .btn-link .octicon { vertical-align: text-bottom; }
code, kbd, pre { font-family: var(--fontStack-monospace); }
kbd { display: inline-block; padding: 0 5px; font-size: 11px; line-height: 18px; color: var(--fgColor-default); vertical-align: middle;
  background: var(--bgColor-muted); border: var(--borderWidth-thin) solid var(--borderColor-default); border-bottom-width: 2px; border-radius: var(--borderRadius-medium); }

/* toasts (Primer Toast) and dialogs (on Primer's overlay tokens) */
.app-toasts { position: fixed; left: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.app-toasts .Toast { pointer-events: auto; margin: 0 var(--base-size-16) var(--base-size-16); }
dialog { border: 0; padding: 0; max-width: min(520px, calc(100vw - 32px)); width: 100%; color: var(--fgColor-default);
  background: var(--overlay-bgColor, var(--bgColor-default)); border-radius: var(--borderRadius-large);
  box-shadow: var(--shadow-floating-large), inset 0 0 0 1px var(--overlay-borderColor, var(--borderColor-default)); }
dialog::backdrop { background: var(--overlay-backdrop-bgColor, rgba(1, 4, 9, 0.4)); }
dialog > form, dialog > div { padding: var(--base-size-16); }
dialog h2, .app-dialog-title { margin: 0 0 var(--base-size-8); font-size: 16px; font-weight: 600; }
dialog p { margin: 0 0 var(--base-size-12); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--base-size-8); margin-top: var(--base-size-16); }

/* segmented control: Primer's SegmentedControl, on its control-track tokens */
.seg { display: inline-flex; flex-wrap: wrap; padding: 0; gap: 0; background: var(--controlTrack-bgColor-rest); border-radius: var(--borderRadius-medium);
  border: var(--borderWidth-thin) solid var(--controlTrack-borderColor-rest, transparent); }
.seg a, .seg button { display: inline-flex; align-items: center; gap: var(--base-size-6); padding: 0 var(--base-size-12); height: 30px;
  border: 0; border-radius: var(--borderRadius-medium); background: transparent; color: var(--fgColor-default); font: inherit; font-size: 13px;
  cursor: pointer; text-decoration: none; white-space: nowrap; }
.seg a:hover, .seg button:hover { background: var(--controlTrack-bgColor-hover); text-decoration: none; }
.seg [aria-current="page"], .seg [aria-pressed="true"] { background: var(--controlKnob-bgColor-rest); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--controlKnob-borderColor-rest); }
.seg .count { margin-left: var(--base-size-4); }
.seg-sm a, .seg-sm button { height: 26px; font-size: 12px; padding: 0 var(--base-size-8); }

/* section tabs inside a page: Primer's UnderlineNav */
.tabs-nav { margin-bottom: var(--base-size-16); }
.tabs-nav .UnderlineNav-body { overflow-x: auto; scrollbar-width: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- the hub's own screens ---------- */


*, *::before, *::after { box-sizing: border-box; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pad { padding: 20px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }

/* ---------- stat tiles & meters: one strip with hairline dividers, not a row of boxes ---------- */
.kpis {
  display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  background: var(--bgColor-default); border: 1px solid var(--borderColor-muted); border-radius: var(--borderRadius-medium); overflow: hidden;
}
.kpis + .kpis { margin-top: 14px; }
.kpis > .tile { border: 0; border-radius: 0; box-shadow: none; background: transparent; box-shadow: -1px 0 0 var(--borderColor-muted), 0 -1px 0 var(--borderColor-muted); }
.tile { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; color: inherit; }
a.tile:hover { background: var(--bgColor-muted); }
.tile-label { color: var(--fgColor-muted); font-size: 12.5px; font-weight: 520; display: flex; align-items: center; gap: 8px; }
.tile-value { font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile-sub { color: var(--fgColor-muted); font-size: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field:has(> input[type="checkbox"]) { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; }
.field > input[type="checkbox"] { width: 17px; height: 17px; margin: 0; flex: none; accent-color: var(--fgColor-default); }
.field:has(> input[type="checkbox"]) .field-label { font-size: 13px; color: var(--fgColor-default); }
.field-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fgColor-muted); font-weight: 550; }
.counter { color: var(--fgColor-muted); font-weight: 400; font-variant-numeric: tabular-nums; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; }
.switch input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 36px; height: 21px; border-radius: 999px; position: relative; cursor: pointer;
  background: var(--bgColor-neutral-muted); border: 1px solid var(--borderColor-default); transition: background 0.2s var(--base-easing-easeOut);
}
.switch input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: #fdfdfc; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.2s var(--base-easing-easeOut);
}
.switch input:checked { background: var(--fgColor-default); border-color: transparent; }
.switch input:checked::after { transform: translateX(15px); background: var(--bgColor-default); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--fgColor-muted); }
.check input { width: 16px; height: 16px; accent-color: var(--fgColor-default); margin: 0; }
.code-wrap { position: relative; }
pre.code {
  margin: 0; padding: 12px 14px; padding-right: 64px; overflow-x: auto;
  font: 12.5px/1.6 var(--fontStack-monospace); background: var(--bgColor-muted); border: 1px solid var(--borderColor-muted); border-radius: var(--borderRadius-medium); white-space: pre;
}
.code-wrap .btn { position: absolute; top: 7px; right: 7px; }

/* ---------- hub ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--fgColor-muted); font-weight: 560; font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--borderColor-muted); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--borderColor-muted); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .meter { min-width: 90px; }
.card > .table-wrap { padding: 4px 6px; }

/* ---------- ClipNet ---------- */
.clips { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 580px), 1fr)); }
.clip { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 14px; transition: opacity 0.2s; }
.clip.is-busy { opacity: 0.6; pointer-events: none; }
.clip:focus-visible { outline-offset: 3px; border-radius: var(--borderRadius-medium); }
.review-keys kbd { font-size: 11px; }
@media (hover: none) { .review-keys { display: none; } }
.clip-media { display: flex; flex-direction: column; gap: 8px; }
.clip-video, .clip-missing { width: 100%; aspect-ratio: 9 / 16; border-radius: var(--borderRadius-medium); display: block; }
.clip-video { background: var(--bgColor-emphasis); object-fit: contain; }
.clip-missing { display: grid; place-items: center; text-align: center; padding: 12px; font-size: 12px; color: var(--fgColor-muted); background: var(--bgColor-muted); }
.clip-body { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.clip-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clip-head .meta { margin-left: auto; }
.platforms { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--borderColor-muted); padding-top: 11px; }
.plat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.plat-name { font-weight: 620; min-width: 76px; white-space: nowrap; }
.plat-route { color: var(--fgColor-muted); font-size: 12px; white-space: nowrap; }
.plat .grow { flex: 1; }
.plat-err {
  flex-basis: 100%; font: 12px/1.5 var(--fontStack-monospace); color: var(--fgColor-muted);
  background: var(--bgColor-muted); border-radius: var(--borderRadius-medium); padding: 7px 9px; overflow-wrap: anywhere;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 2px; }
.actions .spacer { flex: 1; }

.account { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.account-head { display: flex; align-items: center; gap: 10px; }
.account-head h3 { font-size: 16px; font-weight: 650; flex: 1; }
.account .reason { font-size: 12.5px; color: var(--fgColor-muted); background: var(--bgColor-muted); padding: 8px 10px; border-radius: var(--borderRadius-medium); overflow-wrap: anywhere; }
.check-results { display: flex; flex-direction: column; gap: 6px; }
.check-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; }
.check-detail { color: var(--fgColor-muted); overflow-wrap: anywhere; }

.activity { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel h3 { font-size: 15px; font-weight: 650; }
.panel p { margin: 0; color: var(--fgColor-muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.run-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.run-head .meta { margin-left: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.log {
  font: 12px/1.6 var(--fontStack-monospace); background: var(--bgColor-muted); border-radius: var(--borderRadius-medium);
  padding: 8px 0; max-height: 440px; overflow: auto;
}
.log-sm { max-height: 260px; }
.log-line { padding: 0 12px 0 10px; border-left: 3px solid transparent; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fgColor-muted); }
.log-line.l-WARNING { border-left-color: var(--fgColor-attention); color: var(--fgColor-default); }
.log-line.l-ERROR, .log-line.l-CRITICAL { border-left-color: var(--fgColor-danger); color: var(--fgColor-default); }
.log-empty { padding: 10px 12px; color: var(--fgColor-muted); }

.engine { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.engine-rows { display: flex; flex-direction: column; gap: 8px; }
.engine-row {
  display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--borderColor-muted); border-radius: var(--borderRadius-medium);
}
.engine-row.is-current { border-color: color-mix(in srgb, var(--fgColor-accent) 45%, var(--borderColor-muted)); }
.engine-name { font-weight: 620; display: flex; align-items: center; gap: 8px; min-width: 150px; }
.engine-row .check-detail { flex-basis: 100%; font-size: 12.5px; }
.engine-row .btn { margin-left: auto; }

/* ---------- access page ---------- */
.person { display: flex; align-items: center; gap: 10px; }
.row-end { justify-content: flex-end; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--borderColor-muted); }
.add-row input { flex: 1 1 240px; width: auto; }
.role-head { display: flex; align-items: center; gap: 10px; }
.role-head input { flex: 1; font-weight: 620; }
.perm-group { border: 1px solid var(--borderColor-muted); border-radius: var(--borderRadius-medium); padding: 8px 12px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.perm-group legend { font-size: 12px; color: var(--fgColor-muted); font-weight: 600; padding: 0 4px; }
.check.perm { color: var(--fgColor-default); }
.table select { min-width: 170px; }

input[type="file"] { font: inherit; color: var(--fgColor-muted); max-width: 100%; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 560; margin-right: 10px; padding: 6px 12px; border-radius: var(--borderRadius-medium); cursor: pointer;
  border: 1px solid var(--borderColor-default); background: var(--bgColor-default); color: var(--fgColor-default);
}
.upload-meter { height: 8px; }

.reason-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; }
.check.reason { color: var(--fgColor-default); font-size: 13.5px; }
.reject-why { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-basis: 100%; }

/* ---------- Jarvis ---------- */
.jarvis-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.chat { min-height: 520px; }
.chat .run-head .btn { margin-left: auto; }
.chat-list { display: flex; flex-direction: column; gap: 10px; min-height: 300px; max-height: 58vh; overflow-y: auto; padding: 4px 2px; }
.chat-empty { color: var(--fgColor-muted); margin: auto; text-align: center; max-width: 34ch; }
.bubble { max-width: 86%; padding: 10px 13px; border-radius: var(--borderRadius-medium); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.you { align-self: flex-end; background: var(--bgColor-accent-emphasis); color: var(--fgColor-onEmphasis); border-bottom-right-radius: 4px; }
.bubble.you .bubble-meta { color: var(--fgColor-onEmphasis); opacity: 0.75; }
.bubble.jarvis { align-self: flex-start; background: var(--bgColor-muted); border-bottom-left-radius: 4px; }
.bubble.pending .bubble-text { color: var(--fgColor-muted); animation: pulse 1.6s ease-in-out infinite; }
.bubble.error { border: 1px solid var(--fgColor-danger); }
.bubble-meta { margin-top: 5px; font-size: 11.5px; color: var(--fgColor-muted); }
.proposal, .strategy { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--borderColor-muted); }
.proposal:first-of-type, .strategy:first-of-type { border-top: 0; }
.proposal p { margin: 0; color: var(--fgColor-muted); }
.strategy .run-head .btn { margin-left: auto; }
.review-text { white-space: pre-wrap; color: var(--fgColor-muted); line-height: 1.5; }
.form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .jarvis-layout { grid-template-columns: 1fr; } .chat-list { max-height: 50vh; } }

/* ---------- Laplace ---------- */
main:has(> .laplace) { padding-bottom: 16px; }
.laplace { display: flex; flex-direction: column; gap: 10px; height: calc(100dvh - 106px); min-height: 440px; padding: 14px 16px; }
.laplace-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.laplace-avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--borderColor-muted); }
.laplace-title { display: flex; flex-direction: column; min-width: 0; }
.laplace-title h2 { margin: 0; font-size: 18px; }
.laplace-tools { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.laplace-tools input[type="search"] { width: min(280px, 60vw); font: inherit; color: var(--fgColor-default); background: var(--bgColor-default);
  border: 1px solid var(--borderColor-default); border-radius: var(--borderRadius-medium); padding: 6px 10px; }
.laplace-list, .laplace-results { flex: 1; min-height: 0; max-height: none; }
.laplace-results { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.laplace-hit { display: flex; flex-direction: column; gap: 3px; text-align: left; font: inherit; color: var(--fgColor-default);
  background: var(--bgColor-muted); border: 1px solid transparent; border-radius: var(--borderRadius-medium); padding: 9px 12px; cursor: pointer; }
.laplace-hit:hover, .laplace-hit:focus-visible { border-color: var(--fgColor-accent); }
.laplace-hit mark { background: var(--bgColor-accent-muted); color: inherit; border-radius: 3px; padding: 0 2px; }
.laplace-day { align-self: center; font-size: 12px; color: var(--fgColor-muted); padding: 6px 0 2px; }
.laplace-earlier { align-self: center; }
.laplace-banner { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fgColor-muted);
  background: var(--bgColor-accent-muted); border-radius: var(--borderRadius-medium); padding: 6px 10px; }
.laplace-banner .btn { margin-left: auto; }
.bubble.found { outline: 2px solid var(--fgColor-accent); outline-offset: 2px; }
.laplace-tabs { margin-bottom: 12px; }
.laplace-tabs + .laplace { height: calc(100dvh - 180px); }
body.laplace-full .laplace-tabs { display: none; }
.laplace-marker { align-self: stretch; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--fgColor-muted); }
.laplace-marker::before, .laplace-marker::after { content: ""; flex: 1; border-top: 1px dashed var(--borderColor-default); }
.laplace-compose { display: flex; flex-direction: column; gap: 8px; }
.laplace-compose textarea { resize: vertical; min-height: 52px; }
.laplace-private { margin-left: auto; }
body.laplace-full .topbar { display: none; }
body.laplace-full .laplace { position: fixed; inset: 0; z-index: 40; height: 100dvh; border-radius: 0; border: 0;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
body.laplace-full .laplace-list, body.laplace-full .laplace-results, body.laplace-full .laplace-compose,
body.laplace-full .laplace-head, body.laplace-full .laplace-banner { width: 100%; max-width: 920px; margin-inline: auto; }
@media (max-width: 640px) {
  .laplace { height: calc(100dvh - 100px); padding: 10px; }
  .laplace-tools { margin-left: 0; width: 100%; }
  .laplace-tools input[type="search"] { flex: 1; width: auto; }
  .laplace-private { display: none; }
}

/* ---------- sign-in screens ---------- */
body[data-auth="out"] .nav, body[data-auth="out"] .whoami,
body[data-auth="pending"] .nav { display: none; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form h2 { font-size: 17px; margin: 0; }
.auth-form p { margin: 0; color: var(--fgColor-muted); }
.auth-alt { margin: 0; text-align: center; color: var(--fgColor-muted); }
.auth-note { margin: 0; font-size: 12px; color: var(--fgColor-muted); text-align: center; }
.google-btn { gap: 10px; background: var(--bgColor-default); }
.or { display: flex; align-items: center; gap: 10px; color: var(--fgColor-muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--borderColor-default); }
.form-error { color: var(--fgColor-danger); font-size: 13px; min-height: 0; }
.form-error:empty { display: none; }
@keyframes pulse { 50% { opacity: 0.3; } }
.card.attention { border-color: color-mix(in srgb, var(--fgColor-attention) 55%, var(--borderColor-muted)); }
.add-hint { margin: 0; padding: 0 16px 14px; color: var(--fgColor-muted); font-size: 12.5px; }

/* ---------- loading ---------- */
.skeleton {
  height: 92px; border-radius: var(--borderRadius-medium);
  background: linear-gradient(90deg, var(--bgColor-muted) 0%, var(--bgColor-neutral-muted) 50%, var(--bgColor-muted) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite;
}
.skeleton.tall { height: 360px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .activity { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; gap: 12px; }
  .who-name { display: none; }
  .nav a { padding: 6px 9px; }
  main { padding: 18px 16px 56px; }
  .page-head h1 { font-size: 21px; }
  .clip { grid-template-columns: 1fr; }
  .clip-media { max-width: 260px; margin: 0 auto; width: 100%; }
  .tile-value { font-size: 23px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 13px; }
}

/* ---------- performance ---------- */
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.perf.refetching { opacity: 0.55; transition: opacity 0.2s; }
/* the cockpit: one bento panel, the net figure large on the left, the stats in a hairline grid beside it */
.perf-hero { padding: 0; display: grid; gap: 0; grid-template-columns: minmax(240px, 0.9fr) 2fr; align-items: stretch; overflow: hidden; }
.perf-hero-main { padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  }
.hero-figure { font-size: 56px; font-weight: 600; letter-spacing: -0.045em; line-height: 1; margin: 10px 0 8px; font-variant-numeric: tabular-nums; }
.hero-figure.neg { color: var(--fgColor-danger); }
.perf-hero-sub { color: var(--fgColor-muted); font-size: 13px; }
.perf-hero .kpis.perf-kpis { border: 0; border-radius: 0; background: transparent; box-shadow: -1px 0 0 var(--borderColor-muted);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile.stat { background: transparent; border-radius: 0; }
.tile.stat .tile-value { font-size: 22px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .perf-hero { grid-template-columns: 1fr; }
  .perf-hero .kpis.perf-kpis { box-shadow: 0 -1px 0 var(--borderColor-muted); }
  .hero-figure { font-size: 44px; }
}
.delta { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.good { color: var(--fgColor-success); }
.delta.bad { color: var(--fgColor-danger); }
.delta.flat { color: var(--fgColor-muted); font-weight: 500; }
.delta-vs { color: var(--fgColor-muted); font-weight: 450; }
.perf-charts { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); margin: 14px 0; align-items: stretch; }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; position: relative; }
.donut-wrap svg { flex: none; }
.donut-seg { transition: stroke-width 0.12s; cursor: default; outline: none; }
.donut-seg.on, .donut-seg:focus-visible { stroke-width: 26px; }
.donut-total { font-size: 20px; font-weight: 650; fill: var(--fgColor-default); }
.donut-label { font-size: 11.5px; fill: var(--fgColor-muted); }
.legend-table { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 7px 10px; align-items: center; font-size: 13px; flex: 1; min-width: 180px; }
.legend-row { display: contents; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.legend-name { color: var(--fgColor-default); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-value { font-variant-numeric: tabular-nums; color: var(--fgColor-default); text-align: right; }
.legend-pct { font-variant-numeric: tabular-nums; color: var(--fgColor-muted); text-align: right; min-width: 3ch; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--fgColor-muted); margin-bottom: 6px; }
.legend-inline > span { display: inline-flex; align-items: center; gap: 6px; }
.viz { position: relative; width: 100%; min-height: 230px; }
.viz svg { display: block; overflow: visible; }
.viz-grid { stroke: var(--borderColor-muted); stroke-width: 1; }
.viz-base { stroke: var(--borderColor-default); stroke-width: 1; }
.viz-axis { fill: var(--fgColor-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-col { transition: opacity 0.12s; }
.viz-col.dim { opacity: 0.4; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--bgColor-default); border: 1px solid var(--borderColor-default);
  border-radius: var(--borderRadius-medium); padding: 8px 10px; box-shadow: var(--shadow-floating-large); font-size: 12.5px; min-width: 140px; }
.viz-tip-title { color: var(--fgColor-muted); font-size: 12px; margin-bottom: 4px; }
.viz-tip-row { display: grid; grid-template-columns: 12px auto 1fr; gap: 8px; align-items: center; }
.viz-tip-row strong { font-variant-numeric: tabular-nums; }
.viz-tip-row span:last-child { color: var(--fgColor-muted); }
.viz-key { width: 12px; height: 2px; border-radius: 1px; }
.viz-key.blank { background: transparent; }
.spark-line { stroke: var(--data-gray-color-emphasis); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-dot { stroke: var(--bgColor-default); stroke-width: 2; }
.product-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.product-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.product-card.status-idea { background: transparent; border-style: dashed; }
.product-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-head h3 { margin: 0; font-size: 15px; }
.product-head .btn { margin-left: auto; }
.product-desc { margin: 0; color: var(--fgColor-muted); font-size: 13.5px; line-height: 1.45; }
.product-stats { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.product-value { font-size: 19px; font-weight: 620; font-variant-numeric: tabular-nums; }
.product-spark { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.product-next { font-size: 13px; color: var(--fgColor-muted); }
.product-links { display: flex; gap: 14px; font-size: 13px; }
.perf-tables { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); margin-top: 18px; align-items: start; }
.perf-tables .run-head .btn { margin-left: auto; }
.perf-tables h4 { margin: 14px 0 6px; font-size: 13px; color: var(--fgColor-muted); }
.cell-key { display: inline-flex; align-items: center; gap: 7px; }
.table-empty { padding: 6px 2px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--fgColor-muted); font-size: 13.5px; line-height: 1.45; }
.service-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-bottom: 18px; }
.service-card p { color: var(--fgColor-muted); margin: 6px 0 10px; font-size: 13.5px; }
@media (max-width: 900px) {
  .perf-hero, .perf-charts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero-figure { font-size: 44px; }
  .product-stats { grid-template-columns: 1fr 1fr; }
  .product-spark { grid-column: 1 / -1; align-items: flex-start; }
}

/* ---------- product pages & playbooks ---------- */
.strong-link { font-weight: 600; }
.product-progress { display: flex; align-items: center; gap: 10px; }
.product-progress .meter { flex: 1; height: 6px; }
.product-page .lead { font-size: 15px; color: var(--fgColor-muted); max-width: 75ch; line-height: 1.55; margin: 0 0 14px; }
.product-page .kpis { margin-bottom: 14px; }
.playbook-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin: 14px 0; align-items: start; }
.plain-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--fgColor-muted); line-height: 1.45; }
.plain-list.ticks { list-style: none; padding-left: 0; }
.plain-list.ticks li::before { content: "✓"; color: var(--fgColor-success); font-weight: 700; margin-right: 8px; }
.plain-list.warns { list-style: none; padding-left: 0; }
.plain-list.warns li::before { content: "▲"; color: var(--fgColor-attention); font-size: 11px; margin-right: 8px; }
.checklist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: step; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 8px 6px; border-radius: var(--borderRadius-medium); counter-increment: step; }
.checklist li:hover { background: var(--bgColor-muted); }
.checklist input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--fgColor-accent); }
.checklist label { line-height: 1.45; cursor: pointer; }
.checklist label::before { content: counter(step) ". "; color: var(--fgColor-muted); font-variant-numeric: tabular-nums; }
.checklist li.done label { color: var(--fgColor-muted); text-decoration: line-through; }
.where-list { display: grid; gap: 4px; }
.where-item { padding: 8px 0; border-top: 1px solid var(--borderColor-muted); }
.where-item:first-child { border-top: 0; }
.where-item p { margin: 4px 0 0; color: var(--fgColor-muted); font-size: 13.5px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; }
.fact { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.service-card .strong-link { font-size: 13px; }

/* ---------- Laplace conversation mode ---------- */
.convo { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(circle at 50% 38%, var(--bgColor-muted), var(--bgColor-default) 70%); color: var(--fgColor-default);
  padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); }
.convo-top { width: 100%; max-width: 720px; display: flex; justify-content: center; }
.convo-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  width: 100%; max-width: 640px; text-align: center; }
.convo-orb { position: relative; width: 168px; height: 168px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.convo-orb img { position: relative; width: 168px; height: 168px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px var(--borderColor-muted); }
.convo-ring { position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, transparent 58%, var(--fgColor-accent) 60%, transparent 72%);
  opacity: 0.55; transition: transform 0.08s linear; }
.convo[data-mode="thinking"] .convo-ring { animation: convo-spin 1.4s linear infinite; background: conic-gradient(var(--fgColor-accent), transparent 60%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%); mask: radial-gradient(circle, transparent 62%, #000 63%); }
.convo[data-mode="speaking"] .convo-ring { animation: convo-pulse 1.1s ease-in-out infinite; }
.convo[data-mode="muted"] .convo-ring { opacity: 0.12; }
@keyframes convo-spin { to { transform: rotate(360deg); } }
@keyframes convo-pulse { 50% { transform: scale(1.12); opacity: 0.8; } }
.convo-state { font-size: 17px; font-weight: 600; min-height: 1.5em; }
.convo-you { margin: 0; color: var(--fgColor-muted); font-size: 14px; min-height: 1.4em; }
.convo-you:not(:empty)::before { content: "You: "; }
.convo-reply { margin: 0; font-size: 19px; line-height: 1.5; max-width: 34em; min-height: 1.5em; }
.convo-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; max-width: 640px; }
.convo-hint { flex-basis: 100%; text-align: center; }

/* ---------- idea debates ---------- */
.debate { margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.debate .run-head .btn { margin-left: auto; }
.debate.kept { border-left: 3px solid var(--fgColor-success); }
.debate.scrapped { border-left: 3px solid var(--fgColor-danger); }
.debate p { margin: 0; color: var(--fgColor-muted); line-height: 1.5; }
.debate h4 { margin: 6px 0 4px; font-size: 13px; color: var(--fgColor-muted); }
.debate-verdict { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.debate-decision { font-size: 24px; font-weight: 650; }
.debate.kept .debate-decision { color: var(--fgColor-success); }
.debate.scrapped .debate-decision { color: var(--fgColor-danger); }
.kill { font-size: 13.5px; color: var(--fgColor-muted); background: var(--bgColor-muted); border-radius: var(--borderRadius-medium); padding: 8px 10px; }
.debate-transcript summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.debate-turn { border-left: 3px solid var(--borderColor-default); padding: 6px 12px; margin: 8px 0; }
.debate-turn.advocate { border-left-color: var(--data-green-color-emphasis); }
.debate-turn.critic { border-left-color: var(--data-orange-color-emphasis); }
.debate-role { font-size: 12px; font-weight: 650; color: var(--fgColor-muted); margin-bottom: 4px; }
.debate-text { white-space: pre-wrap; font-size: 13px; line-height: 1.5; color: var(--fgColor-default); overflow-wrap: anywhere; }
details.scrapped { margin-top: 14px; }
details.scrapped > summary { cursor: pointer; color: var(--fgColor-muted); font-weight: 600; margin-bottom: 10px; }

/* ---------- ClipNet → Whop ---------- */
.whop-intro { max-width: 80ch; line-height: 1.5; margin: 0 0 12px; }
.whop-card { display: flex; flex-direction: column; gap: 10px; }
.whop-card .run-head { flex-wrap: wrap; gap: 8px; }
.whop-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--borderColor-muted); }
.whop-row .row { margin-left: auto; }
.whop-row.done { opacity: 0.75; }
.whop-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.whop-main a, .whop-main strong { overflow-wrap: anywhere; }
.whop-link-edit { display: flex; gap: 8px; flex: 1 1 320px; }
.whop-link-edit input { flex: 1; font: inherit; color: var(--fgColor-default); background: var(--bgColor-default); border: 1px solid var(--borderColor-default); border-radius: var(--borderRadius-medium); padding: 6px 10px; }
.whop-top { margin-bottom: 14px; }

/* --- gates: dated kill tests */
.gate-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.gate-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.gate-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gate-head h3 { margin: 2px 0 0; font-size: 1rem; }
.gate-when { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.gate-meter { position: relative; height: 8px; overflow: visible; }
.gate-meter > span { border-radius: 4px; }
.gate-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--fgColor-muted); border-radius: 1px; }
.gate-figures { font-size: .95rem; }
.gate-rule { margin: 0; color: var(--fgColor-muted); font-size: .9rem; }
.gate-says { margin: 0; font-size: .9rem; font-weight: 600; }
.gate-says.s-critical { color: var(--fgColor-danger); }
.gate-says.s-good { color: var(--fgColor-default); }
.gate-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gate-failed, .gate-passed { opacity: .85; }

/* --- ClipNet → By hand */
.hand-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.hand-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.hand-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hand-video { width: 100%; max-height: 420px; border-radius: var(--borderRadius-medium); background: var(--bgColor-emphasis); object-fit: contain; }
.hand-caption { margin: 0; white-space: pre-wrap; font-size: .92rem; color: var(--fgColor-muted); }
.hand-link { display: flex; gap: 8px; }
.hand-link input { flex: 1; min-width: 0; }
.hand-reading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borderColor-muted); }
.hand-reading:last-child { border-bottom: 0; }
.hand-reading .hand-link input { width: 110px; flex: none; }
.hand-reading > input { width: 110px; flex: none; }
.readings-form { display: flex; flex-direction: column; gap: 4px; }
.reading-group h3 { margin: 10px 0 0; font-size: 12px; font-weight: 600; color: var(--fgColor-muted); }
.reading-group:first-child h3 { margin-top: 0; }
.readings-form > .row { padding-top: 10px; }
.probe .probe-platforms { display: grid; gap: 6px; margin-top: 12px; }
.probe-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }

/* --- Sales: podcast outreach */
.outreach-find { display: flex; flex-wrap: wrap; gap: 8px; }
.outreach-find input { flex: 1 1 240px; min-width: 0; }
.outreach-stages { justify-content: space-between; align-items: center; margin: 12px 0; }
.prospect-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.prospect { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.prospect-head { display: flex; gap: 12px; align-items: flex-start; }
.prospect-head h3 { margin: 0; font-size: 1rem; }
.prospect-head .pill { margin-left: auto; flex-shrink: 0; }
.prospect-art { width: 56px; height: 56px; border-radius: var(--borderRadius-medium); object-fit: cover; flex-shrink: 0; }
.prospect-samples { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prospect-samples figure { margin: 0; }
.prospect-samples video { width: 100%; max-height: 300px; border-radius: var(--borderRadius-medium); background: var(--bgColor-emphasis); }
.prospect-email { display: flex; flex-direction: column; gap: 6px; }
.prospect-email input, .prospect-email textarea { width: 100%; }
.prospect-actions { flex-wrap: wrap; }

/* --- Sales: audit calls */
.lead { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.lead textarea, .lead input[type=text] { width: 100%; }
.lead-decision { margin: 0; font-size: .92rem; }
.lead-audit pre { white-space: pre-wrap; max-height: 420px; overflow: auto; }

.share-line { gap: 10px; align-items: center; margin-top: 6px; }
.share-line .btn { margin-left: auto; }
.autopilot .row { justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.autopilot-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.autopilot-actions { gap: 8px; }
.health-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.health-row { display: grid; grid-template-columns: 5.5rem 1fr; gap: 12px; align-items: start; }
.health-row .pill { justify-self: start; }
.health-fix { color: var(--fgColor-muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.health-fix code { font-family: var(--fontStack-monospace); font-size: 12px; background: var(--bgColor-muted); padding: 1px 5px; border-radius: 5px; }
.health-all { margin-top: 12px; }
.health-all summary { cursor: pointer; color: var(--fgColor-muted); }
.health-ok { border-color: var(--borderColor-muted); }
.learn-toggles { gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.learn-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.learn-table td.num, .learn-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.learn-table .lead-row td { font-weight: 600; }
.teaser-row { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 10px 12px; border-radius: var(--borderRadius-medium); background: var(--bgColor-muted); }
.mail-app { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.mail-app select { padding-top: 4px; padding-bottom: 4px; font-size: 12.5px; }
.kpis + *, .flash + .kpis { margin-top: var(--base-size-16); }
.autopilot + section, .card.panel + .section { margin-top: 36px; }

/* ---------- rows in a Box (GitHub's list pattern): icon, title + one line, then status and actions ---------- */
.Box-header { display: flex; align-items: center; gap: var(--base-size-8); flex-wrap: wrap; padding: var(--base-size-12) var(--base-size-16); }
.Box-header .Box-title { margin: 0; font-size: 14px; font-weight: 600; }
.Box-header > .meta:last-child, .box-header-link { margin-left: auto; }
.box-header-link { display: inline-flex; align-items: center; gap: var(--base-size-4); font-size: 12px; }
.Box-row { display: flex; align-items: center; gap: var(--base-size-12) var(--base-size-16); flex-wrap: wrap; padding: var(--base-size-12) var(--base-size-16); }
.row-main { display: flex; align-items: center; gap: var(--base-size-12); flex: 1 1 260px; min-width: 0; }
.row-text { min-width: 0; flex: 1; }
.row-title { display: flex; align-items: center; gap: var(--base-size-8); flex-wrap: wrap; font-weight: 600; }
.row-title-link { display: inline-flex; align-items: center; gap: var(--base-size-4); }
.row-title-link .ext { color: var(--fgColor-muted); width: 12px; height: 12px; }
.row-text > .meta { margin-top: 2px; overflow-wrap: anywhere; }
.row-aside, .row-actions { display: flex; align-items: center; gap: var(--base-size-12); flex-wrap: wrap; margin-left: auto; }
.row-actions { gap: var(--base-size-8); }
.row-icon { width: 32px; height: 32px; flex: none; display: inline-grid; place-items: center; color: var(--fgColor-muted);
  border-radius: var(--borderRadius-medium); background: var(--bgColor-muted); box-shadow: inset 0 0 0 1px var(--borderColor-muted); }
.Box-header .row-icon { width: 24px; height: 24px; background: transparent; box-shadow: none; }
.svc-logo { width: 32px; height: 32px; flex: none; border-radius: var(--borderRadius-medium); background: var(--bgColor-muted);
  box-shadow: inset 0 0 0 1px var(--borderColor-muted); position: relative; }
.svc-logo::after { content: ""; position: absolute; inset: 8px; background: var(--fgColor-default);
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.svc-logo-img { width: 18px; height: 18px; }
[data-color-mode="dark"] .svc-logo-img { filter: invert(1); }
@media (prefers-color-scheme: dark) { [data-color-mode="auto"] .svc-logo-img { filter: invert(1); } }

/* the hub page */
.hub-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--base-size-24); align-items: start; }
.hub-main, .hub-side { display: flex; flex-direction: column; gap: var(--base-size-24); min-width: 0; }
@media (max-width: 1011px) { .hub-layout { grid-template-columns: 1fr; } }
.node-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.node-stat { padding: var(--base-size-16); display: flex; flex-direction: column; gap: var(--base-size-4); border-left: var(--borderWidth-thin) solid var(--borderColor-muted); }
.node-stat:first-child { border-left: 0; }
.node-stat-value { font-size: 24px; font-weight: 600; line-height: 1.25; }
.node-stat .Progress { margin: var(--base-size-4) 0; }
.device .row-title .Label { font-weight: 500; }
.guest.is-stopped .row-title { color: var(--fgColor-muted); }
.guest-links { display: inline-flex; gap: var(--base-size-8); margin-left: var(--base-size-4); }
.guest-metrics { display: grid; grid-template-columns: repeat(3, minmax(120px, 160px)); gap: var(--base-size-16); margin-left: auto; }
.metric { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--base-size-8); }
.storage-bar { width: 40%; }
@media (max-width: 767px) { .guest-metrics { grid-template-columns: 1fr; width: 100%; } .node-stat { border-left: 0; border-top: var(--borderWidth-thin) solid var(--borderColor-muted); } }

/* ClipNet: "Needs you" and the page tabs */
.needs-box { margin-bottom: var(--base-size-24); }
.need-icon { width: 32px; height: 32px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; }
.need-critical .need-icon { color: var(--fgColor-danger); background: var(--bgColor-danger-muted); }
.need-warning .need-icon { color: var(--fgColor-attention); background: var(--bgColor-attention-muted); }
.need-info .need-icon { color: var(--fgColor-accent); background: var(--bgColor-accent-muted); }
.need-good .need-icon { color: var(--fgColor-success); background: var(--bgColor-success-muted); }
.UnderlineNav-item .Counter { margin-left: var(--base-size-6); }
.tabs-nav + * { margin-top: 0; }
.clip-head { flex-wrap: nowrap; min-width: 0; }
.clip-campaign { color: var(--fgColor-muted); font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-when { margin-left: auto; white-space: nowrap; }

/* Preferences, Appearance: GitHub's theme cards. Each preview carries its theme's data-color-mode
   attributes, so it is drawn with that theme's own tokens. */
.theme-mode { margin: 0 0 var(--base-size-24); }
.theme-mode .form-group-header label { font-weight: 600; }
.theme-pickers { display: flex; flex-direction: column; gap: var(--base-size-24); }
.theme-picker.is-inactive .theme-grid { opacity: 0.6; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: var(--base-size-16); padding: var(--base-size-16); }
.theme-option { display: flex; flex-direction: column; cursor: pointer; overflow: hidden; border-radius: var(--borderRadius-medium);
  border: var(--borderWidth-thin) solid var(--borderColor-default); }
.theme-option:hover { border-color: var(--borderColor-emphasis); }
.theme-option:has(input:checked) { border-color: var(--borderColor-accent-emphasis); box-shadow: 0 0 0 1px var(--borderColor-accent-emphasis); }
.theme-option:has(input:focus-visible) { outline: 2px solid var(--focus-outlineColor); outline-offset: 2px; }
.theme-option-name { display: flex; align-items: center; gap: var(--base-size-8); padding: var(--base-size-8) var(--base-size-12);
  border-top: var(--borderWidth-thin) solid var(--borderColor-default); font-size: 13px; font-weight: 600; }
.theme-option-name input { margin: 0; }
.theme-preview { display: block; height: 104px; background: var(--bgColor-default); }
.theme-preview-bar { display: flex; align-items: center; height: 22px; padding: 0 var(--base-size-8); background: var(--bgColor-inset);
  border-bottom: var(--borderWidth-thin) solid var(--borderColor-default); }
.theme-preview-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--fgColor-default); }
.theme-preview-body { display: flex; flex-direction: column; gap: var(--base-size-8); padding: var(--base-size-12); }
.theme-preview-line { display: block; height: 6px; width: 78%; border-radius: 3px; background: var(--fgColor-muted); opacity: 0.5; }
.theme-preview-line.is-strong { width: 46%; background: var(--fgColor-default); opacity: 0.85; }
.theme-preview-row { display: flex; gap: var(--base-size-6); margin-top: var(--base-size-4); }
.theme-preview-btn { display: block; width: 46px; height: 16px; border-radius: 4px; background: var(--button-primary-bgColor-rest, var(--bgColor-success-emphasis)); }
.theme-preview-label { display: block; width: 36px; height: 16px; border-radius: 999px; border: var(--borderWidth-thin) solid var(--borderColor-accent-emphasis); }
.health-row > .Label { justify-self: start; }

/* people (Access): initials in Primer's avatar shape */
.person .avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 11px; font-weight: 600; color: var(--fgColor-muted); background: var(--bgColor-muted); box-shadow: inset 0 0 0 1px var(--borderColor-default); }
.ext { color: var(--fgColor-muted); vertical-align: -1px; }
.btn .ext { color: inherit; }
.delta .octicon { vertical-align: -2px; }

/* Studio */
.studio-services { margin-top: var(--base-size-24); }
.job-card { flex-wrap: wrap; }
.job-card > .plat-err, .job-card > .share-line, .job-card > .upload-meter { flex-basis: 100%; }
.job-actions { flex-basis: 100%; justify-content: flex-start; margin-left: 44px; }
@media (max-width: 543px) { .job-actions { margin-left: 0; } }

/* chart series: Primer's data-visualisation palette in a fixed order (products keep their colour in every chart) */
[data-color-mode] {
  --series-1: var(--data-blue-color-emphasis); --series-2: var(--data-orange-color-emphasis); --series-3: var(--data-green-color-emphasis);
  --series-4: var(--data-yellow-color-emphasis); --series-5: var(--data-pink-color-emphasis); --series-6: var(--data-teal-color-emphasis);
  --series-7: var(--data-purple-color-emphasis); --series-8: var(--data-red-color-emphasis); --series-other: var(--data-gray-color-emphasis);
}
.table td:first-child { white-space: nowrap; }
.idea-row .row-text > .meta { max-width: 90ch; }
.idea-next { margin-top: var(--base-size-4); }
.product-progress { display: flex; align-items: center; gap: var(--base-size-8); }
.product-progress .Progress { flex: 1; }

/* sign-in: GitHub's layout */
.auth-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 6vh; }
.auth-mark { width: 40px; height: 40px; box-shadow: inset 0 0 0 9px var(--bgColor-severe-emphasis), inset 0 0 0 20px var(--fgColor-onEmphasis); }
.auth-title { margin: var(--base-size-16) 0 0; font-size: 24px; font-weight: 300; letter-spacing: -0.5px; text-align: center; }
.auth-sub { margin: var(--base-size-4) 0 0; color: var(--fgColor-muted); text-align: center; max-width: 340px; }
.auth-card { width: min(340px, 100%); margin-top: var(--base-size-16); padding: var(--base-size-16); background: var(--bgColor-muted);
  display: flex; flex-direction: column; gap: var(--base-size-12); }
body[data-auth="out"] .app-header { display: none; }

/* Preferences: Laplace's voice */
.voice-prefs { margin-top: var(--base-size-24); }
.voice-pick { cursor: pointer; }
.voice-pick input { margin: 0; }
.voice-speed-wrap { display: inline-flex; align-items: center; gap: var(--base-size-8); color: var(--fgColor-muted); font-size: 12px; }
.voice-speed { width: 140px; accent-color: var(--bgColor-accent-emphasis); }
.prefs-heading { margin: 0 0 var(--base-size-12); }
.voice-pick, .voice-pick .meta { font-weight: 400; }
.voice-pick .row-title { font-weight: 600; }
.voice-speed-wrap { font-weight: 400; }
.voice-pick, .voice-pick .meta { font-weight: 400; }
.voice-pick .row-title { font-weight: 600; }
.voice-speed-wrap { font-weight: 400; }

/* Sales → Upwork jobs */
.freelance-progress { margin-bottom: var(--base-size-16); }
.freelance-paste { display: flex; flex-direction: column; gap: var(--base-size-8); margin-bottom: var(--base-size-8); }
.freelance-paste textarea { width: 100%; }
.freelance-paste .row input { flex: 1 1 240px; }
.freelance-row { flex-direction: column; align-items: stretch; }
.freelance-details summary { cursor: pointer; }
.freelance-body { display: flex; flex-direction: column; gap: var(--base-size-8); margin-top: var(--base-size-8); }
.freelance-body p { margin: 0; max-width: 90ch; }
.freelance-body textarea { width: 100%; }
.connects-input { width: 70px; }
.connects-label { display: inline-flex; align-items: center; gap: var(--base-size-6); }
