/*
 * Customer portal styles. Tokens are a focused snapshot of Forge FDS
 * (kernel origin/main 4c4a05b0182fb79f4dad863776f5eb837d8ad493):
 *   services/typescript/forge-v2/src/styles.css  (@theme radii, --sy-font-*)
 *   libs/typescript/ui-2/src/defaults.css        (FDS light and dark tokens)
 * Geist is not bundled (CSP default-src 'none' has no font-src); the stack is
 * Forge's fallback. TestForgeThemeContract pins the declarations.
 *
 * Unused by rules, kept as Forge parity: --fds-color-foreground-negative,
 * --fds-radius-small, --radius-xl, --sy-typo-h1-size, --sy-typo-h2-size.
 */

:root {
  color-scheme: light;

  --fds-color-divider: rgba(242, 239, 227, 1);
  --fds-color-action-background-enabled: #86923F;
  --fds-color-action-background-hover: #758037;
  --fds-color-action-foreground-enabled: var(--fds-color-background-subtle);
  --fds-color-background-base: #FFFFFF;
  --fds-color-background-subtle: #F7F6F2;
  --fds-color-background-attentive-enabled: rgba(255, 202, 10, 0.17);
  --fds-color-background-ghost-hover: rgba(178, 166, 118, 0.1);
  --fds-color-background-informative-enabled: rgba(66, 175, 255, 0.15);
  --fds-color-background-negative-enabled: rgba(203, 23, 20, 0.08);
  --fds-color-background-neutral-enabled: rgba(178, 166, 118, 0.15);
  --fds-color-background-positive-enabled: rgba(177, 211, 7, 0.16);
  --fds-color-foreground-primary: #262626;
  --fds-color-foreground-secondary: #6B6966;
  --fds-color-foreground-positive: #64780C;
  --fds-color-foreground-negative: #CB1714;
  --fds-color-foreground-attentive: #876D0D;
  --fds-color-foreground-informative: #0071C2;
  --fds-color-outline-enabled: rgba(178, 166, 118, 0.35);
  --fds-color-outline-hover: rgba(178, 166, 118, 0.54);
  --fds-color-outline-focus: #7E8B3C;

  --fds-space-xxsmall: 2px;
  --fds-space-xsmall: 4px;
  --fds-space-small: 8px;
  --fds-space-medium: 12px;
  --fds-space-large: 16px;
  --fds-space-xlarge: 24px;

  --fds-radius-small: 0px;
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;

  --fds-elevation-small: 0px 4px 16px 0px rgba(248, 226, 182, 0.2), 0px 1px 2px 0px rgba(232, 225, 211, 0.6);

  --sy-font-sans: ui-sans-serif, system-ui, sans-serif;
  --sy-font-mono: ui-monospace, SFMono-Regular, monospace;
  --sy-typo-h1-size: 2.25rem;
  --sy-typo-h1-weight: 600;
  --sy-typo-h2-size: 1.5rem;
  --sy-typo-h2-weight: 600;
  --sy-typo-h2-line-height: 1.25;
  --sy-typo-h2-tracking: -0.01em;
  --sy-typo-body-size: 0.875rem;
  --sy-typo-body-weight: 400;
  --sy-typo-body-line-height: 1.57;
  --sy-typo-body-tracking: -0.003em;
  --sy-typo-label-small-size: 0.75rem;
  --sy-typo-fds-header-medium-size: 1.5rem;
  --sy-typo-fds-title-large-size: 1rem;
  --sy-focus-ring-width: 2px;
  --sy-focus-ring-offset: 2px;
}

/*
 * Dark tokens. Both selectors are required: .dark / [data-theme="dark"] is
 * Forge's class contract (styles.css:9-11); the media query is how a
 * script-free page follows the OS. CSS has no mixin that can share one
 * declaration list across a class selector and a media query.
 */
