:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #d9dde6;
  --text: #1f2532;
  --muted: #5a6473;
  --primary: #1f6feb;
  --primary-strong: #1752b8;
  --shadow: 0 0.875rem 2.8125rem rgba(31, 37, 50, 0.08), 0 0.3125rem 0.75rem rgba(31, 37, 50, 0.05);
}

@font-face {
  font-family: "Onboarding Sans";
  src: url("../fonts/onboarding-sans.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Onboarding Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: min(960px, 100%);
  padding: 2rem 2.25rem;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.title {
  font-size: 1.25rem;
  font-weight: 600;
}

.logo {
  width: 2rem;
  height: 2rem;
}

.alert {
  background: #e8f1ff;
  border: 1px solid #c8dafd;
  color: #0f2e6d;
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  margin-bottom: 1rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field--error label {
  color: #b3261e;
}

.field--error textarea,
.field--error input[type="password"] {
  border-color: #b3261e;
  box-shadow: 0 0 0 1px #b3261e33;
}

label {
  color: var(--muted);
  font-size: 0.875rem;
}

textarea,
input[type="password"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  background: #fbfcff;
}

textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  min-height: 11.25rem;
  resize: vertical;
}

input[type="password"] {
  font-family: "Onboarding Sans", "Segoe UI", system-ui, sans-serif;
}

.errors {
  color: #b3261e;
  margin: 0;
  padding-left: 1.125rem;
  font-size: 0.8125rem;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

button {
  appearance: none;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

button:hover {
  background: var(--primary-strong);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.thank-you {
  text-align: center;
  padding: 2.5rem 1rem;
}

.success-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.success-icon {
  width: 2rem;
  height: 2rem;
  color: #22c55e;
  flex-shrink: 0;
}

.headline {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.description {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 2rem;
}

.progress-area {
  display: flex;
  justify-content: center;
  margin: 0 0 1.5rem;
}

.progress-ring-container {
  position: relative;
  width: 140px;
  height: 140px;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1s linear;
}

.progress-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.timer-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.spinner-small {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  margin-top: 0.75rem;
  animation: spin 0.85s linear infinite;
}

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

.subtext {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0;
}

.timeout-message {
  margin-top: 2rem;
}

.timeout-text {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 1rem;
}

.timeout-message .btn {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms ease, transform 120ms ease;
}

.timeout-message .btn:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .card {
    padding: 1.5rem;
  }

  .actions {
    justify-content: stretch;
  }

  button {
    width: 100%;
  }
}
