:root {
  color-scheme: light dark;
  --page: #f6f6f8;
  --surface: #fffdfb;
  --surface-muted: #eeeef1;
  --text: #17181b;
  --muted: #64656d;
  --line: rgba(23, 24, 27, 0.14);
  --accent: #d9432d;
  --accent-soft: #fcede9;
  --button: #202024;
  --button-text: #fffdfb;
  --danger: #b42318;
  --success: #24734b;
  --focus: rgba(217, 67, 45, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 5%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 31rem),
    var(--page);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.016;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--button);
  color: var(--button-text);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.brand-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(36px, 8vh, 78px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand img {
  border-radius: 11px;
}

.support-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-underline-offset: 4px;
}

.reset-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 28px 80px rgba(57, 40, 35, 0.1);
}

.status-mark {
  width: 46px;
  height: 46px;
  margin-bottom: 30px;
  border-radius: 16px;
  background: var(--accent-soft);
}

.status-mark span {
  display: block;
  width: 12px;
  height: 12px;
  margin: 17px;
  border: 3px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
}

.status-mark.ready span {
  position: relative;
  width: 14px;
  height: 14px;
  margin: 12px 0 0 12px;
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.status-mark.ready span::after {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 8px 4px 0 -1px var(--accent);
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.status-mark.success span {
  width: 17px;
  height: 10px;
  margin: 15px 14px;
  border: 0;
  border-bottom: 3px solid var(--success);
  border-left: 3px solid var(--success);
  border-radius: 0;
  transform: rotate(-45deg);
}

.status-mark.failure span {
  position: relative;
  width: 18px;
  height: 18px;
  margin: 14px;
  border: 0;
}

.status-mark.failure span::before,
.status-mark.failure span::after {
  position: absolute;
  top: 8px;
  left: 0;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--danger);
  content: "";
}

.status-mark.failure span::before {
  transform: rotate(45deg);
}

.status-mark.failure span::after {
  transform: rotate(-45deg);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(34px, 7vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.lede {
  max-width: 48ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  text-wrap: pretty;
}

.progress-line {
  height: 3px;
  margin-top: 34px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-muted);
}

.progress-line span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

form {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.field-group {
  display: grid;
  gap: 8px;
}

label {
  font-size: 14px;
  font-weight: 720;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

.requirements {
  display: grid;
  gap: 8px;
  margin: -2px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  list-style: none;
}

.requirements li::before {
  display: inline-block;
  width: 18px;
  content: "○";
}

.requirements li.met {
  color: var(--success);
}

.requirements li.met::before {
  content: "✓";
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 740;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.primary-action {
  width: 100%;
  border: 1px solid var(--button);
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
}

.primary-action:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--button) 88%, var(--accent));
  transform: translateY(-1px);
}

.primary-action:active,
.secondary-action:active {
  transform: translateY(1px) scale(0.99);
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
.support-link:focus-visible,
.brand:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.primary-action[disabled] {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button-progress {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
}

.primary-action.is-loading .button-label {
  margin-right: 10px;
}

.primary-action.is-loading .button-progress {
  display: block;
}

.link-action {
  margin-top: 30px;
}

.secondary-action {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.secondary-action:hover {
  background: var(--surface-muted);
}

.noscript-notice {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

footer {
  padding: 22px 12px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .status-mark span,
  .button-progress {
    animation: spin 900ms linear infinite;
  }

  .status-mark.ready span,
  .status-mark.success span,
  .status-mark.failure span {
    animation: none;
  }

  .progress-line span {
    animation: progress 1.2s ease-in-out infinite alternate;
  }
}

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

@keyframes progress {
  from { transform: translateX(-40%); }
  to { transform: translateX(190%); }
}

@media (max-width: 520px) {
  .reset-shell {
    width: min(100% - 24px, 680px);
    padding-top: 14px;
  }

  .brand-row {
    margin-bottom: 22px;
  }

  .reset-panel {
    border-radius: 20px;
  }

  h1 {
    font-size: 36px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111214;
    --surface: #1f2024;
    --surface-muted: #2a2b30;
    --text: #f4f4f6;
    --muted: #b3b4bd;
    --line: rgba(244, 244, 246, 0.14);
    --accent: #ff745f;
    --accent-soft: #36211e;
    --button: #f4f4f6;
    --button-text: #17181b;
    --danger: #ff9d90;
    --success: #7ed7a9;
    --focus: rgba(255, 116, 95, 0.34);
  }

  .reset-panel {
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
  }
}
