.sn-password-generator-page {
  padding: 28px 0 40px;
}

.sn-tool-page .card {
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.sn-password-generator-page .sn-tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(240px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
  padding: 28px;
  background:
    radial-gradient(
      circle at top right,
      rgba(99, 102, 241, 0.14),
      transparent 36%
    ),
    linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(168, 85, 247, 0.03));
  color: var(--text-color);
}

.sn-password-generator-page .sn-tool-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.14);
  color: var(--primary-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sn-password-generator-page .sn-tool-hero h1 {
  margin: 14px 0 10px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: var(--text-color);
}

.sn-password-generator-page .sn-tool-hero h1 span {
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--primary-blue);
}

.sn-password-generator-page .sn-tool-hero-copy p {
  margin: 0;
  color: var(--muted-text);
  font-size: 17px;
  line-height: 28px;
}

.sn-password-generator-page .sn-tool-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.sn-password-generator-page .sn-password-hero-badge,
.sn-password-generator-page .sn-password-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
}

.sn-password-generator-page .sn-password-hero-badge *,
.sn-password-generator-page .sn-password-hero-stat * {
  color: inherit;
}

.sn-password-generator-page .sn-password-hero-badge i {
  color: var(--primary-blue);
}

.sn-password-generator-page .sn-tool-hero-panel {
  display: grid;
  gap: 12px;
  align-content: center;
}

.sn-password-generator-page .sn-password-hero-stat {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.sn-password-generator-page .sn-password-hero-stat strong {
  font-size: 28px;
  line-height: 1;
  color: var(--text-color);
}

.sn-password-generator-page .sn-password-hero-stat span {
  color: var(--muted-text);
  font-size: 13px;
}

body.theme-dark .sn-password-generator-page .sn-tool-eyebrow {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.22);
  color: #c4b5fd;
}

body.theme-dark .sn-password-generator-page .sn-password-hero-badge,
body.theme-dark .sn-password-generator-page .sn-password-hero-stat {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
  color: #f8fafc;
}

body.theme-dark .sn-password-generator-page .sn-password-hero-badge i {
  color: #c4b5fd;
}

body.theme-dark .sn-password-generator-page .sn-password-hero-stat strong {
  color: #f8fafc;
}

body.theme-dark .sn-password-generator-page .sn-password-hero-stat span {
  color: rgba(226, 232, 240, 0.88);
}

.sn-tool-layout {
  display: grid;
  /* Stacked, full-width: the generator workspace on top and the recent-history
     panel full width below it. */
  grid-template-columns: 1fr;
  gap: 24px;
}

.sn-tool-layout-single {
  display: block;
}

.sn-password-card,
.sn-password-sidebar {
  display: grid;
  gap: 24px;
}

.sn-password-card {
  padding: 28px;
}

.sn-tool-section-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.sn-password-card .sn-tool-section-head h2 {
  font-size: 1.3em;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-color);
}

/* ── Quick Guidance — identical to Quick Workflow card ── */
.sn-password-tips {
  padding: 24px !important;
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: none !important;
  color: var(--text-color);
}

.sn-password-tips h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.sn-password-tips-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.sn-password-tips-list li,
.sn-password-tips-helper {
  font-size: 15px;
  color: var(--muted-text);
}

.sn-password-tips-helper {
  margin: 16px 0 0;
}

body.theme-dark .sn-password-tips {
  background: rgba(15, 23, 42, 0.82) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: #f8fafc;
}

body.theme-dark .sn-password-tips-list li,
body.theme-dark .sn-password-tips-helper {
  color: rgba(226, 232, 240, 0.9);
}

.sn-tool-section-head p {
  margin: 0;
  color: var(--muted-text);
  font-size: 15px;
  line-height: 24px;
}

.sn-password-output {
  display: grid;
  gap: 14px;
}

.sn-password-output textarea {
  display: block;
  width: 100%;
  min-height: 60px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  background: var(--container-bg);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.4px;
  line-height: 1.55;
  /* Long passwords wrap onto multiple lines so the whole value stays visible
     instead of being clipped by a single-line field. */
  resize: none;
  overflow: hidden;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.sn-password-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sn-password-output-actions .button {
  margin: 0;
}

.sn-password-strength {
  display: grid;
  gap: 10px;
}

.sn-password-strength-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.sn-password-strength-head strong {
  font-size: 16px;
}

.sn-password-strength-head span {
  color: var(--muted-text);
  font-size: 14px;
}

.sn-password-strength-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.sn-password-strength-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.sn-password-sliders {
  display: grid;
  gap: 18px;
}

.sn-slider-group {
  display: grid;
  gap: 8px;
}

.sn-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sn-slider-head label,
.sn-slider-head strong {
  font-size: 15px;
  font-weight: 600;
}

.sn-password-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sn-option-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: var(--container-bg);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.sn-option-check input {
  margin: 0;
  cursor: pointer;
}

.sn-password-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sn-password-summary div {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--container-bg);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.sn-password-summary span {
  display: block;
  color: var(--muted-text);
  font-size: 13px;
}

.sn-password-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.sn-password-sidebar .card {
  padding: 24px;
}

.sn-tool-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--muted-text);
  font-size: 15px;
  line-height: 24px;
}

