/* Creator Lab (lab.html, assets/lab.js): the board's creators, what lengths, shapes and platforms work for them.
   Built on club.css's tokens: the acid nav, black ground, display headings, 2px rules, the board's lime band.
   Platform colours, the same on every chart: X off-white, YouTube heat, Instagram acid, TikTok grey. */
.lab { --c-x: var(--fg); --c-youtube: var(--heat); --c-instagram: var(--acid); --c-tiktok: var(--dim); --soft: #c9c5bb; --rule: #262624; }
.lab-wait { padding: 40px var(--gut); color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.lab h1, .lab h2, .lab h3 { font-family: var(--disp); font-weight: 900; text-transform: uppercase; line-height: .84; letter-spacing: -.01em; }
.lab .kick { display: block; font-weight: 700; font-size: 14px; line-height: 1.25; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.lab .say { margin-top: 14px; max-width: 860px; font-size: 16px; font-weight: 600; color: var(--soft); }
.lab .say b { color: var(--fg); }
.lab-sec { padding: 18px var(--gut) 32px; border-bottom: var(--line) solid var(--fg); }
.lab-sec > h2 { font-size: var(--dh); margin-bottom: 22px; }
.lab-num { font-family: var(--disp); font-weight: 900; line-height: 1; }

/* header */
.lab-head { padding: 26px var(--gut) 24px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; border-bottom: var(--line) solid var(--fg); }
.lab-head > div { min-width: 0; flex: 1 1 520px; }
.lab-head h1 { font-size: clamp(52px, 7.4vw, 112px); }
.lab-head h1 em { font-style: normal; color: var(--acid); }
.lab-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; margin-bottom: 18px; border: var(--line) solid currentColor; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.lab-back:hover { background: var(--fg); color: var(--bg); }
.lab-chips { display: flex; flex-wrap: wrap; }
.lab-chip { display: flex; flex-direction: column; gap: 4px; min-width: 108px; padding: 8px 16px 6px; border: var(--line) solid var(--fg); margin-left: calc(var(--line) * -1); }
.lab-chip span { font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.lab-chip b { font: 900 30px/1 var(--disp); }
a.lab-chip:hover { background: var(--fg); color: var(--bg); }
a.lab-chip:hover span { color: var(--bg); }

/* headline numbers */
.lab-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-bottom: var(--line) solid var(--fg); }
.lab-kpi { display: flex; flex-direction: column; gap: 8px; padding: 20px var(--gut) 22px; border-right: var(--line) solid var(--fg); margin-bottom: calc(var(--line) * -1); border-bottom: var(--line) solid var(--fg); }
.lab-kpi span { font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.lab-kpi b { font: 900 clamp(46px, 5vw, 64px)/.84 var(--disp); text-transform: uppercase; color: var(--c, var(--fg)); }
.lab-kpi small { font-size: 15px; font-weight: 600; color: var(--soft); }

/* the board (lime band) */
.lab-board { background: var(--acid); color: var(--bg); padding: 18px 0 30px; border-bottom: var(--line) solid var(--fg); }
.lab-board .lab-bhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding: 0 var(--gut); margin-bottom: 14px; }
.lab-board h2 { font-size: var(--dh); }
.lab-board .kick { color: rgba(11, 11, 10, .66); margin: 10px 0 0; }
.lab-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.lab-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lab-legend i { width: 14px; height: 14px; background: var(--c); outline: var(--line) solid var(--bg); }
.lab-scroll { overflow-x: auto; padding: 0 var(--gut); }
.lab-table { width: 100%; min-width: 1040px; border-collapse: collapse; font-weight: 700; }
.lab-table th { padding: 0 10px 8px 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(11, 11, 10, .66); text-align: left; white-space: nowrap; }
.lab-table td { padding: 9px 10px 9px 0; font-size: 15px; border-top: var(--line) solid var(--bg); vertical-align: middle; }
.lab-table .r { text-align: right; }
.lab-table .rk { width: 44px; font: 900 30px/1 var(--disp); }
.lab-table .nm { font: 900 26px/.95 var(--disp); text-transform: uppercase; white-space: nowrap; }
.lab-table .nm a:hover { color: var(--heat); }
.lab-table .big { font: 900 26px/1 var(--disp); padding-right: 18px; }
.lab-days { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.lab-days > div { flex: 1; height: 12px; border: var(--line) solid var(--bg); }
.lab-days > div i { display: block; height: 100%; background: var(--bg); }
.lab-days span { width: 22px; text-align: right; }
.lab-mix { display: flex; gap: 2px; height: 22px; padding: 2px; background: var(--bg); min-width: 240px; }
.lab-mix i { background: var(--c); }

/* bars against "usual" (1.00x sits two thirds along: the scale ends at 1.5x) */
.lab-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px 36px; }
.lab-panel { border-top: var(--line) solid var(--fg); padding-top: 12px; min-width: 0; }
.lab-panel header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lab-panel h3 { font-size: 34px; line-height: .9; color: var(--c); }
.lab-panel header span { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.lab-bar { display: grid; grid-template-columns: 64px minmax(0, 1fr) 62px; align-items: center; column-gap: 10px; min-height: 40px; }
.lab-bar > span:first-child { font-weight: 700; font-size: 14px; }
.lab-bar .track { position: relative; height: 20px; }
.lab-bar .track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); }
.lab-bar .track i.few { opacity: .45; }
.lab-bar .track::after { content: ""; position: absolute; left: 66.67%; top: -4px; bottom: -4px; width: 2px; background: var(--fg); }
.lab-bar .v { font: 900 22px/1 var(--disp); text-align: right; color: var(--c); }
.lab-bar small { grid-column: 2 / 4; margin-top: -4px; font-size: 13px; font-weight: 600; color: var(--dim); }
.lab-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.lab-key span { display: inline-flex; align-items: center; gap: 7px; }
.lab-key i { width: 14px; height: 14px; background: var(--c); }
.lab-key i.line { width: 2px; height: 16px; }
.lab-key i.dash { background: none; border: 2px dashed var(--dim); }

/* Instagram vs X: centred on 1x, log scale */
.lab-div-axis, .lab-div { display: grid; grid-template-columns: 200px minmax(0, 1fr) 80px; gap: 0 14px; align-items: center; }
.lab-div-axis { font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.lab-div-axis > div { display: flex; justify-content: space-between; gap: 8px; }
.lab-div { min-height: 42px; border-top: var(--line) solid var(--rule); }
.lab-div .who { font: 900 24px/1 var(--disp); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-div .who:hover { color: var(--heat); }
.lab-div .track { position: relative; height: 22px; }
.lab-div .track::before { content: ""; position: absolute; left: 50%; top: -10px; bottom: -10px; width: 2px; background: var(--fg); }
.lab-div .track i { position: absolute; top: 0; bottom: 0; background: var(--c); }
.lab-div .v { font: 900 24px/1 var(--disp); text-align: right; color: var(--c); }

/* shape + days */
.lab-pair { overflow: hidden; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); border-bottom: var(--line) solid var(--fg); }
.lab-pair > .lab-sec { border-bottom: 0; border-right: var(--line) solid var(--fg); margin-right: calc(var(--line) * -1); }
.lab-pair h2 { font-size: 48px; }
.lab-shape { border-top: var(--line) solid var(--rule); padding: 10px 0 12px; }
.lab-shape h3 { font-size: 24px; line-height: 1; color: var(--c); margin-bottom: 8px; }
.lab-shape .lab-bar { grid-template-columns: 92px minmax(0, 1fr) 56px; min-height: 28px; }
.lab-shape .lab-bar > span:first-child { text-transform: uppercase; letter-spacing: .04em; }
.lab-shape .track { height: 16px; }
.lab-shape .v { font-size: 20px; }
.lab-week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 220px; border-bottom: var(--line) solid var(--fg); }
.lab-week::before { content: ""; position: absolute; left: 0; right: 0; bottom: var(--par); border-top: 2px dashed var(--dim); }
.lab-week > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.lab-week b { font: 900 20px/1 var(--disp); color: var(--c); }
.lab-week i { width: 100%; background: var(--c); }
.lab-wk-l { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 8px; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; text-align: center; }

/* posting rate vs views per post */
.lab-plot { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 10px; }
.lab-plot .y { position: relative; height: 500px; font-weight: 700; font-size: 13px; color: var(--dim); text-align: right; }
.lab-plot .y span { position: absolute; right: 0; transform: translateY(50%); }
.lab-field { position: relative; height: 500px; border-left: var(--line) solid var(--fg); border-bottom: var(--line) solid var(--fg); }
.lab-field .grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--rule); }
.lab-dot { position: absolute; transform: translate(-50%, 50%); width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: var(--line) solid var(--bg); }
.lab-dot:hover, .lab-dot:focus-visible { outline: 3px solid var(--fg); outline-offset: 1px; z-index: 2; }
.lab-dlabel { position: absolute; transform: translate(14px, 50%); font: 900 17px/1 var(--disp); text-transform: uppercase; white-space: nowrap; pointer-events: none; text-shadow: 0 0 4px var(--bg), 0 0 4px var(--bg); }
.lab-dlabel.left { transform: translate(calc(-100% - 14px), 50%); }
.lab-plot .x { position: relative; height: 26px; font-weight: 700; font-size: 13px; color: var(--dim); }
.lab-plot .x span { position: absolute; top: 6px; transform: translateX(-50%); }
.lab-plot .axis { grid-column: 2; margin-top: 6px; text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

/* notes */
.lab-notes { padding: 18px var(--gut) 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px 36px; font-size: 15px; font-weight: 600; color: var(--soft); }
.lab-notes h2 { font-size: 24px; line-height: 1; color: var(--c, var(--fg)); margin-bottom: 8px; }

/* one creator: daily views */
.lab-daily { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; align-items: end; height: 260px; border-bottom: var(--line) solid var(--fg); }
.lab-daily > div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.lab-daily b { font: 900 18px/1 var(--disp); color: var(--acid); white-space: nowrap; }
.lab-daily i { width: 100%; background: var(--fg); }
.lab-daily i.peak { background: var(--acid); }
.lab-daily i.none { background: none; border: 2px dashed var(--dim); height: 6px; }
.lab-dticks { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; margin-top: 8px; font-weight: 700; font-size: 12px; color: var(--dim); white-space: nowrap; }
.lab-len { display: grid; grid-template-columns: 64px minmax(0, 1fr) 70px 70px; align-items: center; gap: 10px; min-height: 44px; border-top: var(--line) solid var(--rule); }
.lab-len > span:first-child { font-weight: 700; font-size: 14px; }
.lab-len .track { height: 20px; }
.lab-len .track i { display: block; height: 100%; background: var(--c); }
.lab-len b { font: 900 22px/1 var(--disp); text-align: right; color: var(--c); }
.lab-len small { font-size: 13px; font-weight: 700; color: var(--dim); text-align: right; }
.lab-stack { display: flex; gap: 2px; height: 40px; padding: 2px; background: var(--bg); border: var(--line) solid var(--fg); margin-bottom: 18px; }
.lab-stack i { background: var(--c); }
.lab-prow { display: grid; grid-template-columns: 18px minmax(0, 1fr) 70px 100px; align-items: center; gap: 12px; min-height: 44px; border-top: var(--line) solid var(--rule); }
.lab-prow i { width: 14px; height: 14px; background: var(--c); }
.lab-prow b { font: 900 24px/1 var(--disp); text-transform: uppercase; }
.lab-prow b.v { text-align: right; color: var(--c); }
.lab-prow small { font-size: 14px; font-weight: 700; color: var(--soft); text-align: right; }
.lab-hits { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lab-hit { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: start; }
.lab-hit .frame { position: relative; width: 120px; height: 213px; background: #1c1c1a; overflow: hidden; }
.lab-hit .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lab-hit .frame .rank { position: absolute; left: 0; top: 0; z-index: 1; padding: 5px 8px 3px; background: var(--acid); color: var(--bg); font: 900 22px/1 var(--disp); }
.lab-hit .frame .dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 2px 6px; background: var(--bg); font-weight: 700; font-size: 13px; }
.lab-hit > div:last-child { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; min-width: 0; }
.lab-hit h3 { font-size: 30px; line-height: .92; overflow-wrap: anywhere; }
.lab-hit a:hover h3 { color: var(--heat); }
.lab-hit .lab-num { font-size: 44px; color: var(--acid); }
.lab-hit small { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.lab-works { background: var(--acid); color: var(--bg); padding: 18px var(--gut) 30px; }
.lab-works h2 { font-size: var(--dh); margin-bottom: 16px; }
.lab-works ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 30px; }
.lab-works li { border-top: var(--line) solid var(--bg); padding-top: 10px; font-size: 16px; font-weight: 600; }
.lab-works li b { display: block; margin-bottom: 6px; font: 900 28px/.95 var(--disp); text-transform: uppercase; }
.lab-missing { padding: 40px var(--gut) 60px; }
.lab-missing h1 { font-size: clamp(48px, 8vw, 110px); color: var(--acid); margin-bottom: 18px; }

@media (max-width: 760px) {
  .lab-kpis { grid-template-columns: 1fr 1fr; }
  .lab-kpi { padding: 14px var(--gut) 16px; }
  .lab-kpi b { font-size: 38px; }
  .lab-kpi span { font-size: 11px; }
  .lab-kpi small { font-size: 13px; }
  .lab-div-axis, .lab-div { grid-template-columns: 120px minmax(0, 1fr) 58px; gap: 0 8px; }
  .lab-div .who, .lab-div .v { font-size: 19px; }
  .lab-div-axis > div span:nth-child(2) { display: none; }
  .lab-plot .y, .lab-field { height: 380px; }
  .lab-dlabel { font-size: 14px; }
  .lab-pair h2 { font-size: 40px; }
  .lab-week { gap: 5px; height: 180px; }
  .lab-week b { font-size: 15px; }
  .lab-wk-l { gap: 5px; font-size: 11px; letter-spacing: .04em; }
  .lab-len { grid-template-columns: 54px minmax(0, 1fr) 56px 58px; gap: 8px; }
  .lab-prow { grid-template-columns: 14px minmax(0, 1fr) 54px 76px; gap: 8px; }
  .lab-daily b { font-size: 13px; }
  .lab-hit { grid-template-columns: 96px minmax(0, 1fr); }
  .lab-hit .frame { width: 96px; height: 170px; }
  .lab-hit h3 { font-size: 24px; }
  .lab-hit .lab-num { font-size: 34px; }
}
