/* Neural Critic public-site responsive hardening.
   Keeps the desktop editorial system intact while making every public surface
   deliberate on tablets, phones, touch devices, and narrow browser windows. */

html{-webkit-text-size-adjust:100%}
img{max-width:100%}
button,input,textarea,select{font:inherit}

/* ----- global chrome ----- */
@media(max-width:980px){
  .ticker .shell,
  header .shell.header{width:calc(100% - 28px)}

  .ticker .shell{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:10px;
    align-items:center;
  }
  .ticker p{
    min-width:0;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
  }

  header{position:relative;z-index:70}
  header .header{
    position:relative;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
  }
  header .menu{
    display:grid!important;
    place-items:center;
    width:38px;
    height:38px;
    padding:0;
    border:1px solid var(--line);
    border-radius:11px;
    background:color-mix(in srgb,var(--surface) 88%,transparent);
    color:var(--text);
    cursor:pointer;
  }
  header .brand{justify-self:start}
  header nav{
    position:absolute;
    top:calc(100% + 1px);
    left:0;
    right:0;
    z-index:80;
    display:none!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:0 0 18px 18px;
    background:color-mix(in srgb,var(--bg) 96%,transparent);
    box-shadow:0 24px 60px #0005;
    backdrop-filter:blur(18px);
  }
  body.mobile-nav-open header nav{display:grid!important}
  header nav a{
    padding:12px 13px;
    border-radius:10px;
    background:color-mix(in srgb,var(--surface) 78%,transparent);
    font-size:10px;
  }
  .header-tools{justify-self:end}
}

@media(max-width:620px){
  .ticker .shell{width:calc(100% - 20px);gap:7px}
  .ticker b{min-width:auto;height:21px;padding:0 8px;font-size:7px}
  .ticker p{font-size:8px}
  .ticker span{font-size:7px;white-space:nowrap}

  header .shell.header{width:calc(100% - 20px);gap:8px}
  header .brand em{display:none}
  .theme-toggle{min-height:34px;padding:0 10px}
  .theme-toggle small{display:none}
  .header-tools{gap:5px}
  .header-tools .search{width:34px;height:34px}
}

/* ----- homepage ----- */
@media(max-width:980px){
  .page{width:min(100% - 30px,1180px)!important}
  .hero{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
  .hero .lead{min-height:500px!important}
  .hero .features{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px!important}
  .hero .features article{min-height:270px!important}
  .content{grid-template-columns:1fr!important;gap:34px!important}
  .content>aside{display:grid!important;grid-template-columns:1fr 1fr!important;gap:18px!important;align-items:start}
  .reviews .shell{grid-template-columns:1fr!important;gap:28px!important}
  .reviews-intro{max-width:720px}
  footer .footer{grid-template-columns:minmax(0,1.6fr) 1fr 1fr!important;gap:28px!important}
}

@media(max-width:680px){
  .page{width:calc(100% - 24px)!important}
  .hero .lead{min-height:430px!important;border-radius:20px!important}
  .hero .features{grid-template-columns:1fr!important}
  .hero .features article{min-height:245px!important;border-radius:18px!important}
  .leadcopy{left:22px!important;right:22px!important;bottom:24px!important}
  .leadcopy h2{font-size:clamp(34px,10vw,46px)!important}
  .leadcopy p{font-size:12px!important;line-height:1.5!important}
  .sectionhead{align-items:flex-start!important;flex-direction:column!important;gap:14px!important}
  .filters{width:100%;overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:4px;scrollbar-width:none}
  .filters::-webkit-scrollbar{display:none}
  .filters button{flex:0 0 auto}
  .story{grid-template-columns:1fr!important;gap:14px!important;padding:18px 0!important}
  .story .thumb,.story .thumb img{width:100%!important;height:220px!important}
  .content>aside{grid-template-columns:1fr!important}
  .review-showcase{grid-template-columns:1fr!important}
  .review-showcase-image{min-height:260px!important}
  .review-showcase-copy{grid-template-columns:auto 1fr!important}
  footer .footer{grid-template-columns:1fr 1fr!important}
  footer .footer>div:first-child{grid-column:1/-1}
  .copyright{flex-direction:column!important;align-items:flex-start!important;gap:7px!important}
}

@media(max-width:440px){
  .hero .lead{min-height:390px!important}
  .story .thumb,.story .thumb img{height:190px!important}
  footer .footer{grid-template-columns:1fr!important}
  footer .footer>div:first-child{grid-column:auto}
}

/* ----- article / review / ranked-list ----- */
@media(max-width:900px){
  #article.work-article-page>.work-reading-grid{overflow:visible}
  #article.work-article-page .work-react-rail{
    width:100%;
    justify-content:flex-start!important;
    overflow-x:auto;
    padding:2px 0 10px;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }
  #article.work-article-page .work-react-rail::-webkit-scrollbar{display:none}
  #article.work-article-page .work-react-rail button{flex:0 0 auto;scroll-snap-align:start}
  #article.work-article-page .work-article-sidebar{gap:16px}
  #article.work-article-page .work-bottom-sidebar{gap:16px}
}

