:root {
  --ink: #0c1a24;
  --ink-soft: #3a4f5c;
  --muted: #6b7f8c;
  --line: rgba(12, 26, 36, 0.1);
  --paper: #f3f7f9;
  --paper-2: #e8f1f4;
  --white: #ffffff;
  --accent: #0e8a7d;
  --accent-deep: #07665c;
  --accent-soft: rgba(14, 138, 125, 0.12);
  --warn: #9a5b00;
  --warn-bg: #fff4e5;
  --danger: #b42318;
  --ok: #067647;
  --ok-bg: #e8f8ef;
  --shadow: 0 18px 50px rgba(12, 26, 36, 0.08);
  --radius: 18px;
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(14, 138, 125, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(36, 99, 140, 0.14), transparent 50%),
    linear-gradient(180deg, #eef5f7 0%, var(--paper) 40%, #f7fafb 100%);
  min-height: 100vh;
  line-height: 1.55;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(243, 247, 249, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), #1f6f8b);
  box-shadow: 0 8px 20px rgba(14, 138, 125, 0.35);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  border-left-color: transparent;
  transform: rotate(45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: white;
  box-shadow: 0 10px 28px rgba(14, 138, 125, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(14, 138, 125, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: white;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
  animation: rise 0.7s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.hero-kicker span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
  max-width: 14ch;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.progress-pill strong {
  color: var(--accent-deep);
}

.progress-bar {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: rgba(12, 26, 36, 0.08);
  overflow: hidden;
}

.progress-bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #1f6f8b);
  border-radius: inherit;
  animation: fillBar 1.1s ease both;
}

/* Flow strip */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 0 0 3.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: rise 0.8s ease 0.1s both;
}

.flow-item {
  text-align: center;
  padding: 0.75rem 0.5rem;
  position: relative;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.flow-item:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -0.55rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  opacity: 0.7;
}

/* Sections */
.section {
  padding: 0 0 3.5rem;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
}

/* Steps */
.steps {
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.35rem 1.4rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.65s ease both;
}

.step:nth-child(1) { animation-delay: 0.05s; }
.step:nth-child(2) { animation-delay: 0.1s; }
.step:nth-child(3) { animation-delay: 0.15s; }
.step:nth-child(4) { animation-delay: 0.2s; }
.step:nth-child(5) { animation-delay: 0.25s; }
.step:nth-child(6) { animation-delay: 0.3s; }

.step-num {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.step > div > p {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
}

.todo-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.todo-list li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--ink);
  font-size: 0.96rem;
}

.todo-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}

.note {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

.note.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 0.86rem;
  font-weight: 600;
}

.status-chip::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease infinite;
}

/* Highlight */
.highlight {
  margin-top: 1.5rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(14, 138, 125, 0.12), rgba(31, 111, 139, 0.1));
  border: 1px solid rgba(14, 138, 125, 0.2);
}

.highlight h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.highlight p {
  margin: 0;
  color: var(--ink-soft);
}

/* Checklist table */
.check-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.check-table th,
.check-table td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.check-table th {
  background: rgba(12, 26, 36, 0.03);
  font-weight: 600;
  color: var(--ink-soft);
}

.check-table tr:last-child td {
  border-bottom: 0;
}

/* Application page */
.page-hero {
  padding: 3.2rem 0 1.5rem;
  animation: rise 0.65s ease both;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.75rem;
  max-width: 16ch;
}

.page-hero p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 38rem;
  font-size: 1.05rem;
}

.form-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.25rem;
  padding-bottom: 4rem;
  align-items: start;
}

.form-panel,
.side-panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  animation: rise 0.7s ease 0.08s both;
}

.form-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.form-group-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.form-group-title span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
  margin-bottom: 1.4rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field label em {
  font-style: normal;
  color: var(--danger);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(12, 26, 36, 0.14);
  background: white;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field input.error,
.field textarea.error {
  border-color: var(--danger);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 3rem;
}

.toggle-pass {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.toggle-pass:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding-top: 0.4rem;
}

.form-actions .btn {
  min-width: 180px;
}

.security-note {
  display: grid;
  gap: 0.75rem;
}

.security-note h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.security-note p,
.security-note li {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.security-note ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
}

.side-panel .mini-steps {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.side-panel .mini-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.side-panel .mini-steps b {
  color: var(--ink);
}

.mini-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.alert {
  display: none;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 500;
}

.alert.show {
  display: block;
  animation: rise 0.35s ease both;
}

.alert.success {
  background: var(--ok-bg);
  color: var(--ok);
}

.alert.error {
  background: #fef3f2;
  color: var(--danger);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fillBar {
  from { width: 0; }
  to { width: 83%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

@media (max-width: 860px) {
  .flow {
    grid-template-columns: 1fr 1fr;
  }

  .flow-item:nth-child(2)::after {
    content: none;
  }

  .form-layout,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .nav-links a:not(.btn) {
    display: none;
  }
}

@media (max-width: 560px) {
  .flow {
    grid-template-columns: 1fr;
  }

  .flow-item::after {
    content: none !important;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }
}
