/* ============================================================
   UTR Releases — site.css
   The sole stylesheet for the ACE Razor Pages app (besides the
   per-page landing.css). Depends on: assets/utr-tokens.css
   (color + type tokens from the UTR Sports Design System).
   ============================================================ */

@import url("assets/utr-tokens.css");

/* ------------------------------------------------------------
   1. Base resets + body
   ------------------------------------------------------------ */
:root {
  /* The internal dashboard is denser than the marketing site:
     smaller body, tighter line-height, table-friendly spacing. */
  --fs-body: 14px;
  --fs-body-sm: 13px;
  --fs-caption: 11px;

  /* Surface tokens specific to the admin app */
  --app-bg: #FAFAFB;
  --app-surface: #FFFFFF;
  --app-surface-2: #F6F7F8;
  --app-border: rgba(0, 0, 0, 0.08);
  --app-border-strong: rgba(0, 0, 0, 0.16);
  --app-ink: #0B0C0F;
  --app-ink-2: #3A3D44;
  --app-ink-3: #6B7280;

  /* Status palette — 12 distinct states, WCAG-AA on white */
  --st-neutral-bg:   #EEF1F5; --st-neutral-fg:   #1F2937; --st-neutral-dot:   #6B7280;
  --st-pending-bg:   #F3F4F6; --st-pending-fg:   #4B5563; --st-pending-dot:   #9CA3AF;
  --st-initiated-bg: #E0F2FE; --st-initiated-fg: #075985; --st-initiated-dot: #0EA5E9;
  --st-running-bg:   #DBEAFE; --st-running-fg:   #1E3A8A; --st-running-dot:   #2563EB;
  --st-deploying-bg: #EDE9FE; --st-deploying-fg: #4C1D95; --st-deploying-dot: #7C3AED;
  --st-playwright-bg:#E0E7FF; --st-playwright-fg:#3730A3; --st-playwright-dot:#4F46E5;
  --st-awaiting-bg:  #FEF3C7; --st-awaiting-fg:  #78350F; --st-awaiting-dot:  #D97706;
  --st-success-bg:   #D1FAE5; --st-success-fg:   #065F46; --st-success-dot:   #10B981;
  --st-failed-bg:    #FEE2E2; --st-failed-fg:    #991B1B; --st-failed-dot:    #DC2626;
  --st-pwfail-bg:    #FFE4E6; --st-pwfail-fg:    #9F1239; --st-pwfail-dot:    #E11D48;
  --st-skipped-bg:   #E5E7EB; --st-skipped-fg:   #374151; --st-skipped-dot:   #6B7280;
  --st-dryrun-bg:    #1F2937; --st-dryrun-fg:    #F9FAFB; --st-dryrun-dot:    #FBBF24;
}

html, body {
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  margin: 0;
}

/* Full-width chrome (no centered max-width on body) */
body { max-width: none; padding: 0; }

* { box-sizing: border-box; }

a { color: var(--utr-blue); text-decoration: none; }
a:hover { color: var(--utr-dark-blue); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4, h5 { color: var(--app-ink); letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.15; margin: 0; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.2; margin: 0; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.25; margin: 0; }

code, .mono, kbd { font-family: var(--font-mono); font-size: 0.92em; }

::selection { background: var(--utr-light-blue); color: var(--utr-white); }

*:focus-visible {
  outline: 2px solid var(--utr-light-blue);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ------------------------------------------------------------
   2. App chrome — top bar + page container
   ------------------------------------------------------------ */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 56px;
  background: var(--utr-black);
  color: var(--utr-white);
  border-bottom: 1px solid #000;
  display: flex; justify-content: center;
}
.topbar__inner {
  display: flex; align-items: center; gap: 24px;
  height: 100%;
  width: 100%;
  max-width: 1280px;
  padding: 0 24px;
}
.topbar__brand { display: flex; align-items: center; gap: 10px; color: var(--utr-white); font-weight: 600; letter-spacing: -0.01em; }
.topbar__brand:hover { color: var(--utr-white); text-decoration: none; }
.topbar__brand-mark {
  width: 34px; height: 34px;
  background: var(--utr-u-gradient);
  -webkit-mask: url("assets/ace-mark.svg") center/contain no-repeat;
          mask: url("assets/ace-mark.svg") center/contain no-repeat;
}
.topbar__title { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1; }
.topbar__title .name { font-weight: 800; letter-spacing: 0.08em; font-size: 22px; }
.topbar__title .tag { font-weight: 500; opacity: 0.55; font-size: 13px; font-family: var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.topbar__title small { font-weight: 400; opacity: 0.55; margin-left: 6px; font-size: 10px; font-family: var(--font-mono); }
.topbar__spacer { flex: 1; }
.topbar__nav { display: flex; gap: 4px; }
.topbar__nav a {
  color: rgba(255,255,255,0.7); padding: 6px 12px; border-radius: 6px; font-size: 13px;
  transition: background var(--dur-fast) var(--ease-brand);
}
.topbar__nav a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.topbar__nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.12); }
.topbar__user { display: flex; align-items: center; gap: 10px; font-size: 13px; }

/* ------------------------------------------------------------
   Topbar — global search
   ------------------------------------------------------------ */
.topbar__search {
  position: relative;
  flex: 0 1 440px;
  width: 100%;
  max-width: 440px;
  min-width: 220px;
}
.topbar__search-field {
  position: relative;
  display: flex;
  align-items: center;
}
.topbar__search-field::after {
  /* Soft inner glow on focus, no layout cost */
  content: '';
  position: absolute; inset: 0;
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(0, 192, 247, 0);
  transition: box-shadow var(--dur-fast) var(--ease-brand);
}
.topbar__search-field:focus-within::after {
  box-shadow: 0 0 0 3px rgba(0, 192, 247, 0.22);
}
/* High specificity to override the global input[type="text"] reset */
.topbar__search input.topbar__search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  padding: 9px 60px 9px 40px;
  min-height: 38px;
  font-size: 13px;
  font-family: var(--font-sans);
  letter-spacing: -0.05px;
  outline: none;
  transition: background var(--dur-fast) var(--ease-brand),
              border-color var(--dur-fast) var(--ease-brand);
}
.topbar__search input.topbar__search-input:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
}
.topbar__search input.topbar__search-input:focus {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(0, 192, 247, 0.55);
}
.topbar__search input.topbar__search-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 400;
}
.topbar__search-icn {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  transition: color var(--dur-fast) var(--ease-brand);
}
.topbar__search-field:focus-within .topbar__search-icn { color: rgba(0, 192, 247, 0.85); }

.topbar__search-hint {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity 120ms var(--ease-brand);
}
.topbar__search-hint kbd {
  display: inline-grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-width: 2px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1;
}
.topbar__search input.topbar__search-input:not(:placeholder-shown) ~ .topbar__search-hint,
.topbar__search input.topbar__search-input:focus ~ .topbar__search-hint { opacity: 0; }

.topbar__search-spinner {
  position: absolute; right: 14px; top: 50%; margin-top: -7px;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(0, 192, 247, 0.9);
  border-radius: 50%;
  animation: tb-search-spin 0.7s linear infinite;
}
@keyframes tb-search-spin { to { transform: rotate(360deg); } }

