/* Card Lab base: tokens, page chrome, cards, Weather rows and charts. Shared by
   every lab page (cards.html, cards-2.html, layouts.html). */
:root {
  --glow: 102, 209, 255;      /* AnalyticsTheme.accentGlow */
  --primary: 69, 140, 255;    /* accentPrimary */
  --deep: 41, 115, 255;       /* accentDeep */
  --neg: 255, 71, 82;         /* negative */
  --page: #000;
  --card: #0e1015;
  --card-2: #15181f;
  --hair: rgba(255, 255, 255, .075);
  --hair-2: rgba(255, 255, 255, .12);
  --t1: #fff;
  --t2: rgba(235, 240, 255, .58);
  --t3: rgba(235, 240, 255, .32);
  --track: rgba(255, 255, 255, .11);
  --radius: 24px;
  --halo: #0e1015;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0; color: var(--t1); font-family: var(--font);
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0;
  background: var(--page); min-height: 100vh; overflow-x: hidden;
}

/* ---------- Sky mode: Weather's translucent modules over a living night sky ---------- */
body { position: relative; }
.sky-layer { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity .9s var(--ease); pointer-events: none; overflow: hidden;
  background: radial-gradient(130% 1400px at 50% -200px, #4a669a 0%, #34507f 26%, #1b2a4a 56%, #0a0f1d 100%) top / 100% 1600px no-repeat, #0b1222; }
body.sky .sky-layer { opacity: 1; }
.sky-layer::after { content: ""; position: absolute; left: -20%; right: -20%; top: 1700px; height: 1800px; background: radial-gradient(70% 45% at 50% 50%, rgba(74, 102, 154, .35), transparent 75%); }
.sky-layer::before { content: ""; position: absolute; left: 0; right: 0; top: 4200px; height: 1400px; background: radial-gradient(70% 50% at 30% 10%, rgba(52, 80, 127, .45), transparent 70%); }
.cloud { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; background: radial-gradient(closest-side, rgba(150, 175, 230, .55), transparent);
  animation: drift 60s linear infinite; }
.cloud.c1 { width: 900px; height: 360px; top: -80px; left: -200px; }
.cloud.c2 { width: 700px; height: 300px; top: 180px; left: 55%; animation-duration: 80s; animation-delay: -30s; opacity: .25; }
.cloud.c3 { width: 1100px; height: 420px; top: 900px; left: 10%; animation-duration: 95s; animation-delay: -50s; opacity: .18; }
@keyframes drift { from { transform: translateX(-8%); } 50% { transform: translateX(8%); } to { transform: translateX(-8%); } }
.stars { position: absolute; inset: 0; background-size: 640px 520px; background-image:
  radial-gradient(1px 1px at 22% 38%, rgba(255,255,255,.5), transparent 60%),
  radial-gradient(1px 1px at 78% 44%, rgba(255,255,255,.35), transparent 60%),
  radial-gradient(1.5px 1.5px at 46% 64%, rgba(255,255,255,.4), transparent 60%),
  radial-gradient(1px 1px at 6% 72%, rgba(255,255,255,.35), transparent 60%),
  radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%),
  radial-gradient(1px 1px at 68% 9%, rgba(255,255,255,.45), transparent 60%),
  radial-gradient(1.5px 1.5px at 84% 26%, rgba(255,255,255,.5), transparent 60%),
  radial-gradient(1px 1px at 33% 6%, rgba(255,255,255,.4), transparent 60%),
  radial-gradient(1px 1px at 52% 22%, rgba(255,255,255,.35), transparent 60%),
  radial-gradient(1px 1px at 91% 12%, rgba(255,255,255,.4), transparent 60%); animation: twinkle 7s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }
body.sky { --halo: transparent; --card: rgba(255, 255, 255, .09); --card-2: rgba(255, 255, 255, .06); --hair: rgba(255, 255, 255, .1); --hair-2: rgba(255,255,255,.16); --t2: rgba(240, 244, 255, .66); --t3: rgba(240, 244, 255, .4); --track: rgba(255,255,255,.16); }
body.sky .card { backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }

/* ---------- Page chrome ---------- */
.wrap { position: relative; z-index: 1; width: min(100% - 48px, 1240px); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,0)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(145deg, #1a2440, #070a12); border: 1px solid var(--hair-2); display: grid; place-items: center; }
.brand small { color: var(--t2); font-weight: 500; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--hair); }
.seg button { appearance: none; border: 0; background: transparent; color: var(--t2); font: 600 13px var(--font); padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: color .25s, background .35s var(--ease); }
.seg button.on { color: var(--t1); background: rgba(255,255,255,.14); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset; }
.nav { display: flex; gap: 6px; }
.nav a { color: var(--t2); text-decoration: none; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; }
.nav a:hover { color: var(--t1); background: rgba(255,255,255,.06); }

.intro { text-align: center; padding: 56px 0 10px; }
.intro .place { font-size: 34px; font-weight: 400; letter-spacing: -.01em; }
.intro .big { font-size: 96px; font-weight: 700; letter-spacing: -.035em; line-height: 1; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.intro .line { font-size: 19px; font-weight: 600; color: var(--t1); }
.intro .line span { color: var(--t2); font-weight: 500; }
.intro .note { margin: 18px auto 0; max-width: 640px; color: var(--t2); font-size: 15px; line-height: 1.5; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 72px 0 22px; }
.section-head h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.section-head p { margin: 6px 0 0; color: var(--t2); font-size: 15px; max-width: 640px; line-height: 1.45; }
.kicker { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--glow)); }

