/* The cleanup, home and browse (docs/mockups/declutter, sections 1 and 2). Linked from the body of those two pages only.
   Built on the kit in cleanup.css. Sides use logical properties, so Arabic flips by itself. Colors are the site's vars, so night.css follows. */

/* ---------- home: the first screen is main's big Mac stage (style.css); only what the cleanup added sits here ---------- */
.clh-ticker .wrap{justify-content:flex-start}
.clh-quick{margin-top:var(--cl-s5);max-width:440px}
.clh-form{display:flex;gap:8px}
.clh-f{flex:1;min-width:0;display:block}
.clh-f input{width:100%;height:44px;padding:0 14px;border:var(--cl-bd);border-radius:8px;background:#fffdf6;color:var(--ink);font:15px var(--sans)}
.clh-quick .cl-go{min-height:44px}
.clh-quick .qk-err{margin:6px 0 0;font-size:13px;color:var(--r)}
/* The trust line under the link box (style.css .qk-trust draws the faces, their name cards and the ticker; firstview.js runs them).
   Its visits pill is the phone one from style.css, drawn here at every width; public/visits.js keeps its number the badge's. */
.clh-trust{margin-top:var(--cl-s4);max-width:440px}
.clh-trust .vpill{display:inline-flex;align-items:center;gap:6px;min-height:26px;padding:2px 9px 2px 8px;border:1.5px solid var(--ink);border-radius:999px;background:var(--paper);box-shadow:2px 2px 0 var(--ink);color:var(--ink);font-size:12px;line-height:1.2;text-decoration:none;white-space:nowrap}
.clh-trust .vpill b{font-variant-numeric:tabular-nums;font-weight:700}
.clh-trust .vpill span:not(.vpdot){color:var(--mute)}
.clh-trust .vpill .vtcloud{flex:none;margin-inline-start:1px}
.clh-trust .vpill:hover b{text-decoration:underline;text-underline-offset:2px}
.clh-trust .vpdot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--g)}

/* Featured: the Mac's dock under one label (public/dock.css draws the dock). */
/* The fan is as wide as its disks. --dockx (no script sets it since the fan of 1 Dec 2026) once moved it so it is centred under the Mac, as far as its room allows: the page's
   16px gutter on a desktop, the card's inside edge where the first screen is a card (900px and under). A physical left, so Arabic needs
   nothing more, and not translate, which the page's load-in animation uses. Without the script it sits at the Mac's left edge, as before. */
.clh-feat{margin-top:6px;width:fit-content;max-width:100%;position:relative;left:var(--dockx,0px)}
.clh-lbl{display:block;font:9.5px var(--pixel);letter-spacing:.12em;text-transform:uppercase;color:var(--mute);text-decoration:none;margin-bottom:2px}
.clh-lbl:hover{color:var(--ink)}

