/* Phones and small screens. Loaded on every page with media="(max-width:760px)", after the page's own styles,
   so wider screens never use these rules. Every phone adjustment for the site lives here. */

/* ---------- Page gutters and footer ---------- */
:root{--page-pad:16px}
  .site-foot{margin-top:40px}
  .site-foot .sf-card{padding:28px 18px 18px;border-radius:22px 22px 0 0}
  .site-foot .sf-top{grid-template-columns:1fr 1fr;gap:24px 18px}
  .site-foot .sf-brand{grid-column:1/-1}
  .site-foot .sf-bottom{flex-direction:column;gap:8px}

/* ---------- Top bar menu ---------- */
  body.vivid > nav.h-nav{padding:0 10px}
  .h-nav .in{height:58px;padding:0 10px 0 14px;gap:8px;border-radius:0 0 20px 20px}
  .h-crumb{display:none}
  .h-logo{font-size:1rem;margin-right:auto} .h-mark{width:30px;height:30px}
  .h-nav .theme-toggle{order:3;transform:scale(.88)}
  .h-burger{order:4;display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:12px;border:1px solid var(--h-line);background:color-mix(in srgb,var(--h-text) 5%,transparent);cursor:pointer}
  .h-burger span,.h-burger span::before,.h-burger span::after{display:block;width:18px;height:2px;border-radius:2px;background:var(--h-text);transition:transform .3s,opacity .3s;content:""}
  .h-burger span{position:relative} .h-burger span::before{position:absolute;top:-6px} .h-burger span::after{position:absolute;top:6px}
  .h-nav.open .h-burger span{background:transparent} .h-nav.open .h-burger span::before{transform:translateY(6px) rotate(45deg)} .h-nav.open .h-burger span::after{transform:translateY(-6px) rotate(-45deg)}
  .h-menu{display:none;position:absolute;left:8px;right:8px;top:calc(100% + 8px);padding:12px;border-radius:20px;background:var(--h-bg2);border:1px solid var(--h-line);box-shadow:0 30px 60px -24px color-mix(in srgb,var(--h-a1) 55%,#000);max-height:calc(100vh - 90px);overflow:auto}
  .h-nav.open .h-menu{display:block}
  .h-menu .h-links{flex-direction:column;gap:2px;margin:0}
  .h-menu .h-links > li > a{padding:10px 12px;font-size:1rem}
  .h-menu .h-links > li > a::before{display:none}
  .h-menu .h-links .caret{display:none}
  .h-menu .h-drop{position:static;width:auto;opacity:1;visibility:visible;transform:none;padding:2px 0 8px;border:0;box-shadow:none;background:none}
  .h-menu .h-drop::before{display:none}
  .h-menu .h-drop li a{padding:8px 10px}
  .h-menu .h-cta{display:flex;justify-content:center;margin-top:8px}

/* ---------- Home ---------- */
  .h-hero{grid-template-columns:minmax(0,1fr);gap:26px;padding-top:22px;padding-bottom:30px}
  .home h1{font-size:2.25rem;margin:12px 0 14px} .home h2{font-size:1.6rem}
  .h-lead{font-size:1rem} .h-ctas{flex-wrap:wrap} .h-ticks{flex-wrap:wrap;gap:6px 14px}
  .rolewin{padding:12px} .rw-head b{white-space:normal;font-size:1.02rem} .rw-go{padding:7px 10px;font-size:.76rem}
  .slots{grid-template-columns:repeat(2,1fr)} .rstage{height:400px}
  section.h-wrap{padding-top:40px;padding-bottom:40px}
  .h-vision,.h-pillars,.h-try,.h-trio,.h-line,.rc-grid,.h-faq,.h-vs{grid-template-columns:minmax(0,1fr)}
  .h-arrow{transform:rotate(90deg);margin:6px 0} .h-line::before{display:none}
  .h-outs{grid-template-columns:1fr 1fr} .h-ready{grid-column:1/-1}
  .h-quote{font-size:1.45rem} .rc-learn{grid-template-columns:minmax(0,1fr)} .rc-stats dd{font-size:.66rem}
  .fq-l{position:static} .fq summary{padding:14px 14px;gap:10px;font-size:.96rem} .fq p{padding:0 14px 14px}

.h-pillar{display:grid;grid-template-columns:44px 1fr;column-gap:14px;row-gap:2px;align-items:center;padding:16px 18px}
.h-pillar .h-ico{grid-row:1 / 3;width:44px;height:44px;border-radius:14px} .h-pillar .h-ico svg{width:22px;height:22px} .h-pillar p{margin:0}
.rc-stats div{flex-direction:column;align-items:flex-start;gap:3px;padding:7px 9px}
.h-trio{gap:10px} .h-trio .h-panel{padding:14px 16px}

/* ---------- Role pages ---------- */
  .learn .lrow{grid-template-columns:minmax(0,1fr);gap:10px;padding:16px} .learn .lr-list{columns:1}
  .wk-head{flex-wrap:wrap;gap:8px 12px} .wk-prog{width:100%;text-align:left;margin-left:0}
  .wk-days{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px} .wkp{padding:12px;border-radius:20px}
  .day{min-height:0;padding:14px 12px 10px} .d-num{font-size:1.6rem} .day .t{display:none}
  .tk-grid,.cov{columns:1} .cov-row{flex-wrap:wrap} .cov-row .ds{justify-content:flex-start;width:100%;padding-left:34px}
  .meet-stats dt{font-size:1.1rem}

/* ---------- Case-study picker ---------- */
  .orb{height:auto!important;margin-top:8px;background:none!important;overflow:visible}
  .orb .track,.orb .hub,.orb .stars,#comets{display:none!important}
  .ocards.on{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
  .ocard{position:relative!important;transform:none!important;opacity:1!important;width:auto!important;z-index:auto!important}
  .gtabs{display:flex;flex-wrap:wrap}

/* ---------- Technique pages ---------- */
  .cs-hd{flex-direction:column;gap:8px} .cs-hd h1{font-size:1.8rem}
  .cs-cols,.cs-dd,.cs-ex,.cs-two{grid-template-columns:minmax(0,1fr)}
  .cs-roles{grid-template-columns:minmax(0,1fr)}

/* ---------- Documents and Techniques tables, document pages ---------- */
  .db-cols{grid-template-columns:minmax(0,1fr)}
  .db-flow{grid-template-columns:minmax(0,1fr);gap:6px} .db-fa{width:2px;height:22px;margin:0 auto} .db-fa::after{right:-5px;top:auto;bottom:-6px;border-left-color:transparent;border-top-color:var(--paper-ink2)}
  table.ddir,table.ddir > tbody{display:block;background:none;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  table.ddir > thead{display:block} table.ddir > thead tr{display:flex;flex-wrap:wrap;gap:8px}
  table.ddir > thead th{display:none} table.ddir > thead th.dth-f{display:block;position:static;padding:0;border:0;background:none!important;border-radius:0}
  table.ddir > tbody > tr{display:grid;grid-template-columns:96px minmax(0,1fr);gap:4px 12px;align-items:start;margin-top:10px;padding:12px;border-radius:16px;background:color-mix(in srgb,var(--h-bg2,var(--bg2)) 88%,transparent);border:1px solid var(--h-line,var(--line))}
  table.ddir > tbody > tr > td{display:block;padding:0;border:0;background:none!important;font-size:.84rem}
  table.ddir > tbody > tr > td.dpv{grid-row:1 / span 4;width:auto;padding:0}
  table.ddir > tbody > tr > td.dst{color:var(--muted);font-size:.76rem}
  table.ddir:not([data-open]) > tbody > tr > td:nth-child(4),table.ddir:not([data-open]) > tbody > tr > td:nth-child(5),
  table.ddir[data-open] > tbody > tr > td:nth-child(5){display:none}
  dialog.dpop{width:94vw;max-height:88vh} .dpop-sheet{padding:10px} .dpop-bar b{font-size:.9rem} .dpop-go{font-size:.76rem;padding:6px 10px}
  .dpop-sheet .cs-card{width:auto}
  .lsearch{top:66px;padding-left:14px} .ls-k{display:none}

/* ---------- Certifications ---------- */
  .cpage{grid-template-columns:minmax(0,1fr);gap:24px}
  .shelf .lcards{grid-template-columns:repeat(2,1fr);gap:12px}

/* ---------- Info pages (About, Start here, Feedback, Privacy, 404) ---------- */
.page{padding-top:32px}.page h1{font-size:2.1rem}.page h2{font-size:1.4rem}.steps3,.cards{grid-template-columns:minmax(0,1fr)}.steps3::before{display:none}.stats{grid-template-columns:1fr 1fr}table.map{display:block;overflow-x:auto}.quote{font-size:1.35rem}

/* ---------- Sources ---------- */
.src{padding:20px 18px}.src dl{grid-template-columns:minmax(0,1fr);gap:2px}.src dd{margin-bottom:8px;overflow-wrap:anywhere}h1{font-size:2.1rem}

/* ---------- Role page hero, days and case studies, document pages ---------- */
.hero::before{display:none}
.deck{padding-left:12px;padding-right:12px}
.deck .controls{flex-wrap:wrap;gap:8px}
.deck .controls .btn{padding:10px 14px;font-size:.9rem;white-space:normal}
.bar{flex-wrap:wrap;gap:8px 12px;padding:10px 12px 0}
.bar .stat{white-space:normal;font-size:.78rem}
.dview-bar{flex-wrap:wrap;gap:8px}
svg.wires{opacity:.6}

/* ---------- Day and case-study decks: every two-column slide stacks ---------- */
.intro,.sit,.recap,.wk-grid,.qgrid,.res{grid-template-columns:minmax(0,1fr);gap:20px}
.wk-foot,.wk-steps.many{grid-template-columns:minmax(0,1fr)}
.stage{overflow-y:auto;-webkit-overflow-scrolling:touch}
.js .stage > .screen.on{position:relative}
.screen{padding:20px 16px}
.db-stages{grid-template-columns:repeat(3,1fr)}
.db-ft{flex-wrap:wrap;gap:8px 14px}
.paper .signs{grid-template-columns:minmax(0,1fr);gap:16px}
/* Document sheets keep their real paper layout and are zoomed out to the screen width (assets/fit.js sets the zoom) */
.dview .paper,.dpop-sheet .paper,.printpage .paper{margin:0 auto}
.dview [data-k]{overflow:hidden}
.dpop-sheet{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.db-hd{flex-direction:column;align-items:flex-start;gap:8px}
.db-meta{text-align:left;white-space:normal;max-width:100%}

/* ---------- Worked examples with data (technique pages): wide tables scroll inside their box ---------- */
.lwk{padding:14px 12px;max-width:100%;min-width:0}
.lwk-fx,.lwk-ast{display:block;overflow-x:auto}
.lwk-data{max-width:100%}
.lwk-sec,.lwk-dpanel{min-width:0;max-width:100%}

/* Role page: compact learning modes; coverage groups collapse to their headers */
.modes{gap:10px}
.mode{display:grid;grid-template-columns:36px 1fr;column-gap:12px;row-gap:2px;align-items:start;padding:16px}
.mode .ico{grid-row:1 / 4;margin:2px 0 0} .mode b{margin:0} .mode p{margin:0;font-size:.88rem}
.cov-g{padding:14px 16px}
.cov-g:not([open]) .cov-h{margin-bottom:0}
.cov-h::after{content:"+";flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--h-line,var(--line));font-weight:700;color:var(--muted)}
.cov-g[open] .cov-h::after{content:"−"}

/* "What the letters mean" boxes: one column; each term with its meaning beside it */
.letters dl{grid-template-columns:minmax(0,1fr);gap:6px}
.letters dl div{grid-template-columns:auto minmax(0,1fr)}

/* Day and case-study slides: zoomed out a little on phones so more of each slide fits, in its proper layout */
.stage > .screen{zoom:.8}

/* Certification page: the badge card scrolls with the page and comes after the title */
.cred{position:static;order:2}
.cpage > :not(.cred){order:1}

/* ---------- Feedback: gift, card deck and chat stack instead of sitting side by side ---------- */
.page .blend{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;height:auto;gap:0}
.page .blend > .skyc{height:auto;padding-bottom:12px;overflow:hidden!important}
.page .skyc #sketch{position:relative!important;inset:auto!important;display:block;width:170px!important;height:170px!important;margin:10px auto 0!important;transform:none!important}
.page .blend > .chatc{height:620px}
.page .bb.opts .tiles{grid-template-columns:minmax(0,1fr)}

/* Document page bottom: "See it in the story" and "Related documents" stack; written by / approved by stack;
   long link pills wrap as rounded boxes instead of tall ovals */
.db-two{grid-template-columns:minmax(0,1fr)}
.db-wh{grid-template-columns:minmax(0,1fr)}
.db-story .links a,.db-two .links a{border-radius:12px}
.lwk-grid,.lwk-read{grid-template-columns:minmax(0,1fr)}
.lwk-steps{padding-left:16px}
.lwk-steps .f{overflow-wrap:anywhere}
.shelf .lcards{grid-template-columns:minmax(0,1fr)}
.shelf .lcard.ctile p{max-width:36ch}

/* Top bar menu: dropdowns sit in place (the desktop hover rule would shift them half a width to the left) */
.h-nav .h-menu .menu .h-drop,.h-nav .h-menu .menu:hover .h-drop,.h-nav .h-menu .menu:focus-within .h-drop{transform:none}
.h-nav .h-menu .h-drop li a:hover{transform:none}
/* Day slides: the situation number and its time stack */
.sit-top{flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:14px}
/* Small blank sheets inside technique pages: headers wrap instead of overlapping */
.paper.mini{padding:10px;overflow-x:auto}
.paper.mini table.wt{table-layout:auto;min-width:min-content}
.paper.mini table.wt th{font-size:.72rem;padding:5px 6px;overflow-wrap:normal;word-break:keep-all}
/* Bird's-eye view: compact header so the scene gets the room */
.sj .sj-head h3{font-size:1.1rem}
.sj .sj-head p{font-size:.86rem;line-height:1.45}
/* Cheat-sheet details sit under the title on phones, so they line up left with it */
.cs-meta{text-align:left;max-width:none}
/* Day situations: speaker and speech merged into one card, the icon small beside the name */
.speaker{display:grid;grid-template-columns:44px 1fr;column-gap:12px;align-items:center;background:var(--card);border-radius:6px 20px 20px 20px;padding:14px 16px}
.speaker .av{grid-row:1/3;width:44px;height:44px;margin:0;background:var(--bg)}
.speaker .av svg{width:1.4rem;height:1.4rem}
.speaker b{align-self:end;line-height:1.2} .speaker small{align-self:start}
.speaker .bubble{grid-column:1/-1;margin-top:10px;padding:0;background:none;border-radius:0;font-size:1.05rem}
.speaker .bubble::before,.speaker .bubble::after{display:none}
.speaker:not(:has(> small)) .av{grid-row:auto} .speaker:not(:has(> small)) > b{align-self:center}
.speaker > :not(.av,b,small,.bubble){grid-column:1/-1}
/* Footer note: the contact address on its own line */
.sf-sep{display:none} .sf-mail{display:block;margin-top:2px}
/* Long lists (techniques, documents, role toolkits): on phones the rows are cards, and rows off screen are not laid out or drawn
   until they come near the view (about half a screen ahead). The size estimate is a little above the tallest card, so the page
   only shrinks as rows draw in; auto remembers each row's real height. (Laptops show a real table, which sizes its columns
   from every row, so skipping rows there gives no gain and makes columns shift.) */
table.ddir > tbody > tr[data-q]{content-visibility:auto;contain-intrinsic-size:auto 190px}
/* Day pages: the all-days strip can't give 25 to 55 days a finger-sized target each on a phone; the deck's own back, next and end-of-day links move between days */
.strip{display:none}
