/* iPad / tablet layer (601-1100px: iPad portrait, iPad mini, split view).
   Linked on every page by scripts/add-mobile-fixes-css.py, after
   mobile-fixes.css. Landscape iPads (1024px+) mostly get the desktop layout;
   the last block here adds touch refinements for them.

   Before this, tablets got the phone layout stretched to 800px: single
   long rows, small type, and a few outright breaks (boards wider than the
   screen, a blank square widget). This layer turns the boards into
   two-column tile grids and scales the hero, tiles and type for the
   larger canvas. */

@media (min-width:601px) and (max-width:1100px){

  /* ================= Boards (home, events, specials board, day / deal pages) */
  /* The board + side column grid kept a 340px side column down to 960px and
     the nowrap rows forced the board wider than the screen below that. */
  .bb-layout{grid-template-columns:minmax(0,1fr) !important;gap:22px;}
  .cs-board-section{padding:0 28px;}
  .big-board,.home-events-board{max-width:100%;min-width:0;border-radius:28px;padding:12px;
    box-shadow:0 24px 60px -28px rgba(10,22,40,.55),0 2px 10px rgba(10,22,40,.12);}
  .big-board .bb-head,.home-events-board .bb-head{padding:20px 18px 16px;}
  .big-board .bb-head h2,.home-events-board .bb-head h2{font-size:32px;letter-spacing:-.6px;}
  .big-board .price-toggle,.home-events-board .price-toggle{font-size:14px;padding:10px 14px;border-radius:999px;min-height:40px;}

  /* Rows become a two-column grid of tiles. */
  .big-board .bb-list,.home-events-board .bb-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
    background:transparent;padding:4px 6px 6px;min-height:0;border-radius:0;}
  .big-board .bb-list li,.home-events-board .bb-list li{border:0;min-width:0;display:flex;
    animation:csTileIn .38s cubic-bezier(.2,.7,.2,1) both;}
  .big-board .bb-list li:nth-child(2),.home-events-board .bb-list li:nth-child(2){animation-delay:.03s;}
  .big-board .bb-list li:nth-child(3),.home-events-board .bb-list li:nth-child(3){animation-delay:.06s;}
  .big-board .bb-list li:nth-child(4),.home-events-board .bb-list li:nth-child(4){animation-delay:.09s;}
  .big-board .bb-list li:nth-child(5),.home-events-board .bb-list li:nth-child(5){animation-delay:.12s;}
  .big-board .bb-list li:nth-child(6),.home-events-board .bb-list li:nth-child(6){animation-delay:.15s;}
  .big-board .bb-list li:nth-child(n+7),.home-events-board .bb-list li:nth-child(n+7){animation-delay:.18s;}
  .big-board .bb-row,.home-events-board .bb-row{flex:1;display:flex;flex-direction:column;justify-content:center;gap:5px;
    white-space:normal;overflow:hidden;background:#f3f4f7;border-radius:16px;padding:16px 18px;min-height:88px;
    font-size:14.5px;line-height:1.35;transition:transform .15s ease,background .15s ease,box-shadow .15s ease;}
  .big-board .bb-row:hover,.home-events-board .bb-row:hover{background:#fff;box-shadow:0 8px 22px -10px rgba(0,0,0,.45);}
  .big-board .bb-row:active,.home-events-board .bb-row:active{transform:scale(.975);background:#fff;}
  .big-board .bb-special,.home-events-board .bb-special{font-size:17.5px;line-height:1.25;letter-spacing:-.2px;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .big-board .bb-where,.home-events-board .bb-where{color:#4a4f58;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .bb-dash{display:none;}
  .big-board .bb-empty,.home-events-board .bb-empty{grid-column:1 / -1;color:rgba(255,255,255,.85);padding:28px 12px;}
  .big-board .bb-foot,.home-events-board .bb-foot{padding:16px 8px 10px;}
  .big-board .bb-shuffle,.home-events-board .bb-shuffle{padding:12px 20px;font-size:15px;min-height:44px;}
  .big-board .bb-hood,.home-events-board .bb-hood{min-height:46px;}

  /* Side column drops under the board: spotlights three across, then the
     fact / ad widget as a full-width band (it was a blank 780px square). */
  .bb-right-col{gap:18px;}
  .bb-spotlights{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:14px;}
  .bb-spot{padding:18px;border-radius:20px;min-width:0;}
  .bb-spot:active{transform:scale(.98);}
  .bb-spot-special{font-size:17px;margin-bottom:8px;}
  .bb-spot-icon{width:52px;height:52px;margin-bottom:12px;}
  .chicago-fact-widget{aspect-ratio:auto !important;flex:1 1 100% !important;max-width:none;border-radius:22px;padding:22px 26px;}
  .chicago-fact-widget.ad-mode{min-height:260px;}
  .fact-greeting{font-size:16px;}
  .fact-body{font-size:15px;}

  /* ================= Home */
  .hero.has-photo{padding:86px 32px 74px;border-radius:0 0 34px 34px;}
  .hero .clock{font-size:15px;padding:7px 16px;}
  .hero h1{font-size:44px;letter-spacing:-1px;margin:20px 0 10px;}
  .hero p{font-size:17px;}
  .quick-find{gap:14px;padding:0 28px;margin-top:22px;}
  .quick-find a{flex-direction:column !important;gap:8px !important;min-height:112px !important;padding:16px 8px;border-radius:20px;
    font-size:16px !important;box-shadow:0 6px 18px -12px rgba(10,22,40,.4);transition:transform .15s ease,box-shadow .15s ease;}
  .quick-find a:active{transform:scale(.97);}
  .quick-find img{width:54px;height:54px;}

  .home-top-widgets{padding:0 28px;gap:18px;margin-top:26px;}
  .day-teaser-card{flex:1 1 100%;border-radius:28px;padding:26px 22px 20px;
    box-shadow:0 24px 60px -28px rgba(10,22,40,.6),0 2px 10px rgba(10,22,40,.12);}
  .day-teaser-label{font-size:13px;padding:0 6px;}
  .day-teaser-title{font-size:36px;letter-spacing:-.7px;margin:4px 0 16px;padding:0 6px;}
  .day-teaser-examples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:transparent;padding:0;
    margin-left:0;margin-right:0;border-radius:0;}
  .day-teaser-examples a{display:flex;flex-direction:column;justify-content:center;gap:5px;background:#f3f4f7;border-radius:16px;
    padding:16px 18px;min-height:88px;font-size:14.5px;line-height:1.35;color:#4a4f58;min-width:0;
    transition:transform .15s ease,background .15s ease;animation:csTileIn .38s cubic-bezier(.2,.7,.2,1) both;}
  .day-teaser-examples a:nth-child(2){animation-delay:.03s;}
  .day-teaser-examples a:nth-child(3){animation-delay:.06s;}
  .day-teaser-examples a:nth-child(4){animation-delay:.09s;}
  .day-teaser-examples a:nth-child(5){animation-delay:.12s;}
  .day-teaser-examples a:nth-child(6){animation-delay:.15s;}
  .day-teaser-examples a + a{border-top:0;}
  .day-teaser-examples a:hover,.day-teaser-examples a:focus-visible{background:#fff;}
  .day-teaser-examples a:active{transform:scale(.975);background:#fff;}
  .day-teaser-examples a b{font-size:17.5px;line-height:1.25;letter-spacing:-.2px;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .day-teaser-fact{font-size:13.5px;margin-top:16px;padding:0 6px;}
  .day-teaser-footer{padding:0 6px;}
  .day-teaser-cta{font-size:15.5px;}
  .day-teaser-shuffle{width:44px;height:44px;}

  .home-featured-row{padding:0 28px;gap:22px;flex-wrap:nowrap;margin-top:34px;}
  .home-featured-col{flex:1 1 0;}
  .home-featured-head h2{font-size:21px;}

  /* An ad in the widget is square art: keep it a centred square rather than
     cropping it into the full-width band. */
  .chicago-fact-widget.ad-mode{aspect-ratio:1 / 1 !important;flex:0 0 340px !important;width:340px;max-width:100%;
    min-height:0;margin-left:auto;margin-right:auto;padding:0;}

  /* ================= Page heroes (events, day, deal-type, specials board) */
  .day-hero h1,.board-hero h1{font-size:42px;letter-spacing:-.9px;}
  .day-hero.has-photo,.board-hero.has-photo{padding-top:56px;padding-bottom:48px;}
  .day-hero .lede,.day-hero p,.board-hero p{font-size:16.5px;}
  #csEventsPageSearch{min-height:54px;font-size:17px;padding-left:24px;}

  /* ================= Event pages: the photo's -28px bleed is wider than the
     20px page gutter at these widths, which made the page scroll sideways. */
  .ev-page-photo{margin-left:-20px;margin-right:-20px;width:calc(100% + 40px);}

  /* ================= Footer: six columns need ~1,000px. Three fit a tablet. */
  .site-footer .footer-inner{grid-template-columns:repeat(3,minmax(0,1fr));gap:30px 26px;}
  .site-footer .footer-inner > .footer-col{min-width:0;}
}

@keyframes csTileIn{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}
@media (prefers-reduced-motion:reduce){
  .bb-list li,.day-teaser-examples a{animation:none !important;}
}

/* ---- Any touch tablet, portrait or landscape: finger-sized targets. */
@media (min-width:601px) and (pointer:coarse){
  .cs-accordion-head{min-height:44px;}
  .site-footer .footer-col a{padding:7px 0;}
  .nav-pills-scroll a,.nav-pills-scroll .nav-tab{padding:9px 16px;font-size:14px;}
  .mega-menu-col a{padding:9px 0;}
}