/* ---------- Cards ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); padding: 16px 18px 18px; overflow: hidden;
  transition: transform .5s var(--ease), border-color .4s; }
.card:hover { border-color: var(--hair-2); }
.title { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--t2); }
.title svg { width: 14px; height: 14px; flex: none; }
.title .sp { flex: 1; }
.title .chev { color: var(--t3); }
.title .live { color: rgb(var(--glow)); display: inline-flex; align-items: center; gap: 7px; }
.dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--glow)); box-shadow: 0 0 8px rgb(var(--glow)); }
.dot::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid rgb(var(--glow)); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.8); opacity: 0; } }
.fig { font-size: 34px; font-weight: 700; letter-spacing: -.025em; line-height: 1.08; font-variant-numeric: tabular-nums; }
.fig.xl { font-size: 46px; }
.fig.md { font-size: 26px; }
.cap { font-size: 15px; font-weight: 500; color: var(--t1); }
.sub { font-size: 15px; color: var(--t2); line-height: 1.38; }
.foot { font-size: 12px; font-weight: 500; color: var(--t3); display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
b, .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.up { color: rgb(var(--glow)); font-weight: 700; }
.down { color: rgb(var(--neg)); font-weight: 700; }
.divider { height: 1px; background: var(--hair); margin: 14px 0; }
.row { display: flex; align-items: center; gap: 11px; }
.row .grow { flex: 1; min-width: 0; }
.row .name { font-size: 15px; font-weight: 500; }
.row .meta { font-size: 12.5px; color: var(--t2); margin-top: 1px; }
.row .val { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.icon-chip { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: var(--t2); flex: none; }
.icon-chip svg { width: 16px; height: 16px; }

/* Weather list row */
.wrow { display: grid; grid-template-columns: 112px 44px 1fr 74px; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--hair); font-size: 15px; }
.wrow:first-of-type { border-top: 0; }
.wrow .n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.wrow .d { color: var(--t2); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wrow .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.wrow.ghost { opacity: .45; }
.meter { position: relative; height: 6px; border-radius: 99px; background: var(--track); }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; width: 0;
  background: linear-gradient(90deg, rgb(var(--deep)), rgb(var(--primary)) 55%, rgb(var(--glow)));
  background-size: var(--full, 100%) 100%; box-shadow: 0 0 10px rgba(var(--primary), .55); transition: width 1.1s var(--ease); }
.meter i.dashed { background: repeating-linear-gradient(90deg, rgba(var(--glow), .5) 0 4px, transparent 4px 7px); box-shadow: none; }
.meter b.now { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--card-solid, #0e1015); transition: left 1.1s var(--ease); }
body.sky .meter b.now { box-shadow: 0 0 0 3px rgba(40, 55, 90, .9); }

/* Charts */
.chart { position: relative; touch-action: none; cursor: crosshair; }
.chart svg { display: block; width: 100%; overflow: visible; }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.6s var(--ease) .15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fade-in { opacity: 0; animation: fadein .9s var(--ease) .9s forwards; }
@keyframes fadein { to { opacity: 1; } }
.orb-ring { transform-box: fill-box; transform-origin: center; animation: orb 2.2s ease-out infinite; }
@keyframes orb { from { transform: scale(.6); opacity: .8; } to { transform: scale(2.6); opacity: 0; } }
.scrub { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.35); pointer-events: none; opacity: 0; transition: opacity .15s; }
.bubble { position: absolute; top: -6px; transform: translate(-50%, -100%); padding: 5px 9px; border-radius: 10px; background: rgba(20, 24, 34, .92); border: 1px solid var(--hair-2);
  font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; backdrop-filter: blur(10px); }
