/* ==========================================================================
   Base styles
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: "Quicksand", sans-serif;
  /* Behave like an app rather than a page when installed (added to the Home
     Screen, or to the Dock from Safari): no rubber-band scroll of the whole
     window, no grey flash on tap, and no text resizing when the phone turns. */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The space the device keeps for itself — an iPhone's status bar and home
   indicator, the notch in landscape — which the installed app reaches under
   (`viewport-fit=cover`, see layouts/_app_meta). Zero in a browser tab and on a
   desktop, so nothing moves there. Custom properties rather than env() at each
   use, so there is one place to read them and a screenshot can simulate them. */
:root {
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
}

/* Installed, the app's own chrome is not text to select or press-and-hold
   for a link preview — a native app's tab bar and toolbar are not either. */
@media (display-mode: standalone) {
  .topbar,
  .sidenav,
  .app-tabs__strip,
  .firm-subnav {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-weight: normal;
  color: var(--color-text);
  background-color: var(--color-canvas);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--color-primary-dark);
}

svg {
  overflow: visible !important;
}

strong {
  font-family: var(--font-family-bold);
  font-weight: bold;
}

::selection {
  background-color: var(--tint-green-28);
}

/* Consistent, slim scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--color-border-strong);
  border-radius: var(--radius-full);
}

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

/* Keyboard focus is always visible */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.light-text {
  font-weight: 300;
}

.hidden {
  display: none !important;
}

.field-with-error {
  border-color: var(--color-danger) !important;
}

.field-with-error:focus {
  box-shadow: var(--focus-ring-danger) !important;
  border-color: var(--color-danger) !important;
}
