:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #191919;
  background: #f4f4f4;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(0, 0, 0, 0.08), transparent 46%),
    #f4f4f4;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(100% - 32px, 480px);
  margin: 0 auto;
  padding: 56px 0 28px;
}

.card {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.1);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 25px 28px;
  border-bottom: 1px solid #e6e6e6;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: #f0f0f0;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.eyebrow {
  margin: 0 0 3px;
  color: #3f3f3f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 6vw, 30px);
  letter-spacing: -0.03em;
}

h2 {
  font-size: 20px;
  line-height: 1.3;
}

.view {
  padding: 28px;
}

.lead {
  color: #303030;
  font-size: 17px;
  line-height: 1.55;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
  font-size: 14px;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
  outline: none;
  color: #191919;
  background: #fff;
}

input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.28);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.primary {
  color: #fff;
  background: #111;
}

.primary:hover:not(:disabled) {
  background: #000;
}

.secondary {
  color: #252525;
  background: #ececec;
}

.secondary:hover:not(:disabled) {
  background: #e1e1e1;
}

#login-button {
  width: 100%;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 24px;
}

.signed-in {
  margin-bottom: 24px;
  padding: 11px 13px;
  border-radius: 10px;
  color: #3d3d3d;
  background: #f1f1f1;
  font-size: 13px;
}

.link-button {
  min-height: 0;
  margin-left: 5px;
  padding: 0;
  color: #202020;
  background: transparent;
  text-decoration: underline;
}

.permissions {
  display: grid;
  gap: 10px;
  margin: 16px 0 22px;
  padding: 0;
  list-style: none;
}

.permissions li {
  position: relative;
  padding: 12px 12px 12px 42px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  line-height: 1.4;
}

.permissions li::before {
  position: absolute;
  top: 11px;
  left: 13px;
  content: "✓";
  color: #111;
  font-weight: 900;
}

.fine-print {
  margin-top: 18px;
  color: #666;
  font-size: 12px;
  line-height: 1.55;
}

.error {
  padding: 10px 12px;
  border-radius: 9px;
  color: #862a2a;
  background: #fff0f0;
  font-size: 13px;
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 8px auto 16px;
  border: 4px solid #ddd;
  border-top-color: #111;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

#loading-view {
  text-align: center;
}

footer {
  display: flex;
  gap: 9px;
  justify-content: center;
  padding: 19px 0 0;
  color: #707070;
  font-size: 12px;
}

a {
  color: #303030;
}

a:hover {
  color: #000;
}

.policy-shell {
  width: min(100% - 32px, 760px);
}

.policy {
  padding: 30px 36px 38px;
}

.policy h2 {
  margin-top: 30px;
  margin-bottom: 10px;
}

.policy p,
.policy li {
  color: #3d3d3d;
  line-height: 1.65;
}

.policy ul {
  padding-left: 22px;
}

.policy-meta {
  color: #707070;
  font-size: 13px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .shell {
    width: 100%;
    padding: 0;
  }

  .card {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand,
  .view {
    padding-right: 22px;
    padding-left: 22px;
  }

  .policy {
    padding: 26px 22px 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s;
  }
}