.dark,
[data-theme="dark"] {
  color-scheme: dark;
  --fds-color-divider: rgba(243, 229, 184, 0.07);
  --fds-color-action-background-enabled: #6F7934;
  --fds-color-action-background-hover: #5F672C;
  --fds-color-action-foreground-enabled: var(--fds-color-foreground-primary);
  --fds-color-background-base: #13120C;
  --fds-color-background-subtle: #1E1E1A;
  --fds-color-background-attentive-enabled: #382C00;
  --fds-color-background-ghost-hover: rgba(223, 222, 221, 0.06);
  --fds-color-background-informative-enabled: #002C4D;
  --fds-color-background-negative-enabled: #3D1211;
  --fds-color-background-neutral-enabled: #292929;
  --fds-color-background-positive-enabled: #2B320B;
  --fds-color-foreground-primary: #E8E5D9;
  --fds-color-foreground-secondary: #9A9787;
  --fds-color-foreground-positive: #C0E80E;
  --fds-color-foreground-negative: #FF5653;
  --fds-color-foreground-attentive: #FBCF2C;
  --fds-color-foreground-informative: #6BC2FF;
  --fds-color-foreground-accent-olive: #7E8B3C;
  --fds-color-outline-enabled: rgba(243, 229, 184, 0.15);
  --fds-color-outline-hover: rgba(243, 229, 184, 0.25);
  --fds-color-outline-focus: var(--fds-color-foreground-accent-olive);
  --fds-elevation-small: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --fds-color-divider: rgba(243, 229, 184, 0.07);
    --fds-color-action-background-enabled: #6F7934;
    --fds-color-action-background-hover: #5F672C;
    --fds-color-action-foreground-enabled: var(--fds-color-foreground-primary);
    --fds-color-background-base: #13120C;
    --fds-color-background-subtle: #1E1E1A;
    --fds-color-background-attentive-enabled: #382C00;
    --fds-color-background-ghost-hover: rgba(223, 222, 221, 0.06);
    --fds-color-background-informative-enabled: #002C4D;
    --fds-color-background-negative-enabled: #3D1211;
    --fds-color-background-neutral-enabled: #292929;
    --fds-color-background-positive-enabled: #2B320B;
    --fds-color-foreground-primary: #E8E5D9;
    --fds-color-foreground-secondary: #9A9787;
    --fds-color-foreground-positive: #C0E80E;
    --fds-color-foreground-negative: #FF5653;
    --fds-color-foreground-attentive: #FBCF2C;
    --fds-color-foreground-informative: #6BC2FF;
    --fds-color-foreground-accent-olive: #7E8B3C;
    --fds-color-outline-enabled: rgba(243, 229, 184, 0.15);
    --fds-color-outline-hover: rgba(243, 229, 184, 0.25);
    --fds-color-outline-focus: var(--fds-color-foreground-accent-olive);
    --fds-elevation-small: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sy-font-sans);
  background: var(--fds-color-background-subtle);
  color: var(--fds-color-foreground-primary);
  font-size: var(--sy-typo-body-size);
  font-weight: var(--sy-typo-body-weight);
  line-height: var(--sy-typo-body-line-height);
  letter-spacing: var(--sy-typo-body-tracking);
}

[hidden] {
  display: none !important;
}

a {
  color: var(--fds-color-foreground-informative);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--sy-focus-ring-width) solid var(--fds-color-outline-focus);
  outline-offset: var(--sy-focus-ring-offset);
}

header.app-header {
  display: flex;
  align-items: center;
  gap: var(--fds-space-small) var(--fds-space-xlarge);
  flex-wrap: wrap;
  padding: var(--fds-space-medium) var(--fds-space-xlarge);
  background: var(--fds-color-background-base);
  border-bottom: 1px solid var(--fds-color-divider);
  box-shadow: var(--fds-elevation-small);
}
header.app-header .brand {
  font-weight: 600;
  font-size: var(--sy-typo-fds-title-large-size);
  color: var(--fds-color-foreground-primary);
  text-decoration: none;
}
header.app-header .brand:hover {
  text-decoration: none;
}

