/* JIS CodeVault portal -- light, professional, clean (house preference). Design-token values
   from RapidDevelopment/DESIGN-TOKENS.md, pinned to the LIGHT palette (this app has no dark-mode
   toggle at skeleton stage -- SKEL-011 scope is the shell, not theming). Served from wwwroot so
   the nonce-CSP's "style-src 'self'" (no 'unsafe-inline') is satisfied by an external file rather
   than any <style> block or style="" attribute. */

/* SKEL-213: the signed-off mockup v20 tokens (Docs/UX/codevault-portal-mockup.html, :root), light
   theme only (operator preference; the mockup's dark block is deliberately not copied). The mockup
   names come first; the --color-* / --space-* / --radius-* names below them are the portal's older
   names, kept so every existing rule inherits the new look without a per-rule edit -- later
   restyle tickets move components to the mockup names. */
:root {
  --bg-page: #f5f5f5;
  --bg-surface: #ffffff;
  --bg-subtle: #fafafa;
  --bg-hover: #f0f0f0;
  --bg-selected: #ebf3fc;
  --fg1: #242424;
  --fg2: #424242;
  --fg3: #616161;
  --fg-disabled: #bdbdbd;
  --stroke1: #d1d1d1;
  --stroke2: #e0e0e0;
  --stroke-acc: #616161;
  --brand: #0f6cbd;
  --brand-hover: #115ea3;
  --brand-pressed: #0c3b5e;
  --brand-fg: #0f6cbd;
  --brand-soft: #ebf3fc;
  --brand-soft-bd: #b4d6fa;
  --on-brand: #ffffff;
  --appbar: #0f6cbd;
  --appbar-fg: #ffffff;
  --avatar-bg: #ffffff;
  --avatar-fg: #0f6cbd;
  --ok-fg: #0e700e;
  --ok-bg: #f1faf1;
  --ok-bd: #9fd89f;
  --bad-fg: #b10e1c;
  --bad-bg: #fdf3f4;
  --bad-bd: #eeacb2;
  --warn-fg: #8a3707;
  --warn-bg: #fff9f5;
  --warn-bd: #fdcfb4;
  --info-fg: #424242;
  --info-bg: #f0f0f0;
  --info-bd: #d1d1d1;
  --shadow4: 0 0 2px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .14);
  --shadow16: 0 0 2px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .14);
  --font: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, "Courier New", monospace;
  --appbar-height: 48px;
  --tabbar-height: 56px;
  color-scheme: light;

  --color-primary: var(--brand);
  --color-primary-dark: var(--brand-hover);
  --color-error: var(--bad-fg);
  --color-error-bg: var(--bad-bg);
  --color-error-border: var(--bad-bd);
  --color-success: var(--ok-fg);
  --color-success-bg: var(--ok-bg);
  --color-success-border: var(--ok-bd);
  --color-warning: var(--warn-fg);
  --color-warning-bg: var(--warn-bg);
  --color-warning-border: var(--warn-bd);
  --color-surface-0: var(--bg-surface);
  --color-surface-50: var(--bg-subtle);
  --color-surface-100: var(--bg-hover);
  --color-surface-200: var(--stroke2);
  --color-surface-300: var(--stroke1);
  --color-text-primary: var(--fg1);
  --color-text-secondary: var(--fg3);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --shadow-md: var(--shadow4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/20px var(--font);
  color: var(--fg1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-fg); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--fg1); outline-offset: 2px; border-radius: 2px; }

/* ---- Chrome-free auth pages (login, invite-redeem) ---- */

/* SKEL-213: mockup v20's sign-in layout (.authcard): a 420px card on the page background, the
   brand above the heading, no menu. */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin: var(--space-xl) auto;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow4);
  padding: var(--space-xl);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  color: var(--brand-fg);
}

.auth-card h1 {
  margin: 0 0 var(--space-xs) 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.auth-card .subtitle {
  margin: 0 0 var(--space-lg) 0;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.field {
  margin-bottom: var(--space-md);
}

.field label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 14px;
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--color-surface-300);
  border-radius: var(--radius-md);
  background: var(--color-surface-0);
  color: var(--color-text-primary);
}

.field input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: var(--color-primary);
}

.btn-primary {
  width: 100%;
  min-height: 44px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-brand);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-primary:hover { background: var(--color-primary-dark); }

.alert-error {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 14px;
  color: var(--color-error);
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius-md);
}

/* SKEL-194: the reset pages' one plain sentence (neutral, not an error), the small links under a
   form, and a link that looks like the primary button. */
.auth-notice {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 14px;
  color: var(--color-text-primary);
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  border-radius: var(--radius-md);
}

.status-locked {
  color: var(--color-error);
  font-weight: 600;
}

.auth-identity {
  margin: 0 0 var(--space-md) 0;
  font-size: 14px;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.auth-links {
  margin: var(--space-md) 0 0 0;
  font-size: 14px;
  text-align: center;
}

/* SKEL-231 (GAP-RULINGS 10/27/2026 "LOCKOUT HINT"): one fixed, neutral line shown to every
   sign-in visitor regardless of outcome, so it uses the INFO tokens, never the error or
   success ones .alert-error/.auth-notice use -- it must never look like the result of the
   attempt just made. */
.auth-hint {
  margin: var(--space-sm) 0 0 0;
  padding: var(--space-sm) var(--space-md);
  font-size: 13px;
  line-height: 18px;
  color: var(--info-fg);
  background: var(--info-bg);
  border: 1px solid var(--info-bd);
  border-radius: var(--radius-md);
  text-align: center;
}

.auth-button-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

.auth-button-link:hover { color: var(--on-brand); text-decoration: none; }

.screen-ref {
  margin-top: var(--space-lg);
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: center;
}

/* ---- Portal shell (authenticated chrome), SKEL-213: mockup v20 ----
   App bar on top, grouped rail on the left (desktop); under 768px the rail becomes the "More"
   sheet above a bottom tab bar. Colours and sizes are the mockup's own tokens (:root above). */

[hidden] { display: none !important; }

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--appbar-height);
  padding: 0 16px;
  background: var(--appbar);
  color: var(--appbar-fg);
}

.appbar a,
.appbar a:hover {
  color: inherit;
  text-decoration: none;
}

.appbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  white-space: nowrap;
}

.appbar .tenant {
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appbar-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: none;
}

.appbar .fb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--appbar-fg);
  font: 600 13px/16px var(--font);
  cursor: pointer;
}

.appbar .fb:hover { background: rgba(255, 255, 255, .16); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--avatar-fg);
  font: 600 12px/1 var(--font);
  cursor: pointer;
}

.menu {
  position: absolute;
  top: 40px;
  right: 0;
  z-index: 40;
  min-width: 240px;
  padding: 4px;
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--fg1);
  box-shadow: var(--shadow16);
}

.menu .who {
  display: flex;
  flex-direction: column;
  padding: 8px 12px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--stroke2);
}

.menu .who .caption { overflow-wrap: anywhere; }

.menu form { margin: 0; }

.menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--fg1);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--bg-hover);
  color: var(--fg1);
  text-decoration: none;
}

.caption {
  font-size: 12px;
  line-height: 16px;
  color: var(--fg3);
}

.ws {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  min-height: calc(100vh - var(--appbar-height));
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  background: var(--bg-subtle);
  border-right: 1px solid var(--stroke2);
}

.rail-h {
  padding: 14px 12px 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--fg3);
}

.rail-h:first-child { padding-top: 6px; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--fg2);
  font: 14px/20px var(--font);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--fg1);
  text-decoration: none;
}

.nav-item svg { flex: none; }

.nav-item[aria-current] {
  background: var(--bg-hover);
  color: var(--fg1);
  font-weight: 600;
}

.nav-item[aria-current]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand);
}

/* My account is in the avatar menu on a wide screen; the phone's More sheet carries it instead
   (SKEL-220, same two-opener pattern as Feedback right below). */
.nav-account { display: none; }

/* Feedback is in the app bar on a wide screen; the phone's More sheet carries it instead. */
.nav-feedback { display: none; }

.nav-scrim,
.tabbar { display: none; }

.portal-main {
  min-width: 0;
  padding: 20px 28px 48px;
  max-width: 1220px;
}

.portal-main h1 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  margin: 0 0 var(--space-sm) 0;
  overflow-wrap: anywhere;
}

.portal-main .subtitle {
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-lg) 0;
}

/* ---- SKEL-180: record-only view's way back, and the portal status page ---- */

.record-back {
  margin: 0 0 var(--space-md) 0;
  font-size: 14px;
}

.record-back-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.record-back-link:hover { text-decoration: underline; }

.status-page {
  max-width: 560px;
}

.status-page-home {
  display: inline-block;
  width: auto;
  text-decoration: none;
}