.topbar__search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  max-height: 480px;
  overflow-y: auto;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  animation: tb-search-pop 160ms var(--ease-brand);
}
@keyframes tb-search-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.topbar__search-group { padding: 4px 0; }
.topbar__search-group + .topbar__search-group { border-top: 1px solid #F3F4F6; }
.topbar__search-group__label {
  padding: 8px 16px 4px;
  font-family: var(--font-mono); font-size: 9.5px;
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--app-ink-3);
  display: flex; align-items: center; gap: 7px;
}
.topbar__search-group__label svg { width: 11px; height: 11px; opacity: 0.55; flex-shrink: 0; }
.topbar__search-row {
  padding: 8px 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--app-ink);
}
.topbar__search-row:hover,
.topbar__search-row[aria-selected="true"] { background: #F3F4F6; }
.topbar__search-row__body { flex: 1; min-width: 0; }
.topbar__search-row__primary {
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__search-row__primary mark {
  background: rgba(0, 162, 255, 0.20);
  color: var(--app-ink); font-weight: 700;
  padding: 0 2px; border-radius: 2px;
}
.topbar__search-row__secondary {
  font-size: 11.5px; color: var(--app-ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.topbar__search-row__pill { flex-shrink: 0; }
.topbar__search-more {
  padding: 8px 16px;
  color: var(--utr-blue); font-size: 12.5px; font-weight: 500;
  cursor: pointer;
}
.topbar__search-more:hover { background: #F3F4F6; }
.topbar__search-empty {
  padding: 22px 14px; text-align: center;
  color: var(--app-ink-3); font-size: 13px;
}

@media (max-width: 900px) {
  .topbar__search { min-width: 160px; }
  .topbar__search-hint { display: none; }
}

.topbar__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--utr-cyan), var(--utr-teal));
  display: grid; place-items: center; color: #002; font-weight: 700; font-size: 11px;
}
.topbar__user a { color: rgba(255,255,255,0.7); font-size: 13px; }

/* Phase 12c follow-up (2026-05-30): mobile topbar — hide the "UTR Releases"
   tagline + avatar + display-name on phone widths. Placed AFTER the bare
   .topbar__avatar { display: grid } rule so the !-free display: none wins
   the cascade (equal specificity, later rule). ACE brand mark stays
   (orientation anchor), Releases nav stays, gear + logout icons stay. */
@media (max-width: 640px) {
  .topbar__title .tag,
  .topbar__avatar,
  .topbar__user-name { display: none; }
}
.topbar__user a:hover { color: #fff; }

.page { max-width: 1280px; margin: 0 auto; padding: 32px 24px 80px; width: 100%; }
.page--narrow { max-width: 880px; }
.page--wide { max-width: 1440px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.page-head__lede { color: var(--app-ink-3); font-size: 13px; margin-top: 6px; }
.page-head__actions { display: flex; gap: 8px; align-items: center; }

/* ------------------------------------------------------------
   3. Buttons
   ------------------------------------------------------------ */
button, .btn, input[type="submit"], input[type="button"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  letter-spacing: -0.1px;
  padding: 8px 14px; min-height: 34px;
  border: 1px solid transparent; border-radius: 8px;
  background: var(--utr-black); color: var(--utr-white);
  cursor: pointer; user-select: none;
  transition: background var(--dur-fast) var(--ease-brand),
              color var(--dur-fast) var(--ease-brand),
              border-color var(--dur-fast) var(--ease-brand),
              transform var(--dur-fast) var(--ease-brand);
}
button:hover, .btn:hover { background: #1A1B1F; color: #fff; text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button:disabled, .btn[aria-disabled="true"] {
  background: #E5E7EB; color: #9CA3AF; cursor: not-allowed; border-color: transparent;
}

.btn--primary { background: var(--utr-blue); color: #fff; }
.btn--primary:hover { background: var(--utr-dark-blue); color: #fff; }

.btn--secondary { background: #fff; color: var(--app-ink); border-color: var(--app-border-strong); }
.btn--secondary:hover { background: #F3F4F6; color: var(--app-ink); }

.btn--ghost { background: transparent; color: var(--app-ink-2); border-color: transparent; }
.btn--ghost:hover { background: var(--app-surface-2); color: var(--app-ink); }

.btn--danger { background: #fff; color: var(--color-danger); border-color: #FCA5A5; }
.btn--danger:hover { background: #FEF2F2; color: #991B1B; }

.btn--promote {
  background: linear-gradient(135deg, var(--utr-cyan), var(--utr-teal));
  color: #002; font-weight: 700; padding: 10px 20px; min-height: 40px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 4px 14px rgba(1, 223, 203, 0.35);
}
.btn--promote:hover { color: #002; filter: brightness(1.05); }

.btn--lg { font-size: 14px; padding: 12px 22px; min-height: 44px; }
.btn--xl { font-size: 15px; padding: 14px 28px; min-height: 52px; border-radius: 12px; }
.btn--block { width: 100%; }

button .icn, .btn .icn { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2; }

/* ------------------------------------------------------------
   4. Status pills — one shape, 12 states
   ------------------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 9999px;
  font-size: 11.5px; font-weight: 600;
  line-height: 1; letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--st-neutral-bg); color: var(--st-neutral-fg);
}
.pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--st-neutral-dot); flex-shrink: 0;
}
.pill--pending     { background: var(--st-pending-bg);    color: var(--st-pending-fg); }
.pill--pending .pill__dot     { background: var(--st-pending-dot); }
.pill--initiated   { background: var(--st-initiated-bg);  color: var(--st-initiated-fg); }
.pill--initiated .pill__dot   { background: var(--st-initiated-dot); }
.pill--running     { background: var(--st-running-bg);    color: var(--st-running-fg); }
.pill--running .pill__dot     { background: var(--st-running-dot); animation: pulse 1.4s var(--ease-brand) infinite; }
.pill--deploying   { background: var(--st-deploying-bg);  color: var(--st-deploying-fg); }
.pill--deploying .pill__dot   { background: var(--st-deploying-dot); animation: pulse 1.4s var(--ease-brand) infinite; }
.pill--playwright  { background: var(--st-playwright-bg); color: var(--st-playwright-fg); }
.pill--playwright .pill__dot  { background: var(--st-playwright-dot); animation: pulse 1.4s var(--ease-brand) infinite; }
.pill--awaiting    { background: var(--st-awaiting-bg);   color: var(--st-awaiting-fg); }
.pill--awaiting .pill__dot    { background: var(--st-awaiting-dot); animation: pulse 1.4s var(--ease-brand) infinite; }
.pill--success     { background: var(--st-success-bg);    color: var(--st-success-fg); }
.pill--success .pill__dot     { background: var(--st-success-dot); }
.pill--failed      { background: var(--st-failed-bg);     color: var(--st-failed-fg); }
.pill--failed .pill__dot      { background: var(--st-failed-dot); }
.pill--pwfail      { background: var(--st-pwfail-bg);     color: var(--st-pwfail-fg); }
.pill--pwfail .pill__dot      { background: var(--st-pwfail-dot); }
.pill--skipped     { background: var(--st-skipped-bg);    color: var(--st-skipped-fg); }
.pill--skipped .pill__dot     { background: var(--st-skipped-dot); }
.pill--dryrun {
  background: var(--st-dryrun-bg); color: var(--st-dryrun-fg);
  font-family: var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; font-size: 10.5px;
}
.pill--dryrun .pill__dot { background: var(--st-dryrun-dot); }

.pill--lg { font-size: 12.5px; padding: 5px 12px 5px 10px; }
.pill--lg .pill__dot { width: 8px; height: 8px; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70%  { box-shadow: 0 0 0 6px transparent; opacity: 0.85; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

/* Small "badge" — distinct from pill, used for repo metadata */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 4px;
  font-size: 11px; font-weight: 500;
  background: var(--app-surface-2); color: var(--app-ink-2);
  border: 1px solid var(--app-border);
}
.badge--mono { font-family: var(--font-mono); font-size: 11px; }
.badge--monorepo {
  background: rgba(0, 162, 255, 0.10); color: var(--utr-blue);
  border-color: rgba(0, 83, 160, 0.20); font-weight: 600;
}
.badge--migration {
  background: #FEF3C7; color: #78350F; border-color: #FCD34D; font-weight: 600;
}

/* ------------------------------------------------------------
   5. Cards
   ------------------------------------------------------------ */
.card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 20px;
}
.card--flush { padding: 0; }
.card--dim { opacity: 0.5; }
.card__header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--app-border);
}
.card__body { padding: 18px; }
.card__footer {
  padding: 12px 18px; border-top: 1px solid var(--app-border);
  background: var(--app-surface-2);
  border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
}

/* ------------------------------------------------------------
   6. Repo card (releases/new)
   ------------------------------------------------------------ */
.repo-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color var(--dur-fast) var(--ease-brand),
              opacity var(--dur-fast) var(--ease-brand);
}
.repo-card:hover { border-color: var(--app-border-strong); }
.repo-card[data-unchecked="true"] { opacity: 0.5; }
.repo-card[data-unchecked="true"]:hover { opacity: 0.7; }

.repo-card__row {
  display: flex; align-items: center; gap: 12px;
}
.repo-card__check { width: 18px; height: 18px; margin: 0; accent-color: var(--utr-blue); }
.repo-card__name { font-weight: 600; font-size: 15px; color: var(--app-ink); }
.repo-card__name .mono { font-family: var(--font-mono); font-size: 13px; color: var(--app-ink-2); font-weight: 500; }
.repo-card__chev { margin-left: auto; color: var(--app-ink-3); transition: transform var(--dur-fast); }
.repo-card[data-expanded="true"] .repo-card__chev { transform: rotate(180deg); }

.repo-card__meta {
  display: flex; flex-wrap: wrap; gap: 16px 20px;
  margin: 10px 0 0 30px; font-size: 12.5px; color: var(--app-ink-3);
  align-items: center;
}
.repo-card__meta b { color: var(--app-ink-2); font-weight: 600; }

.repo-card__apps { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.repo-card__app {
  font-family: var(--font-mono); font-size: 11.5px;
  background: var(--app-surface-2); padding: 2px 7px; border-radius: 4px;
  color: var(--app-ink-2); border: 1px solid var(--app-border);
}

.repo-card__branch {
  font-family: var(--font-mono); font-size: 12px;
  background: #F0F4F8; color: var(--utr-dark-blue);
  padding: 3px 8px; border-radius: 4px;
  border: 1px solid rgba(0, 83, 160, 0.12);
}

.repo-card__expanded {
  margin: 14px 0 0 30px;
  padding: 12px 14px;
  background: var(--app-surface-2); border-radius: 8px;
  font-size: 12.5px; color: var(--app-ink-2);
}

/* ------------------------------------------------------------
   7. Migration warning banner
   ------------------------------------------------------------ */
.migration-banner {
  display: flex; gap: 12px;
  margin: 12px 0 0 30px;
  padding: 12px 14px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-left: 4px solid #D97706;
  border-radius: 8px;
}
.migration-banner__icon {
  width: 18px; height: 18px; color: #B45309; flex-shrink: 0; margin-top: 1px;
}
.migration-banner__body { flex: 1; }
.migration-banner__title {
  font-weight: 600; font-size: 13px; color: #78350F; margin-bottom: 4px;
}
.migration-banner__files {
  font-family: var(--font-mono); font-size: 11.5px; color: #92400E;
  margin: 4px 0 8px; line-height: 1.6;
}
.migration-banner__confirm {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 500; color: #78350F;
  padding: 6px 10px; background: rgba(255,255,255,0.6); border-radius: 6px;
  border: 1px solid #FCD34D;
  cursor: pointer;
}
.migration-banner__confirm input { accent-color: #D97706; }

.migration-banner--unconfirmed { border-color: #DC2626; border-left-color: #DC2626; background: #FEF2F2; }
.migration-banner--unconfirmed .migration-banner__title { color: #991B1B; }
.migration-banner__required {
  margin-top: 6px;
  font-size: 11.5px; font-weight: 600; color: #991B1B;
}

/* ------------------------------------------------------------
   8. Banners (active release, failure, info)
   ------------------------------------------------------------ */
.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  font-size: 13.5px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
}
.banner__icon { width: 18px; height: 18px; flex-shrink: 0; }
.banner__body { flex: 1; }
.banner__actions { display: flex; gap: 8px; }

.banner--info { background: #EFF6FF; border-color: #BFDBFE; color: #1E3A8A; }
.banner--info .banner__icon { color: #2563EB; }

.banner--warning { background: #FFFBEB; border-color: #FCD34D; color: #78350F; }
.banner--warning .banner__icon { color: #B45309; }

.banner--danger { background: #FEF2F2; border-color: #FCA5A5; color: #991B1B; }
.banner--danger .banner__icon { color: #DC2626; }

.banner--success { background: #ECFDF5; border-color: #6EE7B7; color: #065F46; }
.banner--success .banner__icon { color: #059669; }

/* Phase 12c follow-up (2026-05-30): mobile layout. Flex-row with 3 children
   (icon + body + 3 buttons) squishes the body column to ~80px on narrow
   viewports — text wraps one-word-per-line and the buttons stack oddly.
   At ≤ 640px let the actions block wrap to its own row beneath icon + body;
   buttons stay horizontal within the actions row (flex-wrap as a fallback
   for very narrow widths). */
@media (max-width: 640px) {
  .banner { flex-wrap: wrap; align-items: flex-start; }
  .banner__actions { flex-basis: 100%; flex-wrap: wrap; }
}

/* ------------------------------------------------------------
   9. Tables
   ------------------------------------------------------------ */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
thead th {
  text-align: left; font-weight: 600; font-size: 11.5px;
  color: var(--app-ink-3); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 14px;
  background: transparent;
  border-bottom: 1px solid var(--app-border);
}
tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--app-border);
  vertical-align: middle;
  background: var(--app-surface);
}
tbody tr:first-child td { border-top: 1px solid var(--app-border); }
tbody tr:hover td { background: var(--app-surface-2); cursor: pointer; }
tbody tr:last-child td:first-child { border-bottom-left-radius: 10px; }
tbody tr:last-child td:last-child  { border-bottom-right-radius: 10px; }
/* Top corners come from the .table-wrap (border-radius + overflow:hidden) so the
   first tbody row sits flush against the thead. Cell-level top radii here doubled
   the curve and visually detached the first data row from its column header. */

.table-wrap { background: var(--app-surface); border-radius: 10px; border: 1px solid var(--app-border); overflow: hidden; }

/* ------------------------------------------------------------
   10. Filter chips
   ------------------------------------------------------------ */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12.5px; font-weight: 500;
  color: var(--app-ink-2);
  background: transparent;
  border: 1px solid var(--app-border);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-brand);
}
.chip:hover { background: var(--app-surface-2); color: var(--app-ink); }
.chip[aria-pressed="true"] {
  background: var(--app-ink); color: #fff; border-color: var(--app-ink);
}
a.chip, a.chip:hover, a.chip:focus { text-decoration: none; }
.chip__count {
  font-size: 11px; font-weight: 600;
  color: var(--app-ink-3);
  background: var(--app-surface-2); padding: 1px 6px; border-radius: 9999px;
  border: 1px solid var(--app-border);
}
.chip[aria-pressed="true"] .chip__count {
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); border-color: transparent;
}

/* ------------------------------------------------------------
   11. Stepper (horizontal, 6 steps) — Phase 8
   States communicated via color + icon shape (colorblind-safe):
     complete  → green  ✓
     failed    → red    ✗
     partial   → amber  ⚠   (Prod Deploys: some shipped, some didn't)
     running   → blue   ⟳   (spinning ring, in progress)
     awaiting  → blue   ⏸   (waiting for human — prod approval)
     pending   → grey   ○   (not started yet)
   ------------------------------------------------------------ */
:root {
  --step-green:    #10B981;
  --step-green-bg: rgba(16, 185, 129, 0.10);
  --step-amber:    #F59E0B;
  --step-amber-bg: rgba(245, 158, 11, 0.14);
  --step-red:      #DC2626;
  --step-red-bg:   rgba(220, 38, 38, 0.10);
  --step-blue:     #2563EB;
  --step-blue-bg:  rgba(37, 99, 235, 0.12);
}
.stepper {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 20px 0 18px;
  margin-bottom: 16px;
  position: relative;
}
.step {
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  padding: 0 6px;
  text-align: center;
  min-width: 0;
}
.step + .step::before {
  content: ""; position: absolute;
  left: -50%; right: 50%; top: 19px;
  height: 2px; background: var(--app-border);
  z-index: 0;
}

/* Connector color flows FROM the previous step's outcome */
.step[data-state="complete"]  + .step::before { background: var(--step-green); }
.step[data-state="partial"]   + .step::before { background: var(--step-amber); }
.step[data-state="failed"]    + .step::before { background: var(--step-red); }
/* And forward into a running/awaiting target gets a blue accent */
.step + .step[data-state="running"]::before,
.step + .step[data-state="awaiting"]::before { background: var(--step-blue); }

.step__icon {
  position: relative; z-index: 1;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  border: 2px solid var(--app-border);
  color: var(--app-ink-3);
  margin-bottom: 8px;
  flex-shrink: 0;
}
.step__icon svg { width: 18px; height: 18px; }

/* ── complete (green ✓) ── */
.step[data-state="complete"] .step__icon {
  background: var(--step-green); border-color: var(--step-green); color: #fff;
}

/* ── partial (amber ⚠) ── */
.step[data-state="partial"] .step__icon {
  background: var(--step-amber); border-color: var(--step-amber); color: #fff;
}

/* ── failed (red ✗) ── */
.step[data-state="failed"] .step__icon {
  background: var(--step-red); border-color: var(--step-red); color: #fff;
}

/* ── running (blue ring, spinning ⟳) ── */
.step[data-state="running"] .step__icon {
  background: #fff; border-color: var(--step-blue); color: var(--step-blue);
  box-shadow: 0 0 0 4px var(--step-blue-bg);
  animation: stepPulse 1.6s var(--ease-brand) infinite;
}
.step[data-state="running"] .step__icon svg {
  animation: stepSpin 1.6s linear infinite;
  transform-origin: center;
  transform-box: fill-box;
}

/* ── awaiting human (blue, paused ⏸) ── */
.step[data-state="awaiting"] .step__icon {
  background: #fff; border-color: var(--step-blue); color: var(--step-blue);
  box-shadow: 0 0 0 4px var(--step-blue-bg);
  animation: stepPulse 1.6s var(--ease-brand) infinite;
}

/* ── pending (grey ○) ── */
.step[data-state="pending"] .step__icon {
  background: #fff;
  border-color: var(--app-border-strong);
  color: var(--app-ink-3);
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--step-blue-bg); }
  50%      { box-shadow: 0 0 0 9px rgba(37, 99, 235, 0.04); }
}
@keyframes stepSpin { to { transform: rotate(360deg); } }

.step__label {
  font-size: 12px; font-weight: 600; color: var(--app-ink);
  letter-spacing: -0.1px;
  max-width: 100%;
}
.step[data-state="pending"]  .step__label { color: var(--app-ink-3); font-weight: 500; }
.step[data-state="failed"]   .step__label { color: var(--step-red); }
.step[data-state="partial"]  .step__label { color: #92400E; }
.step[data-state="awaiting"] .step__label { color: var(--step-blue); }

.step__time {
  font-size: 10.5px; color: var(--app-ink-3);
  margin-top: 3px;
  font-family: var(--font-mono);
  line-height: 1.4;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.step[data-state="failed"]  .step__time { color: var(--step-red); }
.step[data-state="partial"] .step__time { color: #92400E; }

/* ------------------------------------------------------------
   11b. Deploy grid (release detail) — Phase 8
   ------------------------------------------------------------ */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.app-card,
.repo-card-live {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.app-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.app-card__name {
  font-size: 15px; font-weight: 700; color: var(--app-ink);
  margin: 0;
}
.app-card__meta {
  font-size: 12.5px; color: var(--app-ink-3); margin: 0;
}
.app-card__envs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-top: 4px;
}
.app-card__env {
  display: flex; align-items: baseline; gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  overflow: hidden;
}
.app-card__env-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--app-ink-3);
  flex-shrink: 0;
}
/* Phase 9.5 (2026-05-27): vertical card layout — each datum on its own line.
   .app-card__row is a paragraph with the .app-card__env-label inline-block at a
   fixed min-width so values across rows left-align cleanly. */
.app-card__row {
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap;
}
.app-card__row .app-card__env-label {
  min-width: 78px;
}
.app-card__env-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--utr-blue);
  text-decoration: none;
}
.app-card__env-link:hover { text-decoration: underline; }
.app-card__env-status {
  font-size: 10.5px;
  color: var(--app-ink-3);
  white-space: nowrap;
}
.repo-card-live .app-card__envs { grid-template-columns: 1fr; gap: 5px 0; }

/* ------------------------------------------------------------
   11d. Slack thread embed (release detail) — Phase 8 stub
   Phase 9 will hydrate the message body with real conversation
   data from Slack's conversations.replies API. Layout/CSS port
   from docs/designs/prototype/site.css § 14.
   ------------------------------------------------------------ */
.slack-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  overflow: hidden;
}
.slack-card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: #F8F9FB;
  border-bottom: 1px solid var(--app-border);
  font-size: 13px;
}
.slack-card__head svg { width: 18px; height: 18px; flex-shrink: 0; }
.slack-card__channel { font-weight: 600; }
.slack-msg {
  display: flex; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border);
}
.slack-msg:last-child { border-bottom: none; }
.slack-msg__avatar {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--app-ink);
  flex-shrink: 0;
}
.slack-msg__body { flex: 1; min-width: 0; }
.slack-msg__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.slack-msg__name { font-weight: 700; font-size: 13px; color: var(--app-ink); }
.slack-msg__time { font-size: 11px; color: var(--app-ink-3); }
.slack-msg__text { font-size: 13px; color: var(--app-ink-2); line-height: 1.5; }
.slack-msg__text code {
  background: #F1F5F9; border-radius: 3px; padding: 1px 4px;
  font-size: 12px; color: var(--app-ink);
}
.slack-msg__text a { color: var(--utr-blue); text-decoration: none; }
.slack-msg__text a:hover { text-decoration: underline; }
.slack-mention {
  display: inline-block;
  background: #E5EFFA;
  color: #1264A3;
  border-radius: 3px;
  padding: 0 4px;
  font-weight: 500;
}

/* ------------------------------------------------------------
   11c. View-toggle segmented control (release detail) — Phase 8
   Port of the design prototype's .view-toggle (matches the
   By App / By Repo segmented control at the top of the page).
   ------------------------------------------------------------ */
.view-toggle {
  display: inline-flex;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 0;
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}
.view-toggle__option {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 6px 14px;
  min-height: 0;
  line-height: 1;
  border-radius: 0;
  font-size: 12px; font-weight: 500;
  color: var(--app-ink-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  letter-spacing: -0.1px;
  text-decoration: none;
  transition: background 120ms var(--ease-brand), color 120ms var(--ease-brand);
}
.view-toggle__option + .view-toggle__option { border-left: 1px solid var(--app-border); }
.view-toggle__option:hover { color: var(--app-ink); background: var(--app-surface-2); }
.view-toggle__option[aria-pressed="true"],
.view-toggle__option[aria-current="page"] {
  background: var(--app-ink);
  color: #fff;
}
.view-toggle__option[aria-pressed="true"] + .view-toggle__option,
.view-toggle__option[aria-current="page"] + .view-toggle__option { border-left-color: transparent; }
.view-toggle__option svg { width: 12px; height: 12px; flex-shrink: 0; display: block; }
a.view-toggle__option,
a.view-toggle__option:hover,
a.view-toggle__option:focus { text-decoration: none; }

/* ------------------------------------------------------------
   12. Per-repo detail table (release detail)
   ------------------------------------------------------------ */
.repo-table { display: grid; gap: 12px; }

.repo-row {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  align-items: start;
}
.repo-row--failed { border-color: #FCA5A5; background: #FEFAFA; }

.repo-row__head .repo-row__name { font-weight: 600; font-size: 14px; }
.repo-row__head .repo-row__name a { color: var(--app-ink); }
.repo-row__head .repo-row__name a:hover { color: var(--utr-blue); }
.repo-row__head .repo-row__branch {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--utr-blue);
  margin-top: 4px;
}
.repo-row__head .repo-row__apps { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

.repo-row__detail { display: grid; gap: 10px; font-size: 12.5px; }
.repo-row__stage {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: start;
  padding: 6px 0;
  border-bottom: 1px dashed var(--app-border);
}
.repo-row__stage:last-child { border-bottom: none; }
.repo-row__stage-label {
  font-size: 11px; font-weight: 600; color: var(--app-ink-3);
  text-transform: uppercase; letter-spacing: 0.04em; padding-top: 3px;
}
.repo-row__stage-items { display: flex; flex-direction: column; gap: 6px; }
.repo-row__pipeline {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
}
.repo-row__pipeline .mono { color: var(--app-ink-2); }
.repo-row__pipeline a { font-size: 11.5px; }
.repo-row__error {
  margin-top: 4px;
  padding: 8px 10px;
  background: #FEF2F2; border: 1px solid #FCA5A5;
  border-radius: 6px;
  font-family: var(--font-mono); font-size: 11.5px; color: #991B1B;
  white-space: pre-wrap;
}

/* ------------------------------------------------------------
   13. Right-side summary sidebar (releases/new)
   ------------------------------------------------------------ */
.layout-with-aside {
  display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start;
}
.aside {
  position: sticky; top: 80px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 18px;
}
.aside h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--app-ink-3); margin-bottom: 14px; }
.aside__stat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--app-border);
}
.aside__stat:last-child { border-bottom: none; }
.aside__stat-label { font-size: 13px; color: var(--app-ink-2); }
.aside__stat-value { font-weight: 600; font-size: 17px; color: var(--app-ink); letter-spacing: -0.01em; }
.aside__stat-value--warn { color: #B45309; }

.aside__divider { height: 1px; background: var(--app-border); margin: 14px 0; }

.aside__slack {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--app-ink-2);
  padding: 8px 10px; background: var(--app-surface-2); border-radius: 8px;
}
.aside__slack code { color: var(--utr-blue); font-weight: 600; }

.aside__dryrun {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px; padding: 12px;
  background: #FFFBEB; border: 1px solid #FCD34D; border-radius: 8px;
}
.aside__dryrun-toggle {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 13px; color: #78350F;
  cursor: pointer;
}
.aside__dryrun-help { font-size: 11.5px; color: #92400E; margin-top: 4px; line-height: 1.45; }
.aside__dryrun-check {
  width: 16px; height: 16px;
  margin: 3px 0 0;
  accent-color: #D97706;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__slider {
  position: absolute; inset: 0; background: #CBD5E1;
  border-radius: 9999px; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-brand);
}
.toggle__slider::before {
  content: ""; position: absolute; height: 14px; width: 14px; left: 3px; top: 3px;
  background: white; border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease-brand);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle__slider { background: var(--utr-blue); }
.toggle input:checked + .toggle__slider::before { transform: translateX(16px); }
.toggle--amber input:checked + .toggle__slider { background: #D97706; }

/* ------------------------------------------------------------
   14. Slack thread embed
   ------------------------------------------------------------ */
.slack-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  overflow: hidden;
}
.slack-card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: #F8F9FB;
  border-bottom: 1px solid var(--app-border);
  font-size: 13px;
}
.slack-card__head svg { width: 18px; height: 18px; }
.slack-card__channel { font-weight: 600; }
.slack-card__head .spacer { flex: 1; }

.slack-msg {
  display: flex; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border);
}
.slack-msg:last-child { border-bottom: none; }
.slack-msg__avatar {
  width: 32px; height: 32px; border-radius: 6px;
  background: transparent;
  flex-shrink: 0;
  object-fit: cover; /* harmless on non-img, applies when this class is an <img> */
}
/* Phase 9.5 (2026-05-26): explicit ACE-mark fallback for placeholder/legacy states
   ("linked but messages unavailable", etc.). Real messages now render either an <img>
   (when AvatarUrl is set) or .slack-msg__avatar--initials. */
.slack-msg__avatar--ace-default {
  background: #000;
  display: grid; place-items: center;
}
.slack-msg__avatar--ace-default::before {
  content: '';
  width: 24px; height: 24px;
  background: var(--utr-u-gradient);
  -webkit-mask: url("assets/ace-mark.svg") center/contain no-repeat;
          mask: url("assets/ace-mark.svg") center/contain no-repeat;
}
.slack-msg__avatar--initials {
  background: linear-gradient(135deg, #0053A0, #00A2FF);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid; place-items: center;
  text-transform: uppercase;
}
.slack-msg__body { flex: 1; min-width: 0; }
.slack-msg__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.slack-msg__name { font-weight: 700; font-size: 13px; color: var(--app-ink); }
.slack-msg__time { font-size: 11px; color: var(--app-ink-3); }
.slack-msg__text { font-size: 13px; color: var(--app-ink-2); line-height: 1.5; }
.slack-msg__text code {
  background: #F1F5F9; border-radius: 3px; padding: 1px 4px;
  font-size: 12px; color: #0F172A;
}

/* ------------------------------------------------------------
   15. Empty states
   ------------------------------------------------------------ */
.empty {
  text-align: center;
  padding: 60px 24px;
  background: var(--app-surface);
  border: 1px dashed var(--app-border-strong);
  border-radius: 12px;
}
.empty__icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--app-surface-2);
  display: grid; place-items: center; margin: 0 auto 16px;
  color: var(--app-ink-3);
}
.empty__icon svg { width: 26px; height: 26px; }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--app-ink-3); max-width: 420px; margin: 0 auto 18px; }

