/* The new sign-in alert that secures the account. One dark glass pill on a black page that opens into a card: the
   glass is a cool graphite gradient with a sheen along the top edge, a 1px border that catches the light, a fine
   grain and a soft light that follows the pointer. Amber says something happened, mint says it is safe again: the
   tile, the button and the sweep mix the two with --t (0 amber, 1 mint), moved by GSAP.
   GSAP moves .note (enter and leave), .note__shell (height and corners) and the parts; the CSS styles their children. */
:root {
  --page: #000000;                        /* the page */
  --glass-top: rgba(40, 43, 50, 0.94);    /* the glass, at the top */
  --glass-bottom: rgba(16, 17, 21, 0.97); /* the glass, at the bottom */
  --edge: rgba(226, 234, 255, 0.11);      /* the 1px border */
  --panel: rgba(255, 255, 255, 0.035);    /* the inner panel of the device */
  --ink: #eef1f6;                         /* the words */
  --muted: #9298a4;                       /* the small words */
  --track: rgba(226, 234, 255, 0.1);      /* the empty rings */
  --amber: #f2b45a;                       /* something happened */
  --mint: #74e2b8;                        /* safe again */
  --on-accent: #17120a;                   /* the words on the main button */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ the pill and its glass */
.note {
  --t: 0;
  --tone: color-mix(in oklab, var(--amber), var(--mint) calc(var(--t) * 100%));
  position: relative;
  width: min(410px, 92vw);
  opacity: 0;
}

.note__shell {
  --r: 38px;
  --mx: 50%;
  --my: 0%;
  --lit: 0;
  position: relative;
  height: 76px;
  border-radius: var(--r);
  overflow: hidden;
  background:
    radial-gradient(160px 120px at var(--mx) var(--my), rgba(220, 230, 255, calc(var(--lit) * 0.06)), transparent 70%),
    radial-gradient(90% 70% at 8% 0%, color-mix(in oklab, var(--tone) 13%, transparent), transparent 60%),
    linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  box-shadow:
    inset 0 0 0 1px var(--edge),
    inset 0 1px 0 rgba(240, 245, 255, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 1px 1px rgba(0, 0, 0, 0.6),
    0 10px 24px -8px rgba(0, 0, 0, 0.85),
    0 34px 70px -26px color-mix(in oklab, var(--tone) 30%, transparent);
  transition: box-shadow 0.4s ease;
}

/* grain on the glass */
.note__shell::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 4;
}

/* the sheen: light from above, caught by the top of the glass */
.note__shell::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 44px;
  pointer-events: none;
  background: radial-gradient(55% 100% at 50% 0%, rgba(235, 242, 255, 0.07), transparent 72%);
  z-index: 4;
}

/* the mint light that crosses the card once, when the account is safe */
.note__sweep {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  --x: -60%;
  background: linear-gradient(105deg, transparent calc(var(--x) - 18%), color-mix(in oklab, var(--mint) 16%, transparent) var(--x), transparent calc(var(--x) + 18%));
  mix-blend-mode: screen;
  opacity: 0;
}

@media (hover: hover) {
  .note:hover .note__shell {
    box-shadow:
      inset 0 0 0 1px rgba(226, 234, 255, 0.17),
      inset 0 1px 0 rgba(240, 245, 255, 0.17),
      inset 0 -1px 0 rgba(0, 0, 0, 0.55),
      0 1px 1px rgba(0, 0, 0, 0.6),
      0 14px 30px -8px rgba(0, 0, 0, 0.9),
      0 40px 80px -26px color-mix(in oklab, var(--tone) 38%, transparent);
  }
}

.note__head {
  position: relative;
  z-index: 2;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 22px 0 12px;
}

/* ------------------------------------------------------------------ the shield tile */
.tile {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 26px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(80% 80% at 30% 18%, color-mix(in oklab, var(--tone) 34%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in oklab, var(--tone) 22%, #1c1e24), #121317);
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--tone) 34%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 6px 14px -6px color-mix(in oklab, var(--tone) 45%, transparent);
}

.tile__glint {
  position: absolute;
  inset: -20%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.28) 50%, transparent 62%);
  transform: translateX(-120%);
  pointer-events: none;
}

.tile__icon {
  position: relative;
  width: 26px;
  height: 26px;
  overflow: visible;
}

