:root {
  --navy: #071b4a;
  --cyan: #2ed9ff;
  --yellow: #f5df17;
  --white: #ffffff;
  --mist: #f2f7fb;
  --line: #dce8f1;
  --ink: #0e2042;
  --muted: #53647c;
  --control-border: #8fa7ba;
  --danger: #b42318;
  --success: #166534;
  --success-background: #dcfce7;
  --warning: #92400e;
  --warning-background: #fef3c7;
  --navy-shadow: rgba(7, 27, 74, 0.3);
  --navy-overlay: rgba(7, 27, 74, 0.68);
  --header-background: rgba(255, 255, 255, 0.96);
  --accent-text: #116c83;
  --notice-warning: #a15c00;
  --notice-warning-background: #fff7e6;
  --notice-error: #8a1c13;
  --notice-error-background: #fff1f0;
  --failure: #991b1b;
  --failure-background: #fee2e2;
  --success-indicator: #16834b;
  --danger-indicator: #c52828;
  --header-height: 5.5rem;
  --control-radius: 0.375rem;
  --page: max(1.5rem, calc((100vw - 85rem) / 2));
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-inline: var(--page);
  border-bottom: 1px solid var(--line);
  background: var(--header-background);
  animation-name: compact-header;
  animation-duration: auto;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: scroll(root block);
  animation-range: 0 6rem;
}

.dashboard .site-header {
  padding-inline: 1rem 1.875rem;
}

.site-header img {
  display: block;
  width: clamp(10rem, 18vw, 13.5rem);
  height: auto;
  animation-name: compact-header-logo;
  animation-duration: auto;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: scroll(root block);
  animation-range: 0 6rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: clamp(1rem, 3vw, 2.625rem);
  flex-wrap: nowrap;
  font-size: 1rem;
  font-weight: 600;

  a {
    white-space: nowrap;
  }
}

.site-header .header-action {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 1.375rem;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  box-shadow: 0 0.5rem 1.375rem rgba(7, 27, 74, 0.16);
  cursor: pointer;
  white-space: nowrap;
}

@keyframes compact-header {
  to {
    min-height: 4rem;
    box-shadow: 0 0.5rem 1.5rem rgba(7, 27, 74, 0.1);
  }
}

@keyframes compact-header-logo {
  to {
    width: 9rem;
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 0.2rem solid var(--yellow);
  outline-offset: 0.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #a9d2ff;
    --cyan: #62e4ff;
    --yellow: #ffe65c;
    --white: #111b2d;
    --mist: #1b2940;
    --line: #334968;
    --ink: #eff6ff;
    --muted: #adbed4;
    --control-border: #627b9d;
    --danger: #ffaaa4;
    --success: #9be6b5;
    --success-background: #163d2a;
    --warning: #ffda94;
    --warning-background: #4b3815;
    --navy-shadow: rgba(0, 0, 0, 0.45);
    --navy-overlay: rgba(0, 0, 0, 0.72);
    --header-background: rgba(17, 27, 45, 0.96);
    --accent-text: #7bdbf2;
    --notice-warning: #ffcb70;
    --notice-warning-background: #493313;
    --notice-error: #ffb4ad;
    --notice-error-background: #4c211f;
    --failure: #ffb4ad;
    --failure-background: #4c211f;
    --success-indicator: #9be6b5;
    --danger-indicator: #ffaaa4;
    color-scheme: dark;
  }

  .site-header img {
    filter: brightness(0) invert(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  .site-header img {
    animation: none;
  }
}

@media (max-width: 40rem) {
  :root {
    --header-height: 4.75rem;
  }

  .site-header {
    min-height: var(--header-height);
    align-items: flex-start;
    padding-block: 0.75rem;
    flex-wrap: nowrap;

    .header-action {
      margin-left: auto;
      font-size: .75rem;
      padding: .75rem 1rem;
      min-height: auto;
    }
  }

  .site-header img {
    width: 9rem;
  }

  .site-header nav {
    height: 48px;
    flex: 1 1 10rem;
    gap: 0.5rem 0.75rem;
    font-size: 0.875rem;
    margin-left: 0;

    a[data-install-app] {
      font-size: .65rem;
    }
  }
}

/* animated select */
select {
    appearance: base-select;

    &::picker(select) {
      appearance: base-select;
      border: none;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      overflow: clip;

      height: auto;
      min-height: 0;

      transition-property: height, overlay;
      transition-duration: 0.3s;
      transition-behavior: allow-discrete;
    }

    &:not(:open)::picker(select) {
      height: 0;
      margin-left: 0;
      padding-left: 0;
      border: none;
      box-shadow: none;
    }

    /* For Safari Tech Preview 238 */
    @supports (font: -apple-system-body) {
      &:not(:open)::picker(select) {
        margin-top: 47px;
      }
    }

    &:open::picker(select) {
      height: auto;

      @starting-style {
        height: 0;
      }
    }

    .options {
      width: 100%;
      /*border: 1px solid #8fa7ba;*/
      /*border-radius: 0.375rem;*/
      box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 6px, rgba(0, 0, 0, 0.12) 0px 1px 4px;
    }
  }

  selectedcontent {
    display: flex;
    align-items: center;
    flex-grow: 1;
    color: var(--ink);
    font-weight: normal;
  }

  /* hide default arrow */
  ::picker-icon {
    display: none;
  }

  /* remove checkmark  */
  option::checkmark {
    display: none;
  }

  .arrow {
    margin-left: 0.5rem;
    align-self: center;
    transition: rotate 0.25s;
    background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 66.49 42.37'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23221f20; stroke-width: 0px; %7D %3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M3.96,0h58.57c3.37,0,5.2,3.95,3.01,6.52l-29.28,34.46c-1.58,1.86-4.45,1.86-6.03,0L.95,6.52C-1.23,3.95.59,0,3.96,0Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(4);
    width: 0.5rem;
    height: 0.5rem;

    select:open & {
      rotate: z 180deg;
    }
  }

  option {
    min-height: 3.25rem;
    margin: 0;
    padding-inline: 1rem;
    background: var(--white);
    color: var(--ink);
    font: inherit;
  }

  select {

    &::picker(select) {
      border: 1px solid var(--control-border);
      border-radius: 0.5rem;
      padding: 0;
      width: 210px;
    }
  }

  option {
    display: flex;
    font-size: 1rem;
    align-items: center;
  }
