/* GRAND EXILE desktop — the browser: brand tabs in the title bar, a toolbar with the address,
   and the brand pages stacked in one view. Phone: a mobile-browser bar and a tab switcher sheet. */

/* ---------- tab strip (lives in the title bar, so the window drags from the gaps) ---------- */
.win[data-app=browser] .tb{gap:8px;padding-left:12px}
/* the pinned start tab already carries the globe, so the window icon would repeat it */
.win[data-app=browser] .tb>.ic{display:none}
.bcur,.bsheet-h,.bsw{display:none}
.bsheet{display:contents}
.btabs{position:relative;display:flex;align-self:stretch;align-items:flex-end;gap:2px;min-width:0}
.btab{position:relative;display:flex;align-items:center;gap:9px;height:31px;margin-bottom:-1px;padding:0 16px 0 11px;border-radius:9px 9px 0 0;
  font:11px var(--px);letter-spacing:.06em;color:var(--mute);white-space:nowrap;min-width:0;transition:color .25s,background .25s}
.btab:hover{color:var(--ink2);background:var(--line)}
.btab.on{color:var(--ink);background:var(--win2);box-shadow:inset 1px 0 var(--line),inset -1px 0 var(--line)}
.btab:focus-visible{outline-offset:-2px}
.btab .ic{width:16px;height:16px;border-radius:4px;flex:none}
.btab-t{display:flex;flex-direction:column;min-width:0}
.btab-t b{font-weight:400;overflow:hidden;text-overflow:ellipsis}
.btab-t small{display:none}
.btab.pin{padding:0 10px}.btab.pin .btab-t{display:none}
/* the accent cap glides to the active tab with a little overshoot */
.btab-ink{position:absolute;left:0;top:3px;width:0;height:2px;border-radius:2px;background:var(--tab,var(--teal));pointer-events:none;
  transition:transform .55s cubic-bezier(.3,1.45,.45,1),width .45s cubic-bezier(.3,1.3,.45,1),background-color .45s linear}

/* ---------- toolbar ---------- */
.bw{flex:1;min-height:0;display:flex;flex-direction:column}
.bbar{flex:none;height:42px;display:flex;align-items:center;gap:2px;padding:0 10px;background:var(--win2);border-bottom:1px solid var(--line)}
.bgo{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;color:var(--ink2);transition:background .2s,color .2s}
.bgo:hover{background:var(--line);color:var(--ink)}
.bgo:disabled{opacity:.32;pointer-events:none}
.bgo svg,.burl svg{width:12px;height:12px;shape-rendering:crispEdges;display:block}
.bgo:active svg{transform:translateY(1px)}
.burl{position:relative;flex:1;min-width:0;display:flex;align-items:center;gap:9px;height:28px;margin-left:8px;padding:0 12px;border-radius:8px;overflow:hidden;
  background:var(--win);border:1px solid var(--line);font:12.5px var(--mono);white-space:nowrap}
.burl svg{color:var(--tab,var(--teal));flex:none;transition:color .45s linear}
.burl-t{overflow:hidden;text-overflow:ellipsis}
.burl-h{color:var(--mute)}
.burl-p{color:var(--ink)}
.bload{position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--tab,var(--teal));transform-origin:left;transform:scaleX(0);opacity:0}

/* ---------- pages ---------- */
.bview{flex:1;min-height:0;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);overflow:hidden}
/* pages scroll like web pages. A tiled page (its own scrolling panes) fills the view and scrolls only when its
   tiles cannot shrink further; a flowing page (.flow) is as tall as its content, and at least the view. */
.bpage{grid-area:1/1;z-index:1;min-height:0;min-width:0;display:flex;flex-direction:column;overflow:hidden auto;scrollbar-width:thin;scrollbar-color:var(--line2) transparent;background:var(--win);will-change:transform,opacity}
.bpage[hidden]{display:none}
.bpage>*{flex:1;min-height:0}
.bpage.flow>*{flex:1 0 auto;height:auto}
/* the terminal tiles: the top row is never shorter than its content and the bottom row keeps a usable height, so a
   short window scrolls the page instead of letting a table hang out of its box. The shell's own text must not
   stretch the page as it types, hence the 0px basis (it fills the tile and scrolls inside it). */