nav.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}
nav.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fds-space-xsmall);
  margin: 0;
  padding: 0;
  list-style: none;
}
nav.site-nav a {
  display: block;
  padding: var(--fds-space-xsmall) var(--fds-space-medium);
  border-radius: var(--radius-md);
  color: var(--fds-color-foreground-secondary);
  font-weight: 500;
}
nav.site-nav a:hover {
  background: var(--fds-color-background-ghost-hover);
  color: var(--fds-color-foreground-primary);
  text-decoration: none;
}
nav.site-nav a[aria-current="page"] {
  background: var(--fds-color-background-neutral-enabled);
  color: var(--fds-color-foreground-primary);
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: var(--fds-space-small);
  top: -4rem;
  z-index: 1;
  padding: var(--fds-space-small) var(--fds-space-medium);
  background: var(--fds-color-background-base);
  border-radius: var(--radius-md);
}
.skip-link:focus {
  top: var(--fds-space-small);
}

form.sign-out {
  margin: 0 0 0 auto;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

form.sign-out button,
form#retry button {
  background: transparent;
  color: var(--fds-color-foreground-secondary);
  border: 1px solid var(--fds-color-outline-enabled);
  border-radius: var(--radius-md);
  padding: var(--fds-space-xsmall) var(--fds-space-medium);
  font-weight: 500;
  font-size: var(--sy-typo-label-small-size);
}
form.sign-out button:hover,
form#retry button:hover {
  background: var(--fds-color-background-ghost-hover);
  color: var(--fds-color-foreground-primary);
  text-decoration: none;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--fds-space-xlarge);
}

pre.command {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

h1 {
  font-size: var(--sy-typo-fds-header-medium-size);
  font-weight: var(--sy-typo-h1-weight);
  line-height: var(--sy-typo-h2-line-height);
  letter-spacing: var(--sy-typo-h2-tracking);
  margin: 0 0 var(--fds-space-large) 0;
  overflow-wrap: anywhere;
}
h2 {
  font-size: var(--sy-typo-fds-title-large-size);
  font-weight: var(--sy-typo-h2-weight);
  line-height: var(--sy-typo-h2-line-height);
  margin: 0 0 var(--fds-space-small) 0;
  overflow-wrap: anywhere;
}
p {
  margin: 0 0 var(--fds-space-small) 0;
  overflow-wrap: anywhere;
}

.card {
  background: var(--fds-color-background-base);
  border: 1px solid var(--fds-color-outline-enabled);
  border-radius: var(--radius-lg);
  padding: var(--fds-space-large);
  margin-bottom: var(--fds-space-large);
  box-shadow: var(--fds-elevation-small);
}

.chip {
  display: inline-block;
  font-family: var(--sy-font-mono);
  font-size: var(--sy-typo-label-small-size);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: var(--fds-space-xxsmall) var(--fds-space-small);
  border-radius: var(--radius-sm);
  margin-bottom: var(--fds-space-small);
  max-width: 100%;
  overflow-wrap: anywhere;
  background: var(--fds-color-background-neutral-enabled);
  color: var(--fds-color-foreground-secondary);
}
.chip-positive {
  background: var(--fds-color-background-positive-enabled);
  color: var(--fds-color-foreground-positive);
}
.chip-attentive {
  background: var(--fds-color-background-attentive-enabled);
  color: var(--fds-color-foreground-attentive);
}
.chip-informative {
  /* Light: no tint. #0071C2 on #FFFFFF = 5.07:1 (tinted informative-enabled was 4.47). */
  background: var(--fds-color-background-base);
  color: var(--fds-color-foreground-informative);
}

.dark .chip-informative,
[data-theme="dark"] .chip-informative {
  background: var(--fds-color-background-informative-enabled);
}

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

ul.notes {
  margin: var(--fds-space-medium) 0;
  padding: var(--fds-space-small) var(--fds-space-medium) var(--fds-space-small) var(--fds-space-xlarge);
  background: var(--fds-color-background-attentive-enabled);
  color: var(--fds-color-foreground-attentive);
  border-radius: var(--radius-md);
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fds-space-medium);
  margin-top: var(--fds-space-medium);
}

