* {
  box-sizing: border-box;
}

:root {
  --bg: #162764;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.86);
  --card: #ffffff;
  --card-text: #162033;
  --line: #d8dce5;
  --soft: #f1f1f4;
  --blue: #0b6bdb;
  --blue-dark: #075ec5;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
}

.hero {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 72px;
  font-weight: 800;
  font-size: 24px;
}

.brand__icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  font-size: 9px;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 6vw, 74px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 400;
}

.hero__content p {
  margin: 26px 0 0;
  max-width: 640px;
  font-size: 22px;
  line-height: 1.45;
  color: var(--muted);
}

.card {
  background: var(--card);
  color: var(--card-text);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 24px;
}

.field__label {
  display: block;
  margin-bottom: 16px;
  font-weight: 750;
  font-size: 14px;
}

.tabs {
  display: grid;
  background: var(--soft);
  padding: 4px;
  border-radius: 4px;
  gap: 4px;
}

.tabs--password {
  grid-template-columns: repeat(2, 1fr);
}

.tab {
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 13px 8px;
  cursor: pointer;
  font-weight: 700;
  color: #1d2635;
}

.tab--active {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

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

.row {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  color: #5f6b82;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

output {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #1b2330;
  background: #fff;
  font-weight: 600;
}

.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.switchline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #5f6b82;
  cursor: pointer;
  user-select: none;
}

.switchline input {
  position: absolute;
  opacity: 0;
}

.switch {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #686d73;
  position: relative;
  transition: 0.18s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  transition: 0.18s ease;
}

.switchline input:checked + .switch {
  background: var(--blue);
}

.switchline input:checked + .switch::after {
  transform: translateX(14px);
}

.hint {
  margin: 12px 0 0;
  color: #6f7b91;
  font-size: 13px;
  line-height: 1.45;
}

.passwordBox {
  border: 1px solid #cfd4de;
  border-radius: 4px;
  padding: 14px 16px;
}

#password {
  width: 100%;
  border: 0;
  outline: 0;
  text-align: center;
  font: 800 18px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.05em;
  color: #101826;
  background: transparent;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.button {
  border-radius: 8px;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.15s ease;
}

.button--primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}

.button--primary:hover {
  background: var(--blue-dark);
}

.button--secondary {
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
}

.button--secondary:hover {
  background: #f3f8ff;
}

.status {
  min-height: 20px;
  margin: 14px 0 0;
  color: #2a754a;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 900px) {
  .page {
    padding: 24px;
    place-items: start center;
  }

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

  .brand {
    margin-bottom: 36px;
  }

  .hero__content p {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 16px;
  }

  .card {
    padding: 22px 16px;
  }

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

  .row {
    grid-template-columns: 1fr 60px;
  }

  .row input {
    grid-column: 1 / -1;
    grid-row: 2;
  }

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