/* ADHD-friendly support: the Now card, quick journal, focus timer, momentum, challenges, calm display and themes.
   See docs/ADHD-MODE.md. Uses the shared tokens from styles.css. */

/* Today: one step at a time */
.today-now { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.now-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 26px; box-shadow: inset 4px 0 0 var(--green); }
.now-card h2 { font: 32px/1.2 var(--serif); color: var(--ink); margin: 4px 0 12px; overflow-wrap: anywhere; }
.now-card.now-clear { box-shadow: none; }
.now-step { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--sage); color: var(--ink); font-size: 15px; line-height: 1.5; }
.now-step .icon { margin-top: 3px; color: var(--green); }
.now-step.stop { background: #f3ebe3; }
.now-step.stop .icon { color: var(--terracotta); }
.now-step .text-btn { min-height: 0; padding: 0 4px; font-size: 13px; }
.now-why { font-size: 15px; color: var(--muted); margin-top: 4px; }
.now-cue { font-size: 14px; color: var(--muted); margin-top: 2px; }
.now-time { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.now-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.now-more { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; }
.now-more .text-btn, .now-foot .text-btn, .row-actions .text-btn { font-size: 14px; }
.now-optional, .now-later { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px 22px; }
.now-optional h3 { font-size: 14px; font-weight: 600; color: var(--muted); margin: 14px 0 0; }
.now-later summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 15px; }
.now-later[open] summary { border-bottom: 1px solid var(--border); }
.practice-row.compact { padding: 14px 0; align-items: center; flex-wrap: wrap; }
.practice-row.compact .practice-info { flex: 1 1 180px; min-width: 0; }
.practice-row.compact .practice-info h3 { font-size: 16px; margin-bottom: 2px; }
.practice-row.compact .practice-info p { font-size: 14px; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 0 12px; margin-left: auto; }
.now-done { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; color: var(--muted); }
.now-done .icon { color: var(--green); }
.now-done .resting { display: inline-flex; align-items: center; gap: 4px; }
.now-done .text-btn { min-height: 0; font-size: 13px; }
.now-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* Not today on the regular checklist */
.rest-btn { font-size: 13px; min-height: 36px; padding: 0; margin-top: 4px; justify-content: flex-start; }
.practice-row.resting h3 { color: var(--muted); }

/* Quick journal */
.quick-journal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.quick-btn { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; text-align: left; }
.quick-btn:hover { border-color: #a9b8a5; }
.quick-btn .icon { color: var(--green); }
.quick-full { margin-top: 8px; font-size: 14px; }
.quick-panel { margin: 0 0 24px; }
.quick-panel .quick-journal { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Captured thoughts */
.capture { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 26px; margin-top: 26px; }
.capture .today-section-head h2 { font-size: 24px; }
.capture-list { list-style: none; margin: 8px 0 0; padding: 0; }
.capture-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid #e3e7de; font-size: 15px; }
.capture-list li > span:first-child { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }

/* Momentum */
.momentum-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 18px; }
.momentum-line .text-btn { font-size: 14px; }
.momentum { margin-bottom: 26px; }
.momentum > p { color: var(--muted); margin: 6px 0 18px; }
.momentum-bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 96px; }
.momentum-bars span { display: block; height: calc(8px + var(--h) * 88px); border-radius: 6px 6px 3px 3px; background: #8fa98a; }
.momentum-bars span.zero { height: 4px; background: var(--border); }
.momentum-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Challenges */
.challenges { margin-bottom: 26px; }
.challenges > p { color: var(--muted); margin: 6px 0 16px; }
.challenge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.challenge-active { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; padding: 18px; border-radius: 12px; background: var(--sage); }
.challenge-active > div { flex: 1 1 260px; min-width: 0; }
.challenge-active h3 { font: 24px/1.25 var(--serif); margin: 4px 0 6px; }
.challenge-active p { color: var(--muted); font-size: 15px; }
.challenge-count { margin-top: 10px; }
.challenge-count strong { font: 30px/1 var(--serif); color: var(--green); margin-right: 4px; }

/* Settings */
.support-settings .subheading { margin: 22px 0 6px; font-weight: 600; }
.timer-default { margin-top: 18px; }
.theme-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.theme-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: 15px; }
.theme-option small { display: block; font-size: 12px; color: var(--muted); }
.theme-option.locked { opacity: .6; cursor: default; }
.theme-option input { margin: 0; accent-color: var(--green); }
.theme-option:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.theme-swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); background: linear-gradient(135deg, #f8f7f2 50%, #275441 50%); }
.theme-swatch[data-swatch="mist"] { background: linear-gradient(135deg, #f3f5f6 50%, #3b5868 50%); }
.theme-swatch[data-swatch="sand"] { background: linear-gradient(135deg, #f8f3ea 50%, #7a5a3a 50%); }
.theme-swatch[data-swatch="dusk"] { background: linear-gradient(135deg, #f5f2f6 50%, #5a4a6e 50%); }
.theme-swatch[data-swatch="moss"] { background: linear-gradient(135deg, #f2f4ec 50%, #4c5e2c 50%); }

/* Modals: focus timer, check-in taps, release pad */
#modal .timer { text-align: center; }
.timer-task { font-weight: 600; font-size: 17px; }
.timer-clock { font: 64px/1.1 var(--serif); letter-spacing: -.02em; color: var(--green); margin: 18px 0 14px; font-variant-numeric: tabular-nums; }
.timer-note { color: var(--muted); font-size: 15px; margin: 14px auto 0; max-width: 34ch; }
.park { margin-top: 22px; text-align: left; }
.park label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.park-row { display: flex; gap: 8px; }
.park-row input { flex: 1; min-width: 0; }
#modal .timer-lengths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#modal .form-actions.start { justify-content: flex-start; border-top: 0; padding-top: 0; margin-top: 14px; }
#modal .form-actions.start .primary { margin-left: 0; }
#modal .tap-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 10px 0 22px; }
#modal .tap-row button { display: grid; gap: 2px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.3; }
#modal .tap-row button strong { font-size: 18px; }
#modal .tap-row button.selected { background: var(--green); border-color: var(--green); color: #fff; }
.release-text { min-height: 180px; transition: opacity .4s ease, filter .4s ease; }
.release-text.released { opacity: 0; filter: blur(4px); }
#modal .ob-choices { margin-top: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.timer-pill { position: fixed; z-index: 40; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--green); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 6px 20px rgba(35, 59, 50, .22); font-variant-numeric: tabular-nums; }
.timer-pill[hidden] { display: none; }
@media (min-width: 900px) { .timer-pill { bottom: 24px; right: 24px; } }

@media (max-width: 760px) {
  .now-card { padding: 22px 20px; }
  .now-card h2 { font-size: 28px; }
  .now-optional, .now-later { padding: 4px 16px; }
  .now-actions .button { flex: 1 1 auto; }
  .quick-panel .quick-journal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .challenge-grid { grid-template-columns: 1fr; }
  .capture { padding: 16px 18px; }
  .row-actions { margin-left: 0; }
  .timer-clock { font-size: 56px; }
}

/* Low-stimulation display: muted colours, more space, no motion, a simpler Today */
html.calm { --sage: #eceee9; --border: #dcdfd9; --terracotta: #6e6a62; }
html.calm body { line-height: 1.7; }
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.calm .journal-landscape, html.calm .ob-hero img { display: none; }
html.calm .today-journal { background: var(--surface); }
html.calm .today-goals, html.calm .today-compass, html.calm .momentum-line .pill { display: none; }
html.calm .today-grid { gap: 32px; }
html.calm .now-card { box-shadow: none; }
html.calm .section-panel, html.calm .now-card { padding: 30px; }
html.calm .momentum-bars span { background: #a3aaa0; }

/* Calm themes, earned by recorded actions */
html[data-theme="mist"] { --paper: #f3f5f6; --surface: #fcfdfd; --ink: #24343d; --muted: #556670; --border: #d6dde1; --green: #3b5868; --sage: #e5ecef; }
html[data-theme="sand"] { --paper: #f8f3ea; --surface: #fffcf6; --ink: #3a2f25; --muted: #6a5d50; --border: #e4dacb; --green: #7a5a3a; --sage: #f0e7d8; }
html[data-theme="dusk"] { --paper: #f5f2f6; --surface: #fdfcfe; --ink: #2f2a38; --muted: #62596d; --border: #ddd7e2; --green: #5a4a6e; --sage: #ebe5f0; }
html[data-theme="moss"] { --paper: #f2f4ec; --surface: #fcfdf8; --ink: #2c3320; --muted: #5c6450; --border: #d9decd; --green: #4c5e2c; --sage: #e6ebd8; }