.status-page-signin {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ---- SKEL-182: where a finding is, the re-check line, "Found earlier" ---- */

.finding-location {
  margin: var(--space-xs) 0 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.recheck-line {
  margin: 0 0 var(--space-md) 0;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.found-earlier {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
}

.found-earlier h3 {
  margin-top: 0;
}

.found-earlier-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.found-earlier-row + .found-earlier-row {
  margin-top: var(--space-md);
}

/* ---- SKEL-186: a Code project's latest branch checks ---- */

.branch-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.branch-check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-surface-100);
  font-size: 14px;
}

.branch-check-branch code {
  overflow-wrap: anywhere;
}

.check-status-blocked { color: var(--color-error); }

.branch-check-at,
.branch-check-commit {
  color: var(--color-text-secondary);
}

/* ---- SKEL-233: a blocked branch's own findings (project page, no pull request yet) ---- */

.branch-check-findings {
  flex-basis: 100%;
  margin: var(--space-xs) 0 0 0;
  padding: var(--space-sm) var(--space-md);
  list-style: none;
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
}

.branch-check-finding-row + .branch-check-finding-row {
  margin-top: var(--space-md);
}

/* ---- PORTAL.SUBMIT.001 ---- */

.submit-panel {
  background: var(--color-surface-0);
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.submit-panel h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 var(--space-md) 0;
}

.project-field {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.project-field label {
  font-size: 14px;
  font-weight: 500;
}

.project-field input {
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--color-surface-300);
  border-radius: var(--radius-md);
  background: var(--color-surface-0);
  color: var(--color-text-primary);
  min-width: 200px;
}

.dropzone {
  border: 2px dashed var(--color-surface-300);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  background: var(--color-surface-50);
}

.dropzone.dropzone-active {
  border-color: var(--color-primary);
  background: var(--brand-soft);
}

.dropzone .hint {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: var(--space-sm) 0 0 0;
}

.btn-secondary {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary-dark);
  background: var(--color-surface-0);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-secondary:hover { background: var(--brand-soft); }

.upload-list {
  list-style: none;
  margin: var(--space-md) 0 0 0;
  padding: 0;
  font-size: 14px;
}

.upload-list li { padding: 4px 0; }

/* SKEL-175 fix 20: the ready-to-send scaffold between the file list and the status line. */
.upload-ready-actions {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.upload-ready-project {
  margin: 0;
  width: 100%;
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* SKEL-211: the private warning shown before an upload with personal information is saved. */
.private-warning {
  margin-top: var(--space-md);
  padding: var(--space-md);
  color: var(--color-warning);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
}

.private-warning[hidden] { display: none; }

.private-warning h3 { margin: 0 0 var(--space-sm) 0; font-size: 16px; }

.private-warning p { margin: 0 0 var(--space-sm) 0; font-size: 14px; }

.private-warning-list { margin: 0 0 var(--space-sm) 0; padding-left: 20px; font-size: 14px; }

.private-warning-file { margin-bottom: var(--space-xs, 4px); overflow-wrap: anywhere; }

.private-warning-file ul { margin: 2px 0 0 0; padding-left: 20px; }

.private-warning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

textarea#paste-text {
  width: 100%;
  padding: var(--space-md);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  border: 1px solid var(--color-surface-300);
  border-radius: var(--radius-md);
  background: var(--color-surface-0);
  color: var(--color-text-primary);
  resize: vertical;
  margin-bottom: var(--space-sm);
}

textarea#paste-text:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: var(--color-primary);
}

.field-error {
  color: var(--color-error);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: var(--space-sm);
}

.status-line {
  margin-top: var(--space-md);
  font-size: 14px;
}

.status-line.status-ok { color: var(--color-success); }
.status-line.status-error { color: var(--color-error); }

.paste-result { margin-top: var(--space-lg); }

/* SKEL-170 PORTAL.PROJECT.001 -- the clone-address widget (mirrors
   Docs/UX/codevault-portal-mockup.html's own ".clone" pattern: a flush code box with its Copy
   button attached, never a loose <input> a person has to select by hand first). */
.clone {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 100%;
}

.clone code {
  padding: 6px 10px;
  font: 13px/20px ui-monospace, Consolas, monospace;
  background: var(--color-surface-0);
  /* SKEL-185 (walkthrough round 2 item 17): the address WRAPS instead of ending in "..." -- on a
     phone the ellipsis hid the end of the repository name, the part that matters. */
  overflow-wrap: anywhere;
  word-break: break-all;
  flex: 1 1 auto;
  min-width: 0;
}

.clone button {
  border: 0;
  border-left: 1px solid var(--color-surface-200);
  flex: 0 0 auto;
}

.verdict-pending {
  color: var(--color-text-secondary);
  font-size: 14px;
}

.verdict-heading {
  font-size: 16px;
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 0 0 var(--space-md) 0;
}

.verdict-heading.verdict-fine {
  color: var(--color-success);
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
}

.verdict-heading.verdict-fix {
  color: var(--color-warning);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
}

.visibility-notice {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-style: italic;
  margin: var(--space-sm) 0 0 0;
}

/* SKEL-089: same warning tokens as .verdict-fix above (reuse, not a new
   color) -- the warning pair, WCAG contrast ~4.84:1, already proven live at this exact pair
   (TEST-A-2026-09-17.md row 4, "Fix first" contrast 4.84). A tool that did not run is not an
   error, but it is not nothing either -- same visual register as "fix first", distinct from the
   neutral color-text-secondary .findings-empty/.findings-loading directly below it. */
.tool-runs-notice {
  font-size: 14px;
  color: var(--color-warning);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-md) 0;
}

.tool-runs-notice-heading {
  font-weight: 700;
  margin: 0 0 var(--space-xs) 0;
}

.tool-runs-notice-list {
  margin: 0;
  padding: 0 0 0 1.25em;
}

/* ---- Findings (shared: paste verdict + My Submissions detail) ---- */

.findings-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.finding-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-surface-200);
}

.finding-severity {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--on-brand);
  background: var(--color-text-secondary);
}

.finding-severity-critical, .finding-severity-high { background: var(--color-error); }
.finding-severity-medium { background: var(--color-warning); }
.finding-severity-low, .finding-severity-info { background: var(--color-primary); }

.finding-title { font-weight: 600; font-size: 14px; }

.finding-evidence {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  background: var(--color-surface-100);
  padding: 2px 6px;
  border-radius: 4px;
}

.finding-remediation {
  flex-basis: 100%;
  margin: var(--space-xs) 0 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.findings-empty, .findings-loading {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ---- PORTAL.MYSUBS.001 ---- */

.submissions-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface-0);
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 14px;
}

.submissions-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-secondary);
  background: var(--color-surface-50);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-surface-200);
}

.submissions-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-surface-100);
  font-variant-numeric: tabular-nums;
}

.state-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-surface-100);
  color: var(--color-text-primary);
}

/* SKEL-105: the badge is now keyed off the six status codes (operator ruling 2026-10-05), not
   the retired per-state wire names -- "released" replaces vaulted/graded/delivered,
   "waiting_for_approval"/"checking" replace held_sensitive/ai_pending, "stopped"/"not_released"
   replace quarantined/withdrawn. */
.state-badge.state-released {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.state-badge.state-waiting_for_approval, .state-badge.state-checking {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.state-badge.state-stopped, .state-badge.state-not_released, .state-badge.state-needs_fix {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.submission-detail {
  background: var(--color-surface-0);
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.submission-detail h2 { font-size: 16px; margin: 0 0 var(--space-md) 0; font-family: ui-monospace, Consolas, monospace; }
.submission-detail h3 { font-size: 15px; margin: var(--space-lg) 0 var(--space-sm) 0; }

.detail-fields {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-sm) var(--space-md);
  margin: 0;
}

.detail-fields dt {
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 13px;
}

.detail-fields dd {
  margin: 0;
  font-size: 14px;
}

/* SKEL-170: an opaque id (git login username, clone-widget code) is one long unbroken token --
   without this, it crowds the card's edge instead of wrapping on a narrow phone. */
.detail-fields dd code {
  word-break: break-all;
}

.state-description {
  display: block;
  margin-top: var(--space-xs);
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ---- SKEL-169: work list filter tabs + status filter (PORTAL.MYSUBS.001/ADMIN.SUBMISSIONS.001) ---- */

.work-list-tabs ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  margin: 0 0 var(--space-md) 0;
  padding: 0;
}

.work-list-status-filter {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 13px;
}

.state-cause {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* ---- SKEL-169: record header, facts grid, lifecycle strip, tabs (PORTAL.RECORD.001) ---- */

.record-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.record-header-text {
  min-width: 0;
}

/* A record name can be one long unbroken id (sub_...) -- wrap it inside the card on a phone
   instead of running past the card's right edge. */
.record-header-text h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.record-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-xs) 0 0 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.record-subline .record-number {
  font-family: ui-monospace, Consolas, monospace;
}

/* SKEL-181 render proof: on a 390px phone "DOC-17" broke as "DOC-" / "17". The chips wrap as whole
   items instead (flex-wrap above). */
.record-subline > span {
  white-space: nowrap;
}

.next-line {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface-50);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.record-facts-grid {
  grid-template-columns: 160px 1fr;
}

.lifecycle-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  list-style: none;
  margin: var(--space-lg) 0;
  padding: 0;
  border-top: 1px solid var(--color-surface-200);
  border-bottom: 1px solid var(--color-surface-200);
  padding: var(--space-md) 0;
}

.lifecycle-stage {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  min-width: 110px;
  color: var(--color-text-secondary);
}

.lifecycle-stage-name {
  font-weight: 600;
  color: var(--color-text-primary);
}

.lifecycle-stage-done .lifecycle-stage-name::before { content: "\2713 "; color: var(--color-success); }
.lifecycle-stage-current .lifecycle-stage-name::before { content: "\2192 "; color: var(--color-warning); }
.lifecycle-stage-bad .lifecycle-stage-name::before { content: "\2717 "; color: var(--color-error); }
.lifecycle-stage-skip, .lifecycle-stage-wait { opacity: 0.55; }

.record-tabs ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: var(--space-md) 0 0 0;
  padding: 0;
  border-bottom: 1px solid var(--color-surface-200);
}

.record-tabs a {
  display: inline-block;
  padding: var(--space-sm) var(--space-xs);
  text-decoration: none;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.record-tab-panel {
  display: none;
  margin-top: var(--space-md);
}

#tab-result {
  display: block;
}

#tab-versions:target {
  display: block;
}

