/* House Console Theme tokens for Signet.
   Vendored from the Artemis house token starter, with the OpenRMM operator
   light/dark/auto blocks. Inter Variable is self-hosted (SIL OFL 1.1):
   static/fonts/Inter-LICENSE.txt.
   Signet deviations, recorded in docs/frontend/house-console.md:
   muted text and input borders are darker than the starter so small text
   and control edges meet WCAG 2.2 AA on recessed surfaces. */
@font-face {
  font-family: 'Inter Variable';
  src: url('/fonts/InterVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --house-white: #fff;
  --house-neutral-25: oklch(98.75% 0 0);
  --house-neutral-100: oklch(97% 0 0);
  --house-neutral-500: oklch(45% 0 0);
  --house-neutral-900: oklch(20.5% 0 0);
  --house-blue: oklch(57.72% .2324 260);
  --house-blue-hover: oklch(51% .225 260);
  --house-font-sans: 'Inter Variable', Inter, ui-sans-serif, system-ui, sans-serif;
  --house-font-mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --house-canvas: var(--house-neutral-25);
  --house-surface: var(--house-white);
  --house-recessed: var(--house-neutral-100);
  --house-text: var(--house-neutral-900);
  --house-text-secondary: oklch(40% 0 0);
  --house-text-muted: var(--house-neutral-500);
  --house-line: oklch(40% 0 0 / .28);
  --house-input-line: oklch(45% 0 0);
  --house-action: var(--house-blue);
  --house-action-text: var(--house-white);
  --house-action-hover: color-mix(in srgb, var(--house-action) 82%, var(--house-action-text));
  --house-link: oklch(42.4% .199 265.638);
  --house-focus: var(--house-blue);
  --house-nav-current: var(--house-neutral-100);
  --house-success-text: oklch(40% .095 166.913);
  --house-success-bg: oklch(96% .035 166);
  --house-warning-text: oklch(40% .11 57.5);
  --house-warning-bg: oklch(97.3% .071 103.193);
  --house-danger-text: oklch(45% .19 27.518);
  --house-danger-bg: oklch(97% .014 27);
  --house-danger-solid: var(--house-danger-text);
  --house-on-danger: var(--house-white);
  --house-scrim: rgb(0 0 0 / .5);
  --house-series-1: oklch(65% .19 260);
  --house-series-1-fill: oklch(65% .19 260 / .12);
  --house-chart-grid: var(--house-line);
  --house-control-radius: 8px;
  --house-panel-radius: 10px;
  --house-sidebar-width: 260px;
  --house-header-height: 58px;
  --house-control-height: 36px;
  --house-control-compact-height: 32px;
  --house-table-row-height: 44px;
  --house-space-1: 4px;
  --house-space-2: 8px;
  --house-space-3: 12px;
  --house-space-4: 16px;
  --house-space-6: 24px;
  --house-space-8: 32px;
  --house-space-10: 40px;
  --house-page-padding: var(--house-space-8);
  --house-panel-padding: var(--house-space-6);
  --house-popover-shadow: 0 8px 24px rgb(0 0 0 / .10);
  /* Paper and ink never follow dark mode. */
  --signet-paper: #ffffff;
  --signet-ink: #0b1f3a;
  --signet-media: #0f172a;
  --signet-media-text: #ffffff;
  --signet-field: var(--house-blue);
  --signet-field-text: oklch(42.4% .199 265.638);
  --signet-field-ok: oklch(40% .095 166.913);
  --house-button-bg: var(--house-action);
  --house-button-fg: var(--house-action-text);
  --house-button-radius: var(--house-control-radius);
  --house-card-bg: var(--house-surface);
  --house-card-border: var(--house-line);
  --house-card-radius: var(--house-panel-radius);
  --house-input-bg: var(--house-surface);
  --house-input-border: var(--house-input-line);
}

:root[data-house-mode='dark'],
:root[data-theme='dark'],
:root.dark {
  color-scheme: dark;
  --house-canvas: oklch(15% 0 0);
  --house-surface: oklch(19% 0 0);
  --house-recessed: oklch(23% 0 0);
  --house-text: oklch(97% 0 0);
  --house-text-secondary: oklch(86% 0 0);
  --house-text-muted: oklch(78% 0 0);
  --house-line: oklch(98% 0 0 / .2);
  --house-input-line: oklch(78% 0 0);
  --house-link: oklch(82% .12 260);
  --house-focus: oklch(78% .14 260);
  --house-nav-current: oklch(27% 0 0);
  --house-success-text: oklch(90.5% .093 164.15);
  --house-success-bg: oklch(27% .04 166);
  --house-warning-text: oklch(90% .12 70);
  --house-warning-bg: oklch(27% .045 70);
  --house-danger-text: oklch(86% .1 27);
  --house-danger-bg: oklch(27% .06 27);
  --house-danger-solid: oklch(45% .19 27.518);
  --house-on-danger: #ffffff;
  --house-series-1: oklch(75% .15 260);
  --house-series-1-fill: oklch(75% .15 260 / .15);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='auto'] {
    color-scheme: dark;
    --house-canvas: oklch(15% 0 0);
    --house-surface: oklch(19% 0 0);
    --house-recessed: oklch(23% 0 0);
    --house-text: oklch(97% 0 0);
    --house-text-secondary: oklch(86% 0 0);
    --house-text-muted: oklch(78% 0 0);
    --house-line: oklch(98% 0 0 / .2);
    --house-input-line: oklch(78% 0 0);
    --house-link: oklch(82% .12 260);
    --house-focus: oklch(78% .14 260);
    --house-nav-current: oklch(27% 0 0);
    --house-success-text: oklch(90.5% .093 164.15);
    --house-success-bg: oklch(27% .04 166);
    --house-warning-text: oklch(90% .12 70);
    --house-warning-bg: oklch(27% .045 70);
    --house-danger-text: oklch(86% .1 27);
    --house-danger-bg: oklch(27% .06 27);
    --house-danger-solid: oklch(45% .19 27.518);
    --house-on-danger: #ffffff;
    --house-series-1: oklch(75% .15 260);
    --house-series-1-fill: oklch(75% .15 260 / .15);
  }
}

/* Tenant accent overrides house blue. Text, link, and focus are set in
   branding.ts only after they clear 4.5:1 (text) or 3:1 (focus). */
html[data-brand-accent='custom'] {
  --house-action: var(--brand-primary);
  --house-action-text: var(--brand-on-primary);
  --house-link: var(--brand-link-light);
  --house-focus: var(--brand-focus, var(--house-blue));
}
html[data-brand-accent='custom'][data-house-mode='dark'],
html[data-brand-accent='custom'].dark {
  --house-link: var(--brand-link-dark);
}
@media (prefers-color-scheme: dark) {
  html[data-brand-accent='custom'][data-theme='auto'] {
    --house-link: var(--brand-link-dark);
  }
}

@media (max-width: 767px) {
  :root {
    --house-page-padding: var(--house-space-4);
    --house-control-height: 44px;
    --house-control-compact-height: 44px;
  }
}

body {
  margin: 0;
  background: var(--house-canvas);
  color: var(--house-text);
  font-family: var(--house-font-sans);
  line-height: 1.5;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--house-action);
  color: var(--house-action-text);
  padding: var(--house-space-3) var(--house-space-4);
  z-index: 100;
}
.skip:focus {
  left: var(--house-space-2);
  top: var(--house-space-2);
}

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