/* ---------- design tokens ---------- */

:root {
  --ink: #1c2440;
  --ink-soft: #3c4566;
  --paper: #faf8f4;
  --paper-raised: #ffffff;
  --line: #e6e0d4;
  --line-soft: #f0ebe0;
  --gold: #a07d3d;
  --gold-soft: #f3e9d2;
  --success: #2f6b4f;
  --success-soft: #e7f1ec;
  --danger: #a4373a;
  --danger-soft: #fbeceb;
  --text: #24283a;
  --text-muted: #666c82;
  --text-faint: #9096a8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(28, 36, 64, 0.04), 0 12px 32px -16px rgba(28, 36, 64, 0.18);
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Georgia", ui-serif, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef0f8;
    --ink-soft: #c3c8dc;
    --paper: #12151f;
    --paper-raised: #1a1e2c;
    --line: #2b3044;
    --line-soft: #232838;
    --gold: #cdab6c;
    --gold-soft: #2c2716;
    --success: #7bc9a2;
    --success-soft: #16261f;
    --danger: #e8918f;
    --danger-soft: #2c1a1b;
    --text: #e7e9f2;
    --text-muted: #9aa0b8;
    --text-faint: #6c7288;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

a { color: inherit; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-right: auto;
}

.brand__mark { color: var(--gold); display: inline-flex; }
.brand__name em { font-style: normal; color: var(--gold); }

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-disabled {
  color: var(--text-faint);
  cursor: default;
  pointer-events: none;
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.net-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.net-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}
.net-status.is-online .net-status__dot { background: var(--success); }
.net-status.is-offline .net-status__dot { background: var(--danger); }

/* ---------- buttons ---------- */

.btn {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper-raised);
}
.btn--primary:hover:not(:disabled) { background: var(--ink-soft); }
.btn--primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn:has(.btn__hint) {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  line-height: 1.2;
}
.btn__hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-faint);
}
.btn--primary:disabled .btn__hint { color: var(--paper-raised); opacity: 0.55; }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover:not(:disabled) { border-color: var(--gold); }
.btn--ghost:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--text {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 0.85rem;
}
.btn--text:hover { color: var(--danger); }

/* ---------- hero ---------- */

.hero { padding: 84px 0 56px; }
.hero__inner { max-width: 700px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.2;
}

.hero__lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 56ch;
}

.hero__facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.hero__facts li { display: flex; align-items: center; gap: 8px; }
.hero__facts li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* ---------- proof panel ---------- */

.proof-section { padding-bottom: 64px; }

.panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 40px;
}

.panel__head h2 { font-size: 1.4rem; margin-bottom: 8px; }
.panel__head p { color: var(--text-muted); margin: 0 0 28px; max-width: 60ch; }

.steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  gap: 0;
  font-size: 0.8rem;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line-soft);
}
.step {
  padding: 0 0 12px;
  margin-right: 32px;
  position: relative;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.step::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: transparent;
}
.step.is-active { color: var(--ink); }
.step.is-active::after { background: var(--gold); }
.step.is-done { color: var(--success); }

/* ---------- dropzone ---------- */

.dropzone {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  background: var(--paper);
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--gold);
  background: var(--gold-soft);
  outline: none;
}
.dropzone.is-dragover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone__icon { color: var(--gold); margin-bottom: 14px; }

.dropzone__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 4px;
}
.dropzone__sub {
  color: var(--text-muted);
  margin: 0 0 16px;
  font-size: 0.92rem;
}
.dropzone__link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dropzone__privacy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- note field ---------- */

.note-field {
  margin: 0 0 28px;
  text-align: left;
}
.note-field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.note-field__optional {
  font-weight: 400;
  color: var(--text-faint);
}
.note-field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  resize: vertical;
  min-height: 44px;
  transition: border-color 0.15s ease;
}
.note-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.note-field__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 8px;
}
.note-field__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  max-width: 48ch;
}
.note-field__count {
  flex: none;
  font-size: 0.76rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- section labels (Proof Data / User Note) ---------- */

.section-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.section-label__sub {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- note preview (in Proof Preview stage) ---------- */

.note-preview {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: var(--paper);
}
.note-preview__quote {
  margin: 0 0 10px;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.note-preview__disclaimer {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- processing stage ---------- */

.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  margin-bottom: 20px;
}
.file-card__icon { font-size: 1.4rem; }
.file-card__info { flex: 1; min-width: 0; }
.file-card__name {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-card__meta {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
  margin-bottom: 14px;
}
.progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--ink));
  transition: width 0.2s ease;
}

.status-line {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.status-transmitted {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- banner ---------- */

.banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.banner--pending {
  color: var(--gold);
  background: var(--gold-soft);
}
.banner__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- preview card ---------- */

.preview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--paper);
}

.preview-card__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.preview-card__row:last-of-type { border-bottom: none; }
.preview-card__label {
  color: var(--text-muted);
  font-size: 0.86rem;
  flex: none;
}
.preview-card__value {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}
.preview-card__row--fingerprint { flex-direction: column; align-items: flex-start; gap: 6px; }
.preview-card__row--fingerprint .preview-card__value { text-align: left; }
.preview-card__value--mono {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}

.tech-details {
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}
.tech-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.tech-details summary:hover { color: var(--ink); }
.tech-details dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 14px 0 0;
  font-size: 0.84rem;
}
.tech-details dt { color: var(--text-faint); }
.tech-details dd { margin: 0; color: var(--ink-soft); }