.bubble b { font-size: 13px; }
.chart.scrubbing .scrub, .chart.scrubbing .bubble { opacity: 1; }

/* ---------- Proceeds gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 28px 24px; }
.option { display: flex; flex-direction: column; gap: 14px; }
.option .label { display: flex; align-items: baseline; gap: 10px; }
.option .letter { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 700; background: rgba(var(--primary), .16); color: rgb(var(--glow)); border: 1px solid rgba(var(--primary), .3); }
.option h3 { margin: 0; font-size: 17px; font-weight: 600; }
.option p { margin: 2px 0 0; font-size: 13.5px; color: var(--t2); line-height: 1.45; }
.option .pill { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; color: rgb(var(--glow)); background: rgba(var(--primary), .14); white-space: nowrap; }
.option.wide { grid-column: 1 / -1; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  color: rgb(var(--glow)); background: rgba(var(--primary), .14); border: 1px solid rgba(var(--primary), .28); }
.chip svg { width: 11px; height: 11px; }

/* Arc (C) */
.arcbox { position: relative; height: 196px; margin: 10px 0 0; }
.arcbox svg { width: 100%; height: 100%; overflow: visible; }
.arc-center { position: absolute; left: 2px; top: 6px; text-align: left; }

/* Gauge (D) */
.gauge-wrap { display: grid; grid-template-columns: 224px minmax(0, 1fr); align-items: center; gap: 14px; }
.gauge-wrap .gauge { margin-left: 24px; }
.gauge { position: relative; width: 200px; height: 200px; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge .c .fig { font-size: 30px; }
.gauge .c small { font-size: 11.5px; font-weight: 600; color: var(--t2); }
.kv { display: grid; grid-template-columns: 1fr auto; row-gap: 0; }
.kv > div { padding: 10px 0; border-top: 1px solid var(--hair); font-size: 15px; }
.kv > div:nth-child(-n+2) { border-top: 0; }
.kv .k { font-weight: 500; }
.kv .v { color: var(--t1); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* Strip (F) */
.strip-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.strip-wrap { position: relative; }
.strip-wrap svg.cum { position: absolute; inset: 18px 0 19px 0; width: 100%; height: calc(100% - 37px); overflow: visible; pointer-events: none; }
.strip { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)) repeat(14, minmax(0, 1fr)); align-items: end; gap: 4px; height: 190px; margin-top: 18px; }
.strip .bar { opacity: .55; }
.strip .col.today .bar { opacity: 1; }
.strip .col { display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 6px; height: 100%; }
.strip .bar { width: 100%; max-width: 18px; border-radius: 5px 5px 3px 3px; height: 0; transition: height 1s var(--ease);
  background: linear-gradient(to top, rgba(var(--deep), .55), rgba(var(--primary), .9)); }
.strip .col.today .bar { background: linear-gradient(to top, rgb(var(--primary)), rgb(var(--glow))); box-shadow: 0 0 16px rgba(var(--glow), .55); }
.strip .col.future .bar { background: repeating-linear-gradient(to top, rgba(var(--primary),.22) 0 3px, transparent 3px 6px); }
.strip .lbl { font-size: 10.5px; font-weight: 600; color: var(--t3); height: 13px; font-variant-numeric: tabular-nums; }
.strip .col.today .lbl { color: var(--t1); }
.strip .amt { font-size: 10.5px; font-weight: 700; color: var(--t1); height: 13px; opacity: 0; }
.strip .col.today .amt { opacity: 1; color: rgb(var(--glow)); }

