:root {
  color-scheme: light;
  --page: #f7f5f0;
  --masthead: #f7f5f0;
  --card: #ffffff;
  --control: #ffffff;
  --text: #14181a;
  --body: #3e443e;
  --muted: #5a5f58;
  --label: #1f6b6b;
  --border: #e5dfd2;
  --border-strong: #cfc8b8;
  --accent: #1f6b6b;
  --accent-hover: #1a5c5c;
  --action-text: #ffffff;
  --focus: #1f6b6b;
  --shadow: 0 12px 32px rgba(20, 24, 26, 0.08);
  --font-display: "Source Serif 4", Georgia, serif;
  --font-sans: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #14181a;
  --masthead: #14181a;
  --card: #1c2526;
  --control: #1c2526;
  --text: #f7f5f0;
  --body: #c9d0cf;
  --muted: #a9b5b5;
  --label: #35a0a0;
  --border: #2b3535;
  --border-strong: #445050;
  --accent: #35a0a0;
  --accent-hover: #7bc0c0;
  --action-text: #14181a;
  --focus: #35a0a0;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 48px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  background: var(--masthead);
}

.brand {
  display: block;
  border-radius: 8px;
}

.brand:focus-visible,
.theme-toggle:focus-visible,
.action:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.brand-lockup {
  display: block;
  width: 228px;
  max-width: 64vw;
  height: auto;
}

.brand-lockup-dark,
:root[data-theme="dark"] .brand-lockup-light {
  display: none;
}

:root[data-theme="dark"] .brand-lockup-dark {
  display: block;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: var(--control);
  color: var(--text);
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-sun,
:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

main {
  display: flex;
  align-items: center;
  padding: 88px 0;
}

.recovery-card {
  position: relative;
  width: min(100%, 760px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 52px 56px 54px;
  box-shadow: var(--shadow);
}

.recovery-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
  content: "";
}

.label {
  margin: 0 0 20px;
  color: var(--label);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  max-width: 18ch;
  margin: 0 0 24px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.04;
}

.lede,
.next-step {
  max-width: 60ch;
  margin: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.7;
}

.next-step {
  margin-top: 20px;
  color: var(--text);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  background: var(--accent);
  color: var(--action-text);
  padding: 11px 22px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}

.action:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--border);
  padding: 20px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .page {
    padding: 18px 20px;
  }

  .masthead {
    min-height: 60px;
  }

  .brand-lockup {
    width: 184px;
  }

  main {
    align-items: flex-start;
    padding: 52px 0 64px;
  }

  .recovery-card {
    padding: 36px 28px 38px;
  }

  h1 {
    font-size: 42px;
  }

  .lede,
  .next-step {
    font-size: 16px;
  }

  .action {
    width: 100%;
  }

  footer {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
