/* TelegramBlaster site, part 2: the tool explorer. The other sections are in sections.css. */

/* the suite: one ink stage, framed by its band and sitting right under the hero. The tool list on the left like the app's sidebar, the real page in its own window on the right.
   Every tool belongs to a stage, and the stage sets the colour (--acc) of whatever is lit.
   shared/js/fx.js slides the highlight (--iy), keeps the counter, and runs the tour; without it the list still works as tabs. */
@property --acc { syntax: "<color>"; inherits: true; initial-value: #FF8A5C; }
[data-stage="Find"] { --acc: #FF8A5C; } [data-stage="Extract"] { --acc: #FFCF4A; } [data-stage="Reach"] { --acc: #3CCFB4; }
[data-stage="Manage"] { --acc: #B79CFF; } [data-stage="Understand"] { --acc: #FF9FB6; } [data-stage="Run"] { --acc: #9BE8C6; }

#suite { padding: clamp(14px, 2.4vw, 36px) 0; } /* no heading: the band is a frame round the stage */
.xp { --focus: var(--sun); position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 276px minmax(0, 1fr); border-radius: var(--r-xl); background: var(--ink); color: #fff; box-shadow: 0 50px 90px -44px rgba(43, 27, 61, .95); transition: --acc .7s var(--ease); }
.xp::before { content: ""; position: absolute; z-index: -1; right: -10%; top: -26%; width: 64%; aspect-ratio: 1; border-radius: 50%; background: var(--acc); opacity: .3; filter: blur(110px); animation: drift 15s ease-in-out infinite alternate; }
.xp::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.6px) 0 0 / 22px 22px; -webkit-mask-image: radial-gradient(75% 85% at 68% 30%, #000, transparent); mask-image: radial-gradient(75% 85% at 68% 30%, #000, transparent); }

/* the list: a lit pill glides to the chosen tool, and a line along its foot times the tour */
.xp-side { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 14px; border-right: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); }
.xp-tabs { position: relative; display: grid; gap: 2px; align-content: start; }
.xp-tabs::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46px; border-radius: 13px; pointer-events: none; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 16px 30px -18px rgba(0, 0, 0, .45); transform: translateY(var(--iy, 0px)); transition: transform .6s var(--ease); }
@supports (background: color-mix(in srgb, red 50%, transparent)) { .xp-tabs::before { background: linear-gradient(100deg, color-mix(in srgb, var(--acc) 30%, transparent), rgba(255, 255, 255, .06)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 50%, transparent), 0 16px 30px -18px var(--acc); } }
.xp-tabs button { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px; height: 46px; padding: 0 12px 0 9px; border-radius: 13px; text-align: left; font-size: .93rem; font-weight: 500; line-height: 1.2; color: #C6B8D8; transition: color .25s, background-color .25s; }
.xp-tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-tabs kbd { display: grid; place-items: center; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, .08); color: var(--acc); font: 500 .76rem var(--mono); transition: background-color .3s, color .3s, transform .5s var(--ease); }
.xp-tabs button:hover { color: #fff; background: rgba(255, 255, 255, .05); } .xp-tabs button:hover kbd { transform: scale(1.1) rotate(-8deg); }
.xp-tabs button[aria-selected="true"] { color: #fff; font-weight: 600; background: none; }
.xp-tabs button[aria-selected="true"] kbd { background: var(--acc); color: var(--ink); }
.xp-tabs button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--acc); transform: scaleX(0); transform-origin: 0 50%; }
.xp.is-touring .xp-tabs button[aria-selected="true"]::after { animation: xp-tick 6.5s linear forwards; }
.xp.is-touring.is-paused .xp-tabs button[aria-selected="true"]::after { animation-play-state: paused; }
@keyframes xp-tick { to { transform: scaleX(1); } }
.xp-tabs::-webkit-scrollbar { display: none; } .xp-tabs button:focus-visible { outline-offset: -3px; }

/* under the list: which tool of twelve, which stage it belongs to, and the tour switch */
.xp-meta { margin-top: auto; display: grid; gap: 14px; padding: 18px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
.xp-count { display: flex; align-items: baseline; gap: 10px; font: 500 .76rem var(--mono); color: #C6B8D8; }
.xp-count b { font: 700 3.6rem/.86 var(--display); letter-spacing: -0.06em; font-variant-numeric: tabular-nums; color: var(--acc); }
.xp-stages { display: flex; flex-wrap: wrap; gap: 6px; }
.xp-stages li { padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); font: 500 .75rem var(--mono); color: #B5A6C9; transition: background-color .45s, color .45s, box-shadow .45s; }
.xp-stages li.is-on { background: var(--acc); color: var(--ink); box-shadow: none; }
.xp-tour { align-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 10px 6px; padding: 0 18px 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .24); color: #fff; font: 600 .86rem var(--display); transition: background-color .25s, color .25s, box-shadow .25s; }
.xp-tour:hover { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px #fff; }
.xp-tour i { box-sizing: border-box; width: 10px; height: 12px; border: solid currentColor; border-width: 0 3.5px; } /* two bars: the tour is running */
.xp-tour[aria-pressed="false"] i { width: 0; height: 0; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; } /* a triangle: press to run it */
.xp-tour[hidden], html:not(.js) .xp-tour { display: none; }

/* the panels share one cell, so the stage keeps the height of its tallest tool and nothing below it moves during the tour */
.xp-panels { min-width: 0; display: grid; }
.xp-panel { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: clamp(20px, 2.6vw, 32px); padding: clamp(16px, 2.2vw, 28px); }
.js .xp [role="tabpanel"]:not(.is-active) { display: grid; } /* core.css hides idle panels outright; here they stay in place, unseen */
.js .xp-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.js .xp-panel.is-active { opacity: 1; visibility: visible; transition: opacity .45s .08s; }

/* the window leans towards the pointer, catches the light, and a sheen crosses it when its tool comes up */
.xp-shot { perspective: 1400px; --glow: var(--acc); }
.xp-shot[data-glow]::before { inset: -6%; filter: blur(30px); } .xp-shot[data-glow]:hover::before { opacity: .35; }
.xp-shot .window { position: relative; border-radius: var(--r-md); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 44px 70px -34px rgba(0, 0, 0, .75);
  transform: rotateX(calc(var(--ty, 0) * -5deg)) rotateY(calc(var(--tx, 0) * 6deg)); transition: transform .4s var(--ease), translate .8s var(--ease), scale .8s var(--ease), box-shadow .7s; }
.js .xp-panel .window { translate: 0 24px; scale: .965; } .js .xp-panel.is-active .window { translate: none; scale: 1; }
.xp-shot .win-bar { background: var(--ink-2); } .xp-shot .win-bar img { flex: none; } .xp-shot .win-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-shot .window::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%); transform: translateX(-130%); }
.xp-panel.is-active .window::before { animation: xp-sheen 1.2s var(--ease) .2s both; } @keyframes xp-sheen { to { transform: translateX(130%); } }
.xp-shot .window::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .3), transparent 62%); mix-blend-mode: soft-light; opacity: 0; transition: opacity .4s; }
.xp-shot:hover .window::after { opacity: 1; }
.xp-shot .shot { aspect-ratio: 16 / 10; } .xp-shot .shot img { aspect-ratio: 16 / 10; }
/* an idle tool's screenshot is not fetched until its turn (fx.js fetches the next one ahead of the tour) */
.js .xp-panel .shot img { transition: display 0s .3s allow-discrete; } .js .xp-panel:not(.is-active) .shot img { display: none; }

