/* Night glow: the intake questionnaire's one look, from sign-up to "Build my block" (21 Oct 2026,
 * LESSONS rule 62's third exception). Loaded only by the pages that pass `night` to the head partial
 * (views/onboarding.ejs, views/signup.ejs) and scoped under body.night, so every other screen stays
 * Champagne. Gold never sits on cream. Drawn from marketing/intake-redesign-2026-10-21/arc-intake-every-screen.html
 * and its motion from arc-intake-prototype.html in the same folder. */
body.night {
  --night: #17110C; --page: #0E0A07; --well: #3E3327; --gold: #E2C48A; --cream: #F3E8D6; --cream2: #CFC3AE; --ng-sage: #A8987E; --ng-bad: #FF7B6B;
  --tile: rgba(243, 232, 214, 0.05); --ng-line: rgba(243, 232, 214, 0.12);
  background: var(--night); color: var(--cream); color-scheme: dark;
}
html:has(body.night) { background: var(--page); }
body.night main.shell { background: transparent; position: relative; z-index: 1; padding-bottom: 32px; }
body.night a { color: var(--gold); }

/* The corner glow, breathing, and the huge faint section numeral. */
.ng-glow { position: fixed; left: -120px; top: -150px; width: 460px; height: 460px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(226, 196, 138, 0.26), transparent 65%); animation: ng-breathe 3.2s ease-in-out infinite; }
.ng-glow.center { left: 50%; margin-left: -230px; top: 60px; }
.ng-num { position: fixed; right: -18px; top: 36px; font: 800 210px/1 var(--disp); letter-spacing: -11px; color: rgba(226, 196, 138, 0.07); pointer-events: none; z-index: 0; }
@keyframes ng-breathe { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }
@keyframes ng-rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ng-ring { from { stroke-dashoffset: var(--from); } to { stroke-dashoffset: var(--to); } }
@keyframes ng-nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* One screen at a time. */
.ng-screen { display: none; position: relative; z-index: 1; flex-direction: column; min-height: calc(100dvh - 40px); padding-top: 18px; }
.ng-screen.active { display: flex; }
.ng-screen.active .ng-r { animation: ng-rise .7s cubic-bezier(.16, 1, .3, 1) both; }
.ng-screen.active .ng-r:nth-child(2) { animation-delay: .05s; } .ng-screen.active .ng-r:nth-child(3) { animation-delay: .1s; }
.ng-screen.active .ng-r:nth-child(4) { animation-delay: .15s; } .ng-screen.active .ng-r:nth-child(5) { animation-delay: .2s; }
.ng-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; }
.ng-ib { width: 42px; height: 42px; border-radius: 21px; border: 1px solid rgba(243, 232, 214, 0.16); background: rgba(243, 232, 214, 0.06); display: inline-flex; align-items: center; justify-content: center; color: var(--cream); cursor: pointer; padding: 0; }
.ng-ib[hidden] { visibility: hidden; display: inline-flex; }
.ng-later { font: 600 12.5px var(--body); color: var(--ng-sage); background: none; border: 0; cursor: pointer; padding: 6px 4px; }
.ng-right { display: flex; align-items: center; gap: 8px; }
.ng-ring circle.fill { animation: ng-ring 1s cubic-bezier(.16, 1, .3, 1) both; }
.ng-eb { margin: 18px 0 0; font: 700 11.5px var(--body); letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ng-chip { font: 800 10px var(--body); letter-spacing: .8px; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(226, 196, 138, 0.5); border-radius: 999px; padding: 3px 8px; }
.ng-chip.req { color: var(--cream); border-color: rgba(243, 232, 214, 0.35); }
.ng-h { font: 800 32px/1 var(--disp); letter-spacing: -.9px; margin: 8px 0 10px; text-wrap: balance; color: var(--cream); }
.ng-h.big { font-size: 44px; letter-spacing: -1.4px; }
.ng-lede { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--cream2); }
.ng-small { font-size: 12.5px; color: var(--ng-sage); line-height: 1.45; }
.ng-note { font-size: 12.5px; line-height: 1.5; color: var(--cream2); padding: 11px 13px; border-radius: 14px; background: rgba(226, 196, 138, 0.07); border: 1px solid rgba(226, 196, 138, 0.2); margin: 0 0 14px; }
.ng-note.bad { border-color: rgba(255, 123, 107, 0.45); background: rgba(255, 123, 107, 0.08); }
.ng-err { font-size: 12.5px; color: var(--ng-bad); font-weight: 600; line-height: 1.4; margin: -4px 0 14px; }
.ng-sp { flex: 1; min-height: 18px; }

