@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-VariableItalic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Inter-Cyrillic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-052F, U+1C80-1C88, U+2DE0-2DFF, U+A640-A69F, U+2116;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Vazirmatn-Arabic-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}

:root {
  color-scheme: light;
  --canvas: #F7F7F5;
  --surface: #FFFFFF;
  --surface-2: #FBFBFA;
  --subtle: #F1F1EE;
  --ink: #0C0D10;
  --ink-2: #3B3E46;
  --muted: #62666E;
  --line: rgb(12 13 16 / 0.08);
  --line-strong: rgb(12 13 16 / 0.14);
  --line-input: #8A8D95;
  --primary: #0C0D10;
  --primary-hover: #26282E;
  --on-primary: #FFFFFF;
  --accent: #B8945A;
  --accent-ink: #7A5C28;
  --accent-soft: #F6EFE2;
  --success: #13744A;
  --success-soft: #E9F6EF;
  --warning: #975A05;
  --warning-soft: #FCF3E3;
  --danger: #C2261B;
  --danger-hover: #A11E15;
  --danger-soft: #FDECEA;
  --info: #2457C5;
  --info-soft: #EAF0FC;
  --focus: #5B5BD6;
  --prism: linear-gradient(135deg, #F3E7CF 0%, #DCE6F7 38%, #EADCF4 68%, #F6EEDD 100%);
  --prism-strong: linear-gradient(135deg, #C9A86A 0%, #8FA8D8 45%, #B796D6 75%, #D9B97C 100%);
  --prism-light: linear-gradient(135deg, #F3E7CF 0%, #DCE6F7 38%, #EADCF4 68%, #F6EEDD 100%);
  --stage-glow-1: rgb(201 168 106 / 0.18);
  --stage-glow-2: rgb(143 168 216 / 0.16);

  --font-sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-md: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --tracking-tight: -0.025em;
  --tracking-snug: -0.012em;
  --tracking-caps: 0.09em;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3.5rem;
  --space-10: 5rem;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgb(12 13 16 / 0.05);
  --shadow-sm: 0 1px 2px rgb(12 13 16 / 0.04), 0 2px 6px rgb(12 13 16 / 0.04);
  --shadow-md: 0 1px 2px rgb(12 13 16 / 0.04), 0 8px 24px rgb(12 13 16 / 0.06);
  --shadow-lg: 0 2px 4px rgb(12 13 16 / 0.04), 0 24px 64px rgb(12 13 16 / 0.10);
  --ring-soft: 0 0 0 4px rgb(91 91 214 / 0.18);
  --ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus);
  --on-danger: #FFFFFF;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 140ms;
  --base: 220ms;

  --sidebar: 16rem;
  --topbar: 3.75rem;
  --content: 70rem;
  --gutter: 1rem;

  --tenant-accent: var(--accent);
  --tenant-accent-ink: var(--accent-ink);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #09090B;
  --surface: #111114;
  --surface-2: #141418;
  --subtle: #18181C;
  --ink: #F4F4F5;
  --ink-2: #C9CAD0;
  --muted: #8E9099;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --line-input: #6A6C77;
  --primary: #F4F4F5;
  --primary-hover: #FFFFFF;
  --on-primary: #09090B;
  --accent: #D9B97C;
  --accent-ink: #D9B97C;
  --accent-soft: #241D10;
  --success: #5FD29A;
  --success-soft: #0F1F17;
  --warning: #F0B65A;
  --warning-soft: #231A0B;
  --danger: #FF8A80;
  --danger-hover: #FFA79F;
  --danger-soft: #2A1211;
  --info: #8AB0FF;
  --info-soft: #111A2E;
  --focus: #9B9BF2;
  --prism: linear-gradient(135deg, #2A2418 0%, #18202E 40%, #241B2C 70%, #2A2418 100%);
  --stage-glow-1: rgb(217 185 124 / 0.10);
  --stage-glow-2: rgb(138 176 255 / 0.08);
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.5);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.5);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.4), 0 24px 64px rgb(0 0 0 / 0.55);
  --ring-soft: 0 0 0 4px rgb(155 155 242 / 0.22);
  --ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus);
  --on-danger: #1A0705;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: -0.003em;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-snug);
}

h4 {
  font-size: var(--text-base);
  letter-spacing: var(--tracking-snug);
}

p {
  margin: 0;
}

a {
  color: var(--ink);
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
  transition: text-decoration-color var(--fast) var(--ease);
}