/* ------------------------------------------------------------
   16. Forms
   ------------------------------------------------------------ */
input[type="text"], input[type="email"], input[type="search"], textarea, select {
  font-family: var(--font-sans); font-size: 13px;
  padding: 8px 12px; min-height: 34px;
  background: #fff; color: var(--app-ink);
  border: 1px solid var(--app-border-strong); border-radius: 8px;
  width: auto;
}
input:focus, textarea:focus, select:focus { border-color: var(--utr-blue); outline: none; box-shadow: 0 0 0 3px rgba(0, 83, 160, 0.15); }

label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
label.check input { accent-color: var(--utr-blue); width: 16px; height: 16px; }

/* ------------------------------------------------------------
   17. Misc helpers
   ------------------------------------------------------------ */
.mono { font-family: var(--font-mono); }
.muted { color: var(--app-ink-3); }
.subtle { color: var(--app-ink-3); font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.divider { height: 1px; background: var(--app-border); margin: 16px 0; }
.dryrun-strip {
  background: repeating-linear-gradient(45deg, #1F2937 0 8px, #111827 8px 16px);
  color: #FDE68A;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  padding: 4px 12px; text-align: center;
  text-transform: uppercase;
}

/* tooltip via title-like span */
.tip { border-bottom: 1px dotted var(--app-ink-3); cursor: help; }

/* keyboard hint */
.kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 1px 5px; border-radius: 4px;
  background: var(--app-surface-2); border: 1px solid var(--app-border);
  color: var(--app-ink-2);
}

/* ------------------------------------------------------------
   18. Footer
   ------------------------------------------------------------ */
.app-footer {
  margin-top: auto;
  padding: 18px 24px;
  border-top: 1px solid var(--app-border);
  font-size: 11.5px; color: var(--app-ink-3);
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.app-footer a { color: var(--app-ink-3); }
.app-footer a:hover { color: var(--app-ink); }

/* ------------------------------------------------------------
   19. Responsive
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .layout-with-aside { grid-template-columns: 1fr; }
  .aside { position: static; }
  .repo-row { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .step { flex-direction: row; gap: 12px; align-items: center; padding: 8px; text-align: left; }
  .step + .step::before { display: none; }
  .step__icon { margin-bottom: 0; }
  .step__time { font-size: 11px; }
  .deploy-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
}
@media (max-width: 640px) {
  .topbar__inner { padding: 0 14px; gap: 12px; }
  .topbar__nav { display: none; }
  .page { padding: 18px 14px 60px; }
  .repo-card__meta { margin-left: 0; }
  .migration-banner { margin-left: 0; }
}

/* ============================================================
   20. Row action icons + ReleaseNotesModal
   (Ported from docs/designs/design_handoff_ace_utr_releases_2/prototype/pages/releases-list.html)
   ============================================================ */
.row-actions { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.icon-btn {
  background: transparent; border: 1px solid transparent;
  width: 30px; height: 30px; border-radius: 7px;
  display: inline-grid; place-items: center;
  color: var(--app-ink-3); cursor: pointer;
  transition: background 140ms var(--ease-brand), color 140ms var(--ease-brand), border-color 140ms var(--ease-brand);
}
.icon-btn:hover { background: var(--app-surface-2); color: var(--app-ink); border-color: var(--app-border); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.30); border-color: rgba(0, 83, 160, 0.45); color: var(--utr-blue); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn--ghost-arrow { color: var(--app-ink-3); }
.icon-btn--ghost-arrow:hover { color: var(--utr-blue); }

/* Modal scrim + container ------------------------------------- */
.modal-scrim[hidden],
.notes-locked[hidden],
.notes-toolbar[hidden],
.notes-edit-hint[hidden],
.js-notes-cancel[hidden],
.js-notes-save[hidden],
.js-notes-foot-msg[hidden],
.js-notes-foot-close[hidden],
.modal__sub[hidden] { display: none !important; }
.modal-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(11, 12, 15, 0.55);
  backdrop-filter: blur(2px);
  display: grid; place-items: center;
  padding: 24px;
  animation: scrimIn 160ms var(--ease-brand);
}
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
.modal-scrim[hidden] { display: none; }

.modal {
  width: 100%; max-width: 640px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--app-surface);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.32);
  border: 1px solid var(--app-border);
  overflow: hidden;
  animation: modalIn 240ms var(--ease-brand);
}
@keyframes modalIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal__head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--app-border);
}
.modal__head-icn {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--utr-cyan), var(--utr-teal));
  display: grid; place-items: center; color: #002; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(1,223,203,0.35);
}
.modal__head-icn svg { width: 18px; height: 18px; }
.modal__title { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; line-height: 1.3; }
.modal__title .mono { font-weight: 700; color: var(--utr-blue); }
.modal__title .ticket-count { color: var(--app-ink-3); font-weight: 500; font-size: 14px; margin-left: 2px; }
.modal__sub { color: var(--app-ink-3); font-size: 12.5px; margin-top: 4px; }
.modal__head-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.modal__head-meta .author-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--app-ink-2); }
.modal__head-meta .author-chip .avatar {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-size: 9px; font-weight: 700; flex-shrink: 0;
  background: linear-gradient(135deg, #0053A0, #00A2FF);
}
.modal__head-meta .dot-sep { color: var(--app-border-strong); }
.modal__head-meta .started { font-family: var(--font-mono); font-size: 11.5px; color: var(--app-ink-3); }
.modal__close {
  background: transparent; border: 0; padding: 6px; margin-left: auto;
  color: var(--app-ink-3); cursor: pointer; border-radius: 6px;
  width: 30px; height: 30px; display: grid; place-items: center;
}
.modal__close:hover { color: var(--app-ink); background: var(--app-surface-2); }
.modal__close svg { width: 16px; height: 16px; }

.modal__body { padding: 18px 22px; overflow-y: auto; }

/* Notes editor (Jira-style inline edit) ----------------------- */
.notes-shell { position: relative; }

.notes-locked {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--app-ink-3);
  padding: 8px 10px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  margin-bottom: 12px;
}
.notes-locked svg { width: 14px; height: 14px; flex-shrink: 0; }

.notes-edit-hint {
  position: absolute; top: -4px; right: -4px;
  background: var(--utr-blue); color: #fff;
  font-size: 10.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 5px;
  pointer-events: none;
  opacity: 0; transform: translateY(2px);
  transition: opacity 120ms var(--ease-brand), transform 120ms var(--ease-brand);
}
.notes-shell.is-owner:not(.is-editing):hover .notes-edit-hint { opacity: 1; transform: none; }
.notes-shell.is-owner:not(.is-editing) .notes-body {
  cursor: text; border-radius: 6px;
  padding: 8px; margin: -8px;
  transition: background 120ms var(--ease-brand), box-shadow 120ms var(--ease-brand);
}
.notes-shell.is-owner:not(.is-editing) .notes-body:hover {
  background: var(--app-surface-2);
  box-shadow: inset 0 0 0 1px var(--app-border);
}

.notes-toolbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 2px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 8px; padding: 4px;
  margin: 0 0 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.notes-toolbar button {
  background: transparent; border: 0; cursor: pointer;
  min-width: 28px; height: 28px;
  padding: 0 7px; border-radius: 5px;
  color: var(--app-ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  transition: background 100ms, color 100ms;
}
.notes-toolbar button:hover { background: var(--app-surface-2); color: var(--app-ink); }
.notes-toolbar button.is-active { background: rgba(0, 162, 255, 0.12); color: var(--utr-blue); }
.notes-toolbar button svg { width: 14px; height: 14px; }
.notes-toolbar .sep { width: 1px; height: 18px; background: var(--app-border); margin: 0 4px; }
.notes-toolbar .tb-italic { font-style: italic; }
.notes-toolbar .tb-underline { text-decoration: underline; }

.notes-shell.is-editing .notes-body {
  outline: none;
  border: 1px solid rgba(0, 83, 160, 0.30);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.12);
  border-radius: 8px;
  padding: 12px 14px; margin: 0;
  min-height: 200px;
  background: var(--app-surface);
}
.notes-shell.is-editing .notes-body a.tag { pointer-events: none; }
.notes-shell.is-editing .notes-body a.tag::after { display: none; }

.notes-body { font-size: 13.5px; line-height: 1.6; color: var(--app-ink-2); }
.notes-body a.tag {
  text-decoration: none;
  transition: background 120ms var(--ease-brand), border-color 120ms var(--ease-brand);
}
.notes-body a.tag:hover {
  background: rgba(0, 83, 160, 0.14);
  border-color: rgba(0, 83, 160, 0.30);
  text-decoration: none;
}
.notes-body a.tag::after { content: ' ↗'; font-family: var(--font-sans); opacity: 0.5; font-size: 10px; }
.notes-body h4 {
  font-size: 12px; font-weight: 600; color: var(--app-ink);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 18px 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--app-border);
}
.notes-body h4:first-child { margin-top: 0; }
.notes-body p { margin: 0 0 10px; }
.notes-body ul, .notes-body ol { margin: 0 0 10px; padding-left: 20px; }
.notes-body li { margin-bottom: 4px; }
.notes-body li::marker { color: var(--app-ink-3); }
.notes-body code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--app-surface-2);
  padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--app-border);
}
.notes-body .tag {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  background: rgba(0, 83, 160, 0.08); color: var(--utr-blue);
  padding: 1px 6px; border-radius: 4px; margin-right: 4px;
  border: 1px solid rgba(0, 83, 160, 0.15);
}
.notes-body .callout {
  background: #FFFBEB; border-left: 3px solid #FCD34D;
  padding: 10px 12px; border-radius: 0 8px 8px 0;
  color: #78350F; font-size: 12.5px; margin: 12px 0;
}
.notes-body .callout strong { color: #5a4a2a; }

.modal__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 22px;
  background: var(--app-surface-2);
  border-top: 1px solid var(--app-border);
  flex-wrap: wrap;
}
.modal__foot .subtle { color: var(--app-ink-3); font-size: 12px; }

.notes-empty {
  text-align: center; padding: 24px 16px;
  color: var(--app-ink-3); font-size: 13px;
}
.notes-empty svg { width: 32px; height: 32px; margin-bottom: 10px; color: var(--app-border-strong); }

/* ============================================================
   21. Settings — gear icon (topbar) + /settings page
   (Ported from docs/designs/prototype/pages/settings.html)
   ============================================================ */

/* Topbar icon buttons — gear (settings) + logout. Same chrome: 28x28
   rounded square, dimmed white default, brightens on hover. */
