:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #e8e8e6;
  background: #151515;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(52, 52, 52, 0.22), transparent 60%),
    #151515;
}

input {
  font: inherit;
}

.page {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.generator {
  width: min(100%, 520px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a7a7a3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.35px;
}

.eyebrow-line {
  width: 18px;
  height: 1px;
  background: #858581;
}

h1 {
  margin: 17px 0 12px;
  color: #f0f0ee;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: -2.35px;
  line-height: 1.12;
}

.intro {
  max-width: 400px;
  margin: 0;
  color: #a3a39f;
  font-size: 14px;
  line-height: 1.7;
}

.password-panel {
  margin-top: 30px;
  padding: 18px 20px 19px;
  border: 1px solid #373735;
  border-radius: 12px;
  background: #20201f;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.16);
}

.password-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.password-meta label {
  color: #aaa9a5;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.05px;
}

.length-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #aaa9a5;
  font-size: 10px;
}

.length-badge span {
  font-size: 13px;
}

.password-output {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 13px;
  color: #f0f0ee;
  font-family: "Courier New", monospace;
  font-size: clamp(19px, 5vw, 23px);
  font-weight: 700;
  letter-spacing: 0.45px;
  line-height: 1.4;
  user-select: all;
}

.modes {
  min-width: 0;
  margin: 25px 0 0;
  padding: 0;
  border: 0;
}

.modes legend {
  margin-bottom: 11px;
  color: #e1e1de;
  font-size: 12px;
  font-weight: 700;
}

.mode-card {
  position: relative;
  display: flex;
  min-height: 51px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid #383836;
  border-radius: 9px;
  background: #1d1d1c;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.mode-card + .mode-card,
.mode-grid {
  margin-top: 7px;
}

.mode-card:has(input:checked) {
  border-color: #858581;
  background: #272726;
}

.mode-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.radio-mark {
  display: grid;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  place-items: center;
  border: 1.5px solid #777774;
  border-radius: 50%;
  background: #1d1d1c;
}

.mode-card input:checked + .radio-mark {
  border-color: #d1d1cd;
}

.mode-card input:checked + .radio-mark::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d1d1cd;
  content: "";
}

.mode-card input:focus-visible + .radio-mark {
  outline: 3px solid #777774;
  outline-offset: 2px;
}

.mode-copy {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
}

.mode-title {
  color: #dededb;
  font-size: 11px;
  font-weight: 600;
}

.recommended {
  padding: 3px 6px;
  border-radius: 4px;
  background: #383836;
  color: #d2d2ce;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.55px;
  vertical-align: 1px;
}

.mode-description {
  color: #a2a29e;
  font-size: 10px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.mode-grid .mode-card {
  min-height: 44px;
  gap: 8px;
  padding: 8px 9px;
}

.mode-grid .mode-title {
  font-size: 10px;
}

.status {
  min-height: 16px;
  margin: 14px 0 0;
  color: #aaa9a5;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 520px) {
  .page {
    padding: 14px 16px;
  }

  .eyebrow {
    font-size: 11px;
  }

  h1 {
    font-size: clamp(22px, 6vw, 24px);
    letter-spacing: -1px;
  }

  .intro {
    font-size: 16px;
  }

  .password-meta label {
    font-size: 10px;
  }

  .length-badge {
    font-size: 12px;
  }

  .password-output {
    overflow-wrap: normal;
    font-size: 15px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .password-panel {
    margin-top: 24px;
  }

  .modes {
    margin-top: 20px;
  }

  .modes legend {
    font-size: 14px;
  }

  .mode-card {
    min-height: 54px;
  }

  .mode-title {
    font-size: 13px;
  }

  .recommended {
    font-size: 8px;
  }

  .mode-description {
    font-size: 12px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-grid .mode-card {
    min-height: 52px;
    gap: 8px;
    padding: 9px;
  }

  .mode-grid .mode-title {
    font-size: 13px;
  }

  .status {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