@media(max-width:620px){
  #article.work-article-page{padding-bottom:68px}
  #article.work-article-page>.article-kicker{margin-bottom:14px}
  #article.work-article-page>.article-deck{font-size:16px;line-height:1.5}
  #article.work-article-page>.work-author-row{margin:22px auto 28px!important}
  #article.work-article-page>.work-hero-figure>.article-hero{aspect-ratio:16/10}
  #article.work-article-page>.work-reading-grid{margin-top:30px}
  #article.work-article-page .work-react-rail{margin-bottom:18px}
  #article.work-article-page .work-react-rail button{width:58px;height:54px;border-radius:15px}
  #article.work-article-page .quick-read{margin:24px 0 38px;padding:22px 20px;min-height:0}
  #article.work-article-page .work-quick-read p{margin:14px 0!important}
  #article.work-article-page .work-reading-grid>.article-body>p,
  #article.work-article-page .work-reading-grid>.article-body>section>p{font-size:17px;line-height:1.68}
  #article.work-article-page .work-reading-grid>.article-body h2{margin-top:42px;font-size:31px}
  #article.work-article-page .work-inline-figure{margin:24px 0 38px!important}
  #article.work-article-page .work-inline-figure img{border-radius:13px!important}
  #article.work-article-page .work-article-sidebar{display:grid;grid-template-columns:1fr!important;margin-top:28px}
  #article.work-article-page>.work-bottom-grid{margin-top:54px}
  #article.work-article-page .thread-head{flex-direction:column;align-items:flex-start}
  #article.work-article-page .thread-head-right{width:100%;justify-content:flex-start}
  #article.work-article-page .thread-identity{align-items:flex-start;gap:10px}
  #article.work-article-page>.work-newsletter-band{margin-top:48px}

  #article.work-review-page>.review-parity-card{margin-bottom:42px}
  .review-parity-details{grid-template-columns:1fr!important}
  .review-parity-score{justify-content:center;text-align:center}

  #article.ranked-list-page .ranked-card h2,
  #article.ranked-list-page .ranked-subtitle{max-width:74%}
  #article.ranked-list-page .ranked-meta{gap:6px}
  #article.ranked-list-page .ranked-meta span{white-space:normal;line-height:1.25}
  #article.ranked-list-page .ranked-card>p:not(.ranked-subtitle){font-size:17px}
}

/* ----- categories / search ----- */
@media(max-width:680px){
  .category-work-hero p{font-size:15px}
  .category-spotlight-copy p{display:none}
  .category-spotlight-copy h2{font-size:clamp(31px,10vw,40px)}
  .category-feed-copy h3{font-size:23px}
  .category-feed-copy p{font-size:12px}

  .search-work-filters{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:5px;
    scrollbar-width:none;
  }
  .search-work-filters::-webkit-scrollbar{display:none}
  .search-work-filters button{flex:0 0 auto}
  .search-work-card-media{height:auto;aspect-ratio:16/9}
}

/* ----- touch and accessibility ----- */
@media(hover:none){
  .lead:hover,.feature-link article:hover,.story:hover,.category-card:hover,
  .category-feed-card:hover,.search-work-card:hover{transform:none!important}
  .lead:hover img,.feature-link article:hover img,.category-feed-card:hover img,
  .search-work-card:hover img{transform:none!important}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}

/* ========================================================================== 
   2026 responsive + accessibility milestone
   Modern mobile behavior, meaningful focus, and touch-safe controls.
   ========================================================================== */
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="light"]{color-scheme:light}
body{overflow-wrap:break-word}