#tab-versions:target ~ #tab-result {
  display: none;
}

.versions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.versions-table th, .versions-table td {
  text-align: left;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--color-surface-100);
}

.checks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-row {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  font-size: 14px;
}

.check-status {
  font-weight: 600;
  min-width: 100px;
}

.check-status-passed { color: var(--color-success); }
.check-status-did_not_finish { color: var(--color-error); }
.check-status-not_checked { color: var(--color-warning); }
.check-status-failed { color: var(--color-error); }
/* SKEL-198: the AI review row when it is switched off -- neutral, never the green of "Passed". */
.check-status-not_run { color: var(--color-text-secondary); }

.held-sensitive-notice {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
}

.held-since { margin: 0; font-weight: 600; color: var(--color-warning); }
.held-sensitive-notice .visibility-notice { color: var(--color-text-secondary); }

.quarantine-reason {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius-md);
  color: var(--color-error);
  font-size: 14px;
}

.empty-state {
  color: var(--color-text-secondary);
}


/* ---- SKEL-014: System Health / Code Check grid (HEALTH.GRID.001) ---- */

.health-run-all {
  margin-bottom: var(--space-lg);
}

.health-run-all-btn {
  width: auto;
  padding: 10px 20px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.health-tile {
  background: var(--color-surface-0);
  border: 1px solid var(--color-surface-200);
  border-left-width: 5px;
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.health-tile-green { border-left-color: var(--ok-fg); }
.health-tile-amber { border-left-color: var(--warn-fg); }
.health-tile-red { border-left-color: var(--color-error); }

.health-tile-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.health-tile-description {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-xs) 0;
}

.health-tile-detail {
  font-size: 13px;
  margin: 0 0 var(--space-xs) 0;
  word-break: break-word;
}

.health-tile-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-sm) 0;
}

.health-run-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  background: var(--color-surface-100);
  border: 1px solid var(--color-surface-300);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.health-run-btn:hover { background: var(--color-surface-200); }

/* SKEL-014 REWORK (Finding 4) + SKEL-175 fix 17: a permanently-pending tile (subsystem ticket not
   merged yet) gets its own grey state -- dashed border, hatched background, reduced opacity -- so
   it can never be mistaken for a live tile reporting ANY of the three real colors. Health.cshtml
   now emits NO color class for a pending tile (never "on top of" Amber), so this supplies its own
   border-left-color directly. */

.health-tile-pending {
  border-left-color: var(--color-text-secondary);
  border-style: dashed;
  background-image: repeating-linear-gradient(
    45deg,
    var(--color-surface-0),
    var(--color-surface-0) 10px,
    var(--color-surface-100) 10px,
    var(--color-surface-100) 20px
  );
  opacity: 0.82;
}

/* ---- SKEL-013: ADMIN.SUBMISSIONS.001 / ADMIN.QUEUE.001 ---- */

.admin-subnav {
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-surface-200);
}

.admin-subnav ul {
  list-style: none;
  display: flex;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
}

.admin-subnav-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.admin-subnav-link:hover { color: var(--color-text-primary); }

.admin-subnav-link-current {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
}

.queue-notice {
  font-size: 14px;
  color: var(--color-text-primary);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-lg) 0;
  /* SKEL-184 render proof: a long sender email ran past the edge at 390px. */
  overflow-wrap: anywhere;
}

.queue-item-files {
  font-size: 13px;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-sm) 0;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.queue-item {
  background: var(--color-surface-0);
  border: 1px solid var(--color-warning-border);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.queue-item-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: baseline;
  margin-bottom: var(--space-md);
  font-size: 13px;
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.queue-item-submitter { font-weight: 600; color: var(--color-text-primary); }

/* SKEL-184: the record number heads each held item and links to the record. */
.queue-item-number {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* ---- Dashboard "Needs you" (SKEL-184, PORTAL.DASHBOARD.001) ---- */

.needs-you {
  background: var(--color-surface-0);
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.needs-you h2 { font-size: 17px; margin: 0 0 var(--space-md) 0; }

.needs-you-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.needs-you-item {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-md);
  align-items: baseline;
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--color-surface-200);
  overflow-wrap: anywhere;
}

.needs-you-item:first-child { border-top: 0; }

.needs-you-number { font-weight: 700; }

.needs-you-why { font-size: 13px; color: var(--color-text-secondary); width: 100%; }

.needs-you-note { font-size: 14px; color: var(--color-text-secondary); margin: var(--space-md) 0 0 0; }

/* SKEL-184: the "taking longer than usual" line on a record and its work-list row. */
.slow-checking {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.finding-class-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--color-warning);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
}

.queue-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-surface-200);
}

.queue-action-form { margin: 0; }

/* ---- PORTAL.RECORD.001 decision controls (SKEL-177): an approver decides held work on the
   record page. Same buttons as the Held Queue (.btn-secondary / .btn-decline); the textarea is
   full width and the action row wraps, so nothing overflows at phone width. ---- */

.record-decision {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-md);
  background: var(--color-surface-0);
}

.record-decision h3 { margin: 0 0 var(--space-sm) 0; font-size: 15px; }

.record-decision-form,
.record-decline-confirm { margin: 0; }

.record-reason-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.record-reason-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-sm);
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--color-surface-300);
  border-radius: var(--radius-md);
  background: var(--color-surface-0);
  color: var(--color-text-primary);
  resize: vertical;
}

.record-reason-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: var(--color-primary);
}

.record-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.record-decision-notice {
  font-size: 14px;
  color: var(--color-text-primary);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-md) 0;
}

.record-decline-warning {
  margin: 0 0 var(--space-md) 0;
  font-size: 14px;
  color: var(--color-error);
}

/* ---- ADMIN.TEAMS.001 / ADMIN.TEAM.001 / ADMIN.PEOPLE.001 (SKEL-171) ---- */

/* Standard visually-hidden utility (SKEL-171's own filter labels: a <select> that already names
   itself to a sighted user via its visible options still needs a programmatic label for screen
   readers -- same technique as the mockup's own `.vh`). */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.crumbs {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.crumbs a { color: var(--color-primary); text-decoration: none; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-md);
  font-size: 14px;
}

.admin-table th, .admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-surface-200);
  text-align: left;
}

.admin-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-secondary);
}


.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.btn-danger {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-error);
  background: var(--color-surface-0);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
}

.btn-danger:hover { background: var(--color-error-bg); }

.btn-decline {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-error);
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
}

.btn-decline:hover { background: var(--bad-bg); }

.decline-confirm-card {
  background: var(--color-surface-0);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 560px;
}

.decline-confirm-form { margin: var(--space-lg) 0 var(--space-sm) 0; }

.btn-decline-confirm { width: auto; }

.quarantine-reason-cell {
  font-size: 13px;
  color: var(--color-error);
}

/* ---- SKEL-103: quarantine's two admin exits ---- */

.quarantine-action-cell { white-space: nowrap; }

.quarantine-action-form { margin: 0; }

.quarantine-deleted-note {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.quarantine-delete-confirm-card {
  background: var(--color-surface-0);
  border: 1px solid var(--color-error-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 560px;
}

.quarantine-delete-confirm-form {
  margin: var(--space-lg) 0 var(--space-sm) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quarantine-delete-confirm-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: var(--space-sm);
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-md);
}

.btn-quarantine-delete-confirm { width: auto; align-self: flex-start; }

/* ---- SKEL-015: FEEDBACK.FORM.001 shell-level widget + ADMIN.FEEDBACK.001 list ---- */

.feedback-dialog {
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  width: 100%;
  max-width: 440px;
}

.feedback-dialog::backdrop { background: rgba(0, 0, 0, .35); }

.feedback-form h2 {
  margin: 0 0 var(--space-xs) 0;
  font-size: 18px;
  font-weight: 600;
}

.feedback-form label {
  display: block;
  margin: var(--space-md) 0 var(--space-xs) 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.feedback-form select,
.feedback-form textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--color-surface-300);
  border-radius: var(--radius-md);
  background: var(--color-surface-0);
  color: var(--color-text-primary);
}

.feedback-status {
  min-height: 20px;
  font-size: 13px;
  margin: var(--space-sm) 0 0 0;
}

.feedback-status-error { color: var(--color-error); }
.feedback-status-success { color: var(--color-success); }

.feedback-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.feedback-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feedback-item {
  background: var(--color-surface-0);
  border: 1px solid var(--color-surface-200);
  border-left: 4px solid var(--color-surface-300);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.feedback-item.feedback-status-new { border-left-color: var(--color-warning); }
.feedback-item.feedback-status-acknowledged { border-left-color: var(--color-primary); }
.feedback-item.feedback-status-resolved { border-left-color: var(--color-success); }

.feedback-item-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: baseline;
  margin-bottom: var(--space-md);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.feedback-submitter { font-weight: 600; color: var(--color-text-primary); }

.feedback-category-badge,
.feedback-status-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-surface-300);
  background: var(--color-surface-100);
  color: var(--color-text-secondary);
}

