/* Loaded on the landing page and on every guide: site nav + the unlock card. */

.sim-nav,
.sim-nav *,
#sim-gate,
#sim-gate * {
  box-sizing: border-box;
}

/* ---------- Nav ---------- */

/* The host element is the sticky one: it is a direct child of <body>. */
#sim-nav {
  position: sticky;
  top: 0;
  z-index: 10002;
}

.sim-nav {
  position: relative;
  background: rgba(253, 251, 246, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.08);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1;
}

.sim-nav__inner {
  max-width: 1120px;
  height: 60px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sim-nav__brand {
  margin-right: auto;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1e293b;
  text-decoration: none;
}

.sim-nav__brand span {
  color: #a79277;
}

.sim-nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-right: 10px;
}

.sim-nav__links a {
  font-size: 14.5px;
  font-weight: 500;
  color: #434c5e;
  text-decoration: none;
  transition: color 0.15s ease;
}

.sim-nav__links a:hover {
  color: #1e293b;
}

.sim-nav__cta {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #1e293b;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.sim-nav__cta:hover {
  background: #0f172a;
}

.sim-nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-right: -8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sim-nav__toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  border-radius: 2px;
  background: #1e293b;
  transition: transform 0.2s ease;
}

.sim-nav.is-open .sim-nav__toggle span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.sim-nav.is-open .sim-nav__toggle span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.sim-nav a:focus-visible,
.sim-nav button:focus-visible {
  outline: 2px solid #547a95;
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .sim-nav__inner {
    height: 56px;
  }

  .sim-nav__toggle {
    display: inline-flex;
  }

  .sim-nav__cta {
    height: 36px;
    padding: 0 15px;
    font-size: 13.5px;
  }

  .sim-nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px 20px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fdfbf6;
    border-bottom: 1px solid rgba(30, 41, 59, 0.1);
    box-shadow: 0 18px 30px -18px rgba(30, 41, 59, 0.25);
  }

  .sim-nav.is-open .sim-nav__links {
    display: flex;
  }

  .sim-nav__links a {
    padding: 15px 0;
    font-size: 16px;
    color: #1e293b;
    border-top: 1px solid rgba(30, 41, 59, 0.08);
  }

  .sim-nav__links a:first-child {
    border-top: 0;
  }
}

/* ---------- Guide preview ---------- */

.sim-locked .sim-gate-fade {
  max-height: 260px;
  overflow: hidden;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.8) 34%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.8) 34%, transparent 92%);
}

.sim-locked .sim-gate-rest {
  display: none !important;
}

.sim-gate-resume {
  scroll-margin-top: 84px;
}

/* ---------- Unlock card ---------- */

#sim-gate {
  position: relative;
  z-index: 10000;
  width: 100%;
  max-width: 520px;
  margin: -56px auto 64px;
  padding: 30px 28px 22px;
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(30, 41, 59, 0.05), 0 28px 60px -24px rgba(30, 41, 59, 0.32);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: #1e293b;
  text-align: left;
  animation: sim-gate-rise 0.5s ease-out both;
}

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

#sim-gate .sim-gate__eyebrow {
  margin: 0;
  font-family: "Kalam", "Caveat", cursive;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: #7a6650;
}

#sim-gate .sim-gate__title {
  margin: 6px 0 8px;
  padding: 0;
  border: 0;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.018em;
  color: #1e293b;
  text-wrap: balance;
  text-align: left;
}

#sim-gate .sim-gate__lede {
  margin: 0 0 20px;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.5;
  color: #434c5e;
}

#sim-gate .sim-gate__steps {
  border: 1px solid rgba(30, 41, 59, 0.1);
  border-radius: 16px;
  background: #fdfbf6;
  overflow: hidden;
}

#sim-gate .sim-gate__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-top: 1px solid rgba(30, 41, 59, 0.08);
  transition: background 0.2s ease;
}

#sim-gate .sim-gate__row:first-child {
  border-top: 0;
}

#sim-gate .sim-gate__row.is-missing {
  background: rgba(167, 146, 119, 0.16);
}

