:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --navy-950: #061421;
  --navy-900: #0a1f32;
  --navy-800: #123b5d;
  --blue-500: #68bce9;
  --paper: #ffffff;
  --paper-ink: #0d2032;
  --paper-muted: #5c6875;
  --paper-line: #d9e2e9;
  --danger: #b42318;
  --success: #176b45;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--navy-950);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    linear-gradient(90deg, rgba(7, 24, 40, 0.76), rgba(7, 24, 40, 0.38)),
    url("group-littlejohn-coast.png?v=20260904-photo-restore") center / cover no-repeat fixed;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(44rem, calc(100% - 3rem));
  margin: auto;
  padding: 4.75rem 2rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: #d7e8f5;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.2em;
}

h1 {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7.2vw, 5.8rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
  white-space: nowrap;
}

.intro {
  max-width: 34rem;
  margin: 1.75rem auto 2.3rem;
  color: #eef5fa;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.65;
}

.contact {
  display: inline-block;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  background: #fff;
  color: #133f64;
  font-weight: 750;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.contact:hover, .contact:focus-visible { background: #e0edf5; transform: translateY(-1px); }

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  padding: 1.5rem;
  color: #e6eef4;
  font-size: 0.82rem;
  text-align: center;
}

.admin-link {
  padding: 0 0 0 0.7rem;
  border: 0;
  border-left: 1px solid rgba(230, 238, 244, 0.55);
  color: inherit;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.admin-link:hover, .admin-link:focus-visible { color: #fff; }

.admin-dialog {
  width: min(100% - 2rem, 61rem);
  max-height: min(90vh, 48rem);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 1.55rem;
  color: var(--paper-ink);
  background: transparent;
  box-shadow: 0 2.5rem 8rem rgba(0, 9, 18, 0.46);
}

.admin-dialog[open] { animation: reveal 210ms cubic-bezier(0.22, 0.75, 0.25, 1); }

.admin-dialog::backdrop {
  background: rgba(2, 12, 21, 0.62);
  -webkit-backdrop-filter: blur(11px) saturate(0.8);
  backdrop-filter: blur(11px) saturate(0.8);
  animation: veil 180ms ease-out;
}

.admin-frame {
  position: relative;
  overflow: auto;
  max-height: min(90vh, 48rem);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.55rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(105, 188, 233, 0.16), transparent 15rem),
    rgba(255, 255, 255, 0.97);
}

.admin-dialog:not(.is-unlocked) { width: min(100% - 2rem, 27rem); }
.unlock-panel { padding: 2.7rem 2.6rem 2.4rem; text-align: center; }

.close-button {
  position: absolute;
  z-index: 2;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #51606e;
  background: transparent;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.close-button:hover { color: var(--paper-ink); background: #edf3f7; }

.lock-mark {
  position: relative;
  display: grid;
  width: 3.65rem;
  height: 3.65rem;
  margin: 0 auto 1.35rem;
  place-items: center;
  border: 1px solid rgba(18, 59, 93, 0.16);
  border-radius: 1.05rem;
  color: #fff;
  background: linear-gradient(145deg, #0b2134, #18527d);
  box-shadow: 0 0.8rem 1.8rem rgba(13, 45, 70, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lock-mark::before {
  position: absolute;
  top: -0.62rem;
  width: 1.65rem;
  height: 1.25rem;
  border: 0.24rem solid #174c73;
  border-bottom: 0;
  border-radius: 1rem 1rem 0 0;
  content: "";
}

.lock-mark.is-open::before { transform: translateX(0.46rem) rotate(17deg); transform-origin: left bottom; }

.admin-eyebrow, .document-kicker {
  margin: 0 0 0.55rem;
  color: var(--navy-800);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.unlock-panel h2, .workspace-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 2.7rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.admin-intro {
  margin: 0.75rem 0 1.7rem;
  color: var(--paper-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.identity-list { display: grid; gap: 0.75rem; }

.identity-button {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 4.35rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--paper-line);
  border-radius: 1rem;
  color: var(--paper-ink);
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.identity-button:hover {
  border-color: #86b9d7;
  box-shadow: 0 0.75rem 1.7rem rgba(15, 58, 89, 0.1);
  transform: translateY(-1px);
}

.identity-button:disabled, .primary-button:disabled, .text-button:disabled { cursor: wait; opacity: 0.62; }

.identity-initial {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 0.8rem;
  color: #fff;
  background: #113b5b;
  font-weight: 850;
}

.identity-name { font-weight: 800; }
.identity-action { color: var(--paper-muted); font-size: 0.82rem; }
.identity-arrow { color: var(--navy-800); font-size: 1.2rem; }

.back-button, .text-button, .lock-button {
  border: 0;
  color: var(--navy-800);
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}

.back-button { display: block; margin: -0.65rem 0 1rem; padding: 0.25rem 0; }
#code-form { display: grid; gap: 0.8rem; }
#code-form label { color: var(--paper-ink); font-size: 0.88rem; font-weight: 800; text-align: left; }

#access-code {
  width: 100%;
  min-height: 4rem;
  padding: 0.75rem 1rem;
  border: 1px solid #b8c8d3;
  border-radius: 0.9rem;
  color: var(--paper-ink);
  background: #fff;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-align: center;
}

.primary-button {
  display: inline-flex;
  min-height: 3.35rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.1rem;
  border: 0;
  border-radius: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, #0c2d46, #17618e);
  box-shadow: 0 0.7rem 1.4rem rgba(13, 55, 83, 0.2);
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover { box-shadow: 0 0.9rem 1.8rem rgba(13, 55, 83, 0.28); transform: translateY(-1px); }
.text-button { margin-top: 1rem; padding: 0.4rem; }

.status-message {
  min-height: 1.35rem;
  margin: 0.85rem 0 0;
  color: var(--paper-muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.status-message[data-tone="error"] { color: var(--danger); }
.status-message[data-tone="success"] { color: var(--success); }
.admin-workspace { padding: clamp(2rem, 5vw, 3.25rem); }

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--paper-line);
}

.workspace-header .admin-intro { margin-bottom: 0; }
.lock-button { min-height: 2.75rem; padding: 0.5rem 0.8rem; border: 1px solid var(--paper-line); border-radius: 0.75rem; white-space: nowrap; }
.lock-button:hover { background: #edf3f7; }

.document-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.6rem;
  padding: 1.5rem;
  border: 1px solid var(--paper-line);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1rem 2.5rem rgba(17, 50, 76, 0.07);
}

.word-mark {
  display: grid;
  width: 3.4rem;
  height: 4rem;
  place-items: center;
  border-radius: 0.65rem;
  color: #fff;
  background: #185abd;
  font-size: 1.35rem;
  font-weight: 850;
}

.document-copy h3 { margin: 0 0 0.35rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; letter-spacing: -0.025em; }
.document-copy p:not(.document-kicker) { margin: 0 0 0.3rem; color: var(--paper-muted); line-height: 1.5; }
.document-copy small { color: #6c7884; }
.document-kicker { margin-bottom: 0.35rem; }
.document-button { white-space: nowrap; }
[hidden] { display: none !important; }

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
}

@keyframes veil { from { opacity: 0; } to { opacity: 1; } }
@keyframes reveal { from { opacity: 0; transform: translateY(0.55rem) scale(0.975); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 700px) {
  .admin-dialog { width: min(100% - 1rem, 61rem); max-height: calc(100dvh - 1rem); }
  .admin-dialog:not(.is-unlocked) { width: min(100% - 1rem, 27rem); }
  .admin-frame { max-height: calc(100dvh - 1rem); border-radius: 1.25rem; }
  .unlock-panel { padding: 2.5rem 1.35rem 1.8rem; }
  .identity-action { display: none; }
  .document-card { grid-template-columns: auto 1fr; align-items: start; padding: 1.15rem; }
  .document-button { grid-column: 1 / -1; width: 100%; }
  .workspace-header { gap: 1rem; }
}

@media (max-width: 420px) {
  .shell { width: min(100% - 2rem, 44rem); padding-inline: 1rem; }
  footer { flex-wrap: wrap; }
  .admin-workspace { padding: 2.5rem 1.1rem 1.25rem; }
  .workspace-header h2 { font-size: 2rem; }
  .lock-button { padding-inline: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