/* Today's window: the tabs in a toolbar under the day bar. */
.clh-stage .cl-tools{padding:8px 12px}
.clh-stage .mtabs.cl-seg{display:inline-flex}
.clh-stage .mtabs.cl-seg>a{display:inline-flex;align-items:center;gap:5px;min-height:0;font:13px var(--sans);text-transform:none;letter-spacing:0;padding:6px 13px;border-inline-end:1px solid var(--line);color:var(--mute);text-decoration:none}
.clh-stage .mtabs.cl-seg>a:last-child{border-inline-end:0}
.clh-stage .mtabs.cl-seg>a[aria-selected=true]{background:var(--ink);color:var(--paper)}
.clh-stage .mtabs.cl-seg>a[aria-selected=true]:after{content:none}
.clh-stage .mtabs.cl-seg i{font:8.5px var(--pixel);font-style:normal;border:0;padding:0;min-width:0;opacity:1}
.clh-stage .wbody[hidden]{display:none}
.clh-stage .mpane{display:block;background:var(--paper)}
.clh-stage .mpane[hidden]{display:none}
.clh-stage .mwhy{margin:0;padding:10px 14px;border-bottom:var(--cl-hair);font-size:12.5px;color:var(--mute)}
.clh-stage .mnone{margin:0;padding:18px 14px;font-size:13px;color:var(--mute)}
.clh-stage .mlist{list-style:none;margin:0;padding:0 14px}
.clh-stage .mli+.mli{border-top:var(--cl-hair)}
.clh-stage .mli>a{display:flex;align-items:center;gap:12px;min-height:58px;margin:0;padding:9px 0;color:var(--ink);text-decoration:none}
.clh-stage .mli>a:hover .mlit b{text-decoration:underline}
.clh-stage .mlit{flex:1;min-width:0;display:flex;flex-direction:column}
.clh-stage .mlit b{font:500 18px/1.15 var(--serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.clh-stage .mlit small{font-size:12.5px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.clh-stage .mli .icon{flex:none}
.clh-stage .mpill{flex:none;padding:4px 6px;border:1px solid var(--ink);border-radius:5px;background:var(--y);font:9px/1 var(--pixel);letter-spacing:.04em}
.clh-stage .mpill.msoft{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fffdf6;border-color:var(--line);font:11.5px var(--sans);color:var(--mute)}
.clh-stage .mmore{display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;border-top:var(--cl-hair);color:var(--ink);font-size:13px;text-decoration:underline;text-underline-offset:2px}
.clh-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 16px;padding:10px 14px;border-top:var(--cl-hair);font-size:12.5px;color:var(--mute)}
.clh-foot a{color:var(--mute)}

/* ---------- home: below the first screen ---------- */
.clh-below{padding-bottom:var(--cl-s5)}
.clh-below>.lrstrip{padding-inline:0;margin-bottom:var(--cl-s4)}
.clh-new .candymac{margin:0}
.clh-deals .cl-row .icon{flex:none}
.clh-deals .cl-row .cl-nm{color:var(--ink);text-decoration:none}
.clh-deals .cl-row .cl-nm:hover{text-decoration:underline}
.clh-bf{background:var(--ink);color:var(--paper)}
.clh-folds{margin-top:var(--cl-s5);border-bottom:var(--cl-hair)}
.clh-folds .cl-foldin>section,.clh-folds .cl-foldin>aside{margin-top:0}
.clh-folds .cl-foldin .wrap{width:auto;max-width:none;padding-inline:0}
.clh-names{font-size:13.5px;color:var(--mute);margin:0 0 var(--cl-s4)}
.clh-names a{color:var(--ink)}
.clh-folds .faq{margin:0}
.clh-folds .faq details{border-top:var(--cl-hair);padding:10px 0}
.clh-folds .faq details:first-child{border-top:0}
.clh-folds .faq summary{cursor:pointer;font-weight:500}
.clh-folds .faq p{margin:8px 0 0;color:var(--mute);font-size:14px;max-width:72ch}

/* The gold Featured Macs, as on main but calmer: the cards' own 4-column grid, a short "Your app here" tile, the same gold. */
.fgold.fsec{padding-top:var(--cl-s5)}
.fgold .fhead .subhead{font-size:22px;margin:0}
.fgold .appgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--cl-s5) var(--cl-s4)}
.fgold .appgrid>.candymac,.fgold .appgrid>.goldopen{min-width:0}
.fgold .goldopen{min-height:96px;padding:14px;border-width:1.5px;flex-direction:row;gap:12px}
.fgold .goldopen b{font-size:18px}
.fgold .goldopen .fplus{width:32px;height:32px;font-size:18px}
@media (max-width:1000px){.fgold .appgrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:760px){.fgold .appgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cl-s4) var(--cl-s3)}.fgold .goldopen{flex-direction:column}}

/* Top this week: three cards, with Friends of MacPip as one 280px window beside them (docs/mockups/friends-side). */
.clh-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.clh-side{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:0 var(--cl-s5);align-items:start}
.clh-side>.cl-sec{min-width:0;border-top:0;padding:0}
.clh-side>:only-child{grid-column:1/-1}
.clh-side>.frs{margin:0}
/* The window title: the name on a paper chip in the middle of the stripes, the close box at the start. */
.clh-side .frbar{position:relative;display:flex;align-items:center;justify-content:center;height:28px;border-bottom:1.5px solid var(--ink);background:repeating-linear-gradient(var(--ink) 0 1px,var(--paper) 1px 3px)}
.clh-side .frbar i{position:absolute;inset-inline-start:8px;top:7px;width:12px;height:12px;background:var(--paper);border:1.5px solid var(--ink)}
.clh-side .frbar h3{margin:0;padding:0 8px;background:var(--paper);font:10px/1 var(--pixel);letter-spacing:.1em;text-transform:uppercase;white-space:nowrap}
.clh-side .frr small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Under 1100px there is no room beside the cards: the window goes under them, and on wider screens its apps take two columns. */
@media (max-width:1099px){
  .clh-side{grid-template-columns:minmax(0,1fr)}
  .clh-side>.cl-sec+.frs{margin-top:var(--cl-s5)}
}
@media (min-width:600px) and (max-width:1099px){
  .clh-side .frbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 var(--cl-s5)}
  .clh-side .frbody>:not(.frr){grid-column:1/-1}
}
@media (min-width:600px){
  .clh-sideonly .frbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 var(--cl-s5)}
  .clh-sideonly .frbody>:not(.frr){grid-column:1/-1}
}
.clh-below .mmaker{display:none}

