/* Welcome, sign in, code and sign-up in the Afrilima style guide (docs/style-guide). Loaded after entry.css. */
.auth.entry { background: var(--af-ivory); font-family: var(--af-font); color: var(--af-body); }
.entry .ab { max-width: 480px; gap: 16px; }
.entry .e-brand { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 1.45rem; color: var(--af-forest-900); text-decoration: none; align-self: center; }
.entry .e-card { background: var(--af-white); border: 1px solid var(--af-line); border-radius: 16px; box-shadow: var(--af-shadow-card); padding: 32px; display: grid; gap: 18px; min-width: 0; }
.entry .e-card h1 { font-size: 2rem; font-weight: 800; line-height: 1.15; color: var(--af-ink); letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.entry .e-tagline { color: var(--af-forest-700); font-weight: 700; font-size: var(--af-text-lg); margin: -10px 0 0; }
.entry .e-lead { color: var(--af-body); margin: 0; }
.entry .e-help { font-size: var(--af-text-sm); color: var(--af-muted); margin: 0; }
.entry .e-step { display: grid; gap: 8px; }
.entry .e-eyebrow { font-size: var(--af-text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--af-clay-600); }
.entry .e-bars { display: grid; grid-auto-flow: column; gap: 6px; }
.entry .e-bars i { height: 6px; border-radius: 999px; background: var(--af-neutral-bg); }
.entry .e-bars i.on { background: var(--af-leaf-600); }
.entry .e-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; list-style: none; padding: 0; margin: 0; }
.entry .e-steps li { display: grid; gap: 6px; font-size: var(--af-text-xs); font-weight: 600; color: var(--af-muted); }
.entry .e-steps li::before { content: ""; height: 6px; border-radius: 999px; background: var(--af-neutral-bg); }
.entry .e-steps li.on::before { background: var(--af-leaf-600); }
.entry .e-steps li.cur { color: var(--af-ink); }

.entry .e-btn { min-height: 52px; padding: 0 20px; border-radius: var(--af-radius-button); border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: var(--af-text-md); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: none; }
.entry .e-primary { background: var(--af-harvest-400); color: var(--af-forest-900); }
.entry .e-primary:hover { background: var(--af-harvest-500); }
.entry .e-secondary { background: var(--af-white); color: var(--af-forest-700); border-color: var(--af-forest-700); }
.entry .e-block { width: 100%; }
.entry .e-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.entry .e-link { color: var(--af-forest-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.entry .e-btn:focus-visible, .entry a:focus-visible, .entry button:focus-visible, .entry input:focus-visible { outline: 3px solid var(--af-sprout-400); outline-offset: 2px; }

.entry .e-field { display: grid; gap: 6px; min-width: 0; }
.entry .e-field > label, .entry .e-legend, .entry .lbl { font-weight: 600; color: var(--af-ink); font-size: var(--af-text-sm); }
.entry .e-req { color: var(--af-danger-fg); }
.entry .e-opt { color: var(--af-muted); font-weight: 400; }
.entry .in, .entry .e-input { width: 100%; min-height: 52px; border: 1px solid var(--af-line-strong); border-radius: var(--af-radius-input); padding: 0 14px; background: var(--af-white); color: var(--af-ink); font: inherit; font-size: var(--af-text-md); box-shadow: none; }
.entry select.in, .entry select.e-input { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231f513b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.entry .in:focus, .entry .e-input:focus { outline: 3px solid var(--af-mint-100); border-color: var(--af-leaf-600); }
.entry .err { color: var(--af-danger-fg); font-size: var(--af-text-sm); }
.entry .e-phone { display: grid; grid-template-columns: auto 1fr; }
.entry .e-phone > span { display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--af-line-strong); border-right: 0; border-radius: var(--af-radius-input) 0 0 var(--af-radius-input); background: var(--af-ivory); font-weight: 600; color: var(--af-ink); }
.entry .e-phone .e-input { border-radius: 0 var(--af-radius-input) var(--af-radius-input) 0; }
.entry .e-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* welcome */
.entry .e-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.entry .e-feat { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--af-ink); font-size: var(--af-text-sm); }
.entry .e-tile { width: 40px; height: 40px; border-radius: 10px; background: var(--af-mint-100); color: var(--af-forest-700); display: grid; place-items: center; flex: none; }
.entry .lpick { margin: 0; }
.entry .lpick .lbl { display: block; margin-bottom: 6px; }

/* sign in */
.entry .e-or { display: flex; align-items: center; gap: 12px; color: var(--af-muted); font-size: var(--af-text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.entry .e-or::before, .entry .e-or::after { content: ""; flex: 1; height: 1px; background: var(--af-line); }
.entry .e-off { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--af-line-strong); border-radius: var(--af-radius-card); color: var(--af-muted); font-size: var(--af-text-sm); }
.entry .e-off .e-badge { margin-left: auto; }
.entry .e-badge { display: inline-flex; align-items: center; font-size: var(--af-text-xs); font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; color: var(--af-neutral-fg); background: var(--af-neutral-bg); }
.entry .e-info { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--af-radius-card); font-size: var(--af-text-sm); align-items: flex-start; background: var(--af-mint-100); color: var(--af-forest-900); }
.entry .e-info svg { flex: none; margin-top: 1px; }
.entry .e-note { padding: 12px 14px; border-radius: var(--af-radius-card); font-size: var(--af-text-sm); background: var(--af-butter-100); color: var(--af-pending-fg); }

/* code */
.entry .e-code { letter-spacing: .5em; text-align: center; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.entry .e-check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.entry .e-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--af-leaf-600); }
.entry .e-check b { color: var(--af-ink); font-size: var(--af-text-sm); display: block; }