@media (min-width:721px){
  .bpage .wf{grid-template-rows:minmax(min-content,auto) minmax(250px,1fr)}
  .bpage .wf .term{height:auto;flex:1 1 0px}
  /* the curve canvas would otherwise ask for its full aspect-ratio height and make every window scroll */
  .bpage .wf .curve canvas{flex-basis:0}
}
.bpage.leaving{pointer-events:none;z-index:0}

/* ---------- start page: the mark, then a speed dial of the brand sites ---------- */
.bstart{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:44px 28px 52px;text-align:center}
.bstart .mk{width:66px;height:75px;margin-bottom:10px}
.bstart h2{font:11px var(--px);letter-spacing:.34em;font-weight:400;color:var(--ink)}
.bstart p{font:400 15.5px/1.5 var(--ui);color:var(--ink2)}
.bdials{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,320px));justify-content:center;gap:14px;width:100%;margin-top:26px}
.bdial{position:relative;display:grid;grid-template-columns:52px 1fr;gap:16px;align-items:start;padding:18px 18px 16px;text-align:left;border-top:2px solid var(--tab,var(--teal));background:var(--win2);
  transition:transform .45s cubic-bezier(.3,1.45,.45,1),background .25s}
.bdial:hover,.bdial:focus-visible{transform:translateY(-4px);background:var(--win3)}
.bdial .ic{width:52px;height:52px;border-radius:13px}
.bdial span{display:grid;gap:3px;min-width:0}
.bdial b{font:11px var(--px);letter-spacing:.08em;font-weight:400;color:var(--ink)}
.bdial small{font:500 13px var(--ui);color:var(--tab,var(--teal))}
.bdial em{font:400 13.5px/1.45 var(--ui);font-style:normal;color:var(--ink2);margin-top:5px}
.bdial i{font:11.5px var(--mono);font-style:normal;color:var(--mute);margin-top:8px;overflow-wrap:anywhere}

/* ---------- phone: mobile-browser bar + tab switcher sheet ---------- */
@media (max-width:720px){
  .win[data-app=browser] .tb{padding-left:6px}
  .bcur{display:block;font:11px var(--px);letter-spacing:.06em;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .bsheet{display:none}
  .bbar{position:sticky;top:0;z-index:3;height:52px;padding:0 12px;gap:8px}
  .bgo[data-go=back],.bgo[data-go=fwd]{display:none}
  .burl{margin-left:0;height:36px;border-radius:18px;padding:0 14px}
  .bsw{display:grid;place-items:center;flex:none;width:30px;height:30px;border:1.5px solid var(--ink2);border-radius:8px;color:var(--ink)}
  .bsw b{font:11px var(--px);font-weight:400}
  .bw,.bview{display:block;overflow:visible}
  .bpage{overflow:visible}
  .btab.pin{padding:14px}.btab.pin .btab-t{display:flex}
  .bstart{padding:30px 16px 40px}
  .win.sheet .bsheet{display:flex;flex-direction:column;gap:14px;position:absolute;inset:48px 0 0;z-index:6;padding:16px 16px 110px;overflow-y:auto;
    background:var(--win);border-top:1px solid var(--line);animation:bsheet .38s var(--ease)}
  .bsheet-h{display:flex;justify-content:space-between;align-items:center;font:11px var(--px);letter-spacing:.1em;text-transform:uppercase;color:var(--mute)}
  .bsheet-x{font:11px var(--px);letter-spacing:.1em;text-transform:uppercase;color:var(--teal);padding:8px 4px}
  .btabs{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-self:auto}
  .btab{flex-direction:column;align-items:flex-start;justify-content:space-between;gap:16px;height:auto;min-height:156px;margin:0;padding:14px;border-radius:18px;
    background:var(--win2);border:1px solid var(--line2);white-space:normal}
  .btab.on{box-shadow:0 0 0 2px var(--tab,var(--teal));border-color:transparent;background:var(--win2)}
  .btab .ic{width:48px;height:48px;border-radius:13px}
  .btab-t{gap:3px}
  .btab-t b{font-size:13px;color:var(--ink)}
  .btab-t small{display:block;font:12.5px/1.35 var(--ui);color:var(--ink2)}
  .btab-t .btab-u{font:11px var(--mono);color:var(--mute);overflow-wrap:anywhere}
  .btab-ink{display:none}
}
@keyframes bsheet{from{opacity:0;transform:translateY(18px) scale(.98)}}
