@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-500.woff2") format("woff2");
}

:root {
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-soft: #fff4ec;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --navy: #0b1022;
  --line: #e2e8f0;
  --weak: #ef4444;
  --fair: #f59e0b;
  --good: #22c55e;
  --strong: #16a34a;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.muted { color: var(--ink-soft); }
svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.eyebrow {
  margin: 0 0 16px;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #fdba74;
}
.eyebrow-dark { color: var(--brand-dark); margin-bottom: 12px; }

/* Nav */
.nav {
  position: absolute; inset: 0 0 auto; z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; letter-spacing: -0.01em; }
.logo-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--brand); color: #fff;
}
.logo-mark svg { fill: currentColor; stroke: none; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: rgba(255, 255, 255, .7); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: #fff; }

/* Hero — the image lives on a fixed-height layer so it never rescales when the card changes height */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  padding: 128px 0 104px;
  background: var(--navy);
}
.hero::before {
  content: "";
  position: absolute; z-index: -2;
  top: 0; left: 0; right: 0;
  height: 1100px;
  background:
    linear-gradient(90deg, rgba(11, 16, 34, .7) 0%, rgba(11, 16, 34, .25) 50%, rgba(11, 16, 34, 0) 100%),
    linear-gradient(180deg, transparent 70%, var(--navy) 100%),
    url("/assets/hero-bg.jpg") right top / cover no-repeat,
    radial-gradient(900px 500px at 85% 20%, rgba(249, 115, 22, .18), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(99, 102, 241, .22), transparent 60%),
    var(--navy);
}
.hero::after {
  content: "";
  position: absolute; z-index: -1;
  inset: auto 0 0 0; height: 160px;
  background: linear-gradient(0deg, rgba(11, 16, 34, .55), transparent);
  pointer-events: none;
}
.hero-inner > * { min-width: 0; }
.hero-inner { display: grid; grid-template-columns: 1fr 480px; gap: 72px; align-items: start; }
.hero-text { padding-top: 64px; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 700; letter-spacing: -0.035em; margin-bottom: 20px; }
.lead { color: rgba(255, 255, 255, .72); font-size: 1.125rem; max-width: 500px; margin: 0 0 32px; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.trust li { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: rgba(255, 255, 255, .85); font-weight: 500; }
.trust svg { width: 18px; height: 18px; color: #4ade80; stroke-width: 2.5; }

/* Card */
.card {
  background: #fff; color: var(--ink);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 30px 80px -20px rgba(0, 0, 0, .55);
}
.field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; padding: 0; }

.password-row {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 6px 6px 6px 18px;
  transition: border-color .2s, box-shadow .2s;
}
.password-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(249, 115, 22, .12); }
.password {
  flex: 1; min-width: 0; padding: 10px 0; margin: 0;
  border: 0; outline: 0; background: transparent; resize: none; overflow: hidden;
  font-family: var(--mono); font-size: 1.15rem; line-height: 1.5; color: var(--ink); letter-spacing: .02em;
  overflow-wrap: anywhere; word-break: normal;
}
.password.masked { letter-spacing: .15em; }
.icon-btn {
  flex: none; display: grid; place-items: center;
  width: 42px; height: 42px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.icon-btn.spin svg { animation: spin .45s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Strength */
.strength { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.strength-bar { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strength-bar span { height: 6px; border-radius: 999px; background: var(--line); transition: background .25s; }
.strength-label { font-size: .85rem; font-weight: 600; min-width: 80px; text-align: right; }

.divider { height: 1px; background: var(--line); margin: 24px 0; }

/* Length */
.length { margin-bottom: 24px; }
.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.row-between .field-label { margin: 0; }
.length input[type="number"] {
  width: 64px; padding: 6px 8px; font: inherit; font-weight: 600; font-size: .95rem; text-align: center; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  -moz-appearance: textfield;
}
.length input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.length input[type="number"]:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249, 115, 22, .12); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; margin: 12px 0 4px;
  background: linear-gradient(to right, var(--brand) var(--fill, 50%), var(--line) var(--fill, 50%));
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(15, 23, 42, .2);
  transition: transform .15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand); box-shadow: 0 2px 6px rgba(15, 23, 42, .2);
}
input[type="range"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }

/* Character chips */
.checks { border: 0; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks legend { margin-bottom: 10px; }
.chip { position: relative; cursor: pointer; user-select: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .92rem; font-weight: 500; color: var(--ink-soft);
  transition: border-color .15s, background .15s, color .15s;
}
.chip em { font-style: normal; font-family: var(--mono); font-size: .8rem; color: var(--ink-faint); }
.chip span::before {
  content: ""; order: 2; width: 18px; height: 18px; border-radius: 5px; margin-left: 10px;
  border: 1.5px solid #cbd5e1; background: #fff center / 12px no-repeat;
  transition: background-color .15s, border-color .15s;
}
.chip span em { margin-left: auto; }
.chip input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.chip input:checked + span::before {
  background-color: var(--brand); border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 10 3.5 3.5L15 7'/%3E%3C/svg%3E");
}
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Toggle switch */
.toggle { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--ink-soft); cursor: pointer; user-select: none; }
.toggle em { font-style: normal; color: var(--ink-faint); }
.toggle input { position: absolute; opacity: 0; }
.switch { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.toggle input:checked + .switch { background: var(--brand); }
.toggle input:checked + .switch::after { transform: translateX(16px); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-primary {
  width: 100%; margin-top: 28px; padding: 15px;
  border: 0; border-radius: 12px;
  background: var(--brand); color: #fff;
  font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(249, 115, 22, .6);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 10px 24px -6px rgba(234, 88, 12, .65); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }


/* Mode tabs */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 24px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; }
.tab {
  padding: 9px 8px; border: 0; border-radius: 9px; background: transparent;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

#visibility .eye-open, #visibility[aria-pressed="true"] .eye-closed { display: none; }
#visibility[aria-pressed="true"] .eye-open { display: block; }

.crack-time { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: .88rem; color: var(--ink-soft); cursor: help; }
.crack-time svg { width: 16px; height: 16px; flex: none; color: var(--ink-faint); }
.crack-time strong { color: var(--ink); font-weight: 600; }

.mode-opts { display: grid; gap: 14px; }
.mode-opts[hidden] { display: none; }
.mode-opts .checks { margin-bottom: 6px; }
.select-row { margin-bottom: 2px; }
select {
  font: inherit; font-size: .92rem; font-weight: 500; color: var(--ink);
  padding: 8px 36px 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
}
select:focus-visible { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249, 115, 22, .12); }
.note { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--line); font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--brand-dark); }