/* sign-up roles */
.entry .e-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.entry .e-roles legend { padding: 0; margin-bottom: 8px; }
.entry .e-rc { position: relative; border: 1px solid var(--af-line); border-radius: var(--af-radius-card); padding: 12px; display: grid; gap: 8px; cursor: pointer; background: var(--af-white); }
.entry .e-rc input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.entry .e-rc b { color: var(--af-ink); font-size: var(--af-text-sm); }
.entry .e-rc small { color: var(--af-muted); font-size: var(--af-text-xs); line-height: 1.35; display: block; }
.entry .e-rc:has(input:checked) { border: 2px solid var(--af-leaf-600); background: var(--af-mint-50); padding: 11px; }
.entry .e-rc:has(input:focus-visible) { outline: 3px solid var(--af-sprout-400); outline-offset: 2px; }
.entry .vpick .note { background: var(--af-butter-100); color: var(--af-pending-fg); border-radius: var(--af-radius-card); padding: 10px 12px; font-size: var(--af-text-sm); }

.entry .e-foot { text-align: center; font-size: var(--af-text-sm); color: var(--af-muted); margin: 0; }
.entry .e-foot a, .entry .e-langs a { color: var(--af-forest-700); font-weight: 600; }
.entry .e-langs { text-align: center; font-size: var(--af-text-sm); color: var(--af-muted); }
.entry .e-out { text-align: center; }
.entry .e-out button { background: none; border: 0; color: var(--af-forest-700); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

@media (max-width: 900px) {
  .entry .e-card { padding: 22px 18px; }
  .entry .e-card h1 { font-size: 1.75rem; }
  .entry .e-btn { font-size: var(--af-text-md); }
}
@media (max-width: 340px) { .entry .e-roles, .entry .e-two { grid-template-columns: 1fr; } }
.entry .ab, .entry .e-card > *, .entry .e-two > *, .entry .e-field > * { min-width: 0; }
.entry .e-card .wslides, .entry .e-card .entry-sponsor { max-width: 100%; overflow: hidden; }


/* Compact sign-up (Joel, 28 Nov 2026): one-line role tiles; "Make Afrilima yours" and the step on one line. */
.entry .e-roles .e-rc { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 10px; font-weight: 700; color: var(--af-ink); font-size: 15px; }
.entry .e-roles .e-rc:has(input:checked) { padding: 0 9px; }
.entry .e-rc svg { color: var(--af-forest-700); flex: none; }
.entry .e-stepline { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; }
.entry .e-stepline span:first-child { color: var(--af-clay-600); letter-spacing: .06em; text-transform: uppercase; }
.entry .e-stepline span:last-child { color: var(--af-muted); font-weight: 600; }
.entry .e-card h1 { font-size: 1.6rem; }
.entry .e-input, .entry .in { min-height: 46px; }
.entry .e-btn { min-height: 48px; }
.entry .e-small { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--af-muted); }
.entry .e-small button { background: none; border: 0; padding: 0; color: var(--af-forest-700); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-width: 900px) { .entry .e-card h1 { font-size: 1.5rem; } }
/* Sign in on phones fits one screen: the phone option and the safety note become single compact lines. */
@media (max-width: 900px) {
  .entry .e-or { display: none; }
  .entry .e-off { padding: 8px 12px; font-size: 13px; }
  .entry .e-off br { display: none; }
  .entry .e-off span:nth-of-type(1) b::after { content: " · "; font-weight: 400; }
  .entry .e-info { padding: 8px 12px; font-size: 13px; }
  .entry .e-langs { font-size: 13px; line-height: 1.5; }
  .entry .e-lead { font-size: 15px; }
}
@media (max-width: 900px) {
  .form-page .entry .e-brand { display: none; }
}
/* gender: a two-way switch the height of a field */
.entry .e-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--af-white); border: 1px solid var(--af-line-strong); border-radius: var(--af-radius-input); padding: 3px; gap: 3px; height: 46px; }
.entry .e-seg label { position: relative; display: grid; place-items: center; border-radius: 6px; font-size: 15px; cursor: pointer; color: var(--af-body); font-weight: 600; }
.entry .e-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.entry .e-seg label:has(input:checked) { background: var(--af-mint-100); color: var(--af-forest-900); }
.entry .e-seg label:has(input:focus-visible) { outline: 3px solid var(--af-sprout-400); }
.entry fieldset.e-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.entry fieldset.e-field legend { padding: 0; margin-bottom: 6px; }
/* Sign-up and sign-in on computers (Joel, 28 Nov 2026): a narrower form, one field per line, smaller text. */
@media (min-width: 901px) {
  .form-page .stage { grid-template-columns: minmax(0, 1.25fr) minmax(380px, 430px); }
  .form-page .entry .e-card h1 { font-size: 1.45rem; }
  .form-page .entry .e-input, .form-page .entry .in { min-height: 40px; height: 40px; font-size: 14.5px; padding: 0 12px; }
  .form-page .entry .e-phone > span { font-size: 14.5px; padding: 0 12px; }
  .form-page .entry .e-field > label, .form-page .entry .e-legend, .form-page .entry .lbl { font-size: 13px; }
  .form-page .entry .e-help, .form-page .entry .e-lead { font-size: 13px; }
  .form-page .entry .e-btn { min-height: 44px; font-size: 15px; }
  .form-page .entry .e-seg { height: 40px; }
  .form-page .entry .e-seg label { font-size: 14px; }
  .form-page .entry .e-field { gap: 4px; }
  .form-page .tile { padding: 22px 26px 18px; }
}
/* phones: one field per line still fits one screen */
@media (max-width: 900px) {
  .entry .e-one .e-input { min-height: 42px; height: 42px; }
  .entry .e-one .e-seg { height: 42px; }
  .entry .e-one .e-field { gap: 3px; }
  .entry .e-one .e-field > label, .entry .e-one .e-legend { font-size: 13.5px; }
}
/* sign-up fits one screen with one field per line */
@media (min-width: 901px) { .form-page .entry .e-brand-join { display: none; } }
.entry .e-one { gap: 8px !important; }
@media (max-width: 900px) {
  .entry .e-one { gap: 6px !important; }
  .entry .e-one .e-input, .entry .e-one .e-seg { min-height: 40px; height: 40px; }
  .entry .e-one h1 { font-size: 1.3rem; }
  .entry .e-join-small span { display: none; }
}
@media (max-width: 900px) { .entry .e-one .e-field { gap: 2px; } .form-page .side { padding-top: 10px; } }