/* Fields. */
.ng-f { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.ng-f[hidden], .ng-hide { display: none !important; }
/* The hidden attribute always wins over a display set here (the back key keeps its place instead). */
body.night [hidden]:not(.ng-ib) { display: none !important; }
.ng-lab { font: 700 13px/1.35 var(--body); color: var(--cream); }
.ng-lab .ng-hint, .ng-hint { font-weight: 500; font-size: 12px; color: var(--ng-sage); line-height: 1.4; }
body.night .ng-in, body.night .ng-f input[type=text], body.night .ng-f input[type=number], body.night .ng-f input[type=date], body.night .ng-f input[type=email], body.night .ng-f input[type=password], body.night .ng-f textarea, body.night .ng-f select {
  width: 100%; box-sizing: border-box; min-height: 50px; border-radius: 15px; border: 1px solid rgba(243, 232, 214, 0.14); background: var(--tile); padding: 0 14px;
  font: 600 15px var(--body); color: var(--cream); outline: none; margin: 0; -webkit-appearance: none; appearance: none; }
body.night .ng-f textarea { min-height: 96px; padding: 13px 14px; line-height: 1.45; resize: vertical; }
body.night .ng-f select { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
body.night .ng-f select option { color: #17110C; }
body.night .ng-f input::placeholder, body.night .ng-f textarea::placeholder { color: var(--ng-sage); font-weight: 500; }
body.night .ng-f input:focus, body.night .ng-f textarea:focus, body.night .ng-f select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226, 196, 138, 0.14); }
body.night .ng-f input[type=date] { color-scheme: dark; }
.ng-row { display: flex; gap: 8px; } .ng-row > * { flex: 1; min-width: 0; }
.ng-row .ng-u { flex: 0 0 92px; }
.ng-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
@media (max-width: 360px) { .ng-grid2 { grid-template-columns: 1fr; } }

/* Tiles: radios and single ticks. The input is hidden; the tile is the label. */
.ng-tiles { display: flex; flex-direction: column; gap: 7px; }
.ng-tile { position: relative; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 14px; border-radius: 16px; background: var(--tile); border: 1px solid var(--ng-line); font: 600 14.5px var(--body); color: var(--cream); cursor: pointer; box-sizing: border-box; transition: background .2s, border-color .2s, box-shadow .2s; }
.ng-tile input, .ng-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ng-tile .t { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ng-tile .d { font-size: 12.5px; font-weight: 500; color: var(--cream2); line-height: 1.4; }
.ng-tile .r { font-size: 11.5px; font-weight: 600; color: var(--ng-sage); }
.ng-dot { width: 12px; height: 12px; border-radius: 6px; flex-shrink: 0; border: 1.5px solid rgba(243, 232, 214, 0.3); box-sizing: border-box; }
.ng-box { width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; border: 1.5px solid rgba(243, 232, 214, 0.3); box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; font: 800 12px var(--body); color: var(--night); }
.ng-tile:has(input:checked) { background: linear-gradient(180deg, rgba(226, 196, 138, 0.22), rgba(226, 196, 138, 0.1)); border-color: rgba(226, 196, 138, 0.7); box-shadow: 0 0 24px rgba(226, 196, 138, 0.22); }
.ng-tile:has(input:checked) .ng-dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px 3px rgba(226, 196, 138, 0.6); }
.ng-tile:has(input:checked) .ng-box { background: var(--gold); border-color: var(--gold); }
.ng-tile:has(input:checked) .ng-box::after { content: "\2713"; }
.ng-tile:has(input:checked) .r { color: var(--gold); } .ng-tile:has(input:checked) .d { color: var(--cream); }
.ng-tile:has(input:focus-visible), .ng-pill:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.ng-tile:has(input:disabled), .ng-pill:has(input:disabled) { cursor: default; }
/* The switch. */
.ng-sw { width: 50px; height: 30px; border-radius: 15px; background: var(--well); position: relative; flex-shrink: 0; transition: background .2s; }
.ng-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--ng-sage); transition: left .2s; }
.ng-tile:has(input:checked) .ng-sw { background: var(--gold); }
.ng-tile:has(input:checked) .ng-sw::after { left: 23px; background: var(--night); }
.ng-tile.tog:has(input:checked) { background: var(--tile); border-color: var(--ng-line); box-shadow: none; }

