/* One shared style for every trainer page. The trainers were ported from separate artifacts, so
   each brought its own fonts, buttons and spacing. This file and fitTrainerStyle() in
   trainer-bar.js put them on the site's look. Both are shared files the artifact sync never
   writes, so a re-port keeps the style:
   - this sheet is linked by the port scripts (SITE_SCRIPTS) and the site-built trainer pages
   - trainer-bar.js swaps each trainer's own fonts for the site's (Source Sans 3, Barlow Semi
     Condensed, JetBrains Mono) and squares off rounded buttons to the site's 8 px corners
   - trainer-bar.js also folds a long intro under the title into one line plus "How it works"
   Colours stay each trainer's own, apart from the Learn tab's "Key points to say" box below.
   Nothing here touches saved progress. */
@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root{--mts-body:"Source Sans 3","Segoe UI",system-ui,sans-serif;--mts-display:"Barlow Semi Condensed","Arial Narrow",Arial,sans-serif;--mts-mono:"JetBrains Mono",ui-monospace,Menlo,monospace;--mts-accent:#c2410c}
@media (prefers-color-scheme:dark){:root{--mts-accent:#f07a45}}
h1,h2,h3{font-family:var(--mts-display);letter-spacing:.005em}
button,input,select,textarea{font-family:inherit}
button{font-weight:600}
:focus-visible{outline:2px solid var(--mts-accent);outline-offset:2px}

/* Learn tab: the "Key points to say" box is the site's sea blue in every trainer (it was each
   trainer's orange accent on brown, which read as a warning). #notes keeps it off other .key
   classes, such as the radar legend. The trainers set color-scheme, so light-dark() follows it. */
#notes>.key{background:light-dark(#e6eff7,#14283a);border-left-color:light-dark(#1f5f8b,#6aa7d6)}

/* a long intro becomes its first sentence plus this fold-out */
.mt-how{margin:6px 0 0;font-size:15px;line-height:1.5}
.mt-how>summary{display:inline-flex;align-items:center;gap:6px;min-height:32px;cursor:pointer;font-weight:600;color:inherit;opacity:.85;list-style:none;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.mt-how>summary::-webkit-details-marker{display:none}
.mt-how>summary::before{content:"";width:7px;height:7px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(-45deg);transition:transform .15s}
.mt-how[open]>summary::before{transform:rotate(45deg)}
.mt-how>summary:hover{opacity:1}
.mt-how>div{margin:4px 0 0;max-width:62ch}

/* a gentle cross-fade between pages (browsers without it just change page as before) */
@media (prefers-reduced-motion:no-preference){
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.22s;animation-timing-function:ease-out}
}
@media (prefers-reduced-motion:reduce){.mt-how>summary::before{transition:none}}

/* Phones: a trainer's main action row (Next mark, Check, New problem) can be pinned to the foot of
   the screen by giving it the class mt-phone-bar (the port scripts and site-built pages add it), so
   moving on never needs a scroll. --mt-foot lifts the Ask a question button above it. Colours come
   from the trainer's own --card and --line unless it sets --mt-bar-bg and --mt-bar-line. */
@media (max-width:699px){
  body:has(.mt-phone-bar){--mt-foot:64px;padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .mt-phone-bar{position:fixed!important;left:0;right:0;bottom:0;z-index:30;margin:0!important;display:flex!important;flex-wrap:nowrap;gap:8px;align-items:center;background:var(--mt-bar-bg,var(--card,#fff));border-top:1px solid var(--mt-bar-line,var(--line,#d5dde8));box-shadow:0 -6px 16px #0000001a;padding:8px max(12px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
  .mt-phone-bar>button,.mt-phone-bar>a{flex:1;min-height:44px;margin:0;white-space:nowrap;padding-left:10px;padding-right:10px}
  .mt-phone-bar>span{flex:none;max-width:34%;font-size:13px;line-height:1.2;text-align:center}
  .mt-phone-bar[hidden]{display:none!important}
}

/* Full / Condensed notes switch (tools/condensed_notes.mjs; trainer-bar.js keeps the choice).
   Both views are on the page; html.mt-cond shows the short one and hides the full notes. */
.mt-view{display:inline-flex;margin:0 0 14px;border:1px solid light-dark(#1f5f8b,#6aa7d6);border-radius:8px;overflow:hidden}
.mt-view button{all:unset;box-sizing:border-box;min-height:40px;padding:0 16px;display:inline-flex;align-items:center;font:600 15px/1 var(--mts-body);color:light-dark(#1f5f8b,#9cc6e6);cursor:pointer}
.mt-view button+button{border-left:1px solid light-dark(#1f5f8b,#6aa7d6)}
.mt-view button[aria-pressed=true]{background:light-dark(#1f5f8b,#6aa7d6);color:light-dark(#fff,#0b1722)}
.mt-view button:focus-visible{outline:2px solid var(--mts-accent);outline-offset:-3px}
.mt-short{display:none;max-width:1100px}
html.mt-cond .mt-short{display:grid;grid-template-columns:minmax(0,1fr);column-gap:36px;align-items:start}
html.mt-cond #notes:has(>.mt-short)>:is(.apply,.ban,.key,.notes){display:none}
/* each group gets its own colour; only the group marked box (the key numbers) is filled,
   the rest are plain lists under a coloured heading. The box comes first, across the full
   width; the other groups sit side by side on wide screens. */
.mt-short section{--c:light-dark(#1f5f8b,#6aa7d6);--f:light-dark(#e6eff7,#14283a);margin:0 0 18px;padding:0;min-width:0}
.mt-short section:nth-child(4n+2){--c:light-dark(#0f766e,#4fc1b4);--f:light-dark(#e3f4f1,#10302c)}
.mt-short section:nth-child(4n+3){--c:light-dark(#a3530b,#f0a35e);--f:light-dark(#fdf0e3,#33220f)}
.mt-short section:nth-child(4n+4){--c:light-dark(#6d3fa8,#b99be6);--f:light-dark(#f1ebfa,#261c36)}
.mt-short h3{margin:0 0 6px;padding-bottom:4px;border-bottom:2px solid var(--c);color:var(--c);font-size:17px}
.mt-short section.box{order:-1;grid-column:1/-1;background:var(--f);border-left:4px solid var(--c);border-radius:0 10px 10px 0;padding:12px 16px}
.mt-short section.box h3{border-bottom:0;padding-bottom:0}
.mt-short ul{margin:0;padding-left:18px}
.mt-short li{margin:0 0 7px;line-height:1.45}
.mt-short li::marker{color:var(--c)}
@media (min-width:760px){html.mt-cond .mt-short{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1100px){html.mt-cond .mt-short{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:760px){.mt-short section.box ul{columns:2;column-gap:36px}.mt-short section.box li{break-inside:avoid}}
@media print{html.mt-cond .mt-short{display:grid;grid-template-columns:minmax(0,1fr);column-gap:36px;align-items:start}.mt-view{display:none}}