#sim-gate .sim-gate__tick {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0;
}

#sim-gate .sim-gate__tick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

#sim-gate .sim-gate__tick span {
  position: absolute;
  inset: 1px;
  border: 1.5px solid rgba(30, 41, 59, 0.3);
  border-radius: 50%;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#sim-gate .sim-gate__tick span::after {
  content: "";
  position: absolute;
  left: 8.5px;
  top: 4.5px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

#sim-gate .sim-gate__tick input:checked + span {
  background: #45657c;
  border-color: #45657c;
}

#sim-gate .sim-gate__tick input:checked + span::after {
  transform: rotate(45deg) scale(1);
}

#sim-gate .sim-gate__tick input:focus-visible + span {
  outline: 2px solid #547a95;
  outline-offset: 2px;
}

#sim-gate .sim-gate__what {
  flex: 1;
  min-width: 0;
}

#sim-gate .sim-gate__what strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e293b;
}

#sim-gate .sim-gate__what span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.3;
  color: #667085;
}

#sim-gate .sim-gate__go {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(30, 41, 59, 0.2);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#sim-gate .sim-gate__go:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

#sim-gate .sim-gate__row.is-done .sim-gate__go {
  border-color: rgba(69, 101, 124, 0.35);
  background: rgba(69, 101, 124, 0.1);
  color: #45657c;
}

#sim-gate .sim-gate__row.is-checking .sim-gate__go {
  gap: 8px;
  pointer-events: none;
  color: #667085;
}

#sim-gate .sim-gate__row.is-checking .sim-gate__go::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(30, 41, 59, 0.2);
  border-top-color: #45657c;
  border-radius: 50%;
  animation: sim-gate-spin 0.7s linear infinite;
}

@keyframes sim-gate-spin {
  to {
    transform: rotate(360deg);
  }
}

#sim-gate .sim-gate__row--email {
  display: block;
  padding: 14px;
  transition: opacity 0.2s ease;
}

#sim-gate .sim-gate__row--email.is-waiting {
  opacity: 0.55;
}

#sim-gate .sim-gate__email:disabled {
  background: #f4f1ea;
  cursor: not-allowed;
}

#sim-gate .sim-gate__label {
  display: block;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #434c5e;
}

#sim-gate .sim-gate__email {
  display: block;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(30, 41, 59, 0.2);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.2;
  color: #1e293b;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#sim-gate .sim-gate__email::placeholder {
  color: #98a2b3;
}

#sim-gate .sim-gate__email:focus {
  border-color: #45657c;
  box-shadow: 0 0 0 3px rgba(84, 122, 149, 0.22);
}

#sim-gate .sim-gate__submit {
  display: block;
  width: 100%;
  height: 52px;
  margin: 16px 0 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: #1e293b;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

#sim-gate .sim-gate__submit:hover {
  background: #0f172a;
}

#sim-gate .sim-gate__submit:active {
  transform: scale(0.99);
}

#sim-gate .sim-gate__submit:disabled {
  opacity: 0.72;
  cursor: progress;
}

#sim-gate .sim-gate__go:focus-visible,
#sim-gate .sim-gate__submit:focus-visible {
  outline: 2px solid #547a95;
  outline-offset: 3px;
}

#sim-gate .sim-gate__status {
  min-height: 21px;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #7a4b2a;
  text-align: center;
}

#sim-gate .sim-gate__status.is-ok {
  color: #2f6b4f;
  font-weight: 600;
}

#sim-gate .sim-gate__fine {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #667085;
  text-align: center;
}

#sim-gate.is-open {
  animation: sim-gate-leave 0.45s ease-in 0.75s both;
}

@keyframes sim-gate-leave {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 480px) {
  #sim-gate {
    margin-top: -48px;
    padding: 24px 18px 18px;
    border-radius: 20px;
  }

  #sim-gate .sim-gate__title {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sim-gate,
  #sim-gate.is-open {
    animation: none;
  }
}

@media print {
  .sim-nav,
  #sim-gate {
    display: none !important;
  }
}