.preview-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.error-line {
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-top: 20px;
}

/* ---------- privacy note ---------- */

.privacy-note {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 48px 0;
}
.privacy-note__inner { max-width: 620px; }
.privacy-note h3 { font-size: 1.1rem; }
.privacy-note p { color: var(--text-muted); margin: 0; }

/* ---------- how it works ---------- */

.how-it-works { padding: 64px 0 88px; }
.how-it-works h2 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 40px;
}

.hiw-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.hiw-grid li { text-align: left; }
.hiw-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-serif);
  font-weight: 600;
  margin-bottom: 14px;
}
.hiw-grid h3 { font-size: 1.02rem; margin-bottom: 6px; }
.hiw-grid p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.site-footer__inner {
  display: flex;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ---------- pricing page ---------- */

.pricing-hero { padding-bottom: 56px; }

.pricing-section { padding-bottom: 72px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}

.price-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 30px 20px 24px;
}

.price-card__name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.price-card__amount {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.price-card__credits {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 2px 0 0;
}
.price-card__unit {
  color: var(--text-faint);
  font-size: 0.76rem;
  margin: 2px 0 20px;
}
.price-card__cta {
  width: 100%;
  margin-top: auto;
  font-size: 0.86rem;
}

.pricing-note {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
  margin: 28px 0 0;
}

/* ---------- verify page ---------- */

.verify-hero { padding-bottom: 48px; }

.verify-panel { text-align: left; }

.verify-panel label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.verify-text-input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: border-color 0.15s ease;
}
.verify-text-input:focus {
  outline: none;
  border-color: var(--gold);
}

.verify-input-hint {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: 0 0 20px;
}
.verify-input-hint.is-valid { color: var(--success); }
.verify-input-hint.is-invalid { color: var(--text-faint); }

.verify-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.verify-states-note {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.84rem;
  color: var(--text-faint);
}
.verify-states-note p { margin: 0 0 10px; }
.verify-states-note ul {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  gap: 24px;
}
.verify-states-note li { margin-bottom: 6px; }

/* ---------- auth modal ---------- */

.transmitted-data {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
}

.transmitted-data summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.transmitted-data p {
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.transmitted-data pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font: 0.78rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tech-details dd {
  overflow-wrap: anywhere;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 21, 33, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.modal-overlay[hidden] {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .modal-overlay { background: rgba(4, 5, 10, 0.65); }
}

.modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 36px 32px 28px;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  border-radius: 999px;
}
.modal__close:hover { color: var(--ink); background: var(--paper); }

.tab-row {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 0 0 12px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.auth-heading {
  font-size: 1.25rem;
  margin-bottom: 4px;
}
.auth-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.auth-form input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  transition: border-color 0.15s ease;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--gold);
}

.auth-form__password-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.auth-form__forgot {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
}
.auth-form__forgot:hover { color: var(--gold); }

.auth-submit { width: 100%; margin-top: 6px; }

.auth-message {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.auth-message.is-error { color: var(--danger, #b42318); }

.auth-page-panel {
  max-width: 520px;
  margin: 40px auto;
}

.auth-switch {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 18px 0 0;
}
.auth-switch button {
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  padding: 0 0 0 4px;
}
.auth-switch button:hover { text-decoration: underline; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--text-faint);
  font-size: 0.76rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.auth-zki {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-faint);
  margin: 0;
}
.auth-zki em { font-style: normal; color: var(--gold); }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .site-nav { display: none; }
  .panel { padding: 26px; }
  .hiw-grid { grid-template-columns: 1fr; }
  .preview-card__row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .preview-card__value { text-align: left; }
}
