
/* SHELL-TOOL-V1:end */

/* ==================================================================
   5. Module: Behavioural Activation (theme: blue)
   ================================================================== */

body[data-module="ba"].dragging,body[data-module="ba"].dragging *{user-select:none!important;-webkit-user-select:none!important}
body[data-module="ba"]{color:var(--text);
  background:var(--bg);
  display:flex;align-items:center;padding:var(--space-4)}
[data-module="ba"] button{font:inherit;color:inherit;cursor:pointer;background:none;border:none}
[data-module="ba"] input{font:inherit;color:inherit}
@media (prefers-reduced-motion:reduce){
[data-module="ba"] *{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
[data-module="ba"] .shell{width:100%;max-width:430px;margin:0 auto;display:flex;flex-direction:column;background:var(--surface);
  border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);overflow:hidden;
  height:min(92dvh,880px);max-height:100%}
@media (min-width:768px){
body[data-module="ba"]{padding:var(--space-8)}
[data-module="ba"] .shell{box-shadow:0 24px 70px rgba(42,39,33,.16),0 2px 8px rgba(42,39,33,.06);
    border:1px solid var(--divider)}
}
@media (max-width:520px){
body[data-module="ba"]{padding:0;align-items:stretch}
/* BA-SHELL-V1 — BA-SHELL-V1:start Amended 14 Aug 2026, SHELL-MERGE-V2-NOTE: the declarations this block shared byte-for-byte with… Full note in the session log, 15 Aug 2026. */
[data-module="ba"] .shell{height:100dvh;min-height:100dvh;max-height:100dvh;border-radius:0;box-shadow:none;max-width:none;overflow:hidden}
[data-module="ba"] header{position:static;top:auto;z-index:20;}
[data-module="ba"] main{flex:1 1 auto;overflow-y:auto;}
/* BA-SHELL-V1:end */
}
[data-module="ba"] header{padding:var(--space-4) var(--space-5) var(--space-3);border-bottom:1px solid var(--divider);background:var(--surface-2)}
[data-module="ba"] .module{color:var(--muted);letter-spacing:.08em;}
[data-module="ba"] .track{background:var(--surface-offset);}
[data-module="ba"] .fill{width:0;background:linear-gradient(90deg,var(--primary-soft),var(--primary));}
[data-module="ba"] main{flex:1;padding:var(--space-5);gap:var(--space-4);overflow-y:auto}
[data-module="ba"] .kicker{color:var(--primary);}
[data-module="ba"] .body{color:var(--muted)}
[data-module="ba"] .card{background:var(--surface-2);box-shadow:var(--shadow-sm)}
[data-module="ba"] .slider{-webkit-appearance:none;appearance:none;width:100%;height:32px;margin-top:var(--space-2);
  background:transparent;display:block;touch-action:pan-y}
[data-module="ba"] .slider::-webkit-slider-runnable-track{height:6px;border-radius:3px;
  background:linear-gradient(to right,var(--primary) var(--pct),var(--surface-offset) var(--pct))}
[data-module="ba"] .slider::-moz-range-track{height:6px;border-radius:3px;background:var(--surface-offset)}
[data-module="ba"] .slider::-moz-range-progress{height:6px;border-radius:3px;background:var(--primary)}
[data-module="ba"] .slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:26px;height:26px;margin-top:-10px;
  border-radius:50%;background:var(--surface);border:2px solid var(--primary);box-shadow:var(--shadow-md);cursor:grab}
[data-module="ba"] .slider::-moz-range-thumb{width:26px;height:26px;border-radius:50%;background:var(--surface);
  border:2px solid var(--primary);box-shadow:var(--shadow-md);cursor:grab}
[data-module="ba"] .bank{margin-top:var(--space-4);user-select:none;-webkit-user-select:none;
  border-radius:var(--radius-md)}
[data-module="ba"] .banklabel{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.1em;color:var(--primary);font-weight:500}
[data-module="ba"] .bankchips{display:flex;flex-direction:column;gap:var(--space-2);margin-top:var(--space-2);touch-action:none}
[data-module="ba"] .bankchip{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);
  background:var(--surface);border:1px solid var(--primary-soft);border-radius:var(--radius-full);
  font-size:var(--text-sm);cursor:grab;user-select:none;box-shadow:var(--shadow-sm)}
[data-module="ba"] .bankchip.dragging{cursor:grabbing;box-shadow:var(--shadow-lg);transform:scale(1.03)}
[data-module="ba"] .bcn{font-size:var(--text-xs);color:var(--primary);font-variant-numeric:tabular-nums}
[data-module="ba"] .newact{font-weight:500;color:var(--accent-ink)}
/* BA-REVIEW-V2: screen 6 mirrors CA screen 5. The cards are one list with an even
   8px between them, the head and body carry the same 12 and 14 pixel paddings, and
   the card edge never changes when a card opens. */
