/*
 * SIGN IN, ADD STAFF, SCAN TO JOIN. Light theme only, the Prime look: Inter,
 * forest #0b3d2e, lime #dcef4e, white cards on warm paper. These screens stay
 * light in dark mode on purpose (a QR must be dark on white, and the first
 * screen a person sees should look the same on every phone).
 *
 * RULES KEPT: no coloured side stripes (colour sits on a figure, an icon or a
 * dot); no pale green fills (a chosen item lifts: white, shadow, bold label,
 * forest tick); motion is opacity and transform only and settles at once under
 * prefers-reduced-motion.
 */

.acc {
  --a-bg: #f3f2ed;
  --a-card: #ffffff;
  --a-ink: #101a15;
  --a-ink2: #5a655f;
  --a-ink3: #8d958f;
  --a-line: rgba(16, 26, 21, 0.1);
  --a-forest: #0b3d2e;
  --a-lime: #dcef4e;
  --a-red: #c2362b;
  --a-amber: #a86a12;
  --a-green: #17734a;
  --a-shadow: 0 1px 2px rgba(16, 26, 21, 0.05), 0 6px 18px rgba(16, 26, 21, 0.07);
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--a-bg);
  color: var(--a-ink);
  font-family: Inter, "Noto Sans", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  color-scheme: light;
  overflow-y: auto;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
.acc *,
.acc *::before,
.acc *::after {
  box-sizing: border-box;
}
:where(.acc button, .acc input, .acc select) {
  font: inherit;
  color: inherit;
}
.acc :focus-visible {
  outline: 3px solid var(--a-forest);
  outline-offset: 2px;
}

.acc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 8px 16px 0;
}
.acc-top-r {
  display: flex;
  gap: 8px;
}
.acc-back {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--a-card);
  box-shadow: var(--a-shadow);
  cursor: pointer;
}
.acc-back .ico {
  width: 18px;
  height: 18px;
}
/* Remy's mark: a forest circle with a lime dot, and nothing else. */
.acc-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--a-forest);
  display: grid;
  place-items: center;
}
.acc-mark span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--a-lime);
}

.acc-body {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.acc-h {
  margin: 8px 0 0;
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.acc-sub {
  margin: -6px 0 0;
  color: var(--a-ink2);
  font-size: 1rem;
}

/* ── breeze in, breeze out ── */
.acc-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: accIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.acc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.acc-step[data-leaving] {
  animation: accOut 0.17s ease-in both;
}
@keyframes accIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes accOut {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .acc-step,
  .acc-step[data-leaving] {
    animation: none;
  }
}

/* ── fields ── */
.acc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.acc-label {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--a-ink2);
}
.acc-caption {
  font-size: 0.8125rem;
  color: var(--a-ink2);
}
.acc-in,
.acc-select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--a-line);
  border-radius: 14px;
  background: var(--a-card);
  font-size: 1.0625rem;
}
.acc-in::placeholder {
  color: var(--a-ink3);
}
.acc-in:focus,
.acc-select:focus {
  border-color: var(--a-forest);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.14);
}

/* ── buttons ── */
.acc-btn {
  min-height: 54px;
  width: 100%;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--a-forest);
  color: var(--a-lime);
  font-size: 1.0625rem;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.15s;
}
.acc-btn:active:not(:disabled) {
  transform: scale(0.985);
}
.acc-btn:disabled {
  background: #c9d3cd;
  color: #66746d;
  cursor: default;
}
.acc-btn-quiet:disabled {
  background: var(--a-card);
  color: var(--a-ink3);
  box-shadow: none;
}
.acc-btn-quiet {
  background: var(--a-card);
  color: var(--a-forest);
  box-shadow: var(--a-shadow);
}
.acc-link {
  align-self: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--a-forest);
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.acc-link:disabled {
  color: var(--a-ink3);
  text-decoration: none;
  cursor: default;
}
.acc-spin {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2.5px solid rgba(220, 239, 78, 0.35);
  border-top-color: var(--a-lime);
  animation: accSpin 0.7s linear infinite;
}
.acc-spin-dark {
  border-color: rgba(11, 61, 46, 0.2);
  border-top-color: var(--a-forest);
}
@keyframes accSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .acc-spin {
    animation-duration: 2s;
  }
}

