@layer reset, tokens, base, layout, components, utilities;

@layer tokens {
  :root {
    color-scheme: light;

    /* Neutral ramp (slightly cool) */
    --gray-50: oklch(98.5% 0.002 264);
    --gray-100: oklch(96.9% 0.003 264);
    --gray-150: oklch(95.2% 0.004 264);
    --gray-200: oklch(92.9% 0.005 264);
    --gray-300: oklch(87.2% 0.008 264);
    --gray-400: oklch(71.5% 0.012 264);
    --gray-500: oklch(56.2% 0.014 264);
    --gray-600: oklch(45.6% 0.014 264);
    --gray-700: oklch(37.4% 0.013 264);
    --gray-800: oklch(28.4% 0.012 264);
    --gray-900: oklch(21.2% 0.011 264);

    /* Brand */
    --brand-50: oklch(97.2% 0.015 264);
    --brand-100: oklch(93.4% 0.034 264);
    --brand-200: oklch(88% 0.062 264);
    --brand-500: oklch(58% 0.176 264);
    --brand-600: oklch(51.5% 0.186 264);
    --brand-700: oklch(45% 0.172 264);

    /* Status */
    --red-50: oklch(97% 0.017 25);
    --red-200: oklch(88% 0.062 25);
    --red-600: oklch(53.5% 0.196 25);
    --red-700: oklch(47% 0.18 25);
    --green-50: oklch(97% 0.026 155);
    --green-200: oklch(87% 0.07 155);
    --green-700: oklch(48% 0.13 155);
    --amber-50: oklch(97.5% 0.03 85);
    --amber-200: oklch(89% 0.09 85);
    --amber-700: oklch(52% 0.12 75);

    /* Semantic */
    --bg: var(--gray-100);
    --surface: #fff;
    --surface-subtle: var(--gray-50);
    --surface-hover: var(--gray-50);
    --border: var(--gray-200);
    --border-strong: var(--gray-300);
    --text: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --accent: var(--brand-600);
    --accent-hover: var(--brand-700);

    /* 4px spacing grid */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;

    /* Type scale */
    --text-2xs: 0.6875rem;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-md: 0.9375rem;
    --text-lg: 1.0625rem;
    --text-xl: 1.3125rem;
    --text-2xl: 1.75rem;

    --radius-sm: 5px;
    --radius: 7px;
    --radius-md: 9px;
    --radius-lg: 12px;
    --radius-full: 999px;

    --shadow-xs: 0 1px 2px oklch(21% 0.011 264 / 0.05);
    --shadow-sm: 0 1px 2px oklch(21% 0.011 264 / 0.06), 0 1px 3px oklch(21% 0.011 264 / 0.04);
    --shadow-md: 0 2px 4px oklch(21% 0.011 264 / 0.05), 0 4px 12px oklch(21% 0.011 264 / 0.06);
    --shadow-lg: 0 8px 24px oklch(21% 0.011 264 / 0.08), 0 2px 6px oklch(21% 0.011 264 / 0.04);
    --ring: 0 0 0 3px oklch(51.5% 0.186 264 / 0.16);
    --ring-danger: 0 0 0 3px oklch(53.5% 0.196 25 / 0.16);

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

    --page-width: 1120px;
    --header-height: 3.5rem;
  }
}

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

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

  button,
  input,
  select,
  textarea {
    font: inherit;
    color: inherit;
  }

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

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

  body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  a {
    color: var(--accent);
    text-decoration: none;

    &:hover {
      color: var(--accent-hover);
    }
  }

  h1,
  h2,
  h3 {
    line-height: 1.25;
    letter-spacing: -0.011em;
    color: var(--text);
    font-weight: 600;
  }

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

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

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

  code {
    font-family: var(--font-mono);
    font-size: 0.9em;
  }

  :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  ::placeholder {
    color: var(--gray-400);
  }

  ::selection {
    background: var(--brand-100);
  }
}

