/* lock.css - the login page shown until the correct password is entered.
   Self-contained: the real stylesheets only arrive with the decrypted page. */

:root {
  --bg: #0e1117;
  --bg-raised: #161b24;
  --bg-sunken: #0a0d13;
  --line: #232b38;
  --ink: #e6eaf2;
  --ink-dim: #9aa5b8;
  --ink-faint: #6b768a;
  --accent: #7c8cf8;
  --bad: #e0605f;

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Inter, Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fa;
    --bg-raised: #ffffff;
    --bg-sunken: #eceef4;
    --line: #dde1ea;
    --ink: #171b24;
    --ink-dim: #5b6479;
    --ink-faint: #8b93a5;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.lock {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lock-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 34px 28px 28px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.lock-mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  margin-bottom: 14px;
}

.lock-card h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  font-weight: 700;
}

.lock-hint {
  margin: 6px 0 22px;
  font-size: 0.86rem;
  color: var(--ink-faint);
}

.lock-field {
  position: relative;
  width: 100%;
}

#lock-pw {
  width: 100%;
  font: inherit;
  font-size: 1rem;          /* 16px minimum, or iOS zooms the page on focus */
  color: var(--ink);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 58px 12px 14px;
}

#lock-pw::placeholder { color: var(--ink-faint); }

#lock-pw:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.lock-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font: inherit;
  font-size: 0.76rem;
  color: var(--ink-faint);
  background: none;
  border: 0;
  padding: 6px 8px;
  cursor: pointer;
}

.lock-eye:hover { color: var(--ink); }

.lock-go {
  width: 100%;
  margin-top: 12px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  color: #0e1117;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
}

.lock-go:hover { filter: brightness(1.08); }

.lock-go[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.lock-error {
  margin: 14px 0 0;
  font-size: 0.84rem;
  color: var(--bad);
}

.lock-error[hidden] { display: none; }