.feedback-status-badge-new { color: var(--color-warning); background: var(--color-warning-bg); border-color: var(--color-warning-border); }
.feedback-status-badge-acknowledged { color: var(--color-primary-dark); background: var(--brand-soft); border-color: var(--brand-soft-bd); }
.feedback-status-badge-resolved { color: var(--color-success); background: var(--color-success-bg); border-color: var(--color-success-border); }

.feedback-message {
  white-space: pre-wrap;
  font-size: 14px;
  margin: 0 0 var(--space-sm) 0;
}

.feedback-trail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-sm) 0;
}

.feedback-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-surface-200);
}

.feedback-action-form { margin: 0; }

/* ---- PORTAL.SUBMIT.001 (SKEL-134): project select, New-project form ---- */

.project-field select,
.field select {
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--color-surface-300);
  border-radius: var(--radius-md);
  background: var(--color-surface-0);
  color: var(--color-text-primary);
  min-width: 200px;
}

.project-field select:focus,
.field select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: var(--color-primary);
}

.empty-state {
  padding: var(--space-md);
  background: var(--color-surface-50);
  border: 1px dashed var(--color-surface-300);
  border-radius: var(--radius-md);
  text-align: center;
}

.empty-state p {
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-text-secondary);
}

.new-project-details summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary-dark);
  padding: var(--space-xs) 0;
  list-style: none;
}

.new-project-details summary::-webkit-details-marker { display: none; }

.new-project-details form {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-surface-200);
}

.new-project-details fieldset {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-md) 0;
}

.new-project-details legend {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  padding: 0;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 14px;
}

.radio-option input { margin-top: 3px; }

.radio-option .caption {
  display: block;
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-top: 2px;
}

.caption {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* SKEL-185: a field's hint ("for example: jis") sits right under its own input, not floating
   halfway to the next field's label. */
.field .caption { margin: 4px 0 0 0; }

.np-actions { margin-top: var(--space-md); }

.np-actions .btn-primary { width: auto; padding: 10px 20px; }

.np-actions .btn-primary:disabled {
  background: var(--color-surface-300);
  cursor: not-allowed;
}

.np-result { margin-top: var(--space-md); }

.np-result code {
  font-family: ui-monospace, Consolas, monospace;
  background: var(--color-surface-100);
  padding: 2px 6px;
  border-radius: 4px;
}

/* `.project-field`/`.dropzone` set their own `display`, which otherwise beats the UA
   stylesheet's `[hidden] { display: none }` on a same-specificity tie (author rule, later in
   the cascade) -- an ID selector guarantees `hidden` wins regardless of source order.
   SKEL-175 fix 20: #upload-ready-actions has the exact same conflict (.upload-ready-actions sets
   its own `display: flex`), caught live in the render-proof screenshot (the ready-to-send panel
   rendered visible on page load, with no files chosen). */
#upload-project-field[hidden],
#dropzone[hidden],
#no-upload-projects[hidden],
#upload-ready-actions[hidden] {
  display: none;
}

/* ---- SKEL-157: phone-width portal shell (nav collapse, table scroll, launcher dock) ----
   ONE @media block, at the end of the file, per the ticket's own Technical Notes: every
   responsive rule for the shell lives here, never scattered per-page. Colours/fonts/tokens are
   unchanged -- only layout (display/width/padding/position) changes below 768px. Above 767.98px
   nothing in this block applies, so the existing desktop render (SKEL-134's 1366px screenshots)
   is untouched. */
@media (max-width: 767.98px) {
  /* SKEL-213: the rail is the "More" sheet; a bottom tab bar carries the main destinations. */
  .appbar { padding: 0 12px; }

  .appbar .fb { display: none; }

  .ws { grid-template-columns: minmax(0, 1fr); }

  .rail {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px));
    z-index: 25;
    max-height: calc(100vh - var(--appbar-height) - var(--tabbar-height) - 16px);
    overflow-y: auto;
    padding: 8px 12px 12px;
    border-right: 0;
    border-top: 1px solid var(--stroke1);
    border-radius: 8px 8px 0 0;
    background: var(--bg-surface);
    box-shadow: var(--shadow16);
  }

  .rail.is-open { display: flex; }

  .rail .nav-item { min-height: 44px; }

  .nav-account { display: flex; }

  .nav-feedback { display: flex; }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 22;
    display: block;
    background: rgba(0, 0, 0, .35);
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 26;
    display: flex;
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    background: var(--bg-surface);
    border-top: 1px solid var(--stroke1);
  }

  .tb {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: var(--tabbar-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    border: 0;
    background: none;
    color: var(--fg3);
    font: 600 11px/14px var(--font);
    text-decoration: none;
    cursor: pointer;
  }

  .tb:hover { color: var(--fg1); text-decoration: none; }

  .tb span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tb[aria-current],
  .tb[aria-expanded="true"] { color: var(--brand-fg); }

  .tb[aria-current]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 3px;
    border-radius: 0 0 2px 2px;
    background: var(--brand);
  }

  .portal-main {
    padding: var(--space-md) var(--space-md) calc(var(--tabbar-height) + 28px + env(safe-area-inset-bottom, 0px));
    max-width: 100%;
  }

  .menu { right: -4px; max-width: calc(100vw - 16px); }

  /* Tables (admin submissions/quarantine/waivers, my submissions) scroll horizontally AS A UNIT
     (thead+tbody stay one <table>, so columns never go out of alignment) instead of widening
     the page. No markup wrapper div exists around any of the four pages' <table> (out of this
     ticket's declared file scope -- `_PortalLayout.cshtml`/`portal.css`/one script, no page
     files), so `.portal-main` itself becomes the scroll container, scoped with `:has()` to only
     the pages that actually contain one (a page with no table gets no behavior change). The
     table keeps `width: 100%` (unchanged, set above) and is free to grow past that width inside
     `.portal-main`'s own box; `.portal-main`'s `overflow-x: auto` clips and scrolls it there
     instead of letting it escape out to `.portal-shell`/`body`/`html` (document.documentElement.
     scrollWidth, which is what a user's phone actually scrolls, stays at the viewport width). */
  .portal-main:has(table.submissions-table) {
    overflow-x: auto;
  }

  /* Found by the render proof (render-then-judge), not named in the ticket's own page list:
     the admin area's own tab bar (Queue/Submissions/Quarantine/Waivers/Feedback,
     _AdminSubNav.cshtml, shared chrome on every /admin/* page) is a no-wrap flex row that was
     exactly as wide as its 5 tabs, which does not fit 358px -- the one other page-wide-scroll
     source this ticket's own render proof turned up. A flex container's own overflow -- unlike
     a <table>'s -- really does clip+scroll at the container's own box, so no special-casing is
     needed here the way `.submissions-table` above needed. */
  /* SKEL-184 (walkthrough round 2 item 10): scrolling hid the last tab ("Quarantine" was cut off
     at the right edge with no sign there was more), so the tabs WRAP onto a second line instead --
     every tab stays visible and nothing scrolls sideways. */
  .admin-subnav ul {
    flex-wrap: wrap;
    gap: 0 var(--space-sm);
  }

  /* ADMIN.TEAMS.001 / ADMIN.TEAM.001 / ADMIN.PEOPLE.001 (SKEL-171): EACH ROW BECOMES A CARD
     (ticket's own wording, Tests to Write First -- distinct from the sideways-scroll treatment
     above, because these three tables carry more columns than a scrolled table reads
     comfortably on a phone). Classic data-label technique: the table keeps ONE markup for both
     widths, so there is no second, parallel card markup to keep in sync -- each <td> labels
     itself from its own data-label attribute instead of relying on a <th> that is no longer
     there. Folded into this file's one shared @media block (SKEL-157's own rule above) rather
     than a second block next to .admin-table's other rules. */
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr {
    border: 1px solid var(--color-surface-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    padding: var(--space-sm);
  }
  .admin-table td {
    border-bottom: none;
    padding: 4px 0;
  }
  .admin-table td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--color-text-secondary);
  }
  .admin-row-actions { margin-top: var(--space-xs); }

  /* SKEL-169 (PORTAL.MYSUBS.001/ADMIN.SUBMISSIONS.001 "Phone (390): rows become stacked cards
     (number + name + status), no sideways scroll"): the work list's OWN table overrides the
     general `.submissions-table` horizontal-scroll fallback above -- this one table collapses
     into cards instead, so its container must NOT also become a scroll box (the general rule
     above still applies to every OTHER `.submissions-table` on the portal -- admin quarantine/
     waivers -- unchanged). Project/Sent by/Date stay in the card (a card with only number+name+
     status loses information a user on their phone still wants), just de-emphasized rather than
     hidden -- "no sideways scroll" is the acceptance criterion, not "fewer facts". */
  .portal-main:has(table.work-list-table) {
    overflow-x: visible;
  }

  table.work-list-table,
  table.work-list-table thead,
  table.work-list-table tbody,
  table.work-list-table tr,
  table.work-list-table th,
  table.work-list-table td {
    display: block;
    width: 100%;
  }

  table.work-list-table thead {
    display: none;
  }

  table.work-list-table tr.submission-row {
    border: 1px solid var(--color-surface-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
  }

  table.work-list-table td {
    border: none;
    padding: 2px 0;
  }

  table.work-list-table td.col-number {
    font-weight: 600;
  }

  table.work-list-table td.col-project,
  table.work-list-table td.col-date,
  table.work-list-table td.col-submitter {
    font-size: 12px;
    color: var(--color-text-secondary);
  }

  /* SKEL-169 (PORTAL.RECORD.001 "Phone (390): one column, tabs stay usable"). */
  /* SKEL-177 render proof: a bare `1fr` column cannot shrink below its longest unbroken value
     (a long e-mail-style display name pushed the card 1px past a 390px screen) -- minmax(0, 1fr)
     plus wrapping keeps every value inside the card. */
  .record-facts-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-facts-grid dd,
  .next-line {
    overflow-wrap: anywhere;
  }

  .record-facts-grid dt {
    margin-top: var(--space-sm);
  }

  .lifecycle-strip {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

/* SKEL-187: inline rename on People -- the box gets the room a full name needs. */
.rename-details > summary { list-style: none; cursor: pointer; }
.rename-details > summary::-webkit-details-marker { display: none; }
.rename-form { display: flex; flex-direction: column; gap: var(--space-xs); margin-top: var(--space-xs); min-width: 16rem; }
.rename-form .input { width: 100%; }
.rename-form .btn-primary { width: auto; align-self: flex-start; padding: 8px 16px; }
.rename-form input[type="text"] { padding: 8px 10px; border: 1px solid var(--stroke1); border-radius: 6px; font: inherit; box-sizing: border-box; }
.rename-details > summary { width: auto; display: inline-block; }

/* SKEL-190: company status page. */
.status-line {
    display: inline-block;
    margin: 0 0 16px;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
}
.status-ok { background: var(--ok-bg); color: var(--ok-fg); }
.status-problem { background: var(--bad-bg); color: var(--bad-fg); }

/* SKEL-213: a screen ID is small and quiet; inside the portal it sits at the left of the page. */
.portal-main .screen-ref {
  text-align: left;
  margin-top: var(--space-md);
}

/* ---- PORTAL.ACCOUNT.001 (SKEL-209): My account ---- */

.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin: var(--space-sm) 0 0 0; }
.inline-form .btn-primary,
.inline-form .btn-decline { width: auto; padding: 8px 16px; }

a.btn-secondary { display: inline-block; text-decoration: none; }

.button-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin: var(--space-md) 0 0 0; }

