:root {
  --green-primary: #1f8a3e;
  --green-deep: #146c2f;
  --green-soft: #d5ecdb;
  --petroleum: #062b4f;
  --petroleum-mid: #0b4563;
  --teal: #0b8a8f;
  --turquoise: #12b7a6;
  --amber: #d9a21b;
  --error: #c0392b;
  --bg: #f2f4f5;
  --surface: #ffffff;
  --text: #102338;
  --muted: #5a6b7a;
  --line: #d7e4e2;
  --focus: rgba(31, 138, 62, 0.18);
  --radius-btn: 10px;
  --radius-tile: 12px;
  --font: "Poppins", sans-serif;
  --header-h: 64px;
  --max: 1120px;
  --z-header: 20;
  --z-nav: 30;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button,
.btn {
  font-family: inherit;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 40;
  padding: 8px 12px;
  background: var(--petroleum);
  color: #fff;
  border-radius: var(--radius-btn);
}

.skip:focus {
  top: 12px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.icon-hero {
  width: 48px;
  height: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
.profile-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--green-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-deep);
}

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

.btn-ghost:hover {
  background: var(--surface);
}

.hero {
  padding: 36px 0 56px;
}

.hero-compact {
  padding: 28px 0 8px;
}

.hero-compact h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--petroleum);
}

.hero-compact .hero-lead {
  margin: 0;
  max-width: 42ch;
}

.hero-grid {
  display: grid;
  gap: 36px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3.35rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--petroleum);
}

.hero-lead {
  margin: 0 0 22px;
  max-width: 42ch;
  font-size: 1.02rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cycle-panel {
  position: relative;
  min-height: 320px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background:
    radial-gradient(circle at 80% 10%, rgba(18, 183, 166, 0.12), transparent 34%),
    linear-gradient(180deg, #fff, #f7fbf8);
  overflow: hidden;
}

.cycle-svg {
  width: 100%;
  height: auto;
}

.cycle-caption {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.problem {
  padding: 8px 0 72px;
}

.problem-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.problem-item {
  display: grid;
  gap: 8px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.problem-item h2,
.section-title,
.profiles h2,
.flow h2,
.legal h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--petroleum);
  letter-spacing: -0.02em;
}

.problem-item p,
.flow p,
.legal p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.profiles {
  padding: 0 0 80px;
}

.profiles h2,
.flow h2,
.legal h2 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.section-lead {
  margin: 0 0 28px;
  max-width: 58ch;
  color: var(--muted);
}

.save-status {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-tile);
  background: var(--green-soft);
  color: var(--petroleum);
  font-weight: 500;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.profile-card:hover {
  border-color: #b8d2c8;
}

.profile-card.is-selected {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px var(--focus);
}

.profile-icon {
  width: 48px;
  height: 48px;
  color: var(--green-primary);
}

.profile-code {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-card h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.card-hint {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-deep);
}

.profile-dialog {
  width: min(480px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background: var(--surface);
  color: var(--text);
}

.profile-dialog::backdrop {
  background: rgba(6, 43, 79, 0.45);
}

.profile-dialog h2 {
  margin: 6px 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--petroleum);
}

.profile-dialog p {
  margin: 0;
  color: var(--muted);
}

.dialog-status {
  margin-top: 12px;
  color: var(--green-deep);
  font-weight: 600;
}

.dialog-status.is-error {
  color: var(--error);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.flow {
  padding: 0 0 80px;
}

.timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--line);
  margin-left: 10px;
  padding-left: 22px;
}

.step {
  position: relative;
  padding: 0 0 28px;
}

.step:last-child {
  padding-bottom: 0;
}

.step::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-primary);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.legal {
  padding: 0 0 72px;
}

.legal-box {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background: var(--surface);
}

.legal-meta {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.cta-band {
  padding: 0 0 80px;
}

.cta-inner {
  display: grid;
  gap: 16px;
  padding: 28px 24px;
  border-radius: var(--radius-tile);
  background: var(--green-soft);
}

.cta-inner h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--petroleum);
}

.cta-inner p {
  margin: 0;
  color: var(--petroleum-mid);
  max-width: 52ch;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 32px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: grid;
  gap: 8px;
}

.footer-inner a {
  color: var(--petroleum-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: none;
  max-width: min(360px, calc(100% - 32px));
  padding: 14px 16px;
  border-radius: var(--radius-tile);
  background: var(--petroleum);
  color: #eef3f6;
  box-shadow: 0 12px 32px rgba(16, 35, 56, 0.18);
}

.toast.is-visible {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .profile-card {
    transition: none;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 40px 0 72px;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 48px;
  }

  .problem-list {
    grid-template-columns: 1fr 1fr;
    gap: 0 48px;
  }

  .problem-item {
    padding: 28px 0;
  }

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

  .legal-box {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }

  .cta-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 32px 36px;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .wrap {
    width: min(var(--max), calc(100% - 64px));
  }

  .profile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.is-interview .hero,
body.is-interview .profiles {
  display: none;
}

.interview {
  padding: 28px 0 64px;
}

.wizard {
  max-width: 720px;
}

.change-profile,
.resume-interview {
  margin-bottom: 16px;
}

.step-label {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.progress {
  height: 6px;
  margin: 12px 0 22px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: var(--green-primary);
}

.wizard fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.wizard legend {
  margin-bottom: 14px;
  font-size: 1.2rem;
  font-weight: 600;
}

.field {
  display: block;
  margin: 0 0 14px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field select:disabled {
  color: var(--muted);
  background: var(--bg);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--focus);
  border-color: var(--green-primary);
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.req {
  color: var(--error);
  font-weight: 600;
  margin-left: 0.15em;
}

.req-note {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

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

.field.is-invalid .field-hint {
  color: var(--error);
}

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

.iti__tel-input,
.iti input[type="tel"] {
  width: 100%;
  min-height: 44px;
  padding-left: 52px;
}

.iti__selected-country,
.iti__selected-flag {
  min-height: 44px;
}

.iti__selected-country-primary {
  padding-left: 8px;
  padding-right: 4px;
}

.iti__country-list {
  z-index: 40;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 44px;
  margin: 12px 0;
  font-weight: 400;
}

.check input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.check.is-invalid span {
  color: var(--error);
}

.consent-copy {
  color: var(--muted);
  line-height: 1.5;
}

.form-error {
  color: var(--error);
  margin: 0 0 12px;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tracking {
  margin: 12px 0 18px;
  color: var(--green-deep);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.validation-qr-box {
  margin: 0 0 18px;
}

.validation-qr {
  display: block;
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.letter-status {
  color: var(--green-deep);
  font-weight: 500;
}

.letter,
.stats {
  max-width: 800px;
  padding: 32px 0 64px;
}

.letter p,
.stats p {
  line-height: 1.5;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 20px 0 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  padding: 16px;
}

.stat-card p {
  margin: 0 0 6px;
  color: var(--muted);
}

.stat-card strong {
  color: var(--green-deep);
  font-size: 1.5rem;
}

.stat-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  margin: 0 0 28px;
}

.stat-table th,
.stat-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.stats h2 {
  font-size: 1.15rem;
}

@media (min-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media print {
  .print-letter {
    display: none;
  }
}
