/* ── Passphrases page ── */

.passphrase-band {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 360px;
  background: linear-gradient(135deg, #6BBF59 0%, #A8E6CF 38%, #5B9FD6 72%, #FFD166 100%);
  pointer-events: none;
  z-index: 0;
}
.passphrase-band::after {
  content: '';
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -2px;
  height: 86px;
  background: var(--bg);
  border-radius: 50% 50% 0 0;
}

.passphrase-stage {
  min-height: calc(100svh - 6rem);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(22rem, 1.15fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 4rem);
  padding: 2rem 0 4rem;
}
.passphrase-copy {
  color: var(--text-primary);
}
.passphrase-kicker {
  color: #6BBF59;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.passphrase-example {
  display: inline-flex;
  margin-top: 1.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: 2px dashed rgba(107, 191, 89, 0.28);
  background: var(--bg-surface-alt);
  color: #6BBF59;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px var(--shadow-base);
}

.passphrase-tool {
  width: 100%;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 2rem;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: 0 10px 44px var(--shadow-base);
}
.passphrase-tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.passphrase-badge {
  flex-shrink: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 2px solid rgba(107, 191, 89, 0.18);
  background: rgba(107, 191, 89, 0.08);
  color: #6BBF59;
  font-size: 0.76rem;
  font-weight: 900;
}
.passphrase-panel {
  width: 100%;
  min-height: 9.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.35rem;
  border-radius: 1.4rem;
  border: 2px dashed rgba(91, 159, 214, 0.3);
  background:
    linear-gradient(135deg, rgba(91, 159, 214, 0.08), rgba(107, 191, 89, 0.07)),
    var(--bg-surface-alt);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.25s ease;
}
.passphrase-panel:hover {
  transform: translateY(-3px);
  border-color: rgba(107, 191, 89, 0.42);
  box-shadow: 0 12px 32px rgba(91, 159, 214, 0.12);
}
.passphrase-panel.copied {
  border-style: solid;
  border-color: rgba(107, 191, 89, 0.6);
  box-shadow: 0 0 26px rgba(107, 191, 89, 0.2);
}
.passphrase-display {
  max-width: 100%;
  color: #5B9FD6;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: clamp(1.25rem, 3.2vw, 2.15rem);
  font-weight: 900;
  line-height: 1.32;
  overflow-wrap: anywhere;
  text-align: center;
}
.passphrase-refresh {
  animation: passphraseRefresh 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.passphrase-hint {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.passphrase-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  margin-top: 1rem;
}
.passphrase-generate {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  color: #fff;
  font-weight: 900;
}
.passphrase-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 7rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 2px solid rgba(91, 159, 214, 0.18);
  background: rgba(91, 159, 214, 0.08);
  color: #5B9FD6;
  font-weight: 900;
  transition: transform 0.22s ease, background 0.2s ease, border-color 0.2s ease;
}
.passphrase-copy-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 159, 214, 0.32);
  background: rgba(91, 159, 214, 0.12);
}

.passphrase-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.25rem;
}
.control-label {
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 1rem;
  background: rgba(74, 55, 40, 0.04);
}
.segmented-control button {
  flex: 1 1 auto;
  min-width: 2.25rem;
  padding: 0.48rem 0.58rem;
  border-radius: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 900;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.segmented-control button[aria-pressed="true"] {
  background: var(--bg-surface);
  color: #6BBF59;
  box-shadow: 0 4px 12px var(--shadow-base);
}

.passphrase-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding-top: 1rem;
}
.note-strip {
  display: flex;
  gap: 1rem;
  padding-left: 1.25rem;
  border-left: 4px solid;
}
.note-strip h2 {
  margin: 0 0 0.35rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 900;
}
.note-strip p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}
.note-strip-green { border-left-color: #6BBF59; }
.note-strip-yellow { border-left-color: #FFD166; }
.note-icon {
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
  border-radius: 999px;
}
.note-strip-green .note-icon {
  background: rgba(107, 191, 89, 0.1);
  color: #6BBF59;
}
.note-strip-yellow .note-icon {
  background: rgba(255, 209, 102, 0.14);
  color: #E6A800;
}

@keyframes passphraseRefresh {
  0% { opacity: 0.45; transform: translateY(8px); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (max-width: 900px) {
  .passphrase-stage {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1rem;
  }
  .passphrase-copy {
    text-align: center;
  }
  .passphrase-copy img {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 720px) {
  .passphrase-band {
    height: 300px;
  }
  .passphrase-controls,
  .passphrase-notes {
    grid-template-columns: 1fr;
  }
  .passphrase-actions {
    grid-template-columns: 1fr;
  }
  .passphrase-copy-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .passphrase-tool {
    border-radius: 1.5rem;
    padding: 1rem;
  }
  .passphrase-panel {
    min-height: 8.75rem;
  }
}