.sn-tool-section-head-inline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.sn-tool-section-head-inline p {
  margin: 0;
}

.sn-tool-section-head-inline .button {
  margin: 0;
}

/* Weak -> excellent stays on a single red -> amber -> green arc (standard
   password-strength semantics) instead of drifting into teal/indigo at the
   top tier, which read as an off-brand color-wheel jump next to the rest of
   the (orange-accented) page. */
.sn-password-strength-weak {
  background: linear-gradient(90deg, #ef4444, #f0894a);
}

.sn-password-strength-fair {
  background: linear-gradient(90deg, #f0894a, #f0b064);
}

.sn-password-strength-good {
  background: linear-gradient(90deg, #f0b064, #a8c257);
}

.sn-password-strength-strong {
  background: linear-gradient(90deg, #a8c257, #4caf7d);
}

.sn-password-strength-excellent {
  background: linear-gradient(90deg, #4caf7d, #2ea36e);
}

@media (max-width: 980px) {
  .sn-tool-hero,
  .sn-tool-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sn-password-generator-page {
    padding-top: 18px;
  }

  .sn-tool-hero,
  .sn-password-card,
  .sn-password-sidebar .card {
    padding: 20px;
  }

  .sn-tool-hero h1 {
    font-size: 30px;
  }

  .sn-password-options,
  .sn-password-summary {
    grid-template-columns: 1fr;
  }

  .sn-tool-section-head-inline,
  .sn-password-strength-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Security facts grid ── */
.sn-password-facts-section {
  padding: 28px;
  margin-top: 24px;
}

.sn-password-facts-section .sn-tool-section-head,
.sn-password-pillars-section .sn-tool-section-head,
.sn-password-faq-section .sn-tool-section-head {
  margin-bottom: 32px;
  text-align: center;
}

.sn-password-facts-section .sn-tool-section-head h2,
.sn-password-pillars-section .sn-tool-section-head h2,
.sn-password-faq-section .sn-tool-section-head h2 {
  font-size: 1.6em;
  font-weight: 600;
  border-bottom: none;
  padding-bottom: 0;
  margin: 0 0 10px;
}

.sn-password-facts-section .sn-tool-section-head p,
.sn-password-pillars-section .sn-tool-section-head p,
.sn-password-faq-section .sn-tool-section-head p {
  max-width: 480px;
  margin: 0 auto;
  font-size: 0.92em;
  line-height: 1.6;
}

.sn-password-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.sn-password-fact-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: var(--container-bg);
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
}

.sn-password-fact-icon {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.sn-password-fact-icon {
  width: 40px;
  height: 40px;
  position: relative;
  border-radius: 12px;
  flex-shrink: 0;
}

.sn-password-fact-icon i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  line-height: 1;
}

.sn-password-fact-icon--danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.sn-password-fact-icon--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.sn-password-fact-icon--warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.sn-password-fact-icon--info {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #6366f1;
}

.sn-password-fact-value {
  grid-column: 2;
  grid-row: 1;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-color);
  letter-spacing: -0.4px;
  align-self: center;
}

.sn-password-fact-label {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--muted-text);
  align-self: start;
}

/* ── Pillars grid ── */
.sn-password-pillars-section {
  padding: 28px;
  margin-top: 24px;
}

.sn-password-pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sn-password-pillar {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 14px;
  row-gap: 10px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  background: var(--container-bg);
  align-items: center;
}

.sn-password-pillar-icon {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 40px;
  height: 40px;
  position: relative;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: #6366f1;
}

.sn-password-pillar-icon i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  line-height: 1;
}

/* Dissolve the wrapper — h3 and p become direct grid children */
.sn-password-pillar-body {
  display: contents;
}

.sn-password-pillar-body h3 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.sn-password-pillar-body p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 14px;
  line-height: 23px;
  color: var(--muted-text);
}

/* ── FAQ ── */
.sn-password-faq-section {
  padding: 28px;
  margin-top: 24px;
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}

.sn-password-faq-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

body.theme-dark .sn-password-fact-card {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.6);
}

body.theme-dark .sn-password-fact-icon--danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

body.theme-dark .sn-password-fact-icon--success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.25);
  color: #86efac;
}

body.theme-dark .sn-password-fact-icon--warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

body.theme-dark .sn-password-fact-icon--info {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
  color: #c4b5fd;
}

body.theme-dark .sn-password-pillar {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.6);
}

body.theme-dark .sn-password-pillar-icon {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
  color: #c4b5fd;
}

@media (max-width: 980px) {
  .sn-password-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sn-password-facts-section,
  .sn-password-pillars-section,
  .sn-password-faq-section {
    padding: 20px;
  }

  .sn-password-facts-grid {
    grid-template-columns: 1fr;
  }

  .sn-password-pillars-grid {
    grid-template-columns: 1fr;
  }

  .sn-password-pillar {
    flex-direction: column;
    gap: 12px;
  }
}