.tile__shield {
  fill: color-mix(in oklab, var(--tone) 18%, transparent);
  stroke: var(--tone);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.tile__mark,
.tile__check {
  fill: none;
  stroke: var(--tone);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ the words of the pill */
.note__body {
  flex: 1;
  min-width: 0;
}

.note__top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.note__title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  font-stretch: 104%;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note__when {
  position: relative;
  flex: none;
  font-size: 12.5px;
  color: var(--muted);
}

.note__done {
  position: absolute;
  right: -1px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -9px;
  fill: none;
  stroke: var(--mint);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.note__sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ the card under the pill */
.note__more {
  position: relative;
  z-index: 2;
  padding: 2px 16px 16px;
}

.device {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(226, 234, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.laptop {
  flex: none;
  width: 66px;
  height: 42px;
  overflow: visible;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.device__text {
  flex: 1;
  min-width: 0;
}

.device__name {
  font-size: 13.5px;
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device__meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device__meta span {
  display: inline-block;
}

.device.is-out .device__text {
  padding-right: 84px;
}

.device__badge {
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -11px;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  font-stretch: 108%;
  color: var(--mint);
  background: color-mix(in oklab, var(--mint) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--mint) 26%, transparent);
  opacity: 0;
}

.note__ask {
  margin: 12px 2px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.note__ask span {
  display: inline-block;
}

/* ------------------------------------------------------------------ the answers, then the steps */
.act {
  position: relative;
}

.act__buttons {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  font: inherit;
  cursor: pointer;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

.btn__face {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: inherit;
  font-size: 13.5px;
  font-weight: 600;
  font-stretch: 104%;
  overflow: hidden;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, font-stretch 0.3s ease;
}

.btn--ghost .btn__face {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px rgba(226, 234, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn--main {
  flex: 1.25;
}

.btn--main .btn__face {
  --shine: -120%;
  color: var(--on-accent);
  background:
    linear-gradient(105deg, transparent calc(var(--shine) - 14%), rgba(255, 255, 255, 0.45) var(--shine), transparent calc(var(--shine) + 14%)),
    linear-gradient(180deg, color-mix(in oklab, var(--tone), white 14%), var(--tone));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 8px 18px -8px color-mix(in oklab, var(--tone) 70%, transparent);
}

.btn__icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .btn--ghost:hover .btn__face {
    background: rgba(255, 255, 255, 0.09);
    font-stretch: 110%;
  }

  .btn--main:hover .btn__face {
    font-stretch: 110%;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      inset 0 -1px 0 rgba(0, 0, 0, 0.18),
      0 10px 24px -8px color-mix(in oklab, var(--tone) 85%, transparent);
  }
}

.btn:focus-visible {
  outline: none;
}

.btn:focus-visible .btn__face {
  box-shadow: 0 0 0 2px var(--page), 0 0 0 4px color-mix(in oklab, var(--tone) 80%, white);
}

.act__list {
  list-style: none;
  margin: 0;
  padding: 0 2px;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  visibility: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 30px;
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.35s ease;
}

.row.is-done {
  color: var(--ink);
}

.row__icon {
  flex: none;
  width: 20px;
  height: 20px;
  overflow: visible;
}

.row__track,
.row__arc {
  fill: none;
  stroke-width: 1.5;
}

.row__track {
  stroke: var(--track);
}

.row__arc {
  stroke: var(--amber);
  stroke-linecap: round;
  transform-origin: 10px 10px;
}

.row__check {
  fill: none;
  stroke: var(--mint);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.row.is-done .row__track {
  stroke: color-mix(in oklab, var(--mint) 55%, transparent);
  transition: stroke 0.4s ease;
}

/* ------------------------------------------------------------------ small screens: same pieces, sized on the height too */
@media (max-height: 520px), (max-width: 380px) {
  .note__head {
    height: 68px;
    padding-left: 10px;
  }

  .tile {
    width: 46px;
    height: 46px;
  }

  .note__title {
    font-size: 14px;
  }

  .note__sub {
    font-size: 12.5px;
  }

  .note__more {
    padding: 0 12px 12px;
  }

  .note__ask {
    margin: 10px 2px 12px;
    font-size: 12.5px;
  }

  .btn {
    height: 42px;
  }

  .btn__face {
    font-size: 13px;
  }
}