.secret-box {
  border: 1px solid var(--color-warning-border);
  background: var(--color-warning-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.secret-box .detail-fields { grid-template-columns: 110px 1fr; }

.secret-box .clone { width: 100%; }

.confirm-step {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-md);
}

.code-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.code-block pre {
  margin: 0;
  width: 100%;
  padding: var(--space-md);
  background: var(--color-surface-100);
  border: 1px solid var(--color-surface-200);
  border-radius: var(--radius-md);
  font: 13px/20px ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

td.mono { font: 13px/20px ui-monospace, Consolas, monospace; white-space: nowrap; vertical-align: top; }

@media (max-width: 600px) {
  .secret-box .detail-fields,
  #mcp-connect,
  #git-login-facts { grid-template-columns: 1fr; gap: var(--space-xs); }
  #mcp-connect dd { margin-bottom: var(--space-sm); }
  #mcp-tools tr, #mcp-tools td { display: block; }
  #mcp-tools tr { padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-surface-200); }
  #mcp-tools td { border: 0; padding: 0; }
  td.mono { white-space: normal; overflow-wrap: normal; font-weight: 600; }
}

/* ---- SKEL-210: git password button spacing, long names on the re-issue confirm page ---- */
#create-new-password-btn { margin-top: var(--space-md); }
/* SKEL-222 render pass: `.btn`'s own `white-space: nowrap` (below, SKEL-216 section) suppresses
   `overflow-wrap`'s break opportunities even when both classes are on the same element --
   PeopleGrantConfirm's primary button, now `.btn.primary.confirm-go.wrap-anywhere` (round 0
   swapped it off the legacy `.btn-primary`, which never set nowrap), measured 206px of real
   sideways overflow at 390px with a long email in its text. A plain `.wrap-anywhere` rule has the
   same (0,0,1,0) specificity as `.btn` and `.btn` sits LATER in the file, so it would still win;
   `.btn.wrap-anywhere` (0,0,2,0) wins regardless of cascade order. Same fix shape as SKEL-216's
   own confirm-page overflow findings. */
.wrap-anywhere { overflow-wrap: anywhere; }
.btn.wrap-anywhere { white-space: normal; }

/* ===== SKEL-216: admin work pages -- All submissions, Held Queue, Waivers, Quarantine, confirm pages =====
   Components copied from mockup v20 (.btn, .input, .card, .tbl-wrap / table.grid, .crumbs), using the
   mockup tokens only. The shell section above is untouched. Pages: Admin/Submissions, Queue, Waivers,
   Quarantine, QueueDeclineConfirm, QuarantineDeleteConfirm, TeamDeleteConfirm. The People confirm pages
   (owned by SKEL-217) carry the older .btn-decline class, restyled here so they match until they move. */

.page-head-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

/* SKEL-222 render pass: `.page-head` has THREE separate definitions in this file (shell, here,
   and the SKEL-215 section below) -- `.page-head` alone was never in this ticket's "defined
   exactly once" check (only .btn/.input/.card/.badge/.tbl-wrap/.confirm-card/.confirm-go/.crumbs
   were), so the duplication slipped through. The SKEL-215 section's `.page-head { align-items:
   center; gap: 8px 12px; margin: 0 0 4px 0; }` sits LATER in the file and has the same (0,0,1,0)
   specificity as this block, so it silently won on every `.page-head.page-head-stack` element --
   Queue/Waivers/Quarantine/their confirm pages/admin Submissions/Report/Health all rendered with
   a CENTERED title instead of the stacked, left-aligned title-over-subtitle the mockup and this
   block's own `flex-start` intend. Measured live: Queue's h1 sat at x=688 in a 240-1338 head box
   (dead center) before this fix. A two-class selector (0,0,2,0) wins regardless of file order,
   without touching the other two `.page-head` blocks or the many plain-`.page-head` pages that
   depend on them (consolidating all three is a larger refactor this render-pass budget does not
   cover -- flagged, not fixed, in the Builder Report). */
.page-head.page-head-stack {
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.page-head-stack h1 { margin: 0; }
.page-head-stack .subtitle { margin: 0; max-width: 72ch; color: var(--fg3); }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--stroke2);
  border-radius: 6px;
  padding: 16px 20px;
  min-width: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-width: 80px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--stroke1);
  background: var(--bg-surface);
  color: var(--fg1);
  font: 600 14px/20px var(--font);
  cursor: pointer;
  white-space: nowrap;
}

/* ==== SKEL-214: work pages restyled to mockup v20 (operator ruling G4: look only, no flow changes) ====
   Dashboard, Send work, My work, the record page. Components are the mockup's own (.card, .tasks,
   .tabs/.tab, .tag, .ft, .tbl-wrap/.grid, .details, .life, .addbar, .btn, .input), written on the
   shell's tokens above. Colours are tokens only; the one literal block is the file-type palette. */

:root {
  --ft-doc: #185abd;
  --ft-pdf: #c50f1f;
  --ft-ppt: #c43e1c;
  --ft-xls: #107c41;
  --ft-code: #5c2e91;
  --ft-zip: #8e562e;
  --ft-text: #616161;
}

/* Buttons: one look for the three classes the work pages use (mockup .btn, primary and danger). */
.portal-main .btn-primary,
.portal-main .btn-secondary,
.portal-main .btn-decline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  min-width: 80px;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--stroke1);
  width: auto;
  min-width: 80px;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--stroke1);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--fg1);
  font: 600 14px/20px var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--bg-hover); color: var(--fg1); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: transparent; color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn.primary:active { background: var(--brand-pressed); }
.btn.subtle { border-color: transparent; background: transparent; min-width: 0; color: var(--brand-fg); }
.btn.subtle:hover { background: var(--bg-hover); color: var(--brand-fg); }
.btn.danger { color: var(--bad-fg); }
.btn.danger:hover { background: var(--bad-bg); color: var(--bad-fg); }

.input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--stroke1);
  border-bottom-color: var(--stroke-acc);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--fg1);
  font: 14px/20px var(--font);
  width: 100%;
}

.portal-main .btn-primary:hover,
.portal-main .btn-secondary:hover,
.portal-main .btn-decline:hover {
  background: var(--bg-hover);
  color: var(--fg1);
  text-decoration: none;
}

.portal-main .btn-primary {
  border-color: transparent;
  background: var(--brand);
  color: var(--on-brand);
}

.portal-main .btn-primary:hover {
  background: var(--brand-hover);
  color: var(--on-brand);
}

.portal-main .btn-primary:active { background: var(--brand-pressed); }

.portal-main .btn-decline {
  border-color: var(--bad-bd);
  color: var(--bad-fg);
}

.portal-main .btn-decline:hover { background: var(--bad-bg); color: var(--bad-fg); }

.portal-main .btn-primary:disabled,
.portal-main .btn-secondary:disabled {
  border-color: var(--stroke2);
  background: var(--bg-hover);
  color: var(--fg-disabled);
  cursor: not-allowed;
}

