/* ─── Design tokens ──────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg:           #f5f0e8;
  --bg-deep:      #ede7db;
  --panel:        #fffcf7;
  --ink:          #1d1a15;
  --ink-muted:    #6b5f52;
  --ink-faint:    #a0948a;
  --line:         #ddd3c5;
  --line-faint:   #ece7df;
  --accent:       #b84f32;
  --accent-hover: #913d27;
  --accent-light: rgba(184, 79, 50, 0.10);
  --success:      #1d6a3a;
  --success-bg:   #edf7f0;
  --success-line: #b7d9c2;
  --danger:       #8f1d1d;
  --danger-bg:    #fbeaea;
  --danger-line:  #e8bcbc;
  --radius-sm:    10px;
  --radius-md:    18px;
  --radius-lg:    28px;
  --shadow-sm:    0 2px 8px rgba(50,35,20,0.07);
  --shadow-md:    0 8px 32px rgba(50,35,20,0.10);
  --shadow-lg:    0 20px 60px rgba(50,35,20,0.13);
  --transition:   0.18s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Base ───────────────────────────────────────────────────────── */
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.page--wide {
  max-width: 1100px;
}

/* ─── Nav ────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.nav-logo {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ─── Panel ──────────────────────────────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 0 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  border: 1px solid rgba(184,79,50,0.22);
  color: var(--accent);
  font-size: 0.78rem;
  font-family: 'Georgia', serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--ink);
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--ink-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(184,79,50,0.30);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(184,79,50,0.40);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: var(--bg-deep);
  border-color: var(--ink-faint);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ─── Features grid ──────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 48px 0;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-body {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ─── How it works ───────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 48px 0;
}

.step {
  text-align: center;
  padding: 24px 16px;
}

.step-number {
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-body {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ─── Divider ────────────────────────────────────────────────────── */
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ─── Section headings ───────────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-body {
  color: var(--ink-muted);
  font-size: 1rem;
  max-width: 520px;
}

/* ─── Meta table (sign page) ─────────────────────────────────────── */
.meta {
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 28px 0;
  background: var(--bg);
}

.meta-row {
  display: flex;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-faint);
  align-items: flex-start;
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-label {
  flex: 0 0 140px;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}

.meta-value {
  flex: 1;
  font-size: 0.93rem;
  word-break: break-all;
  color: var(--ink);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.status-pending {
  background: #fff7e6;
  color: #7a5200;
  border: 1px solid #f0d9a0;
}

.status-signed {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-line);
}

.status-expired {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-line);
}

/* ─── Form ───────────────────────────────────────────────────────── */
.form {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

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

.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.consent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1.5px solid var(--line-faint);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.consent-text {
  font-size: 0.87rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ─── Notices ────────────────────────────────────────────────────── */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.notice svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  margin-top: 2px;
}

.notice-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-line);
}

.notice-error svg { stroke: var(--danger); }

.notice-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-line);
}

.notice-success svg { stroke: var(--success); }

.notice-info {
  background: #eef4ff;
  color: #1a3a8a;
  border: 1px solid #b8ccf4;
}

.notice-info svg { stroke: #1a3a8a; }

/* ─── Page header (sign page) ────────────────────────────────────── */
.page-header {
  margin-bottom: 32px;
}

.page-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.page-title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.page-subtitle {
  color: var(--ink-muted);
  font-size: 0.97rem;
}

/* ─── Links area ─────────────────────────────────────────────────── */
.actions-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.82rem;
  padding-top: 40px;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .panel {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

  .meta-row {
    flex-direction: column;
    gap: 4px;
  }

  .meta-label {
    flex: unset;
  }
}
