
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

:root {
  --lp-bg: #F4F6F8;
  --lp-surface: #FFFFFF;
  --lp-text: #16202A;
  --lp-text-muted: #43535F;
  --lp-accent: #1B5FA8;
  --lp-accent-text: #FFFFFF;
  --lp-border: #D4DCE2;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lp-bg: #12181E;
    --lp-surface: #1A2129;
    --lp-text: #E7EDF2;
    --lp-text-muted: #AEBBC6;
    --lp-accent: #6FA8DC;
    --lp-accent-text: #0B1A26;
    --lp-border: #364049;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--lp-text);
  background: var(--lp-bg);
}

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--lp-surface);
  color: var(--lp-text);
  padding: 0.75rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

h1, h2 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--lp-text-muted); }
a { color: var(--lp-accent); }

.site-header {
  border-bottom: 1px solid var(--lp-border);
  padding: 1rem 0;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.125rem; color: var(--lp-text); }
.brand-mark { flex-shrink: 0; }
.signin-link {
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--lp-border);
  border-radius: 0.375rem;
}
.signin-link:hover { border-color: var(--lp-accent); }
/* Sign up sits beside Sign in as the filled one: the step a newcomer takes. */
.signup-link { background: var(--lp-accent); color: var(--lp-accent-text); border-color: var(--lp-accent); }
.signup-link:hover { opacity: 0.92; }
.header-links { display: flex; align-items: center; gap: 0.5rem; }

.hero { padding: 3.5rem 0 3rem; text-align: center; }
.hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); color: var(--lp-text); }
.hero .subhead {
  max-width: 40rem;
  margin: 0 auto 1.75rem;
  font-size: 1.125rem;
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 1.375rem;
  border-radius: 0.5rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--lp-accent); color: var(--lp-accent-text); }
.btn-primary:hover { opacity: 0.92; }
.btn-secondary { background: var(--lp-surface); color: var(--lp-text); border-color: var(--lp-border); }
.btn-secondary:hover { border-color: var(--lp-accent); }
.btn-ghost { background: transparent; color: var(--lp-text); border-color: transparent; text-decoration: underline; }

.feature { padding: 2.5rem 0; }
.feature-alt { background: var(--lp-surface); }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.feature-copy h2 { font-size: 1.5rem; color: var(--lp-text); }
.feature-copy p { font-size: 1.0625rem; }
.feature-art { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.art-caption { font-size: 0.8125rem; color: var(--lp-text-muted); margin: 0.25rem 0 0; text-align: center; }

/* Print-first illustration: a mock sheet of paper, two text columns, a
   dot-grid "QR" in the corner. */
.art-paper {
  position: relative;
  width: 100%;
  max-width: 20rem;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1.5rem rgba(22, 32, 42, 0.12);
  padding: 1.25rem 1rem;
  display: flex;
  gap: 0.75rem;
  transform: rotate(-1deg);
}
.art-paper-col { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.art-line { display: block; height: 0.4rem; border-radius: 0.2rem; background: var(--lp-border); }
.art-line.w-80 { width: 80%; }
.art-line.w-70 { width: 70%; }
.art-line.w-65 { width: 65%; }
.art-line.w-60 { width: 60%; }
.art-line.w-50 { width: 50%; }
.art-qr {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  background: var(--lp-text);
  padding: 3px;
  border-radius: 2px;
}
.art-qr span { background: var(--lp-surface); }
.art-qr span:nth-child(1), .art-qr span:nth-child(3), .art-qr span:nth-child(5),
.art-qr span:nth-child(7), .art-qr span:nth-child(9) { background: var(--lp-text); }

/* Shared card used by the gate/names/signups/export illustrations. */
.art-card {
  width: 100%;
  max-width: 20rem;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(22, 32, 42, 0.10);
}

.art-gate { text-align: left; }
.art-label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--lp-text-muted); margin-bottom: 0.375rem; }
.art-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--lp-border);
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  background: var(--lp-bg);
}
.art-lock {
  width: 0.875rem;
  height: 0.75rem;
  border: 2px solid var(--lp-text-muted);
  border-radius: 2px;
  position: relative;
  flex: none;
}
.art-lock::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 0.0625rem;
  width: 0.5rem;
  height: 0.5rem;
  border: 2px solid var(--lp-text-muted);
  border-bottom: none;
  border-radius: 0.375rem 0.375rem 0 0;
}
.art-input-dots { letter-spacing: 0.2em; color: var(--lp-text); font-weight: 700; }