[data-module="ba"] .revlist{display:flex;flex-direction:column;gap:var(--space-2)}
[data-module="ba"] .revcard{border:1px solid var(--border);border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);overflow:hidden}
[data-module="ba"] .counter{font-size:var(--text-xs);color:var(--faint);text-align:center}
[data-module="ba"] .revtime{font-size:var(--text-xs);color:var(--faint);font-variant-numeric:tabular-nums}
[data-module="ba"] .revact{font-size:var(--text-base);color:var(--accent-ink);font-weight:500}
[data-module="ba"] .seg{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-2)}
[data-module="ba"] .segb{display:inline-flex;align-items:center;justify-content:center;
  min-height:32px;padding:7px 6px;border:1px solid var(--primary-soft);
  border-radius:var(--radius-full);font-size:var(--text-xs);color:var(--text);
  white-space:nowrap;transition:background var(--ease),border-color var(--ease)}
[data-module="ba"] .segb.on{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
[data-module="ba"] .qlab{margin-top:var(--space-4);font-size:var(--text-sm);font-weight:500}
[data-module="ba"] .scaleends{display:flex;justify-content:space-between;margin-top:2px;font-size:var(--text-xs);color:var(--faint)}
[data-module="ba"] .chips.small .chip{font-size:var(--text-xs)}
[data-module="ba"] .chip.on{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
[data-module="ba"] .tip{flex-direction:column;gap:2px}
[data-module="ba"] .chip.newchip{color:var(--accent-ink);border-color:var(--accent)}
[data-module="ba"] .chip.newchip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--on-primary)}
[data-module="ba"] .sep{color:var(--faint)}
[data-module="ba"] .row.hasnew{border-color:var(--accent)}
[data-module="ba"] .row.static{cursor:default;pointer-events:none}
[data-module="ba"] .dlrow{display:flex;margin-top:var(--space-4)}
[data-module="ba"] .dlbtn{color:var(--primary)} /* PARITY-DL-ONE-V1: shape moved to pathery-core.css */
[data-module="ba"] .row.drop.over{background:var(--primary-soft);border-color:var(--primary);border-style:dashed}
[data-module="ba"] .period{margin-top:6px}
[data-module="ba"] .periodhead{display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-1) var(--space-1)}
[data-module="ba"] .periodname{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.1em;color:var(--primary);font-weight:500}
/* BA-ROW-V1: .periodrange removed; the times live in the rows. */
[data-module="ba"] .tl{position:relative;padding-left:var(--space-4)}
[data-module="ba"] .tl::before{content:'';position:absolute;left:6px;top:6px;bottom:6px;width:2px;background:var(--surface-offset);border-radius:2px}
[data-module="ba"] .row{position:relative;display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:48px;text-align:left;
  padding:var(--space-2) var(--space-3);margin-bottom:6px;border:1px solid var(--border);border-radius:var(--radius-md);
  background:var(--surface);transition:all var(--ease)}
[data-module="ba"] .row::before{content:'';position:absolute;left:-14px;width:8px;height:8px;border-radius:50%;background:var(--surface-offset);border:2px solid var(--surface)}/* BA-DOT-V2 */
[data-module="ba"] .row .rt{font-size:var(--text-xs);color:var(--muted);font-variant-numeric:tabular-nums;min-width:78px}/* BA-ROW-V1 */
[data-module="ba"] .row .rv{flex:1;font-size:var(--text-sm);color:var(--text)}
[data-module="ba"] .row .rv.ghost{color:var(--faint);font-style:italic}
[data-module="ba"] .row.filled{background:var(--primary-tint);border-color:var(--primary-soft)}
[data-module="ba"] .row.filled::before{background:var(--primary);border-color:var(--surface)}
[data-module="ba"] .tray{margin-top:var(--space-3);padding-top:var(--space-2)}
[data-module="ba"] .traylabel{color:var(--primary);}
[data-module="ba"] .trayhelp{color:var(--faint);}
[data-module="ba"] .traylist{margin-top:var(--space-2)}
[data-module="ba"] .trayitem{
  background:var(--primary-tint);}
[data-module="ba"] .trayitem .tc{font-size:var(--text-xs);min-width:64px}
[data-module="ba"] .owninput{width:100%;margin-top:var(--space-3);margin-bottom:auto;font-family:var(--font-body);
  font-size:var(--text-sm);line-height:1.5;padding:var(--space-3);resize:none;
  border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-2)}
[data-module="ba"] .owninput::placeholder{color:var(--faint);white-space:pre-wrap}
[data-module="ba"] .restcard{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:var(--space-3);text-align:center;padding:var(--space-5);border:1px dashed var(--border);border-radius:var(--radius-lg);background:var(--surface-2)}
[data-module="ba"] .againbtn{min-height:44px;padding:0 var(--space-4);border:1px solid var(--primary);border-radius:var(--radius-full);
  background:var(--surface);color:var(--primary);font-size:var(--text-sm)}