/* Pills: checkbox groups. */
.ng-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.ng-pill { position: relative; min-height: 42px; padding: 0 14px; border-radius: 21px; background: var(--tile); border: 1px solid var(--ng-line); display: inline-flex; align-items: center; gap: 6px; font: 600 13.5px var(--body); color: var(--cream); cursor: pointer; }
.ng-pill:has(input:checked) { background: rgba(226, 196, 138, 0.16); border-color: rgba(226, 196, 138, 0.7); }
.ng-pill:has(input:checked)::before { content: "\2713"; color: var(--gold); font-weight: 800; }
.ng-pill[hidden] { display: none; }

/* The +/- wheel. */
.ng-wheel { display: flex; align-items: center; gap: 8px; }
.ng-pm { width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(243, 232, 214, 0.08); color: var(--cream); font: 700 20px var(--body); cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ng-pm:active { background: rgba(226, 196, 138, 0.25); }
.ng-wv { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 58px; border-radius: 16px; background: var(--tile); border: 1px solid rgba(226, 196, 138, 0.35); }
body.night .ng-f .ng-wv input[type=number] { width: 4.2ch; min-height: 0; border: 0; background: none; padding: 0; text-align: center; font: 800 26px var(--disp); color: var(--cream); box-shadow: none; -moz-appearance: textfield; }
body.night .ng-f .ng-wv input:focus { box-shadow: none; }
.ng-wv input::-webkit-outer-spin-button, .ng-wv input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ng-wv .u { font: 700 12px var(--body); color: var(--gold); }

/* Days of the week. */
.ng-days { display: flex; flex-direction: column; gap: 6px; }
.ng-day { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 8px 0 4px; border-radius: 14px; background: rgba(243, 232, 214, 0.06); border: 1px solid var(--ng-line); }
.ng-day:not(:has(.ng-dk input:checked)) { background: transparent; border-style: dashed; }
.ng-dk { position: relative; width: 42px; height: 42px; border-radius: 12px; background: rgba(243, 232, 214, 0.06); color: var(--ng-sage); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; cursor: pointer; flex-shrink: 0; }
.ng-dk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ng-dk:has(input:checked) { background: var(--gold); color: var(--night); }
.ng-dk:has(input:checked)::after { content: "\2713"; }
.ng-dk:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.ng-day .n { flex: 1; font: 700 14.5px var(--body); cursor: pointer; }
.ng-dm { display: flex; align-items: center; gap: 4px; }
.ng-dm .ng-pm { width: 34px; height: 34px; font-size: 17px; }
body.night .ng-dm input[type=number] { width: 52px; min-height: 34px; border: 0 !important; background: none !important; box-shadow: none !important; border-radius: 8px; text-align: center; font: 800 17px var(--disp); color: var(--cream); padding: 0; -moz-appearance: textfield; }
.ng-dm input::-webkit-outer-spin-button, .ng-dm input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ng-dm .u { font: 700 10.5px var(--body); color: var(--gold); }
.ng-rest { font: 700 13px var(--body); color: var(--ng-sage); padding: 0 12px; display: none; }
.ng-day:not(:has(.ng-dk input:checked)) .ng-dm { display: none; }
.ng-day:not(:has(.ng-dk input:checked)) .ng-rest { display: inline; }
.ng-total { text-align: center; font: 800 19px var(--disp); color: var(--gold); margin: 6px 0 12px; }

/* The eight lifts. */
.ng-lifts { display: flex; flex-direction: column; gap: 7px; }
.ng-lgrp { margin: 8px 0 0; font: 700 10.5px var(--body); letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold); }
.ng-lift { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 16px; background: var(--tile); border: 1px solid var(--ng-line); }
.ng-lift .t { flex: 1; font: 600 14px var(--body); min-width: 0; }
body.night .ng-f .ng-lift input[type=number] { width: 76px; min-height: 42px; border-radius: 12px; border: 1px solid rgba(243, 232, 214, 0.14); background: rgba(243, 232, 214, 0.04); text-align: center; font: 700 15px var(--body); color: var(--cream); padding: 0 4px; -moz-appearance: textfield; }
body.night .ng-f .ng-lift input.reps { width: 58px; }
.ng-lift input::-webkit-outer-spin-button, .ng-lift input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ng-lift .x { color: var(--ng-sage); font-weight: 700; }