a:hover {
  text-decoration-color: currentColor;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

code,
kbd,
.muted {
  color: var(--muted);
}

.mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

code,
kbd {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

code {
  padding: 0.12em 0.4em;
  border-radius: var(--radius-xs);
  background: var(--subtle);
  border: 1px solid var(--line);
}

::selection {
  background: rgb(91 91 214 / 0.2);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -4rem;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon--sm {
  width: 0.9375rem;
  height: 0.9375rem;
}

.icon--lg {
  width: 1.5rem;
  height: 1.5rem;
}

.text-muted {
  color: var(--muted);
}

.text-secondary {
  color: var(--ink-2);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.label {
  font-size: var(--text-2xs);
  font-weight: 650;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: var(--space-4);
}

.stack--sm {
  gap: var(--space-2);
}

.stack--lg {
  gap: var(--space-7);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.row--between {
  justify-content: space-between;
}

.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.brand__name {
  display: grid;
  line-height: 1.15;
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
}

.brand__name small {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.5rem;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), var(--shadow-xs);
}

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

.btn--secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.btn--secondary:hover {
  background: var(--subtle);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
}

.btn--ghost:hover {
  background: var(--subtle);
  color: var(--ink);
}

.btn--danger {
  background: var(--danger);
  color: var(--on-danger);
}

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

.btn--sm {
  min-height: 2rem;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  border-radius: var(--radius-xs);
}

.btn--lg {
  min-height: 3rem;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn--block {
  width: 100%;
}

.btn--icon {
  width: 2.5rem;
  padding: 0;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn[aria-busy="true"] {
  color: transparent;
  pointer-events: none;
}

.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--on-primary);
  border-right-color: transparent;
  border-radius: var(--radius-full);
  animation: spin 650ms linear infinite;
}

.btn--secondary[aria-busy="true"]::after,
.btn--ghost[aria-busy="true"]::after {
  border-color: var(--ink);
  border-right-color: transparent;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.field {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.field__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.field__optional {
  font-weight: 450;
  color: var(--muted);
}

.field__hint,
.field__error {
  font-size: var(--text-sm);
}

.field__hint {
  color: var(--muted);
}

.field__error {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-weight: 550;
  color: var(--danger);
}

.control {
  position: relative;
  display: flex;
  align-items: center;
}

.control > .icon {
  position: absolute;
  left: var(--space-3);
  color: var(--muted);
  pointer-events: none;
}

.control > .input {
  padding-left: 2.375rem;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--line-input);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-md);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
}

.select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("/assets/img/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

.textarea {
  min-height: 7rem;
  padding: var(--space-3);
  resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--ink-2);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: var(--ring-soft);
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgb(194 38 27 / 0.15);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background: var(--subtle);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.75rem;
  font-size: var(--text-md);
  cursor: pointer;
}

.check input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--primary);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.75rem;
  cursor: pointer;
}

.switch input {
  flex: none;
  appearance: none;
  position: relative;
  width: 2.5rem;
  height: 1.5rem;
  margin: 0;
  border-radius: var(--radius-full);
  background: var(--line-strong);
  box-shadow: inset 0 0 0 1px var(--line-input);
  cursor: pointer;
  transition: background-color var(--base) var(--ease);
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
  transition: transform var(--base) var(--ease);
}

.switch input:checked {
  background: var(--primary);
  box-shadow: none;
}

.switch input:checked::after {
  transform: translateX(1rem);
  background: var(--on-primary);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
}

.card__title {
  font-size: var(--text-base);
  font-weight: 650;
  letter-spacing: var(--tracking-snug);
}

.card__description {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--muted);
}

.card__body {
  padding: var(--space-6);
}

.card__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.metric {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-6);
}

.metric__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--muted);
}

.metric__value {
  font-size: var(--text-3xl);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric__note {
  font-size: var(--text-sm);
  color: var(--muted);
}

.metric__trend {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--success);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}

.metric-strip > .metric + .metric {
  border-top: 1px solid var(--line);
}

.table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-5);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.table th {
  height: 2.5rem;
  font-size: var(--text-2xs);
  font-weight: 650;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}

.table td {
  height: 3.5rem;
  color: var(--ink-2);
}

.table td:first-child {
  color: var(--ink);
  font-weight: 600;
}

.table tbody tr {
  transition: background-color var(--fast) var(--ease);
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.entity {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--prism);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.375rem;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  background: var(--subtle);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.badge::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: var(--radius-full);
  background: currentColor;
  opacity: 0.85;
}

.badge--plain::before {
  display: none;
}

.badge--success {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

.badge--warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: transparent;
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

.badge--info {
  background: var(--info-soft);
  color: var(--info);
  border-color: transparent;
}

.badge--accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: transparent;
}

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--text-md);
}

.callout > .icon {
  margin-top: 0.125rem;
  color: var(--info);
}

.callout__title {
  margin-bottom: 0.125rem;
  font-weight: 650;
  color: var(--ink);
}

.callout--success {
  background: var(--success-soft);
  border-color: transparent;
}

.callout--success > .icon {
  color: var(--success);
}

.callout--warning {
  background: var(--warning-soft);
  border-color: transparent;
}

.callout--warning > .icon {
  color: var(--warning);
}

.callout--danger {
  background: var(--danger-soft);
  border-color: transparent;
}

.callout--danger > .icon {
  color: var(--danger);
}

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

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
}

.step:first-child {
  border-top: 0;
}

.step > .badge {
  grid-column: 2;
  justify-self: start;
}

.step__marker {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.step--done .step__marker {
  border-color: transparent;
  background: var(--success-soft);
  color: var(--success);
}

.step--current .step__marker {
  border-color: transparent;
  background: var(--primary);
  color: var(--on-primary);
}

.step__title {
  font-weight: 600;
  color: var(--ink);
}

.step__text {
  margin-top: 0.125rem;
  font-size: var(--text-sm);
  color: var(--muted);
}

.meta {
  display: grid;
  margin: 0;
}

.meta__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
  font-size: var(--text-md);
}

.meta__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.meta__row:last-child {
  padding-bottom: 0;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.meta dd.mono {
  font-weight: 500;
  color: var(--ink-2);
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--prism);
  box-shadow: var(--shadow-sm);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/img/facets.svg") right -6rem center / 36rem auto no-repeat;
  opacity: 0.9;
  pointer-events: none;
}

.hero__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-7) var(--space-6) var(--space-5);
  max-width: 34rem;
}

.hero__title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.hero__text {
  color: var(--ink-2);
}

.hero .metric-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(8px);
}

.app {
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-4) var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}

