/* 7 calm nights (TWH_SLEEP_PLAN): the plan page. Tokens from brand.css; light and dark follow them. No inline style anywhere (strict CSP). */
.sp { box-sizing: border-box; }
.sp-lead { margin: 0 0 var(--space-3, 12px); }
.sp-form[hidden], .sp-plan[hidden] { display: none; }
.sp-form { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.sp-q { font-weight: 600; padding: 0; }
.sp-time { min-height: 48px; padding: 6px 12px; font: inherit; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--radius-card, 14px); background: var(--surface); color: inherit; max-width: 12rem; }
.sp-lengths { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-lengths legend { grid-column: 1 / -1; margin-bottom: 4px; }
.sp-len { position: relative; display: flex; }
.sp-len input { position: absolute; opacity: 0; inset: 0; }
.sp-len span { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; box-sizing: border-box; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--radius-card, 14px); background: var(--surface); }
.sp-len input:checked + span { background: var(--accent-soft, transparent); border-color: var(--accent-fill, currentColor); color: var(--accent-ink, inherit); }
.sp-len input:focus-visible + span { outline: 3px solid var(--focus, currentColor); outline-offset: 2px; }
.sp-start { width: 100%; min-height: 52px; }
.sp-tonight { margin: var(--space-3, 12px) 0; padding: var(--space-4, 16px); border: 1px solid var(--line); border-radius: var(--radius-card, 14px); background: var(--surface); }
.sp-tonight h2 { margin: 0 0 8px; }
.sp-session { margin: 0 0 var(--space-3, 12px); }
.sp-nights { list-style: none; margin: 0 0 var(--space-3, 12px); padding: 0; display: grid; gap: 8px; }
.sp-n { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.sp-n.sp-locked { opacity: .75; }
.sp-n.sp-tonight { border-color: var(--accent-fill, currentColor); }
.sp-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft, transparent); color: var(--accent-ink, inherit); font-size: .875em; }
.sp-done { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft, transparent); }
.sp-again { min-height: 44px; padding: 0 4px; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; }
.sp-again:focus-visible { outline: 3px solid var(--focus, currentColor); outline-offset: 2px; }
.sp-remind .btn { min-height: 44px; }
@media (min-width: 640px) { .sp-lengths { grid-template-columns: repeat(4, 1fr); } .sp-start { width: auto; min-width: 14rem; } }
