/* dist/design-tokens.css */
:root {
  --us-color-primary: #0b6b5c;
  --us-color-primary-on: #ffffff;
  --us-color-ink: #172025;
  --us-color-muted: #657176;
  --us-color-paper: #fbfcfa;
  --us-color-surface: #ffffff;
  --us-color-sunken: #f2f5f1;
  --us-color-line: #dce2df;
  --us-color-control-border: #76857f;
  --us-color-deep: #102b29;
  --us-color-focus-light: #95600c;
  --us-color-focus-dark: #e2a83b;
  --us-color-dark-surface: #193a35;
  --us-color-dark-raised: #214740;
  --us-color-dark-text: #eaf1ed;
  --us-color-dark-muted: #bbcbc4;
  --us-color-dark-accent: #8ccfbd;
  --us-color-dark-control-border: #8ca99e;
  --us-color-danger-light: #a1231f;
  --us-color-danger-dark: #ffaaa3;
  --us-color-success-light: #17603a;
  --us-color-success-dark: #a4e0c1;
  --us-color-warning-light-surface: #fdf3d8;
  --us-color-warning-light-text: #4a3806;
  --us-color-warning-dark-surface: #3a2f11;
  --us-color-warning-dark-text: #ffe7a8;
  --us-color-chart-suggestions-light: #0077b6;
  --us-color-chart-votes-light: #a04a00;
  --us-color-chart-comments-light: #6b3fa0;
  --us-color-chart-suggestions-dark: #3f9fd4;
  --us-color-chart-votes-dark: #d2923a;
  --us-color-chart-comments-dark: #b08cda;
  --us-spacing-xs: 4px;
  --us-spacing-sm: 8px;
  --us-spacing-md: 16px;
  --us-spacing-lg: 24px;
  --us-spacing-xl: 32px;
  --us-spacing-section: 48px;
  --us-rounded-control: 5px;
  --us-rounded-card: 8px;
  --us-rounded-feature: 12px;
  --us-rounded-pill: 999px;
  --us-font-sans:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* apps/console/src/styles.css */
:root {
  color-scheme: light dark;
  --surface: light-dark(var(--us-color-surface), var(--us-color-dark-surface));
  --surface-sunken: light-dark(var(--us-color-paper), var(--us-color-deep));
  --surface-raised: light-dark(var(--us-color-surface), var(--us-color-dark-raised));
  --text: light-dark(var(--us-color-ink), var(--us-color-dark-text));
  --muted-text: light-dark(var(--us-color-muted), var(--us-color-dark-muted));
  --accent: light-dark(var(--us-color-primary), var(--us-color-dark-accent));
  --accent-text: light-dark(var(--us-color-primary-on), var(--us-color-deep));
  --border: light-dark(var(--us-color-control-border), var(--us-color-dark-control-border));
  --divider: light-dark(var(--us-color-line), var(--us-color-dark-control-border));
  --focus: light-dark(var(--us-color-focus-light), var(--us-color-focus-dark));
  --danger: light-dark(var(--us-color-danger-light), var(--us-color-danger-dark));
  --danger-text: light-dark(var(--us-color-primary-on), var(--us-color-deep));
  --ok: light-dark(var(--us-color-success-light), var(--us-color-success-dark));
  --chart-suggestions: light-dark( var(--us-color-chart-suggestions-light), var(--us-color-chart-suggestions-dark) );
  --chart-votes: light-dark(var(--us-color-chart-votes-light), var(--us-color-chart-votes-dark));
  --chart-comments: light-dark( var(--us-color-chart-comments-light), var(--us-color-chart-comments-dark) );
  --chart-value-text: light-dark(var(--us-color-primary-on), var(--us-color-ink));
  --warning-surface: light-dark( var(--us-color-warning-light-surface), var(--us-color-warning-dark-surface) );
  --warning-text: light-dark(var(--us-color-warning-light-text), var(--us-color-warning-dark-text));
  --radius: var(--us-rounded-control);
}
:root[data-theme=light] {
  color-scheme: light;
}
:root[data-theme=dark] {
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface-sunken);
  color: var(--text);
  font-family: var(--us-font-sans);
  font-size: 1rem;
  line-height: 1.55;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
main:focus {
  outline: none;
}
main:focus-visible {
  outline: 3px solid var(--focus);
}
a {
  color: var(--accent);
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}
.wrap,
.identity-bar-inner {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding-inline: clamp(1rem, 3vw, 1.5rem);
}
.theme-toggle {
  display: grid;
  place-items: center;
  margin-inline-start: auto;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.theme-toggle:hover {
  background: var(--surface-sunken);
}
.identity-who + .theme-toggle {
  margin-inline-start: 0;
}
.identity-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  padding-top: env(safe-area-inset-top, 0px);
}
.identity-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  min-height: 4.75rem;
  padding-block: 0.75rem;
}
.brand-navigation {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.04em;
}
.wordmark:hover,
.brand-context:hover {
  text-decoration: underline;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-text);
  font-family:
    Iowan Old Style,
    "Palatino Linotype",
    Palatino,
    Georgia,
    serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1;
}
.brand-context {
  margin-inline-start: 0.35rem;
  padding-inline-start: 0.8rem;
  border-inline-start: 1px solid var(--divider);
  color: var(--muted-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
}
.identity-who {
  color: var(--muted-text);
  margin-inline-start: auto;
  font-size: 0.875rem;
}
.sign-out-form {
  margin: 0;
}
.sign-out {
  font: inherit;
  color: var(--text);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.sign-out:hover {
  background: var(--surface-sunken);
}
.view {
  padding-block: clamp(2rem, 5vw, 3.5rem) 4rem;
}
h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.9rem, 4.5vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}
h2 {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}
h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}
h4 {
  margin: 1rem 0 0.35rem;
  font-size: 0.95rem;
}
p {
  margin: 0 0 0.75rem;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--muted-text);
}
.breadcrumb-list li + li::before {
  content: "/";
  margin-inline-end: 0.35rem;
  color: var(--muted-text);
}
.version-line {
  color: var(--muted-text);
  font-size: 0.9375rem;
}
.card {
  background: var(--surface-raised);
  border: 1px solid var(--divider);
  border-radius: var(--us-rounded-card);
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  margin-block: 1.5rem;
}
.subsection {
  margin-block: 1.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--divider);
}
.notice {
  border: 1px solid var(--divider);
  border-inline-start-width: 5px;
  border-radius: var(--radius);
  padding: 1rem;
  margin-block: 1rem;
  background: var(--surface-raised);
}
.notice p:last-child {
  margin-bottom: 0;
}
.notice-pending,
.notice-usage {
  background: var(--warning-surface);
  color: var(--warning-text);
  border-inline-start-color: var(--warning-text);
}
.notice-conflict,
.notice-secret,
.notice-plan {
  border-inline-start-color: var(--accent);
}
.notice-ok {
  border-inline-start-color: var(--ok);
}
.notice-error {
  border-inline-start-color: var(--danger);
}
.plan-locked {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.plan-locked:disabled {
  opacity: 0.6;
}
.form {
  margin: 0;
}
.field {
  margin-block: 0.9rem;
}
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.field-checkbox label {
  font-weight: 400;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.checkbox-row input {
  margin-top: 0.3rem;
  width: 1.1rem;
  height: 1.1rem;
}
.input {
  width: 100%;
  max-width: 34rem;
  font: inherit;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
}
textarea.input {
  max-width: 44rem;
  resize: vertical;
}
.input[data-unsaved] {
  --unsaved-tint: 25%;
  background: color-mix(in srgb, var(--surface-raised), var(--accent) var(--unsaved-tint));
  border-inline-start: 4px solid var(--accent);
}
.field-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.help {
  position: relative;
  display: inline-flex;
}
.help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: var(--muted-text);
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: help;
}
.help-button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.help-bubble {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max-content;
  max-width: 22rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  white-space: pre-line;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgb(0 0 0 / 18%);
  visibility: hidden;
}
.help:hover .help-bubble,
.help-button:focus + .help-bubble,
.help-button[aria-expanded=true] + .help-bubble {
  visibility: visible;
}
.field-label:last-child .help-bubble,
.color-grid .help-bubble,
.bar-save .bar-help .help-bubble {
  left: auto;
  right: 0;
}
.bar-help .help-bubble {
  top: auto;
  bottom: calc(100% + 0.35rem);
}
.field-hint {
  color: var(--muted-text);
  font-size: 0.875rem;
  margin: 0.2rem 0;
}
.field-error {
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.25rem 0 0;
}
.field-warning {
  color: var(--warning-text);
  background: var(--warning-surface);
  font-size: 0.8125rem;
  border-radius: var(--radius);
  padding: 0.15rem 0.4rem;
  margin: 0.2rem 0 0;
}
.fieldset {
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 0.75rem 1rem 1rem;
  margin-block: 1.25rem;
}
.fieldset-nested {
  border-style: dashed;
}
legend {
  font-weight: 700;
  padding-inline: 0.35rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block: 0.75rem;
}
.action-feedback {
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
}
.action-feedback > .status,
.action-feedback > .field-hint {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  padding-block: 0.55rem;
  overflow-wrap: anywhere;
}
.button {
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.button-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.button-primary:hover,
.button-secondary:hover,
.button-danger:hover {
  filter: brightness(0.93);
}
.button-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger);
}
.button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.card-danger {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}
.card-danger > h2 {
  color: var(--danger);
}
.status {
  font-weight: 600;
  margin-block: 0.5rem;
}
.status-ok {
  color: var(--ok);
}
.status-error {
  color: var(--danger);
}
.tenant-list,
.app-list,
.key-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tenant-item,
.app-item {
  border-top: 1px solid var(--divider);
  padding-block: 1rem;
}
.tenant-link,
.app-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.tenant-link:hover,
.app-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.tenant-meta,
.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: var(--muted-text);
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}
.tenant-pending {
  color: var(--warning-text);
  background: var(--warning-surface);
  border-radius: var(--radius);
  padding: 0.3rem 0.5rem;
  font-size: 0.875rem;
  margin: 0.4rem 0 0;
}
.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-weight: 600;
}
.pill-pending_approval {
  background: var(--warning-surface);
  color: var(--warning-text);
  border-color: var(--warning-text);
}
.key-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  padding-block: 0.6rem;
}
.key-id {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-weight: 600;
}
.key-created {
  color: var(--muted-text);
  font-size: 0.875rem;
}
.secret-value {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.embed-snippet {
  width: 100%;
  max-width: 44rem;
}
.embed-snippet textarea.input {
  display: block;
  max-width: none;
}
.embed-copy-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 12rem);
  align-items: center;
  justify-content: end;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.embed-copy-row .status {
  grid-column: 2;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.embed-copy-link {
  border: 0;
  padding: 0.25rem 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15rem;
  cursor: pointer;
}
.embed-copy-link:hover {
  color: var(--text);
}
.embed-origin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.embed-origin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.25rem;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--divider);
  padding: 0.4rem 0;
}
.embed-origin-item:last-child {
  border-bottom: 1px solid var(--divider);
}
.embed-origin-item code {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}
.embed-origin-remove {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: var(--danger);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.embed-origin-remove:hover {
  border-color: var(--border);
  background: var(--surface-raised);
}
.embed-origin-remove:disabled {
  opacity: 0.5;
  cursor: wait;
}
.hostname-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hostname-item {
  border-top: 1px solid var(--border);
  padding-block: 0.85rem;
}
.hostname-name {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: 1rem;
  margin: 0;
  overflow-wrap: anywhere;
}
.hostname-state {
  font-weight: 600;
  margin: 0.25rem 0;
}
.hostname-state-pending_verification,
.hostname-state-provisioning {
  color: var(--warning-text);
}
.hostname-state-disabled {
  color: var(--muted-text);
}
.hostname-records {
  margin: 0.5rem 0;
}
.hostname-records dt {
  font-weight: 700;
  margin-top: 0.5rem;
}
.hostname-records dd {
  margin: 0.25rem 0 0;
}
.record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin-block: 0.3rem;
}
.record label {
  flex: 0 0 7rem;
  font-size: 0.875rem;
}
.record-value {
  flex: 1 1 18rem;
  min-width: 0;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.detail-list {
  margin: 0.5rem 0;
}
.detail-list dt {
  font-weight: 700;
}
.detail-list dd {
  margin: 0 0 0.4rem;
}
.role-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-block: 0.75rem;
}
.capability-grid {
  display: grid;
  gap: 0.25rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.color-grid {
  display: grid;
  gap: 0.4rem;
}
.color-grid .field {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(5.5rem, 8.5rem) auto;
  grid-template-areas: "label input swatch";
  justify-content: start;
  align-items: center;
  column-gap: 0.6rem;
  margin: 0;
}
.color-grid .field > .field-label {
  grid-area: label;
  margin: 0;
  min-width: 0;
}
.color-grid .field > .field-label > label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.color-grid .field > .input {
  grid-area: input;
  max-width: none;
  font-family:
    ui-monospace,
    "SF Mono",
    Menlo,
    monospace;
  font-size: 0.9375rem;
  padding-block: 0.35rem;
}
.color-grid .field > .swatch {
  grid-area: swatch;
}
.color-grid .field > .field-hint,
.color-grid .field > .field-error {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
}
.swatch {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  vertical-align: middle;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.swatch[hidden] {
  display: none;
}
button.swatch {
  padding: 0;
  cursor: pointer;
}
button.swatch:hover {
  border-color: var(--text);
}
.picker {
  position: fixed;
  z-index: 20;
  display: grid;
  gap: 0.6rem;
  width: max-content;
  padding: 0.85rem;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(0 0 0 / 25%);
}
.picker-title {
  margin: 0;
  font-weight: 600;
}
.picker-wheel-box {
  position: relative;
  width: 200px;
  height: 200px;
  touch-action: none;
  cursor: crosshair;
}
.picker-wheel {
  display: block;
  width: 200px;
  height: 200px;
}
.picker-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000000, inset 0 0 0 1px #000000;
  pointer-events: none;
}
.picker-handle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.picker-brightness {
  width: 200px;
  height: 0.9rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  appearance: none;
  cursor: pointer;
}
.picker-brightness::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 50%;
  appearance: none;
}
.picker-brightness::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 50%;
}
.picker-readout {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.picker-chip {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.picker-value {
  margin-left: 0.3rem;
  font-family:
    ui-monospace,
    "SF Mono",
    Menlo,
    monospace;
}
.picker-dropper {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
}
.picker-dropper:hover {
  background: var(--surface-sunken);
}
.picker .actions {
  justify-content: flex-end;
  margin: 0;
}
.contrast-report {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contrast-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding-block: 0.2rem;
  font-size: 0.9375rem;
}
.contrast-state {
  font-weight: 700;
  border-radius: 4px;
  padding: 0 0.4rem;
  border: 1px solid currentcolor;
  min-width: 4.5rem;
  text-align: center;
}
.contrast-pass {
  color: var(--ok);
}
.contrast-fail {
  color: var(--danger);
}
.contrast-unset {
  color: var(--muted-text);
}
.contrast-ok,
.contrast-why {
  color: var(--muted-text);
  display: block;
  max-width: 60ch;
}
.contrast-why {
  padding-bottom: 0.35rem;
}
.totals {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin-block: 0.75rem;
}
.total-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 0.75rem;
}
.total-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}
.total-label {
  color: var(--muted-text);
  font-size: 0.875rem;
}
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-block: 0 0.5rem;
}
.chart-header h3 {
  margin: 0;
}
.chart-header .field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.chart-header .field label {
  margin-bottom: 0;
  white-space: nowrap;
}
.chart-figure {
  margin-block: 0.25rem;
  overflow-x: auto;
}
.chart-svg {
  display: block;
  width: 100%;
  min-width: 32rem;
  height: auto;
}
.chart-baseline {
  stroke: var(--divider);
  stroke-width: 1;
  opacity: 0.6;
}
.chart-axis-label {
  fill: var(--muted-text);
  font-size: 13px;
}
.chart-axis-x {
  text-anchor: middle;
}
.chart-value {
  fill: var(--chart-value-text);
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
}
.chart-total {
  fill: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
}
.chart-series-suggestions {
  fill: var(--chart-suggestions);
  background: var(--chart-suggestions);
}
.chart-series-votes {
  fill: var(--chart-votes);
  background: var(--chart-votes);
}
.chart-series-comments {
  fill: var(--chart-comments);
  background: var(--chart-comments);
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--muted-text);
}
.chart-legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.legend-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
  display: inline-block;
}
.table-scroll {
  overflow-x: auto;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}