.sidebar__nav {
  display: flex;
  gap: var(--space-1);
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}

.sidebar__group {
  display: flex;
  flex: none;
  gap: var(--space-1);
}

.sidebar__heading {
  display: none;
  padding: 0 var(--space-3);
  margin-bottom: var(--space-1);
}

.nav {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  flex: none;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.5rem;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: var(--text-md);
  font-weight: 550;
  text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.nav__item .icon {
  color: var(--muted);
}

.nav__item:hover {
  background: var(--subtle);
  color: var(--ink);
}

.nav__item[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
}

.nav__item[aria-current="page"] .icon {
  color: var(--ink);
}

.nav__item[aria-disabled="true"] {
  color: var(--muted);
  opacity: 0.6;
  pointer-events: none;
}

.nav__soon {
  display: none;
  margin-left: auto;
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.sidebar__footer {
  display: none;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--topbar);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-md);
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--line-strong);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.theme-toggle:hover {
  background: var(--subtle);
  color: var(--ink);
  border-color: var(--line-strong);
}

.theme-toggle .icon {
  grid-area: 1 / 1;
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease);
}

.theme-toggle__sun {
  opacity: 0;
  transform: rotate(-60deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle__sun {
  opacity: 1;
  transform: none;
}

[data-theme="dark"] .theme-toggle__moon {
  opacity: 0;
  transform: rotate(60deg) scale(0.6);
}

.lang-menu .menu__list {
  min-width: 11rem;
}

.lang-menu .menu__item[aria-current="true"] {
  background: var(--subtle);
  color: var(--ink);
  font-weight: 650;
}

[dir="rtl"] .menu__list {
  right: auto;
  left: 0;
}

[dir="rtl"] .stage__tools {
  right: auto;
  left: var(--gutter);
}

.stage__tools {
  position: absolute;
  top: var(--space-4);
  right: var(--gutter);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.page {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--space-7) var(--gutter) var(--space-10);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}

.page-header__title {
  font-size: var(--text-2xl);
}

.page-header__lead {
  margin-top: var(--space-2);
  max-width: 40rem;
  font-size: var(--text-base);
  color: var(--muted);
}

.split {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}

.section {
  margin-top: var(--space-9);
}

.section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.section__title {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-snug);
}

.section__lead {
  margin-top: var(--space-1);
  font-size: var(--text-md);
  color: var(--muted);
}

@media (min-width: 48rem) {
  :root {
    --gutter: 1.5rem;
  }

  .metric-strip > .metric + .metric {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

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

  .step {
    grid-template-columns: auto 1fr auto;
  }

  .step > .badge {
    grid-column: auto;
    justify-self: end;
  }
}

@media (min-width: 64rem) {
  :root {
    --gutter: 2.5rem;
  }

  .app {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: var(--space-5) var(--space-4);
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .sidebar > .brand {
    padding: 0 var(--space-2) var(--space-3);
  }

  .sidebar__nav {
    display: grid;
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .sidebar__group {
    display: grid;
  }

  .sidebar__heading {
    display: block;
  }

  .nav {
    display: grid;
  }

  .nav__soon {
    display: inline;
  }

  .hero__body {
    padding: var(--space-8) var(--space-7) var(--space-6);
  }

  .sidebar__footer {
    display: block;
    margin-top: auto;
    padding: var(--space-4) var(--space-3) 0;
    border-top: 1px solid var(--line);
    overflow: hidden;
    font-size: var(--text-xs);
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--canvas) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
  }
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--space-6) + 2.25rem) var(--gutter) var(--space-8);
  background:
    radial-gradient(60rem 40rem at 15% -10%, var(--stage-glow-1), transparent 60%),
    radial-gradient(50rem 36rem at 100% 0%, var(--stage-glow-2), transparent 60%),
    url("/assets/img/facets.svg") center top / 64rem auto no-repeat,
    var(--canvas);
}

.stage--inline {
  min-height: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
}

.cert {
  position: relative;
  width: 100%;
  max-width: 36rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

.cert::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--prism-strong);
  z-index: 3;
}

.cert__media {
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--prism);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cert__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(12 13 16 / 0.18) 0%, transparent 28%, transparent 70%, rgb(12 13 16 / 0.06) 100%);
  pointer-events: none;
}

.cert__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert__media .cert__placeholder {
  width: 38%;
  height: auto;
  filter: drop-shadow(0 18px 30px rgb(12 13 16 / 0.18));
}

.cert__chips {
  position: absolute;
  inset: var(--space-4) var(--space-4) auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.25rem;
  padding: 0 var(--space-3) 0 var(--space-2);
  border-radius: var(--radius-full);
  background: rgb(255 255 255 / 0.72);
  border: 1px solid rgb(255 255 255 / 0.6);
  box-shadow: 0 4px 16px rgb(12 13 16 / 0.08);
  backdrop-filter: saturate(1.6) blur(14px);
  color: #0C0D10;
  font-size: var(--text-sm);
  font-weight: 650;
  white-space: nowrap;
}

.glass-chip .avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-full);
  background: var(--prism-light);
  border-color: rgb(12 13 16 / 0.08);
  font-size: 0.625rem;
  color: #0C0D10;
}

.glass-chip--verified {
  padding-left: var(--space-3);
  color: #13744A;
}

.cert__heading {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-6) var(--space-6);
  text-align: center;
}

.cert__kicker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  max-width: 22rem;
  color: var(--tenant-accent-ink);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cert__kicker::before,
.cert__kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tenant-accent));
}