.bulk-link { display: block; margin-top: 14px; text-align: center; font-size: .88rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.bulk-link:hover { color: var(--brand-dark); }

/* Bulk */
.section-tight { padding: 88px 0; }
.section-tight .section-head { margin-bottom: 36px; }
.bulk-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 12px 32px -16px rgba(15, 23, 42, .12); }
.bulk-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.bulk-controls .field-label { margin: 0; }
.bulk-summary { flex: 1; min-width: 200px; margin: 0; font-size: .85rem; color: var(--ink-faint); }
.btn-inline { width: auto; margin: 0; padding: 10px 22px; font-size: .95rem; }
#bulk-output {
  width: 100%; height: 260px; resize: vertical; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-alt);
  font-family: var(--mono); font-size: .92rem; line-height: 1.7; color: var(--ink);
}
#bulk-output:focus { outline: 0; border-color: var(--brand); }
.bulk-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.btn-secondary {
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-dark); }
.btn-secondary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Sections */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p.muted { margin: 0; font-size: 1.05rem; }
.section-head.left { text-align: left; margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; transition: border-color .2s, box-shadow .2s; }
.feature:hover { border-color: #cbd5e1; box-shadow: 0 12px 32px -12px rgba(15, 23, 42, .12); }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 20px; }
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.two-col { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; align-items: start; }
.tips { margin: 0; padding: 0; list-style: none; counter-reset: tip; display: grid; gap: 12px; }
.tips li {
  counter-increment: tip; position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 24px 20px 72px;
}
.tips li::before {
  content: counter(tip, decimal-leading-zero);
  position: absolute; left: 24px; top: 21px;
  font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--brand-dark);
}
.tips h3 { margin-bottom: 4px; }
.tips p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* FAQ */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  cursor: pointer; padding: 22px 0; font-weight: 600; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
summary:hover { color: var(--brand-dark); }
details p { color: var(--ink-soft); margin: -6px 0 22px; max-width: 640px; }

/* Footer */
.footer { background: var(--navy); color: rgba(255, 255, 255, .6); font-size: .92rem; }
.footer a { color: rgba(255, 255, 255, .7); text-decoration: none; transition: color .15s; }
.footer a:hover { color: #fff; }
.footer p { margin: 0; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 48px; padding: 72px 0 56px; }
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { max-width: 300px; line-height: 1.7; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-col h4 { margin: 0 0 4px; color: #fff; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.btn-coffee {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  padding: 10px 16px; border-radius: 10px;
  background: #ffdd00; color: #1a1a1a !important; font-weight: 600;
  transition: transform .15s, box-shadow .15s;
}
.btn-coffee:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(255, 221, 0, .5); }
.btn-coffee svg { width: 18px; height: 18px; }
.btn-coffee { white-space: nowrap; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 24px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem;
}
.footer-bottom a { color: #fff; font-weight: 500; }
.heart { display: inline-block; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .heart, .icon-btn.spin svg { animation: none; } html { scroll-behavior: auto; } }

/* Legal pages */
.page-header { background: var(--navy); color: #fff; padding: 140px 0 64px; }
.page-header h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; margin-bottom: 12px; }
.page-header p { margin: 0; color: rgba(255, 255, 255, .65); }
.legal { padding: 64px 0 96px; }
.legal h2 { font-size: 1.25rem; text-align: left; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; }
.legal a { color: var(--brand-dark); }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound-cta { margin-top: 32px !important; }
.notfound .btn-primary { display: inline-block; width: auto; padding: 14px 28px; text-decoration: none; }

.offscreen { position: fixed; top: -1000px; left: -1000px; opacity: 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: .92rem; font-weight: 500; box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
  transition: opacity .2s, transform .2s;
}
.toast svg { width: 18px; height: 18px; color: #4ade80; stroke-width: 2.5; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #7f1d1d; }
.toast.error svg { display: none; }
button:disabled, input:disabled { opacity: .5; cursor: not-allowed; }

/* Responsive */
@media (max-width: 980px) {
  .hero { padding: 120px 0 80px; }
  .hero-inner, .two-col { grid-template-columns: 1fr; gap: 48px; }
  .hero-text { text-align: center; padding-top: 0; }
  .lead { margin-inline: auto; }
  .trust { justify-content: center; }
  .card { max-width: 520px; width: 100%; margin-inline: auto; }
  .password-row { padding-left: 14px; }
  .grid-3 { grid-template-columns: 1fr; }
  .section-head.left { text-align: center; margin: 0 auto; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .card { padding: 22px; }
  .password { font-size: 1.05rem; }
  .checks { grid-template-columns: 1fr; }
  .btn-inline { width: 100%; }
  .bulk-actions > * { flex: 1; }
  .section { padding: 72px 0; }
  .tips li { padding: 18px 18px 18px 60px; }
  .tips li::before { left: 18px; top: 19px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