/*
 * Portal-only AA override of Forge's primary pairing (D32). Labels are
 * 0.875rem/600 (normal text), so WCAG AA is 4.5:1. Forge's own pairing is
 * action-foreground on action-background-enabled: light #F7F6F2 on #86923F
 * = 3.13:1, dark #E8E5D9 on #6F7934 = 3.73:1.
 *
 * Light enabled: #F7F6F2 on --fds-color-foreground-positive #64780C = 4.59:1
 * Light hover/focus: #F7F6F2 on --fds-color-foreground-primary #262626 = 13.99:1
 * Dark enabled: #E8E5D9 on --fds-color-action-background-hover #5F672C = 4.81:1
 * Dark hover/focus: #E8E5D9 on --fds-color-background-positive-enabled #2B320B = 10.64:1
 * Focus does not change fill (the 2px outline-focus ring is the focus state).
 */
.button {
  display: inline-block;
  padding: var(--fds-space-small) var(--fds-space-large);
  font-family: inherit;
  font-size: var(--sy-typo-body-size);
  font-weight: 600;
  line-height: 1.25;
  background: var(--fds-color-foreground-positive);
  color: var(--fds-color-action-foreground-enabled);
  border: none;
  border-radius: var(--radius-md);
  text-align: center;
}
.button:hover {
  background: var(--fds-color-foreground-primary);
  text-decoration: none;
}
.dark .button,
[data-theme="dark"] .button {
  background: var(--fds-color-action-background-hover);
}
.dark .button:hover,
[data-theme="dark"] .button:hover {
  background: var(--fds-color-background-positive-enabled);
}

@media (prefers-color-scheme: dark) {
  :root .button {
    background: var(--fds-color-action-background-hover);
  }
  :root .button:hover {
    background: var(--fds-color-background-positive-enabled);
  }
  :root .chip-informative {
    background: var(--fds-color-background-informative-enabled);
  }
}

.crumb {
  font-size: var(--sy-typo-label-small-size);
  margin-bottom: var(--fds-space-medium);
}

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--fds-space-xsmall) var(--fds-space-large);
  margin: 0;
}
dl.facts dt {
  color: var(--fds-color-foreground-secondary);
}
dl.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

label {
  display: block;
  font-size: var(--sy-typo-label-small-size);
  margin-bottom: var(--fds-space-xsmall);
  color: var(--fds-color-foreground-secondary);
}

.field {
  margin: 0 0 var(--fds-space-large) 0;
  min-width: 0;
}
.field > .legend {
  display: block;
  font-size: var(--sy-typo-label-small-size);
  margin: 0 0 var(--fds-space-xsmall) 0;
  color: var(--fds-color-foreground-secondary);
}

input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: var(--fds-space-small) var(--fds-space-medium);
  font-family: inherit;
  font-size: var(--sy-typo-body-size);
  background: var(--fds-color-background-base);
  border: 1px solid var(--fds-color-outline-enabled);
  border-radius: var(--radius-md);
  color: inherit;
}
input:not([type="radio"]):not([type="checkbox"]):hover,
select:hover,
textarea:hover {
  border-color: var(--fds-color-outline-hover);
}
/* A secret value is a textarea, so a PEM keeps its line breaks; it is masked as a
   password input would be. */
textarea.secret {
  -webkit-text-security: disc;
  font-family: var(--sy-font-mono);
}

.field .options {
  display: flex;
  flex-direction: column;
  gap: var(--fds-space-small);
}
.field .options p {
  margin: 0;
}
.field .options label {
  display: flex;
  align-items: flex-start;
  gap: var(--fds-space-small);
  margin-bottom: 0;
  font-size: var(--sy-typo-body-size);
  line-height: var(--sy-typo-body-line-height);
  color: var(--fds-color-foreground-primary);
  cursor: pointer;
}
.field .options label.option-unavailable {
  color: var(--fds-color-foreground-secondary);
  cursor: not-allowed;
}
input[type="radio"] {
  width: auto;
  max-width: none;
  margin: var(--fds-space-xxsmall) 0 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--fds-color-outline-focus);
}

.mono {
  font-family: var(--sy-font-mono);
  font-size: var(--sy-typo-label-small-size);
}
.muted {
  color: var(--fds-color-foreground-secondary);
}