.topbar__gear,
.topbar__logout {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  color: rgba(255,255,255,0.85);
  transition: background var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand);
}
.topbar__gear:hover,
.topbar__logout:hover { background: rgba(255,255,255,0.10); color: #fff; text-decoration: none; }
.topbar__gear--active { background: rgba(255,255,255,0.12); color: #fff; }
.topbar__gear svg,
.topbar__logout svg { width: 16px; height: 16px; }

/* Page-level chrome */
.settings-breadcrumb { margin-bottom: 14px; }
.settings-breadcrumb a { color: var(--app-ink-3); }
.settings-breadcrumb__sep { opacity: 0.4; }
.settings-inline-code {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11.5px;
  color: var(--app-ink-2);
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Left nav card */
.settings-nav {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 6px;
  position: sticky;
  top: 72px;
}
.settings-nav__group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--app-ink-3);
  padding: 10px 12px 6px;
}
.settings-nav__group-label + .settings-nav__group-label,
.settings-nav__item + .settings-nav__group-label { margin-top: 6px; }
.settings-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--app-ink-2);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand);
}
.settings-nav__item:hover { background: var(--app-surface-2); color: var(--app-ink); text-decoration: none; }
.settings-nav__item[aria-current="page"] {
  background: rgba(0, 83, 160, 0.08);
  color: var(--utr-blue);
  font-weight: 600;
}
.settings-nav__item[aria-current="page"] .settings-nav__icn { color: var(--utr-blue); }
.settings-nav__item--dim { color: var(--app-ink-3); cursor: not-allowed; }
.settings-nav__item--dim:hover { background: transparent; color: var(--app-ink-3); }
.settings-nav__icn { width: 16px; height: 16px; color: var(--app-ink-3); flex-shrink: 0; }
.settings-nav__soon {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-ink-3);
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  padding: 1px 5px;
}

/* Right panel */
.settings-panel { min-width: 0; }
.settings-panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.settings-panel__title {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 700; line-height: 1.2;
  letter-spacing: -0.01em;
}
.settings-panel__count {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  background: rgba(0, 162, 255, 0.10);
  color: var(--utr-blue);
  padding: 2px 9px;
  border-radius: 10px;
}
.settings-panel__sub {
  color: var(--app-ink-3);
  font-size: 12.5px;
  margin: 4px 0 0;
}
.settings-panel__sub code {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11.5px;
  color: var(--app-ink-2);
}
.settings-panel__sub .hot-reload-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  margin: 0 4px 0 6px;
  vertical-align: 1px;
}

/* Filter row.
   Icon is positioned absolutely (mirroring `.topbar__search-field`) so its vertical
   center sits at exactly 50% of the field height regardless of how the browser chooses
   to baseline the input's text glyph. Trying to align the icon and the input via flex
   `align-items: center` was unreliable because input text baseline placement varies
   with font metrics and we can't control it from CSS. */
.settings-filter {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px;
  padding: 4px 14px 4px 16px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  transition: border-color var(--dur-fast) var(--ease-brand),
              box-shadow var(--dur-fast) var(--ease-brand);
}
.settings-filter:focus-within {
  border-color: var(--utr-blue);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.15);
}
.settings-filter__icn {
  position: absolute;
  left: 16px;                   /* matches the parent's left padding */
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--app-ink-3);
  pointer-events: none;         /* clicks pass through to the input */
}
.settings-filter:focus-within .settings-filter__icn { color: var(--utr-blue); }
.settings-filter input.settings-filter__input {
  flex: 1; min-width: 0;
  border: none; background: transparent;
  padding: 0 0 0 27px;          /* 15px icon width + 12px visual gap; icon is absolute so no flex gap */
  height: 40px;
  font-size: 13.5px;
  line-height: normal;
  min-height: 0;
}
.settings-filter input.settings-filter__input:focus { outline: none; box-shadow: none; border: none; }
.settings-filter__sep { width: 1px; height: 20px; background: var(--app-border); }
.settings-filter__legend {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--app-ink-3);
  white-space: nowrap;
}
.settings-filter__legend strong { color: var(--app-ink-2); font-weight: 600; }

/* Service grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 14px;
}
/* `display: grid` above overrides the browser's UA `[hidden] { display: none }`
   (same specificity, later wins). Restore the hidden semantics explicitly so the
   Table/Cards toggle can flip the grid off via `hidden=""`. */
.service-grid[hidden] { display: none; }
.service-grid__sep {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 2px;
  color: var(--app-ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.service-grid__sep::before, .service-grid__sep::after {
  content: ""; flex: 1; height: 1px; background: var(--app-border);
}
.service-grid--empty .service-grid__empty {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  color: var(--app-ink-3);
  font-size: 13px;
  background: var(--app-surface);
  border: 1px dashed var(--app-border-strong);
  border-radius: 10px;
}
.service-grid__empty[hidden] { display: none; }
.svc[data-filter-hidden="true"] { display: none; }

/* Service table — Phase 11 follow-up (2026-05-28).
   Dense, scannable alternative to the card grid. Default view on /settings#panel-services.
   Same filter haystack as cards so the existing filter JS works across both views. */
.service-table-wrap {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  overflow: auto;
}
.service-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.service-table thead th {
  text-align: left;
  padding: 10px 12px;
  background: var(--app-surface-2);
  border-bottom: 1px solid var(--app-border);
  color: var(--app-ink-3);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.service-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--app-border);
  color: var(--app-ink-2);
  vertical-align: middle;
}
.service-table__row:last-child td { border-bottom: 0; }
.service-table__row:hover td { background: var(--app-surface-2); }
.service-table__row--dim td { color: var(--app-ink-3); }
.service-table__row[data-filter-hidden="true"] { display: none; }
.service-table__app { white-space: nowrap; }
.service-table__app-name { color: var(--app-ink); font-weight: 600; }
.service-table__sort {
  margin-left: 6px;
  font-size: 10.5px;
  color: var(--app-ink-3);
  font-family: var(--font-mono);
}
.service-table__alias { font-family: var(--font-mono); font-size: 11.5px; color: var(--app-ink-3); }
.service-table__alias-sep { color: var(--app-ink-3); }
.service-table__link {
  color: var(--utr-blue);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-decoration: none;
}
.service-table__link:hover { text-decoration: underline; }
.service-table__dash { color: var(--app-ink-3); }
.service-table__tag-prefix { color: var(--utr-blue); font-weight: 600; font-family: var(--font-mono); }
.service-table__notes { color: var(--app-ink-3); font-size: 11.5px; }
.service-table__note-sep { margin: 0 6px; opacity: 0.6; }
.service-table__sep td {
  background: transparent;
  border-bottom: 0;
  padding: 14px 12px 4px;
  color: var(--app-ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.service-table__empty {
  padding: 32px;
  text-align: center;
  color: var(--app-ink-3);
  font-size: 13px;
  background: var(--app-surface);
  border-top: 1px solid var(--app-border);
}
.service-table__empty[hidden] { display: none; }

/* Service card */
.svc {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  padding: 20px 22px 18px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color var(--dur-fast) var(--ease-brand),
              box-shadow var(--dur-fast) var(--ease-brand);
}
.svc:hover {
  border-color: var(--app-border-strong);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 8px 24px rgba(11,12,15,0.06);
}
.svc--dim { background: var(--app-surface-2); border-style: dashed; }
.svc--dim .svc__name { color: var(--app-ink-2); }

.svc__head { display: flex; flex-direction: column; gap: 6px; }
.svc__name-row { display: flex; align-items: baseline; gap: 12px; }
.svc__name {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--app-ink);
  letter-spacing: -0.2px;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.svc__sort {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--app-ink-3);
  margin-left: auto;
  flex-shrink: 0;
  line-height: 1.2;
}
.svc__meta {
  display: flex; flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 12px;
  color: var(--app-ink-3);
  line-height: 1.4;
}
.svc__meta-dot { color: var(--app-border-strong); }
.svc__aliases { display: inline; }
.svc__alias {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--app-ink-2);
}
.svc__alias-sep { color: var(--app-ink-3); }
.svc__meta-flag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 500;
  color: var(--app-ink-2);
}
.svc__meta-flag svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--app-ink-3); }
.svc__meta-flag--monorepo { color: var(--utr-blue); }
.svc__meta-flag--monorepo svg { color: var(--utr-blue); }
.svc__meta-flag--monorepo .project {
  font-family: var(--font-mono);
  color: var(--utr-dark-blue);
  font-weight: 600;
}
.svc__meta-flag--migration { color: #92400E; }
.svc__meta-flag--migration svg { color: #B45309; }
.svc__meta-flag--tags { font-family: var(--font-mono); font-size: 11.5px; }
.svc__meta-flag--tags .prefix { color: var(--utr-blue); font-weight: 600; }

/* Integration grid — 3 cols × 2 rows of cells, hairline lattice via gap-trick */
.svc__integrations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--app-border);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  overflow: hidden;
}
@media (max-width: 540px) {
  .svc__integrations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.svc-cell {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  column-gap: 9px;
  row-gap: 0;
  padding: 10px 12px;
  background: var(--app-surface);
  text-decoration: none;
  color: var(--app-ink);
  transition: background var(--dur-fast) var(--ease-brand);
  min-width: 0;
}
a.svc-cell:hover { background: var(--app-surface-2); text-decoration: none; }
.svc-cell__logo {
  grid-row: 1 / 3;
  width: 22px; height: 22px;
  display: grid; place-items: center;
}
.svc-cell__logo svg { width: 20px; height: 20px; display: block; }
.svc-cell__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--app-ink-3);
  line-height: 1.2;
  margin-bottom: 1px;
}
.svc-cell__id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--app-ink);
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.svc-cell--link .svc-cell__id { color: var(--utr-blue); }
a.svc-cell--link:hover .svc-cell__id { color: var(--utr-dark-blue); }
.svc-cell--missing {
  background: repeating-linear-gradient(
    135deg,
    var(--app-surface) 0 8px,
    var(--app-surface-2) 8px 16px
  );
}
.svc-cell--missing .svc-cell__logo { opacity: 0.35; filter: saturate(0.2); }
.svc-cell--missing .svc-cell__label { color: var(--app-ink-3); }
.svc-cell--missing .svc-cell__id { color: var(--app-ink-3); font-style: italic; font-weight: 400; }
.svc-cell--reserved { background: var(--app-surface-2); }
.svc-cell--reserved .svc-cell__logo { opacity: 0.65; }
.svc-cell--reserved .svc-cell__label { color: var(--app-ink-3); }
.svc-cell--reserved .svc-cell__id { color: var(--app-ink-3); font-style: italic; font-weight: 400; }

.svc__missing {
  font-size: 12px; color: #92400E;
  background: rgba(146, 64, 14, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.45;
}
.svc__missing strong { font-weight: 600; }
.svc__missing code {
  font-family: var(--font-mono); font-size: 11.5px;
  background: rgba(146, 64, 14, 0.10);
  padding: 0 4px; border-radius: 3px;
}

.settings-footer-line {
  margin-top: 18px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--app-ink-3);
}

@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
}

/* ============================================================
   /releases/new — scan loading UI (Phase 6)
   Server-side scan (Jira + ~11 BB repos, 30–45s) renders a
   per-stage progress card so the wait reads as productive
   work, not a frozen page.
   Ported from docs/designs/prototype/site.css §27.
   ============================================================ */
.scan-card {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  padding: 32px 32px 28px;
  text-align: center;
}
.scan-card--failed { border-color: #FCA5A5; background: #FEFAFA; }

.scan-mark {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--utr-cyan), var(--utr-teal));
  -webkit-mask: url("assets/ace-mark.svg") center/contain no-repeat;
          mask: url("assets/ace-mark.svg") center/contain no-repeat;
  margin: 0 auto 16px;
  animation: scan-mark-pulse 1.6s var(--ease-brand) infinite;
}
@keyframes scan-mark-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.05); opacity: 0.85; }
}
.scan-card--done   .scan-mark { animation: none; }
.scan-card--failed .scan-mark {
  background: linear-gradient(135deg, #DC2626, #991B1B);
  animation: none;
}

.scan-headline {
  font-size: 18px; font-weight: 600;
  color: var(--app-ink);
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.scan-sub {
  font-size: 12.5px;
  color: var(--app-ink-3);
  margin: 0 0 22px;
}

.scan-steps {
  text-align: left;
  margin: 0 auto;
  max-width: 460px;
  display: flex; flex-direction: column;
  gap: 2px;
  padding: 0;
  list-style: none;
}

.scan-step {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--app-border);
}
.scan-step:last-child { border-bottom: 0; }

.scan-step__icon {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.scan-step__label {
  color: var(--app-ink-2);
  letter-spacing: -0.1px;
  min-width: 0;
}
.scan-step__caption {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--app-ink-3);
  white-space: nowrap;
}

.scan-step--pending .scan-step__icon::before {
  content: ''; width: 9px; height: 9px;
  background: var(--app-border-strong);
  border-radius: 50%;
  opacity: 0.55;
}
.scan-step--pending .scan-step__label   { color: var(--app-ink-3); }
.scan-step--pending .scan-step__caption { opacity: 0.5; }

.scan-step--running .scan-step__icon::before {
  content: ''; width: 16px; height: 16px;
  border: 2.5px solid rgba(0, 162, 255, 0.22);
  border-top-color: var(--utr-blue);
  border-right-color: var(--utr-cyan);
  border-radius: 50%;
  animation: scan-spin 0.72s linear infinite;
}
@keyframes scan-spin { to { transform: rotate(360deg); } }
.scan-step--running .scan-step__label   { color: var(--app-ink-2); font-weight: 500; }
.scan-step--running .scan-step__caption { color: var(--utr-blue); }

.scan-step--done .scan-step__icon {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}
.scan-step--done .scan-step__icon svg { width: 13px; height: 13px; }
.scan-step--done .scan-step__label   { color: var(--app-ink-2); }
.scan-step--done .scan-step__caption {
  color: #065F46;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.22);
  padding: 1px 7px; border-radius: 4px;
}

.scan-step--failed .scan-step__icon {
  background: #FEF3C7;
  color: #78350F;
}
.scan-step--failed .scan-step__icon svg { width: 13px; height: 13px; }
.scan-step--failed .scan-step__label   { color: #78350F; font-weight: 500; }
.scan-step--failed .scan-step__caption {
  color: #78350F;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  padding: 1px 7px; border-radius: 4px;
}

.scan-handoff {
  margin-top: 16px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--app-ink-3);
  letter-spacing: 0.04em;
}
.scan-handoff .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: #10B981;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
}

.scan-error {
  margin: 10px auto 16px;
  max-width: 460px;
  padding: 10px 12px;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  text-align: left;
  font-family: var(--font-mono); font-size: 11.5px;
  color: #991B1B;
  white-space: pre-wrap;
  line-height: 1.5;
}
.scan-error b { font-family: var(--font-sans); font-weight: 600; }

/* ============================================================
   Tickets section — 2-row card layout
   Used on /releases/new + /releases/{slug} (running / awaiting /
   shipped / cancelled). One row = one ticket:
     row 1: [id chip] [summary, single-line ellipsis] [× ghost]
     row 2: [app chips] [migration pill] [audit micro-line]
   Removed tickets stay visible with strikethrough + 50% opacity
   so the row itself carries the audit.
   Ported from docs/designs/prototype/site.css §21.
   ============================================================ */
.tickets-section { position: relative; }
.tickets-section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.tickets-section__count {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  background: rgba(0, 162, 255, 0.10);
  color: var(--utr-blue);
  padding: 2px 8px; border-radius: 10px;
  margin-left: 8px; vertical-align: 3px;
}

