/* DashUI shared foundation. Page layout and editor palettes belong to their hosts. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm_plex_sans_regular.975dcda37d80.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm_plex_sans_medium.331c8639d759.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm_plex_sans_semibold.a20caf828602.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Condensed";
  src: url("/assets/fonts/ibm_plex_sans_condensed_medium.0c6b79ef4a7d.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Condensed";
  src: url("/assets/fonts/ibm_plex_sans_condensed_semibold.acc2b1e3b959.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm_plex_mono_regular.fe11304a5fe9.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm_plex_mono_medium.0bede3debdea.ttf") format("truetype");
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
}

:root {
  --ds-bg: #07080b;
  --ds-surface: #111216;
  --ds-surface-raised: #15171c;
  --ds-border: #2a2d33;
  --ds-border-soft: rgba(242, 244, 247, .09);
  --ds-text: #f2f4f7;
  --ds-text-muted: #8b919c;
  --ds-text-on-accent: #041008;
  --ds-accent: #20c56b;
  --ds-accent-hover: #1cad5e;
  --ds-accent-active: #179653;
  --ds-focus-ring: #20c56b;
  --ds-success: #20c56b;
  --ds-warning: #f0b35b;
  --ds-error: #ef4444;
  --ds-error-text: #ff8d8d;
  --ds-qr-surface: #fff;

  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-6: 24px;
  --ds-space-8: 32px;
  --ds-space-12: 48px;
  --ds-radius-sm: 4px;
  --ds-radius-control: 8px;
  --ds-radius-card: 12px;
  --ds-radius-pill: 999px;
  --ds-control-height: 44px;
  --ds-control-height-compact: 36px;
  --ds-action-tile-height: 64px;
  --ds-width-default: 1240px;
  --ds-width-reading: 760px;
  --ds-width-form: 540px;
  --ds-width-editor: 1380px;

  --ds-font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --ds-font-condensed: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  --ds-font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ds-type-body: 16px;
  --ds-type-small: 14px;
  --ds-type-meta: 12px;
  --ds-type-label: 14px;
  --ds-type-section: 24px;
  --ds-type-page: clamp(36px, 5vw, 64px);
}

.ds-type-body { font: 400 var(--ds-type-body)/1.55 var(--ds-font-sans); }
.ds-type-small { font: 400 var(--ds-type-small)/1.45 var(--ds-font-sans); }
.ds-type-meta { font: 600 var(--ds-type-meta)/1.4 var(--ds-font-condensed); }
.ds-type-label { font: 600 var(--ds-type-label)/1.4 var(--ds-font-condensed); }
.ds-type-section { font: 600 var(--ds-type-section)/1.2 var(--ds-font-condensed); }
.ds-type-page { font: 600 var(--ds-type-page)/1.05 var(--ds-font-condensed); }

.ds-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ds-control-height);
  padding: var(--ds-space-2) var(--ds-space-4);
  border: 1px solid transparent;
  border-radius: var(--ds-radius-control);
  font: 600 var(--ds-type-label)/1.4 var(--ds-font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.ds-button--primary { background: var(--ds-accent); color: var(--ds-text-on-accent); }
.ds-button--primary:not(:disabled):not([aria-disabled="true"]):hover { background: var(--ds-accent-hover); }
.ds-button--primary:not(:disabled):not([aria-disabled="true"]):active { background: var(--ds-accent-active); }
.ds-button--secondary { background: var(--ds-surface-raised); color: var(--ds-text); border-color: var(--ds-border); }
.ds-button--secondary:not(:disabled):not([aria-disabled="true"]):hover { border-color: var(--ds-accent); color: var(--ds-accent); }
.ds-button--secondary:not(:disabled):not([aria-disabled="true"]):active { background: var(--ds-surface); border-color: var(--ds-accent-active); }
.ds-button--destructive { background: var(--ds-surface); color: var(--ds-error-text); border-color: var(--ds-error); }
.ds-button--destructive:not(:disabled):not([aria-disabled="true"]):hover { background: rgba(239, 68, 68, .15); }
.ds-button--destructive:not(:disabled):not([aria-disabled="true"]):active { background: rgba(239, 68, 68, .25); }
.ds-button:focus-visible { outline: 3px solid var(--ds-focus-ring); outline-offset: 3px; }
.ds-button:disabled { opacity: .5; cursor: not-allowed; }
.ds-button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

.ds-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--ds-control-height);
  min-height: var(--ds-control-height);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface-raised);
  color: var(--ds-text);
  cursor: pointer;
}
.ds-icon-button:not(:disabled):hover { border-color: var(--ds-accent); }
.ds-icon-button:not(:disabled):active { background: var(--ds-surface); }
.ds-icon-button:focus-visible { outline: 3px solid var(--ds-focus-ring); outline-offset: 3px; }
.ds-icon-button:disabled { opacity: .5; cursor: not-allowed; }
.ds-link-action { color: var(--ds-accent); text-decoration: underline; text-underline-offset: 3px; }
.ds-link-action:hover { color: var(--ds-accent-hover); }
.ds-link-action:active { color: var(--ds-accent-active); }
.ds-link-action:focus-visible { outline: 3px solid var(--ds-focus-ring); outline-offset: 3px; }

.ds-control {
  min-height: var(--ds-control-height);
  padding: var(--ds-space-2) var(--ds-space-3);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface);
  color: var(--ds-text);
  font: 400 var(--ds-type-body)/1.55 var(--ds-font-sans);
}
.ds-control:not(:disabled):hover { border-color: var(--ds-text-muted); }
.ds-control:focus-visible { outline: 3px solid var(--ds-focus-ring); outline-offset: 3px; border-color: var(--ds-accent); }
.ds-control:disabled { opacity: .5; cursor: not-allowed; }
.ds-control--select { padding-right: var(--ds-space-8); }
.ds-control--textarea { min-height: calc(var(--ds-control-height) * 2); resize: vertical; }

.ds-card {
  padding: var(--ds-space-6);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface);
  color: var(--ds-text);
}
.ds-action-tile {
  display: flex;
  align-items: center;
  min-height: var(--ds-action-tile-height);
  padding: var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface-raised);
  color: var(--ds-text);
  text-decoration: none;
}
.ds-action-tile:not([aria-disabled="true"]):hover { border-color: var(--ds-accent); }
.ds-action-tile:not([aria-disabled="true"]):active { background: var(--ds-surface); }
.ds-action-tile:focus-visible { outline: 3px solid var(--ds-focus-ring); outline-offset: 3px; }
.ds-action-tile[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.ds-auth-panel { padding: var(--ds-space-8); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-card); background: var(--ds-surface); }

.ds-status { display: inline-flex; align-items: center; gap: var(--ds-space-1); padding: var(--ds-space-1) var(--ds-space-2); border-radius: var(--ds-radius-pill); font: 600 var(--ds-type-meta)/1.4 var(--ds-font-condensed); }
.ds-status--success { color: var(--ds-success); }
.ds-status--warning { color: var(--ds-warning); }
.ds-status--error { color: var(--ds-error-text); }
.ds-status--neutral { color: var(--ds-text-muted); }
.ds-alert { padding: var(--ds-space-4); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); background: var(--ds-surface-raised); color: var(--ds-text); }
.ds-alert--success { border-color: var(--ds-success); }
.ds-alert--warning { border-color: var(--ds-warning); }
.ds-alert--error { border-color: var(--ds-error); }
.ds-list-row { padding: var(--ds-space-3) 0; border-bottom: 1px solid var(--ds-border-soft); }
.ds-table { width: 100%; border-collapse: collapse; color: var(--ds-text); }
.ds-table th, .ds-table td { padding: var(--ds-space-3); border-bottom: 1px solid var(--ds-border-soft); text-align: left; }
.ds-dialog { padding: var(--ds-space-6); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-card); background: var(--ds-surface-raised); color: var(--ds-text); }
.ds-site-header { min-height: var(--ds-control-height); border-bottom: 1px solid var(--ds-border-soft); background: var(--ds-bg); color: var(--ds-text); }
.ds-nav-link { display: inline-flex; align-items: center; min-height: var(--ds-control-height); padding: 0 var(--ds-space-3); color: var(--ds-text-muted); text-decoration: none; }
.ds-nav-link:hover { color: var(--ds-text); }
.ds-nav-link:active, .ds-nav-link[aria-current="page"] { color: var(--ds-accent); }
.ds-nav-link:focus-visible { outline: 3px solid var(--ds-focus-ring); outline-offset: 3px; }
.ds-account-tile { display: inline-flex; align-items: center; min-height: var(--ds-control-height); padding: var(--ds-space-2) var(--ds-space-3); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-control); background: var(--ds-surface-raised); color: var(--ds-text); text-decoration: none; }
.ds-account-tile:hover { border-color: var(--ds-accent); }
.ds-account-tile:active { background: var(--ds-surface); }
.ds-account-tile:focus-visible { outline: 3px solid var(--ds-focus-ring); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .ds-button { transition: none; }
}