.cert__kicker::after {
  background: linear-gradient(90deg, var(--tenant-accent), transparent);
}

.cert__title {
  margin-top: var(--space-2);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.cert__subtitle {
  max-width: 26rem;
  font-size: var(--text-base);
  color: var(--muted);
}

.keyspecs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  overflow: hidden;
}

.keyspecs__item {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-3);
  text-align: center;
}

.keyspecs__item:nth-child(even) {
  border-left: 1px solid var(--line);
}

.keyspecs__item:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.keyspecs dt {
  font-size: var(--text-2xs);
  font-weight: 650;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--muted);
}

.keyspecs dd {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.details {
  display: grid;
  margin: var(--space-5) var(--space-6) 0;
}

.details__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.details__row:first-child {
  border-top: 0;
}

.details dt {
  flex: none;
  font-size: var(--text-md);
  color: var(--muted);
}

.details dd {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 600;
  text-align: right;
  color: var(--ink);
}

.ledger {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 40%, transparent) 50%, var(--surface-2) 100%),
    url("/assets/img/guilloche.svg") center / auto 100% repeat-x,
    var(--surface-2);
}

.ledger__label {
  display: block;
  font-size: var(--text-2xs);
  font-weight: 650;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--muted);
}

.ledger__value {
  display: block;
  margin-top: 0.125rem;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-md);
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.ledger__end {
  text-align: right;
}

.verify {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
}

.verify__seal {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-4);
}

.seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-full);
  background: var(--prism-strong);
  padding: 2px;
}

.seal__inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--success);
}

.seal__inner .icon {
  width: 1.375rem;
  height: 1.375rem;
  stroke-width: 2;
}

.verify__title {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  color: var(--ink);
}

.verify__text {
  margin-top: 0.125rem;
  font-size: var(--text-sm);
  color: var(--muted);
}

.verify__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.verify__actions .btn {
  flex: 1;
}

@media (min-width: 30rem) {
  .keyspecs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .keyspecs__item:nth-child(n + 3) {
    border-top: 0;
  }

  .keyspecs__item + .keyspecs__item {
    border-left: 1px solid var(--line);
  }

  .cert__title {
    font-size: var(--text-4xl);
  }

  .ledger__value {
    font-size: var(--text-base);
  }
}

.cert--compact {
  max-width: 28rem;
}

.cert__intro {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: var(--space-9) var(--space-7);
  text-align: center;
}

.cert__intro .brand__mark {
  width: 3rem;
  height: 3rem;
}

.cert__intro p {
  max-width: 24rem;
  color: var(--muted);
  font-size: var(--text-base);
}

.powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--muted);
}

.powered .brand__mark {
  width: 0.875rem;
  height: 0.875rem;
}

.cert__intro .error-code,
.error-code {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  background: var(--prism-strong);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: none;
}

.swatches {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
}

.swatch {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.swatch__chip {
  height: 4.5rem;
  border-bottom: 1px solid var(--line);
}

.swatch__meta {
  display: grid;
  gap: 0.125rem;
  padding: var(--space-3);
  font-size: var(--text-sm);
}

.swatch__meta span:last-child {
  font-variant-numeric: tabular-nums;
  font-size: var(--text-xs);
  color: var(--muted);
}

.swatch__chip--canvas { background: var(--canvas); }
.swatch__chip--surface { background: var(--surface); }
.swatch__chip--subtle { background: var(--subtle); }
.swatch__chip--ink { background: var(--ink); }
.swatch__chip--ink-2 { background: var(--ink-2); }
.swatch__chip--muted { background: var(--muted); }
.swatch__chip--accent { background: var(--accent); }
.swatch__chip--prism { background: var(--prism-strong); }
.swatch__chip--success { background: var(--success); }
.swatch__chip--warning { background: var(--warning); }
.swatch__chip--danger { background: var(--danger); }
.swatch__chip--info { background: var(--info); }

.type-scale__row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
}

.type-scale__row:first-child {
  border-top: 0;
}

.type-scale__sample--display {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.type-scale__sample--h1 {
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
}

.type-scale__sample--h2 {
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
}

.type-scale__sample--body {
  font-size: var(--text-base);
}

.type-scale__sample--ui {
  font-size: var(--text-md);
}

.page-back {
  margin: 0 0 var(--space-3) calc(var(--space-3) * -1);
}

.page-flash {
  margin-bottom: var(--space-5);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.toolbar__search {
  flex: 1 1 16rem;
  max-width: 22rem;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--subtle);
}

.segmented__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 2.125rem;
  padding: 0 var(--space-4);
  border-radius: calc(var(--radius-md) - 4px);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 550;
  text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.segmented__item:hover {
  color: var(--ink);
}

.segmented__item[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  box-shadow: var(--shadow-xs);
}

.segmented__item:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.segmented__count {
  color: var(--muted);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.empty {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-9) var(--space-6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--muted);
}

.empty__title {
  font-size: var(--text-base);
  font-weight: 650;
  color: var(--ink);
}

.empty__text {
  font-size: var(--text-md);
}

.entity--link {
  color: inherit;
  text-decoration: none;
}

.entity--link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entity__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.entity__sub {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted);
}

a.entity__sub:hover {
  color: var(--ink);
}

.entity--title {
  gap: var(--space-4);
}

.entity--title .page-header__title {
  margin: 0;
}

.avatar--lg {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  font-size: var(--text-lg);
}

.table__actions {
  text-align: right;
}

.menu {
  position: relative;
  display: inline-block;
  text-align: left;
}