@media (max-width:640px){
  .clh-below .mmaker{display:block;margin:var(--cl-s5) 0 var(--cl-s2)}
}
@media (max-width:760px){
  .clh-ticker .clh-race{display:none}
  /* The season line wraps to a second line instead of losing its link ("See dea" at 390) */
  .clh-ticker .wrap{white-space:normal;padding-block:var(--cl-s2);line-height:1.5}
  .clh-three{grid-template-columns:repeat(2,minmax(0,1fr))}
  .clh-form{flex-wrap:wrap}
  .clh-f{flex-basis:100%}
  .clh-quick .cl-go{flex:1}
  .clh-stage .cl-tools{padding:8px 10px}
  .clh-stage .mtabs.cl-seg{display:grid;grid-template-columns:repeat(4,auto);width:100%}
  .clh-stage .mtabs.cl-seg>a{justify-content:center;padding:7px 6px;font-size:12.5px}
  .clh-stage .mlist{padding:0 12px}
  .clh-deals .cl-row{flex-wrap:wrap}
  .clh-deals .cl-ghost{display:none}
}

/* ---------- browse: one window, categories and one Filters menu in its toolbar ---------- */
.clb .cl-wbar>h1{background:var(--paper);padding:0 10px;font:10px/1 var(--pixel);letter-spacing:.12em;text-transform:uppercase;margin:0}
.clb-tools{flex-wrap:nowrap;gap:var(--cl-s3);position:relative;z-index:40}
.clb-filters{position:relative;flex:none}
.clb-filters>summary{list-style:none;min-height:34px}
.clb-filters>summary::-webkit-details-marker{display:none}
.clb-filters[open]>summary{background:var(--box)}
.clb-filters>.browsebar{position:absolute;inset-inline-start:0;top:calc(100% + 6px);z-index:20;width:min(420px,calc(100vw - 32px));display:flex;flex-direction:column;align-items:stretch;gap:var(--cl-s3);margin:0;padding:var(--cl-s4);background:var(--paper);border:var(--cl-bd);border-radius:var(--cl-rad);box-shadow:4px 4px 0 var(--ink)}
.clb-filters>.browsebar .search{width:100%;max-width:none;margin:0}
.clb-filters>.browsebar .search input{width:100%;height:38px}
.clb-filters>.browsebar .filters{display:flex;flex-wrap:wrap;gap:6px;margin:0;justify-content:flex-start}
.clb-filters>.browsebar .pillmore{display:none!important}
.clb-filters>.browsebar .filters .pilllow,.clb-filters>.browsebar .filters .pillhelp{display:inline-flex!important}
.clb-filters>.browsebar .askhint{margin:0}
.clb-filters>.browsebar>a.ul{font-size:13px;color:var(--mute)}
.clb-note{flex:none;font-size:12.5px;color:var(--mute);white-space:nowrap}
.clb .cl-wbody>.noresult{margin:0 0 var(--cl-s4)}

/* Featured: one gold strip, labeled paid, outside the list's order. */
.clb-feat{display:flex;align-items:center;gap:var(--cl-s3);padding-bottom:var(--cl-s4);margin-bottom:var(--cl-s5);border-bottom:var(--cl-hair)}
.clb-lbl{flex:none;width:68px;font:9px/1.5 var(--pixel);letter-spacing:.12em;text-transform:uppercase;color:var(--mute)}
.clb-feat .spslots{flex:1;min-width:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.clb-feat .spslot{min-height:0;gap:8px;padding:6px 10px;border-width:1px;border-radius:7px;box-shadow:none;grid-template-columns:auto minmax(0,1fr)}
.clb-feat .spslot .icon,.clb-feat .spslotopen .spplus{width:30px!important;height:30px!important;font-size:16px}
.clb-feat .spslotx b{font:500 15px/1.15 var(--serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.clb-feat .spslotx small{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.clb-yours{flex:none;margin-inline-start:auto;font-size:13px}
.clb .appgrid{margin:0}
.clb .catshow{text-align:center;margin-top:var(--cl-s5)}
.clb .tbtop{width:auto;max-width:none;padding-inline:0;margin:var(--cl-s5) 0 0}

@media (max-width:1000px){
  .clb-note{display:none}
}
@media (max-width:760px){
  .clb-tools{flex-wrap:wrap}
  .clb .cattiles.clb-cats{flex-basis:100%}
  .clb-filters{margin-inline-start:auto}
  .clb-filters>.browsebar{inset-inline-start:auto;inset-inline-end:0}
  .clb-feat{flex-wrap:wrap}
  .clb-lbl{width:auto;flex-basis:100%}
  .clb-feat .spslots{grid-template-columns:repeat(2,minmax(0,1fr))}
  .clb-yours{margin-inline-start:0}
}
.clb .appgrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--cl-s5) var(--cl-s4)}
@media (max-width:1000px){.clb .appgrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:760px){.clb .appgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cl-s4) var(--cl-s3)}}

