/* XV Congresso de Guardas · Programação para inscritos. Carregar depois de styles.css (tokens, .brand, .btn-gold/.btn-blue/.btn-light, .wa-float). */
:root { --pg-head: 68px; }
html { scroll-padding-top: calc(var(--pg-head) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.pg {
  --f-title: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --sh: 0 2px 6px rgba(11, 31, 75, .05), 0 18px 40px -24px rgba(11, 31, 75, .3);
  --sh-hi: 0 4px 10px rgba(11, 31, 75, .07), 0 26px 50px -26px rgba(11, 31, 75, .42);
  --gold-ink: #8a5a08;
  background: var(--surface); overflow-x: clip;
}
.pg [hidden] { display: none !important; }
.pg :is(h1, h2, h3) { font-family: var(--f-title); font-weight: 800; letter-spacing: -.035em; color: var(--navy); }
.pg h3 { font-weight: 700; letter-spacing: -.02em; }
.pg .ph { filter: saturate(1.15) contrast(1.04); }
.pg .apr { color: var(--gold-ink); background: var(--gold-soft); border-radius: 5px; padding: 0 5px; font-weight: 700; font-size: .92em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lnk { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; border: 0; background: none; color: var(--navy); font-size: .8125rem; font-weight: 700; cursor: pointer; }
.lnk:hover { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- cabeçalho enxuto ---------- */
.pg-header { position: sticky; top: 0; z-index: 40; background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.pg-header :focus-visible { outline-color: var(--gold-hi); }
.pg-header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--pg-head); }
.pg-header .brand img { width: 48px; }
.pg-header .brand-name { font-family: var(--f-title); font-size: 1.0625rem; letter-spacing: -.025em; }
.pg-header-act { display: flex; align-items: center; gap: 10px; }
.pg-header-act svg { transition: transform .25s var(--ease); }
.pg-header-act .btn:hover svg { transform: translateX(-3px); }
/* glow atrás do .btn-gold mais suave (rodada 9), igual ao lp.css: ~metade da opacidade, raio menor, pulso sutil; cor intacta */
.btn-gold { --o: .22; --o2: .17; --r: 22px;
  box-shadow: 0 calc(4px + var(--h) * 2px) calc(14px + var(--h) * 3px) rgba(var(--sh), calc(var(--o) + var(--t) * .025)),
              0 0 calc(var(--r) + var(--t) * 2px + var(--h) * 4px) rgba(255, 199, 44, calc(var(--o2) + var(--t) * .025)); }
:is(.dark, .royal, .site-header, .page-hero, .xv-hero, .xv-band, .next-ed, .xv-card, .tier.is-master, .site-footer, .numbers, .mobile-panel, .pg-header) .btn-gold { --o: .27; --o2: .22; --r: 28px; }

/* ---------- abertura curta ---------- */
.pg-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; padding-block: clamp(40px, 6vw, 72px) clamp(84px, 9vw, 112px); }
.pg-hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: .6; }
.pg-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 31, 75, .97) 0%, rgba(11, 31, 75, .9) 48%, rgba(11, 31, 75, .6) 100%); }
.pg-eyebrow { max-width: 52ch; margin-bottom: 14px; color: var(--on-dark-2); font-size: .9375rem; font-weight: 600; }
.pg-hero h1 { max-width: 15ch; color: #fff; font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.02; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 22px 0 0; padding: 0; list-style: none; font-weight: 600; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { color: var(--gold-hi); flex: none; }
.pg-header-act .btn { white-space: nowrap; }
.pg-seal { display: inline-block; margin-top: 24px; padding: 8px 16px; border-radius: 999px; background: rgba(251, 201, 31, .14); box-shadow: inset 0 0 0 1px rgba(251, 201, 31, .32); color: #fff; font-size: .9375rem; font-weight: 600; }
.pg-seal b { color: #fff; }
.pg-seal .dot { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--gold-hi); vertical-align: .08em; }
.pg-warn { max-width: 66ch; margin-top: 14px; color: var(--on-dark-2); font-size: .9375rem; }
.pg-hero .apr { color: #ffe08a; background: rgba(251, 201, 31, .14); }

/* ---------- filtros ---------- */
.pg-body { padding-bottom: clamp(72px, 9vw, 120px); outline: none; }
.pg-tools { position: relative; z-index: 2; display: grid; gap: 14px; margin-top: -56px; padding: clamp(16px, 2vw, 22px); border-radius: 18px; background: #fff; box-shadow: var(--sh-hi); }
.pg-days { display: flex; gap: 8px; }
.day { flex: 1 1 0; min-width: 0; display: grid; gap: 2px; padding: 12px 16px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink-2); text-align: left; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); }
.day b { font: 800 1.0625rem/1.15 var(--f-title); letter-spacing: -.02em; color: var(--navy); }
.day small { font-size: .78rem; font-weight: 600; }
.day:hover { background: var(--blue-100); }
.day[aria-pressed="true"] { background: var(--navy); color: #fff; }
.day[aria-pressed="true"] b { color: #fff; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.agchip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .875rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.agchip i { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--navy)); flex: none; }
.agchip small { font-size: .75rem; color: var(--ink-2); }
.agchip:hover { border-color: var(--blue-200); }
.agchip[aria-pressed="true"] { background: var(--c, var(--navy)); color: #fff; }
.agchip[aria-pressed="true"] i { background: #fff; }
.agchip[aria-pressed="true"] small { color: rgba(255, 255, 255, .82); }
.pg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.srch { position: relative; flex: 1 1 260px; }
.srch svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.srch input, .sel select { width: 100%; height: 46px; border: 1px solid #d3dbea; border-radius: 12px; background: #fff; font: inherit; font-size: .9375rem; color: var(--ink); }
.srch input { padding: 0 14px 0 42px; }
.sel { flex: 0 1 220px; }
.sel select { padding: 0 36px 0 14px; appearance: none; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2347557a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.srch input:focus-visible, .sel select:focus-visible { outline: 2px solid var(--royal); outline-offset: 1px; border-color: transparent; }
.pg-row .btn { min-height: 46px; }
.pg-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .875rem; font-weight: 600; color: var(--ink-2); }

/* ---------- agora / a seguir (demonstração fora do evento) ---------- */
.pg-now { margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: #fff; box-shadow: var(--sh); }
.pg-now-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .875rem; color: var(--ink-2); }
.pg-now-h b { font-family: var(--f-title); font-size: 1.0625rem; letter-spacing: -.02em; color: var(--navy); }
.pg-now-h .demo { flex-basis: 100%; font-size: .8125rem; }
.pg-now .dot, .badge.live::before { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(35, 116, 75, .5); animation: pg-live 2s ease-out infinite; flex: none; }
@keyframes pg-live { 70%, 100% { box-shadow: 0 0 0 8px rgba(35, 116, 75, 0); } }
.pg-now-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 28px; margin-top: 14px; }
.pg-now h3 { margin-bottom: 6px; font-size: .8125rem; font-weight: 700; letter-spacing: 0; color: var(--ink-2); }
.pg-now ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.pg-now li button { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.pg-now li button:hover { background: var(--surface); }
.pg-now li .num { grid-row: span 2; font-size: .8125rem; font-weight: 700; color: var(--navy); }
.pg-now li b { font-size: .9rem; line-height: 1.3; color: var(--ink); }
.pg-now li small { font-size: .78rem; color: var(--ink-2); }

/* ---------- cronologia ---------- */
.pg-day { margin-top: clamp(40px, 5vw, 64px); }
.pg-day-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 22px; }
.pg-day-h h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.05; }
.pg-day-h h2::before { content: ""; display: block; width: 48px; height: 4px; margin-bottom: 16px; border-radius: 4px; background: linear-gradient(90deg, #f6b324, #fbc91f 55%, #eba70b); }
.pg-day-h p { font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.slot { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; }
.slot + .slot, .pg-nowline + .slot { margin-top: 26px; }
.slot-t { position: sticky; top: calc(var(--pg-head) + 18px); align-self: start; }
.slot-t b { display: block; font: 800 1.5rem/1 var(--f-title); letter-spacing: -.03em; color: var(--navy); }
.slot-t small { display: block; margin-top: 6px; font-size: .75rem; font-weight: 700; color: var(--gold-ink); }
/* sessões no mesmo horário ficam na mesma linha; com 3+ o trilho rola/arrasta para a direita (programacao.js) e a
   borda com mais itens ganha a sombra clara da faixa de logos. Sem setas nem barra. 2 cards inteiros + parte do 3º. */
.slot-c { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scroll-padding-inline: 16px; scrollbar-width: none;
  padding: 6px 16px 26px; margin: -6px -16px -26px; --fl: 0%; --fr: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 var(--fr), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 var(--fr), transparent); }
.slot-c::-webkit-scrollbar { display: none; }
.slot-c.fl { --fl: 8%; }
.slot-c.fr { --fr: 92%; }
.slot-c:is(.fl, .fr) { cursor: grab; }
.slot-c.is-drag { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.slot-c > .sess { flex: 0 0 max(272px, calc((100% - 24px) / 2.3)); scroll-snap-align: start; }
.slot-c > .sess:only-child { flex-basis: 100%; }
.slot-c > .sess:first-child:nth-last-child(2), .slot-c > .sess:first-child:nth-last-child(2) + .sess { flex-basis: max(272px, calc((100% - 12px) / 2)); }
.slot-c:has(> .sess + .sess) > .sess { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.slot-c:has(> .sess + .sess) .sess-img { aspect-ratio: 16 / 7; }
.pg-nowline { display: flex; align-items: center; gap: 12px; margin: 26px 0 0 116px; color: #1d6340; font-size: .8125rem; font-weight: 700; }
.pg-nowline span { padding: 3px 10px; border-radius: 999px; background: var(--green); color: #fff; white-space: nowrap; }
.pg-nowline::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--green), rgba(35, 116, 75, 0)); }

.sess { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); border-radius: 16px; background: #fff; box-shadow: var(--sh); overflow: hidden; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.sess.no-img { grid-template-columns: minmax(0, 1fr); }
.sess:hover { box-shadow: var(--sh-hi); }
.sess.is-live { box-shadow: var(--sh), 0 0 0 2px rgba(35, 116, 75, .28); }
.sess.flash { animation: pg-flash 1.6s var(--ease); }
@keyframes pg-flash { 0%, 40% { box-shadow: var(--sh), 0 0 0 4px rgba(251, 201, 31, .7); } }
.sess-img { position: relative; overflow: hidden; background: var(--navy-3); }
.sess-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.sess:hover .sess-img img { transform: scale(1.05); }
.sess-b { display: grid; gap: 8px; align-content: start; padding: 16px 20px; }
.sess-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.trk { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--c, var(--royal)); color: #fff; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.trk::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: currentColor; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; font-size: .75rem; font-weight: 700; }
.badge.live { background: var(--green); color: #fff; }
.badge.live::before { content: ""; width: 7px; height: 7px; background: #fff; }
.badge.soon { background: var(--royal); color: #fff; }
.sess-when { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.sess-when b { color: var(--navy); }
.sess h3 { font-size: 1.125rem; line-height: 1.25; }
.sess-desc { font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.who { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 4px 0 0; padding: 0; list-style: none; }
.who button { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.who .av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #24407e, #0d1f4a); flex: none; }
.who .av :is(svg, img) { width: 100%; height: 100%; object-fit: cover; }
.who-t { display: grid; line-height: 1.25; }
.who-t b { font-size: .875rem; color: var(--navy); }
.who-t small { max-width: 30ch; font-size: .78rem; color: var(--ink-2); }
.who button:hover b { color: var(--royal); text-decoration: underline; text-underline-offset: .2em; }
@media (min-width: 1180px) {
  .sess { grid-template-columns: 150px minmax(0, 1fr); }
}
.pg-empty { margin-top: 32px; padding: 48px 24px; border-radius: 16px; background: #fff; box-shadow: var(--sh); text-align: center; color: var(--ink-2); }
.pg-empty p { margin-bottom: 14px; }
.print-h { display: none; }

/* ---------- entrada (uma vez) ---------- */
.js .rv { opacity: 0; transform: translateY(16px); }
.rv.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--k, 0) * 60ms); }

@media (max-width: 760px) {
  :root { --pg-head: 64px; }
  .x-lg { display: none; }
  .pg-hero-bg { opacity: .3; }
  .pg-hero::before { background: linear-gradient(180deg, rgba(11, 31, 75, .94), rgba(11, 31, 75, .86)); }
  .pg-header .brand { gap: 10px; }
  .pg-header .brand img { width: 40px; }
  .pg-header .brand-name { max-width: 7.5em; font-size: .9375rem; line-height: 1.1; }
  .pg-header-act { gap: 8px; }
  .pg-header-act .btn { padding-inline: 12px; }
  .pg-seal { border-radius: 14px; font-size: .875rem; }
  .pg-tools { margin-top: -48px; }
  .day { padding: 10px 12px; }
  .day b { font-size: .9375rem; }
  .pg-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * clamp(16px, 2vw, 22px)); padding: 2px clamp(16px, 2vw, 22px) 4px; scrollbar-width: none; }
  .pg-chips::-webkit-scrollbar { display: none; }
  .pg-chips.is-drag { cursor: grabbing; user-select: none; }
  .agchip { flex: none; }
  .srch { flex-basis: 100%; }
  .sel { flex: 1 1 150px; }
  .pg-row .btn { flex: 1 1 100%; }
  .slot { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .slot-t { position: static; display: flex; align-items: baseline; gap: 10px; }
  .slot-t small { margin: 0; }
  .pg-nowline { margin-left: 0; }
  .sess { grid-template-columns: minmax(0, 1fr); }
  .sess-img { aspect-ratio: 16 / 6; }
  .sess-b { padding: 14px 16px 14px; gap: 6px; }
  .sess h3 { font-size: 1.03rem; }
  .sess-desc { font-size: .875rem; }
  .who .av { width: 32px; height: 32px; }
  .pg-now li button { grid-template-columns: 1fr; }
  .pg-now li .num { grid-row: auto; }
}
@media (max-width: 380px) {
  .pg-header .brand-name { font-size: .875rem; }
}
/* celular: sem barra de rolagem visível; a rolagem continua (toque, roda, Shift+roda) */
@media (max-width: 640px) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .rv, .rv.in { opacity: 1; transform: none; transition: none; }
  .sess, .sess-img img, .pg-header-act svg { transition: none; }
  .sess:hover .sess-img img { transform: none; }
  .sess.flash, .pg-now .dot, .badge.live::before { animation: none; }
}

/* ---------- impressão / PDF: só a grade, limpa ---------- */
@media print {
  @page { margin: 14mm 12mm; }
  .pg { background: #fff; font-size: 10.5pt; }
  .pg-header, .skip, .pg-hero-bg, .pg-tools, .pg-now, .pg-nowline, .wa-float, #rodape-padrao, .sess-img, .badge, .who .av { display: none !important; }
  .pg-hero { padding: 0 0 4mm; background: none; color: #222; }
  .pg-hero::before { display: none; }
  .pg-hero .wrap, .pg-body .wrap { padding-inline: 0; max-width: none; }
  .pg-hero h1 { max-width: none; color: var(--navy); font-size: 22pt; }
  .pg-eyebrow, .pg-warn, .facts { color: #333; }
  .facts svg { color: #333; }
  .pg-seal { margin-top: 3mm; padding: 0; background: none; box-shadow: none; color: #333; }
  .pg-seal b { color: #000; }
  .pg-seal .dot { display: none; }
  .pg-hero .apr, .pg .apr { background: none; color: #000; padding: 0; }
  .print-h { display: block; margin: 0 0 2mm; padding: 2mm 0; border-top: .5pt solid #bbb; border-bottom: .5pt solid #bbb; font-size: 9.5pt; font-weight: 600; color: #333; }
  .rv, .js .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pg-day { margin-top: 6mm; }
  .pg-day + .pg-day { break-before: page; }
  .pg-day-h { margin-bottom: 3mm; }
  .pg-day-h h2 { font-size: 16pt; }
  .pg-day-h h2::before { display: none; }
  .slot { grid-template-columns: 18mm minmax(0, 1fr); gap: 4mm; }
  .slot + .slot { margin-top: 3mm; }
  .slot-t { position: static; }
  .slot-t b { font-size: 12pt; }
  .slot-c { display: grid; gap: 2mm; overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .sess, .sess.no-img { display: block; box-shadow: none !important; border: .5pt solid #ccd3e0; border-radius: 3mm; break-inside: avoid; animation: none !important; }
  .sess-b { padding: 2.5mm 3.5mm; gap: 1mm; }
  .sess h3 { font-size: 11pt; }
  .sess-desc, .sess-when { font-size: 9pt; }
  .trk { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .slot-c { grid-template-columns: minmax(0, 1fr); }
  .who { gap: 1mm 6mm; }
  .who button { color: inherit; }
}
