/* Community (/community, /tools, /widget, /discord and /partners): the widget, the Discord bot and the partners, three tabs under one hero.
   Foundation in bf.css, shared page parts in pages.css. The class prefix tl- (from the page's earlier name) is kept; pt-* are the partner cards. */
.tl-hero { --art-pos: center 62%; padding-bottom: clamp(88px, 11vw, 120px); }
.tl-body { padding-top: 0; }
.tl-root code, .tl-prod code { padding: 1px 6px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--cyan-hi); }

/* ---- the hero's primary button: the invitation to the community Discord (site_v2_links.py). The logo takes the button's own colour on the cyan fill. */
.tl-join .bf-discord__logo { width: 22px; height: 22px; }

/* ---- choosers (they are the tabs) */
.tl-choosers { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin-top: -64px; }
.tl-choose { display: flex; align-items: center; gap: 18px; width: 100%; padding: 20px 22px; text-align: left; color: var(--text); cursor: pointer; background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.tl-choose, .tl-choose:hover { text-decoration: none; color: var(--text); }   /* the choosers are links (they work without a script) */
/* three choosers side by side: the icon above the text (a.bf-card sets display:block, so the flex layout is restated for the link) */
a.tl-choose { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.tl-choose:hover { border-color: var(--cyan-lo); transform: translateY(-2px); }
.tl-choose:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.tl-choose--partners .tl-choose__ico { background: var(--red); color: var(--bg); }
.tl-choose[aria-selected="true"] { border-color: var(--cyan); box-shadow: 0 0 36px rgba(60,198,244,.2), var(--glow); }
.tl-choose[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--cyan); box-shadow: 0 0 14px rgba(60,198,244,.7); }
.tl-choose__ico { display: grid; place-items: center; flex: none; width: 60px; height: 60px; background: var(--cyan); color: var(--on-cyan); clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px); }
.tl-choose--discord .tl-choose__ico { background: var(--amber); color: var(--on-amber); }
.tl-choose__ico svg { width: 32px; height: 32px; }
.tl-choose__t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tl-choose__t b { font: 700 clamp(1.25rem, 1.05rem + .7vw, 1.6rem)/1.15 var(--display); }
.tl-choose__t span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.tl-choose__go { margin-left: auto; flex: none; font: 600 13px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.tl-choose__go::after { content: "\2192"; margin-left: 8px; }
.tl-choose[aria-selected="true"] .tl-choose__go { color: var(--cyan-hi); }
.tl-choose__go { margin: auto 0 0; }      /* the cue sits under the text, at the foot of the card */
.tl-panel { padding-top: var(--s-7); }
.tl-panel:focus { outline: none; }

/* ---- product hero */
.tl-prod { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.tl-prod__txt .bf-lead { margin-top: var(--s-3); }
.tl-prod__list { margin-top: var(--s-4); }
.tl-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.tl-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-5); margin-top: var(--s-5); }
.tl-facts li { display: flex; flex-direction: column; gap: 2px; padding: 11px 0; border-top: 1px solid var(--line); }
.tl-facts b { font: 600 15px/1.3 var(--body); color: var(--text); }
.tl-facts a { color: var(--cyan-hi); text-underline-offset: 3px; } .tl-facts a b { color: inherit; }
.tl-facts span { font-size: 13px; color: var(--muted); }
.tl-note { margin-top: var(--s-5); }
.tl-shot { margin: 0; position: sticky; top: calc(var(--header-h) + 20px); }
.tl-shot__stage { position: relative; border: 1px solid var(--line-3); background: #08121b; box-shadow: 0 28px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(60,198,244,.08); }
.tl-shot__stage::before { content: ""; position: absolute; inset: -1px; z-index: 2; pointer-events: none; background: linear-gradient(var(--cyan), var(--cyan)) top left/18px 2px no-repeat, linear-gradient(var(--cyan), var(--cyan)) top left/2px 18px no-repeat, linear-gradient(var(--line-3), var(--line-3)) bottom right/18px 2px no-repeat, linear-gradient(var(--line-3), var(--line-3)) bottom right/2px 18px no-repeat; }
.tl-shot__stage > img { display: block; width: 100%; height: auto; }
.tl-shot figcaption { margin-top: 10px; }
.tl-shot figcaption a { color: var(--cyan-hi); }
.tl-pin { position: absolute; z-index: 3; left: var(--x); top: var(--y); width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: none; cursor: pointer; }
.tl-pin span { position: absolute; inset: 7px; display: grid; place-items: center; background: var(--amber); color: var(--on-amber); font: 700 15px/1 var(--display); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); box-shadow: 0 0 0 3px rgba(6,10,16,.7); transition: transform .2s var(--ease), background .2s; }
.tl-pin::before { content: ""; position: absolute; inset: 3px; border: 2px solid var(--amber); opacity: .55; animation: bf-ping 2.8s ease-out infinite; pointer-events: none; }
.tl-pin.is-on span, .tl-pin:hover span, .tl-pin:focus-visible span { background: var(--cyan-hi); transform: scale(1.22); }
.tl-pin:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- legend */
.tl-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.tl-legend li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--panel); border: 1px solid var(--line-2); transition: border-color .2s, background .2s; }
.tl-legend li.is-on { border-color: var(--cyan); background: linear-gradient(180deg, var(--cyan-tint), var(--panel)); }
.tl-n { display: grid; place-items: center; flex: none; width: 36px; height: 36px; background: var(--amber); color: var(--on-amber); font: 700 17px/1 var(--display); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.tl-legend li.is-on .tl-n { background: var(--cyan-hi); color: var(--on-cyan); }
.tl-legend h3 { font: 700 18px/1.25 var(--display); }
.tl-legend p { margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--text-2); }