/* STAMP-OUT-V1 (ba): stamp colours deleted with the stamps. */
[data-module="ba"] .fcard{background:var(--surface);border:1px solid var(--border);
  padding:var(--space-5);box-shadow:var(--shadow-md);
  }
[data-module="ba"] .fcard .cat{font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.1em;color:var(--primary)}
[data-module="ba"] .fcard .txt{font-size:1.35rem;}
[data-module="ba"] .cardfoot{margin-top:auto;display:flex;justify-content:center;position:relative;z-index:3}
[data-module="ba"] .smallbtn{min-height:38px;padding:0 var(--space-4);border:1px solid var(--primary-soft);border-radius:var(--radius-full);
  background:var(--surface);color:var(--text);font-size:var(--text-xs)}
/* CHEVRON-AIM-V1 (ba): rest hoisted to core. */
/* CHEVRON-AIM-V1 (ba): aim hoisted to core. */
[data-module="ba"] .tapzone{background:transparent;}
[data-module="ba"] .stackcard{box-shadow:var(--shadow-sm)}
[data-module="ba"] .deckbtns button{border:1px solid var(--border);background:var(--surface);}
[data-module="ba"] .deckbtns .yes{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
[data-module="ba"] .flag{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-xs);font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--primary)}
[data-module="ba"] .flag::after{content:'';flex:1;height:1px;background:var(--divider)}
[data-module="ba"] .flag.top{margin-top:var(--space-3)}
[data-module="ba"] .flag.bottom{margin-top:var(--space-1)}
[data-module="ba"] .draglist{user-select:none;-webkit-user-select:none;display:flex;flex-direction:column;gap:var(--space-2);margin-top:var(--space-2);touch-action:none}
[data-module="ba"] .dragitem{display:flex;align-items:center;gap:var(--space-3);background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);cursor:grab;user-select:none}
[data-module="ba"] .dragitem.lifted{cursor:grabbing;box-shadow:var(--shadow-lg);border-color:var(--primary-soft);background:var(--primary-tint);transform:scale(1.02)}
[data-module="ba"] .dragph{border:1px dashed var(--primary-soft);border-radius:var(--radius-md);background:var(--surface)}
[data-module="ba"] .grip2{color:var(--faint);font-size:var(--text-xs);letter-spacing:-2px}
[data-module="ba"] .dn{font-size:var(--text-xs);color:var(--faint);font-variant-numeric:tabular-nums;min-width:14px}
[data-module="ba"] .dt{flex:1;font-size:var(--text-sm)}
[data-module="ba"] .dc{font-size:var(--text-xs);color:var(--primary)}
[data-module="ba"] .darrows{display:flex}
[data-module="ba"] .darrows button{border:1px solid var(--primary-soft);border-radius:var(--radius-sm);
  background:var(--surface);font-size:var(--text-xs);line-height:1}
[data-module="ba"] .empty{padding:var(--space-4);color:var(--faint);}
[data-module="ba"] nav{padding:var(--space-4) var(--space-5);border-top:1px solid var(--divider);background:var(--surface-2)}
[data-module="ba"] .back{flex:0 0 96px;border:1px solid var(--border);background:var(--surface);color:var(--muted)}
[data-module="ba"] .back[disabled]{opacity:.4;cursor:not-allowed}
[data-module="ba"] .next{flex:1;background:var(--primary);color:var(--on-primary)}
@media (hover:hover){
[data-module="ba"] .next:hover{background:var(--primary-dark)}
}
[data-module="ba"] footer{padding:var(--space-3) var(--space-5) var(--space-5);color:var(--faint);background:var(--surface-2)}
[data-module="ba"] .scrim{position:fixed;inset:0;background:var(--scrim);display:flex;align-items:flex-end;justify-content:center;z-index:60;opacity:0;pointer-events:none;transition:opacity var(--ease)}
[data-module="ba"] .scrim.open{opacity:1;pointer-events:auto}
[data-module="ba"] .sheet{width:100%;max-width:430px;background:var(--surface);border-radius:var(--radius-lg) var(--radius-lg) 0 0;padding:var(--space-5);
  box-shadow:0 -12px 40px rgba(42,39,33,.18)}
