/* Card Lab · page 2 and the layouts page. Builds on lab.css and studio.css. */

/* ---------- Page chrome ---------- */
.nav a.on { color: var(--t1); background: rgba(255,255,255,.1); }
.p2-intro .big { font-size: 88px; }
.p2-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px auto 0; max-width: 760px; }
.p2-rules span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 9px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--t1);
  background: rgba(255,255,255,.05); border: 1px solid var(--hair); }
.p2-rules span i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  color: rgb(var(--glow)); background: rgba(var(--primary), .16); border: 1px solid rgba(var(--primary), .32); }
.p2-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; color: #fff; text-decoration: none;
  background: linear-gradient(90deg, rgba(var(--deep), .9), rgba(var(--primary), .9)); box-shadow: 0 0 22px rgba(var(--primary), .45), 0 1px 0 rgba(255,255,255,.25) inset; }
.p2-cta:hover { filter: brightness(1.1); }

/* ---------- Sections ---------- */
.studio-head .kept { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--t2);
  padding: 5px 11px 5px 8px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid var(--hair); }
.studio-head .kept b { color: var(--t1); }
.option .reads { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--t1); font-weight: 500; }
.option .reads::before { content: "Reads as"; display: inline-block; margin-right: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--glow)); }
.size-tile .option .reads, .size-tile .reads { font-size: 12.5px; }

/* A tile style: the ten 2-up tiles in one row band */
.sgrid .size-family { grid-column: 1 / -1; }
.p2-fam { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.p2-fam .card { aspect-ratio: 1 / 1; display: flex; flex-direction: column; padding: 14px 15px 15px; }
.p2-fam-note { grid-column: span 2; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 6px; color: var(--t2); font-size: 14px; line-height: 1.45; }
.p2-fam-note b { color: var(--t1); }

/* Where a section's designs appear in the layouts (fills the last row) */
.p2-used { display: grid; gap: 6px; align-content: start; padding: 10px; border-radius: 20px; border: 1px dashed var(--hair-2); }
.p2-used.wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.p2-used a { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 10px; border-radius: 13px; color: inherit; text-decoration: none; background: rgba(255,255,255,.035); transition: background .2s; }
.p2-used a:hover { background: rgba(255,255,255,.08); }
.p2-used .lt { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: rgb(var(--glow)); background: rgba(var(--primary), .14); border: 1px solid rgba(var(--primary), .3); }
.p2-used b { display: block; font-size: 14px; font-weight: 600; }
.p2-used small { display: block; font-size: 12.5px; color: var(--t2); line-height: 1.35; margin-top: 1px; }
.p2-usedopt .letter { font-size: 14px; }
.p2-used small .appb { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--glow)); background: rgba(var(--primary), .16); padding: 1px 5px; border-radius: 5px; margin-left: 4px; }

/* ---------- Shared pieces ---------- */
.p2-trend { font-size: 14px; white-space: nowrap; }
.p2-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.p2-row.start { justify-content: flex-start; }
.p2-status { font-size: 15px; font-weight: 500; color: var(--t1); line-height: 1.25; }
.p2-status .up, .p2-status .down { font-weight: 700; margin-right: 3px; }

.p2-meter em { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 1px; background: rgba(255,255,255,.8); box-shadow: 0 0 0 1.5px rgba(14,16,21,.9); }
body.sky .p2-meter em { box-shadow: 0 0 0 1.5px rgba(40,55,90,.9); }

