/* responsive.css (19 Nov 2026): iPad + iPhone polish for every solkairo.com page.
   Rules only switch on for touch screens (pointer:coarse) or widths under 1181px,
   so the desktop site and the desktop app at normal size look exactly as before. */

html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* /home habit grid, every width (EJP 11/19, laptop window): the "COMPLETE" heading is 3.5px wider than its 62px column,
   so the grid scrolled sideways by 4px and showed a useless scrollbar. 6px of room at the end; real overflow still scrolls. */
.se-tracker-full > div{padding-right:6px}

/* Nav buttons, every width (EJP 26 Nov 2026, design flaw he caught): a button taller than its text kept the text at the TOP
   ("← DAILY OS" in a 44px box). Text is always centred in its button now, touch or not. */
.sitenav a{display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box}

/* ---------- every touch screen (iPad + iPhone): fingers need 44px ---------- */
@media (pointer:coarse){
  .sitenav a{min-height:44px;display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box}
  .sitenav .navsep{align-self:center}
  /* /home: Sign out + Bring over yesterday's */
  a[href*="logout"],button.carry{min-height:44px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}
  /* /login: Privacy / Terms / Data deletion */
  a[href="/privacy"],a[href="/terms"],a[href="/data-deletion"]{display:inline-flex;align-items:center;min-height:44px;padding:0 6px}
  /* /ads Read all pop-up close button */
  .rdx{min-width:44px;min-height:44px}
  /* /ads Kyrgyzstan card Edit button + /sap report tabs */
  .kmini,.rtab{min-height:44px}
  .kmini{min-width:44px}
  /* no grey flash on tap, no double-tap zoom delay */
  a,button,select,input,[role=button]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
}

/* ---------- iPad (portrait + landscape) and phones ---------- */
@media (max-width:1180px) and (pointer:coarse){
  /* /home habit grid: stay inside the card and scroll sideways in it, instead of breaking out past the card edges */
  .se-tracker-full{max-width:100%!important;width:auto!important;left:0!important;transform:none!important;-webkit-overflow-scrolling:touch}
}