/* A self-screen's numbered steps, and the picture. */
.ng-steps { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.ng-steps li { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--cream2); }
.ng-steps b { flex: none; width: 24px; height: 24px; border-radius: 12px; border: 1.5px solid var(--gold); color: var(--gold); font: 800 11.5px var(--body); display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.ng-kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--tile); border: 1px solid rgba(243, 232, 214, 0.1); font-size: 13.5px; }
.ng-kv span:first-child { color: var(--ng-sage); } .ng-kv span:last-child { font-weight: 700; text-align: right; color: var(--cream); }
.ng-kvs { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.ng-sections { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.ng-sections .ng-kv { align-items: center; }
.ng-sections .no { font: 800 17px var(--disp); color: var(--gold); width: 30px; flex: none; }
.ng-sections .ng-kv .nm { flex: 1; color: var(--cream); font-weight: 700; text-align: left; }
.ng-fin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: 100%; }
.ng-fin .ng-kv { flex-direction: column; gap: 2px; text-align: left; }
.ng-fin .ng-kv span:first-child { color: var(--cream); font-weight: 700; } .ng-fin .ng-kv span:last-child { color: var(--gold); text-align: left; }
.ng-center { align-items: center; text-align: center; }
.ng-center .ng-kvs, .ng-center .ng-fin { text-align: left; }

/* The keys. */
.ng-cta { width: 100%; height: 56px; border-radius: 28px; border: 0; background: var(--gold); color: var(--night); display: inline-flex; align-items: center; justify-content: center; font: 800 16px var(--body); cursor: pointer; box-shadow: 0 0 0 6px rgba(226, 196, 138, 0.12), 0 16px 36px rgba(226, 196, 138, 0.24); text-decoration: none; }
.ng-cta:disabled, .ng-cta.off { background: var(--well); color: var(--ng-sage); box-shadow: none; cursor: default; }
.ng-gh { height: 56px; border-radius: 28px; border: 1px solid rgba(243, 232, 214, 0.25); background: none; color: var(--cream); font: 700 15px var(--body); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; text-decoration: none; }
.ng-foot { display: flex; gap: 10px; margin-top: 14px; }
.ng-foot .ng-gh { flex: 1; } .ng-foot .ng-cta { flex: 2; }
.ng-reqline { text-align: center; margin: 0 0 10px; font: 700 11.5px var(--body); letter-spacing: 1px; text-transform: uppercase; color: var(--ng-sage); }
.nudge { animation: ng-nudge .35s ease-in-out 2; }
.ng-draft { text-align: center; font-size: 12px; color: var(--ng-sage); margin: 10px 0 0; min-height: 1em; }
.ng-draft.bad { color: var(--ng-bad); }

/* The shape strip, in the night look, on the finish screen. */
body.night .shape { background: var(--tile); border: 1px solid rgba(226, 196, 138, 0.3); border-radius: 18px; color: var(--cream); width: 100%; box-sizing: border-box; margin: 14px 0 0; text-align: left; box-shadow: 0 0 36px rgba(226, 196, 138, 0.1); }
body.night .shape .shape-head, body.night .shape .shape-stats { color: var(--cream2); }
body.night .shape .shape-weeks { color: var(--cream); }

/* The saved overlay (Save and finish later). */
.ng-saved { position: fixed; inset: 0; z-index: 30; background: rgba(14, 10, 7, 0.92); display: none; align-items: center; justify-content: center; padding: 24px; }
.ng-saved.on { display: flex; }
.ng-saved > div { max-width: 360px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 16px; }

/* Sign-up in the same look: the form's own fields and the health screen sit on the night ground. */
body.night .ng-signup .card { background: var(--tile); border: 1px solid var(--ng-line); color: var(--cream); box-shadow: none; }
body.night .ng-signup .field span, body.night .ng-signup label, body.night .ng-signup .sub { color: var(--cream2); }
body.night .ng-signup input[type=text], body.night .ng-signup input[type=email], body.night .ng-signup input[type=password] { background: var(--tile); border: 1px solid rgba(243, 232, 214, 0.14); color: var(--cream); border-radius: 15px; min-height: 50px; }
body.night .ng-signup input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226, 196, 138, 0.14); outline: none; }
body.night .ng-signup .notice, body.night .ng-signup .error { background: rgba(226, 196, 138, 0.07); border-color: rgba(226, 196, 138, 0.2); color: var(--cream); }
body.night .ng-signup .btn { background: var(--gold); color: var(--night); border-radius: 28px; min-height: 56px; width: 100%; font-weight: 800; box-shadow: 0 0 0 6px rgba(226, 196, 138, 0.12), 0 16px 36px rgba(226, 196, 138, 0.24); }
body.night .ng-signup a { color: var(--gold); }

body.night .ng-signup .eyebrow { color: var(--gold); }
body.night .ng-signup input[type=checkbox], body.night .ng-signup input[type=radio] { accent-color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  body.night *, body.night *::before, body.night *::after { animation: none !important; transition: none !important; }
}
