/* Case log · white cards with hairline borders, a goldenrod form header, rose for the recommendation.
   System font at 14px, 44px tap targets, single column under 600px. */
.case-log,.case-log *{box-sizing:border-box}
.case-log{margin:8px 0 24px;font:14px/1.55 system-ui,-apple-system,sans-serif;color:#302B29}
.case-log-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 16px;margin:0 0 12px}
.case-log-head .eyebrow{margin:0;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#800000}
.case-log-sub{margin:0;color:#5C544E}
.case-log-status{flex-basis:100%;margin:4px 0 0;min-height:0;font-size:13px;color:#5C544E;overflow-wrap:anywhere}
.case-log-status:empty{display:none}

.case-log-add{margin:0 0 16px;background:#fff;border:1px solid #D9D9D9;border-radius:6px;overflow:hidden}
.case-log-add>summary{display:flex;align-items:center;min-height:44px;padding:12px 16px;background:#FBF0D1;color:#5C4300;font-weight:700;cursor:pointer}
.case-log-add[open]>summary{border-bottom:1px solid #E9D28A}
.case-log-form{padding:16px}
.case-log-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
.case-log-input{display:flex;flex-direction:column;gap:4px;margin:0;font-size:13px;color:#302B29}
.case-log-input.wide{grid-column:1/-1}
.case-log-input>span{font-weight:600}
.case-log-input input,.case-log-input select,.case-log-input textarea{width:100%;min-height:44px;margin:0;padding:10px 12px;background:#fff;border:1px solid #D9D9D9;border-radius:4px;color:#302B29;font:14px/1.4 system-ui,-apple-system,sans-serif}
.case-log-input textarea{min-height:88px;resize:vertical}
.case-log-input input:focus-visible,.case-log-input select:focus-visible,.case-log-input textarea:focus-visible{outline:3px solid #315873;outline-offset:2px}
.case-log-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:12px 0 0}
.case-log .action{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;background:#fff;border:1px solid #D9D9D9;border-radius:4px;color:#800000;font:600 14px system-ui,-apple-system,sans-serif;text-decoration:none;cursor:pointer}
.case-log .action.primary{background:#800000;border-color:#800000;color:#FFF8EF}
.case-log .action:hover:not(:disabled){border-color:#A4343A;filter:brightness(.97)}
.case-log .action:disabled{opacity:.5;cursor:default}

.case-log-list{display:grid;gap:12px;margin:0 0 12px}
.case-log-card{padding:16px;background:#fff;border:1px solid #D9D9D9;border-radius:6px}
.case-log-card.is-example{border-style:dashed}
.case-log-card h4{margin:0;font:400 20px/1.25 Georgia,serif;color:#4B1020}
.case-log-meta{margin:4px 0 10px;font-size:13px;color:#5C544E}
.case-log-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
.case-log-field{min-width:0;padding:10px 12px;background:#fff;border:1px solid #EFEDE8;border-radius:4px}
.case-log-field[data-field=recommendation]{grid-column:1/-1;background:#F3E3E4;border-color:#D9AEB0;color:#643335}
.case-log-label{display:block;margin:0 0 4px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#800000}
.case-log-field[data-field=recommendation] .case-log-label{color:#643335}
.case-log-field p{margin:0;white-space:pre-line;overflow-wrap:anywhere}
.case-log-card .case-log-actions{margin-top:12px}
.case-log-card .case-log-actions a{display:inline-flex;align-items:center;min-height:44px;color:#800000;font-weight:600}
.case-log-empty{margin:0;color:#5C544E}

.case-log-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}
.case-log-tools a{display:inline-flex;align-items:center;min-height:44px;color:#800000;font-weight:600}

@media(max-width:600px){
  .case-log-grid,.case-log-fields{grid-template-columns:1fr}
  .case-log-input input,.case-log-input select,.case-log-input textarea{font-size:16px;min-height:48px}
  .case-log-card{padding:14px}
  .case-log-tools .action,.case-log-card .case-log-actions .action{width:100%}
}

/* Dashboard layer · 2026-10-17. Season chips that open their list, six Case Atlas types as white cards with a
   hue bar, an eight-week practice rhythm, and the last five fix-next-time notes. Quiet motion: items settle in
   with a small stagger; the current week pulses twice, then rests; none under reduced motion. */
.case-dash{display:grid;gap:12px;margin:0 0 16px}
.case-season{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
.case-season-chip{display:inline-flex;align-items:center;gap:2px;min-height:34px;padding:4px 12px;border:1px solid #D9D9D9;border-radius:999px;background:#fff;color:#302B29;font:500 13px system-ui,-apple-system,sans-serif;cursor:pointer;transition:border-color .15s,background .15s}
.case-season-chip strong{font-weight:700;color:#800000;margin-right:4px}
.case-season-chip:hover{border-color:#A4343A;background:#FAF4F4}
.case-season-chip[aria-pressed=true]{background:#800000;border-color:#800000;color:#FFF8EF}
.case-season-chip[aria-pressed=true] strong{color:#FFF8EF}
.case-season-chip.is-drill{background:#FBF0D1;border-color:#E9D28A;color:#5C4300}
.case-season-chip.is-drill strong{color:#5C4300}
.case-season-chip.is-drill[aria-pressed=true]{background:#5C4300;border-color:#5C4300;color:#FFF8EF}
.case-season-chip.is-drill[aria-pressed=true] strong{color:#FFF8EF}
.case-season-chip:focus-visible,.case-bucket:focus-visible,.case-week:focus-visible,.case-fix-open:focus-visible,.case-log-back:focus-visible{outline:2px solid #800000;outline-offset:3px}
.case-season-note{display:inline-flex;align-items:center;min-height:34px;padding:4px 12px;border-radius:999px;background:#F4F3EF;color:#5C544E;font:500 13px system-ui,-apple-system,sans-serif}
.case-season-note strong{font-weight:700;color:#302B29;margin-right:4px}

.case-buckets{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.case-bucket{--wash:#F4F3EF;--ink:#5C544E;--bar:#737373;display:grid;grid-template-rows:auto auto auto auto;align-content:start;gap:4px;min-height:96px;padding:12px 12px 12px 14px;text-align:left;background:#fff;color:#302B29;border:1px solid #D9D9D9;border-left:4px solid var(--bar);border-radius:6px;cursor:pointer;font:inherit;transition:box-shadow .15s,border-color .15s,background .15s}
.case-bucket:hover{border-color:var(--ink);box-shadow:0 4px 14px rgba(48,43,41,.10)}
.case-bucket[aria-pressed=true]{background:var(--wash);border-color:var(--ink)}
.case-bucket[data-empty=true] .case-bucket-num{color:#A6A6A6}
.case-bucket-num{font:700 24px/1.1 system-ui,-apple-system,sans-serif;color:var(--ink)}
.case-bucket-name{font:600 13px/1.3 system-ui,-apple-system,sans-serif;color:#302B29}
.case-bucket-meter{display:inline-flex;gap:3px;margin-top:2px}
.case-bucket-meter i{width:9px;height:9px;border-radius:50%;border:1px solid #D9D9D9;background:#fff}
.case-bucket-meter i[data-on="1"]{background:var(--bar);border-color:var(--bar)}
.case-bucket-avg{font-size:11px;color:#5C544E}

.case-weeks{padding:12px 14px 10px;background:#fff;border:1px solid #D9D9D9;border-radius:6px}
.case-weeks-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:0 0 8px}
.case-weeks-head strong{font:600 14px/1.3 system-ui,-apple-system,sans-serif;color:#302B29}
.case-weeks-head span{font-size:12px;color:#5C544E}
.case-weeks-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;align-items:end}
.case-week{display:grid;grid-template-rows:auto 56px auto;justify-items:center;gap:4px;padding:4px 2px;background:transparent;border:1px solid transparent;border-radius:4px;color:#5C544E;font:500 11px system-ui,-apple-system,sans-serif;cursor:pointer}
.case-week:hover{border-color:#D9D9D9;background:#FAF9F6}
.case-week[aria-pressed=true]{border-color:#800000;background:#FBF5F5}
.case-week-num{font-weight:700;color:#302B29}
.case-week-bar{align-self:end;width:min(28px,70%);height:var(--h,0%);min-height:3px;border-radius:3px 3px 0 0;background:#D9AEB0}
.case-week-bar[data-zero=true]{background:#EFEDE8}
.case-week.is-now .case-week-bar{background:#800000}
.case-week.is-now .case-week-bar[data-zero=true]{background:#EFEDE8;box-shadow:inset 0 -3px 0 #800000}
.case-week.is-now .case-week-label{color:#800000;font-weight:700}
.case-week-label{white-space:nowrap}

.case-fixes{padding:14px 16px 12px;background:#fff;border:1px solid #D9D9D9;border-radius:6px}
.case-fixes-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:0 0 6px}
.case-fixes-head h3{margin:0;font:400 20px/1.2 Georgia,serif;color:#4B1020}
.case-fixes-head span{font-size:12px;color:#5C544E}
.case-fixes-list{list-style:none;margin:0;padding:0}
.case-fix{display:grid;grid-template-columns:1fr auto;grid-template-areas:"meta open" "text open";gap:2px 12px;align-items:center;padding:10px 0;border-top:1px solid #EFEDE8}
.case-fix:first-child{border-top:0}
.case-fix-meta{grid-area:meta;font-size:12px;color:#5C544E}
.case-fix p{grid-area:text;margin:0;color:#302B29;overflow-wrap:anywhere}
.case-fix-open{grid-area:open;min-height:36px;padding:6px 12px;border:1px solid #D9D9D9;border-radius:4px;background:#fff;color:#800000;font:600 13px system-ui,-apple-system,sans-serif;cursor:pointer}
.case-fix-open:hover{border-color:#A4343A;background:#FAF4F4}

.case-chip{--wash:#F4F3EF;--ink:#5C544E;--bar:#737373;display:inline-block;margin:0 8px 0 0;padding:2px 8px 2px 7px;border-left:3px solid var(--bar);border-radius:3px;background:var(--wash);color:var(--ink);font:600 11px/1.5 system-ui,-apple-system,sans-serif}
.case-log .case-log-actions .case-log-type{display:inline-flex;flex-direction:row;align-items:center;gap:8px;margin:0;width:auto;font-size:13px;color:#302B29}
.case-log-type span{font-weight:600}
.case-log .case-log-actions .case-log-type select{width:auto;min-height:36px;padding:6px 10px;border:1px solid #D9D9D9;border-radius:4px;background:#fff;color:#302B29;font:13px system-ui,-apple-system,sans-serif}
.case-log-card.is-lit{border-color:#800000;box-shadow:0 0 0 3px #F4E8E9;transition:box-shadow .4s,border-color .4s}
.case-log-list-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:4px 0 0}
.case-log-list-head h3{margin:0;font:400 20px/1.2 Georgia,serif;color:#4B1020}
.case-log-count{font-size:13px;color:#5C544E}
.case-log-back{margin-left:auto;min-height:36px;padding:6px 12px;border:1px solid #D9D9D9;border-radius:4px;background:#fff;color:#800000;font:600 13px system-ui,-apple-system,sans-serif;cursor:pointer}
.case-log-back:hover{border-color:#A4343A;background:#FAF4F4}

@keyframes cl-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes cl-pulse{0%{box-shadow:0 0 0 0 rgba(128,0,0,.35)}100%{box-shadow:0 0 0 7px rgba(128,0,0,0)}}
.case-season-chip,.case-season-note,.case-bucket,.case-week,.case-fix{animation:cl-in .26s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0)*22ms)}
.case-week.is-now .case-week-bar{animation:cl-pulse 1.3s ease-out .6s 2}

@media(max-width:900px){.case-buckets{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){
  .case-buckets{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .case-bucket{min-height:0;padding:10px 10px 10px 12px}
  .case-weeks-grid{gap:3px}.case-week{font-size:10px}.case-week-label{font-size:10px}
  .case-fix{grid-template-columns:1fr;grid-template-areas:"meta" "text" "open"}.case-fix-open{justify-self:start;min-height:44px}
  .case-season-chip,.case-fix-open,.case-log-back,.case-log-type select{min-height:44px}
}
@media(prefers-reduced-motion:reduce){.case-season-chip,.case-season-note,.case-bucket,.case-week,.case-fix,.case-week.is-now .case-week-bar{animation:none}.case-season-chip,.case-bucket,.case-log-card.is-lit{transition:none}}
