/* --- Libron ----------------------------------------------------------------
   Libron by Nico Verbruggen, SIL Open Font License 1.1.
   License text: static/fonts/libron/OFL.txt */
@font-face {
  font-family: 'Libron';
  src: url("../fonts/libron/Libron-Regular.5a1084e98df0.woff2") format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Libron';
  src: url("../fonts/libron/Libron-Italic.30484fa78171.woff2") format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Libron';
  src: url("../fonts/libron/Libron-Bold.db41d51f6ffe.woff2") format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Libron';
  src: url("../fonts/libron/Libron-BoldItalic.52d27b86e54d.woff2") format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* --- base ----------------------------------------------------------------- */
* { box-sizing: border-box; }

body {
  background: gray;
  margin: 0;
  min-height: 100vh;
  font-family: 'Libron', Georgia, serif;
  color: white;
}

/* Hide Alpine x-cloak elements until Alpine initialises. */
[x-cloak] { display: none !important; }

input {
  background: rgba(0, 0, 0, 0);
  border-color: white;
  border-style: hidden hidden dotted hidden;
  color: white;
  padding: 0.4rem 0.2rem;
  font-size: 1rem;
}
input::placeholder { color: rgba(255, 255, 255, 0.5); }

#title {
  display: block;
  anchor-name: --title;
  color: white;
  animation: glow 5s ease-in-out infinite alternate;
  text-shadow: 0 0 4px #fff;
  margin-bottom: 30vh;
}

.centering {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
  padding: 2rem;
}

@keyframes glow {
  from {
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
  }
  to {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9),
                 0 0 40px rgba(255, 255, 255, 0.4);
  }
}

/* --- buttons & links ------------------------------------------------------ */
.btn {
  background: rgba(0, 0, 0, 0);
  border: 1px dotted white;
  color: white;
  padding: 0.55rem 1.1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: text-shadow 0.2s, border-color 0.2s;
}
.btn:hover:not(:disabled) {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
}
.btn:disabled { opacity: 0.5; cursor: progress; }
.btn.primary { border-style: solid; }

.linkish {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline dotted;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}
.linkish:hover { color: white; }

/* --- landing gate --------------------------------------------------------- */
.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.gate form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.passkey-error {
  color: #ffb3b3;
  text-shadow: 0 0 8px rgba(255, 80, 80, 0.5);
  font-size: 0.9rem;
}
.magic-sent { text-align: center; max-width: 24rem; }
.hint { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }

/* --- console -------------------------------------------------------------- */
.centering:has(.console) { align-items: stretch; justify-content: flex-start; }

.console {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
}
.console-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
}
.console-title { font-size: 1.4rem; }

.panel {
  border: 1px dotted rgba(255, 255, 255, 0.5);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.panel h2 { margin-top: 0; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0.75rem 0; }

.pill {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 0.85rem;
}
.pill-on  { border-color: #9cffb0; color: #9cffb0; text-shadow: 0 0 8px #9cffb0; }
.pill-off { border-color: #ffb3b3; color: #ffb3b3; }

.passkey-list { list-style: none; padding: 0; }
.passkey-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px dotted rgba(255, 255, 255, 0.25);
}
.passkey-list li span:first-child { flex: 1; }