/* the words arrive one line after another */
.xp-info { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 48px); align-items: start; padding: 0 clamp(4px, 1vw, 12px) clamp(6px, 1vw, 12px); }
.xp-copy { display: grid; gap: 10px; }
.xp-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .88rem; color: #C6B8D8; }
.xp-stage b { padding: 3px 10px; border-radius: 8px; background: var(--acc); color: var(--ink); font: 500 .75rem var(--mono); }
.xp-copy h3 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); letter-spacing: -0.04em; }
.xp .tline { font: 600 1.05rem/1.35 var(--display); letter-spacing: -0.015em; color: var(--acc); }
.xp-copy p:last-child { color: #D9CCE8; }
.xp-info .ticks { padding-top: 6px; color: #EDE4F7; } .xp-info .ticks .ic { background: rgba(255, 255, 255, .1); color: var(--acc); }
.js .xp-panel .xp-copy > *, .js .xp-panel .ticks li { opacity: 0; transform: translateY(16px); }
.js .xp-panel.is-active .xp-copy > *, .js .xp-panel.is-active .ticks li { opacity: 1; transform: none; transition: opacity .6s var(--ease) calc(.14s + var(--k, 0) * 70ms), transform .8s var(--ease) calc(.14s + var(--k, 0) * 70ms); }
.xp-copy > :nth-child(2) { --k: 1; } .xp-copy > :nth-child(3) { --k: 2; } .xp-copy > :nth-child(4) { --k: 3; }
.xp-info .ticks li:nth-child(1) { --k: 3; } .xp-info .ticks li:nth-child(2) { --k: 4; } .xp-info .ticks li:nth-child(3) { --k: 5; } .xp-info .ticks li:nth-child(4) { --k: 6; }

/* export preview: what a saved file looks like */
.sheetprev { display: grid; gap: 14px; padding: clamp(16px, 2.4vw, 28px); border-radius: var(--r-md); background: var(--bg); box-shadow: 0 0 0 1px var(--line); color: var(--ink); }
.xp-shot .sheetprev { border-radius: 0; box-shadow: none; align-content: center; }
.sheet-name { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.sheet-name b { font: 500 .95rem var(--mono); } .sheet-name span { font-size: .84rem; color: var(--mute); }
.sheetprev table { min-width: 540px; background: var(--white); border-radius: var(--r-sm); overflow: hidden; }
.sheetprev th, .sheetprev td { padding: 11px 14px; text-align: left; font-size: .86rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sheetprev tbody tr:last-child td { border-bottom: 0; }
.sheetprev th { background: var(--mint); font: 600 .78rem var(--display); color: #2F4A3E; }
.sheetprev td:nth-child(2), .sheetprev td:nth-child(5) { font-family: var(--mono); font-size: .82rem; } .sheetprev td:last-child { color: var(--human); font-weight: 600; }
.sheetprev .fine { margin-top: 0; }
@media (min-width: 641px) { .xp-shot .sheetprev { aspect-ratio: 16 / 10; } }

/* sliders (the earnings calculator) */
.slider { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; } .slider span { display: flex; justify-content: space-between; align-items: baseline; }
.slider output { font: 500 1rem var(--mono); }

@media (max-width: 1000px) {
  .xp { grid-template-columns: minmax(0, 1fr); }
  .xp-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .xp-tabs { flex: 1 1 100%; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 10px; } .xp-tabs::before { display: none; }
  .xp-tabs button { flex: none; grid-template-columns: 26px auto; gap: 8px; height: 44px; padding: 0 14px 0 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); } .xp-tabs kbd { height: 26px; border-radius: 50%; }
  .xp-tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px var(--acc); } .xp-tabs button::after { left: 18px; right: 18px; bottom: 3px; }
  .xp-meta { flex: 1; margin: 0; padding: 0 6px; border-top: 0; } .xp-stages { display: none; } .xp-count b { font-size: 2.2rem; } .xp-tour { margin: 0; }
  .xp-info { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .xp, .card { border-radius: var(--r-lg); }
  .xp-shot .shot { aspect-ratio: auto; min-height: 400px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; } .xp-shot .shot img { width: 640px; max-width: none; }
  .xp-shot:has(.shot)::after { content: "Swipe sideways to see the whole screen"; display: block; margin-top: 10px; font: 500 .75rem var(--mono); color: #C6B8D8; }
}