/* Phones: the ticker line and the rainbow bands behind the Mac may be wider than the screen. Clip them, so the page never
   scrolls sideways (WebKit at 390). clip, not hidden, so the sticky top bar keeps working. */
@media (max-width:760px){html,body{overflow-x:clip}.cl-ticker{overflow:hidden;max-width:100%}}

/* Categories match iPip's chips (public/chips.css on iPip): boxed chips with the top app's icon, count at the end. */
.clb .cattiles.clb-cats{flex:1 1 100%;min-width:0;margin:0;gap:6px;padding:0 3px 3px 0;flex-wrap:nowrap;overflow:hidden}
.clb .cattiles.clb-cats.ready{overflow:visible}
.clb .clb-cats .cattile{height:38px;gap:7px;padding-inline:7px 10px;font:500 14px var(--sans)}
.clb .clb-cats .cattile .icon{flex:none;display:grid;place-items:center;width:24px!important;height:24px!important;border-radius:6px;border:1px solid var(--ink);overflow:hidden;background:var(--box)}
.clb .clb-cats .cattile .icon img{width:100%;height:100%;object-fit:cover;display:block}
.clb .clb-cats .cattile .icon.letter{font:12px var(--pixel);color:var(--ink)}
.clb .clb-cats .ctall{background:var(--paper)}.clb .clb-cats .ctall svg{fill:currentColor}
.clb .clb-cats .cattile.on .icon{border-color:var(--paper)}.clb .clb-cats .cattile.on .ctall{background:var(--ink);color:var(--paper)}
.clb .clb-cats .cattile.none{opacity:.5}
.clb .clb-cats .catmore{padding-inline:12px;font:600 13px var(--sans);cursor:pointer}
.clb .cattiles.clb-cats.open{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}
.clb .cattiles.clb-cats.open .cattile small{margin-inline-start:auto}
.clb .cattiles.clb-cats.open .catmore{order:3;justify-content:center;border-style:dashed;box-shadow:none;background:none}
.clb .cattiles.clb-cats.open.measuring{display:flex;flex-wrap:wrap}
@media (max-width:760px){.clb .clb-cats .cattile{height:44px;font-size:13px}.clb .cattiles.clb-cats.open{grid-template-columns:minmax(0,1fr);max-height:min(52vh,420px);overflow-y:auto}}
.clb .clb-tools{flex-wrap:wrap}
/* On a phone the race line is hidden (above), and the hero already shows the race card: a ticker holding nothing else goes too, so no
   empty band sits under the strips. A season line (a span that is not the race) keeps the bar. */
@media (max-width:760px){.clh-ticker:not(:has(.wrap>:not(.clh-race))){display:none}}

/* The New and Deals tabs scroll inside the Today window like the Today list, now that the window is sized to the screen (public/fold.js).
   UX sweep, 2 Dec 2026: at 1280x720 their last rows and "Browse all" link were cut off with no way to reach them. */
@media (min-width:901px){.todaywin>.mpane:not([hidden]){flex:1 1 0%;min-height:0;overflow-y:auto;scrollbar-width:thin}}

/* Browse filters (UX sweep, 2 Dec 2026). Phones: the tool row scrolls sideways, which clipped the open popover out of sight (no search on a phone);
   while it is open the row lets it show. The search box keeps its own height (it stood 220px tall), and a pill keeps its count beside its label. */
@media (max-width:760px){.cl-tools:has(.clb-filters[open]){overflow:visible}}
.clb-filters>.browsebar .search{flex:0 0 auto}
.clb-filters>.browsebar .filters .pilllow,.clb-filters>.browsebar .filters .pillhelp{align-items:center;gap:5px;flex-wrap:nowrap;white-space:nowrap}