/* Fields (mockup .input): 32px control with the darker bottom edge that turns brand on focus. */
.portal-main .input {
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--stroke1);
  border-bottom-color: var(--stroke-acc);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--fg1);
  font: 14px/20px var(--font);
}

.input:focus { outline: none; border-bottom-color: var(--brand); box-shadow: inset 0 -1px 0 var(--brand); }

/* Held Queue: a card per held item, one primary action, a full-width reason box. */
.queue-item.card {
  border-left: 1px solid var(--stroke2);
  padding: 16px 20px;
}

.queue-item.card .queue-item-header {
  margin-bottom: var(--space-sm);
  gap: 4px var(--space-md);
}

.queue-item.card .queue-item-number { font-size: 16px; font-weight: 600; color: var(--brand-fg); }

.queue-reason-label { display: block; margin: var(--space-sm) 0 var(--space-xs) 0; font-weight: 600; }
.queue-reason-input { display: block; width: 100%; min-height: 64px; resize: vertical; }

.queue-item.card .queue-item-actions {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--stroke2);
  align-items: center;
}

.queue-item.card .queue-item-actions .btn { white-space: normal; }
.queue-item.card .queue-item-actions .queue-decline-link { margin-left: auto; }

/* Waivers and Quarantine: the mockup's table (.tbl-wrap around a table). */
.tbl-wrap {
  overflow-x: auto;
  background: var(--bg-surface);
  border-radius: 4px;
  box-shadow: var(--shadow4);
}

/* ---- SKEL-217: restyle 5, people and teams (mockup v20), the role-grant confirm ----
   Page heads carry their primary button; tables use the mockup's list style; each People row keeps
   one action and the rest sit in a row menu; Status uses the mockup's task list. Look only. */

.page-head { align-items: center; }
.page-head .subtitle { margin-bottom: var(--space-md); }

.head-buttons { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }

.head-details > summary { list-style: none; }
.head-details > summary::-webkit-details-marker { display: none; }

.head-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 32px;
  padding: 0 12px;
  cursor: pointer;
  text-decoration: none;
}

/* An open head panel drops under the heading, full width, as a card. */
.head-details[open] { flex-basis: 100%; order: 3; }

.head-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 480px;
  margin-top: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-surface);
  border-radius: 4px;
  box-shadow: var(--shadow4);
}

.head-panel .np-actions .btn-primary { width: auto; min-height: 32px; padding: 0 12px; }

/* Selects and inputs on these pages use the mockup's field look. */
.admin-filters .input,
.head-panel select.input { width: auto; min-width: 180px; height: 32px; }
.head-panel .input { width: 100%; }

/* SKEL-222: this page's table used a second .tbl-wrap with its own margin-top and no
   overflow-x -- consolidated into the one canonical .tbl-wrap (defined once, above the SKEL-217
   section) so every page gets the same proven scroll behaviour at narrow width. */

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-weight: 600; text-align: left; color: var(--fg2); padding: 10px 12px; border-bottom: 1px solid var(--stroke1); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--stroke2); vertical-align: top; overflow-wrap: anywhere; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.mono { font-family: var(--mono); font-size: 13px; white-space: normal; }
.tbl .quarantine-reason-cell { color: var(--bad-fg); }
.tbl .quarantine-action-cell .btn { white-space: nowrap; }

/* SKEL-184 ruled that the admin tabs wrap on a phone (nothing hidden); keep each tab label whole. */
.admin-subnav-link { white-space: nowrap; }

/* The confirm pages share one layout: what will happen, one primary action, Cancel. Every confirm
   page also carries the plain .card class for its background, border and padding (SKEL-222: the
   decline-confirm-card / quarantine-delete-confirm-card modifier that used to repeat those same
   three properties here was dead weight once the markup picked up .card too). */
.confirm-card { max-width: 640px; display: flex; flex-direction: column; gap: var(--space-md); }
.confirm-what { margin: 0; color: var(--fg2); }
.confirm-card form { margin: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.confirm-card .queue-reason-label { margin-top: 0; }
.confirm-card .detail-fields { margin: 0; grid-template-columns: minmax(72px, 120px) minmax(0, 1fr); }
.confirm-card .detail-fields dd { min-width: 0; overflow-wrap: anywhere; }

.confirm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin-top: var(--space-xs); }
.confirm-actions .btn { white-space: normal; }
.confirm-actions .btn.danger { background: var(--bad-fg); border-color: transparent; color: var(--on-brand); }
.confirm-actions .btn.danger:hover { background: var(--bad-fg); color: var(--on-brand); filter: brightness(0.9); }

/* The People confirm pages still use the older .btn-decline; make it read as the same danger button. */
.btn-decline { min-height: 32px; border-radius: 4px; font: 600 14px/20px var(--font); }
a.btn-decline { display: inline-flex; align-items: center; }

@media (max-width: 767px) {
  .queue-item.card { padding: 14px 16px; }
  .queue-item.card .queue-item-actions .btn { width: 100%; }
  .queue-item.card .queue-item-actions .queue-decline-link { margin-left: 0; }
  .confirm-actions .btn { width: 100%; }

  /* Phone: no column silently drops; each row stacks with its column names (mockup phone table). */
  .tbl, .tbl tbody { display: block; }
  .tbl thead { display: none; }
  .tbl tr { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-bottom: 1px solid var(--stroke2); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: block; padding: 0; border: 0; }
  .tbl td[data-label]::before { content: attr(data-label) ": "; font-size: 12px; font-weight: 600; color: var(--fg3); }
  .tbl td.quarantine-action-cell::before { display: block; }
}

/* ===== SKEL-218: platform health grid and the report page =====
   Components copied from mockup v20 (.tile, status badges), tokens only. The report's own look lives in
   AuditReportRenderer's stylesheet (scoped under .report) so the standalone copy and the page match. */

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--info-bd);
  background: var(--info-bg);
  color: var(--info-fg);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ok { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); }
.badge-warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.badge-bad { background: var(--bad-bg); border-color: var(--bad-bd); color: var(--bad-fg); }

.tile {
  background: var(--bg-surface);
  border-radius: 4px;
  box-shadow: var(--shadow4);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.health-run-all { margin-bottom: var(--space-md); }
.health-run-all-btn { width: auto; }

.health-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

.health-tile.tile { border: 0; border-left: 4px solid var(--stroke1); border-radius: 4px; padding: 16px; }
.health-tile.health-tile-green { border-left-color: var(--ok-fg); }
.health-tile.health-tile-amber { border-left-color: var(--warn-fg); }
.health-tile.health-tile-red { border-left-color: var(--bad-fg); }

.health-tile-header { margin: 0; align-items: flex-start; justify-content: space-between; gap: var(--space-sm); }
.tile-title { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.health-tile .health-tile-description { margin: 0; font-size: 13px; line-height: 18px; color: var(--fg2); }
.health-tile .health-tile-detail { margin: 0; font-size: 13px; line-height: 18px; color: var(--fg1); }
.health-tile .health-tile-meta { margin: 0; font-size: 12px; line-height: 16px; color: var(--fg3); }
.tile-ref { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--fg3); overflow-wrap: anywhere; }
.health-tile form { margin-top: auto; }
.health-tile .health-run-btn { min-width: 0; min-height: 28px; padding: 2px 12px; }

/* A tile for a check that is not built yet: quiet grey, dashed, no hatching. */
.health-tile.health-tile-pending {
  border-left-color: var(--stroke1);
  border: 1px dashed var(--stroke1);
  border-left: 4px dashed var(--stroke1);
  background-color: var(--bg-subtle);
  background-image: none;
  box-shadow: none;
  opacity: 1;
}

@media (max-width: 767px) {
  .health-grid { grid-template-columns: minmax(0, 1fr); }
}

/* The report page's way back sits flush with the page title, not inset by the button padding. */
.record-back .btn.subtle { padding-left: 0; justify-content: flex-start; }
.portal-main .input:focus {
  outline: none;
  border-bottom-color: var(--brand);
  box-shadow: inset 0 -1px 0 var(--brand);
}

.portal-main textarea.input { min-height: 120px; padding: 8px 10px; resize: vertical; }

.portal-main select.input { width: auto; min-width: 180px; max-width: 100%; }

/* Cards and lists (mockup .card, .tasks). */
.portal-main .card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0 0 16px 0;
  padding: 16px 20px;
  border: 1px solid var(--stroke2);
  border-radius: 6px;
  background: var(--bg-surface);
}

.portal-main .card h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }

.portal-main .card p { margin: 0; }

.tasks {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--stroke2);
  border-radius: 4px;
  background: var(--bg-surface);
}

.tasks li { border-bottom: 1px solid var(--stroke2); }

.tasks li:last-child { border-bottom: 0; }

.tasks li:hover { background: var(--bg-hover); }

.quick-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--fg1);
}

.quick-links a:hover { color: var(--brand-fg); text-decoration: none; }

.quick-links svg { flex: none; color: var(--fg3); }

/* Dashboard "Needs you" rows inside the card. */
.card.needs-you .needs-you-list { gap: 0; }

.card.needs-you .needs-you-item { padding: 10px 0; border-top: 1px solid var(--stroke2); }

.card.needs-you .needs-you-item:first-child { border-top: 0; padding-top: 0; }

.card.needs-you .needs-you-number { color: var(--brand-fg); white-space: nowrap; }

.card.needs-you .needs-you-why,
.card.needs-you .needs-you-project { font-size: 12px; line-height: 16px; color: var(--fg3); }

