:root {
  --bg: #0b0c0e;
  --bg-2: #12141a;
  --bg-3: #1a1d24;
  --ink: #ece7dc;
  --muted: #b7b1a3;
  --line: #2c3038;
  --line-strong: #6e7380;
  --gold: #c9a227;
  --gold-2: #e4c056;
  --ok: #5d9a70;
  --danger: #e07a70;
  --focus: #e4c056;
  --font: "Segoe UI", sans-serif;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 1000;
  background: var(--gold);
  color: #141208;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:not(:focus):not(:focus-visible) {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  min-height: 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  width: auto;
  height: auto;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  margin: 0;
  clip: auto;
  clip-path: none;
  overflow: visible;
  color: #141208;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.flash {
  padding: 0.75rem 1rem;
  margin: 1rem 0 0;
  border-left: 3px solid var(--gold);
  background: var(--bg-2);
}
.flash-success { border-color: var(--ok); }
.flash-error { border-color: var(--danger); }

.password-meter { margin-top: 0.85rem; }
.password-meter-track {
  height: 0.45rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  overflow: hidden;
}
.password-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--muted);
}
.password-meter[data-strength="weak"] .password-meter-fill { background: var(--danger); }
.password-meter[data-strength="fair"] .password-meter-fill { background: var(--gold); }
.password-meter[data-strength="good"] .password-meter-fill { background: var(--gold-2); }
.password-meter[data-strength="strong"] .password-meter-fill { background: var(--ok); }
.password-meter-label,
.password-reqs-heading {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.password-reqs {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
}
.password-reqs li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.28rem 0;
}
.password-reqs li::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
}
.password-reqs li.is-met { color: var(--ink); }
.password-reqs li.is-met::before {
  background: var(--ok);
  border-color: var(--ok);
}

.lightbox-trigger {
  display: block;
  cursor: zoom-in;
  text-decoration: none;
  color: inherit;
}
.lightbox-trigger img { display: block; }
.lightbox-trigger:hover,
.lightbox-trigger:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}
.lightbox[open] {
  display: grid;
  place-items: center;
}
.lightbox::backdrop {
  background: rgba(8, 9, 11, 0.92);
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  transform-origin: 50% 50%;
}
.lightbox img.zoomed { cursor: grab; }
.lightbox img.is-dragging { cursor: grabbing; }
.lightbox-toolbar {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem;
  background: rgba(8, 9, 11, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.lightbox:hover .lightbox-toolbar,
.lightbox:focus-within .lightbox-toolbar { opacity: 1; }
.lightbox-btn {
  min-width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
}
.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  border-color: var(--gold);
  color: var(--gold-2);
}
.lightbox-close form { margin: 0; }
.lightbox-zoom-label {
  min-width: 3.2ch;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
@media (hover: none) {
  .lightbox-toolbar { opacity: 1; }
}
.altcha-field { margin-top: 1rem; }
altcha-widget { display: block; }
