:root {
  --ink: #12212b;
  --paper: #f2f5f4;
  --surface: #ffffff;
  --accent: #0f7a6c;
  --accent-dark: #0b5f54;
  --accent-soft: #e6f2f0;
  --line: #dbe2e0;
  --muted: #62726f;
  --danger: #b3341f;
  --danger-soft: #fbecea;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(18, 33, 43, 0.06), 0 8px 24px rgba(18, 33, 43, 0.05);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

/* ---------- Layout ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark span {
  color: var(--accent);
}

.who {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.who strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- Landing ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
}

.hero-inner {
  max-width: 620px;
  text-align: center;
}

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 9vw, 68px);
  line-height: 1.05;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.rule {
  width: 56px;
  height: 2px;
  background: var(--accent);
  margin: 26px auto;
  border: 0;
}

.hero p {
  color: var(--muted);
  font-size: 16.5px;
  margin: 0 auto 34px;
  max-width: 460px;
}

.hero-steps {
  margin-top: 46px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  font-size: 12.5px;
  color: var(--muted);
}

.hero-steps span b {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 600;
  margin-right: 6px;
}

/* ---------- Steps rail ---------- */
.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  flex-wrap: wrap;
}

.steps li {
  flex: 1 1 120px;
  border-top: 2px solid var(--line);
  padding-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.steps li b {
  font-family: var(--mono);
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.steps li.active {
  border-top-color: var(--accent);
  color: var(--ink);
}

.steps li.active b {
  color: var(--accent);
}

.steps li.done {
  border-top-color: var(--accent);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card.narrow {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

h2.title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 4px;
}

p.subtitle {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 14px;
}

h3.section-title {
  font-size: 15px;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

h3.section-title b {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-note {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 14px;
}

/* ---------- Forms ---------- */
.field {
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

label .opt {
  font-weight: 400;
  color: var(--muted);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='date'],
input[type='file'],
select {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

input[type='file'] {
  padding: 8px;
  font-size: 13px;
  background: #fbfcfc;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

input[readonly] {
  background: #f4f6f6;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.08em;
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

/* ---------- Buttons ---------- */
button,
.btn {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 11px 20px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

button:hover,
.btn:hover {
  background: var(--accent-dark);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-lg {
  padding: 15px 42px;
  font-size: 16px;
}

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

.btn-ghost:hover {
  background: #f3f6f5;
  color: var(--ink);
}

.btn-small {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  font-size: 13.5px;
  text-decoration: underline;
}

.btn-link:hover {
  background: none;
  color: var(--accent-dark);
}

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

.btn-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

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

.actions .spacer {
  flex: 1;
}

/* ---------- Records ---------- */
.record {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  background: #fcfdfd;
}

.record-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.record-head span {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.empty {
  color: var(--muted);
  font-size: 13.5px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.file-state {
  font-size: 12.5px;
  margin-top: 6px;
  color: var(--muted);
}

.file-state.ok {
  color: var(--accent);
}

.file-state.err {
  color: var(--danger);
}

/* ---------- Messages ---------- */
.msg {
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
  display: none;
}

.msg.show {
  display: block;
}

.msg.error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #eccdc7;
}

.msg.ok {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid #c6e0dc;
}

/* ---------- Review ---------- */
.review-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.review-block:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.review-block h4 {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

dl.pairs {
  margin: 0;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

dl.pairs dt {
  color: var(--muted);
  font-size: 13px;
}

dl.pairs dd {
  margin: 0;
  word-break: break-word;
}

table.review {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.review th,
table.review td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.review th {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: #f8faf9;
}

.success {
  text-align: center;
  padding: 30px 10px;
}

.success .tick {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 26px;
  line-height: 54px;
  margin: 0 auto 16px;
}

.success h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 8px;
}

.success .ref {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 14px 0 20px;
}

.otp-input {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 0.5em;
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  dl.pairs {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  dl.pairs dd {
    margin-bottom: 10px;
  }

  .card {
    padding: 18px;
  }

  table.review {
    display: block;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Notice panel ---------- */
.notice {
  border: 1px solid #eccdc7;
  background: var(--danger-soft);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.notice h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--danger);
  font-weight: 600;
}

.notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}

.notice .ref {
  margin-top: 12px;
  color: var(--danger);
}