.card.needs-you .needs-you-note { margin: 0; color: var(--fg2); }

/* Tabs (mockup .tabs/.tab): a text tab with a brand underline on the current one, not a pill. */
.tabs {
  margin: 0 0 12px 0;
  border-bottom: 1px solid var(--stroke2);
  overflow-x: auto;
}

.tabs ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  border-bottom: 0;
  list-style: none;
}

.tabs .tab {
  position: relative;
  display: inline-block;
  padding: 8px 10px;
  color: var(--fg2);
  font: 14px/20px var(--font);
  white-space: nowrap;
  text-decoration: none;
}

.tabs .tab:hover { color: var(--fg1); text-decoration: none; }

.tabs .tab[aria-current] { color: var(--fg1); font-weight: 600; }

.tabs .tab[aria-current]::after,
.record-tabs li:first-child .tab::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 3px;
  border-radius: 2px;
  background: var(--brand);
}

/* The record tabs mark the open panel from the URL fragment, with no script. */
.record-tabs .tab::after { content: none; }

.record-tabs li:first-child .tab { color: var(--fg1); font-weight: 600; }

.submission-detail:has(#tab-versions:target) .record-tabs li:first-child .tab { color: var(--fg2); font-weight: 400; }

.submission-detail:has(#tab-versions:target) .record-tabs li:first-child .tab::after { content: none; }

.submission-detail:has(#tab-versions:target) .record-tabs li:nth-child(2) .tab { color: var(--fg1); font-weight: 600; }

.submission-detail:has(#tab-versions:target) .record-tabs li:nth-child(2) .tab::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 3px;
  border-radius: 2px;
  background: var(--brand);
}

.work-list-status-filter { margin: 0 0 12px 0; }

.work-list-status-filter select {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--stroke1);
  border-bottom-color: var(--stroke-acc);
  border-radius: 4px;
  background: var(--bg-surface);
  color: var(--fg1);
  font: 14px/20px var(--font);
}

/* Status tag (mockup .tag). `.state-badge` is the same tag, so a page that has not been restyled yet
   (Admin lists, the project page) reads the same colours; the six statuses map as in the mockup. */
.tag,
.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--info-bd);
  border-radius: 4px;
  background: var(--info-bg);
  color: var(--info-fg);
  font: 600 12px/16px var(--font);
  white-space: nowrap;
  vertical-align: middle;
}

.tag svg { flex: none; }

.t-ok,
.state-badge.state-released { border-color: var(--ok-bd); background: var(--ok-bg); color: var(--ok-fg); }

.t-bad,
.state-badge.state-needs_fix { border-color: var(--bad-bd); background: var(--bad-bg); color: var(--bad-fg); }

.t-warn,
.state-badge.state-waiting_for_approval,
.state-badge.state-stopped { border-color: var(--warn-bd); background: var(--warn-bg); color: var(--warn-fg); }

.t-info,
.state-badge.state-checking,
.state-badge.state-not_released { border-color: var(--info-bd); background: var(--info-bg); color: var(--info-fg); }

/* File-type icon (mockup .ft): a tinted rounded tile, the glyph in the type's colour. */
.ft {
  display: inline-grid;
  flex: none;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 13%, transparent);
  color: var(--c);
}

.ft-docx { --c: var(--ft-doc); }
.ft-pdf { --c: var(--ft-pdf); }
.ft-pptx { --c: var(--ft-ppt); }
.ft-xlsx { --c: var(--ft-xls); }
.ft-code { --c: var(--ft-code); }
.ft-zip { --c: var(--ft-zip); }
.ft-text,
.ft-file { --c: var(--ft-text); }

.ft-18 { width: 18px; height: 18px; }
.ft-24 { width: 24px; height: 24px; }
.ft-44 { width: 44px; height: 44px; }

/* The work list uses the mockup's .tbl-wrap (defined once, above the SKEL-217 section) + .grid. */

.grid.submissions-table,
.grid.versions-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  border-radius: 0;
  font-size: 14px;
}

.grid.submissions-table th,
.grid.versions-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke1);
  background: transparent;
  color: var(--fg2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

.grid.submissions-table td,
.grid.versions-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke2);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

.grid.submissions-table tr:last-child td,
.grid.versions-table tr:last-child td { border-bottom: 0; }

.grid.submissions-table tbody tr:hover td { background: var(--bg-hover); }

.work-list-table .col-number {
  white-space: nowrap;
}

.work-list-table .col-date {
  white-space: nowrap;
}

.namecell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.namecell > span:last-child,
.namecell > a { min-width: 0; overflow-wrap: anywhere; }

.work-list-table .state-cause { margin-top: 2px; }

.empty-state { color: var(--fg3); }

/* Send work (mockup .addbar and .addprompt). */
.submit-panel.addbar {
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--bg-surface);
  box-shadow: var(--shadow4);
}

.submit-panel.addbar h2 { margin: 0 0 12px 0; font-size: 16px; line-height: 24px; font-weight: 600; }

.submit-panel .project-field { margin-bottom: 12px; }

.submit-panel .project-field label { font-weight: 600; }

.submit-panel .dropzone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding: 16px;
  border: 1px dashed var(--stroke-acc);
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--fg2);
}

.submit-panel .dropzone[hidden] { display: none; }

.submit-panel .dropzone p { margin: 0; }

.submit-panel .dropzone .hint { flex: 1 0 100%; margin: 0; font-size: 12px; line-height: 16px; color: var(--fg3); }

.submit-panel .dropzone:hover,
.submit-panel .dropzone:focus-visible { border-color: var(--brand); }

.submit-panel .dropzone.dropzone-active { border-color: var(--brand); background: var(--brand-soft); }

.upload-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }

/* The paste box uses the body font, not monospace. */
textarea#paste-text {
  width: 100%;
  min-height: 160px;
  margin-bottom: 8px;
  padding: 8px 10px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
}

.field-error { color: var(--bad-fg); }

.status-line.status-ok { color: var(--ok-fg); }

.status-line.status-error { color: var(--bad-fg); }

/* The private warning (SKEL-211) in the mockup's warning panel. */
.private-warning {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--warn-bd);
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--fg1);
}

.private-warning h3 { margin: 0 0 8px 0; font-size: 16px; line-height: 24px; color: var(--warn-fg); }

/* The record page (mockup item page: header, details card, lifecycle, tabs). */
.submission-detail {
  margin-top: 0;
  padding: 16px 20px;
  border: 1px solid var(--stroke2);
  border-radius: 6px;
  background: var(--bg-surface);
}

.submission-detail h2,
.submission-detail h3 { font-family: var(--font); }

.submission-detail .record-header { align-items: flex-start; gap: 14px; }

.submission-detail .record-header-text h2 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  margin: 0;
}

.submission-detail .record-subline {
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 16px;
  color: var(--fg3);
}

.submission-detail .record-subline .record-number {
  font-family: var(--font);
  font-weight: 600;
  color: var(--fg2);
}

.submission-detail .next-line {
  margin: 12px 0;
  padding: 0;
  background: transparent;
  color: var(--fg2);
}

.submission-detail .next-line strong { color: var(--fg1); }

.details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0;
  margin: 12px 0;
  padding: 4px 16px;
  border: 1px solid var(--stroke2);
  border-radius: 6px;
  background: var(--bg-surface);
}

.details > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--stroke2);
}

.details dt {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--fg3);
}

.details dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  overflow-wrap: anywhere;
}

.life {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 16px 0;
  padding: 18px 8px 14px;
  border: 1px solid var(--stroke2);
  border-radius: 6px;
  background: var(--bg-surface);
  list-style: none;
}

.life .life-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 0 6px;
  text-align: center;
}

.life .life-stage::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--stroke1);
}

.life .life-stage:first-child::before { display: none; }

.life .lifecycle-stage-done::before,
.life .lifecycle-stage-current::before { background: var(--ok-fg); }

.life .lifecycle-stage-bad::before { background: var(--bad-fg); }

.life .dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  border: 2px solid var(--stroke1);
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--fg3);
}

.life .lifecycle-stage-done .dot { border-color: var(--ok-fg); background: var(--ok-fg); color: var(--on-brand); }

.life .lifecycle-stage-current .dot { border-color: var(--brand); color: var(--brand-fg); box-shadow: 0 0 0 4px var(--brand-soft); }

.life .lifecycle-stage-bad .dot { border-color: var(--bad-fg); background: var(--bad-fg); color: var(--on-brand); }

.life .lifecycle-stage-skip .dot { border-style: dashed; }

.life .lifecycle-stage-skip .dot,
.life .lifecycle-stage-wait .dot { opacity: .6; }

.life .txt { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }

.life .lbl { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--fg1); }

.life .lbl::before { content: none; }

.life .lifecycle-stage-current .lbl { color: var(--brand-fg); }

.life .lifecycle-stage-bad .lbl { color: var(--bad-fg); }

.life .st { font-size: 12px; line-height: 16px; color: var(--fg2); font-variant-numeric: tabular-nums; }

.life .nt { font-size: 12px; line-height: 16px; color: var(--fg3); overflow-wrap: anywhere; }

.life .lifecycle-stage-skip,
.life .lifecycle-stage-wait { opacity: 1; }

.submission-detail .record-tabs { margin-top: 16px; }

.submission-detail .record-tab-panel h3 { margin: 16px 0 8px 0; font-size: 14px; line-height: 20px; font-weight: 600; }