:where(a,button,input,textarea,select,[tabindex]):focus-visible{
  outline:2px solid #55e7ff!important;
  outline-offset:3px!important;
  box-shadow:0 0 0 5px rgba(104,99,255,.18)!important;
}
:where(input,textarea,select):focus-visible{border-color:#55e7ff!important}
:where(a,button){-webkit-tap-highlight-color:rgba(85,231,255,.14)}

@media(pointer:coarse){
  :where(button,.search,.theme-toggle,.reader-account-button,.menu,.nav-trigger,.filters button,.search-work-filters button){min-height:44px}
  :where(header nav a,.publication-nav .nav-menu a,.game-graph-links>a){min-height:44px}
}

@media(max-width:980px){
  header nav{
    max-height:calc(100dvh - 96px);
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
  }
  body.mobile-nav-open{overflow:hidden}
  body.mobile-nav-open header{isolation:isolate}
  header .menu{width:42px;height:42px;border-radius:13px}
  header .menu::after{content:"MENU";position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .publication-nav .nav-trigger{width:100%;min-height:44px;text-align:left}
  .publication-nav>.nav-group,.publication-nav>a{min-width:0}
}

@media(max-width:720px){
  .ticker span{display:none}
  .ticker .shell{grid-template-columns:auto minmax(0,1fr)}
  header .brand{min-width:0}
  header .brand span,header .brand strong{font-size:clamp(18px,5.6vw,23px)!important}
  .reader-account-button{max-width:132px;min-height:42px!important;padding-inline:10px!important}
  .reader-account-button [data-reader-account-label]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .reader-account-dot.reader-account-avatar{flex:0 0 auto}

  #article.work-article-page>h1{font-size:clamp(40px,12vw,58px)!important;line-height:.95!important;letter-spacing:-.055em!important}
  #article.work-article-page>.article-deck{max-width:36rem;font-size:15.5px!important}
  #article.work-article-page .work-reading-grid>.article-body{min-width:0}
  #article.work-article-page .work-reading-grid>.article-body>p,
  #article.work-article-page .work-reading-grid>.article-body>section>p{font-size:16.5px!important;line-height:1.7!important}
  #article.work-article-page .work-toc,#article.work-article-page .work-author-card,#article .game-graph-side{border-radius:16px!important}
  #article.work-article-page .work-toc nav a{min-height:48px!important}

  #article.ranked-list-page .ranked-card{padding:22px!important;border-radius:19px!important}
  #article.ranked-list-page .ranked-card .rank-number{right:16px!important;top:17px!important;font-size:64px!important}
  #article.ranked-list-page .ranked-card h2{max-width:78%!important;font-size:clamp(30px,9vw,40px)!important}
  #article.ranked-list-page .ranked-subtitle{max-width:88%!important}
  .game-graph-review{max-width:none!important}

  .reader-auth-card{width:min(calc(100vw - 24px),480px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;overscroll-behavior:contain}
  .reader-auth-form input,.reader-profile-name{min-height:46px!important;font-size:16px!important}
  .reader-auth-form button,.reader-profile-save,.reader-profile-upload,.reader-auth-signout{min-height:44px!important}
}

@media(max-width:520px){
  header .shell.header{grid-template-columns:auto minmax(0,1fr) auto!important}
  header .brand em{display:none!important}
  .header-tools{gap:4px!important}
  .header-tools .search,.theme-toggle{width:40px!important;height:40px!important;min-width:40px!important;padding:0!important}
  .reader-account-button.signed-in{width:40px!important;min-width:40px!important;padding:0!important;justify-content:center!important}
  .reader-account-button.signed-in [data-reader-account-label]{display:none!important}
  .reader-account-button.signed-in .reader-account-dot{margin:0!important}

  .leadcopy{left:18px!important;right:18px!important;bottom:20px!important}
  .leadcopy h2{font-size:clamp(31px,10vw,41px)!important;line-height:.98!important}
  .hero .lead{min-height:405px!important}
  .reviews{padding-inline:12px}
  .review-showcase-copy{grid-template-columns:1fr!important}
  .review-showcase-score{justify-self:start!important}

  #article.work-article-page .quick-read{padding:18px 16px!important;border-radius:15px!important}
  #article.work-article-page .work-quick-read p{padding:20px!important;min-height:0!important;font-size:13px!important}
  #article.work-article-page .work-react-rail button{min-width:56px}
  #article.ranked-list-page .ranked-card h2{max-width:74%!important}
  #article.ranked-list-page .ranked-meta span{padding:7px 9px!important}
  .game-graph-review{grid-template-columns:72px minmax(0,1fr)!important;border-radius:14px!important}
  .game-graph-review-copy{padding:12px 13px!important}
  .game-graph-review-copy>strong{-webkit-line-clamp:3!important}

  .category-taxonomy-chips,.search-work-filters,.filters{scroll-snap-type:x proximity}
  .category-taxonomy-chips>a,.search-work-filters button,.filters button{scroll-snap-align:start}
}

@media(prefers-contrast:more){
  :where(a,button,input,textarea,select){border-color:currentColor}
  .game-graph-review,.work-side-card,.reader-auth-card{box-shadow:none!important}
}