/* ---------- Weather-style dashboard grid ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.tall { grid-row: span 2; }
.tile { min-height: 210px; display: flex; flex-direction: column; }
.board > .card { display: flex; flex-direction: column; }
.board .fig { font-size: 38px; }
.board .fig.md { font-size: 30px; }
.tile .bottom { margin-top: auto; }

.hourly { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: 16px; text-align: center; }
.hourly .h { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hourly .h .t { font-size: 14px; font-weight: 700; }
.hourly .h .t.dim { color: var(--t2); font-weight: 600; }
.hourly .h .mini { width: 10px; border-radius: 5px; background: linear-gradient(to top, rgba(var(--deep), .6), rgb(var(--primary))); }
.hourly .h.now .mini { background: linear-gradient(to top, rgb(var(--primary)), rgb(var(--glow))); box-shadow: 0 0 12px rgba(var(--glow), .6); }
.hourly .h .barwell { height: 48px; display: flex; align-items: end; }
.hourly .h .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hourly .h .v.dim { color: var(--t2); }

.compass { position: relative; width: 140px; height: 140px; flex: none; }
.compass svg { width: 100%; height: 100%; }
.compass .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }

.ring3d { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center; margin-top: 10px; }
.legend-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; font-size: 14.5px; }
.legend-row.on { background: rgba(255,255,255,.06); }
.legend-row i { width: 8px; height: 8px; border-radius: 3px; background: rgba(255,255,255,.2); }
.legend-row.on i { background: rgb(var(--glow)); box-shadow: 0 0 8px rgb(var(--glow)); }
.legend-row span:last-child { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

.podium { display: flex; align-items: end; justify-content: center; gap: 8px; height: 178px; margin: auto 0 4px; }
.step { position: relative; width: 31%; text-align: center; }
.step .blk { position: relative; border-radius: 3px 3px 0 0; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: rgba(255,255,255,.9);
  background: linear-gradient(90deg, rgba(0,0,0,0) 0 86%, rgba(0,0,0,.28) 86%), linear-gradient(to bottom, rgb(var(--primary)), rgba(var(--deep), .5));
  box-shadow: 0 22px 44px rgba(var(--primary), .32); height: 0; transition: height 1.1s var(--ease); }
.step .blk::before { content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; background: linear-gradient(to bottom, rgba(170, 225, 255, .95), rgba(var(--glow), .8));
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%); }
.step .blk::after { content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 18px; background: linear-gradient(to bottom, rgba(var(--primary), .25), transparent); filter: blur(2px); }
.step.s2 .blk, .step.s3 .blk { filter: saturate(.7) brightness(.72); }
.step .lab { font-size: 14px; font-weight: 700; margin-bottom: 22px; font-variant-numeric: tabular-nums; }
.step .lab small { display: block; font-size: 11px; font-weight: 500; color: var(--t2); }

.spark { height: 64px; margin-top: auto; }
.tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px; }

.uv { position: relative; height: 6px; border-radius: 99px; margin: 18px 0 14px; background: linear-gradient(90deg, rgba(var(--deep), .35), rgb(var(--primary)), rgb(var(--glow)), #fff); }
.uv b { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #0e1015; }

.globe { width: 120px; height: 120px; flex: none; border-radius: 50%; position: relative; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, rgba(var(--glow), .35), rgba(var(--deep), .12) 55%, rgba(0,0,0,.4) 75%); box-shadow: 0 0 40px rgba(var(--primary), .35), inset 0 0 18px rgba(var(--glow), .35); }
.globe canvas { position: absolute; inset: 0; }

.moonrow { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }

.reveal { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(6px); transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }

.earlier { display: flex; align-items: center; gap: 14px; margin: 56px 0 24px; color: var(--t2); font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.earlier::before, .earlier::after { content: ""; flex: 1; height: 1px; background: var(--hair-2); }
.footer { color: var(--t3); text-align: center; font-size: 13px; padding: 80px 0 60px; }

@media (max-width: 980px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-3, .span-4 { grid-column: span 2; } }
@media (max-width: 620px) {
  .board { grid-template-columns: minmax(0, 1fr); } .span-2, .span-3, .span-4 { grid-column: auto; }
  .intro .big { font-size: 60px; } .intro .line { font-size: 16px; } .wrap { width: min(100% - 24px, 1240px); }
  .nav { display: none; } .brand small { display: none; }
  .gauge-wrap { grid-template-columns: 1fr !important; justify-items: center; } .gauge-wrap .kv { width: 100%; }
  .hourly { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 18px; }
  .strip .amt { display: none; } .strip { gap: 2px; }
  .ring3d { grid-template-columns: 1fr; justify-items: center; } .ring3d > div { width: 100%; }
  .section-head h2 { font-size: 24px; }
}
body.static *, body.static *::before, body.static *::after { animation: none !important; transition: none !important; }
body.static .draw { stroke-dashoffset: 0; } body.static .fade-in { opacity: 1; } body.static .reveal { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .draw { stroke-dashoffset: 0; } .fade-in { opacity: 1; } .reveal { opacity: 1; transform: none; filter: none; } }
