/* Exercises, the exercise sheet, History and Today additions (round 9). Tokens and logical properties only; laptop rules behind a min-width query. */

/* ---------- the exercise sheet and the weights sheet (views/exercise-sheet.js) ---------- */
/* a folded part: one tappable line that says what is inside (the equipment, the muscles), 44 px tall */
.xs-fold{min-width:0}
.xs-fold>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--s-3);min-block-size:44px;list-style:none;
  color:var(--accent);font-size:var(--t-sm);font-weight:600}
.xs-fold>summary::-webkit-details-marker{display:none}
.xs-fold>summary::after{content:"";flex:none;inline-size:8px;block-size:8px;border-inline-end:2px solid var(--muted);border-block-end:2px solid var(--muted);
  transform:rotate(45deg);margin-block-start:-4px}
.xs-fold[open]>summary::after{transform:rotate(-135deg);margin-block-start:4px}
.xs-fold[open]>summary{margin-block-end:var(--s-2)}
.xs-fold[open]{display:grid;gap:var(--s-2)}
.xs-sum{display:grid;gap:var(--s-1);min-width:0;color:var(--ink)}
.xs-sum>b{font-size:var(--t-md)}
.xs-sum>.small{font-weight:400;overflow-wrap:anywhere}
.xs-copy{justify-self:start}
.xs-err{margin:0;max-width:none;color:var(--bad);font-weight:600}
.xs-err:empty{display:none}
.xs-sheet .filter-row .chip,.xs-sheet .chip-grid .chip{min-height:44px}
textarea.input[data-eq-list]{min-height:76px;resize:none;font-variant-numeric:tabular-nums}

/* ---------- Exercises: the lifter's own exercise, the pinned note, the rows on How to ---------- */
.lib-new{display:flex;align-items:center;gap:var(--s-3);inline-size:100%;min-block-size:56px;padding:var(--s-3) var(--s-4);border:1.5px dashed var(--line);
  border-radius:var(--r-lg);background:none;color:var(--ink);font:600 var(--t-md)/var(--lh-ui) var(--font-body);text-align:start;cursor:pointer}
.lib-none{justify-items:start}
.lib-note textarea.input{min-height:48px;resize:none;line-height:var(--lh-body);overflow:hidden}
.lib-note>.tiny:empty{display:none}
.lib-own{margin:0}

/* ---------- History: search, the Records and Notes switches, a past workout ---------- */
.hist-find{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s-2);min-width:0}
.hist-find>.input{flex:1 1 120px;min-inline-size:120px;inline-size:auto}
.hist-find>.chip{flex:none;min-height:44px;padding-inline:var(--s-3);font-size:var(--t-sm);background:var(--surface);box-shadow:inset 0 0 0 1px var(--card-line)}
.hist-find>.chip[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);box-shadow:none}
/* "Log a past workout" at the end of the search row: a quiet 44 px icon on a phone (named by aria-label and its
   tooltip), the icon and its words from 900 px. The field gives way first, so the row stays on one line at 360 px */
.hist-pastbtn{flex:none;inline-size:44px;min-inline-size:44px;padding:0}
.hist-pastbtn>span{display:none}
@media (min-width:900px){
  .hist-pastbtn{inline-size:auto;padding-inline:var(--s-3)}
  .hist-pastbtn>span{display:inline}
}
/* Arabic words are longer ("الأرقام القياسية"): on a phone the two switches use the chip's own small type and tighter
   sides, and the field may be a little narrower, so the row is still one line at 360 px */
@media (max-width:430px){
  html[lang="ar"] .hist-find{gap:var(--s-1)}
  html[lang="ar"] .hist-find>.input{flex-basis:96px;min-inline-size:96px}
  html[lang="ar"] .hist-find>.chip{padding-inline:var(--s-2);font-size:var(--t-xs)}
}
.hist-past-e{margin:0;max-width:none;color:var(--bad);font-weight:600}
.hist-past-e:empty{display:none}

/* ---------- laptop: two columns (app.js ctx.wide, views.css .split) ---------- */
@media (min-width:1200px) and (min-height:501px){
  /* Today: the hero keeps a comfortable measure beside the cards */
  .main.wide .td-split .split-side .td-hk:empty{display:none}
  /* History: the calendar and tiles sit beside the list and stay in view (the search field keeps its phone basis of
     120 px and grows from there, so the row, with the past workout button's words, is one line from 1200 px in Arabic too) */
  /* a lift's page: the four segments do not stretch across the window, the list-like panels keep a reading width,
     and How to's side column lets its row of alternatives stay inside the column */
  .main.wide .lp-seg{max-inline-size:560px}
  .main.wide .lp>.lp-panel[data-panel="records"],.main.wide .lp>.lp-panel[data-panel="history"]{max-inline-size:760px}
  .main.wide .split-side .lib-scroll{margin-inline:0;padding-inline:0;grid-auto-columns:minmax(150px,46%)}
  .main.wide .lib-cta{max-inline-size:420px;margin-inline:auto}
}