.p2-ppl { display: flex; flex-wrap: wrap; gap: 4px 3px; }
.p2-ppl svg { fill: rgba(255,255,255,.15); transition: fill .5s var(--ease), filter .5s var(--ease), transform .55s cubic-bezier(.34, 1.56, .64, 1); }
.p2-ppl svg.lit.on { fill: url(#p2gv); filter: drop-shadow(0 0 5px rgba(var(--glow), .75)); transform: translateY(-1px); }
body.static .p2-ppl svg.lit { fill: url(#p2gv); filter: drop-shadow(0 0 5px rgba(var(--glow), .75)); }

.p2-split { display: flex; height: 6px; }
.p2-split i { position: relative; border-radius: 99px; background: rgba(var(--primary), .32); transform-origin: left; animation: p2grow .9s var(--ease) both; }
.p2-split i.on { background: linear-gradient(90deg, rgb(var(--deep)), rgb(var(--primary)) 55%, rgb(var(--glow))); box-shadow: 0 0 10px rgba(var(--primary), .6); }
.p2-split i:nth-child(2) { animation-delay: .08s; } .p2-split i:nth-child(3) { animation-delay: .16s; } .p2-split i:nth-child(4) { animation-delay: .24s; } .p2-split i:nth-child(5) { animation-delay: .32s; }
@keyframes p2grow { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.p2-split-l { display: flex; margin-top: 8px; }
.p2-split-l span { min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; white-space: nowrap; }
.p2-split-l b { font-weight: 700; color: var(--t2); }
.p2-split-l span.on b { color: var(--t1); }
.p2-split-l small { font-size: 11.5px; font-weight: 600; color: var(--t3); }

/* ---------- Layouts page: stage, rail and the iPhone ---------- */
.lay-switch { display: flex; justify-content: center; margin: 22px 0 0; }
.lay-switch .seg { flex-wrap: wrap; justify-content: center; }
.lay-switch .seg button { padding: 9px 16px; font-size: 14px; }
.lay-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 30px; }
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lay-rail { position: sticky; top: 96px; padding-top: 6px; max-height: calc(100vh - 116px); overflow: auto; scrollbar-width: none; padding-bottom: 24px; }
.lay-rail::-webkit-scrollbar { display: none; }
.lay-rail .kicker { margin-bottom: 6px; }
.lay-rail h2 { margin: 0; font-size: 36px; font-weight: 700; letter-spacing: -.025em; }
.lay-rail .idea { margin: 8px 0 0; font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--t1); max-width: 560px; }
.lay-rail .why { margin: 10px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--t2); max-width: 560px; }
.lay-order { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 2px; max-width: 560px; }
.lay-order li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: baseline; padding: 8px 12px 8px 8px; border-radius: 12px; cursor: pointer; transition: background .3s, color .3s; color: var(--t2); }
.lay-order li:hover { background: rgba(255,255,255,.04); }
.lay-order li.on { background: rgba(255,255,255,.07); color: var(--t1); }
.lay-order li .n { font-size: 12px; font-weight: 700; color: rgb(var(--glow)); font-variant-numeric: tabular-nums; text-align: right; }
.lay-order li .t { font-size: 15px; font-weight: 600; color: var(--t1); }
.lay-order li .d { display: block; font-size: 13px; font-weight: 500; color: var(--t2); margin-top: 1px; line-height: 1.4; }
.lay-order li.group { cursor: default; padding: 14px 8px 4px; background: none; }
.lay-order li.group .t { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--t3); }

/* The iPhone: a titanium frame with its buttons, the screen inside. In
   .fixed it is real size and the page scrolls inside it; in .long it shows
   the whole page at once, with the header and the bar stuck to the window. */