@media (max-width: 480px) {
  header.app-header {
    padding: var(--fds-space-medium) var(--fds-space-large);
  }
  main {
    padding: var(--fds-space-large);
  }
  dl.facts {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dl.facts dd {
    margin-bottom: var(--fds-space-small);
  }
  .actions .button,
  form .button {
    width: 100%;
    text-align: center;
  }
}

/* Onboarding wizard: server-rendered steps, one per page without JavaScript. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wizard progress {
  width: 100%;
}
.wizard .steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fds-space-small) var(--fds-space-large);
  padding-left: var(--fds-space-large);
  margin: var(--fds-space-small) 0 var(--fds-space-large) 0;
}
.wizard .steps .current a {
  font-weight: 600;
}
.field .suggestion {
  margin: var(--fds-space-xsmall) 0;
}
.derived {
  margin-bottom: var(--fds-space-large);
}

/* ---- Shared page furniture: header navigation, headings, tables, badges. ---- */

h3 {
  font-size: var(--sy-typo-body-size);
  font-weight: 600;
  margin: var(--fds-space-large) 0 var(--fds-space-small) 0;
}
.card > h2 {
  margin-bottom: var(--fds-space-medium);
}
.card > h2 + .lede {
  margin-top: calc(-1 * var(--fds-space-small));
}
code,
pre {
  font-family: var(--sy-font-mono);
  font-size: 0.8125rem;
}
code {
  padding: 0 var(--fds-space-xsmall);
  border-radius: var(--radius-sm);
  background: var(--fds-color-background-neutral-enabled);
  overflow-wrap: anywhere;
}
pre {
  margin: 0 0 var(--fds-space-medium) 0;
  padding: var(--fds-space-medium);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--fds-color-background-subtle);
  border: 1px solid var(--fds-color-outline-enabled);
  border-radius: var(--radius-md);
}
pre code {
  padding: 0;
  background: none;
}
ul,
ol {
  margin: 0 0 var(--fds-space-medium) 0;
  padding-left: var(--fds-space-xlarge);
}
li {
  margin-bottom: var(--fds-space-xsmall);
  overflow-wrap: anywhere;
}
hr {
  border: 0;
  border-top: 1px solid var(--fds-color-divider);
  margin: var(--fds-space-large) 0;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fds-space-small) var(--fds-space-large);
  margin-bottom: var(--fds-space-large);
}
.page-head h1 {
  margin: 0;
}
.page-head .sub {
  flex-basis: 100%;
  margin: 0;
  color: var(--fds-color-foreground-secondary);
}

/* Tables: a bordered grid that scrolls sideways rather than overflowing. */
.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--fds-space-medium);
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--fds-space-medium);
}
.table-wrap > table {
  margin-bottom: 0;
}
th,
td {
  padding: var(--fds-space-small) var(--fds-space-medium);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--fds-color-divider);
}
/* Labels keep their words whole: `anywhere` counts every character as a break when
   the table sizes its columns, so it would squeeze a label column below its longest
   word. Only value cells may break a long token. */
th,
nav.site-nav li,
.filters li {
  overflow-wrap: normal;
}
/* A cell breaks a word only to stay inside a stacked key/value table, where the value
   has the whole row; any other table scrolls rather than split a word. */
td {
  overflow-wrap: break-word;
}
table.kv td {
  overflow-wrap: anywhere;
}
thead th {
  font-size: var(--sy-typo-label-small-size);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fds-color-foreground-secondary);
  white-space: nowrap;
}
tbody th {
  font-weight: 500;
  color: var(--fds-color-foreground-secondary);
  width: 34%;
}
tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}
/* A table that is the whole card: the card clips and scrolls it, so it never
   spills past the card's edge. */
.card.table-card {
  padding: 0;
  overflow-x: auto;
}
.table-card > table {
  margin-bottom: 0;
}
.table-card tbody tr:last-child td {
  border-bottom: 0;
}

/* Gate names are short labels: keep them whole and let the table stack instead. */
table.gates td {
  overflow-wrap: normal;
}

td.num,
th.num {
  font-variant-numeric: tabular-nums;
}
td.when {
  white-space: nowrap;
}

