@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plex-mono-400.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #090909;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: #262626;
  --border-strong: #3a3a3a;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --primary: #ffffff;
  --primary-text: #090909;
  --error: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --radius: 6px;
  --radius-lg: 12px;
  --font: "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
a:hover { text-decoration-color: var(--text); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.site-header {
  padding: 28px 16px 8px;
  display: flex;
  justify-content: center;
}

.wordmark { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

main {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.card.center { text-align: center; padding: 48px 32px; }

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-error { color: var(--error); }

h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }

.lead { margin: 0 0 24px; color: var(--muted); font-size: 17px; }
.lead strong { color: var(--text); font-weight: 600; }
.muted { color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 24px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
  margin-top: 1px;
}
.step-body { min-width: 0; flex: 1; }
.step-body p { margin: 0 0 12px; overflow-wrap: anywhere; }
.step-body strong { font-weight: 600; }
.step-body img {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
}

label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }

.field-row { display: flex; gap: 8px; }

input[type="password"], input[type="text"], input[type="date"] {
  width: 100%;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 12px;
  font: inherit;
  font-size: 15px;
}
input[type="password"] { font-family: var(--mono); letter-spacing: 0.04em; }
input:focus { border-color: var(--text); outline: none; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.6; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover:not(:disabled) { opacity: 0.88; }
.btn-large { width: 100%; padding: 14px 20px; font-size: 16px; margin: 4px 0 12px; }

.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--muted); font: inherit; font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { color: var(--text); }

.error { color: var(--error); font-size: 14px; margin: 10px 0 0; }

.notice {
  border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent);
  background: color-mix(in srgb, var(--warning) 8%, transparent);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
}

.privacy {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 24px 0 0; padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.privacy svg { flex: none; margin-top: 2px; }

fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.legend-row { display: flex; justify-content: space-between; align-items: baseline; }
.legend-row legend { float: left; }

.type-list {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.type-item {
  display: flex; align-items: center; gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-weight: 500;
  cursor: pointer;
}
.type-item:has(input:checked) { border-color: var(--border-strong); }
.type-item .count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; flex: none; }

.switch-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-weight: 500; margin: -8px 0 24px; cursor: pointer;
}
.switch-row input { margin-top: 4px; }

.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.date-row label { font-weight: 500; color: var(--muted); font-size: 13px; margin: 0; }
.date-row input { margin-top: 6px; }

.summary-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.summary-bar p { margin: 0; color: var(--muted); font-size: 14px; }
.summary-bar p strong { color: var(--text); font-size: 16px; }

.spinner {
  width: 36px; height: 36px; margin: 0 auto 20px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress {
  height: 8px; margin: 12px 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.progress.indeterminate .progress-fill {
  width: 30%;
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.progress-text { font-variant-numeric: tabular-nums; margin: 0 0 20px; }

.done-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  margin-bottom: 16px;
}

.next { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.next ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--text); }

.wordmark-link { color: var(--text); text-decoration: none; }

.prose h1 { margin-bottom: 12px; }
.prose h2 { font-size: 18px; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--muted); }
.prose p a, .prose li a { color: var(--text); }
.prose ul { padding-left: 20px; display: grid; gap: 6px; margin: 0 0 16px; }
.prose .btn { margin-top: 12px; }
.small { font-size: 13px; }
.data-list { margin: 0 0 16px; display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.data-list > div { padding: 14px 16px; border-top: 1px solid var(--border); }
.data-list > div:first-child { border-top: 0; }
.data-list dt { font-weight: 600; margin-bottom: 4px; }
.data-list dd { margin: 0; color: var(--muted); font-size: 15px; }
.privacy a { color: var(--text); }

@media (max-width: 520px) {
  .card { padding: 24px 20px; }
  .card.center { padding: 40px 20px; }
  h1 { font-size: 24px; }
  h2 { font-size: 21px; }
  .lead { font-size: 16px; }
  .field-row { flex-direction: column; }
  .summary-bar { flex-direction: column; align-items: stretch; }
  .summary-bar .btn { width: 100%; }
  .type-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner, .progress.indeterminate .progress-fill { animation-duration: 3s; }
  .progress-fill { transition: none; }
}