.data-table th,
.data-table td {
  text-align: start;
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 30rem) {
  .identity-who {
    margin-inline-start: 0;
    flex: 1 1 12rem;
  }
  .card {
    padding: 1rem 0.85rem;
  }
}
.brand-panel {
  border: 0;
  background: none;
  padding: 0;
  margin-block: 0;
}
.brand-lead {
  margin: 0 0 0.5rem;
}
.brand-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface-raised);
  border: 1px solid var(--divider);
  border-radius: var(--us-rounded-card);
  box-shadow: 0 -4px 16px rgb(0 0 0 / 8%);
}
.bar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.bar-save {
  margin-inline-start: auto;
}
.bar-count {
  margin-inline-end: 0.25rem;
  font-size: 0.8125rem;
  color: var(--muted-text);
}
.bar-screen {
  width: auto;
  min-width: 12rem;
  padding-block: 0.3rem;
}
.brand-bar > .status {
  flex-basis: 100%;
  margin: 0;
}
.button-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.875rem;
}
.brand-bar .button[aria-pressed=true],
.brand-popover .button[aria-pressed=true] {
  background: var(--surface-sunken);
  border-color: var(--text);
  font-weight: 700;
}
.brand-bar .button[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge);
  margin-inline-start: 0.35rem;
  padding: 0 0.4rem;
  border-radius: var(--us-rounded-pill);
  background: var(--danger);
  color: var(--danger-text);
  font-size: 0.75rem;
  font-weight: 700;
}
.brand-popover-anchor {
  position: relative;
}
.brand-popover {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  z-index: 30;
  width: min(28rem, calc(100vw - 2rem));
  max-height: min(70vh, 40rem);
  overflow: auto;
  transform: translateX(-50%);
  padding: 0.75rem 1rem;
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--us-rounded-card);
  box-shadow: 0 8px 28px rgb(0 0 0 / 18%);
}
.brand-popover[hidden] {
  display: none;
}
.brand-popover:has(.brand-colours) {
  width: min(40rem, calc(100vw - 2rem));
}
.brand-popover-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.brand-choices {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.brand-choice {
  padding: 0.4rem 0.6rem;
  font: inherit;
  text-align: start;
  color: inherit;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}
.brand-choice:hover {
  background: var(--surface-sunken);
}
.brand-choice[aria-checked=true] {
  font-weight: 700;
  background: var(--surface-sunken);
  border-color: var(--border);
}
.brand-choice[aria-checked=true]::after {
  content: " \2713";
}
.brand-colours-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}
.brand-modes {
  display: flex;
  gap: 0.35rem;
}
.brand-modes[hidden] {
  display: none;
}
.brand-colours > .subsection[hidden] {
  display: none;
}
.bar-tools-toggle {
  display: none;
}
.preview-frame {
  display: block;
  width: 100%;
  height: 30rem;
  border: 0;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: 0.5rem;
  background: var(--surface);
}
.preview-frame:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
@media (max-width: 56rem) {
  .branding-import-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
@media (max-width: 45rem) {
  .bar-tools-toggle {
    display: inline-flex;
  }
  .bar-help {
    position: static;
  }
  .bar-help .help-bubble,
  .bar-save .bar-help .help-bubble {
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    max-width: none;
  }
  .bar-tools,
  .bar-extra,
  .bar-count {
    display: none;
  }
  .brand-bar[data-tools-open] :is(.bar-tools, .bar-extra) {
    display: flex;
  }
  .bar-tools {
    flex-basis: 100%;
  }
  .brand-bar {
    gap: 0.4rem;
    padding-inline: 0.5rem;
  }
  .brand-bar .button-sm {
    padding-inline: 0.5rem;
  }
  .bar-screen {
    min-width: 0;
    flex: 1 1 auto;
  }
  .brand-bar > .bar-group:first-child {
    flex: 1 1 100%;
    flex-wrap: nowrap;
  }
  .brand-bar[data-tools-open] > .bar-group:first-child {
    flex-wrap: wrap;
  }
  .brand-popover,
  .brand-popover:has(.brand-colours) {
    position: fixed;
    inset: auto 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    width: auto;
    transform: none;
  }
}
.setup-steps {
  display: flex;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.setup-step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  justify-content: center;
}
.setup-step + .setup-step::before {
  content: "";
  position: absolute;
  top: calc(1rem - 1px);
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--divider);
}
.setup-step[data-state=done] + .setup-step::before {
  background: var(--accent);
}
.setup-step-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted-text);
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius);
}
.setup-step-link:hover .setup-step-label {
  text-decoration: underline;
}
.setup-step-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
.setup-step-bubble {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface-sunken);
  font-weight: 700;
}
.setup-step[data-state=done] .setup-step-link {
  color: var(--text);
}
.setup-step[data-state=done] .setup-step-bubble {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}
.setup-step[data-state=current] .setup-step-link {
  color: var(--accent);
  font-weight: 700;
}
.setup-step[data-state=current] .setup-step-bubble {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--surface-sunken), 0 0 0 5px var(--accent);
}
.setup-step-optional {
  font-size: 0.85em;
  font-weight: 400;
  color: var(--muted-text);
}
.setup-unavailable {
  margin: 0.75rem 0 0;
  color: var(--muted-text);
}
@media (max-width: 480px) {
  .setup-steps {
    flex-direction: column;
    gap: 0.75rem;
  }
  .setup-step {
    justify-content: flex-start;
  }
  .setup-step + .setup-step::before {
    top: calc(-50% - 0.75rem);
    bottom: 50%;
    left: calc(1rem - 1px);
    right: auto;
    width: 2px;
    height: auto;
  }
  .setup-step-link {
    flex-direction: row;
    gap: 0.6rem;
    text-align: start;
  }
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.5rem 0;
  border-bottom: 1px solid var(--divider);
}
.tab {
  font: inherit;
  padding: 0.65rem 0.9rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--muted-text);
  cursor: pointer;
  margin-bottom: -2px;
}
.tab:hover {
  color: var(--text);
}
.tab[aria-selected=true] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}
.tab-panel {
  display: grid;
  gap: 1.5rem;
}
.tab-panel[hidden] {
  display: none;
}
.tab-panel:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