/* Status badges: a tone plus a word, never colour alone. */
.badge {
  display: inline-block;
  padding: var(--fds-space-xxsmall) var(--fds-space-small);
  border-radius: 999px;
  font-size: var(--sy-typo-label-small-size);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--fds-color-background-neutral-enabled);
  color: var(--fds-color-foreground-secondary);
}
.badge-positive {
  background: var(--fds-color-background-positive-enabled);
  color: var(--fds-color-foreground-positive);
}
.badge-attentive {
  background: var(--fds-color-background-attentive-enabled);
  color: var(--fds-color-foreground-attentive);
}
.badge-negative {
  background: var(--fds-color-background-negative-enabled);
  color: var(--fds-color-foreground-negative);
}
.badge-informative {
  background: var(--fds-color-background-informative-enabled);
  color: var(--fds-color-foreground-informative);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fds-space-small);
  align-items: center;
}

/* Notices: a message at the top of a page. */
.notice {
  margin: 0 0 var(--fds-space-large) 0;
  padding: var(--fds-space-medium) var(--fds-space-large);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--fds-color-foreground-informative);
  background: var(--fds-color-background-informative-enabled);
}
.notice-negative {
  border-left-color: var(--fds-color-foreground-negative);
  background: var(--fds-color-background-negative-enabled);
}

/* Status summary: stage badges, then the path the onboarding has taken. */
.summary .badges {
  margin-bottom: var(--fds-space-medium);
}
.summary td.step {
  font-weight: 500;
}
.summary .pending td,
.summary .pending th {
  color: var(--fds-color-foreground-secondary);
}

/* Needs action: the one block that asks someone to do something. */
.needs-action {
  border-left: 4px solid var(--fds-color-foreground-attentive);
}
.needs-action.none {
  border-left-color: var(--fds-color-foreground-positive);
}
.needs-action .action {
  padding: var(--fds-space-medium) 0;
  border-top: 1px solid var(--fds-color-divider);
}
.needs-action .action:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.needs-action .action:last-child {
  padding-bottom: 0;
}
.needs-action .action-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fds-space-small);
  margin: 0 0 var(--fds-space-xsmall) 0;
}
.needs-action .action > p {
  margin-bottom: var(--fds-space-xsmall);
}
.needs-action .action .actions {
  margin-top: var(--fds-space-small);
}