/* Where do you live (Joel, 28 Nov 2026): one field per line, locked until the one above is chosen,
   at most 6 suggestions under District and Village. */
.entry .vpick { display: grid; gap: 8px; }
.entry .vpick .e-field { position: relative; gap: 4px; }
.entry .vpick select.e-input { appearance: none; padding-right: 34px; background: var(--af-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231f513b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.entry .vpick .e-input:disabled { background-color: var(--af-neutral-bg); color: var(--af-muted); border-color: var(--af-line); cursor: not-allowed; opacity: 1; }
.entry .vp-box { position: relative; }
.entry .vp-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--af-muted); pointer-events: none; }
.entry .vp-box .e-input { padding-left: 38px; }
.entry .vp-sugg { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--af-white); border: 1px solid var(--af-line); border-radius: 10px; box-shadow: 0 12px 28px rgba(18,59,39,.16); }
.entry .vp-sugg li { padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--af-ink); font-size: 14.5px; }
.entry .vp-sugg li:hover { background: var(--af-mint-100); }
.entry .vp-sugg .vp-add { color: var(--af-forest-700); font-weight: 600; border-top: 1px solid var(--af-line); border-radius: 0 0 8px 8px; }
.entry .vp-sugg .vp-none { color: var(--af-muted); cursor: default; }
@media (min-width: 901px) {
  .form-page .entry .vpick .e-input { min-height: 40px; height: 40px; font-size: 14.5px; }
  .form-page .entry .vpick .e-field > label { font-size: 13px; }
}
@media (max-width: 900px) {
  .entry .vpick { gap: 6px; }
  .entry .vpick .e-field { gap: 2px; }
  .entry .vpick .e-input { min-height: 40px; height: 40px; }
  .entry .vpick .e-field > label { font-size: 13.5px; }
  .entry [data-step="2"] .e-lead { display: none; }
}
/* suggestions float over the form instead of making it scroll; the village list opens upwards */
.form-page .tile { overflow: visible; }
.entry .vp-sugg.up { top: auto; bottom: calc(100% - 22px); margin: 0 0 4px; }
/* location step fits one screen */
@media (min-width: 901px) {
  .form-page .tile { max-height: calc(100dvh - 56px); }
  .form-page .entry .vpick { gap: 6px; }
}
@media (max-width: 900px) {
  .form-page .panel, .form-page .panel .band-logo { height: 48px; }
  .entry .vpick { gap: 4px; }
  .entry .vpick .e-input { min-height: 38px; height: 38px; font-size: 15px; }
  .entry .vpick .e-field > label { font-size: 13px; }
  .entry [data-step="2"] { gap: 6px !important; }
  .entry [data-step="2"] h1 { font-size: 1.15rem; }
  .entry [data-step="2"] > .e-help { font-size: 12px; line-height: 1.35; }
}
/* Phones (Joel, 29 Nov 2026): back to the agreed Growapp look. A tall photo with the story video and the logo,
   then the form card below it (no overlap); the page scrolls. */