[data-module="ba"] .grip{width:38px;height:4px;border-radius:var(--radius-full);background:var(--surface-offset);margin:0 auto var(--space-4)}
[data-module="ba"] .sheet h3{font-family:var(--font-display);font-size:var(--text-lg)}
[data-module="ba"] .sheet .sub{font-size:var(--text-sm);color:var(--muted);margin-top:var(--space-1)}
[data-module="ba"] .sheetbtns{display:flex;gap:var(--space-3);margin-top:var(--space-5)}
[data-module="ba"] .sheetbtns button{flex:1;min-height:48px;border-radius:var(--radius-full);font-size:var(--text-sm)}
[data-module="ba"] .sheetbtns .cancel{border:1px solid var(--border);background:var(--surface)}
[data-module="ba"] .sheetbtns .save{background:var(--primary);color:var(--on-primary)}
[data-module="ba"] .chips{display:flex;flex-wrap:wrap;margin-top:var(--space-2)}
[data-module="ba"] .chip[aria-pressed="true"]{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
[data-module="ba"] .addrow{display:none}
[data-module="ba"] .addrow.open{display:flex}
[data-module="ba"] .chip{padding:7px 10px;border:1px solid var(--primary-soft);border-radius:var(--radius-full);background:var(--surface);font-size:var(--text-xs)}
[data-module="ba"] .homelink{color:inherit}
/* ===== v7: v4 scoping + bank helper text fix ===== */
[data-module="ba"] .row.filled,[data-module="ba"] .trayitem,[data-module="ba"] .bank,[data-module="ba"] .dragitem.lifted{color:var(--on-tint)}
[data-module="ba"] .row.filled .rt{color:var(--on-tint-muted)}
[data-module="ba"] .row.filled .rv{color:var(--on-tint)}
[data-module="ba"] .row.filled .rv.ghost{color:var(--on-tint-faint);font-style:italic}
[data-module="ba"] .trayitem .tc,[data-module="ba"] .bank .bcn,[data-module="ba"] .dragitem.lifted .dc{color:var(--primary)}
[data-module="ba"] .trayitem button,[data-module="ba"] .dragitem.lifted .dn,[data-module="ba"] .dragitem.lifted .grip2{color:var(--on-tint-faint)}
/* --- Ligatures: Instrument Serif liga/clig — added 31 Jul 2026 --- */
[data-module="ba"] .sheet h3{font-variant-ligatures:common-ligatures contextual;font-feature-settings:"liga" 1,"clig" 1;font-kerning:normal}
/* --- Sheet motion: matches worry (fade + 14px lift, scrolls when tall) --- */
[data-module="ba"] .sheet{animation:none;max-height:86dvh;overflow-y:auto;transform:translateY(14px);transition:transform var(--ease)}
[data-module="ba"] .scrim.open .sheet{transform:none}
/* --- Step 6 review: mirrors MW step 3 (neutral card, collapsible, one open at a time) --- */
[data-module="ba"] .revcard{background:var(--surface-2)}
[data-module="ba"] .revhead{display:flex;align-items:center;gap:var(--space-2);width:100%;
  text-align:left;background:none;border:none;padding:12px 14px;font-family:inherit;cursor:pointer}
[data-module="ba"] .revtext{flex:1;display:flex;align-items:baseline;gap:var(--space-3);min-width:0}
[data-module="ba"] .revtext .revtime{flex:none}
[data-module="ba"] .revbody{padding:0 14px 14px;display:flex;flex-direction:column;gap:var(--space-4)}
[data-module="ba"] .revcard.closed .revbody{display:none}
[data-module="ba"] .revhead .revact{flex:1;font-size:var(--text-base);font-weight:500;
  line-height:1.2;color:var(--primary)}
[data-module="ba"] .revhead .chev{width:11px;height:11px;flex:none;color:var(--faint);
  transition:transform var(--ease)}
[data-module="ba"] .revcard:not(.closed) .revhead .chev{transform:rotate(180deg)}
@media (hover:hover){[data-module="ba"] .revhead:hover .chev{color:var(--muted)}}

[data-module="ba"] .segb{background:var(--surface)}
[data-module="ba"] .tip{display:block;margin-top:var(--space-3);padding:0;background:none;border:none;border-radius:0;font-size:var(--text-xs);font-style:italic;color:var(--faint);line-height:1.5}
/* focused text fields: border shifts to the accent, no glow, no ring */
[data-module="ba"] input:focus,[data-module="ba"] textarea:focus,[data-module="ba"] select:focus{outline:none;box-shadow:none;border-color:var(--primary)}
/* Pathery - Behavioural Activation, desktop layer. Full note in the session log, 15 Aug 2026. */
/* ---- Every width -------------------------------------------------------- */
[data-module="ba"] footer{border-top:none}
/* The module label is a button now, so it needs to look reachable without
   shouting. Colour only on hover; the global focus ring handles keyboards. */
@media (hover:hover){
[data-module="ba"] .module:hover{color:var(--text)}
}
[data-module="ba"] .flinks a{color:var(--muted);
  }
[data-module="ba"] .flinks a:hover{color:var(--text);border-bottom-color:var(--divider)}
[data-module="ba"] .fine{color:var(--faint);}
/* A chip for something already selected but no longer offered, so a stale
   entry can always be switched off. See pruneStale in the script. */
[data-module="ba"] .chip.stale{border-style:dashed}
/* Ranking rows. Full note in the session log, 15 Aug 2026. */
[data-module="ba"] .dragitem{padding:var(--space-2) var(--space-3)}
[data-module="ba"] .darrows{flex-direction:row;gap:var(--space-1)}
[data-module="ba"] .darrows button{width:28px;height:28px}
/* Dragged activity chips paint above the hour blocks. */
[data-module="ba"] .bank{position:relative}
body[data-module="ba"].dragging .bank{z-index:70}
[data-module="ba"] .bankchip.dragging{position:relative;z-index:71}
/* Step 6 cards. Full note in the session log, 15 Aug 2026. */



/* Each question travels with its own control, as worry.html .psstep does:
   8px inside a group, 16px between groups. Built by the script. */
[data-module="ba"] .revcol{display:flex;flex-direction:column;gap:var(--space-4);min-width:0}
[data-module="ba"] .revgrp{display:flex;flex-direction:column;gap:var(--space-2);min-width:0}
[data-module="ba"] .revgrp>*{margin-top:0}
/* A self-added activity with no spaces in it - "ACBACBACB..." - cannot wrap,. Full note in the session log, 15 Aug 2026. */
[data-module="ba"] .row .rv,[data-module="ba"] .dragitem .dt,[data-module="ba"] .bankchip,[data-module="ba"] .revhead .revact{overflow-wrap:anywhere;min-width:0}
/* The activity tray at every width: no container, chips sized to their own. Full note in the session log, 15 Aug 2026. */
[data-module="ba"] .bank{padding:0;border:none;background:none}
[data-module="ba"] .bank .bankchips{flex-direction:row;flex-wrap:wrap;
  row-gap:var(--space-2);column-gap:var(--space-2)}
[data-module="ba"] .bank .bankchip{flex:0 0 auto;max-width:100%;color:var(--text)}
[data-module="ba"] .bank .trayhelp{color:var(--faint)}
@media (max-width:959px){
/* Between 521 and 960 the card is not a grid, so the two groups the script
     builds sit flush against each other. Same gap inside and out. */

}
/* ---- 768: sheet centres ------------------------------------------------- */
@media (min-width:768px){
[data-module="ba"] .scrim{align-items:center}
[data-module="ba"] .sheet{max-width:520px;border-radius:var(--radius-lg);transform:translateY(10px) scale(.99)}
[data-module="ba"] .scrim.open .sheet{transform:none}
}
/* ---- 521: the shell becomes the page ------------------------------------ */
@media (min-width:521px){
body[data-module="ba"]{display:block;padding:0;align-items:stretch;background:var(--surface-2)}
[data-module="ba"] .shell{width:auto;max-width:none;height:auto;min-height:100dvh;border-radius:0;
    box-shadow:none;border:none;background:var(--surface-2);overflow:visible;
    display:flex;flex-direction:column}
/* The header keeps the phone's box model so its height does not jump
     across the breakpoint. Only the container width changes. */
[data-module="ba"] header{position:sticky;top:0;z-index:30;background:var(--surface-2);
    border-bottom:1px solid var(--divider);padding:var(--space-4) 0 var(--space-3)}
/* The script moves .steplabel into .brandrow, so margin-left does the work. */
[data-module="ba"] .steplabel{margin:0 0 0 auto;
    color:var(--faint);}
[data-module="ba"] main{gap:var(--space-5);
    background:var(--surface);
    padding:38px max(40px,calc((100% - 1000px) / 2)) 34px;overflow:visible;/* SHELL-OVERFLOW-FIX-V2 */}
[data-module="ba"] nav{background:transparent;
    padding:var(--space-4) max(40px,calc((100% - 1000px) / 2));
    border-top:1px solid var(--divider)}
[data-module="ba"] .back{flex:0 0 96px}
[data-module="ba"] .next{flex:0 0 auto;}
[data-module="ba"] footer{background:transparent;display:block!important;
    padding:var(--space-3) max(40px,calc((100% - 1000px) / 2)) var(--space-5)}
[data-module="ba"] .deckwrap{min-height:var(--card-h)}
}
/* ---- 960: per-screen reflows -------------------------------------------- */
@media (min-width:960px){
/* Welcome: the only screen in the tool that is read rather than used, so. Full note in the session log, 15 Aug 2026. */
/* Why, How and What read as one block; the closing line stands apart. */
/* Deck: two equal columns, cards left, Can try right */
[data-module="ba"] main[data-screen="deck"]{display:grid;column-gap:32px;align-items:start;
    grid-template-columns:repeat(2,minmax(0,1fr));
    /* DECKROW-V1: the card row is definite so the list cannot inflate it.
     Reported 11 Aug 2026: on desktop the two deck buttons sank as the sorted
     list grew. card row 3 of 4; the single .tray spans rows 3-4 in column 2, and both tracks were
     auto-sized, so the spanning list distributed its height into the card row
     as well as the buttons row. .fcard is position:absolute;inset:0 and adds
     nothing to .deckwrap, so the card held its own height while the track grew
     beneath it — an empty gap, widening with every sorted item.
     A definite track refuses distributed space, so the overflow now lands in
     the buttons row, below them. Card position and card-to-buttons distance are
     both fixed. --card-h is stated once here and read by .deckwrap below, so
     the track and the card cannot drift apart.
     --card-drop is this module's own label-alignment offset.
     Values Card Sort is not part of this pass: its grid leaves .pips and one
     pile auto-placed, so explicit tracks there need the child indices fixed
     first. */
    --card-h:200px;--card-drop:calc(var(--text-xs) * 1.6 + var(--space-2));
    grid-template-rows:auto auto calc(var(--card-h) + var(--card-drop)) auto}
[data-module="ba"] main[data-screen="deck"]>.title{grid-column:1 / -1;grid-row:1;
    text-align:center;margin-left:auto;margin-right:auto}
[data-module="ba"] main[data-screen="deck"]>.body{grid-column:1 / -1;grid-row:2;max-width:none;
    text-align:center;margin-left:auto;margin-right:auto}
[data-module="ba"] main[data-screen="deck"]>.deckwrap{grid-column:1;grid-row:3;
    /* dropped by the height of the tray label and its gap, so the top of
       the card lines up with the first item under CAN TRY */
    margin-top:var(--card-drop);min-height:var(--card-h)}
[data-module="ba"] main[data-screen="deck"]>.deckbtns{grid-column:1;grid-row:4}
[data-module="ba"] main[data-screen="deck"]>.tray{grid-column:2;grid-row:3 / span 2;
    margin-top:0;border-top:none;padding-top:0}
/* Rank: EASIEST and HARDEST move into a narrow rail on the left, so the. Full note in the session log, 15 Aug 2026. */
[data-module="ba"] main[data-screen="rank"]{display:grid;grid-template-columns:84px minmax(0,660px);
    column-gap:var(--space-4);align-items:start;justify-content:center}
[data-module="ba"] main[data-screen="rank"]>*{max-width:none;margin-left:0;margin-right:0}
[data-module="ba"] main[data-screen="rank"]>.title{grid-column:1 / -1;grid-row:1;text-align:center}
[data-module="ba"] main[data-screen="rank"]>.body{grid-column:1 / -1;grid-row:2;text-align:center;max-width:none}
[data-module="ba"] main[data-screen="rank"]>.draglist{grid-column:2;grid-row:3;margin-top:0;width:100%}
[data-module="ba"] main[data-screen="rank"]>.flag{grid-column:1;grid-row:3;margin:0;white-space:nowrap;
    padding:var(--space-2) var(--space-3) var(--space-2) 0}
[data-module="ba"] main[data-screen="rank"]>.flag.top{align-self:start;justify-content:flex-end}
/* The bottom label carries the hairline: stretched to the full cell, its
     text pushed to the foot, the rule drawn on its right edge. */
[data-module="ba"] main[data-screen="rank"]>.flag.bottom{align-self:stretch;flex-direction:column;
    justify-content:flex-end;align-items:flex-end;
    border-right:1px solid var(--divider)}
[data-module="ba"] main[data-screen="rank"]>.flag::after{display:none}
/* Planner, shared by typical day, plan and review. Full note in the session log, 15 Aug 2026. */
[data-module="ba"] main[data-screen="typicalday"],[data-module="ba"] main[data-screen="plan"],[data-module="ba"] main[data-screen="review"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:44px;row-gap:var(--space-5);align-items:start}
[data-module="ba"] main[data-screen="typicalday"]>*,[data-module="ba"] main[data-screen="plan"]>*,[data-module="ba"] main[data-screen="review"]>*{max-width:none;width:auto;margin-left:0;margin-right:0}
[data-module="ba"] main[data-screen="typicalday"]>.title,[data-module="ba"] main[data-screen="plan"]>.title,[data-module="ba"] main[data-screen="review"]>.title,[data-module="ba"] main[data-screen="typicalday"]>.body,[data-module="ba"] main[data-screen="plan"]>.body,[data-module="ba"] main[data-screen="review"]>.body{grid-column:1 / -1;text-align:center;
    margin-left:auto;margin-right:auto}
[data-module="ba"] main[data-screen="typicalday"]>.title,[data-module="ba"] main[data-screen="plan"]>.title,[data-module="ba"] main[data-screen="review"]>.title{grid-row:1}
[data-module="ba"] main[data-screen="typicalday"]>.body,[data-module="ba"] main[data-screen="plan"]>.body,[data-module="ba"] main[data-screen="review"]>.body{grid-row:2}
[data-module="ba"] main[data-screen="typicalday"]>.period:nth-of-type(1){grid-column:1;grid-row:3}
[data-module="ba"] main[data-screen="typicalday"]>.period:nth-of-type(2){grid-column:2;grid-row:3}
/* The tray: one line, no container. Full note in the session log, 15 Aug 2026. */
/* Desktop only: the label sits beside the pills rather than above them,. Full note in the session log, 15 Aug 2026. */
[data-module="ba"] main[data-screen="plan"]>.bank{grid-column:1 / -1;grid-row:3;position:static;margin-top:0;
    padding:0 0 0 var(--space-1);min-height:40px;
    display:flex;flex-wrap:wrap;align-items:center;
    column-gap:var(--space-3);row-gap:var(--space-2)}
[data-module="ba"] main[data-screen="plan"]>.bank .banklabel{flex:0 0 auto}
[data-module="ba"] main[data-screen="plan"]>.bank .bankchips{flex:1 1 auto;margin-top:0}
[data-module="ba"] main[data-screen="plan"]>.bank .trayhelp{margin-top:0}
[data-module="ba"] main[data-screen="plan"]>.period:nth-of-type(2){grid-column:1;grid-row:4}
[data-module="ba"] main[data-screen="plan"]>.period:nth-of-type(3){grid-column:2;grid-row:4}
[data-module="ba"] main[data-screen="review"]>.period:nth-of-type(1){grid-column:1;grid-row:3}
[data-module="ba"] main[data-screen="review"]>.period:nth-of-type(2){grid-column:2;grid-row:3}
[data-module="ba"] main[data-screen="review"]>.card{grid-column:1 / -1;grid-row:3}
[data-module="ba"] main[data-screen="review"]>.dlrow{grid-column:1 / -1;grid-row:4;justify-content:center;
    margin-top:0}
[data-module="ba"] main[data-screen="review"]{padding-bottom:var(--space-5)}
[data-module="ba"] main[data-screen="review"]>.dlrow .dlbtn{flex:0 0 auto;min-width:210px}
/* Summary: each card fills the 1000px column, contents in two.
     Padding mirrors worry.html .pshead and .psbody. */
[data-module="ba"] main[data-screen="summary"]>*{max-width:none;width:100%}
[data-module="ba"] main[data-screen="summary"]>.title,[data-module="ba"] main[data-screen="summary"]>.body{text-align:center;margin-left:auto;margin-right:auto}
/* BA-COLUMNS-V1: the cards sit inside .revlist now, so these five rules look for a
   card anywhere under the screen rather than directly inside it. Without this the
   two columns never switch on. */
[data-module="ba"] main[data-screen="summary"] .revcard{margin:0}
/* BA-CLOSED-V1: only the open card runs two columns. Applied to every card, the grid
   overrode the rule that hides a closed card body, so every card looked open. */
[data-module="ba"] main[data-screen="summary"] .revcard:not(.closed)>.revbody{display:grid;align-items:start;
    grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px;row-gap:var(--space-4)}

[data-module="ba"] main[data-screen="summary"] .revcard>.revbody>.revcol.left{grid-column:1}
[data-module="ba"] main[data-screen="summary"] .revcard>.revbody>.revcol.right{grid-column:2}

}
/* BA-PILL-V1 — Pathery - BA pills, plus and composer. Full note in the session log, 15 Aug 2026. */
/* Padding, size, radius and border already matched. Full note in the session log, 15 Aug 2026. */
[data-module="ba"] .chip{line-height:normal}
[data-module="ba"] .chips{gap:6px}
/* The plus: MW's geometry, BA's dashed treatment, weight 400. */
[data-module="ba"] .chip.plus{display:inline-flex;align-items:center;justify-content:center;
  font-weight:400;min-width:30px;padding:7px 8px;
  border-style:dashed;background:var(--surface);color:var(--muted)}
/* Composer matches MW: 12px text, 8px radius, a pill Add rather than a
   44px slab. .addrow keeps display:none until .open, as before. */
[data-module="ba"] .addrow{gap:var(--space-2);margin-top:var(--space-2);align-items:center;flex-wrap:wrap}
[data-module="ba"] .addrow input{flex:1;min-width:180px;min-height:0;font-size:var(--text-xs);
  padding:10px 12px;border:1px solid var(--divider);
  border-radius:var(--radius-sm);background:var(--surface)}
[data-module="ba"] .addrow button{min-height:0;font-size:var(--text-xs);line-height:normal;
  padding:7px 12px;border-radius:var(--radius-full);
  border:1px solid var(--primary-soft);background:var(--primary-tint);color:var(--text)}
/* Cross on a selected custom chip. Inert until the script renders one. */
[data-module="ba"] .chip{display:inline-flex;align-items:center;gap:var(--space-2)}
[data-module="ba"] .chip .rm{margin-left:2px;background:none;border:0;color:inherit;opacity:1;
  cursor:pointer;font-size:var(--text-sm);line-height:1;padding:0;display:none;position:relative}
[data-module="ba"] .chip[aria-pressed="true"] .rm{display:inline}
/* BA-PILL-V2 — Pathery - BA composer focus. Full note in the session log, 15 Aug 2026. */
[data-module="ba"] .addrow input:focus{border-color:var(--primary);outline:none;box-shadow:none}

/* BA-WELCOME-V10 — Pathery - BA welcome v10. Full note in the session log, 15 Aug 2026. */


/* BA-WELCOME-V1: the lead line is plain text at --muted now, and the focus item
   on the meta line opens the loop panel. It matches the CBT badge beside it at
   weight 500, with an 11px chevron and the same finger-sized hit area; icon and
   chevron inherit the colour, so hover and press change all three together. */
[data-module="ba"] .wlead{color:var(--muted);font-family:inherit;font-weight:400;cursor:auto;}
[data-module="ba"] .metaline .mitem.mtap{position:relative;color:var(--primary);
  font:inherit;font-size:var(--text-xs);font-weight:500;line-height:1;background:none;border:0;
  padding:0;cursor:pointer;transition:color var(--ease)}
[data-module="ba"] .metaline .mitem.mtap::before{content:'';position:absolute;inset:-11px -6px}
[data-module="ba"] .metaline .mitem.mtap svg{color:inherit}
[data-module="ba"] .metaline .mitem.mtap .chev{width:11px;height:11px;flex:none;
  transition:transform var(--ease)}
[data-module="ba"] .metaline .mitem.mtap[aria-expanded="true"] .chev{transform:rotate(180deg)}
@media (hover:hover){[data-module="ba"] .metaline .mitem.mtap:hover{color:var(--primary-dark)}}
[data-module="ba"] .metaline .mitem.mtap:active{color:var(--primary-dark)}
@media (prefers-reduced-motion:reduce){
[data-module="ba"] .metaline .mitem.mtap .chev{transition:none}
}
[data-module="ba"] .wrule{background:var(--divider)}
[data-module="ba"] .waction{color:var(--muted);}


[data-module="ba"] .metaline{
  color:var(--faint)}

[data-module="ba"] .cbt{
  
  color:var(--primary);background:none;
  }
@media (hover:hover){[data-module="ba"] .cbt:hover{color:var(--primary-dark)}}
[data-module="ba"] .cbt:active{color:var(--primary-dark)}

[data-module="ba"] .whybody{
  color:var(--faint);}
@media (prefers-reduced-motion:reduce){
  }

@media (min-width:521px){
}

@media (min-width:960px){
}

/* PATHERY-TOUCH-V1-BA — Pathery — gesture policy, Behavioural Activation. Full note in the session log, 15 Aug 2026. */

/* PATHERY-NAVGHOST-V1-BA — Pathery — nav overlay suppression, Behavioural Activation. Full note in the session log, 15 Aug 2026. */

/* PATHERY-TAPHL-V1-BA — Pathery — tap highlight, Behavioural Activation. Full note in the session log, 15 Aug 2026. */
body[data-module="ba"]{-webkit-tap-highlight-color:transparent}

/* BA-PARITY-V1 — the hover ladder. Filled things darken, outlined things fill,
   and everything here sits behind a check for a pointer, so phones never see it. */
@media (hover:hover){
/* filled with the module colour: one step darker */
[data-module="ba"] .sheetbtns .save:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
[data-module="ba"] .deckbtns .yes:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
[data-module="ba"] .segb.on:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
[data-module="ba"] .chip.on:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
[data-module="ba"] .chip[aria-pressed="true"]:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
[data-module="ba"] .chip.newchip[aria-pressed="true"]:hover{background:var(--accent-ink);border-color:var(--accent-ink)}
/* coloured edge, white fill: the module tint */
[data-module="ba"] .chip:not(.on):not([aria-pressed="true"]):hover{background:var(--primary-tint)}
[data-module="ba"] .segb:not(.on):hover{background:var(--primary-tint)}
[data-module="ba"] .dlbtn:hover{background:var(--primary-tint)}
[data-module="ba"] .againbtn:hover{background:var(--primary-tint)}
[data-module="ba"] .smallbtn:hover{background:var(--primary-tint)}
[data-module="ba"] .darrows button:hover{background:var(--primary-tint)}
[data-module="ba"] .bankchip:hover{background:var(--primary-tint)}
/* already resting on the tint: deepen to the soft edge */
[data-module="ba"] .addrow button:hover{background:var(--primary-soft)}
/* neutral edge: the quiet fill */
[data-module="ba"] .back:not([disabled]):hover{background:var(--surface-2)}
[data-module="ba"] .sheetbtns .cancel:hover{background:var(--surface-2)}
[data-module="ba"] .deckbtns button:not(.yes):hover{background:var(--surface-2)}
}

/* BA-CROSS-V1, 26 Aug 2026. The two crosses in this module: on a chosen custom chip and on
   a tray item. The first was white at 60 per cent on blue, 2.98 to 1, just under what a graphic
   needs; it is now full strength at 5.28. Both gain a 24-pixel invisible target, centred, so
   nothing visible moves and both end up the same size to the thumb. A cross has no pointer state
   by decision: nothing about it changes on hover. Matches MW-CROSS-V1. */
[data-module="ba"] .trayitem button{position:relative}
[data-module="ba"] .chip .rm::before,[data-module="ba"] .trayitem button::before{content:'';position:absolute;left:50%;top:50%;width:24px;height:24px;transform:translate(-50%,-50%)}