/* Problems sit next to the item they belong to. */
ul.problems {
  list-style: none;
  margin: var(--fds-space-small) 0;
  padding: 0;
}
ul.problems li {
  padding: var(--fds-space-small) var(--fds-space-medium);
  margin-bottom: var(--fds-space-xsmall);
  border-left: 3px solid var(--fds-color-foreground-negative);
  background: var(--fds-color-background-negative-enabled);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
ul.problems .item {
  font-weight: 600;
}
.problem {
  margin: var(--fds-space-xsmall) 0;
  padding: var(--fds-space-small) var(--fds-space-medium);
  border-left: 3px solid var(--fds-color-foreground-negative);
  background: var(--fds-color-background-negative-enabled);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
tr.has-problem > th,
tr.has-problem > td {
  background: var(--fds-color-background-negative-enabled);
}
.cell-problem {
  display: block;
  margin-top: var(--fds-space-xsmall);
  color: var(--fds-color-foreground-negative);
  font-weight: 500;
}

/* Buttons: secondary is outlined, for the less likely of two choices. */
.button.secondary {
  background: transparent;
  color: var(--fds-color-foreground-primary);
  border: 1px solid var(--fds-color-outline-hover);
}
.button.secondary:hover {
  background: var(--fds-color-background-ghost-hover);
}
a.button:hover {
  color: var(--fds-color-action-foreground-enabled);
}
form {
  margin: 0;
}

/* Filters: the states a list can be narrowed to. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fds-space-small);
  margin: 0 0 var(--fds-space-large) 0;
  padding: 0;
  list-style: none;
}
.filters a,
.filters strong {
  display: inline-block;
  padding: var(--fds-space-xsmall) var(--fds-space-medium);
  border-radius: 999px;
  border: 1px solid var(--fds-color-outline-enabled);
  background: var(--fds-color-background-base);
  font-weight: 500;
}
.filters strong {
  background: var(--fds-color-foreground-primary);
  color: var(--fds-color-background-base);
  border-color: var(--fds-color-foreground-primary);
}
.filters a:hover {
  background: var(--fds-color-background-ghost-hover);
  text-decoration: none;
}

progress {
  width: 100%;
  max-width: 8rem;
  height: 0.5rem;
  vertical-align: middle;
  accent-color: var(--fds-color-foreground-positive);
}

/* A revision list: newest first, one change per line. */
ol.history {
  list-style: none;
  margin: 0;
  padding: 0;
}
ol.history > li {
  padding: var(--fds-space-medium) 0;
  border-top: 1px solid var(--fds-color-divider);
}
ol.history > li:first-child {
  border-top: 0;
  padding-top: 0;
}
ol.history .meta {
  margin: 0 0 var(--fds-space-xsmall) 0;
}
ol.history ul {
  margin: 0;
}

.join-code {
  font-family: var(--sy-font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  header.app-header {
    gap: var(--fds-space-small);
  }
  nav.site-nav {
    order: 3;
    flex-basis: 100%;
  }
  /* A table marked responsive becomes one card per row. */
  table.responsive thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  table.responsive,
  table.responsive tbody,
  table.responsive tr,
  table.responsive td {
    display: block;
    width: 100%;
  }
  table.responsive tr {
    padding: var(--fds-space-small) 0;
    border-bottom: 1px solid var(--fds-color-outline-enabled);
  }
  table.responsive td {
    border: 0;
    padding: var(--fds-space-xxsmall) 0;
  }
  .table-card table.responsive tr {
    padding: var(--fds-space-small) var(--fds-space-medium);
  }
  table.responsive td:empty {
    display: none;
  }
  table.responsive td[data-label]::before {
    content: attr(data-label) ": ";
    font-size: var(--sy-typo-label-small-size);
    color: var(--fds-color-foreground-secondary);
  }
  tbody th {
    width: auto;
  }
  /* A key/value table stacks the label over its value, so the value gets the row. */
  table.kv,
  table.kv tbody,
  table.kv tr,
  table.kv th,
  table.kv td {
    display: block;
    width: 100%;
  }
  table.kv tr {
    padding: var(--fds-space-small) 0;
    border-bottom: 1px solid var(--fds-color-divider);
  }
  table.kv tbody tr:last-child {
    border-bottom: 0;
  }
  table.kv th,
  table.kv td {
    border: 0;
    padding: var(--fds-space-xxsmall) 0;
  }
  table.kv ul {
    padding-left: var(--fds-space-large);
  }
}
.section-title {
  margin: var(--fds-space-xlarge) 0 var(--fds-space-medium) 0;
  font-size: 1.125rem;
}
td.nowrap {
  white-space: nowrap;
}
tr.unset th,
tr.unset td {
  color: var(--fds-color-foreground-secondary);
}
details > summary {
  cursor: pointer;
  list-style-position: inside;
}
details > summary h2 {
  display: inline;
}

/* Staff onboardings list: the customer name is the row's link; its ::after covers
   the row so the whole row is a click target while keyboard and screen-reader users
   still get one real link. */
table.admin-list {
  table-layout: auto;
}
table.admin-list tr.row-link {
  position: relative;
}
table.admin-list tbody tr.row-link:hover {
  background: var(--fds-color-background-neutral-enabled);
}
table.admin-list td.customer {
  min-width: 14rem;
}
table.admin-list td.customer a {
  display: block;
  font-weight: 600;
}
table.admin-list td.customer a::after {
  content: "";
  position: absolute;
  inset: 0;
}
table.admin-list td.customer a:focus-visible {
  outline: none;
}
table.admin-list tr.row-link:has(a:focus-visible) {
  outline: 2px solid var(--fds-color-outline-focus, currentColor);
  outline-offset: -2px;
}
table.admin-list .ids {
  display: block;
  font-size: var(--sy-typo-label-small-size);
}
table.admin-list progress {
  width: 5rem;
  vertical-align: middle;
}
@media (max-width: 640px) {
  table.admin-list td.customer {
    min-width: 0;
  }
  table.admin-list td.customer a {
    font-size: 1.0625rem;
  }
}