@media (max-width: 900px) {
  .form-page .panel, .form-page .panel.panel { height: 300px; border-radius: 0 0 22px 22px; }
  .form-page .panel video { display: block; }
  .form-page .panel::before { background: linear-gradient(180deg, rgba(18,59,39,.35) 0%, rgba(18,59,39,0) 30%, rgba(18,59,39,0) 60%, rgba(18,59,39,.75) 100%); }
  .form-page .panel .band-logo { top: auto; bottom: 14px; height: auto; font-size: 1.35rem; }
  .form-page .panel .band-logo svg { width: 30px; height: 30px; }
  .form-page .side.entry { margin-top: 14px; padding: 0 14px 20px; background: none; border-radius: 0; }
  .form-page .tile { background: var(--af-white); border: 1px solid var(--af-line); border-radius: 18px; padding: 18px 16px; box-shadow: 0 6px 20px rgba(18,59,39,.06); max-height: none; overflow: visible; }
  .form-page .page, .form-page .stage { height: auto; min-height: 0; overflow: visible; }
}
html:has(.form-page), html:has(.form-page) body { overflow-y: auto; }
/* Sign-in, code and sign-up on phones (Joel, 29 Nov 2026): same sizes as the welcome page so the step fits one screen;
   shorter photo, smaller text, tighter card. */