@media (max-width: 1100px) {
  .life { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .life .life-stage:nth-child(3n+1)::before { display: none; }
}

@media (max-width: 767px) {
  .portal-main .card { padding: 14px 16px; }

  .submit-panel.addbar { padding: 14px 16px; }

  .details { grid-template-columns: minmax(0, 1fr); }

  .life { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding: 6px 14px; }

  .life .life-stage {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--stroke2);
    text-align: left;
  }

  .life .life-stage:last-child { border-bottom: 0; }

  .life .life-stage::before { display: none; }

  .life .dot { flex: none; margin: 0; }

  .life .txt { align-items: flex-start; }

  .submission-detail { padding: 14px 16px; }

  .submission-detail .record-header-text h2 { font-size: 20px; line-height: 28px; }

  .tbl-wrap { background: transparent; box-shadow: none; }

  .grid.submissions-table tbody tr.submission-row {
    border: 1px solid var(--stroke2);
    border-radius: 6px;
    background: var(--bg-surface);
    box-shadow: var(--shadow4);
  }

  .grid.submissions-table td { padding: 2px 0; border: 0; }

  .grid.submissions-table tbody tr:hover td { background: transparent; }
}

/* ==== SKEL-215: projects, project page and My account restyled to mockup v20 (look only) ====
   Builds on the SKEL-214 components above (.card, .tag, .ft, .tbl-wrap/.grid, .details, .btn, .input).
   Adds the page head, the stacked phone rows, the mockup's fact list (.dl) and code block (pre.code). */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0 0 4px 0;
}

.page-head h1 { margin: 0; }

.page-head + .subtitle { margin-top: 0; }

/* The New project form is a card whose summary is its heading; the top button opens it. */
.new-project-card .new-project-details summary {
  padding: 0;
  color: var(--fg1);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.new-project-card .new-project-details form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stroke2); }

.new-project-card .field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px 0; }

.new-project-card .field > label,
.new-project-card legend { font-weight: 600; }

.new-project-card .field-error { min-height: 0; margin: 0; }

.new-project-card .np-actions { margin-top: 12px; }

/* Facts as rows (mockup .dl): a muted term, then its value, a hairline between rows. */
.dl.detail-fields {
  display: grid;
  grid-template-columns: minmax(96px, 150px) 1fr;
  gap: 0;
  margin: 0;
}

.dl.detail-fields dt,
.dl.detail-fields dd {
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--stroke2);
}

.dl.detail-fields dt {
  padding-right: 12px;
  color: var(--fg3);
  font-size: 14px;
  font-weight: 400;
}

.dl.detail-fields dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dl.detail-fields dt:last-of-type,
.dl.detail-fields dd:last-of-type { border-bottom: 0; }

/* Code blocks (mockup pre.code). */
.code-block pre.code {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--stroke2);
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--fg1);
  font: 13px/20px var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.clone { border-color: var(--stroke1); border-radius: 4px; }

.clone code { background: var(--bg-subtle); font-family: var(--mono); }

.clone button { border-left-color: var(--stroke1); }

.card h3 { margin: 8px 0 0 0; font-size: 14px; line-height: 20px; font-weight: 600; }

.card h2 + p,
.card p + h2 { margin-top: 0; }

.branch-check-row { border-bottom-color: var(--stroke2); }

.branch-check-row:last-child { border-bottom: 0; }

td.mono { font-family: var(--mono); }

/* Phone: a table with data-label cells becomes stacked rows, so no column silently drops. */
@media (max-width: 767px) {
  .page-head .btn-primary { flex: none; }

  .dl.detail-fields { grid-template-columns: minmax(0, 1fr); }

  .dl.detail-fields dt { padding-bottom: 0; border-bottom: 0; }

  table.stack-table,
  table.stack-table tbody,
  table.stack-table tr,
  table.stack-table td { display: block; width: 100%; }

  table.stack-table thead { display: none; }

  table.stack-table tbody tr {
    margin-bottom: 8px;
    padding: 8px 12px;
    border: 1px solid var(--stroke2);
    border-radius: 6px;
    background: var(--bg-surface);
  }

  table.stack-table td { padding: 2px 0; border: 0; }

  table.stack-table td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--fg3);
    font-weight: 600;
  }

  table.stack-table td.mono { white-space: normal; }

  .card .tbl-wrap { background: transparent; box-shadow: none; }
}

.tbl-wrap .admin-table { margin-top: 0; }

.admin-table.grid th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke1);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg2);
  white-space: nowrap;
}

.admin-table.grid td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke2);
  vertical-align: top;
}

.admin-table.grid td[data-label="Name"],
.admin-table.grid td[data-label="Email"] { overflow-wrap: anywhere; }
.admin-table.grid td[data-label="Email"] { min-width: 13rem; }
.admin-table.grid td[data-label="Role"],
.admin-table.grid td[data-label="Status"],
.admin-table.grid td[data-label="Actions"] { white-space: nowrap; }
.admin-table.grid td[data-label="Git access"] { min-width: 7rem; }
.admin-table.grid .admin-row-actions { flex-wrap: nowrap; }
.admin-row-actions .btn-secondary { white-space: nowrap; }

.admin-table.grid tbody tr:last-child td { border-bottom: 0; }
.admin-table.grid tbody tr:hover { background: var(--bg-hover); }
.admin-table.grid td.num { font-variant-numeric: tabular-nums; }

/* People: one action in the row, the rest in the row menu. */
.admin-row-actions { align-items: center; }
.admin-row-actions form { margin: 0; }
.admin-row-actions .btn-secondary,
.admin-row-actions .btn-danger { min-height: 32px; padding: 0 12px; display: inline-flex; align-items: center; }

.row-menu { position: relative; }
.row-menu > summary { list-style: none; cursor: pointer; gap: 4px; }
.row-menu > summary::-webkit-details-marker { display: none; }

.row-menu-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  padding: 4px;
  background: var(--bg-surface);
  border-radius: 4px;
  box-shadow: var(--shadow16);
}

.row-menu-list .menu-item { white-space: nowrap; }
.row-menu-list .rename-details > summary { cursor: pointer; }
.row-menu-list .rename-form { min-width: 0; padding: var(--space-sm) 12px; }
.menu-item-danger,
.menu-item-danger:hover { color: var(--bad-fg); }

.status-locked { color: var(--bad-fg); font-weight: 600; }

/* The confirm before a role grant: the same .card + .confirm-card every other confirm page uses
   (SKEL-222: this used to redefine .confirm-card's own background/padding/border-radius/box-shadow
   a second time, conflicting with the base declaration above), plus a brand-coloured left border
   so a grant -- a wider-reaching change than a decline or delete -- still reads as distinct. */
.confirm-card.grant-confirm-card { border-left: 4px solid var(--brand); }

.confirm-card p { margin: 0 0 var(--space-sm) 0; }
.confirm-card p:last-child { margin-bottom: 0; }
.confirm-go { width: auto; min-height: 32px; padding: 0 12px; }

/* Status: the mockup's task list. */
.status-line {
  display: inline-flex;
  align-items: center;
  margin: 0 0 var(--space-md) 0;
  padding: 6px 12px;
  border: 1px solid var(--info-bd);
  border-radius: 4px;
  font-weight: 600;
}

.status-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-bd); }
.status-problem { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-bd); }

.tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-surface);
  border-radius: 4px;
  box-shadow: var(--shadow4);
}

.tasks > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 14px 20px;
  border-bottom: 1px solid var(--stroke2);
}

.tasks > li:last-child { border-bottom: 0; }
.status-main { min-width: 0; flex: 1; }
.status-title { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.status-list .hint { display: block; margin: 0; font-size: 12px; line-height: 16px; color: var(--fg3); }
.status-list .needs-you-list { margin-top: var(--space-sm); gap: 0; }
.status-list .btn-secondary { flex: none; white-space: nowrap; }

/* Feedback: the mockup's cards and tags. */
.feedback-item {
  border: 0;
  border-left: 3px solid var(--stroke1);
  border-radius: 4px;
  box-shadow: var(--shadow4);
  padding: var(--space-md) 20px;
}

.feedback-category-badge,
.feedback-status-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font: 600 12px/16px var(--font);
  letter-spacing: 0;
  text-transform: capitalize;
}

.feedback-item-header { gap: var(--space-sm) var(--space-md); align-items: center; }
.feedback-item-actions .btn-secondary { min-height: 32px; padding: 0 12px; }

@media (max-width: 767.98px) {
  .head-details[open] { order: 3; }
  .head-panel { max-width: none; }
  .admin-table.grid td { padding: 4px 0; border-bottom: 0; }
  .tbl-wrap { background: none; box-shadow: none; }
  .admin-table.grid tbody tr:hover { background: var(--bg-surface); }
  .admin-table.grid tbody tr { background: var(--bg-surface); box-shadow: var(--shadow4); border: 0; }
  .row-menu { width: 100%; }
  .row-menu > summary { width: 100%; justify-content: center; }
  .row-menu-list { position: static; margin-top: 4px; min-width: 0; box-shadow: none; border: 1px solid var(--stroke2); }
  .row-menu-list .menu-item { white-space: normal; }
  .admin-row-actions { flex-direction: column; align-items: stretch; }
  .tasks > li { flex-direction: column; align-items: flex-start; padding: 14px 16px; }
  .head-buttons { width: 100%; }
}
