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

html {
  min-width: 320px;
  min-height: 100%;
  font-size: 16px;
  color-scheme: light;
  background: var(--vr-canvas);
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--vr-text);
  background: var(--vr-canvas);
  font-family: var(--vr-font-sans);
  font-size: var(--vr-type-body-size);
  font-weight: var(--vr-weight-regular);
  line-height: var(--vr-type-body-line);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled {
  color: var(--vr-text-disabled);
  cursor: not-allowed;
  opacity: 0.64;
}

h1, h2, h3, p { margin-block: 0; }
h1 {
  color: var(--vr-text);
  font-size: var(--vr-type-page-size);
  font-weight: var(--vr-weight-bold);
  line-height: var(--vr-type-page-line);
  letter-spacing: -0.025em;
}
h2 {
  color: var(--vr-text);
  font-size: var(--vr-type-section-size);
  font-weight: var(--vr-weight-bold);
  line-height: var(--vr-type-section-line);
  letter-spacing: -0.015em;
}
h3 {
  color: var(--vr-text);
  font-size: var(--vr-type-card-size);
  font-weight: var(--vr-weight-semibold);
  line-height: var(--vr-type-card-line);
}
small {
  color: var(--vr-text-muted);
  font-size: var(--vr-type-meta-size);
  font-weight: var(--vr-weight-regular);
  line-height: var(--vr-type-meta-line);
}
strong { font-weight: var(--vr-weight-semibold); }
code, kbd, samp { font-family: var(--vr-font-mono); }

svg {
  display: block;
  width: var(--vr-icon-md);
  height: var(--vr-icon-md);
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--vr-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
}

label {
  color: var(--vr-text-secondary);
  font-size: var(--vr-type-label-size);
  font-weight: var(--vr-weight-semibold);
  line-height: var(--vr-type-label-line);
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--vr-border-strong);
  border-radius: var(--vr-radius-md);
  color: var(--vr-text);
  background: var(--vr-surface);
  font-size: var(--vr-type-ui-size);
  font-weight: var(--vr-weight-ui);
  line-height: var(--vr-type-ui-line);
  transition: border-color var(--vr-duration-fast) var(--vr-ease), box-shadow var(--vr-duration-fast) var(--vr-ease), background var(--vr-duration-fast) var(--vr-ease);
}
input, select { min-height: var(--vr-control-md); padding: 0 var(--vr-space-3); }
textarea { min-height: 88px; padding: 10px var(--vr-space-3); resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--vr-placeholder); font-weight: var(--vr-weight-regular); opacity: 1; }
input[readonly], textarea[readonly], select[aria-readonly="true"] { background: var(--vr-surface-subtle); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--vr-focus-color);
  outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--vr-focus-color);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vr-focus-color) 22%, transparent);
}

::selection { color: var(--vr-text-inverse); background: var(--vr-primary-600); }
[hidden] { display: none !important; }

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

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  z-index: var(--vr-z-skip-link);
  top: 10px;
  left: 10px;
  min-height: var(--vr-control-md);
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--vr-radius-md);
  color: var(--vr-text-inverse);
  background: var(--vr-primary-900);
  font-weight: var(--vr-weight-semibold);
  transform: translateY(-160%);
  transition: transform var(--vr-duration-fast) var(--vr-ease);
}
.skip-link:focus { transform: translateY(0); }

.section-kicker, .eyebrow {
  color: var(--vr-text-secondary);
  font-size: var(--vr-type-table-head-size);
  font-weight: var(--vr-weight-semibold);
  line-height: var(--vr-type-table-head-line);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.panel {
  min-width: 0;
  border: 1px solid var(--vr-border);
  border-radius: var(--vr-radius-lg);
  background: var(--vr-surface);
  box-shadow: var(--vr-shadow-xs);
}

.panel-header, .layer-header, .drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vr-space-3);
}
.panel-header { min-height: 56px; padding: var(--vr-space-3) var(--vr-space-4); border-bottom: 1px solid var(--vr-border); }
.panel-header > div:first-child, .layer-header > div:first-child, .drawer-header > div:first-child { min-width: 0; }

.layer-card {
  position: fixed;
  z-index: var(--vr-z-overlay);
  border: 1px solid var(--vr-border);
  border-radius: var(--vr-radius-lg);
  background: var(--vr-surface-raised);
  box-shadow: var(--vr-shadow-md);
}

.backdrop {
  position: fixed;
  z-index: var(--vr-z-backdrop);
  inset: 0;
  background: rgba(6, 20, 42, 0.38);
  backdrop-filter: blur(2px);
}

kbd {
  display: inline-grid;
  min-width: 24px;
  min-height: 22px;
  place-items: center;
  padding: 0 6px;
  border: 1px solid var(--vr-border);
  border-bottom-color: var(--vr-border-strong);
  border-radius: var(--vr-radius-xs);
  color: var(--vr-text-secondary);
  background: var(--vr-surface-subtle);
  font-size: 11px;
  font-weight: var(--vr-weight-ui);
  line-height: 1;
}

@media (max-width: 760px) {
  h1 { font-size: 25px; line-height: 31px; }
  h2 { font-size: 19px; line-height: 26px; }
  input, select { min-height: var(--vr-touch); }
}

@media (forced-colors: active) {
  :focus-visible { outline: 2px solid CanvasText; }
  input, select, textarea, .panel { border-color: CanvasText; }
}

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