/* Trainen view (LivuTrainingCards): toolbar pills, week card, plan cards, archive rows and the compact week rows on Home.
   Loads after styles/polish/mobile/professional/brand and overrides their older .weekly-card / .todo-item / .task-* rules. Colours are theme.css tokens only. */

/* Toolbar: the injury button (injury-ui.js, inserted before the toolbar) and "Schema aanpassen" sit side by side as pills. */
#view-tasks>.injury-entry,#view-tasks>.tasks-toolbar{display:inline-flex;vertical-align:top;margin:0 8px 16px 0}
#view-tasks>.tasks-toolbar{margin-right:0;gap:8px;justify-content:flex-start}
#view-tasks>.injury-entry,.tasks-toolbar .tasks-tool{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:7px 11px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--brand);font-size:12px;font-weight:700;line-height:1.15;text-align:left;box-shadow:none;width:auto}
#view-tasks>.injury-entry::after{content:'›';font-size:16px;line-height:1;color:var(--muted);margin-left:2px}
.tasks-toolbar .tasks-tool span{white-space:normal;max-width:72px}
.tasks-toolbar .tasks-tool svg{flex:0 0 auto}

/* Week card */
.weekly-card{margin:0 0 24px;padding:0;background:none;border:0;box-shadow:none}
.weekly-card .week-hero{margin:0 0 22px;padding:18px 18px 14px;border-radius:20px;background:var(--hero);color:var(--on-dark);border:1px solid var(--glass-2);box-shadow:none}
.week-hero-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:14px;row-gap:2px;align-items:center}
.week-hero .week-hero-tile.livu-tile{grid-row:1/3;width:48px;height:48px;border-radius:15px;background:var(--glass-2);color:var(--mint)}
.week-hero .livu-eyebrow{grid-row:1;grid-column:2;margin:0;align-self:end;color:var(--on-dark-soft)}
.week-hero-count{grid-row:2;grid-column:2/4;display:flex;align-items:baseline;gap:6px;white-space:nowrap;min-width:0;font-family:Manrope,sans-serif;font-size:30px;font-weight:800;line-height:1.05;letter-spacing:-.6px;color:var(--on-dark)}
.week-hero-count span{font-size:22px;font-weight:600;color:var(--on-dark-soft)}
.week-hero-count em{font-style:normal;font-size:15px;font-weight:600;letter-spacing:0;margin-left:4px}
.week-hero-date{grid-row:1;grid-column:3;align-self:end;font-size:13px;color:var(--on-dark-soft);white-space:nowrap}
.week-hero .week-meter{margin:16px 0 10px;height:6px;background:var(--glass-2);border-radius:9px;overflow:hidden}
.week-hero .week-meter>span{display:block;height:100%;background:var(--lime)!important;border-radius:9px;transition:width .3s}
.week-hero-status{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:0;margin:0;padding:6px 0 0;border:0;border-radius:8px;background:transparent;color:var(--on-dark);font-size:14px;font-weight:500;line-height:1.4;text-align:left;box-shadow:none}
.week-hero-status>span{flex:1;min-width:0}
.week-hero-status svg{flex:0 0 auto;color:var(--on-dark-soft)}

/* "Voor jou klaar" heading and the plan list */
.weekly-card>.section-line.plan-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.plan-heading h2{margin:0;font-size:20px}
.plan-heading .week-link{display:inline-flex;align-items:center;gap:2px;min-height:0;padding:6px 0;color:var(--brand);font-size:14px;font-weight:700;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.weekly-card .todo-grid.plan-list{display:grid;grid-template-columns:1fr;gap:14px}
@media(min-width:760px){.weekly-card .todo-grid.plan-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* align-items:stretch beats the old .todo-item{align-items:center}: with a column flex that rule centred short cards (Hardlopen). */
.todo-item.plan-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;text-align:left;gap:14px;min-width:0;margin:0;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:none;overflow:visible}
.plan-card-head{display:flex;align-items:center;justify-content:flex-start;gap:14px;min-width:0;width:100%}
.plan-card .plan-card-tile.livu-tile{width:54px;height:54px;border-radius:17px}
.plan-card-copy{flex:1;min-width:0}
.plan-card-copy .livu-eyebrow{margin:0 0 3px}
.plan-card-copy h3{margin:0;font-size:20px;line-height:1.2;letter-spacing:-.3px;overflow-wrap:anywhere}
.plan-card .plan-card-more{display:inline-grid;place-items:center;flex:0 0 auto;width:40px;height:40px;min-height:0;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--surface-2);color:var(--ink);box-shadow:none}
.plan-card-chips{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px;width:100%}
.plan-card-chips .livu-pill{padding:5px 10px;font-size:12px;font-weight:600;letter-spacing:0}
/* Solid premium buttons on the base palette: lime primary with a soft inset highlight, outlined brand secondary. */
.plan-card .task-open{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:50px;margin:0;padding:13px 18px;border-radius:14px;font-size:15px;font-weight:800;text-align:center;transition:filter .15s,background .15s}
.plan-card .task-open.primary{background:var(--lime);border:0;color:var(--on-accent);box-shadow:0 1px 0 var(--glass-2) inset,0 6px 16px var(--shadow-1)}
.plan-card .task-open.primary:hover{background:var(--lime);filter:brightness(.96)}
.plan-card .task-open.secondary{background:transparent;border:1.5px solid var(--brand);color:var(--brand);box-shadow:none}
.plan-card .task-open.secondary:hover{background:var(--tint)}
.plan-card .task-open svg{flex:0 0 auto}
.plan-card .task-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-6px 0 -8px;padding:0;border:0}
.plan-card .task-footer>span{font-size:12px;color:var(--muted)}
.plan-card .task-footer .ghost{width:auto;margin:0 auto;min-height:0;padding:6px 0;font-size:12px;font-weight:600;color:var(--muted)}
.plan-card .task-footer>span~.ghost{margin:0 0 0 auto}