/* ---------- phones ---------- */
@media (max-width:700px){
  /* /ads Learnings table: the page-wide table{min-width:1250px} made the whole page 1288px wide, so the phone zoomed the page out */
  table.lt{min-width:0!important}
  /* /ads campaign names: break between words, never mid-word; pills stay whole */
  .card table td:first-child{word-break:normal!important;overflow-wrap:normal!important;hyphens:none}
  .card table td:first-child .who,.card table td:first-child .chip,.card table td:first-child [class*="pill"],.card table td:first-child [class*="tag"]{white-space:nowrap}
  /* /growth: the sheet is its own scroll box; give it the full screen height so it is not a 300px letterbox */
  #sheetview.sheetwrap{height:calc(100svh - 24px)!important}
  /* /growth phone cards: the sheet's frozen-column widths (inline 46/118/76px) squeezed every label + value into a sliver */
  /* /sap report cards: the page path title used the desktop 150px column cap, so its underline stopped halfway */
  .mt-tab table.rt td.mt-title{max-width:none!important;min-width:0!important}
  .mt-tab table.gs td{width:100%!important;min-width:0!important;max-width:none!important;left:auto!important;position:static!important}
  /* /cogs has no phone nav script: show the same short labels as every other page (SAP, GG) */
  body:not(.mt-on) .sitenav a[href^="/growth"],body:not(.mt-on) .sitenav a[href^="/sap"]{font-size:0!important;letter-spacing:0!important}
  body:not(.mt-on) .sitenav a[href^="/growth"]::after{content:"GG"}
  body:not(.mt-on) .sitenav a[href^="/sap"]::after{content:"SAP"}
  body:not(.mt-on) .sitenav a[href^="/growth"]::after,body:not(.mt-on) .sitenav a[href^="/sap"]::after{font-size:11px;letter-spacing:.08em}

  /* Nav (his call 11/19): one row you swipe sideways, 44px buttons; the brand switch stays pinned at the right end */
  html body .sitenav.sitenav{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;align-items:center!important;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;padding:2px 0!important;max-width:100%}
  html body .sitenav.sitenav::-webkit-scrollbar{display:none}
  html body :has(> .sitenav){min-width:0!important;max-width:100%}
  html body .sitenav.sitenav a{flex:none!important;min-height:44px!important;padding:0 13px!important;font-size:11px!important;letter-spacing:.08em!important}
  html body .sitenav.sitenav .navsep{flex:none;height:22px!important}
  html body .sitenav.sitenav .skb{position:sticky;right:0;flex:none;z-index:2;margin-left:auto;align-items:center;min-height:44px;box-sizing:border-box;background:#161a23;box-shadow:-10px 0 8px 0 #13161e}
  html body .sitenav.sitenav .skb button:not([hidden]){min-height:36px;display:inline-flex;align-items:center;padding:0 10px!important}

  /* Ads tables (his call 11/19): campaign / ad set / ad name on its own full-width line, Spend / CPA / ROAS in a row under it */
  table.amt{min-width:0!important;width:100%!important}
  table.amt tr{display:flex!important;flex-wrap:wrap;align-items:baseline;border-bottom:1px solid rgba(220,226,240,.08)}
  table.amt th,table.amt td{flex:1 1 0;min-width:0;border-bottom:0!important;box-sizing:border-box}
  table.amt td:first-child{flex:1 0 100%!important;max-width:none!important;padding-bottom:2px!important}
  table.amt th:first-child{display:none!important}
  table.amt td[colspan]{flex:1 0 100%!important}
  table.amt td:not(:first-child),table.amt th:not(:first-child){text-align:left!important;padding-top:2px!important}
}

/* ================= Phone app shell (24 Nov 2026, Solkairu: "boxing, 3 different menus, menu scroll away, modern app fix") =================
   Switches on with html.sk-tb, which /tabbar.js sets on phones (700px and narrower, not the desktop app). Spec: lab/data/mobile_shell.md.
   Tokens, one frame, one card, one type scale, 44px taps, sentence case. Desktop never gets html.sk-tb, so it is untouched. */
.ocg-s{display:none}
:root{--sk-bg:#05060B;--sk-surface:#11141C;--sk-surface2:#171A21;--sk-line:rgba(220,226,240,.10);--sk-ink:#E6E8EF;--sk-sub:#9AA0B2;--sk-dim:#5E6478;--sk-blue:#3A6DF0;--sk-peach:oklch(0.74 0.09 45);--sk-gutter:16px}
@media (max-width:700px){
  /* frame: full-bleed page, 16px gutter, room for the fixed top bar + tab bar */
  html.sk-tb,html.sk-tb body{background:var(--sk-bg)!important}
  html.sk-tb body{margin:0!important;padding:calc(52px + env(safe-area-inset-top) + 4px) max(var(--sk-gutter),env(safe-area-inset-right)) calc(64px + env(safe-area-inset-bottom) + 28px) max(var(--sk-gutter),env(safe-area-inset-left))!important;min-height:100svh;box-sizing:border-box}
  html.sk-tb{scroll-padding-top:calc(60px + env(safe-area-inset-top));scroll-padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  /* no box inside a box: the page wrapper loses its border, fill, glow and side padding */
  html.sk-tb body .shell,html.sk-tb body .se-shell{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;padding:4px 0 8px!important;margin:0!important;max-width:none!important;width:auto!important}
  html.sk-tb body div:has(> .se-shell){padding:0!important;min-height:0!important}
  /* the three old navs are gone (tab bar + top bar replace them) */
  html.sk-tb body .sitenav,html.sk-tb body .se-nav,html.sk-tb body a[href*="logout"]{display:none!important}
  /* one type scale: 28 large title / 20 section / 17 / 15 body / 13 caption, Inter; sentence case, no letter-spacing */
  html.sk-tb body *{text-transform:none!important;letter-spacing:normal!important}
  html.sk-tb body h1{font:700 28px/1.15 Inter,system-ui,sans-serif!important;margin:8px 0 4px!important}
  html.sk-tb body h2{font-family:Inter,system-ui,sans-serif!important;font-size:20px!important;font-weight:650!important;line-height:1.25!important}
  html.sk-tb body h3{font-family:Inter,system-ui,sans-serif!important;font-size:13px!important;font-weight:600!important;color:var(--sk-sub)}
  html.sk-tb body .eyebrow{font-size:13px!important;color:var(--sk-sub)!important}
  /* one card style: surface, 1px line, radius 16, padding 16, no glow */
  html.sk-tb body .card{background:var(--sk-surface);border:1px solid var(--sk-line);border-radius:16px;box-shadow:none;padding:16px}
  /* taps: every control at least 44px; inputs 16px text so iOS never zooms in on focus */
  html.sk-tb body button,html.sk-tb body select,html.sk-tb body summary,html.sk-tb body [role=button],html.sk-tb body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=color]){min-height:44px;box-sizing:border-box}
  html.sk-tb body button,html.sk-tb body [role=button]{min-width:44px}
  html.sk-tb body input:not([type=checkbox]):not([type=radio]):not([type=range]),html.sk-tb body select,html.sk-tb body textarea{font-size:16px!important}
  html.sk-tb body .pill,html.sk-tb body .btn,html.sk-tb body a.chip,html.sk-tb body .tab{min-height:44px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center}
  /* buttons: primary solid blue 48px radius 12 */
  html.sk-tb body .btn.primary,html.sk-tb body button.primary,html.sk-tb body .mt-showall{min-height:48px;border-radius:12px}

  /* ---- /home: date + goal on top, habits in view on the first screen, gay-meter first of all ---- */
  html.sk-tb .se-shell{display:flex!important;flex-direction:column;animation:none!important}
  html.sk-tb .se-shell > header{order:0!important;text-align:left!important}
  html.sk-tb .se-shell > header h1{display:none!important}
  html.sk-tb .se-shell > header > div:first-of-type{margin:6px 0 0!important;font:700 24px/1.2 Inter,system-ui,sans-serif!important;color:var(--sk-ink)!important}
  html.sk-tb .se-shell > header > div:nth-of-type(2){margin:6px 0 0!important;max-width:none!important;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
  html.sk-tb .se-shell > header > div:nth-of-type(2) > div:first-child{margin:0!important;font-size:13px!important;font-weight:600;color:var(--sk-peach)!important;white-space:nowrap}
  html.sk-tb .se-shell > header > div:nth-of-type(2) > div,html.sk-tb .se-shell > header > div:nth-of-type(2) textarea{font-size:15px!important;text-align:left!important;line-height:1.35!important}
  html.sk-tb .se-shell > :is(sc-if,div):not(header):not(.se-trk):not(.se-nav):not(:has(> .se-gayrow)){order:1!important}
  html.sk-tb .se-shell > .se-trk{order:2!important;margin-top:20px!important;padding-top:0!important;border-top:0!important}
  html.sk-tb .se-shell > #sdt,html.sk-tb .se-shell > section{order:3!important}
  html.sk-tb .se-shell > div:has(> .se-gayrow){order:-1!important;margin:0 0 16px!important;max-width:none!important;border-radius:16px!important;background:var(--sk-surface)!important;border:1px solid var(--sk-line)!important;padding:16px!important}
  html.sk-tb .se-shell > div:has(> .se-gayrow) > div:first-child{font-size:17px!important;font-weight:500!important}
  html.sk-tb .se-trk h2,html.sk-tb .se-shell > section h2{font:650 20px/1.25 Inter,system-ui,sans-serif!important}
  html.sk-tb .se-gayrow > div > span{font-size:12px!important}

  /* leftovers under 44px: Ads reference-doc links, Employees sheet buttons, Learnings sub-tabs + ad numbers, EJP's top-right link */
  html.sk-tb body .klink,html.sk-tb body .sheetbtn,html.sk-tb body .subtabs a,html.sk-tb body a.num,html.sk-tb body #wlink{min-height:44px!important;display:inline-flex!important;align-items:center;box-sizing:border-box}
  html.sk-tb body a.num{min-width:44px;justify-content:center}
  html.sk-tb body #wlink{top:-12px!important;padding:0 14px!important}
  /* /ads Orders and COGS summary on one line at 390: short form of the "above Meta" note */
  html.sk-tb body .ocg-l{display:none}html.sk-tb body .ocg-s{display:inline}
  html.sk-tb body details.ocg>summary{white-space:nowrap}
  /* /login (no tab bar): label + button text at 12px or more */
  body:has(#go) .lbl{font-size:13px!important}body:has(#go) #go{font-size:15px!important}
  /* /login: link row */
  a[href="/privacy"],a[href="/terms"],a[href="/data-deletion"]{font-size:13px!important}
}
