/* ScholarVault · compact phone density (<=600px).
   Loaded last on every page so it wins over page styles of equal specificity.
   Same content and layout; smaller type, shorter controls, tighter spacing. */
@media (max-width:600px){
  body{font-size:15px;line-height:1.55}

  /* header */
  .s-row{height:54px;gap:10px}
  .s-brand img{width:28px;height:28px;border-radius:8px}
  .s-brand b{font-size:15px}
  .s-brand small{font-size:7.5px;letter-spacing:.14em}
  .s-actions .s-cta,.s-bar .s-cta{height:34px;padding:0 12px;font-size:13px;border-radius:10px;gap:6px}
  [data-theme-slot] button,.s-actions .theme-btn,.s-actions [aria-label*="theme" i],.s-actions [aria-label*="mode" i]{width:34px;height:34px}
  .m-pill{height:40px;padding:0 16px;font-size:13.5px}

  /* interior pages (kit) */
  .page-hero{padding:24px 0 22px}
  .page-hero h1{font-size:28px;line-height:1.1;margin-top:10px}
  .page-hero .page-sub,.page-sub{font-size:15px;margin-top:10px;line-height:1.55}
  .page-actions{gap:8px;margin-top:16px}
  .crumbs{font-size:12px}
  .read-meta{font-size:12px;margin-top:10px;gap:4px 12px}
  .page-body{padding-bottom:32px}
  .sec-head{margin-bottom:18px}
  .sec-head h2{font-size:23px;margin-top:8px;line-height:1.15}
  .sec-head p{font-size:14.5px;margin-top:8px}
  .kicker{font-size:10.5px}
  .card{padding:16px;gap:6px;border-radius:14px}
  .card h3{font-size:16.5px}
  .card p{font-size:14px}
  .card-ic{width:32px;height:32px}
  .grid-2,.grid-3,.grid-4{gap:10px}
  .stat b{font-size:26px}
  .cta-band{padding:22px 18px;border-radius:16px}
  .cta-band h2{font-size:22px}
  .cta-band p{font-size:14.5px}
  .lg,.btn-primary.lg,.btn-ghost.lg{height:42px;padding:0 16px;font-size:14px}
  .btn-primary,.btn-ghost{height:40px;font-size:14px}
  .prose{font-size:15.5px;line-height:1.7}
  .prose h2{font-size:21px;margin-top:32px}
  .prose h3{font-size:17px}
  .toc{padding:14px 16px}
  .toc a{font-size:13.5px;padding-block:5px}
  .hero-grid{gap:20px}
  .ph-shot,.ph-art,.ph-paper{margin-top:4px}
  .feat{padding:28px 0;gap:18px}
  .feat h2{font-size:22px}
  .feat p{font-size:14.5px}
  .feat ul{font-size:14px;gap:6px}
  .host{padding:20px}
  .host h2{font-size:21px}

  /* designed pages: home, about, badge share these names */
  .sec{padding-block:40px}
  .hero{padding-top:28px}
  .hero h1{font-size:30px;line-height:1.08;margin-top:14px;margin-bottom:10px}
  .lede,.hero .lede{font-size:15px;line-height:1.55}
  .h2,.head h2{font-size:24px;line-height:1.12}
  .head{margin-bottom:18px;gap:8px}
  .head .lede{font-size:14px}
  .eyebrow{font-size:10.5px}
  .cta{padding-block:48px}
  .cta h2{font-size:28px;margin:10px auto 18px}
  .btn{height:42px;padding:0 16px;font-size:14px;border-radius:11px}
  .story h2{font-size:22px}

  /* home specifics */
  .pill{font-size:12px}
  .hero-sub{margin-top:12px;font-size:11.5px}
  .product{margin-top:28px}
  .ws button{height:34px;font-size:12.5px;padding:0 12px}
  .ws-note{font-size:12.5px;margin:-4px 0 12px}
  .get-app{padding:6px 6px 6px 8px}
  .strip{padding:28px 0 4px}
  .strip p{margin-bottom:14px;font-size:10px}
  .nums9{padding:24px 0 4px}
  .n9 b{font-size:30px}
  .n9 span{font-size:12.5px;margin-top:6px}
  .n9 div{padding:16px 12px}
  .ci h3{font-size:16.5px}
  .cu h3{font-size:17px}
  .rv blockquote{font-size:14.5px}
  .cmpt{padding:18px}
  .cmpt-l b{font-size:20px}
  .cmpt-l small{font-size:14px}
  .cl{height:32px;font-size:12.5px}
  summary{font-size:15px;padding:13px 0}
  details p{font-size:14px}
  .cc h3{font-size:21px}

  /* footer */
  footer .s-wrap{padding-block:8px}
  .f-top{gap:24px}
  .f-brand p{font-size:13.5px}
  .f-cols{gap:18px 14px}
  .f-cols a{font-size:13.5px;padding-block:3px}
  .f-base{font-size:12px;gap:8px}

  /* second pass: leftovers with stronger selectors */
  .hero p.lede{font-size:15px;margin-top:14px}
  .chip{font-size:12px;padding:5px 11px}
  .note{font-size:14px;padding:12px 14px}
  .prose > * + *{margin-top:14px}
  .art-layout{gap:16px}
  .sheet{padding:20px 16px 18px}
  .sheet h2,.sheet h3{font-size:20px}


  /* home search box: one field, arrow inside, chips below */
  .ask{margin-top:18px;border-radius:14px}
  .ask .ask-row{padding:5px 5px 5px 14px;gap:6px}
  .ask #askq{height:38px;font-size:14.5px}
  .ask #askq:focus{font-size:16px}
  .ask .ask-go{height:34px;width:34px;border-radius:10px}
  .ask .ask-go svg{width:15px;height:15px}
  .modes{margin-top:10px;padding:0;gap:5px}
  .modes button{height:28px;padding:0 10px;font-size:12px;line-height:1}
  .hero-sub{margin-top:10px;font-size:11px;gap:4px 12px}
  .hero-sub span::before{width:5px;height:5px;margin-right:6px}

  /* home hero on phones: left-aligned, full width */
  .hero:has(#ask) .wrap{text-align:left}
  .hero:has(#ask) .pill{display:inline-flex;margin:0}
  .hero:has(#ask) h1{max-width:none;margin:14px 0 10px;font-size:min(7.6vw,34px);line-height:1.06;letter-spacing:-.045em;white-space:nowrap}
  .hero:has(#ask) h1 span{display:block}
  .hero:has(#ask) .lede,.hero:has(#ask) p.lede{margin:0;max-width:none;font-size:14.5px;line-height:1.5;color:var(--fg-2)}
  .ask,.modes{margin-left:0;margin-right:0;max-width:none}
  .modes{justify-content:flex-start}
  .hero:has(#ask) .hero-sub{justify-content:flex-start}
  .ws-note{text-align:left}

  /* About and Badge heroes on phones: same left-aligned, full-width layout as home */
  .hero:not(:has(#ask)) .wrap{text-align:left}
  .hero:not(:has(#ask)) .chip,.hero:not(:has(#ask)) .eyebrow{margin:0}
  .hero:not(:has(#ask)) h1{max-width:none;margin:12px 0 10px;font-size:min(8.2vw,34px);line-height:1.06;letter-spacing:-.045em;text-align:left}
  .hero:not(:has(#ask)) h1 span{display:block}
  .hero:not(:has(#ask)) .lede,.hero:not(:has(#ask)) p.lede{margin:0;max-width:none;font-size:14.5px;line-height:1.5}
  .hero:not(:has(#ask)) .row{justify-content:flex-start;flex-wrap:wrap;margin-top:16px;gap:8px}
  .hero:not(:has(#ask)) .direct{justify-content:flex-start;text-align:left;margin-top:12px;font-size:13px}
  .hero:not(:has(#ask)) .hint{text-align:center}
}

@media (max-width:600px){main p a,main li a,main .t a{overflow-wrap:anywhere}}
@media (max-width:360px){.s-brand small{display:none}.s-actions .s-cta,.s-bar .s-cta{padding:0 10px}.s-row{gap:8px}}

/* articles and policies on phones: folded contents, tighter reading rhythm */
.toc-t{display:none}
@media (max-width:600px){
  .toc.toc-fold{padding:0;gap:0}
  .toc.toc-fold h4{display:none}
  .toc-t{display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border:0;background:none;color:var(--fg);font:600 11px var(--mono);letter-spacing:.12em;text-transform:uppercase;cursor:pointer;text-align:left}
  .toc-t small{font:500 11px var(--mono);letter-spacing:.04em;text-transform:none;color:var(--fg-3)}
  .toc-t svg{width:15px;height:15px;flex:none;fill:none;stroke:var(--gold-ink);stroke-width:2.4;stroke-linecap:round;transition:transform .3s}
  .toc.open .toc-t svg{transform:rotate(45deg)}
  .toc.toc-fold:not(.open) a{display:none}
  .toc.toc-fold.open{padding-bottom:10px}
  .toc.toc-fold.open a{margin:0 14px}
  .page-hero .kicker{font-size:10px;letter-spacing:.1em;line-height:1.5}
  .crumbs{margin-bottom:2px}
  .read-meta{margin-top:8px}
  .prose{line-height:1.65}
  .prose h2{margin-top:28px;line-height:1.2}
  .prose img,.prose figure{border-radius:12px}
  .prose figure{margin-block:18px}
  .prose figcaption{font-size:12px}
  .prose ul,.prose ol{padding-left:20px}
  .prose li{margin-block:4px}
  .prose blockquote{padding:10px 14px;font-size:15px}
}
@media (max-width:600px){
  /* long button labels wrap instead of pushing the page sideways */
  .btn-primary,.btn-ghost{white-space:normal;height:auto;min-height:40px;padding-block:9px;text-align:center;line-height:1.3}
  .page-actions{flex-wrap:wrap}
}
