/*
 * Blink Desktop beta — local reset
 * This file is loaded only by /desktop/ and intentionally avoids dependencies
 * on the portal's existing stylesheets.
 */

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

:where(html) {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}

:where(html[data-theme="light"]) {
  color-scheme: light;
}

:where(body) {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-ui, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-primary, #f7fbff);
  background: var(--wallpaper-base, #071b35);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:where(button, input, textarea, select) {
  margin: 0;
  font: inherit;
  color: inherit;
}

:where(button, [role="button"]) {
  -webkit-tap-highlight-color: transparent;
}

:where(button:not(:disabled), [role="button"]:not([aria-disabled="true"])) {
  cursor: default;
}

:where(button) {
  padding: 0;
  border: 0;
  background: none;
}

:where(input, textarea, select) {
  min-width: 0;
}

:where(a) {
  color: inherit;
  text-decoration: none;
}

:where(img, svg, canvas, video, iframe) {
  display: block;
  max-width: 100%;
}

:where(svg) {
  fill: currentColor;
}

:where(h1, h2, h3, h4, p, ul, ol, menu, figure) {
  margin: 0;
}

:where(ul, ol, menu) {
  padding: 0;
  list-style: none;
}

:where(fieldset) {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

:where(table) {
  border-collapse: collapse;
  border-spacing: 0;
}

:where([hidden]) {
  display: none !important;
}

:where([aria-hidden="true"]) {
  pointer-events: none;
}

:where(:focus) {
  outline: none;
}

:where(:focus-visible) {
  outline: 2px solid var(--focus-ring, #91caff);
  outline-offset: 2px;
}

::selection {
  color: var(--selection-text, #ffffff);
  background: var(--selection-bg, rgba(0, 103, 192, 0.72));
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  min-height: 32px;
  border: 4px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-primary, #fff) 34%, transparent);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--text-primary, #fff) 52%, transparent);
  background-clip: padding-box;
}

.sr-only,
.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;
}

.skip-link {
  position: fixed;
  inset: 8px auto auto 8px;
  z-index: var(--z-overlay, 9000);
  padding: 8px 12px;
  border-radius: var(--radius-control, 6px);
  color: var(--text-primary, #fff);
  background: var(--accent, #0067c0);
  transform: translateY(-150%);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

@media (forced-colors: active) {
  :where(:focus-visible) {
    outline: 2px solid Highlight;
  }

  ::selection {
    color: HighlightText;
    background: Highlight;
  }
}