.menu > summary {
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu[open] > summary {
  background: var(--subtle);
  color: var(--ink);
}

.menu__list {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: 60;
  display: grid;
  min-width: 15rem;
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.menu__list form {
  display: contents;
}

.menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.5rem;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: var(--text-md);
  font-weight: 550;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.menu__item:hover {
  background: var(--subtle);
  color: var(--ink);
}

.menu__item:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.menu__item--danger,
.menu__item--danger:hover {
  color: var(--danger);
}

.menu__item--danger:hover {
  background: var(--danger-soft);
}

.btn--quiet-danger {
  color: var(--danger);
}

.btn--quiet-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn--danger-outline {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}

.btn--danger-outline:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.table-note {
  margin: var(--space-3) var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.card--danger {
  border-color: color-mix(in srgb, var(--danger) 25%, transparent);
}

.card__body--tight {
  padding-top: var(--space-4);
}

.card__table {
  position: relative;
  overflow-x: auto;
}

.card__table:first-child {
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.card__table:last-child {
  border-bottom-left-radius: calc(var(--radius-lg) - 1px);
  border-bottom-right-radius: calc(var(--radius-lg) - 1px);
}

.menu__list--floating {
  position: fixed;
  top: auto;
  right: auto;
  max-height: calc(100vh - 1rem);
  overflow-y: auto;
}

.card__table .table tbody tr:last-child td {
  border-bottom: 0;
}

.form-card {
  max-width: 47.5rem;
}

.form-stack {
  display: grid;
  gap: var(--space-6);
}

.form-grid {
  display: grid;
  gap: var(--space-4);
}

.form-layout,
.detail-layout {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}

.detail-layout > *,
.form-layout > * {
  min-width: 0;
}

.card__table .table th,
.card__table .table td {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.card__table .table td:first-child {
  white-space: normal;
}

.form-layout__main {
  display: grid;
  gap: var(--space-5);
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .input {
  max-width: 16rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group__addon {
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-input);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--subtle);
  color: var(--ink-2);
  font-size: var(--text-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.choice-group {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.choice-group > legend {
  margin-bottom: var(--space-3);
  padding: 0;
}

.choice-group:disabled .choice {
  opacity: 0.6;
  cursor: not-allowed;
}

.choice-grid {
  display: grid;
  gap: var(--space-3);
}

.choice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.choice:hover {
  border-color: var(--ink-2);
}

.choice:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.choice:has(input:focus-visible) {
  box-shadow: var(--ring);
}

.choice input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.125rem 0 0;
  accent-color: var(--primary);
}

.choice__body {
  display: grid;
  gap: 0.1875rem;
}

.choice__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-md);
  font-weight: 650;
  color: var(--ink);
}

.choice__text {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--muted);
}

.switch__label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.switch:has(.switch__text) {
  align-items: flex-start;
}

.switch:has(.switch__text) input {
  margin-top: -1px;
}

.switch__title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink);
}

.switch__text {
  font-size: var(--text-sm);
  color: var(--muted);
}

.dialog-backdrop,
.dialog-page {
  display: grid;
  place-items: center;
  padding: var(--space-5) var(--gutter);
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  background: rgb(12 13 16 / 0.42);
  backdrop-filter: blur(2px);
}

.dialog-page {
  min-height: 60vh;
}

.dialog {
  width: 100%;
  max-width: 32.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dialog__body {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
}

.dialog__heading {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink-2);
}

.dialog__title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

.dialog__text {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink-2);
}

.dialog__text ul {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding-left: 1.125rem;
}

.dialog__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
}

.dialog__icon--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.dialog__icon--success {
  background: var(--success-soft);
  color: var(--success);
}

.dialog__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.credential {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--canvas);
}

.credential__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-md);
}

.credential dt {
  color: var(--muted);
}

.credential dd {
  margin: 0;
}

.credential__secret {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--text-md);
}

.credential__secret dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.credential__secret .mono {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.logo-setting {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.logo-setting__preview {
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-2);
  width: 9rem;
  height: 9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(45deg, var(--subtle) 25%, transparent 25%, transparent 75%, var(--subtle) 75%) 0 0 / 1rem 1rem,
    linear-gradient(45deg, var(--subtle) 25%, transparent 25%, transparent 75%, var(--subtle) 75%) 0.5rem 0.5rem / 1rem 1rem,
    var(--surface);
}

.logo-setting__preview img {
  width: 6rem;
  height: 6rem;
  object-fit: contain;
}

.logo-setting__placeholder {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--muted);
}

.logo-setting__empty {
  font-size: var(--text-xs);
  color: var(--muted);
}

.logo-setting__form {
  display: grid;
  gap: var(--space-4);
}

.file-input {
  width: 100%;
  padding: var(--space-2);
  border: 1px dashed var(--line-input);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--text-md);
}

.file-input::file-selector-button {
  margin-right: var(--space-3);
  min-height: 2.25rem;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  background: var(--subtle);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.file-input:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: var(--ring);
}

.card__footer--start {
  justify-content: flex-start;
}

.card__note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--muted);
}