/* ---- two columns: aside plus stepper */
.tl-two { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.tl-two__aside { position: sticky; top: calc(var(--header-h) + 20px); }
.tl-two__aside .bf-caption { margin-top: var(--s-3); }
.tl-perms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tl-acc { display: flex; flex-direction: column; }
.tl-grouph { margin: var(--s-5) 0 var(--s-3); font: 700 13px/1.3 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.tl-grouph:first-child { margin-top: 0; }
.tl-faqgroups .pg-acc[hidden] { display: none; }
.tl-faqgroups .pg-acc.is-hit { border-color: var(--cyan-lo); }
.tl-noresult { margin-top: var(--s-4); padding: var(--s-4); border: 1px dashed var(--line-3); color: var(--muted); }
.tl-help .bf-sh { align-items: flex-end; }
#help .bf-sh { flex-wrap: wrap; }
#help .pg-search { flex: 1 1 280px; max-width: 360px; }
.tl-links .bf-btn { white-space: normal; }
.tl-bottomcta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.tl-bottomcta .bf-h3 { margin-bottom: 4px; }

/* ---- Discord: command picker sketch */
.tl-palette { margin: 0; position: sticky; top: calc(var(--header-h) + 20px); }
.tl-palette__bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--panel-3); border: 1px solid var(--line-3); border-bottom: 0; }
.tl-palette__plus { display: grid; place-items: center; flex: none; width: 30px; height: 30px; background: var(--panel); border: 1px solid var(--line-3); color: var(--muted); font: 700 18px/1 var(--mono); }
.tl-palette__in { min-width: 0; font: 500 14px/1.5 var(--mono); color: var(--text-2); overflow-wrap: anywhere; }
.tl-palette__in b { color: var(--cyan-hi); font-weight: 600; }
.tl-palette__in i { font-style: normal; color: #fff; padding: 1px 6px; background: var(--cyan-tint); border: 1px solid var(--cyan-lo); }
.tl-palette__in span { color: var(--muted); } .tl-palette__in em { font-style: normal; color: var(--amber-hi); }
.tl-palette__list { background: var(--panel); border: 1px solid var(--line-3); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.tl-palette__list li { display: flex; flex-direction: column; gap: 2px; padding: 11px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.tl-palette__list li b { font: 600 14px/1.3 var(--mono); color: var(--text); }
.tl-palette__list li span { font-size: 13px; line-height: 1.35; color: var(--muted); }
.tl-palette__list li.is-on { background: linear-gradient(90deg, rgba(60,198,244,.14), rgba(60,198,244,.02)); border-left-color: var(--cyan); }
.tl-palette__list li.is-on b { color: var(--cyan-hi); }
.tl-palette__more { background: var(--bg-2); } .tl-palette__more span { font-style: italic; }
.tl-palette figcaption { margin-top: 10px; }

/* ---- commands */
.tl-cmdnav { margin-top: 0; }
.tl-cmds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.tl-cmd { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.tl-cmd[data-group="player"] { --gc: var(--cyan); } .tl-cmd[data-group="quiz"] { --gc: var(--amber); } .tl-cmd[data-group="race"] { --gc: var(--red); } .tl-cmd[data-group="help"] { --gc: var(--silver); }
.tl-cmd__g { align-self: flex-start; padding: 3px 10px; border: 1px solid color-mix(in srgb, var(--gc) 50%, #000); background: color-mix(in srgb, var(--gc) 12%, var(--panel-2)); color: var(--gc); font: 700 12px/1.3 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.tl-cmd__n { font: 700 22px/1.2 var(--display); color: #fff; }
.tl-cmd__n span { color: var(--muted); font-weight: 500; }
.tl-cmd__d { font-size: 14px; line-height: 1.55; color: var(--text-2); flex: 1; }
.tl-cmd__ex { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 8px 10px 8px 12px; border: 1px solid var(--line-3); background: var(--bg-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.tl-cmd__ex:hover { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 8%, var(--bg-2)); }
.tl-cmd__ex code { min-width: 0; padding: 0; border: 0; background: none; font: 500 12.5px/1.45 var(--mono); color: var(--cyan-hi); overflow-wrap: anywhere; }
.tl-cmd__ex span { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tl-cmd__ex span svg { width: 14px; height: 14px; }
.tl-cmd__f { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-cmd__f small { font: 600 12px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-right: 4px; }
.tl-req, .tl-opt, .tl-none { padding: 2px 8px; border: 1px solid var(--line-3); background: var(--panel-2); font: 500 12px/1.4 var(--mono); color: var(--text); }
.tl-opt { border-style: dashed; color: var(--muted); }
.tl-none { color: var(--faint); border-style: dashed; }
span.tl-opt { display: inline; padding: 0 4px; font: 500 .92em var(--mono); }
.tl-quiz .bf-prose { max-width: none; }

@media (max-width: 1100px) {
  .tl-prod, .tl-two { grid-template-columns: minmax(0, 1fr); }
  .tl-shot, .tl-two__aside, .tl-palette { position: static; }
  .tl-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-cmds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tl-hero { padding-bottom: 76px; }
  .tl-join { max-width: 100%; padding-inline: 18px; white-space: normal; text-align: center; line-height: 1.25; }
  .tl-choosers { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: -52px; }
  a.tl-choose { flex-direction: row; align-items: center; padding: 14px; gap: 12px; }
  .tl-choose__ico { width: 48px; height: 48px; } .tl-choose__ico svg { width: 26px; height: 26px; }
  .tl-choose__go { display: none; }
  .tl-panel { padding-top: var(--s-6); }
  .tl-facts { grid-template-columns: minmax(0, 1fr); }
  .tl-cta .bf-btn { flex: 1 1 100%; }
  .tl-legend { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tl-cmds { grid-template-columns: minmax(0, 1fr); }
  .tl-bottomcta { flex-direction: column; align-items: flex-start; }
  .tl-pin span { inset: 9px; font-size: 14px; }
}

.tl-shot__scroll { margin-inline: 0; }
.tl-swipe { margin-bottom: 8px; }
@media (max-width: 760px) {
  .tl-shot__scroll { overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .tl-shot__stage { width: 780px; max-width: none; }
}

/* production addition: the beta notice of the widget guide, kept under the download buttons */
.tl-beta { margin-top: var(--s-3); max-width: 60ch; }
.tl-beta b { color: var(--text-2); }

/* ---- Partners tab (moved here from the old Partners page; partners_page.PARTNERS) */
.pt-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-4); align-items: stretch; }
.pt-card { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--s-5); align-items: center; overflow: hidden; }
.pt-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(255,107,91,.18), transparent 70%); pointer-events: none; }
.pt-card__img { display: block; width: 160px; height: 160px; object-fit: cover; border: 1px solid var(--line-3); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); box-shadow: 0 0 40px rgba(255,107,91,.2); }
.pt-card__body .bf-lead { margin-top: var(--s-2); font-size: 1.0625rem; }
.pt-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-5); }
.pt-join { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.pt-join .bf-btn { align-self: flex-start; }
/* production additions: more than one partner (partners_page.PARTNERS) puts the cards side by side and the join card under them */
.pt-grid--many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt-grid--many .pt-join { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .pt-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .pt-card { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); text-align: left; }
  .pt-card__img { width: 112px; height: 112px; }
}
