:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #20271f;
  --muted: #767d73;
  --paper: #f4f3ee;
  --card: #fffefa;
  --line: #e6e7df;
  --green: #b2dc58;
  --deep-green: #25352a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(#dadcd2 0.7px, transparent 0.7px);
  background-size: 19px 19px;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #79a927; outline-offset: 3px; }

.page-shell { width: min(100% - 48px, 1056px); margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 27px 0; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); font-size: 20px; font-weight: 740; letter-spacing: -0.8px; text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 7px); gap: 3px; transform: rotate(-8deg); }
.brand-mark span { width: 7px; height: 7px; border-radius: 2px; background: #719d35; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { background: #b2dc58; }
.privacy-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #e3e5dc; border-radius: 999px; color: #596151; background: rgba(255,255,250,.58); font-size: 12px; font-weight: 600; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: #7da63b; box-shadow: 0 0 0 3px #e7efd9; }

main { width: min(100%, 690px); margin: 0 auto; padding: 45px 0 0; }
.intro { margin: 0 0 28px 4px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 15px; color: #73805f; font-size: 10px; font-weight: 750; letter-spacing: 1.65px; }
.eyebrow-line { width: 19px; height: 1px; background: #91ae5d; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 51px); line-height: 1.03; font-weight: 650; letter-spacing: -2.7px; }
h1 span { color: #768c55; }
.intro-copy { max-width: 470px; margin: 14px 0 0; color: #71776c; font-size: 14px; line-height: 1.65; }

.generator-card { overflow: hidden; border: 1px solid #e4e5dc; border-radius: 17px; background: var(--card); box-shadow: 0 22px 55px rgba(57, 62, 42, .075), 0 2px 6px rgba(57, 62, 42, .035); }
.result-panel { min-height: 153px; padding: 24px 27px 19px; color: #f7f8f2; background: #26332b; }
.result-heading, .control-heading { display: flex; align-items: center; justify-content: space-between; }
.field-label { color: #888e81; font-size: 10px; font-weight: 750; letter-spacing: 1.15px; }
.strength { display: inline-flex; align-items: center; gap: 7px; color: #c5df8d; font-size: 11px; font-weight: 650; }
.strength-dot { width: 6px; height: 6px; border-radius: 50%; background: #afd85a; }
.password-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 15px; }
.password-output { display: block; overflow-wrap: anywhere; color: #fbfcf7; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: clamp(17px, 3.4vw, 23px); font-weight: 500; letter-spacing: .6px; line-height: 1.45; }
.icon-button { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid rgba(233,239,220,.16); border-radius: 10px; color: #e3ead8; background: rgba(255,255,255,.055); cursor: pointer; transition: background .15s ease, transform .15s ease; }
.icon-button:hover { background: rgba(255,255,255,.13); }
.icon-button:active { transform: scale(.96); }
.icon-button svg { width: 18px; height: 18px; }
.check-icon { display: none; }
.copy-button.is-copied { color: #c4e58b; border-color: rgba(186,220,122,.5); }
.copy-button.is-copied .copy-icon { display: none; }
.copy-button.is-copied .check-icon { display: block; }
.strength-track { overflow: hidden; height: 3px; border-radius: 4px; background: rgba(255,255,255,.12); }
.strength-track span { display: block; width: 100%; height: 100%; border-radius: inherit; transition: width .2s ease, background .2s ease; }
.strength-track span.level-very-strong { width: 100%; background: #afd85a; }
.strength-track span.level-strong { width: 78%; background: #b7d86a; }
.strength-track span.level-fair { width: 53%; background: #e7c86d; }
.strength-track span.level-weak { width: 28%; background: #e58c75; }
.copy-status { min-height: 14px; margin: 6px 0 -4px; color: #cce59c; font-size: 11px; }

.controls { padding: 24px 27px 26px; }
.length-control { margin-bottom: 24px; }
.length-value-wrap { display: inline-flex; align-items: baseline; gap: 6px; }
.length-number { width: 42px; padding: 0; border: 0; border-bottom: 1px solid #dfe2d7; border-radius: 0; color: var(--ink); background: transparent; font-size: 15px; font-weight: 700; text-align: right; appearance: textfield; }
.length-number::-webkit-inner-spin-button, .length-number::-webkit-outer-spin-button { margin: 0; appearance: none; }
.character-unit { color: #84897f; font-size: 11px; }
.length-range { display: block; width: 100%; height: 18px; margin: 12px 0 0; accent-color: #7c9d45; cursor: pointer; }
.length-range::-webkit-slider-runnable-track { height: 4px; border-radius: 5px; background: #e5e7df; }
.length-range::-moz-range-track { height: 4px; border-radius: 5px; background: #e5e7df; }
.length-range::-moz-range-progress { height: 4px; border-radius: 5px; background: #88a855; }
.length-range::-webkit-slider-thumb { width: 15px; height: 15px; margin-top: -5.5px; border: 3px solid white; border-radius: 50%; background: #789747; box-shadow: 0 0 0 1px #789747, 0 1px 4px #b8bead; appearance: none; }
.length-range::-moz-range-thumb { width: 10px; height: 10px; border: 3px solid white; border-radius: 50%; background: #789747; box-shadow: 0 0 0 1px #789747, 0 1px 4px #b8bead; }
.range-labels { display: flex; justify-content: space-between; margin-top: -1px; color: #9a9f95; font-size: 10px; }
.character-options { min-width: 0; margin: 0; padding: 0; border: 0; }
.character-options legend { margin-bottom: 11px; padding: 0; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.option-card { display: flex; position: relative; min-height: 54px; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #e8e9e2; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.option-card:hover, .ambiguous-option:hover { border-color: #c3d3a5; }
.option-card:has(input:checked) { border-color: #cbd9b6; background: #fbfcf7; }
.option-card input, .ambiguous-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.custom-check { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; border: 1.5px solid #d1d5c9; border-radius: 5px; background: white; }
input:checked + .custom-check { border-color: #769746; background: #79984a; }
input:checked + .custom-check::after { width: 8px; height: 4px; border-bottom: 1.7px solid white; border-left: 1.7px solid white; content: ""; transform: translateY(-1px) rotate(-45deg); }
input:focus-visible + .custom-check { outline: 3px solid #79a927; outline-offset: 3px; }
.option-copy { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 5px; }
.option-name { color: #343a31; font-size: 12px; font-weight: 650; }
.option-sample { color: #969b90; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.ambiguous-option { display: flex; position: relative; width: fit-content; align-items: center; gap: 9px; margin-top: 11px; padding: 2px 3px; color: #697064; font-size: 11px; cursor: pointer; }
.ambiguous-option .custom-check { width: 15px; height: 15px; flex-basis: 15px; }
.validation-message { margin: 13px 0 0; color: #a83a32; font-size: 12px; line-height: 1.45; }
.generate-button { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; gap: 9px; margin-top: 21px; border: 0; border-radius: 9px; color: #222c1f; background: var(--green); font-size: 13px; font-weight: 750; cursor: pointer; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
.generate-button:hover { background: #bde66b; box-shadow: 0 4px 14px rgba(135,173,63,.18); }
.generate-button:active { transform: translateY(1px); }
.generate-button:disabled { color: #969b91; background: #e5e7df; box-shadow: none; cursor: not-allowed; }
.generate-button svg { width: 17px; height: 17px; }

.security-note { display: flex; align-items: center; gap: 12px; margin: 16px 3px 0; padding: 0 8px; color: #747a6e; }
.security-icon { display: grid; width: 33px; height: 33px; flex: 0 0 33px; place-items: center; border-radius: 9px; color: #748c4f; background: #e9ecdF; }
.security-icon svg { width: 19px; height: 19px; }
.security-note p { margin: 0; font-size: 11px; line-height: 1.55; }
.security-note strong { color: #434b3d; font-weight: 700; }
.footer { display: flex; justify-content: space-between; gap: 16px; margin: 67px 0 25px; color: #92968d; font-size: 10px; }

@media (max-width: 560px) {
  .page-shell { width: min(100% - 32px, 440px); }
  .topbar { padding: 19px 0; }
  main { padding-top: 35px; }
  .intro { margin-bottom: 23px; }
  h1 { letter-spacing: -2.1px; }
  .intro-copy { max-width: 365px; font-size: 13px; }
  .result-panel { min-height: 141px; padding: 20px 18px 15px; }
  .controls { padding: 20px 18px 21px; }
  .password-output { font-size: clamp(15px, 4.6vw, 21px); letter-spacing: 0; }
  .option-card { min-height: 52px; padding: 8px 9px; }
  .option-copy { align-items: flex-start; flex-direction: column; gap: 2px; }
  .security-note { align-items: flex-start; margin-top: 14px; }
  .footer { margin-top: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