/* Empty week, skip-a-week action, extra run, archive */
.weekly-card .week-empty{display:grid;justify-items:center;gap:6px;width:100%;margin:0;padding:28px 20px;text-align:center;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:none}
.week-empty .empty-check.livu-tile{display:inline-flex;width:48px;height:48px;margin:0 0 6px;border-radius:50%;font-size:inherit}
.week-empty h3{margin:0;font-size:18px}
.week-empty p{margin:0}
.weekly-card .vacation-action{display:flex;flex-direction:row;align-items:center;gap:12px;width:100%;min-height:0;margin:16px 0 0;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);font-weight:600;text-align:left;box-shadow:none}
.vacation-action .vacation-tile.livu-tile{width:36px;height:36px;border-radius:11px;background:var(--tint);color:var(--brand)}
.vacation-action>.vacation-copy{display:grid;gap:2px;flex:1;min-width:0;font-size:14px}
.vacation-copy strong{font-size:14px;font-weight:700}
.vacation-copy span{font-size:12px;font-weight:400;color:var(--muted)}
.vacation-action>svg{flex:0 0 auto;color:var(--muted)}
.weekly-card .add-run{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;width:100%;margin:14px 0 0;padding:12px 16px;border:1px dashed var(--line);border-radius:16px;background:var(--surface);color:var(--brand);font-size:14px;font-weight:600;text-align:left}
.weekly-card .add-run>svg{flex:0 0 auto}
.weekly-card .add-run .small{display:inline;margin-left:auto;font-size:12px;font-weight:400;color:var(--muted)}
.weekly-card .week-archive{margin:16px 0 0;padding:2px 16px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.weekly-card .week-archive summary{display:flex;align-items:center;gap:8px;padding:12px 0;cursor:pointer;color:var(--ink);font-size:15px;font-weight:700;list-style:none}
.week-archive summary::-webkit-details-marker{display:none}
.week-archive summary::after{content:'';margin-left:auto;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .2s}
.week-archive[open] summary::after{transform:rotate(-135deg)}
.week-archive summary>span{margin:0}
.week-archive .finished-task.plan-row{display:flex;align-items:center;gap:12px;margin:0;padding:12px 0;border-top:1px solid var(--line);font-size:14px}
.plan-row .plan-card-tile.livu-tile{width:40px;height:40px;border-radius:12px}
.plan-row-copy{display:grid;gap:4px;flex:1;min-width:0}
.plan-row-copy strong{font-size:15px;overflow-wrap:anywhere}
.plan-row-copy small{font-size:12px;color:var(--muted)}
.plan-row-copy .livu-pill{justify-self:start}
.week-archive .plan-row-view.secondary{min-height:36px;padding:7px 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--brand);font-size:13px;font-weight:700;white-space:nowrap}
.week-archive .plan-row .ghost{min-height:0;padding:6px 0;font-size:13px;white-space:nowrap}
.weekly-card .week-footnote{margin:18px 0 0;font-size:13px;color:var(--muted);max-width:660px}
#view-tasks>[data-open-log]{width:100%;margin-top:14px;border-radius:16px}

/* Compact week card on Home (weeklyCard(true)): tile + title + subtitle + chevron rows. */
.dashboard-tasks .section-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.dashboard-tasks .section-line h2{margin:0;font-size:18px}
.dashboard-tasks .week-meter{height:6px;margin:0 0 4px;background:var(--surface-2);border-radius:9px;overflow:hidden}
.dashboard-tasks .week-meter>span{display:block;height:100%;background:var(--lime)!important;border-radius:9px}
.dashboard-task-list>.dashboard-task-open.plan-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;width:100%;min-height:60px;margin:0;padding:10px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);font-size:15px;text-align:left;box-shadow:none}
.dashboard-task-list>.dashboard-task-open.plan-row:first-child{border-top:0}
.dashboard-task-list>.dashboard-task-open.plan-row:hover{background:transparent}
.dashboard-task-open .plan-row-tile{display:inline-flex}
.dashboard-task-open .plan-row-tile .livu-tile{width:44px;height:44px;border-radius:14px}
.dashboard-task-open .plan-row-copy{gap:2px}
.dashboard-task-open .plan-row-copy strong{font-size:15px;font-weight:700}
.dashboard-task-open .plan-row-copy small b{color:var(--ok);font-weight:700}
.dashboard-task-open .plan-row-chevron{display:inline-flex;color:var(--muted)}
.dashboard-tasks>.dashboard-tasks-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:0;margin:6px 0 0;padding:12px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;color:var(--brand);font-size:14px;font-weight:700;text-align:center}
.dashboard-tasks .small{margin:0;padding:6px 0 0;color:var(--muted)}