.tickets-filter {
  position: relative;
  margin-bottom: 12px;
}
.tickets-filter__icn {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--app-ink-3);
  pointer-events: none;
  transition: color var(--dur-fast) var(--ease-brand);
}
.tickets-filter input {
  width: 100%;
  padding: 9px 14px 9px 34px;
  font-size: 13px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 9px;
  min-height: 38px;
  transition: border-color var(--dur-fast) var(--ease-brand),
              box-shadow var(--dur-fast) var(--ease-brand);
}
.tickets-filter input:focus {
  outline: none;
  border-color: var(--utr-blue);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.15);
}
.tickets-filter:focus-within .tickets-filter__icn { color: var(--utr-blue); }
.tickets-filter__count {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--app-ink-3);
  pointer-events: none;
}

.tickets-list {
  display: flex; flex-direction: column;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  overflow: hidden;
}
.tickets-list:empty::before {
  content: 'No tickets in this release yet — click "Add ticket" to add one.';
  display: block; padding: 28px 16px; text-align: center;
  color: var(--app-ink-3); font-size: 13px;
}

.ticket-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px; row-gap: 4px;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--app-border);
  align-items: center;
  transition: background var(--dur-fast) var(--ease-brand);
}
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: var(--app-surface-2); }

.ticket-row__id {
  grid-row: 1; grid-column: 1;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  background: rgba(0, 83, 160, 0.08); color: var(--utr-blue);
  padding: 2px 8px; border-radius: 5px;
  border: 1px solid rgba(0, 83, 160, 0.18);
  text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.ticket-row__id:hover {
  background: rgba(0, 83, 160, 0.14);
  border-color: rgba(0, 83, 160, 0.32);
  text-decoration: none;
}
.ticket-row__id::after { content: ' ↗'; opacity: 0.5; font-family: var(--font-sans); font-size: 10px; }

.ticket-row__title {
  grid-row: 1; grid-column: 2;
  font-size: 13.5px;
  color: var(--app-ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}

.ticket-row__remove {
  grid-row: 1 / 3; grid-column: 3;
  align-self: center;
  background: transparent; border: 1px solid transparent;
  width: 28px; height: 28px; border-radius: 7px;
  display: inline-grid; place-items: center;
  color: var(--app-ink-3); cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.ticket-row__remove:hover {
  background: #FEE2E2; color: #991B1B; border-color: #FCA5A5;
}
.ticket-row__remove:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.30);
  border-color: rgba(0, 83, 160, 0.45);
  color: var(--utr-blue);
}
.ticket-row__remove svg { width: 14px; height: 14px; }

.ticket-row__meta {
  grid-row: 2; grid-column: 1 / 3;
  display: flex; flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--app-ink-3);
  min-width: 0;
}
.ticket-row__apps {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 4px;
}
.ticket-row__app {
  font-family: var(--font-mono); font-size: 11px;
  background: rgba(0, 83, 160, 0.06);
  border: 1px solid rgba(0, 83, 160, 0.16);
  color: var(--utr-blue);
  padding: 1px 7px; border-radius: 4px;
  line-height: 1.5;
}
.ticket-row__apps--empty {
  font-family: var(--font-sans); font-style: italic;
  font-size: 12px; color: var(--app-ink-3);
}

.ticket-row__migration {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px 2px 6px;
  border-radius: 9999px;
  background: #FEF3C7;
  color: #78350F;
  border: 1px solid #FCD34D;
}
.ticket-row__migration svg { width: 11px; height: 11px; flex-shrink: 0; }
.ticket-row__migration .apps {
  font-family: var(--font-mono); font-weight: 500;
}

.ticket-row__audit {
  margin-left: auto;
  font-size: 11px;
  color: var(--app-ink-3);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.ticket-row__audit b {
  color: var(--app-ink-2);
  font-weight: 600;
}
.ticket-row__audit .scan {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  color: var(--app-ink-2);
  padding: 0 5px; border-radius: 3px;
}
.ticket-row__audit .when {
  font-family: var(--font-mono);
}

.ticket-row--excluded {
  opacity: 0.6;
  background: var(--app-surface-2);
}
.ticket-row--excluded:hover { opacity: 0.85; background: var(--app-surface-2); }
.ticket-row--excluded .ticket-row__id,
.ticket-row--excluded .ticket-row__title {
  text-decoration: line-through;
}
.ticket-row--excluded .ticket-row__remove { display: none; }
.ticket-row--excluded .ticket-row__audit b { color: #991B1B; }

.add-ticket-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 11px 14px;
  background: var(--app-surface);
  color: var(--utr-blue);
  border: 1px dashed rgba(0, 83, 160, 0.40);
  border-radius: 9px;
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  min-height: 40px;
  transition: background var(--dur-fast) var(--ease-brand),
              border-color var(--dur-fast) var(--ease-brand),
              border-style var(--dur-fast) var(--ease-brand);
}
.add-ticket-cta:hover {
  background: rgba(0, 162, 255, 0.05);
  border-color: var(--utr-blue);
  border-style: solid;
  color: var(--utr-blue);
}
.add-ticket-cta:focus-visible {
  outline: none;
  border-color: var(--utr-blue); border-style: solid;
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.18);
}
.add-ticket-cta svg { width: 15px; height: 15px; }

/* Inline variant — sits next to the filter input at the top of the list. */
.tickets-toolbar {
  display: flex; gap: 10px; align-items: stretch;
  margin-bottom: 12px;
}
.tickets-toolbar .tickets-filter {
  flex: 1; min-width: 0;
  margin-bottom: 0;
}
.add-ticket-cta.add-ticket-cta--inline {
  width: auto;
  margin-top: 0;
  padding: 0 16px;
  min-height: 38px; height: 38px;
  font-size: 12.5px; font-weight: 600;
  background: var(--utr-blue);
  color: #fff;
  border: 1px solid var(--utr-blue);
  border-style: solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.add-ticket-cta.add-ticket-cta--inline:hover {
  background: var(--utr-dark-blue);
  border-color: var(--utr-dark-blue);
  color: #fff;
}
.add-ticket-cta.add-ticket-cta--inline:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.30);
}

.rc-locked-banner {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--app-ink-3);
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  padding: 5px 9px;
}
.rc-locked-banner svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Add-ticket CTA is RC-page only — the New page doesn't support ad-hoc additions
   (everything flows through the scan snapshot). */
.tickets-section:not(.is-rc) .add-ticket-cta { display: none; }
/* Phase 11 follow-up (2026-05-28): the X (`.ticket-row__remove`) is now visible on
   the New page too — releases-new-exclude-ticket.js wires it to a confirmation modal
   that excludes the ticket + offers to drop orphaned repos. Before this, the rule
   hid the X on every section that wasn't `.is-rc` (Details only). */

@media (max-width: 720px) {
  .ticket-row__audit { margin-left: 0; flex-basis: 100%; order: 99; }
}

/* ============================================================
   Add-ticket modal (Jira key → preview → app multi-select)
   ============================================================ */
.modal--sm { max-width: 360px; }

.add-modal__field-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--app-ink-2);
  margin-bottom: 6px;
}
/* Explicit display:block above clobbers the user-agent [hidden] { display: none }
   default. JS toggles `.hidden` to flip between search and picked states; without
   this rule the hidden block stays visible. !important is the seatbelt — guarantees
   the hidden attribute always wins regardless of which other rules touch display. */
.add-modal__field-label[hidden] { display: none !important; }
.add-modal__field-help {
  font-size: 11.5px; color: var(--app-ink-3);
  margin: -3px 0 6px;
}
/* When the help text sits BELOW an input (Phase 6.5 admin search modal). The wrapper
   above carries a 14px bottom margin tuned for the no-help case; here we pull the
   help up so it sits ~4px under the input, not 20px down at the next field. <i>
   default italic styling carries through — semantic visual hint for "tip text". */
.add-modal__key-wrap + .add-modal__field-help {
  display: block;
  margin: -10px 0 0;
}
.add-modal__key-wrap {
  position: relative;
  margin-bottom: 14px;
}
.add-modal__key-wrap input {
  width: 100%; padding: 10px 36px 10px 12px;
  font-family: var(--font-mono); font-size: 13.5px;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  background: var(--app-surface);
  text-transform: uppercase;
}
/* Free-text variant — Phase 6.5 admin-name typeahead. The base rule above is tuned for
   Jira ticket keys (uppercase + monospace); the admin input takes display names that
   need their case preserved + a regular sans body font.
   Targets both the wrapper modifier AND the input's JS-hook class so the override
   applies even when the Razor partial hasn't recompiled yet. !important is the belt
   on top of the suspenders — the base rule has tie-breaking specificity. */
.add-modal__key-wrap--text input,
input.js-add-admin-q {
  font-family: var(--font-sans) !important;
  font-size: 14px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Add Admin modal sizing — compact body, dropdown floats out below as a popover.
   The body is sized for just the input + label states (no large reserve). The
   dropdown is position:absolute relative to .add-modal__key-wrap, and the modal
   itself goes overflow:visible so a 10-row dropdown can extend past the modal's
   bottom edge cleanly instead of being clipped by the modal's max-height frame.
   .js-add-admin-scrim is the per-modal hook on the outer scrim. */
.js-add-admin-scrim .modal {
  /* Popover-style: let the dropdown extend visually past the modal's frame. */
  overflow: visible;
}
.js-add-admin-scrim .modal__body {
  overflow: visible;
  min-height: 230px;
}
.js-add-admin-scrim .add-modal__autocomplete {
  /* Sized to fit BbClient.WorkspaceMemberSearchMaxResults rows comfortably.
     Rule of thumb: ~40px per row + 8px padding. Currently 5 rows → 220px.
     If you bump the C# constant, bump this value in lockstep (no auto-link). */
  max-height: 220px;
}
.add-modal__key-wrap input:focus {
  outline: none;
  border-color: var(--utr-blue);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.15);
}
.add-modal__key-wrap input.is-error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.add-modal__key-status {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--app-ink-3);
}
.add-modal__key-status .spinner {
  width: 12px; height: 12px;
  border: 2px solid rgba(0, 83, 160, 0.15);
  border-top-color: var(--utr-blue);
  border-radius: 50%;
  animation: tb-search-spin 0.7s linear infinite;
}
/* In-button variant — white-on-blue rim so it reads against the primary button fill,
   slight margin-right separates it from the loading label. Reuses tb-search-spin. */
.btn .spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.30);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tb-search-spin 0.7s linear infinite;
  vertical-align: -1px;
  margin-right: 6px;
}
.add-modal__msg {
  font-size: 12px;
  margin: -8px 0 12px;
  padding: 6px 10px;
  border-radius: 6px;
  line-height: 1.4;
}
.add-modal__msg--error {
  background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B;
}
.add-modal__msg--warning {
  background: #FFFBEB; border: 1px solid #FCD34D; color: #78350F;
}
.add-modal__msg[hidden] { display: none !important; }

.add-modal__preview {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 38px 12px 14px;  /* right padding leaves room for the X */
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 9px;
  margin-bottom: 14px;
}
.add-modal__preview[hidden] { display: none !important; }
.add-modal__preview-close {
  position: absolute; top: 6px; right: 8px;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border: 0; background: transparent;
  color: var(--app-ink-3); cursor: pointer; border-radius: 6px;
}
.add-modal__preview-close:hover { color: var(--app-ink); background: var(--app-surface); }
.add-modal__preview-close svg { width: 14px; height: 14px; }
.add-modal__preview-title {
  font-size: 13px; line-height: 1.4;
  color: var(--app-ink);
}
.add-modal__preview-title .key {
  font-family: var(--font-mono); font-weight: 700;
  color: var(--utr-blue);
}
/* Anchor variant — keep the typographic treatment, drop the default link underline,
   surface it on hover so the affordance is discoverable. */
