/* Guide page styles */

.layout--guide-nav {
  max-width: min(100%, calc(56rem + 13rem + 2rem));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.guide-nav-shell {
  display: grid;
  grid-template-columns: minmax(11rem, 13rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.layout--guide-nav .guide-main {
  max-width: 56rem;
}

.flow-nav {
  position: sticky;
  top: 1rem;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(165deg, var(--surface) 0%, #292929 100%);
  box-shadow: var(--shadow);
}

.flow-nav a {
  text-decoration: none;
}

.flow-nav ol {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-nav li {
  margin: 0;
}

.flow-nav li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.55rem;
  padding: 0.5rem 0.72rem 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.flow-nav li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), rgba(51, 255, 167, 0.18));
  opacity: 0.9;
}

.flow-nav li a:hover,
.flow-nav li a:focus-visible {
  background: rgba(51, 255, 167, 0.08);
  border-color: rgba(51, 255, 167, 0.24);
  color: var(--accent);
}

.flow-nav span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 2rem;
  height: 1.7rem;
  padding: 0 0.38rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.flow-nav a:hover span,
.flow-nav a:focus-visible span {
  border-color: rgba(51, 255, 167, 0.34);
  background: #1f3d32;
  color: var(--accent);
}

.flow-nav a[aria-current="location"] {
  background: rgba(51, 255, 167, 0.1);
  border-color: rgba(51, 255, 167, 0.28);
  color: var(--accent);
}

.flow-nav a[aria-current="location"] span {
  border-color: rgba(51, 255, 167, 0.38);
  background: #1f3d32;
  color: var(--accent);
}

.guide-main {
  min-width: 0;
}

.faq {
  display: grid;
  gap: 0.6rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.15rem 0.25rem;
}

.faq-item > summary {
  cursor: pointer;
  padding: 0.75rem 0.85rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.45;
  list-style: none;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary::after {
  content: "▾";
  float: right;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.faq-item[open] > summary::after {
  transform: rotate(-180deg);
}

.faq-item__body {
  padding: 0 0.85rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.faq-item__body p {
  margin: 0;
}

.faq-item__body strong {
  color: var(--text);
  font-weight: 650;
}

.faq-item__body p + p {
  margin-top: 0.5rem;
}

.faq-item__media {
  margin: 0.75rem 0 0;
}

.faq-item__media .lightbox-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.faq-item__media .lightbox-trigger:hover,
.faq-item__media .lightbox-trigger:focus-visible {
  border-color: rgba(51, 255, 167, 0.3);
  box-shadow: 0 0 0 1px rgba(51, 255, 167, 0.14);
}

.faq-item__media img {
  display: block;
  width: 100%;
  height: auto;
}

.process-card {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 1rem;
}

.process-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #292929, #303030);
}

.process-card__step {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #1f3d32;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.process-card h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}

.process-card .eyebrow {
  margin-bottom: 0.12rem;
}

.process-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 1.05rem 1.1rem 1.15rem;
}

.copy-block p {
  margin: 0;
}

.copy-block p + p,
.copy-block .account-flow + p {
  margin-top: 0.85rem;
}

.account-flow {
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.account-flow li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(13rem, 0.8fr) minmax(18rem, 1.2fr);
  gap: 0.85rem;
  align-items: start;
  min-width: 0;
  padding: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.account-flow li::before {
  content: "";
  position: absolute;
  left: 0.82rem;
  top: 0.82rem;
  bottom: 0.82rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), rgba(51, 255, 167, 0.12));
}

.account-flow__copy {
  min-width: 0;
  padding-left: 1.15rem;
}

.account-flow h3 {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  margin: 0 0 0.28rem;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.35;
}

.account-flow h3::before {
  content: "";
  flex: 0 0 auto;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(51, 255, 167, 0.08);
}

.account-flow p {
  color: var(--text-muted);
}

.account-flow .account-flow__notice {
  display: block;
  border: 0;
  border-left: 4px solid var(--accent);
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.92rem;
  line-height: 1.6;
}

.account-flow .account-flow__notice::before {
  content: none;
}

.account-flow li.account-flow__notice p,
.account-flow li.account-flow__notice strong {
  margin: 0;
  color: var(--accent-strong);
}

.account-flow .account-flow__notice--warning {
  border-left-color: #ff8a5c;
  background: rgba(255, 138, 92, 0.12);
  color: #ffd9c9;
}

.account-flow li.account-flow__notice--warning p,
.account-flow li.account-flow__notice--warning strong {
  color: #ffe3d6;
}

.account-flow__media {
  min-width: 0;
  margin: 0;
}

.account-flow__media .lightbox-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.account-flow__media .lightbox-trigger:hover {
  border-color: rgba(51, 255, 167, 0.24);
  box-shadow: 0 0 0 1px rgba(51, 255, 167, 0.18), 0 10px 26px rgba(0, 0, 0, 0.22);
}

.account-flow__media img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

.account-flow__media--pair {
  display: grid;
  gap: 0.55rem;
}

.risk-note--info {
  border-left-color: rgba(51, 255, 167, 0.72);
  background: rgba(51, 255, 167, 0.08);
}

.risk-note {
  padding: 0.65rem 0.75rem;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.92rem;
  line-height: 1.6;
}

.risk-note--warning {
  border-left-color: #ff8a5c;
  background: rgba(255, 138, 92, 0.12);
  color: #ffd9c9;
}

.risk-note--warning strong {
  color: #ffe3d6;
}

.benefit-sheet {
  margin-top: 0.85rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.benefit-sheet h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.benefit-sheet p {
  color: var(--text-muted);
}

.benefit-sheet ul {
  margin: 0.7rem 0;
  padding-left: 1.1rem;
}

.benefit-sheet li + li {
  margin-top: 0.45rem;
}

.floating-actions {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: center;
}

.floating-action,
.back-to-top {
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid rgba(51, 255, 167, 0.28);
  border-radius: 999px;
  background: rgba(31, 61, 50, 0.94);
  color: var(--accent);
  font-size: 1.05rem;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.floating-action {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(46, 46, 46, 0.94);
}

.floating-action:hover,
.floating-action:focus-visible,
.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: rgba(51, 255, 167, 0.3);
}

.floating-action:hover,
.floating-action:focus-visible {
  color: var(--text);
  background: #323232;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: #2a5545;
  color: var(--accent-strong);
}

.floating-action:focus-visible,
.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.back-to-top {
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.4rem);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 8, 8, 0.82);
  cursor: pointer;
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: min(92vh, 900px);
  line-height: 0;
}

.lightbox__img {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: min(88vh, 860px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox__nav,
.lightbox__close {
  position: absolute;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(33, 33, 33, 0.75);
  color: #f8fafc;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.lightbox__close {
  top: 0.35rem;
  right: 0.35rem;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
}

.lightbox__nav--prev {
  left: 0.35rem;
}

.lightbox__nav--next {
  right: 0.35rem;
}

.lightbox__nav:hover,
.lightbox__close:hover {
  background: rgba(33, 33, 33, 0.92);
}

.lightbox__nav:focus-visible,
.lightbox__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  .guide-main {
    max-width: var(--max);
  }
}

@media (max-width: 900px) {
  .guide-nav-shell {
    grid-template-columns: 1fr;
  }

  .flow-nav {
    position: static;
  }

  .flow-nav ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .process-card__head,
  .process-card__body {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .account-flow li {
    grid-template-columns: 1fr;
  }

  .lightbox__nav {
    width: 2rem;
    height: 2rem;
  }
}
