/* The sign-in buttons of Hollow, a made-up notes app: one small card alone on white, a single indigo accent.
   The services are named in words only: no logos. */
:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --bordo: #e7e6e3;
  --tinta: #f5f5f3;          /* the quiet pills on hover and the account sheet */
  --testo: #15161a;
  --testo-2: #5d6068;
  --testo-3: #9b9ea6;
  --accento: #4f46e5;        /* the single accent: the ring, the chosen pill, the first account */
  --accento-chiaro: #eeedfd;
  --ombra: 22, 26, 38;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { font-size: clamp(9px, min(4.2vw, 2.9vh), 19px); }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }

.stage { height: 100vh; display: grid; place-items: center; padding: 2vh 4vw; }

/* the card */
.card {
  position: relative;
  width: min(18.5em, 92vw);
  padding: 1.25em 1.15em .8em;
  border-radius: 1.4em;
  background: var(--carta);
  box-shadow:
    0 1px 1px rgba(var(--ombra), .05),
    0 6px 14px -6px rgba(var(--ombra), .10),
    0 26px 50px -26px rgba(var(--ombra), .26);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.05em;
  overflow: hidden;
  isolation: isolate;
}
.card__edge {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5;
  padding: 1px;
  background: linear-gradient(180deg, #f1f1ef, var(--bordo) 30%, #e1e2e0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* title */
.head { display: grid; justify-items: center; gap: .2em; text-align: center; }
.mark { width: 2.3em; height: 2.3em; display: block; margin-bottom: .35em; filter: drop-shadow(0 4px 8px rgba(var(--ombra), .18)); }
.mark svg { width: 100%; height: 100%; display: block; }
.mark__bg { fill: var(--testo); }
.mark__h { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.name { font-size: 1.12em; font-weight: 650; letter-spacing: -.015em; line-height: 1.15; }
.meta { position: relative; width: 100%; height: 1.4em; font-size: .74em; color: var(--testo-2); }
.meta__face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .35em; white-space: nowrap; }
.meta__face[data-m="on"] { opacity: 0; color: var(--accento); font-weight: 560; }

/* the stack of pills */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5em; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.pill {
  position: relative; height: 2.75em; width: 100%;
  font-size: .84em; font-weight: 600;
  border-radius: 99em;
  touch-action: manipulation;
}
.pill__bg {
  position: absolute; inset: 0; border-radius: inherit; background: #fff;
  box-shadow: inset 0 0 0 1px var(--bordo), 0 1px 2px rgba(var(--ombra), .06);
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), background-color .3s ease, box-shadow .3s ease;
}
.pill--ink { color: #fff; }
.pill--ink .pill__bg { background: var(--testo); box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 8px 18px -10px rgba(21, 22, 26, .7); }
.pill.is-wait { color: #fff; }
.pill.is-wait .pill__bg { background: var(--accento); box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .9); transform: none; }
.pill.is-done { color: #fff; }
.pill.is-done .pill__bg { background: var(--accento); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 8px 18px -10px rgba(79, 70, 229, .9); }
.pill__face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .55em; white-space: nowrap; pointer-events: none; }
.pill__face[data-face="wait"], .pill__face[data-face="done"] { opacity: 0; }
.pill__txt { display: inline-block; font-stretch: 100%; transition: font-stretch .45s cubic-bezier(.34, 1.56, .64, 1); }
.pill .ico { color: var(--testo-3); transition: color .3s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.pill--ink .ico, .pill.is-done .ico { color: currentColor; }
@media (hover: hover) {
  .pill:hover .pill__txt { font-stretch: 110%; }
  .pill:hover .pill__bg { transform: scale(1.02, 1.07); background: var(--tinta); }
  .pill--ink:hover .pill__bg { background: #24252b; }
  .pill:hover .ico { color: var(--accento); transform: translateX(.12em); }
  .pill--ink:hover .ico { color: #fff; }
}
.pill.is-hover .pill__txt { font-stretch: 110%; }
.pill.is-hover .pill__bg { transform: scale(1.02, 1.07); background: var(--tinta); }
.pill.is-hover .ico { color: var(--accento); transform: translateX(.12em); }
.pill.is-wait .pill__bg, .pill.is-done .pill__bg { transform: none; }
.pill:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
.card.is-busy .pill:not(.is-chosen) { pointer-events: none; }

.or { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .7em; font-size: .7em; color: var(--testo-3); }
.or::before, .or::after { content: ""; height: 1px; background: var(--bordo); }
.or span { grid-column: 2; }
.or::after { grid-column: 3; }

.ico { width: 1.1em; height: 1.1em; display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico--tick { stroke-width: 2.1; }
.ico--tick path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.ring { width: 1.3em; height: 1.3em; display: block; }
.ring__track { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 2.2; }
.ring__arc { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: .28 .72; transform: rotate(-90deg); transform-origin: 10px 10px; }

/* sign out */
.undo { justify-self: center; height: 1.7em; margin-top: -.55em; padding: 0 .6em; font-size: .74em; color: var(--testo-3); font-weight: 560; border-radius: .5em; opacity: 0; }
@media (hover: hover) { .undo:hover { color: var(--testo); } }
.undo:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }

/* the account chooser */
.sheet {
  position: absolute; left: .55em; right: .55em; bottom: .55em; z-index: 4;
  padding: .85em .7em .6em;
  border-radius: 1em;
  background: #fff;
  box-shadow: 0 0 0 1px var(--bordo), 0 -10px 30px -12px rgba(var(--ombra), .28), 0 2px 6px -2px rgba(var(--ombra), .12);
  visibility: hidden;
}
.sheet__ask { font-size: .86em; font-weight: 650; text-align: center; }
.sheet__sub { font-size: .68em; color: var(--testo-3); text-align: center; margin: .15em 0 .6em; }
.accts { list-style: none; display: grid; gap: .2em; }
.acct {
  position: relative; width: 100%;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6em;
  padding: .45em .5em; border-radius: .75em;
  transition: background-color .25s ease;
}
@media (hover: hover) { .acct:hover { background: var(--tinta); } .acct:hover .chev { color: var(--testo-2); transform: translateX(.1em); } }
.acct.is-hover { background: var(--tinta); }
.acct.is-hover .chev { color: var(--testo-2); transform: translateX(.1em); }
.av { width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center; font-size: .8em; font-weight: 650; line-height: 1; }
.av span { display: block; }
.av--a { background: var(--accento); color: #fff; }
.av--b { background: #e9e8e4; color: var(--testo-2); }
.acct__txt { display: grid; min-width: 0; }
.acct__name { font-size: .78em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct__mail { font-size: .66em; color: var(--testo-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: .9em; height: .9em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--testo-3); transition: color .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.acct:focus-visible { outline: 2px solid var(--accento); outline-offset: 1px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