.add-modal__preview-title a.key {
  text-decoration: none;
}
.add-modal__preview-title a.key:hover,
.add-modal__preview-title a.key:focus-visible {
  text-decoration: underline;
  color: var(--utr-dark-blue);
}
.add-modal__preview-title .sep { color: var(--app-ink-3); margin: 0 4px; }
.add-modal__preview-meta {
  font-size: 11.5px; color: var(--app-ink-3);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.add-modal__preview-meta .pill {
  font-size: 10.5px; padding: 1px 8px 1px 7px;
}
.add-modal__preview-meta .pill__dot { width: 6px; height: 6px; }

/* Inline transition control: {current pill}  →  [☑] {target pill}. Rendered inside the
   preview meta row by tickets.js when the ticket's current Jira status differs from the
   target the TicketStatusPolicy returns for the release's lifecycle state. */
.add-modal__preview-arrow {
  color: var(--app-ink-3); font-weight: 600; padding: 0 2px;
}
.add-modal__preview-transition {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
}
.add-modal__preview-transition input[type="checkbox"] {
  accent-color: var(--utr-blue);
  width: 13px; height: 13px;
}

/* Autocomplete dropdown — anchors below the key input. tickets.js shows up to 10 results;
   keyboard nav highlights via aria-selected. */
.add-modal__autocomplete {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  z-index: 10;
  margin: 0; padding: 4px;
  list-style: none;
  background: var(--app-surface);
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 320px; overflow-y: auto;
}
.add-modal__autocomplete[hidden] { display: none !important; }
.add-modal__autocomplete li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.add-modal__autocomplete li:hover,
.add-modal__autocomplete li[aria-selected="true"] {
  background: var(--app-surface-2);
}
.add-modal__autocomplete .ac-key {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  color: var(--utr-blue);
}
.add-modal__autocomplete .ac-title {
  font-size: 12.5px; color: var(--app-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.add-modal__autocomplete .ac-status {
  font-size: 10.5px; padding: 1px 8px 1px 7px;
}
.add-modal__autocomplete .ac-empty {
  padding: 8px 10px; font-size: 12px; color: var(--app-ink-3);
}

.add-modal__apps-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.add-modal__apps-help {
  font-size: 11.5px; color: var(--app-ink-3);
}
.add-modal__apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 240px; overflow-y: auto;
  padding: 8px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 9px;
  margin-bottom: 12px;
}
@media (max-width: 540px) {
  .add-modal__apps { grid-template-columns: 1fr; }
}
.add-modal__apps[data-disabled="true"] {
  opacity: 0.45; pointer-events: none;
}
.add-modal__app {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--app-ink-2);
  cursor: pointer;
  background: transparent;
  transition: background var(--dur-fast) var(--ease-brand);
  overflow: hidden;
}
.add-modal__app:hover { background: var(--app-surface); }
.add-modal__app input { accent-color: var(--utr-blue); width: 14px; height: 14px; flex-shrink: 0; }
.add-modal__app .app-name { font-weight: 700; color: var(--app-ink); }
.add-modal__app .app-sep { color: var(--app-ink-3); margin: 0 4px; }
.add-modal__app .app-repo {
  color: var(--app-ink-3); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.add-modal__app--migration .app-name { color: #92400E; }
.add-modal__app--migration::after {
  content: 'migrations'; font-family: var(--font-sans); font-size: 9.5px;
  background: rgba(217, 119, 6, 0.10); border: 1px solid #FCD34D;
  color: #92400E; padding: 0 5px; border-radius: 4px;
  margin-left: auto;
}

.add-modal__skip {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  margin-bottom: 4px;
}
.add-modal__skip input { accent-color: var(--utr-blue); margin-top: 2px; }
.add-modal__skip-help {
  display: block;
  font-size: 11.5px;
  color: var(--app-ink-3);
  margin-top: 2px;
}

.add-modal__preview--duplicate .id {
  background: rgba(217, 119, 6, 0.12); color: #92400E;
  border-color: rgba(217, 119, 6, 0.32);
}

.modal__foot .actions {
  display: inline-flex; gap: 8px; margin-left: auto;
}

/* ============================================================
   Remove-ticket modal (small, state-aware copy)
   ============================================================ */
.remove-modal__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #FEE2E2;
  display: grid; place-items: center;
  color: #DC2626;
  flex-shrink: 0;
}
.remove-modal__icon svg { width: 20px; height: 20px; }
.remove-modal__title {
  font-size: 15.5px; font-weight: 600;
  color: var(--app-ink);
  letter-spacing: -0.01em;
}
.remove-modal__title code {
  font-family: var(--font-mono); font-size: 13px;
  background: rgba(0, 83, 160, 0.08); color: var(--utr-blue);
  padding: 1px 7px; border-radius: 4px;
  border: 1px solid rgba(0, 83, 160, 0.18);
  font-weight: 700;
}
.remove-modal__body {
  font-size: 13px; color: var(--app-ink-2);
  line-height: 1.5;
  padding: 14px 22px 6px;
}
.remove-modal__body p { margin: 0 0 8px; }
.remove-modal__body p:last-child { margin-bottom: 0; }
.remove-modal__body .state-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 1px 8px;
  border-radius: 9999px;
  margin-right: 4px;
}
.remove-modal__body .state-tag--shipped { background: rgba(16, 185, 129, 0.12); color: #065F46; }
.remove-modal__body .state-tag--failed  { background: rgba(220, 38, 38, 0.10); color: #991B1B; }
.remove-modal__body .state-tag--live    { background: rgba(37, 99, 235, 0.10); color: #1E3A8A; }
.remove-modal__body .state-tag--awaiting{ background: var(--st-awaiting-bg); color: var(--st-awaiting-fg); }
.remove-modal__body code {
  font-family: var(--font-mono); font-size: 11.5px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  padding: 1px 5px;
}
.remove-modal .btn--danger-solid {
  background: #DC2626; color: #fff; border-color: #DC2626;
}
.remove-modal .btn--danger-solid:hover { background: #B91C1C; color: #fff; }

/* ============================================================
   Admin & Security panel (Settings)
   Phase 6.5 — single section in /settings beside App Services.
   The list is a vertical stack of admin rows: avatar + name + meta line + × button.
   Soft-deleted rows render with strikethrough + reduced opacity but keep their slot
   so the page doubles as an audit log.
   ============================================================ */
.admin-section { display: block; }
/* `display: block` above overrides the UA `[hidden] { display: none }` (same
   specificity, later wins). Restore the hidden semantics explicitly so the
   left-nav panel switcher can flip the admin panel off via `hidden=""`. */
.admin-section[hidden] { display: none; }
.admin-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.admin-section__head .admin-section__add-wrap {
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--app-surface);
}
.admin-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border);
}
.admin-row:last-child { border-bottom: none; }
.admin-row--removed {
  opacity: 0.55;
  background: var(--app-surface-2);
}
.admin-row--removed .admin-row__name {
  text-decoration: line-through;
}
.admin-row__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--utr-blue);
  color: #fff;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.admin-row__main { min-width: 0; }
.admin-row__name {
  font-weight: 600; color: var(--app-ink);
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-row__you {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  color: var(--utr-blue);
  background: rgba(0, 83, 160, 0.10);
  padding: 1px 7px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}
.admin-row__meta {
  font-size: 12px; color: var(--app-ink-3);
  margin-top: 2px;
  display: inline-flex; gap: 6px; flex-wrap: wrap;
  align-items: baseline;
}
.admin-row__meta b { color: var(--app-ink-2); font-weight: 600; }
.admin-row__removed-by { color: #991B1B; }
.admin-row__remove {
  width: 32px; height: 32px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--app-ink-3);
  border-radius: 6px;
  cursor: pointer;
  display: grid; place-items: center;
}
.admin-row__remove:hover {
  border-color: #FCA5A5;
  background: #FEE2E2;
  color: #DC2626;
}
.admin-row__remove svg { width: 14px; height: 14px; }
.admin-section__empty {
  padding: 18px 16px;
  font-size: 13px; color: var(--app-ink-3);
  text-align: center;
}

/* ============================================================
   28. /Error pages — 404 + 500 (compact-A ball-out design)
   Ported from docs/designs/prototype/site.css §28. Only the .err-A* / .error-details*
   blocks are brought over — .err-B/C/D explorations stayed in the prototype and were
   not selected. The metaphor: the A-mark is the chalk baseline; the ball that normally
   sits inside the A has been hit OUT. Red is reserved for the trajectory + OUT call
   only; baseline + court markings stay neutral grey.
   ============================================================ */
.err-A {
  display: flex; align-items: center;
  gap: 28px;
  padding: 28px 36px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  max-width: 680px;
  margin: 0 auto;
}
.err-A__art {
  width: 120px; height: 80px;
  flex-shrink: 0;
  display: block;  /* avoid inline-baseline whitespace + grid auto-sizing ambiguity */
}
.err-A__art .a           { fill: none; stroke: var(--app-ink); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.err-A__art .traj        { fill: none; stroke: #DC2626; stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 2 4; }
.err-A__art .ball-stroke { stroke: #0B0C0F; stroke-width: 1.1; }
.err-A__art .court       { stroke: var(--app-border-strong); stroke-width: 1; stroke-dasharray: 1.5 3; opacity: 0.7; }
.err-A__art .out         { font-family: var(--font-mono); font-size: 7px; font-weight: 800; letter-spacing: 0.16em; fill: #DC2626; }

.err-A__body { flex: 1; min-width: 0; }
.err-A__body h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.02em; }
.err-A__body p  { font-size: 13.5px; color: var(--app-ink-3); margin: 0 0 14px; line-height: 1.5; }

.err-A__meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  font-size: 11px;
  margin-bottom: 14px;
}
.err-A__meta .pill { font-size: 10.5px; padding: 1px 8px 1px 7px; }
.err-A__meta .pill__dot { width: 6px; height: 6px; }
.err-A__meta code {
  font-family: var(--font-mono); font-size: 10.5px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  padding: 1px 6px; border-radius: 3px;
  color: var(--app-ink-2);
}
.err-A__meta .js-corr {
  cursor: pointer;
  user-select: all;
  transition: background var(--dur-fast) var(--ease-brand);
}
.err-A__meta .js-corr:hover { background: var(--app-bg); }

/* 500 variant — stacks the tech-details accordion full-width below the row,
   inside the same card. Lifted from the inline <style> in error-500.html. */
.err-A--500 {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
}
.err-A--500 .err-A__details {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--app-border);
}
@media (max-width: 640px) {
  .err-A--500 { grid-template-columns: 1fr; }
}

/* Technical-details accordion (500 only, Development only) — ported from prototype §28. */
.error-details {
  text-align: left;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  overflow: hidden;
}
.error-details > summary {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--app-ink-2);
  user-select: none;
}
.error-details > summary::-webkit-details-marker { display: none; }
.error-details > summary::before {
  content: "";
  width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'><path d='m9 6 6 6-6 6'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'><path d='m9 6 6 6-6 6'/></svg>") center/contain no-repeat;
  transition: transform var(--dur-fast) var(--ease-brand);
}
.error-details[open] > summary::before { transform: rotate(90deg); }
.error-details > summary .copy-btn {
  margin-left: auto;
  background: transparent; border: 1px solid var(--app-border);
  color: var(--app-ink-3);
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  cursor: pointer; font-family: var(--font-mono);
  transition: background var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand);
}
.error-details > summary .copy-btn:hover { background: var(--app-surface); color: var(--app-ink-2); }

.error-details__body { padding: 0 14px 14px; }
.error-details__exception {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  background: #FEF2F2; border: 1px solid #FCA5A5;
  color: #991B1B;
  padding: 3px 10px;
  border-radius: 6px;
  margin-top: 4px;
}
.error-details__message {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  padding: 9px 12px;
  border-radius: 6px;
  margin: 10px 0;
  color: var(--app-ink);
  line-height: 1.5;
}
.error-details__stack {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #0B0C0F;
  color: #E4E4E7;
  padding: 12px 14px;
  border-radius: 6px;
  max-height: 280px;
  overflow: auto;
  white-space: pre;
  line-height: 1.55;
}
.error-details__stack .src-line { color: #FBBF24; }
.error-details__stack .ns       { color: #93C5FD; }
.error-details__stack .at       { color: #6B7280; }

/* Footer help line under the card */
.error-help {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--app-ink-3);
}
.error-help a { color: var(--app-ink-2); }
.error-help kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  background: var(--app-surface);
  border: 1px solid var(--app-border-strong);
  border-bottom-width: 2px;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--app-ink-2);
}

/* Prod-only muted "logged" line — replaces the tech-details accordion when not in Dev. */
.error-logged-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--app-ink-3);
  text-align: center;
}

/* Needs-review variant — per-row "+ Add" + inline app picker.
   Selectors are scoped under .tickets-section--needs-review so they reliably
   beat the base `button` / `.btn` rules without resorting to !important. */

/* Collapse the row to a single grid line: [id] [title] [audit] [Add].
   The base .ticket-row uses two rows so the apps/migration/audit strip sits
   below the title; needs-review only has a one-word audit ("no BB signal"),
   so pull it inline before the Add button. */
.tickets-section--needs-review .ticket-row.needs-review-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-rows: auto;
  align-items: center;
  column-gap: 12px;
}
.tickets-section--needs-review .ticket-row.needs-review-row .ticket-row__id    { grid-row: 1; grid-column: 1; }
.tickets-section--needs-review .ticket-row.needs-review-row .ticket-row__title { grid-row: 1; grid-column: 2; }
.tickets-section--needs-review .ticket-row.needs-review-row .ticket-row__meta {
  grid-row: 1; grid-column: 3;
  margin: 0;
  display: inline-flex; align-items: center;
}
.tickets-section--needs-review .ticket-row.needs-review-row .ticket-row__meta .ticket-row__audit {
  margin-left: 0;
}
.tickets-section--needs-review button.needs-review__add {
  grid-row: 1; grid-column: 4;
  align-self: center;
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 28px; height: 28px; padding: 0 10px;
  background: transparent !important;
  color: var(--utr-blue);
  border: 1px dashed rgba(0, 83, 160, 0.40);
  border-radius: 7px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-brand),
              border-color var(--dur-fast) var(--ease-brand),
              border-style var(--dur-fast) var(--ease-brand);
}
.tickets-section--needs-review button.needs-review__add:hover {
  background: rgba(0, 162, 255, 0.05) !important;
  border-color: var(--utr-blue);
  border-style: solid;
  color: var(--utr-blue);
}
.tickets-section--needs-review button.needs-review__add svg { width: 12px; height: 12px; }

.tickets-section--needs-review .needs-review-row[data-picking="true"] .needs-review__add { display: none; }

.tickets-section--needs-review .needs-review-picker {
  background: var(--app-surface-2);
  border-top: 1px solid var(--app-border);
  padding: 14px 16px 12px;
}
.tickets-section--needs-review .needs-review-picker__title {
  font-size: 12.5px; font-weight: 600; color: var(--app-ink-2);
  margin: 0 0 10px;
}
.tickets-section--needs-review .needs-review-picker__title .mono {
  font-family: var(--font-mono); color: var(--utr-blue);
  background: rgba(0, 83, 160, 0.08);
  padding: 1px 6px; border-radius: 4px; font-size: 11.5px;
}
.tickets-section--needs-review .needs-review-picker__apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
@media (max-width: 1100px) {
  .tickets-section--needs-review .needs-review-picker__apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tickets-section--needs-review .needs-review-picker__apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .tickets-section--needs-review .needs-review-picker__apps { grid-template-columns: 1fr; }
}
.tickets-section--needs-review .needs-review-picker__app {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--app-ink-2);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  min-width: 0;
}
.tickets-section--needs-review .needs-review-picker__app:hover {
  border-color: rgba(0, 83, 160, 0.30);
  background: rgba(0, 162, 255, 0.04);
}
.tickets-section--needs-review .needs-review-picker__app input {
  margin: 0;
  width: 14px; height: 14px;
  accent-color: var(--utr-blue);
  flex-shrink: 0;
}
.tickets-section--needs-review .needs-review-picker__app > span:nth-of-type(1) {
  font-weight: 600; color: var(--app-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tickets-section--needs-review .needs-review-picker__app .repo {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--app-ink-3);
  font-weight: 500;
  margin-left: auto;
  padding-left: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.tickets-section--needs-review .needs-review-picker__actions {
  display: flex; gap: 8px; justify-content: flex-end;
}
.tickets-section--needs-review .needs-review-picker__actions .btn {
  font-size: 12px; padding: 4px 14px; min-height: 30px; height: 30px;
}

/* ============================================================
   18. Release history panel (Phase 12b, 2026-05-29)
   Sourced from docs/designs/release-history.css. Roomy + grouped
   variant. Reuses .view-toggle (segmented control, §earlier) and
   .toggle (switch).

   Three pitfalls already solved here:
     • Expand uses `max-height: none` (instant). Animated
       max-height/grid-template-rows transitions stall at 0 in
       some engines and leave the panel invisible.
     • Timeline spine extends `--row-py` past each row at top +
       bottom so consecutive rows' segments touch (continuous
       line) and the last row's segment ends exactly at content
       bottom (no trailing gap).
     • Actor display: automated rows show the colored ACE glyph
       (no black tile); human/captain rows show a circular
       two-initial avatar.
   ============================================================ */

.rh-region {
  overflow: hidden;
  max-height: 0;
}
.rh-region.is-open { max-height: none; }
.rh-region__inner {
  padding-bottom: 20px;
  transform: translateY(-8px);
  transition: transform var(--dur-base) var(--ease-brand);
}
.rh-region.is-open .rh-region__inner { transform: translateY(0); }

/* History trigger — active treatment + chevron flip while open */
[data-rh-toggle] .icn:last-child { transition: transform var(--dur-base) var(--ease-brand); }
[data-rh-toggle][aria-expanded="true"] {
  background: rgba(0,83,160,0.07); border-color: rgba(0,83,160,0.35); color: var(--utr-blue);
}
[data-rh-toggle][aria-expanded="true"] .icn:last-child { transform: rotate(180deg); }

.rh {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 2px;
}

/* filter bar */
.rh__bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border);
}
.rh__bar-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--app-ink-3);
}
.rh__bar .view-toggle__option { font-size: 12.5px; padding: 6px 12px; }
.rh__verbose {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--app-ink-2); cursor: pointer; user-select: none;
}
.rh__bar-spacer { flex: 1; }
.rh__count { font-family: var(--font-mono); font-size: 11px; color: var(--app-ink-3); white-space: nowrap; }

/* Phase 12b auto-reload (2026-05-29): live-poll activity hint. Two dots
   (injected by release-history.js): one inside the History trigger button,
   one inside the panel's filter bar before the spacer. Both stay invisible
   until the JS adds .is-live during a poll cycle, then pulse softly so the
   captain can tell at a glance the panel is auto-refreshing. The pulse is
   2s + 60% min opacity so it reads as "live", not "loading". */
.rh-live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--st-success-fg, #16a34a);
  vertical-align: middle;
  opacity: 0;
  transition: opacity 120ms ease;
}
.rh-live-dot.is-live {
  opacity: 1;
  animation: rh-live-pulse 2s ease-in-out infinite;
}
@keyframes rh-live-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  50%      { opacity: 1.00; transform: scale(1.00); }
}

/* Phase 12c follow-up (2026-05-30): bare http(s) URLs in captain-typed
   reasons (cancel, override, bypass) are wrapped as <a class="rh-link">
   by linkify(). Inherit the app's existing anchor styling but mark them
   visually distinct from the chip-style .rh-jira / .rh-ado links — those
   are pill-shaped affordances, .rh-link is a plain underlined URL. */
.rh-link {
  color: var(--app-accent, #2563eb);
  text-decoration: underline;
  word-break: break-all;
}
.rh-link:hover { text-decoration: none; }

/* scroll region — caps the panel and keeps sticky eyebrows working */
.rh__scroll { max-height: 480px; overflow-y: auto; overscroll-behavior: contain; }
.rh__scroll::-webkit-scrollbar { width: 10px; }
.rh__scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.14); border-radius: 9999px; border: 3px solid var(--app-surface);
}

