.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.password-hero { padding: 42px 0 30px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.breadcrumbs a { color: var(--brand); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span[aria-hidden] { color: #98a2b3; }
.password-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.password-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.12; letter-spacing: -.035em; }
.password-hero .lede { max-width: 710px; margin: 12px 0 0; color: var(--muted); font-size: 1.08rem; }
.privacy-pill { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-top: 7px; padding: 8px 12px; border: 1px solid #b9ddd8; border-radius: 999px; color: #115e59; background: #f0fdfa; font-size: 14px; font-weight: 600; }
.privacy-pill svg, .secure-note svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.password-workspace { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 24px; align-items: start; padding-bottom: 48px; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.95); box-shadow: 0 16px 42px rgba(15,23,42,.07); }
.config-panel { min-width: 0; padding: clamp(20px, 3vw, 30px); }
.config-panel form[hidden] { display: none; }
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 26px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #f3f6f9; }
.mode-tabs button { min-width: 0; min-height: 46px; padding: 9px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-weight: 600; cursor: pointer; }
.mode-tabs button[aria-selected="true"] { color: var(--brand-dark); background: #fff; box-shadow: 0 2px 9px rgba(15,23,42,.09); }
.mode-tabs button:focus-visible { outline: 3px solid rgba(14,116,144,.38); outline-offset: 2px; }

.field { margin-top: 22px; }
.field:first-child { margin-top: 0; }
.field-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.field > label, .field legend, .field-header label { display: block; color: #253244; font-weight: 600; }
.field legend { padding: 0; }
.range-limits { color: var(--muted); font-size: 13px; }
.range-control { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 14px; align-items: center; }
input[type="range"] { width: 100%; height: 30px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.number-input, .field-input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #c8d0dc; border-radius: 9px; color: var(--ink); background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.number-input { text-align: center; font-variant-numeric: tabular-nums; }
textarea.field-input { min-height: 96px; resize: vertical; }
.number-input:hover, .field-input:hover { border-color: #9aabba; }
.number-input:focus, .field-input:focus { border-color: var(--focus); outline: 0; box-shadow: 0 0 0 3px rgba(14,116,144,.16); }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.option-stack { display: grid; gap: 10px; margin-top: 10px; }
.check-option { display: flex; min-width: 0; min-height: 58px; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid #d4dce6; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.check-option:hover { border-color: #9eafc0; }
.check-option:has(input:checked) { border-color: #a8c9e6; background: #f3f9ff; }
.check-option:has(input:focus-visible) { outline: 3px solid rgba(14,116,144,.38); outline-offset: 2px; }
.check-option input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--brand); }
.check-option span { display: grid; min-width: 0; }
.check-option strong { color: #253244; font-size: 14px; }
.check-option small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.check-option-wide { margin-top: 12px; }
.privacy-help { display: grid; gap: 3px; margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.privacy-help span:first-child { color: #7a4d0b; }
.form-error { min-height: 1.45em; margin: 10px 0 0; color: var(--danger); font-size: 13px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button svg, .icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 8px 20px rgba(21,94,159,.22); }
.button-primary:hover:not(:disabled) { background: #124f87; }
.button-secondary { color: #344054; border-color: #cfd7e2; background: #fff; }
.button-secondary:hover:not(:disabled) { border-color: #9aabba; background: #f8fafc; }
.button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.generate-button { width: 100%; margin-top: 3px; }

.result-panel { position: sticky; top: 92px; min-width: 0; padding: clamp(20px, 3vw, 30px); }
.result-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.result-heading-row h2 { margin: 0; font-size: 1.25rem; }
.icon-button { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; padding: 0; border: 1px solid #cfd7e2; border-radius: 9px; color: #344054; background: #fff; cursor: pointer; }
.icon-button:hover { border-color: #9aabba; background: #f8fafc; }
.password-output { display: block; min-height: 94px; margin-top: 16px; padding: 18px; overflow-wrap: anywhere; border: 1px solid #dce3ec; border-radius: 13px; color: #102a43; background: #f7f9fc; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(1.15rem, 3vw, 1.55rem); font-weight: 600; line-height: 1.45; letter-spacing: .02em; }
.password-output.is-hidden { -webkit-text-security: disc; color: #344054; letter-spacing: .12em; }
.strength-block { margin-top: 18px; }
.strength-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; }
.strength-label-row strong { color: #344054; }
.strength-meter { height: 8px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: #e8edf3; }
.strength-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: #98a2b3; transition: width .2s ease, background-color .2s ease; }
.result-panel[data-strength="weak"] .strength-meter span { background: #d92d20; }
.result-panel[data-strength="fair"] .strength-meter span { background: #dc8b0b; }
.result-panel[data-strength="strong"] .strength-meter span { background: #168569; }
.result-panel[data-strength="very-strong"] .strength-meter span { background: #1570a6; }
.strength-detail { min-height: 1.4em; margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.result-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; }
.result-meta div { min-width: 0; padding: 11px 12px; border: 1px solid #e0e6ee; border-radius: 9px; background: #fff; }
.result-meta dt { color: var(--muted); font-size: 12px; }
.result-meta dd { margin: 2px 0 0; overflow-wrap: anywhere; color: #253244; font-size: 14px; font-weight: 600; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.secure-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 14px; border: 1px solid #b9ddd8; border-radius: 12px; color: #115e59; background: #f0fdfa; }
.secure-note svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; }
.secure-note strong { display: block; font-size: 14px; }
.secure-note p { margin: 2px 0 0; color: #356c68; font-size: 13px; }

.password-education { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 4px 0 68px; }
.password-education article { padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.78); }
.password-education h2 { margin: 0; font-size: 1.15rem; }
.password-education p { margin: 7px 0 0; color: var(--muted); }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: min(360px, calc(100vw - 36px)); padding: 12px 16px; border-radius: 10px; color: #fff; background: #17324d; box-shadow: 0 12px 30px rgba(15,23,42,.22); animation: toast-in .2s ease-out; }
.toast.is-error { background: #7a271a; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 860px) {
  .password-title-row { display: block; }
  .privacy-pill { margin-top: 18px; }
  .password-workspace { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .password-education { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .password-hero { padding-top: 28px; }
  .config-panel, .result-panel { padding: 18px; border-radius: 14px; }
  .mode-tabs button { padding-inline: 5px; font-size: 13px; }
  .option-grid { grid-template-columns: 1fr; }
  .range-control { grid-template-columns: minmax(0, 1fr) 68px; gap: 10px; }
  .result-meta { grid-template-columns: 1fr; }
  .button-row { grid-template-columns: 1fr; }
  .button-row .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .strength-meter span, .toast { transition: none; animation: none; }
}
