/* Password generator. Contained width; tokens from layout.css. */

body {
  --copy: #eef4f8;
}

body.grid-bg {
  background:
    radial-gradient(ellipse 70% 52% at 50% 36%, rgba(0, 170, 210, 0.22) 0%, transparent 48%),
    radial-gradient(ellipse 90% 46% at 50% 100%, rgba(4, 14, 24, 0.88) 0%, transparent 58%),
    #050c14;
}

body.grid-bg::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 38%, transparent 44%, rgba(4, 10, 18, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 216, 240, 0.05) 0%, transparent 18%, transparent 78%, rgba(4, 14, 24, 0.45) 100%);
}

main,
.footer { position: relative; z-index: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.tool-page {
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 56px;
}

.tool-intro {
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
}

.tool-intro .label {
  font-size: 13px;
  color: var(--copy);
}

.tool-intro h1 {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 10px 0 12px;
}

.tool-intro h1 .a { color: var(--lime); }

.tool-intro p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--copy);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 18px;
}

.trust span {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copy);
}

.trust span::before {
  content: "◆";
  color: var(--lime);
  margin-right: 8px;
  font-size: 8px;
}

.board {
  display: grid;
  grid-template-columns: minmax(280px, 0.36fr) minmax(0, 0.64fr);
  border: 1px solid rgba(0, 216, 240, 0.28);
  background: rgba(5, 12, 20, 0.62);
  box-shadow: 0 0 80px rgba(0, 216, 240, 0.1);
}

.board-setup {
  padding: 22px 20px 24px;
  border-right: 1px solid var(--line);
}

.mode-tags {
  display: flex;
  gap: 8px;
  border: 0;
  margin-bottom: 20px;
}

.mode-tags label,
.tags label { cursor: pointer; }

.mode-tags input,
.tags input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-tags span,
.tags span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #143044;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8eef4;
  background: transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.mode-tags label:hover span,
.tags label:hover span {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mode-tags label:active span,
.tags label:active span {
  border-color: #5eefff;
  color: #041018;
  background: #5eefff;
}

.mode-tags label:has(input:checked) span,
.tags label:has(input:checked) span {
  border-color: var(--lime);
  color: #041018;
  background: var(--lime);
}

.mode-tags label:has(input:checked):hover span,
.tags label:has(input:checked):hover span {
  border-color: #7ef4ff;
  background: #7ef4ff;
  color: #041018;
}

.mode-tags label:has(input:checked):active span,
.tags label:has(input:checked):active span {
  border-color: #00b4cc;
  background: #00b4cc;
  color: #041018;
}

.rules { display: grid; gap: 16px; }

.rules[hidden] { display: none; }

.rule { display: block; }

.rule > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copy);
}

.rule > span em {
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #c8d6e0;
}

.rule-slide {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 12px;
  align-items: center;
}

.rule input[type="range"] {
  width: 100%;
  height: 2px;
  accent-color: var(--lime);
}

.rule input[type="number"],
.rule input[type="text"],
.rule select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  background: transparent;
  color: var(--white);
  font: inherit;
}

.rule input[type="number"] {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.rule input:focus,
.rule select:focus {
  outline: none;
  border-bottom-color: var(--lime);
}

.rule select option { background: #050c14; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hint {
  margin-top: 8px;
  font-size: 13px;
  color: #fbbf24;
}

.board-out {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.strength-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.strength-label,
.strength-text {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copy);
}

.strength-text { color: var(--lime); }

.strength-track {
  width: 72px;
  height: 2px;
  background: #143044;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  background: var(--lime);
  transition: width 0.3s ease;
}

.strength-fill.weak { background: #737373; }
.strength-fill.medium { background: #eab308; }
.strength-fill.strong,
.strength-fill.very-strong { background: var(--lime); }

.result-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-tools .btn {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.setup-actions .btn:hover,
.result-tools .btn:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.setup-actions .btn:active,
.result-tools .btn:active {
  border-color: var(--lime);
  color: #041018;
  background: var(--lime);
}

.setup-actions .btn-solid:hover {
  border-color: #7ef4ff;
  background: #7ef4ff;
  color: #041018;
}

.setup-actions .btn-solid:active {
  border-color: #00b4cc;
  background: #00b4cc;
  color: #041018;
}

.result-list { display: flex; flex-direction: column; }

.result-list .craft-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.result-list .craft-item:last-child { border-bottom: 0; }

.result-list .craft-item.is-on .name,
.result-list .craft-item.is-on .num {
  color: var(--lime);
}

.craft-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.result-list .name {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  word-break: break-all;
  color: #e8e8e8;
}

.result-list .num {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--lime);
  flex-shrink: 0;
}

.result-list .copy-one {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--lime);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--lime);
  background: transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.result-list .copy-one:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.result-list .copy-one:active {
  border-color: var(--lime);
  color: #041018;
  background: var(--lime);
}

.password-result-tools {
  padding: 16px 20px 24px;
}

.chapter {
  padding: 28px 24px 12px;
  margin: 0 0 24px;
  border: 1px solid rgba(0, 216, 240, 0.28);
  background: rgba(5, 12, 20, 0.62);
  box-shadow: 0 0 64px rgba(0, 216, 240, 0.08);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(200px, 1.05fr);
  gap: 20px 48px;
  align-items: end;
  margin-bottom: 24px;
}

.sec-head h2 {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.sec-head h2 em {
  font-style: normal;
  color: var(--lime);
}

.craft-lead {
  color: var(--copy);
  font-size: 15px;
  line-height: 1.7;
  max-width: 520px;
}

.line-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

.line-item {
  display: block;
  width: 100%;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.line-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.line-item .name,
.next-item .name {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #d2d2d2;
}

.line-item .num,
.next-item .num {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #b8b8b8;
}


.line-desc {
  display: block;
  margin-top: 10px;
  color: var(--copy);
  font-size: 15px;
  line-height: 1.7;
}

.line-desc a {
  color: var(--lime);
  letter-spacing: 0.06em;
}

.line-desc a::after {
  content: " →";
  opacity: 0.5;
}

.line-desc a:hover { color: #5eefff; }

.line-desc code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #f5f5f5;
}

.next {
  padding-bottom: 28px;
  margin-bottom: 64px;
}

.next-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
}

.next-item {
  min-width: 160px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

@media (hover: hover) and (pointer: fine) {
  .result-list .craft-item:hover .name {
    color: #fff;
  }

  .result-list .craft-item.is-on:hover .name,
  .result-list .craft-item.is-on:hover .num {
    color: #7ef4ff;
  }

  .line-item:hover .name,
  .next-item:hover .name,
  .line-item:hover .num,
  .next-item:hover .num {
    color: var(--lime);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(12px);
  z-index: 200;
  padding: 12px 20px;
  border: 1px solid var(--lime);
  background: #050c14;
  color: var(--lime);
  font-size: 13px;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
  .board-setup { border-right: 0; border-bottom: 1px solid var(--line); }
  .sec-head,
  .line-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .line-desc { display: none; }
  .line-item.is-on .line-desc { display: block; }
  .line-item.is-on .name,
  .line-item.is-on .num { color: var(--lime); }
  .next-item { width: 100%; }
}