/* sticky operation eyebrow — the operation name renders as a pill */
.rh-grp__head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 6px;
  background: var(--app-surface);   /* opaque so rows scroll under cleanly */
}
.rh-grp__pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 9999px;
  background: var(--app-surface-2); border: 1px solid var(--app-border);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--app-ink-2);
}
.rh-grp__head .line { flex: 1; height: 1px; background: transparent; } /* invisible spacer */
.rh-grp__head .n {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--app-ink-3);
}

/* event row — [icon rail | body | time] */
.rh-ev {
  position: relative; display: grid;
  grid-template-columns: 30px 1fr auto; column-gap: 12px;
  padding: 12px 16px;                 /* 12px == --row-py, see spine note */
  transition: background var(--dur-fast) var(--ease-brand);
}
.rh-ev:hover { background: var(--app-surface-2); }

/* timeline spine — continuous vertical line behind the icon nodes.
   It extends by exactly one row's vertical padding (--row-py) at top and
   bottom so consecutive rows' segments touch (continuous line) while the
   last row's segment ends exactly at the content bottom (NO trailing gap).
   --row-py is set per density on the .rh container (12px for this variant). */
.rh-ev__rail { position: relative; display: flex; justify-content: center; }
.rh-ev__rail::before {
  content: ""; position: absolute;
  top: calc(-1 * var(--row-py, 12px)); bottom: calc(-1 * var(--row-py, 12px));
  left: 50%; width: 1px;
  background: var(--app-border); transform: translateX(-0.5px);
}
.rh-ev__icon {
  position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 9999px;
  display: grid; place-items: center; background: var(--app-surface); margin-top: -1px;
}
.rh-ev__icon svg { width: 16px; height: 16px; stroke-width: 1.75; fill: none; }
.rh-ev__icon--ok      { color: var(--st-success-dot); }
.rh-ev__icon--fail    { color: var(--st-failed-dot); }
.rh-ev__icon--captain { color: var(--utr-blue); }
.rh-ev__icon--slack   { color: var(--st-deploying-dot); }
.rh-ev__icon--info    { color: var(--app-ink-3); }

.rh-ev__body { min-width: 0; }
.rh-ev__msg { font-size: 13.5px; color: var(--app-ink-2); line-height: 1.5; text-wrap: pretty; }
.rh-ev--info .rh-ev__msg { color: var(--app-ink-3); }
.rh-ev__actor { font-weight: 600; color: var(--app-ink); }
/* Phase 12b polish (2026-05-29): release slug, BB repo names, app names, and
   count phrases get wrapped via the server-side mapper's [[b:…]] token so the
   captain can scan magnitudes + identifiers in the timeline at a glance.
   Same weight as the actor — matches the visual hierarchy of "what stands
   out". Inherits color from .rh-ev__msg so info rows stay gray. */
.rh-ev__bold { font-weight: 600; color: var(--app-ink); }
.rh-ev--info .rh-ev__bold { color: var(--app-ink-2); }
/* Phase 12b polish (2026-05-29): tickets code-block. Merged per-ticket rows
   in the history panel use a [[tickets:K1,K2,K3]] token that the JS expands
   to a bordered container with each KEY as a .rh-jira chip. Chips wrap
   naturally inside, so a 29-key release stays readable. Subtle background
   + border — softer than the err block (this isn't an error). */
.rh-ev__tickets {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  line-height: 1.9;
}
.rh-ev__tickets .rh-jira {
  margin: 0 4px 2px 0;
}

/* Phase 12b polish (2026-05-29): fail-row error details get a code-block
   treatment — visual break from the lead-in copy + light-red background that
   matches the row's red x-circle icon. JSON-ish error payloads stay readable
   because we soft-wrap rather than syntax-highlight. The mapper splits on the
   first ': ' so "Failed to create branch for X: <details>" lands with "details"
   inside this block. */
.rh-ev__err {
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--st-failed-bg);
  border-left: 3px solid var(--st-failed-dot);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--st-failed-fg);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ACE glyph (automated/system actor) — colored gradient mark, NO black tile */
.rh-ev__ace-logo {
  width: 24px; height: 24px;
  vertical-align: middle; margin-right: 7px;
  flex: none; display: inline-block;
}
/* captain (human actor) — circular two-initial avatar, brand-blue gradient */
.rh-ev__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--utr-blue), var(--utr-light-blue));
  color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em;
  vertical-align: middle; margin-right: 7px; flex: none;
}
.rh-ev__time {
  font-family: var(--font-mono); font-size: 11px; color: var(--app-ink-3);
  white-space: nowrap; align-self: flex-start; margin-top: 1px; cursor: default;
}
.rh-ev__quote { color: var(--app-ink-2); }

/* inline link tokens inside messages */
.rh-jira {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; line-height: 1.3;
  color: var(--utr-blue); background: rgba(0,162,255,0.10);
  border: 1px solid rgba(0,83,160,0.35); border-radius: 4px;
  padding: 0 5px; margin: 0 1px; vertical-align: baseline;
}
.rh-jira:hover { background: rgba(0,162,255,0.18); text-decoration: none; }
.rh-ado { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--utr-blue); }
.rh-ado:hover { text-decoration: underline; text-underline-offset: 2px; }
.rh-branch {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--app-ink-2);
  background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 4px;
  padding: 0 5px; white-space: nowrap;
}
.rh-branch__sha { color: var(--app-ink-3); }

/* Phase 12b polish (2026-05-29): inline status pill for transition narrations.
   Server-side wraps "Done" / "In RC QA" / "Merged" / "Failed" / "passed" / etc.
   in [[pill:LABEL:STYLE]] tokens; JS expands to <span class="rh-status
   rh-status--{style}"> with a colored dot + label. Compact (smaller than the
   page-header pills) so it fits inside an inline audit message without
   visually dominating it. Colors reuse the --st-* tokens so the variants stay
   in sync with the release-list page's status column. */
.rh-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 9999px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.02em;
  border: 1px solid transparent;
  vertical-align: baseline;
  margin: 0 1px;
  white-space: nowrap;
}
.rh-status__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.rh-status--success  { color: var(--st-success-fg);  background: var(--st-success-bg);  }
.rh-status--failed   { color: var(--st-failed-fg);   background: var(--st-failed-bg);   }
.rh-status--running  { color: var(--st-running-fg);  background: var(--st-running-bg);  }
.rh-status--neutral  { color: var(--st-neutral-fg);  background: var(--st-neutral-bg);  }
.rh-status--pwfail   { color: var(--st-pwfail-fg);   background: var(--st-pwfail-bg);   }
.rh-status--awaiting { color: var(--st-awaiting-fg); background: var(--st-awaiting-bg); }

/* empty / no-match state */
.rh__empty {
  margin: 24px; padding: 40px 24px; text-align: center;
  border: 1px dashed var(--app-border-strong); border-radius: 12px;
}
.rh__empty .ico {
  width: 42px; height: 42px; border-radius: 10px; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--app-surface-2); color: var(--app-ink-3);
}
.rh__empty .ico svg { width: 20px; height: 20px; stroke-width: 1.75; fill: none; }
.rh__empty h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; color: var(--app-ink); }
.rh__empty p { font-size: 13px; color: var(--app-ink-3); margin: 0; }

@media (max-width: 680px) {
  .rh__bar { padding: 12px; }
  .rh-ev, .rh-grp__head { padding-left: 12px; padding-right: 12px; }
}

/* ------------------------------------------------------------
   X. About ACE (Phase 16)
   Three sub-sections under Settings → About:
     – Release Process walkthrough  (linear narrative + scroll-spy)
     – Troubleshooting Q&A          (accordion + search filter)
     – Resources                    (branded link cards)
   All three live inside `<section id="panel-about">` and share a
   secondary tab strip. Brand colors come from utr-tokens.css; the
   styles below are layout-only.
   ------------------------------------------------------------ */
.about-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--app-border);
  margin: 8px 0 20px;
}
.about-tabs__tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--app-ink-3);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--dur-fast) var(--ease-brand), border-color var(--dur-fast) var(--ease-brand);
}
.about-tabs__tab:hover { color: var(--app-ink); }
.about-tabs__tab[aria-selected="true"],
.about-tabs__tab--active {
  color: var(--utr-blue);
  border-bottom-color: var(--utr-blue);
}
.about-pane[hidden] { display: none; }

/* ── Release Process walkthrough ─────────────────────────────── */
.about-rp {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.about-rp__nav {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  font-size: 12.5px;
}
.about-rp__nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--app-ink-2);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand);
}
.about-rp__nav-link:hover { background: var(--app-surface-2); color: var(--app-ink); text-decoration: none; }
.about-rp__nav-link[aria-current="true"] {
  background: rgba(0, 83, 160, 0.10);
  color: var(--utr-blue);
  font-weight: 600;
}
.about-rp__nav-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--app-ink-3);
  flex-shrink: 0;
}
.about-rp__nav-link[aria-current="true"] .about-rp__nav-num {
  background: var(--utr-blue);
  border-color: var(--utr-blue);
  color: var(--utr-white);
}

.about-rp__sections { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.about-rp__lede {
  font-size: 14px;
  color: var(--app-ink-2);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0;
  line-height: 1.6;
}
.about-rp__section {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 22px 24px;
  scroll-margin-top: 80px;
}
.about-rp__section h3 {
  font-size: 16px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-rp__section h3 .about-rp__num-chip {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(0, 162, 255, 0.10);
  color: var(--utr-blue);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.about-rp__section .about-rp__lead {
  margin: 0 0 12px;
  color: var(--app-ink-3);
  font-size: 12.5px;
}
.about-rp__section p { font-size: 13.5px; line-height: 1.6; margin: 8px 0; color: var(--app-ink-2); }
.about-rp__section code {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11.5px;
  color: var(--app-ink-2);
}
.about-rp__section ul { padding-left: 22px; margin: 8px 0; }
.about-rp__section ul li { font-size: 13.5px; line-height: 1.7; color: var(--app-ink-2); }

.about-rp__state-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0 4px;
}
.about-rp__state {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--st-running-bg);
  color: var(--st-running-fg);
  border: 1px solid transparent;
}
.about-rp__state--ok       { background: var(--st-success-bg); color: var(--st-success-fg); }
.about-rp__state--warn     { background: var(--st-awaiting-bg); color: var(--st-awaiting-fg); }
.about-rp__state--fail     { background: var(--st-failed-bg);   color: var(--st-failed-fg); }
.about-rp__state--terminal { background: var(--st-neutral-bg);  color: var(--st-neutral-fg); }
.about-rp__state-arrow {
  display: inline-flex; align-items: center;
  color: var(--app-ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 0 2px;
}

/* ── Troubleshooting accordion ───────────────────────────────── */
.about-ts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-ts__filter {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px 14px 4px 16px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  margin-bottom: 4px;
  transition: border-color var(--dur-fast) var(--ease-brand),
              box-shadow var(--dur-fast) var(--ease-brand);
}
.about-ts__filter:focus-within {
  border-color: var(--utr-blue);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.15);
}
.about-ts__filter input {
  flex: 1; min-width: 0;
  border: none; background: transparent;
  padding: 0 0 0 27px;
  height: 40px;
  font-size: 13.5px;
  line-height: normal;
}
.about-ts__filter input:focus { outline: none; box-shadow: none; border: none; }
.about-ts__filter-icn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--app-ink-3);
  pointer-events: none;
}
.about-ts__filter-legend {
  font-size: 12px;
  color: var(--app-ink-3);
  white-space: nowrap;
  padding-left: 12px;
  border-left: 1px solid var(--app-border);
  margin-left: 12px;
}
.about-ts__filter-legend strong { color: var(--app-ink-2); font-weight: 600; }

.about-ts__item {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  overflow: hidden;
}
.about-ts__item[data-filter-hidden="true"] { display: none; }
.about-ts__item[open] { box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.about-ts__head {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--app-ink);
}
.about-ts__head::-webkit-details-marker { display: none; }
.about-ts__chevron {
  width: 14px; height: 14px;
  transition: transform var(--dur-fast) var(--ease-brand);
  color: var(--app-ink-3);
  flex-shrink: 0;
}
.about-ts__item[open] .about-ts__chevron { transform: rotate(90deg); }
.about-ts__q { flex: 1; min-width: 0; }
.about-ts__sev {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.about-ts__sev--info { background: var(--st-initiated-bg); color: var(--st-initiated-fg); }
.about-ts__sev--warn { background: var(--st-awaiting-bg);  color: var(--st-awaiting-fg); }
.about-ts__sev--sql  { background: var(--st-failed-bg);    color: var(--st-failed-fg); }
.about-ts__body {
  padding: 4px 18px 18px 44px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--app-ink-2);
  border-top: 1px solid var(--app-border);
  margin-top: -1px;
}
.about-ts__body p { margin: 8px 0; }
.about-ts__body ul, .about-ts__body ol { padding-left: 22px; margin: 8px 0; }
.about-ts__body li { margin: 4px 0; }
.about-ts__body code {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11.5px;
  color: var(--app-ink-2);
}
.about-ts__body strong { color: var(--app-ink); }
.about-ts__empty {
  padding: 28px;
  text-align: center;
  color: var(--app-ink-3);
  background: var(--app-surface);
  border: 1px dashed var(--app-border-strong);
  border-radius: 10px;
}

/* ── Resources cards ─────────────────────────────────────────── */
.about-resources__lede {
  font-size: 13.5px;
  color: var(--app-ink-2);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 18px;
}
.about-resources__lede code {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11.5px;
  color: var(--app-ink-2);
}
.about-resources__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.resource-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.resource-card__head { display: flex; align-items: center; gap: 12px; }
.resource-card__logo {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--app-surface-2);
  flex-shrink: 0;
}
.resource-card__logo svg { width: 22px; height: 22px; }
.resource-card__logo--mono { color: var(--app-ink-2); }
.resource-card__heading { min-width: 0; flex: 1; }
.resource-card__title { font-size: 14px; font-weight: 600; color: var(--app-ink); }
.resource-card__sub   { font-size: 12px; color: var(--app-ink-3); margin-top: 1px; }
.resource-card__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.resource-card__links li {
  display: flex; flex-direction: column;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--app-surface-2);
  border: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-brand);
}
.resource-card__links li:hover { border-color: var(--app-border-strong); }
.resource-card__links a { font-size: 13px; font-weight: 600; color: var(--utr-blue); }
.resource-card__hint {
  font-size: 11.5px;
  color: var(--app-ink-3);
  margin-top: 2px;
}
.resource-card__hint--admin { color: #92400E; }
.resource-card__hint--warn  { color: #B91C1C; }
.resource-card__plain { font-size: 13px; font-weight: 600; color: var(--app-ink-2); }
.resource-card__missing {
  font-size: 13px;
  color: var(--app-ink-3);
  font-style: italic;
}
.resource-card__details {
  border-top: 1px solid var(--app-border);
  padding-top: 8px;
  margin-top: 4px;
}
.resource-card__details summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--app-ink-2);
  font-weight: 600;
  padding: 4px 0;
  list-style: none;
}
.resource-card__details summary::-webkit-details-marker { display: none; }
.resource-card__details summary::before {
  content: "›";
  display: inline-block;
  width: 14px;
  color: var(--app-ink-3);
  transition: transform var(--dur-fast) var(--ease-brand);
}
.resource-card__details[open] summary::before { transform: rotate(90deg); }
.resource-card__sublinks {
  list-style: none;
  padding: 6px 0 4px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}
.resource-card__sublinks li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
  border-radius: 4px;
}
.resource-card__sublinks li:hover { background: var(--app-surface-2); }
.resource-card__sublinks a { font-size: 12.5px; color: var(--utr-blue); }
.resource-card__id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--app-ink-3);
  flex-shrink: 0;
}

/* ── Behind the Scenes (engineer-facing) ─────────────────────────
   Reuses the .about-rp shell (nav + sections + scroll-spy) so the
   layout matches Release Process. Adds a denser table + code-block
   treatment for the technical reference content. */
