:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-note: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --accent: #7e2fa8;
  --accent-hover: #6c2690;
  --accent-text: #7e2fa8;
  --accent-soft: #f3e9f8;
  --on-accent: #ffffff;

  --bg-chrome: #f5f5f5;
  --bg-card: #fbfbfb;
  --scroll-shadow: rgba(0, 0, 0, 0.14);
  --bg-rail: #f3f3f3;
  --bg-pane: #f9f9f9;
  --bg-page: #ffffff;
  --bg-input: #ffffff;
  --bg-menu: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.05);
  --bg-active: rgba(0, 0, 0, 0.09);
  --bg-selected: #e1e1e1;
  --bg-selected-strong: #d2d2d2;
  --bg-tooltip: #2b2b2b;

  --text: #242424;
  --text-2: #4c4c4c;
  --text-3: #6e6e6e;
  --text-disabled: #a6a6a6;
  --text-on-tooltip: #f5f5f5;

  --line: #e1e1e1;
  --line-2: #ececec;
  --line-strong: #c8c8c8;
  --card-line: #e5e5e5;
  --focus: #2b6fd6;

  --danger: #c42b1c;
  --success: #1e7d3e;
  --warning: #9a6500;

  --outline-line: #c6c6c6;
  --outline-bar: #ededed;
  --page-meta: #6e6e6e;
  --page-title-line: #a0a0a0;
  --rule: #c9dcef;
  --rule-margin: #f1b6b6;
  --find-hit: #ffe36e;
  --find-current: #ff9f2e;
  --selection-ink: #2b6fd6;

  --radius-s: 4px;
  --radius-m: 6px;
  --radius-l: 8px;

  --titlebar-h: 40px;
  --tabs-h: 30px;
  --rail-w: 48px;
  --sections-w: 168px;
  --pages-w: 168px;

  --dur: 140ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  color-scheme: light;
}

:root[data-theme-resolved="dark"] {
  --accent: #c086e0;
  --accent-hover: #cf9de9;
  --accent-text: #cf9de9;
  --accent-soft: #3a2a45;
  --on-accent: #1b1020;

  --bg-chrome: #1f1f1f;
  --bg-card: #2b2b2b;
  --scroll-shadow: rgba(0, 0, 0, 0.55);
  --bg-rail: #232323;
  --bg-pane: #262626;
  --bg-page: #1e1e1e;
  --bg-input: #1f1f1f;
  --bg-menu: #2d2d2d;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 255, 255, 0.1);
  --bg-selected: #3a3a3a;
  --bg-selected-strong: #444444;
  --bg-tooltip: #f0f0f0;

  --text: #ececec;
  --text-2: #c8c8c8;
  --text-3: #a3a3a3;
  --text-disabled: #6b6b6b;
  --text-on-tooltip: #1f1f1f;

  --line: #3a3a3a;
  --line-2: #333333;
  --line-strong: #4f4f4f;
  --card-line: #383838;
  --focus: #6ea4ef;

  --danger: #ff8a7f;
  --success: #6fd394;
  --warning: #f2c35b;

  --outline-line: #555555;
  --outline-bar: #3a3a3a;
  --page-meta: #a3a3a3;
  --page-title-line: #6b6b6b;
  --rule: #2f4256;
  --rule-margin: #5b3434;
  --find-hit: #7a6400;
  --find-current: #b86200;
  --selection-ink: #6ea4ef;

  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  background: var(--bg-chrome);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

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

button {
  cursor: default;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

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

[hidden] {
  display: none !important;
}

.icon {
  flex: none;
  display: block;
}

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

@media (forced-colors: active) {
  .icon {
    forced-color-adjust: auto;
  }
}