@media (min-width: 40rem) {
  .logo-setting {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.brand__logo {
  width: 2rem;
  height: 2rem;
  flex: none;
  object-fit: contain;
  border-radius: var(--radius-xs);
}

@media (min-width: 48rem) {
  .form-grid,
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .choice-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 72rem) {
  .form-layout {
    grid-template-columns: minmax(0, 2fr) minmax(17.5rem, 1fr);
  }

  .form-layout__aside {
    position: sticky;
    top: calc(var(--topbar) + var(--space-5));
  }

  .detail-layout {
    grid-template-columns: minmax(0, 2fr) minmax(18.75rem, 1fr);
  }
}

.section-block {
  margin-top: var(--space-7);
}

.section-block__title {
  margin-bottom: var(--space-3);
  font-size: var(--text-lg);
  font-weight: 650;
  letter-spacing: var(--tracking-snug);
}

.input--narrow {
  max-width: 12rem;
}

.numeric-start {
  font-variant-numeric: tabular-nums;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.pager__info {
  font-size: var(--text-sm);
  color: var(--muted);
}

.labels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.label-card {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: #0C0D10;
  text-align: center;
  break-inside: avoid;
}

.label-card__qr {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  margin-bottom: var(--space-2);
}

.label-card__qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.label-card__qr path {
  fill: #0C0D10;
}

.label-card__number {
  font-size: var(--text-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.label-card__code {
  font-size: var(--text-2xs);
  color: #62666E;
  letter-spacing: 0.02em;
}

.label-card--void {
  opacity: 0.55;
}

.topbar__user {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-md);
  font-weight: 550;
  color: var(--ink-2);
}

.topbar__logout {
  display: flex;
}

@media (min-width: 640px) {
  .topbar__user {
    display: inline-flex;
  }
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--canvas);
}

.auth__aside {
  display: none;
}

.auth__main {
  position: relative;
  display: grid;
  place-items: center;
  padding: calc(var(--space-9) + var(--space-4)) var(--gutter) var(--space-9);
  background:
    radial-gradient(40rem 28rem at 50% -10%, var(--stage-glow-1), transparent 60%),
    radial-gradient(36rem 24rem at 100% 10%, var(--stage-glow-2), transparent 60%),
    var(--canvas);
}

.auth__tools {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}

.auth__panel {
  width: 100%;
  max-width: 24rem;
  display: grid;
  gap: var(--space-6);
}

.auth__mobile-brand,
.auth__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  color: var(--ink);
}

.auth__mobile-brand .brand__logo,
.auth__brand .brand__logo {
  width: 2.5rem;
  height: 2.5rem;
}

.auth__mobile-brand .brand__mark {
  width: 2rem;
  height: 2rem;
}

.auth__header {
  display: grid;
  gap: var(--space-2);
}

.auth__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

.auth__lead {
  font-size: var(--text-base);
  color: var(--muted);
}

.auth__form {
  display: grid;
  gap: var(--space-5);
}

.auth__form .btn {
  margin-top: var(--space-1);
}

.auth__hint {
  font-size: var(--text-sm);
  color: var(--muted);
}

.field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.field__link {
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.field__link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.field__link:focus-visible {
  outline: none;
  border-radius: var(--radius-xs);
  box-shadow: var(--ring);
}

.auth__secondary {
  display: flex;
  justify-content: center;
}

.auth__remember {
  margin-top: calc(var(--space-2) * -1);
}

.auth__remember small {
  color: var(--muted);
  font-size: var(--text-sm);
}

.control--action > .input {
  padding-right: 3rem;
}

.control__action {
  position: absolute;
  right: 0.125rem;
  width: 2.75rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.control__action:hover {
  color: var(--ink);
}

.control__action:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.control__action .control__hide,
.control__action[aria-pressed="true"] .control__show {
  display: none;
}

.control__action[aria-pressed="true"] .control__hide {
  display: block;
}

@media (min-width: 960px) {
  .auth {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .auth__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-8);
    padding: var(--space-8);
    border-right: 1px solid var(--line);
    background:
      radial-gradient(36rem 30rem at 0% 0%, var(--stage-glow-1), transparent 65%),
      radial-gradient(32rem 28rem at 100% 100%, var(--stage-glow-2), transparent 65%),
      url("/assets/img/facets.svg") center / 56rem auto no-repeat,
      var(--subtle);
    overflow: hidden;
  }

  .auth__statement {
    display: grid;
    gap: var(--space-4);
    max-width: 26rem;
  }

  .auth__quote {
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--ink);
    text-wrap: balance;
  }

  .auth__footnote {
    font-size: var(--text-sm);
    color: var(--muted);
  }

  .auth__mobile-brand {
    display: none;
  }
}

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

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  .no-print,
  .page-back,
  .page-flash,
  .sidebar,
  .topbar,
  .skip-link,
  .powered,
  .stage__tools,
  .verify__actions {
    display: none;
  }

  body,
  .stage {
    background: #FFFFFF;
  }

  .cert {
    box-shadow: none;
    border-color: #DDDDDD;
  }

  .app {
    display: block;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .labels {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4mm;
  }

  .label-card {
    border-color: #CCCCCC;
    border-radius: 2mm;
    padding: 3mm 2mm;
  }

  .label-card__qr {
    width: 30mm;
    height: 30mm;
  }
}

.settings-tabs {
  margin-bottom: var(--space-5);
}

.icon--xs {
  width: 0.75rem;
  height: 0.75rem;
}

.field--narrow {
  max-width: 22rem;
}

.btn--sm.btn--icon {
  width: 2rem;
}

.order-controls {
  display: inline-flex;
  gap: 2px;
}

.field-name {
  display: grid;
  gap: var(--space-1);
}

.field-name__label {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.field-name__label:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field-name__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.table__row--off .field-name__label {
  color: var(--muted);
}

.card__footer .card__note {
  margin-top: 0;
}

@media (min-width: 64rem) {
  .choice-grid--templates,
  .choice-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid--labels {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.field--wide {
  grid-column: 1 / -1;
}

.card-qr {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
}

.card-qr__code {
  display: block;
  width: 8.5rem;
  height: 8.5rem;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #FFFFFF;
}

.card-qr__code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.card-qr__code path {
  fill: #0C0D10;
}

.card-qr__url {
  font-size: var(--text-sm);
  color: var(--muted);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.history {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.history__item {
  display: grid;
  gap: 2px;
  padding-left: var(--space-4);
  border-left: 2px solid var(--line);
}

.history__item:first-child {
  border-left-color: var(--primary);
}

.history__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.history__meta {
  font-size: var(--text-xs);
  color: var(--muted);
}

.table__link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.table__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.details__value {
  overflow-wrap: anywhere;
}

[dir="rtl"] .ledger__value,
[dir="rtl"] .cert__kicker {
  letter-spacing: 0;
}

.table {
  overflow-wrap: normal;
}

.table .entity,
.table .field-name {
  min-width: 10.5rem;
}

.stack > * {
  min-width: 0;
}

.card__table,
.table-wrap {
  container-type: inline-size;
}

.table .table__wrap {
  min-width: 10rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

@container (max-width: 52rem) {
  .table__optional {
    display: none;
  }
}

@container (max-width: 64rem) {
  .table th,
  .table td {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
}

.photo-field {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

.photo-field__preview {
  display: grid;
  place-items: center;
  width: 10rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--prism);
  overflow: hidden;
}

.photo-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-field__preview .photo-field__placeholder {
  width: 50%;
  height: auto;
  object-fit: contain;
  opacity: 0.8;
}

@media (min-width: 40rem) {
  .photo-field {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

button.segmented__item {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}

.segmented__item[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  box-shadow: var(--shadow-xs);
}

.appearance {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.appearance__form {
  min-width: 0;
}

.appearance__actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  background: linear-gradient(transparent, var(--canvas) 35%);
}

.appearance__preview {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.appearance__preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.appearance__frame {
  width: 100%;
  max-width: 24.375rem;
  height: 46rem;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-lg);
  scrollbar-width: thin;
}

.appearance__frame .tpl {
  min-height: 100%;
  padding: 0 0 var(--space-6);
}

.appearance__frame .tpl__sheet {
  border-radius: 0;
  box-shadow: none;
}

.appearance__frame [hidden] {
  display: none !important;
}

.appearance__preview-note {
  max-width: 24.375rem;
  margin: 0 auto;
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
}

.color-table th[scope="row"] {
  min-width: 11rem;
  height: auto;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  white-space: normal;
  font-size: var(--text-md);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  background: transparent;
}

.color-table__label {
  display: block;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink);
}

.color-table__hint {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.swatch-input {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.swatch-input input[type="color"] {
  width: 2.75rem;
  height: 2.75rem;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.swatch-input input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.swatch-input input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}

.swatch-input input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 5px;
}

.swatch-input input[type="color"]:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.swatch-input input[aria-invalid="true"] {
  border-color: var(--danger);
}

.swatch-input__value {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.contrast-status {
  display: grid;
  gap: var(--space-1);
  font-size: var(--text-sm);
}

.contrast-status__ok {
  color: var(--success);
  font-weight: 600;
}

.contrast-status__issue {
  color: var(--danger);
  font-weight: 600;
}

.section-switches {
  display: grid;
  gap: var(--space-2) var(--space-5);
}

.choice--compact .choice__body {
  align-items: center;
}

.radius-sample {
  display: block;
  width: 2rem;
  height: 1.5rem;
  margin-bottom: var(--space-2);
  border: 2px solid var(--ink-2);
  border-right: 0;
  border-bottom: 0;
}

.radius-sample--sharp { border-top-left-radius: 0; }
.radius-sample--soft { border-top-left-radius: 5px; }
.radius-sample--standard { border-top-left-radius: 10px; }
.radius-sample--round { border-top-left-radius: 16px; }

.number-example {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

@media (min-width: 48rem) {
  .section-switches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 80rem) {
  .appearance {
    grid-template-columns: minmax(0, 1fr) 24.375rem;
  }

  .appearance__preview {
    position: sticky;
    top: var(--space-5);
  }
}

.table__text {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table__sub {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted);
}

.model-thumb {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--subtle);
  color: var(--muted);
}

.model-picker__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
}

.model-picker__field {
  flex: 1 1 16rem;
  min-width: 0;
}

.card-edit__hint {
  font-size: var(--text-sm);
  color: var(--muted);
}

.card-edit__extras {
  border-top: 1px solid var(--line);
}

.view-chart {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.view-chart__svg {
  display: block;
  width: 100%;
  height: 11rem;
  overflow: visible;
}

.view-chart__grid {
  stroke: var(--line);
  stroke-width: 1;
}

.view-chart__plot {
  position: relative;
  border-radius: var(--radius-sm);
  cursor: crosshair;
}

.view-chart__plot:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.view-chart__bar {
  fill: var(--ink);
  opacity: 0.85;
  transition: opacity var(--fast) var(--ease);
}

.view-chart__plot.is-active .view-chart__bar {
  opacity: 0.28;
}

.view-chart__plot.is-active .view-chart__bar.is-active {
  opacity: 1;
}

.chart-tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  display: grid;
  gap: var(--space-1);
  min-width: 11.5rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.chart-tip[hidden] {
  display: none;
}

.chart-tip p {
  margin: 0;
}

.chart-tip__title {
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--muted);
}

.chart-tip__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.chart-tip__row strong {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.chart-tip__key {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.chart-tip__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--ink);
}


.view-chart__bar:hover {
  opacity: 1;
  fill: var(--accent);
}

.view-chart__axis {
  display: flex;
  justify-content: space-between;
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.view-chart__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--muted);
}

.share-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-list__item {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.share-list__meter {
  width: 100%;
  height: 0.5rem;
}

.share-list__value {
  text-align: end;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.definition-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
}

.definition-list dt {
  font-size: var(--text-sm);
  font-weight: 650;
}

.definition-list dd {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.home-next {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.filter-bar {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-5);
}

.filter-bar__actions {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
}

.filter-bar__actions .btn {
  min-height: 2.75rem;
  padding-inline: var(--space-5);
}

.audit-table__action {
  white-space: normal;
  min-width: 14rem;
}

.audit-table__detail {
  display: inline-block;
  margin-inline-end: var(--space-3);
}

.audit-table__ip {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .filter-bar {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    align-items: end;
  }
}

.demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 2rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.demo-links a:hover {
  background: var(--subtle);
}

.demo-links__lead {
  margin-top: 0;
}

.plain-list {
  margin: var(--space-2) 0 0;
  padding-inline-start: var(--space-5);
}

.message-preview {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--subtle);
  font-size: var(--text-md);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.message-preview p {
  margin: 0;
}

.message-preview__subject {
  font-weight: 700;
  color: var(--ink);
}

.message-preview__footer {
  padding-top: var(--space-3);
  border-top: 1px dashed var(--line-strong);
  font-size: var(--text-sm);
  color: var(--muted);
}

.recipient-picker {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.recipient-picker legend {
  padding: 0 var(--space-1);
}

.recipient-picker__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.recipient-picker__search {
  flex: 1 1 14rem;
  min-width: 0;
}

.recipient-list {
  max-height: 22rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  list-style: none;
  scrollbar-width: thin;
}

.recipient-list li + li {
  border-top: 1px solid var(--line);
}

.recipient {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
}

.recipient:hover {
  background: var(--subtle);
}

.recipient input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 3px 0 0;
  accent-color: var(--primary);
}

.recipient__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.recipient__name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink);
}

.recipient__meta {
  font-size: var(--text-sm);
  color: var(--muted);
  overflow-wrap: anywhere;
}

.recipient-picker__empty {
  margin: 0;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 calc(var(--space-2) * -1);
  padding: var(--space-1) var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.sort:hover {
  color: var(--ink);
  background: var(--subtle);
}

.sort:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

th[aria-sort] .sort {
  color: var(--ink);
}

.sort__icon {
  display: inline-grid;
  gap: 2px;
  flex: none;
}

.sort__icon::before,
.sort__icon::after {
  content: "";
  width: 0;
  height: 0;
  border-inline: 3.5px solid transparent;
  opacity: 0.4;
  transition: opacity var(--fast) var(--ease);
}

.sort__icon::before {
  border-bottom: 4px solid currentColor;
}

.sort__icon::after {
  border-top: 4px solid currentColor;
}

.sort:hover .sort__icon::before,
.sort:hover .sort__icon::after {
  opacity: 0.7;
}

th[aria-sort="ascending"] .sort__icon::before,
th[aria-sort="descending"] .sort__icon::after {
  opacity: 1;
}

th[aria-sort="ascending"] .sort__icon::after,
th[aria-sort="descending"] .sort__icon::before {
  opacity: 0;
}

.brand-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
}

.brand-item__logo {
  display: grid;
  flex: none;
  place-items: center;
  width: 4rem;
  height: 4rem;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--subtle);
}

.brand-item__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-item__text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.brand-item__name {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.brand-item__meta {
  font-size: var(--text-sm);
  color: var(--muted);
}

.brand__mark--image {
  object-fit: contain;
}

@media (max-width: 639px) {
  .breadcrumb {
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
  }

  .breadcrumb li:not([aria-current]) {
    display: none;
  }

  .breadcrumb li + li::before {
    display: none;
  }

  .breadcrumb [aria-current="page"] {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .topbar__actions {
    flex-wrap: nowrap;
    flex: none;
  }

  .topbar__logout-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 639px) {
  .btn--sm,
  .segmented__item {
    min-height: 2.5rem;
  }

  .theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
  }

  .sort {
    min-height: 2rem;
  }
}

.topbar__crumbs {
  min-width: 0;
}

.subnav {
  display: flex;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav::-webkit-scrollbar {
  display: none;
}

.subnav__item {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.25rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.subnav__item:hover {
  border-color: var(--line-strong);
  background: var(--subtle);
  color: var(--ink);
}

.subnav__item:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

@media (max-width: 639px) {
  .subnav__item {
    min-height: 2.5rem;
  }
}

.form-grid--two {
  row-gap: var(--space-5);
}

@media (min-width: 40rem) {
  .form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.segmented--choice {
  display: inline-flex;
  width: fit-content;
}

.segmented--choice .segmented__item {
  cursor: pointer;
}

.segmented--choice .segmented__item:has(input:checked) {
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  box-shadow: var(--shadow-xs);
}

.segmented--choice .segmented__item:has(input:focus-visible) {
  box-shadow: var(--ring);
}

.attention-list {
  display: grid;
  margin: 0;
  padding: 0 0 var(--space-2);
  list-style: none;
}

.attention-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
}

.attention-list__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: var(--subtle);
  color: var(--ink-2);
}

.attention-list__text {
  display: grid;
  flex: 1;
  min-width: 0;
}