/* ── the six boxes ── */
.acc-code {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.acc-box {
  width: 100%;
  aspect-ratio: 1 / 1.2;
  min-height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 1px solid var(--a-line);
  border-radius: 14px;
  background: var(--a-card);
  padding: 0;
  caret-color: var(--a-forest);
}
.acc-box[data-filled] {
  border-color: var(--a-forest);
  box-shadow: var(--a-shadow);
}
.acc-box:focus {
  border-color: var(--a-forest);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.14);
}

/* ── messages ── */
.acc-problem {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--a-card);
  box-shadow: var(--a-shadow);
  color: var(--a-ink);
  font-size: 0.9375rem;
}
.acc-problem .ico {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--a-red);
}
.acc-demo {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--a-lime);
  color: var(--a-forest);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ── cards ── */
.acc-card {
  background: var(--a-card);
  border-radius: 20px;
  box-shadow: var(--a-shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.acc-who {
  display: flex;
  gap: 12px;
  align-items: center;
}
.acc-ava {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--a-forest);
  color: var(--a-lime);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}
.acc-who b {
  display: block;
  font-size: 1.125rem;
}
.acc-who > span > span {
  color: var(--a-ink2);
  font-size: 0.9375rem;
}
.acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--a-bg);
  font-size: 0.8125rem;
  font-weight: 650;
}
.acc-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--a-ink3);
  flex: none;
}
.acc-dot[data-t="ok"] {
  background: var(--a-green);
}
.acc-dot[data-t="wait"] {
  background: var(--a-amber);
}
.acc-dot[data-t="bad"] {
  background: var(--a-red);
}

/* ── the QR screen ── */
.acc-qrwrap {
  align-self: center;
  padding: 14px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--a-shadow);
}
.acc-qr {
  display: grid;
  place-items: center;
}
.acc-qr img {
  display: block;
  border-radius: 8px;
}
.acc-mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.acc-codebox {
  align-self: center;
  width: 100%;
  min-height: 64px;
  padding: 0 12px;
  border: 0;
  border-radius: 18px;
  background: var(--a-card);
  box-shadow: var(--a-shadow);
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--a-forest);
  text-align: center;
  cursor: pointer;
  user-select: all;
}
a.acc-link {
  display: inline-flex;
  align-items: center;
}
.acc-expiry {
  text-align: center;
  font-weight: 650;
  color: var(--a-ink2);
}
.acc-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.acc-danger {
  color: var(--a-red);
}

/* ── lists ── */
.acc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.acc-item {
  background: var(--a-card);
  border-radius: 18px;
  box-shadow: var(--a-shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.acc-item b {
  font-size: 1.0625rem;
}
.acc-item small {
  color: var(--a-ink2);
  font-size: 0.875rem;
}
.acc-warn {
  color: var(--a-amber);
  font-size: 0.875rem;
  font-weight: 600;
}
.acc-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.acc-mini {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--a-bg);
  font-weight: 650;
  font-size: 0.9375rem;
  cursor: pointer;
}
.acc-mini[data-primary] {
  background: var(--a-forest);
  color: var(--a-lime);
}
.acc-mini[data-danger] {
  color: var(--a-red);
}

/* ── choosing sites: a chosen one lifts, white with a shadow, bold, a forest tick ── */
.acc-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.acc-pick {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--a-line);
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.acc-pick[aria-pressed="true"] {
  background: var(--a-card);
  border-color: transparent;
  box-shadow: var(--a-shadow);
  font-weight: 750;
}
.acc-pick .ico {
  width: 16px;
  height: 16px;
  color: var(--a-forest);
}

/* ── scanning ── */
.acc-cam {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: #0b1511;
  box-shadow: var(--a-shadow);
}
.acc-cam video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.acc-cam-frame {
  position: absolute;
  inset: 18%;
  border: 3px solid var(--a-lime);
  border-radius: 22px;
  pointer-events: none;
  opacity: 0.9;
}
.acc-cam-off {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  color: #e6ece9;
}
.acc-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ── welcome ── */
.acc-welcome {
  margin-top: 8vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.acc-tick {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: var(--a-forest);
  display: grid;
  place-items: center;
  color: var(--a-lime);
  animation: accPop 0.5s cubic-bezier(0.2, 1.15, 0.3, 1) both;
}
.acc-tick .ico {
  width: 38px;
  height: 38px;
}
@keyframes accPop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .acc-tick {
    animation: none;
  }
}