@layer layout {
  .container {
    width: 100%;
    max-width: var(--page-width);
    margin-inline: auto;
    padding-inline: var(--space-6);
    padding-block: var(--space-8) var(--space-10);
  }

  .page-head {
    margin-block-end: var(--space-6);
  }

  .page-head > p {
    color: var(--text-secondary);
    margin-block-start: var(--space-1);
    font-size: var(--text-sm);
  }

  .stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
    align-items: start;
  }

  .grid-3 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(10rem, 0.8fr);
    gap: var(--space-4);
    align-items: start;
  }

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

  .span-all {
    grid-column: 1 / -1;
  }

  @media (max-width: 46em) {
    .container {
      padding-inline: var(--space-4);
      padding-block: var(--space-5) var(--space-8);
    }

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

@layer components {
  /* ---------- Card ---------- */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: var(--space-5);
  }

  .card + .card {
    margin-block-start: var(--space-4);
  }

  .card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-block-end: var(--space-4);
  }

  .card-head > :where(h2, h3) + p,
  .card-title + .card-desc {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-block-start: var(--space-1);
  }

  .card-flush {
    padding: 0;
    overflow: hidden;
  }

  .card-flush > .card-head {
    padding: var(--space-5) var(--space-5) 0;
  }

  .card-section {
    padding-block-start: var(--space-5);
    margin-block-start: var(--space-5);
    border-block-start: 1px solid var(--border);
  }

  .card-section > h3 {
    margin-block-end: var(--space-3);
  }

  /* ---------- Buttons ---------- */
  :where(.btn, .btn-ghost, .btn-danger) {
    --_bg: var(--surface);
    --_fg: var(--text);
    --_border: var(--border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 2.125rem;
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid var(--_border);
    border-radius: var(--radius);
    background: var(--_bg);
    color: var(--_fg);
    box-shadow: var(--shadow-xs);
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease,
      box-shadow 120ms ease, transform 60ms ease;

    &:active {
      transform: translateY(0.5px);
    }

    &:disabled {
      opacity: 0.55;
      cursor: not-allowed;
      transform: none;
    }
  }

  .btn {
    --_bg: var(--accent);
    --_fg: #fff;
    --_border: var(--accent);
    box-shadow: var(--shadow-sm);

    &:hover:not(:disabled) {
      --_bg: var(--accent-hover);
      --_border: var(--accent-hover);
    }
  }

  .btn-ghost {
    &:hover:not(:disabled) {
      --_bg: var(--surface-hover);
      --_border: var(--gray-400);
    }
  }

  .btn-danger {
    --_fg: var(--red-600);
    --_border: var(--red-200);

    &:hover:not(:disabled) {
      --_bg: var(--red-50);
      --_border: var(--red-600);
      --_fg: var(--red-700);
    }

    &:focus-visible {
      outline-color: var(--red-600);
    }
  }

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

  .btn-block {
    width: 100%;
  }

  /* ---------- Forms ---------- */
  .field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
  }

  .field + .field {
    margin-block-start: var(--space-4);
  }

  .grid-2 > .field + .field,
  .grid-3 > .field + .field,
  .form-grid > .field + .field {
    margin-block-start: 0;
  }

  label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
  }

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

  .field-hint.is-ok {
    color: var(--green-700);
    font-weight: 500;
  }

  .field-hint.is-bad {
    color: var(--red-700);
    font-weight: 500;
  }

  :where(input, select, textarea) {
    width: 100%;
    min-height: 2.125rem;
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: border-color 120ms ease, box-shadow 120ms ease;

    &:hover:not(:disabled, :focus) {
      border-color: var(--gray-400);
    }

    &:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: var(--ring);
    }

    &:disabled {
      background: var(--gray-100);
      color: var(--text-muted);
      cursor: not-allowed;
    }
  }

  textarea {
    min-height: 5.5rem;
    padding-block: var(--space-2);
    resize: vertical;
    line-height: 1.5;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
  }

  select {
    appearance: none;
    padding-inline-end: var(--space-8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-2) center;
    cursor: pointer;
  }

  input[type='file'] {
    padding: var(--space-1);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    box-shadow: none;
    cursor: pointer;

    &::file-selector-button {
      margin-inline-end: var(--space-2);
      padding: var(--space-1) var(--space-2);
      font-size: var(--text-xs);
      font-weight: 500;
      color: var(--text);
      background: var(--surface-subtle);
      border: 1px solid var(--border-strong);
      border-radius: var(--radius-sm);
      cursor: pointer;
    }

    &::file-selector-button:hover {
      background: var(--gray-150);
    }
  }

  input[type='number'] {
    padding-inline-end: var(--space-1);
  }

  .input-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }

  fieldset {
    border: 0;
  }

  /* ---------- Table ---------- */
  .table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
  }

  table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--text-sm);
  }

  thead th {
    text-align: start;
    font-size: var(--text-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--surface-subtle);
    padding: var(--space-2) var(--space-3);
    border-block-end: 1px solid var(--border);
    white-space: nowrap;
  }

  tbody td {
    padding: var(--space-3);
    border-block-end: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
  }

  tbody tr:last-child td {
    border-block-end: 0;
  }

  tbody tr {
    transition: background-color 100ms ease;

    &:hover {
      background: var(--surface-subtle);
    }
  }

  td.num,
  th.num {
    text-align: end;
    font-variant-numeric: tabular-nums;
  }

  :where(td, th).shrink {
    width: 1%;
    white-space: nowrap;
  }

  td.shrink .actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  /* ---------- Stats ---------- */
  .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: var(--space-3);
  }

  .stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: var(--space-4);
  }

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

  .stat-value {
    font-size: var(--text-2xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    margin-block-start: var(--space-1);
  }

  /* ---------- Badge ---------- */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.1875rem var(--space-2);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    white-space: nowrap;
  }

  .badge-on {
    background: var(--green-50);
    color: var(--green-700);
    border-color: var(--green-200);
  }

  .badge-off {
    background: var(--amber-50);
    color: var(--amber-700);
    border-color: var(--amber-200);
  }

  .badge-neutral {
    background: var(--brand-50);
    color: var(--brand-700);
    border-color: var(--brand-200);
  }

  /* ---------- Status select ---------- */
  /* A badge that is also the control, so state and action share one affordance. */
  .status-select {
    width: auto;
    min-height: 1.625rem;
    padding-inline: var(--space-2) var(--space-6);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius-full);
    background-position: right var(--space-1) center;
    box-shadow: none;
  }

  .status-select[data-status='active'] {
    background-color: var(--green-50);
    color: var(--green-700);
    border-color: var(--green-200);
  }

  .status-select[data-status='paused'] {
    background-color: var(--amber-50);
    color: var(--amber-700);
    border-color: var(--amber-200);
  }

  .status-select[data-status='ended'] {
    background-color: var(--gray-100);
    color: var(--text-secondary);
    border-color: var(--border);
  }

  /* ---------- Code / snippet ---------- */
  .snippet-box {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    line-height: 1.65;
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    color: var(--gray-800);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
  }

  code.inline {
    padding: 0.0625rem 0.3125rem;
    background: var(--gray-100);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--gray-700);
    font-size: var(--text-xs);
  }

  /* ---------- List rows ---------- */
  .row-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }

  .row-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: var(--space-4);
  }

  .row-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
  }

  .row-item-title {
    font-weight: 600;
    color: var(--text);
  }

  .row-item-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-block-start: var(--space-1);
  }

  /* ---------- Messages ---------- */
  .empty {
    color: var(--text-muted);
    font-size: var(--text-sm);
    text-align: center;
    padding: var(--space-8) var(--space-4);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-subtle);
  }

  .alert,
  .error,
  .success {
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    border: 1px solid transparent;
    margin-block-start: var(--space-3);
  }

  .error {
    color: var(--red-700);
    background: var(--red-50);
    border-color: var(--red-200);
  }

  .success {
    color: var(--green-700);
    background: var(--green-50);
    border-color: var(--green-200);
  }

  .note {
    color: var(--text-secondary);
    background: var(--surface-subtle);
    border-color: var(--border);
  }

  .error[hidden],
  .success[hidden],
  .note[hidden] {
    display: none;
  }

  /* ---------- Gallery ---------- */
  .input-inline {
    width: auto;
    min-width: 9rem;
  }

  .dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-8) var(--space-4);
    text-align: center;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-subtle);
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease;

    &:hover {
      border-color: var(--accent);
      background: var(--brand-50);
    }

    &.is-active {
      border-color: var(--accent);
      background: var(--brand-50);
      box-shadow: var(--ring);
    }

    &.is-busy {
      opacity: 0.6;
      pointer-events: none;
    }
  }

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

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

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

  .asset-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
  }

  /* Checkerboard so transparent PNG edges are visible. */
  .asset-thumb {
    height: 9rem;
    padding: var(--space-2);
    border-block-end: 1px solid var(--border);
    background-color: var(--surface);
    background-image:
      linear-gradient(45deg, var(--gray-100) 25%, transparent 25% 75%, var(--gray-100) 75%),
      linear-gradient(45deg, var(--gray-100) 25%, transparent 25% 75%, var(--gray-100) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
  }

  /*
   * The image box fills the thumbnail and the bitmap is fitted inside it.
   * Sizing the box intrinsically instead (max-height: 100%) fails here: the
   * percentage resolves against a track the oversized image itself grew.
   * scale-down shrinks large banners without upscaling small ones.
   */
  .asset-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: scale-down;
  }

  .asset-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3);
  }

  /* Reads as a caption until focused, so the grid stays calm. */
  .asset-label {
    min-height: 1.75rem;
    padding-inline: var(--space-1);
    font-size: var(--text-sm);
    font-weight: 600;
    background: transparent;
    border-color: transparent;
    box-shadow: none;

    &:hover:not(:focus) {
      border-color: var(--border-strong);
    }
  }

  .asset-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
  }

  /* ---------- Disclosure ---------- */
  .disclosure {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-subtle);
    overflow: hidden;
  }

  .disclosure > summary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    list-style: none;
    transition: color 120ms ease, background-color 120ms ease;
  }

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

  .disclosure > summary::before {
    content: '';
    width: 0.875rem;
    height: 0.875rem;
    flex: none;
    background: currentColor;
    transition: transform 150ms ease;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .disclosure > summary:hover {
    color: var(--text);
    background: var(--gray-150);
  }

  .disclosure[open] > summary {
    border-block-end: 1px solid var(--border);
  }

  .disclosure[open] > summary::before {
    transform: rotate(90deg);
  }

  .disclosure-body {
    padding: var(--space-4);
    background: var(--surface);
  }

  /* ---------- Preview surface ---------- */
  .preview-surface {
    display: grid;
    place-items: center;
    min-height: 8rem;
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
    background-image:
      linear-gradient(45deg, var(--gray-150) 25%, transparent 25%),
      linear-gradient(-45deg, var(--gray-150) 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, var(--gray-150) 75%),
      linear-gradient(-45deg, transparent 75%, var(--gray-150) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  }

  .preview-surface > * {
    max-width: 100%;
  }

  /* ---------- Auth ---------- */
  .auth-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: var(--space-6);
  }

  .auth-card {
    width: 100%;
    max-width: 22.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-8);
  }

  .auth-mark {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: var(--text-base);
    letter-spacing: -0.02em;
    box-shadow: var(--shadow-sm);
    margin-block-end: var(--space-4);
  }

  .auth-card h1 {
    font-size: var(--text-lg);
  }

  .auth-card > p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-block: var(--space-1) var(--space-5);
  }
}

@layer utilities {
  .muted {
    color: var(--text-secondary);
  }

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

  .mono {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
  }

  .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 18rem;
  }

  .break {
    word-break: break-word;
  }

  .mt-0 { margin-block-start: 0; }
  .mt-2 { margin-block-start: var(--space-2); }
  .mt-3 { margin-block-start: var(--space-3); }
  .mt-4 { margin-block-start: var(--space-4); }
  .mt-5 { margin-block-start: var(--space-5); }

  .end {
    align-self: end;
  }

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