/* Onboarding (LAYOUT_SPEC §Onboarding). Loaded after tokens.css. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.onb { min-height: 100dvh; }
.theme-butter { background: var(--butter); }
.theme-ink { background: var(--ink); color: #fff; }
.onb-photo { display: none; }
.onb-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.onb-img-wide { display: none; }
.onb-tablet-logo { display: none; }
.onb-step { position: relative; min-height: 100dvh; display: flex; flex-direction: column; gap: 26px; padding: 64px 24px 36px; max-width: 520px; margin: 0 auto; }
.onb-form { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.progress { display: flex; gap: 6px; margin-bottom: -4px; }
.progress span { flex: 1; height: 5px; border-radius: 9px; background: rgba(22,21,15,.15); }
.progress span.on { background: var(--ink); }
.theme-ink .progress span { background: rgba(255,255,255,.15); }
.theme-ink .progress span.on { background: var(--amber); }
.onb-title { font-size: 36px; letter-spacing: -.03em; }
.theme-ink .onb-title { color: var(--butter); }
.onb-lead { margin: -12px 0 0; font-size: 15px; color: var(--ink-2); }
.theme-ink .onb-lead { color: rgba(255,255,255,.85); }
.onb-input { width: 100%; min-height: 52px; border: 2px solid transparent; border-radius: var(--r-md); background: #fff; padding: 12px 16px; font: 500 16px var(--font-body); color: var(--ink); }
.onb-input:focus { outline: none; border-color: var(--ink); }
.onb-error { font-size: 13px; color: var(--danger); font-weight: 600; }
.theme-photo .onb-step .onb-error, .theme-ink .onb-error { color: #ffb4ab; }
.onb-flash { margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.9); color: var(--ink); font-weight: 600; }
.onb-primary { margin-top: auto; width: 100%; }
.onb-link { color: var(--link); font-weight: 600; }
.field .label { font: 600 12px var(--font-body); color: var(--muted); }

/* step 1: over the photo on phone */
.theme-photo .onb-step, .onb-photo .onb-brand { color: #fff; }
.theme-photo .onb-photo { display: block; position: fixed; inset: 0; z-index: -1; }
.theme-photo .onb-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,21,15,.25) 0%, rgba(22,21,15,.1) 35%, rgba(22,21,15,.55) 65%, rgba(22,21,15,.85) 100%); }
.onb-photo .onb-brand { display: none; }
.theme-photo .onb-step { color: #fff; }
.join-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 14px; text-align: center; }
.join-logo { width: clamp(120px, 34vw, 150px); margin-bottom: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
.join-tagline { font-size: 34px; color: var(--butter); text-shadow: 0 2px 20px rgba(0,0,0,.4); letter-spacing: -.03em; }
.join-sub { margin: 0; font-size: 14px; color: rgba(255,255,255,.88); max-width: 340px; }
.join-form { display: flex; flex-direction: column; gap: 10px; }
.onb-btn-glass { width: 100%; background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px); }
.onb-btn-glass:hover { background: rgba(255,255,255,.28); color: #fff; }
.join-login { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--butter); }
.join-login a { color: var(--amber); font-weight: 700; }

/* sent */
.dev-box { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: #fff; font-size: 14px; }

/* step 2: you */
.you-photo { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.you-circle { width: 88px; height: 88px; border-radius: 50%; border: 1.5px dashed var(--muted-2); background: rgba(22,21,15,.04) center / cover no-repeat;
  display: flex; align-items: center; justify-content: center; font: 600 13px var(--font-body); color: var(--muted); flex: none; }
.you-circle.has-photo { border: 3px solid #fff; box-shadow: 0 0 0 3px var(--amber); }
.you-circle.has-photo span { display: none; }
.you-btn { background: #fff; border-radius: var(--r-sm); padding: 9px 14px; font-size: 14px; color: var(--ink); }
.you-photo:focus-within .you-btn { outline: 2px solid var(--ink); }

/* step 3: the code */
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rules li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.08); }
.rules .num { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--amber); color: var(--ink); display: flex; align-items: center; justify-content: center; font: 800 16px var(--font-head); flex: none; }
.rules strong { display: block; font: 800 17px var(--font-head); color: #fff; }
.rules li > span:last-child { font-size: 13px; color: rgba(255,255,255,.75); }
.rules-foot { margin: 0; color: var(--amber); font-weight: 700; font-size: 14px; }

/* ---------- Tablet: photo full-bleed, step in a 440px card ---------- */
@media (min-width: 768px) {
  .onb, .theme-butter, .theme-ink { background: var(--ink); }
  .onb .onb-photo { display: block; position: fixed; inset: 0; z-index: 0; }
  .onb .onb-photo::after { content: ''; position: absolute; inset: 0; background: rgba(22,21,15,.35); }
  .onb .onb-brand { display: none; }
  .onb-panel { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 48px 24px; }
  .onb-tablet-logo { display: block; }
  .onb-tablet-logo img { width: 150px; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
  .onb-step { min-height: 0; width: 440px; max-width: 100%; margin: 0; padding: 32px; border-radius: 28px; background: var(--butter); color: var(--ink); gap: 22px; }
  .theme-ink .onb-step { background: var(--ink); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
  .theme-photo .onb-step { background: var(--butter); color: var(--ink); }
  .theme-photo .join-logo { display: none; }
  .theme-photo .join-hero { align-items: flex-start; text-align: left; gap: 8px; }
  .theme-photo .join-tagline { color: var(--ink); text-shadow: none; font-size: 30px; }
  .theme-photo .join-sub { color: var(--ink-2); }
  .theme-photo .onb-btn-glass { background: var(--ink); color: #fff; backdrop-filter: none; }
  .theme-photo .join-login { color: var(--ink-2); }
  .theme-photo .join-login a { color: var(--link); }
  .theme-photo .onb-input { background: #fff; }
  .theme-photo .onb-error { color: var(--danger); }
  .onb-primary { margin-top: 8px; }
  .onb-title { font-size: 32px; }
}

/* ---------- Desktop: split, photo left, step panel right ---------- */
@media (min-width: 1200px) {
  .onb-wrap { display: grid; grid-template-columns: minmax(0,1fr) 560px; min-height: 100dvh; }
  .onb .onb-photo { position: sticky; top: 0; height: 100dvh; inset: auto; }
  .onb .onb-photo::after { background: linear-gradient(180deg, rgba(22,21,15,0) 50%, rgba(22,21,15,.55) 100%); }
  .onb-img-tall { display: none; } .onb-img-wide { display: block; }
  .onb .onb-brand { display: block; position: absolute; left: 48px; right: 48px; bottom: 48px; z-index: 1; }
  .onb-brand img { width: 96px; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
  .onb-brand p { margin: 16px 0 0; font: 800 48px/1 var(--font-head); letter-spacing: -.03em; color: var(--butter); max-width: 520px; }
  .onb-tablet-logo { display: none; }
  .onb-panel { display: block; padding: 0; background: var(--butter); }
  .theme-ink .onb-panel { background: var(--ink); }
  .theme-photo .onb-panel { background: var(--paper); }
  .onb-step { width: auto; min-height: 100dvh; border-radius: 0; padding: 56px 56px 48px; background: transparent !important; box-shadow: none !important; }
  .theme-photo .join-hero { justify-content: flex-start; flex: 0; margin-top: 40px; }
  .theme-photo .join-form { margin-top: 8px; }
  .theme-photo .onb-input { background: var(--stone); }
  .onb-primary { margin-top: auto; }
}