.art-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--lp-border);
}
.art-row:last-child { border-bottom: none; }
.art-role { flex: 1; font-size: 0.9375rem; color: var(--lp-text); }
.art-name { font-size: 0.875rem; color: var(--lp-text-muted); }
.art-name-pending {
  display: inline-block;
  width: 4.5rem;
  height: 0.75rem;
  border-radius: 0.2rem;
  background: var(--lp-border);
}
.art-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--lp-text-muted);
  background: var(--lp-bg);
  border: 1px solid var(--lp-border);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
}
.art-tag-ok { color: #1E6B3B; border-color: #1E6B3B; background: transparent; }
@media (prefers-color-scheme: dark) { .art-tag-ok { color: #7DD39B; border-color: #7DD39B; } }

.art-signup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--lp-border);
}
.art-signup-row:last-child { border-bottom: none; }
.art-signup-info { flex: 1; min-width: 0; }
.art-signup-item { display: block; font-size: 0.9375rem; color: var(--lp-text); margin-bottom: 0.3125rem; }
.art-progress {
  height: 0.375rem;
  border-radius: 999px;
  background: var(--lp-border);
  overflow: hidden;
  margin-bottom: 0.25rem;
}
.art-progress-fill { display: block; height: 100%; width: 60%; background: var(--lp-accent); }
.art-progress-label { font-size: 0.75rem; color: var(--lp-text-muted); }
.art-btn {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--lp-accent);
  color: var(--lp-accent-text);
}
.art-btn-outline { background: transparent; color: var(--lp-accent); border: 1px solid var(--lp-accent); }

.art-stake-diagram { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.art-stake-card, .art-ward-card {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--lp-text);
}
.art-stake-card { border-color: var(--lp-accent); color: var(--lp-accent); }
.art-flow-arrow {
  width: 2px;
  height: 1.25rem;
  background: var(--lp-border);
  position: relative;
}
.art-flow-arrow::after {
  content: "";
  position: absolute;
  bottom: -0.3rem;
  left: 50%;
  transform: translateX(-50%);
  border-left: 0.3rem solid transparent;
  border-right: 0.3rem solid transparent;
  border-top: 0.4rem solid var(--lp-border);
}
.art-ward-row { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }

.art-export { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.art-terminal {
  width: 100%;
  background: #0F1720;
  color: #D5F2DE;
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
}
.art-terminal-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #4A5A66;
  margin-right: 0.3125rem;
}
.art-terminal-line { margin-top: 0.5rem; }

.site-footer {
  border-top: 1px solid var(--lp-border);
  padding: 2rem 0 2.5rem;
  font-size: 0.875rem;
}
.site-footer p { margin: 0 0 0.5em; }

.doc { max-width: 40rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.doc h1 { font-size: 1.5rem; }

@media (max-width: 44rem) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-art { order: -1; }
}

/* One row at a phone's width (390px). Sign in and Sign up both stay; on the
   narrowest screens the brand keeps its mark and its name goes visually
   hidden (screen readers still hear it), as the admin app's top bar does --
   Spanish's longer labels otherwise pushed the row past the screen. */
@media (max-width: 30rem) {
  .site-header { padding: 0.625rem 0; }
  .header-row { flex-wrap: nowrap; gap: 0.5rem; }
  .brand { font-size: 1rem; white-space: nowrap; }
  .signin-link { padding: 0.4rem 0.625rem; font-size: 0.875rem; white-space: nowrap; }
}
@media (max-width: 26.25rem) {
  .brand-name {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}

/* The public demo's front page (bulletin-54vr, demo.gohtml): the landing
   page's look, with one list of people to try the app as. */
.brand-link { text-decoration: none; }
.demo-hero { padding-bottom: 1.5rem; }
.demo-narrow { max-width: 40rem; }
.demo-people-section { padding: 0 0 2.5rem; }
.demo-people-section h2 { font-size: 1.125rem; color: var(--lp-text); }
.demo-people { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.demo-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 0.5rem;
  color: var(--lp-text);
  text-decoration: none;
}
.demo-person:hover { border-color: var(--lp-accent); }
.demo-person-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.demo-person-text strong { font-size: 1rem; }
.demo-person-text span { font-size: 0.875rem; color: var(--lp-text-muted); }
.demo-person-go { flex-shrink: 0; font-size: 1.25rem; color: var(--lp-accent); }
.demo-people li:first-child .demo-person { border-color: var(--lp-accent); border-width: 2px; }
.demo-note { font-size: 0.875rem; }
.demo-alert {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  border: 1px solid #A3231A;
  border-radius: 0.5rem;
  color: #A3231A;
  background: var(--lp-surface);
}
.demo-bulletins { justify-content: flex-start; }
