@font-face {
  font-family: "Inter Web";
  src: url("./Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07080a;
  --bg-2: #0e1013;
  --panel: #14171c;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef1f5;
  --subtle: #9aa2b1;
  --brand: #ff1d12;
  --c1: #ff2a3d;
  --c4: #12d0ff;
  --radius: 22px;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Inter Web", Inter, ui-sans-serif, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  letter-spacing: -.005em;
}
:focus-visible { outline: 2px solid var(--c4); outline-offset: 3px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1180px, calc(100% - 32px));
  min-height: 48px;
  margin: 16px auto 0;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 11, 14, .62);
}
.wordmark { border-radius: 8px; }
.nav img { display: block; height: 22px; width: auto; max-width: 100%; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 29rem);
  place-content: center;
  flex: 1;
  padding: 24px 16px;
}
.panel, dialog {
  padding: clamp(20px, 5vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  overflow-wrap: anywhere;
}
.panel:not(:has(> :not([hidden]))) { visibility: hidden; }

h1 {
  margin: 0;
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-wrap: balance;
}
p { margin: 0; color: var(--subtle); }
#signin-status { margin-bottom: 20px; }

form { display: grid; }
label { margin-bottom: 6px; color: var(--subtle); font-size: 14px; font-weight: 600; }
input {
  min-width: 0;
  width: 100%;
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}
button, .quiet {
  font: 600 15px/1.4 var(--font);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.primary {
  min-height: 44px;
  padding: 12px 20px;
  background: var(--brand);
  color: #08090b;
  box-shadow: 0 8px 30px -10px var(--brand);
  transition: transform .35s var(--ease-spring), box-shadow .3s;
}
.primary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 40px -12px var(--brand);
}
.primary:active:not(:disabled) { transform: scale(.97); }
.quiet {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  background: transparent;
  color: var(--subtle);
  text-decoration: none;
}
.quiet:hover:not(:disabled) { background: rgba(255, 255, 255, .06); color: var(--text); }
button:disabled { opacity: .6; cursor: wait; }
.links, .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.links { justify-content: center; }
.actions .primary { flex: 1; }

#user-email, #name { margin-top: 8px; }
#code { margin-top: 8px; font: 600 1.25rem/1.5 ui-monospace, monospace; letter-spacing: .12em; }
#licenses:not(:empty), #devices:not(:empty) { margin-top: 16px; }
.row, .mail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.detail { min-width: 0; }
strong { display: block; font-size: 16px; font-weight: 600; }

[aria-invalid="true"], .panel.invalid {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}
[aria-invalid="true"]:focus-visible { outline-color: var(--c4); border-color: var(--c1); }
.panel.shake { animation: shake .24s ease-out; }
@keyframes shake {
  25%, 75% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
}

#inbox-open { align-self: center; margin: 0 auto 16px; }
dialog { width: min(36rem, calc(100% - 32px)); max-height: 85vh; }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
.mail { display: grid; }
.mail a { color: var(--c4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .primary:hover:not(:disabled), .primary:active:not(:disabled) { transform: none; }
}
