:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #111827;
  --accent-contrast: #ffffff;
  --soft: #f1f5f9;
  --danger: #b91c1c;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.header-inner,
.footer-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: white;
  background: #111827;
  border-radius: 10px;
}

.top-nav,
.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.top-nav a,
.site-footer a {
  color: #475569;
  text-decoration: none;
}

.top-nav a:hover,
.site-footer a:hover {
  color: #111827;
}

.hero {
  padding: 76px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 750px;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: #475569;
  font-size: 1.15rem;
}

.generator-card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.password-output-wrap label,
.control-heading label,
.options legend {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 750;
}

.password-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.password-output {
  display: block;
  min-height: 56px;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  line-height: 1.6;
}

.status,
.error {
  min-height: 22px;
  margin: 6px 0 0;
  font-size: 0.85rem;
}

.status {
  color: #475569;
}

.error {
  color: var(--danger);
}

.control {
  margin-top: 22px;
}

.control-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

#lengthValue {
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: #111827;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.options legend {
  grid-column: 1 / -1;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: #111827;
}

.strength-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 22px 0;
  padding: 15px 16px;
  background: var(--soft);
  border-radius: 12px;
}

.strength-card > div {
  display: grid;
}

.muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.entropy {
  text-align: right;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  font-weight: 800;
  cursor: pointer;
}

.button-primary {
  color: var(--accent-contrast);
  background: var(--accent);
}

.button-secondary {
  color: #111827;
  background: #e2e8f0;
}

.button:hover {
  opacity: 0.92;
}

.button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #94a3b8;
  outline-offset: 3px;
}

.button-full {
  width: 100%;
}

.content-section,
.faq-section {
  padding: 72px 0;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.faq-section {
  background: #f8fafc;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: #334155;
}

.prose code {
  padding: 0.12em 0.35em;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 0.93em;
}

details {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

summary {
  font-weight: 800;
  cursor: pointer;
}

.site-footer {
  padding: 26px 0;
  background: #111827;
  color: #cbd5e1;
}

.site-footer .footer-inner {
  min-height: auto;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #e2e8f0;
}

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

@media (max-width: 860px) {
  .hero {
    padding-top: 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .generator-card {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .header-inner {
    min-height: 62px;
  }

  .top-nav a:not(:last-child) {
    display: none;
  }

  .generator-card {
    padding: 18px;
  }

  .password-output-row {
    grid-template-columns: 1fr;
  }

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

  .strength-card {
    flex-direction: column;
  }

  .entropy {
    text-align: left;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