.phone-wrap { position: relative; }
.phone { position: relative; width: 430px; padding: 14px; border-radius: 66px; transform-origin: 0 0;
  background: linear-gradient(145deg, #464a53 0%, #17191d 20%, #0b0c0f 50%, #1d2026 80%, #464a53 100%);
  box-shadow: 0 0 0 1.5px #555a64 inset, 0 0 0 5px #08090b inset, 0 50px 110px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.07), 0 0 120px rgba(41,115,255,.12); }
.phone .hw { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #23262c, #4d525c); }
.phone .hw-action { left: -3px; top: 150px; height: 34px; }
.phone .hw-up { left: -3px; top: 212px; height: 62px; }
.phone .hw-down { left: -3px; top: 286px; height: 62px; }
.phone .hw-power { right: -3px; top: 250px; height: 96px; }
.phone .hw-cam { right: -3px; top: 560px; height: 54px; }
.screen { position: relative; border-radius: 52px; background: #000; overflow: clip; }
.phone.fixed .screen { height: 874px; }
.phone.fixed .scroller { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.phone.fixed .scroller::-webkit-scrollbar { display: none; }
.phead { position: sticky; top: 0; z-index: 5; padding-bottom: 10px; background: linear-gradient(to bottom, rgba(0,0,0,.94) 55%, rgba(0,0,0,0)); }
.phone.long .phead { top: 56px; }
body.sky .phead { background: linear-gradient(to bottom, rgba(14,22,40,.9) 55%, rgba(0,0,0,0)); }
.status { display: flex; justify-content: space-between; align-items: center; height: 54px; padding: 0 34px 0 44px; font-size: 16px; font-weight: 600; }
.status .sig { display: flex; gap: 6px; align-items: center; }

/* The Dynamic Island with the Live Activity: compact, and open on tap. */
.island { position: absolute; z-index: 7; top: 11px; left: 50%; width: 124px; height: 36px; transform: translateX(-50%); border-radius: 20px; background: #000; overflow: hidden;
  transition: width .5s cubic-bezier(.34, 1.3, .64, 1), height .5s cubic-bezier(.34, 1.3, .64, 1), border-radius .5s var(--ease), box-shadow .4s; }
.island.la { width: 200px; cursor: pointer; }
.island .la-l, .island .la-r { position: absolute; top: 0; height: 36px; display: flex; align-items: center; transition: opacity .2s; }
.island .la-l { left: 13px; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: rgb(var(--glow)); }
.island .la-r { right: 15px; font-size: 15px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.island .ldot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--glow)); box-shadow: 0 0 8px rgb(var(--glow)); flex: none; }
.island .ldot::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid rgb(var(--glow)); animation: ping 1.8s var(--ease) infinite; }
.island .la-x { position: absolute; inset: 0; padding: 16px 22px; display: grid; align-content: center; gap: 4px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.island .la-h { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: rgb(var(--glow)); }
.island .la-n { font-size: 15px; font-weight: 500; color: var(--t2); }
.island .la-n b { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -.02em; margin-right: 4px; }
.island .la-f { font-size: 13.5px; font-weight: 500; color: var(--t1); display: flex; gap: 6px; }
.island .la-f span { color: var(--t3); }
.island.open { width: 374px; height: 124px; border-radius: 44px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.island.open .la-l, .island.open .la-r { opacity: 0; }
.island.open .la-x { opacity: 1; transition-delay: .18s; }

.appnav { display: grid; grid-template-columns: 44px 1fr 74px; align-items: center; gap: 10px; padding: 2px 16px 0; }
.appnav .circ { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.appnav .name { text-align: center; font-size: 17px; font-weight: 600; }
.appnav .apps { height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 3px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.appicon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(145deg, rgb(102,209,255), rgb(41,115,255)); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset; }
.feed { padding: 0 16px 120px; display: grid; gap: 12px; }
.feed .card { padding: 15px 16px 16px; }
.feed .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feed .pair > .card { aspect-ratio: 1 / 1; display: flex; flex-direction: column; padding: 14px 14px 14px; }
.feed .sec-h { padding: 18px 4px 0; }
.feed .sec-h h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.feed .sec-h p { margin: 2px 0 0; font-size: 14px; font-weight: 500; color: var(--t2); }
.feed .sec-h p b { color: var(--t1); }
.feed .flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 2px rgba(var(--glow), .8), 0 0 30px rgba(var(--primary), .5); } }

/* The floating bar: Customers, the range, Transactions — Liquid Glass. */
.tabbar { z-index: 6; display: grid; grid-template-columns: 54px 1fr 54px; gap: 8px; align-items: center; }
.phone.fixed .tabbar { position: absolute; left: 12px; right: 12px; bottom: 18px; }
.phone.long .tabbar { position: sticky; bottom: 18px; margin: -96px 12px 18px; }
.tabbar .circ, .tabbar .segs { height: 54px; border-radius: 27px; background: rgba(28,30,36,.7); border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.1) inset; }
.tabbar .circ { display: grid; place-items: center; }
.tabbar .segs { display: flex; align-items: center; justify-content: space-around; padding: 0 6px; }

@media (max-width: 980px) {
  .p2-fam { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lay-stage { grid-template-columns: 1fr; justify-items: center; } .lay-rail { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 620px) {
  .p2-fam { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .p2-fam-note { grid-column: 1 / -1; }
  .p2-intro .big { font-size: 58px; }
  .phone.long { width: 100%; max-width: 430px; }
}
