/* MAD Recovery outcomes: the 4-week check, Progress v2 charts, weekly goal,
 * challenges and the weekly card. Only the app's theme tokens
 * (rehab_app_v4.css: --bg --card --ink --gold ...), so the three themes
 * (blue, light, classic) need no rules of their own. Logical properties
 * throughout, so a right-to-left page mirrors. Mobile-first: 320 px wide
 * with no horizontal scroll; every control is at least 44 px.
 * Versioned filename: module static files are cached for 7 days. */

/* ---------- charts (shared macro chart_line) ---------- */
.oc-chart .oc-band { fill: var(--ok-wash); stroke: var(--ok-line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.oc-legend { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 12px; margin-block-start: 6px; flex-wrap: wrap; }
.oc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.oc-big { font-size: 26px; font-weight: 800; line-height: 1.1; }
.oc-big small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.oc-sub { color: var(--ink-3); font-size: 13px; }
.oc-note { color: var(--ink-3); font-size: 12px; margin-block-start: 10px; }

/* ---------- before / after cards ---------- */
.oc-ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-block-start: 10px; }
.oc-ba > div { background: var(--card-2); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.oc-ba .k { color: var(--ink-3); font-size: 12px; }
.oc-ba .v { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- progress bar (challenges, goal) ---------- */
.oc-bar { height: 10px; border-radius: var(--pill); background: var(--card-2); overflow: hidden; margin-block: 10px 6px; }
.oc-bar > i { display: block; height: 100%; background: var(--gold); border-radius: var(--pill); }
.oc-bar.done > i { background: var(--ok); }

/* ---------- the 4-week check ---------- */
.oc-steps { color: var(--ink-3); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-block: 6px 2px; }
.oc-q { border: 0; margin: 0 0 12px; padding: 16px; min-width: 0; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line-2); }
.oc-q > legend { float: left; width: 100%; padding: 0; font-weight: 700; font-size: 15px; line-height: 1.35; }
.oc-q > legend + * { clear: both; }
.oc-q .oc-anchors { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 12px; margin-block-start: 6px; }
.oc-opts { display: grid; gap: 8px; margin-block-start: 10px; }
.oc-opts input, .oc-nrs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.oc-opts label { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--card-2); color: var(--ink-2); font-weight: 600; cursor: pointer; }
.oc-opts input:checked + label, .oc-nrs input:checked + label { border-color: var(--gold); background: var(--gold-wash); color: var(--ink); }
.oc-opts input:focus-visible + label, .oc-nrs input:focus-visible + label { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.oc-nrs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-block-start: 10px; }
.oc-nrs label { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card-2); color: var(--ink); font-weight: 700; cursor: pointer; }
/* One row of 11 only where every box stays 44 px wide: 11 x 44 + 10 gaps
   + the card and page padding is about 590 px. Below that, two rows of 6. */
@media (min-width: 600px) { .oc-nrs { grid-template-columns: repeat(11, minmax(44px, 1fr)); gap: 4px; } }
.oc-psfs { display: grid; gap: 8px; margin-block-start: 12px; }
.oc-psfs .act { font-weight: 700; overflow-wrap: anywhere; }
.oc-psfs input[type="text"], .oc-psfs select { width: 100%; min-height: 44px; box-sizing: border-box; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card-2); color: var(--ink); padding: 8px 12px; font-size: 16px; }
.oc-psfs input:focus, .oc-psfs select:focus { outline: 2px solid var(--gold-2); outline-offset: 1px; }
.oc-psfs .row { background: var(--card-2); border-radius: 14px; padding: 10px; display: grid; gap: 8px; }
.oc-psfs .row select { background: var(--card); }
.oc-psfs .row input[type="text"] { background: var(--card); }
.oc-sample { display: inline-block; margin-inline-start: 6px; }
.oc-actions { display: grid; gap: 10px; margin-block-start: 8px; }
.oc-result { padding-block: 10px; border-block-start: 1px solid var(--line-2); }
.oc-result:first-child { border-block-start: 0; }
.oc-urgent { display: block; }
.oc-urgent > div + div { margin-block-start: 6px; }

/* ---------- weekly goal ---------- */
.oc-goal { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
.oc-goal button { min-width: 44px; min-height: 44px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); font-weight: 700; font-size: 15px; cursor: pointer; padding-inline: 12px; }
.oc-goal button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-wash); color: var(--ink); }
.oc-goal button:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.oc-inline-form { margin: 0; }