@media (max-width: 900px) {
  .form-page .panel, .form-page .panel.panel { height: 144px; margin: 0 12px; border-radius: 16px; }
  .page.form-page { padding-top: 10px; }
  .form-page .panel .band-logo { bottom: 12px; font-size: 1.1rem; }
  .form-page .panel .band-logo svg { width: 24px; height: 24px; }
  .form-page .side.entry { margin-top: 8px; padding: 0 12px 10px; }
  .form-page .tile { padding: 14px 14px 12px; border-radius: 16px; gap: 8px; }
  .form-page .tile .e-card { gap: 9px; }
  .entry .e-stepline, .entry .e-step { font-size: 11px; }
  .entry .e-card h1 { font-size: 1.25rem; line-height: 1.2; }
  .entry .e-lead { font-size: 13.5px; line-height: 1.4; }
  .entry .e-field > label, .entry .e-legend, .entry .lbl { font-size: 13px; }
  .entry .e-input, .entry .in { min-height: 42px; height: 42px; font-size: 15px; }
  .entry .e-help { font-size: 12px; }
  .entry .e-btn { min-height: 44px; font-size: 15px; }
  .entry .e-off { padding: 6px 10px; font-size: 12px; }
  .entry .e-info { padding: 7px 10px; font-size: 12px; }
  .entry .e-langs { font-size: 12px; line-height: 1.5; }
  .form-page .foot { font-size: 12px; margin-top: 2px; }
}
/* Enter the code on phones (Joel, 29 Nov 2026): a taller video; the code card sits lower. */
@media (max-width: 900px) {
  .form-page:has(#code) .panel, .form-page:has(#code) .panel.panel { height: 204px; }
}
/* Phones (Joel, 29 Nov 2026): the computer background behaviour. The same photo blurred and washed with ivory
   behind everything, and the card is transparent frosted glass. */
@media (max-width: 900px) {
  .page.form-page { position: relative; isolation: isolate; }
  .page.form-page::before { content: ""; position: fixed; inset: -60px; z-index: -2; background: var(--photo) center / cover; filter: blur(40px) saturate(1.15); transform: scale(1.1); }
  .page.form-page::after { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(251,248,239,.30), rgba(251,248,239,.60) 55%, rgba(251,248,239,.70)); }
  .form-page .panel { box-shadow: 0 18px 40px rgba(18,59,39,.25); }
  .form-page .tile { position: relative;
    background: linear-gradient(150deg, rgba(255,255,255,.72), rgba(255,255,255,.46) 55%, rgba(251,248,239,.62));
    -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: inset 0 1px 0 #fff, 0 18px 40px rgba(18,59,39,.16), 0 2px 6px rgba(18,59,39,.08); }
  .form-page .tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(115deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 26%, rgba(255,255,255,0) 72%, rgba(255,255,255,.28) 100%); }
  .form-page .tile > * { position: relative; }
  .form-page .side.entry { background: none; }
  .form-page .foot { color: var(--af-ink); }
}
/* Phones (Joel, 29 Nov 2026): the video grows to fill the empty space, pushing the card down to the bottom of the
   screen on every phone size (Joel's red line). It never shrinks below 144px. */
@media (max-width: 900px) {
  .page.form-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
  .page.form-page .stage { flex: 1; display: flex; flex-direction: column; }
  .form-page .panel, .form-page .panel.panel { flex: 1 1 auto; height: auto; min-height: 144px; }
  .form-page:has(#code) .panel, .form-page:has(#code) .panel.panel { min-height: 204px; height: auto; }
  .form-page .side.entry { flex: none; }
}
/* Sign in (Joel, 29 Nov 2026): an Email | Phone switch beside the label; phone opens when SMS is switched on. */
.entry .e-labrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entry .e-method { display: inline-flex; background: rgba(255,255,255,.7); border: 1px solid var(--af-line-strong); border-radius: 999px; padding: 2px; font-size: 12.5px; font-weight: 700; }
.entry .e-method > * { border: 0; background: none; border-radius: 999px; padding: 4px 12px; color: var(--af-muted); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.entry .e-method .on { background: var(--af-forest-900); color: #fff; cursor: default; }
.entry .e-method em { font-style: normal; font-size: 10px; font-weight: 700; background: var(--af-butter-100, #fff3c4); color: #8a5a00; border-radius: 999px; padding: 1px 6px; }
/* Phones (Joel, 30 Nov 2026): the glass background also fills the strip under the browser's toolbar.
   The page reaches the large-viewport height, and the page colour matches the blurred photo. */
@media (max-width: 900px) {
  html:has(.page), html:has(.page) body { background: #bbbbb0; }
  .page { min-height: 100lvh; }
  .page::before { inset: -80px -60px -200px; }
  .page::after { bottom: -200px; }
}