.about-bts__table-wrap {
  overflow-x: auto;
  margin: 10px 0;
  border: 1px solid var(--app-border);
  border-radius: 8px;
}
.about-bts__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: var(--app-surface);
}
.about-bts__table thead th {
  text-align: left;
  background: var(--app-surface-2);
  color: var(--app-ink);
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid var(--app-border);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.about-bts__table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--app-border);
  color: var(--app-ink-2);
  vertical-align: top;
  line-height: 1.5;
}
.about-bts__table tbody tr:last-child td { border-bottom: 0; }
.about-bts__table tbody tr:hover td { background: rgba(0, 162, 255, 0.04); }
.about-bts__table code {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  color: var(--app-ink-2);
  white-space: nowrap;
}
.about-bts__code {
  background: #0F172A;
  color: #E2E8F0;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  margin: 10px 0;
  overflow-x: auto;
  white-space: pre;
}

/* ============================================================
   About ACE — Release Process (Claude Design output, Phase 16.1)
   Ported from docs/designs/release-process.html. Section anchors
   `#rp-1`…`#rp-8` and behavior contract documented in
   docs/designs/README.md.
   ============================================================ */

/* ---- settings-nav count badge (re-used by Admin & Security) ---- */
.settings-nav__count { margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--utr-blue); background: rgba(0,162,255,0.12); border-radius: 5px; padding: 1px 6px; }

/* ---- Panel header ---- */
.rp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 4px; }
.rp-head__title { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.rp-head__lede { color: var(--app-ink-3); font-size: 13.5px; line-height: 1.55; margin: 8px 0 0; max-width: 60ch; }
.rp-head__lede b { color: var(--app-ink-2); font-weight: 600; }
.rp-present-btn { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rp-present-btn .icn { width: 15px; height: 15px; }

/* ---- Sticky stage strip ----
   Horizontal padding (12px) is wider than vertical (9px) so the leftmost +
   rightmost pills don't visually touch the card border when active — the
   active state adds its own colored border that lands right against the
   card edge with symmetric padding. scroll-padding-inline mirrors that
   inset so any auto-scrollIntoView call from JS doesn't tuck the active
   pill flush against the edge either. */
.rp-strip { position: sticky; top: 56px; z-index: 30; margin: 20px 0 26px; padding: 9px 12px; background: rgba(255,255,255,0.82); backdrop-filter: saturate(1.4) blur(8px); border: 1px solid var(--app-border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.rp-strip__track { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 6px; }
.rp-strip__track::-webkit-scrollbar { display: none; }
.rp-strip__pill { position: relative; flex: 1 1 0; min-width: 92px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 10px; border: 1px solid transparent; background: var(--app-surface-2); color: var(--app-ink-2); text-decoration: none; transition: background var(--dur-fast) var(--ease-brand), border-color var(--dur-fast) var(--ease-brand), color var(--dur-fast) var(--ease-brand); }
.rp-strip__pill:hover { background: #fff; border-color: var(--app-border-strong); color: var(--app-ink); text-decoration: none; }
.rp-strip__num { display: inline-grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; font-family: var(--font-mono); font-size: 11px; font-weight: 700; background: #fff; border: 1.5px solid var(--app-border-strong); color: var(--app-ink-2); transition: all var(--dur-fast) var(--ease-brand); }
.rp-strip__label { font-size: 11.5px; font-weight: 600; letter-spacing: -0.1px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* completed = dim green */
.rp-strip__pill[data-state="done"] .rp-strip__num { background: var(--st-success-bg); border-color: var(--st-success-dot); color: var(--st-success-fg); }
.rp-strip__pill[data-state="done"] { color: var(--app-ink-2); }
.rp-strip__pill[data-state="done"] .rp-strip__num::after { content: "✓"; }
.rp-strip__pill[data-state="done"] .rp-strip__num span { display: none; }
/* current = highlighted */
.rp-strip__pill[data-state="current"] { background: rgba(0,83,160,0.07); border-color: rgba(0,83,160,0.30); color: var(--utr-blue); }
.rp-strip__pill[data-state="current"] .rp-strip__num { background: var(--utr-blue); border-color: var(--utr-blue); color: #fff; }
/* hover tooltip */
.rp-strip__tip { position: absolute; left: 50%; top: calc(100% + 9px); transform: translateX(-50%) translateY(4px); width: max-content; max-width: 230px; padding: 8px 11px; background: var(--utr-black); color: #fff; font-size: 11.5px; line-height: 1.4; font-weight: 500; border-radius: 8px; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-brand), transform var(--dur-fast) var(--ease-brand); z-index: 5; }
.rp-strip__tip::before { content: ""; position: absolute; left: 50%; top: -4px; transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: var(--utr-black); }
.rp-strip__pill:hover .rp-strip__tip, .rp-strip__pill:focus-visible .rp-strip__tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Content grid: flow + slack rail ---- */
.rp-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 32px; align-items: start; }
.rp-flow { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* ---- Section ---- */
.rp-section { scroll-margin-top: 132px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 16px; padding: 26px 28px 28px; transition: border-color var(--dur-fast) var(--ease-brand), box-shadow var(--dur-fast) var(--ease-brand); }
.rp-section.is-active { border-color: rgba(0,83,160,0.22); box-shadow: 0 0 0 3px rgba(0,162,255,0.06), var(--shadow-sm); }
.rp-section__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.rp-section__num { flex-shrink: 0; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--utr-u-gradient); color: #00262b; font-family: var(--font-mono); font-size: 18px; font-weight: 800; box-shadow: 0 2px 10px rgba(1,223,203,0.30); }
.rp-section__heading { flex: 1; min-width: 0; }
.rp-section__eyebrow { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--app-ink-3); }
.rp-section__title { font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 3px 0 0; }
.rp-section__logos { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.rp-logo { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 7px; border-radius: 999px; background: var(--app-surface-2); border: 1px solid var(--app-border); font-size: 11.5px; font-weight: 600; color: var(--app-ink-2); }
.rp-logo svg { width: 18px; height: 18px; flex-shrink: 0; }
.rp-logo--inline { padding: 1px 7px 1px 4px; vertical-align: 2px; gap: 5px; }
.rp-logo--inline svg { width: 15px; height: 15px; }

/* ---- Prose ---- */
.rp-prose { color: var(--app-ink-2); font-size: 14.5px; line-height: 1.62; }
.rp-prose p { margin: 0 0 13px; }
.rp-prose p:last-child { margin-bottom: 0; }
.rp-prose strong { color: var(--app-ink); font-weight: 700; }
.rp-prose code, .rp-code { font-family: var(--font-mono); font-size: 0.86em; background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 5px; padding: 1px 6px; color: var(--utr-dark-blue); }
.rp-prose ul { margin: 0 0 13px; padding-left: 2px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rp-prose ul li { position: relative; padding-left: 22px; }
.rp-prose ul li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 7px; height: 7px; border-radius: 2px; background: var(--utr-light-blue); }
.rp-prose ul li strong { color: var(--app-ink); }

.rp-cols { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; align-items: start; }
@media (max-width: 700px) { .rp-cols { grid-template-columns: 1fr; gap: 16px; } }

/* ---- "What you see" mini-mockup ---- */
.rp-mock { border: 1px solid var(--app-border); border-radius: 12px; overflow: hidden; background: var(--app-surface); }
.rp-mock__bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--app-surface-2); border-bottom: 1px solid var(--app-border); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--app-ink-3); }
.rp-mock__bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--utr-light-blue); box-shadow: 0 0 0 3px rgba(0,162,255,0.18); }
.rp-mock__body { padding: 16px; }

/* mock: releases-list row */
.rp-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--app-border); border-radius: 10px; background: var(--app-surface); }
.rp-row + .rp-row { margin-top: 8px; }
.rp-row__slug { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--app-ink); }
.rp-row__meta { font-size: 11.5px; color: var(--app-ink-3); margin-left: auto; }
.rp-row--new { border-color: rgba(0,162,255,0.40); box-shadow: 0 0 0 3px rgba(0,162,255,0.10); }

/* mock: repo checklist rows */
.rp-repo { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--app-border); border-radius: 9px; background: var(--app-surface); }
.rp-repo + .rp-repo { margin-top: 7px; }
.rp-repo__check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; background: var(--st-success-dot); color: #fff; }
.rp-repo__check svg { width: 11px; height: 11px; }
.rp-repo__check--idle { background: #fff; border: 1.5px solid var(--app-border-strong); }
.rp-repo__name { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--app-ink); }
.rp-repo__tickets { font-size: 11px; color: var(--app-ink-3); margin-left: auto; }

/* mock: QA chips grid */
.rp-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-chip { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--app-border); border-radius: 9px; background: var(--app-surface); font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--app-ink); }
.rp-chip__sp { margin-left: auto; }

/* mock: promote button row + audit log line */
.rp-mock__line { display: flex; align-items: center; gap: 10px; }
.rp-mock__line + .rp-mock__line { margin-top: 10px; }
.rp-audit { display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 9px; font-size: 12px; line-height: 1.45; color: var(--app-ink-2); }
.rp-audit__who { display: inline-grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg, var(--utr-blue), var(--utr-light-blue)); color: #fff; font-size: 9px; font-weight: 700; }
.rp-audit__t { font-family: var(--font-mono); color: var(--app-ink-3); font-size: 10.5px; }
.rp-audit strong { color: var(--app-ink); font-weight: 600; }

/* ---- Animated state diagram ---- */
.rp-diagram { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px; background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 12px; }
.rp-node { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--app-border-strong); font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--app-ink); white-space: nowrap; }
.rp-node--accent { border-color: var(--utr-light-blue); color: var(--utr-blue); background: rgba(0,162,255,0.06); }
.rp-node--green { border-color: var(--st-success-dot); color: var(--st-success-fg); background: var(--st-success-bg); }
.rp-arrow { color: var(--app-ink-3); flex-shrink: 0; display: inline-flex; }
.rp-arrow svg { width: 22px; height: 14px; }
.rp-diagram__cap { width: 100%; font-size: 11.5px; color: var(--app-ink-3); margin-top: 2px; }

/* reveal animation — end state is the base. Hidden ONLY when JS is on AND
   motion is allowed, so no-JS / print / reduced-motion always show content.
   Uses transitions (not keyframes) so the resting state computes as opacity:1
   — survives capture, print, and PDF export. */
@media (prefers-reduced-motion: no-preference) {
  .rp-js .rp-anim { opacity: 0; transform: translateY(9px); transition: opacity 0.45s var(--ease-brand), transform 0.45s var(--ease-brand); transition-delay: calc(var(--i, 0) * 0.07s); }
  .rp-js [data-inview] .rp-anim { opacity: 1; transform: none; }
}
/* Print / PDF: never hide content behind the scroll-reveal */
@media print { .rp-anim { opacity: 1 !important; transform: none !important; } .rp-slack, .rp-strip { position: static !important; } }

/* ---- §7 recovery cards ---- */
.rp-recover { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (max-width: 620px) { .rp-recover { grid-template-columns: 1fr; } }
.rp-recover__card { display: flex; flex-direction: column; gap: 8px; padding: 15px 16px; border: 1px solid var(--app-border); border-radius: 12px; background: var(--app-surface); transition: border-color var(--dur-fast) var(--ease-brand), box-shadow var(--dur-fast) var(--ease-brand), transform var(--dur-fast) var(--ease-brand); }
.rp-recover__card:hover { border-color: var(--app-border-strong); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.rp-recover__btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 8px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--app-border-strong); background: #fff; color: var(--app-ink); cursor: default; }
.rp-recover__btn .icn { width: 14px; height: 14px; }
.rp-recover__btn--danger { color: var(--color-danger); border-color: #FCA5A5; background: #fff; }
.rp-recover__btn--primary { color: #fff; background: var(--utr-blue); border-color: var(--utr-blue); }
.rp-recover__when { font-size: 12.5px; line-height: 1.5; color: var(--app-ink-2); }
.rp-recover__when b { color: var(--app-ink); font-weight: 600; }

/* ---- §8 drift cards ---- */
.rp-drift { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .rp-drift { grid-template-columns: 1fr; } }
.rp-drift__card { border: 1px solid var(--app-border); border-radius: 12px; padding: 16px; background: var(--app-surface); }
.rp-drift__title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--app-ink); margin-bottom: 12px; }
.rp-drift__title .ic { width: 17px; height: 17px; color: var(--step-amber); }
.rp-drift__diagram { display: flex; flex-direction: column; gap: 8px; }
.rp-driftbanner { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px; font-size: 11.5px; font-weight: 600; background: var(--step-amber-bg); border: 1px solid var(--step-amber); color: #92400E; }
.rp-driftbanner .ic { width: 15px; height: 15px; flex-shrink: 0; }

/* ---- Slack background thread rail ---- */
.rp-slack { position: sticky; top: 132px; align-self: start; border: 1px solid var(--app-border); border-radius: 16px; overflow: hidden; background: var(--app-surface); box-shadow: var(--shadow-sm); }
.rp-slack__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--app-border); background: var(--app-surface-2); }
.rp-slack__head > svg { width: 18px; height: 18px; flex-shrink: 0; }
/* Channel name takes the middle column; long names (e.g. #release-team-communication)
   stay on one line with ellipsis fallback rather than wrapping in the narrow rail. */
.rp-slack__channel { font-weight: 700; font-size: 12.5px; color: var(--app-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.rp-slack__channel .hash { color: var(--app-ink-3); font-weight: 600; }
/* Thread indicator — uses the Slack `:thread:` emoji (🧵 U+1F9F5) instead of
   text so the header fits long channel names. Title + aria-label keep the
   meaning for SR users; line-height clamps the emoji's vertical metric so
   it doesn't push the header taller than the channel-name baseline. */
.rp-slack__sub { display: inline-flex; align-items: center; color: var(--app-ink-3); flex-shrink: 0; font-size: 15px; line-height: 1; }
.rp-slack__sub svg { width: 15px; height: 15px; }
.rp-slack__thread { padding: 13px 15px; display: flex; flex-direction: column; gap: 13px; max-height: calc(100vh - 230px); overflow-y: auto; }
.rp-msg { display: grid; grid-template-columns: 28px 1fr; gap: 9px; opacity: 0.32; filter: saturate(0.6); transition: opacity var(--dur-base) var(--ease-brand), filter var(--dur-base) var(--ease-brand); }
.rp-msg.is-live { opacity: 1; filter: none; }
.rp-msg__av { width: 28px; height: 28px; border-radius: 7px; background: var(--utr-u-gradient); display: grid; place-items: center; }
.rp-msg__av svg { width: 17px; height: 17px; }
.rp-msg__top { display: flex; align-items: baseline; gap: 7px; margin-bottom: 2px; }
.rp-msg__name { font-size: 12.5px; font-weight: 700; color: var(--app-ink); }
.rp-msg__bot { font-size: 8.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--utr-blue); background: rgba(0,162,255,0.12); border-radius: 3px; padding: 1px 4px; }
.rp-msg__time { font-size: 10px; color: var(--app-ink-3); font-family: var(--font-mono); }
.rp-msg__body { font-size: 12px; line-height: 1.5; color: var(--app-ink-2); }
.rp-msg__body code { font-family: var(--font-mono); font-size: 0.9em; color: var(--utr-dark-blue); }
.rp-msg__body .warn { color: #92400E; font-weight: 600; }

/* ============================================================
   Responsive — Release Process
   ============================================================ */
@media (max-width: 1024px) {
  .rp-grid { grid-template-columns: 1fr; }
  .rp-slack { position: static; max-width: 520px; }
  .rp-slack__thread { max-height: none; }
}
@media (max-width: 540px) {
  .rp-section { padding: 20px 18px 22px; }
  .rp-strip__label { display: none; }
  .rp-strip__pill { min-width: 0; justify-content: center; }
  .rp-chips { grid-template-columns: 1fr; }
}
