.pw-shell .calc-main {
  gap: 16px;
}

.pw-tool-card .calc-page-intro {
  margin-bottom: 18px;
  max-width: 78ch;
}

.pw-output-wrap {
  position: relative;
  margin-bottom: 0;
}

.pw-output-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #b8c7e6;
  border-radius: 12px;
  background: #ffffff;
  padding: 6px 8px 6px 14px;
}

.pw-output-input {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0b1736;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 9px 0;
  line-height: 1.2;
  min-width: 0;
}

.pw-output-input:focus {
  outline: none;
}

.pw-icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6d7c97;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.pw-icon-btn svg {
  width: 22px;
  height: 22px;
}

.pw-icon-btn:hover,
.pw-icon-btn:focus-visible {
  color: #284f9a;
  background: #eef4ff;
}

.pw-icon-btn:focus-visible {
  outline: none;
}

.pw-btn {
  border: 1px solid #1b56c0;
  background: #1b56c0;
  color: #ffffff;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pw-btn:hover,
.pw-btn:focus-visible {
  background: #164aa4;
  border-color: #164aa4;
}

.pw-btn:focus-visible {
  outline: none;
}

.pw-btn-ghost {
  background: #ffffff;
  color: #12306b;
  border-color: #b8c7e6;
}

.pw-btn-ghost:hover,
.pw-btn-ghost:focus-visible {
  background: #eef4ff;
  border-color: #8aa9df;
}

.pw-strength-wrap {
  margin-bottom: 16px;
}

.pw-copy-status-spacer {
  min-height: 20px;
  margin: 7px 1px 0;
}

.pw-copy-toast {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(21, 26, 31, 0.85);
  color: #ffffff;
  border-radius: 15px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.pw-copy-toast.is-visible {
  animation: pw-copy-toast-fade 3s ease forwards;
}

@keyframes pw-copy-toast-fade {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 6px));
  }
  14% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  84% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 4px));
  }
}

.pw-strength-track {
  width: 100%;
  height: 10px;
  background: #e9eef8;
  border-radius: 999px;
  overflow: hidden;
}

.pw-strength-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #cc3a3a;
  transition: width 0.22s ease, background-color 0.22s ease;
}

.pw-strength-wrap.is-fair .pw-strength-fill {
  background: #d8841f;
}

.pw-strength-wrap.is-good .pw-strength-fill {
  background: #2f7a35;
}

.pw-strength-wrap.is-strong .pw-strength-fill {
  background: #1f8f5a;
}

.pw-strength-meta {
  margin: 8px 1px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: #2d426b;
}

.pw-controls {
  border: 1px solid #d2ddf2;
  border-radius: 14px;
  background: #f8fbff;
  padding: 14px;
}

.pw-length-row {
  margin-bottom: 14px;
}

.pw-length-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 15px;
  color: #12254e;
  font-weight: 600;
  cursor: pointer;
}

.pw-length-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(to right, #1b56c0 0%, #1b56c0 0%, #cad8f0 0%, #cad8f0 100%);
  border-radius: 999px;
  margin: 0;
  cursor: pointer;
}

.pw-length-row input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.pw-length-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1b56c0;
  border: 3px solid #ffffff;
  box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.7);
  margin-top: -9px;
  cursor: pointer;
}

.pw-length-row input[type="range"]::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.pw-length-row input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1b56c0;
  border: 3px solid #ffffff;
  box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.pw-character-sets {
  margin: 0;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.pw-character-sets legend {
  width: 100%;
  margin: 0 0 9px;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  color: #12254e;
  cursor: pointer;
}

.pw-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #132c58;
  cursor: pointer;
}

.pw-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #1b56c0;
  cursor: pointer;
}

.pw-validation {
  margin: 12px 1px 0;
  font-size: 14px;
  color: #b42318;
}

.pw-table-wrap {
  overflow-x: auto;
}

.pw-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.pw-table th,
.pw-table td {
  border-bottom: 1px solid #dbe4f4;
  text-align: left;
  padding: 10px 10px;
  vertical-align: top;
}

.pw-table th {
  color: #0f2148;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pw-table td {
  color: #1e335b;
  font-size: 15px;
}

.password-generator-page .calc-reference h3 {
  margin: 14px 0 4px;
  font-size: 18px;
}

@media (max-width: 900px) {
  .pw-strength-wrap {
    margin-bottom: 25px;
  }

  .pw-output-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "input regen"
      "copy copy";
    gap: 10px;
  }

  .pw-output-input {
    grid-area: input;
    font-size: 21px;
  }

  .pw-icon-btn {
    grid-area: regen;
    justify-self: end;
  }

  #pw-copy.pw-btn {
    grid-area: copy;
    justify-self: center;
    width: min(340px, 100%);
  }
}

@media (max-width: 720px) {
  .pw-output-row {
    padding: 8px 8px 8px 12px;
  }

  .pw-btn {
    padding: 10px 12px;
    font-size: 15px;
  }

  .pw-icon-btn {
    width: 36px;
    height: 36px;
  }
}
