/* Local Poppins fonts match the posters and support Polish characters without network access. */
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/vendor/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/vendor/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/vendor/fonts/poppins-700.woff2") format("woff2");
}

/* The site uses charcoal and terminal green. The poster entry page uses separate Akamai colors. */
:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel-2: #1c232d;
  --line: #2a3340;
  --text: #e6edf3;
  --soft: #c7d3df;
  --muted: #92a0b0;
  --accent: #35d0a5;
  --accent-2: #ff7a45;
  --danger: #ff5f56;
  --shadow: #b48ead; /* Shadow ban: silently hide writing from other viewers. */
  --navy: #0a1a2f;   /* Darkened poster navy for the entry page. */
  --akamai: #00a4eb;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); }
code { background: var(--panel-2); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; overflow-x: auto; }
pre code { background: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--text); }
h1 { font-weight: 700; }

/* Use uppercase, spaced section headings from the poster; keep long titles in sentence case. */
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
h2.question, .next-up h2 { letter-spacing: normal; text-transform: none; }

/* --- layout ------------------------------------------------------------ */

.topbar {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #131923, var(--bg));
  position: sticky; top: 0; z-index: 10;
}
.brand { color: var(--text); font-family: var(--mono); font-weight: 700; letter-spacing: 0.04em; }
.brand:hover { text-decoration: none; }
.sev { color: var(--danger); }
.brand-sub { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
html { scroll-padding-top: var(--site-header-height, 80px); }
.topbar nav { display: flex; align-items: center; gap: .65rem 1.1rem; flex-wrap: wrap; }
.topbar nav a { color: var(--muted); font-size: 0.95rem; }
.topbar nav a:hover, .topbar nav a.on { color: var(--text); }

/* The live link becomes a pulsing dot during the lecture and expands on hover. */
.topbar nav a.livelink { display: inline-flex; align-items: center; color: var(--accent-2); }
.livelink .dot { display: none; }
/* Use enough specificity to retain the red live marker on the muted poster navigation. */
.topbar nav a.livelink.onair { color: var(--danger); padding: 0.1rem 0.4rem; border-radius: 999px; }
.topbar nav a.livelink.onair:hover { background: var(--danger); color: #1d0b09; text-decoration: none; }
.livelink.onair .dot {
  display: block; width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: currentColor; animation: blink 1.4s ease-in-out infinite;
}
.livelink.onair:hover .dot { animation: none; }
.livelink.onair .label {
  max-width: 0; margin-left: 0; opacity: 0; overflow: hidden; white-space: nowrap;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  transition: max-width 0.2s ease, margin-left 0.2s ease, opacity 0.2s ease;
}
.livelink.onair:hover .label, .livelink.onair:focus-visible .label {
  max-width: 4rem; margin-left: 0.4rem; opacity: 1;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
/* Respect reduced-motion preferences with a static live marker. */
@media (prefers-reduced-motion: reduce) {
  .livelink.onair .dot, .intro-live { animation: none; }
}

main { max-width: 1040px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* Page hierarchy stays close to the content, including on small screens. */
.breadcrumbs { margin-bottom: 1.5rem; color: var(--muted); font-size: .85rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .7rem; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: baseline; gap: .7rem; min-width: 0; overflow-wrap: anywhere; }
.breadcrumbs li + li::before { content: "/"; color: var(--muted); }
.breadcrumbs [aria-current="page"] { color: var(--soft); }
body.dc-page .breadcrumbs { max-width: 1480px; margin: 0 auto; padding: 1.25rem 24px 0; }

footer {
  max-width: 1040px; margin: 0 auto; padding: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}

section { margin-bottom: 3rem; }
.two-col { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; }
.two-col.single-col { grid-template-columns: 1fr; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* --- text --------------------------------------------------------------- */

/* The poster kicker uses widely spaced uppercase lettering. */
.kicker { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em;
          text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 0.6rem; }
.lead { font-size: 1.1rem; color: var(--soft); max-width: 62ch; }
.hero.promo .lead { max-width: none; }
.hero.promo .cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.speaker-list { list-style: none; margin: 0; padding: 0; }
.speaker-list li { padding: .65rem 0; }
.speaker-list li + li { border-top: 1px solid var(--line); }
.speaker-list li:first-child { padding-top: 0; }
.speaker-list li:last-child { padding-bottom: 0; }
.speaker-list h3 { margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.35; }
.speaker-list p { margin: .15rem 0 0; color: var(--soft); font-size: .9rem; }
.speaker-affiliation { margin: 1rem 0 0; color: var(--muted); font-size: .9rem; }
.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: 0.85rem; display: flex; gap: 0.4rem;
        flex-wrap: wrap; align-items: center; }
.callout { border-left: 3px solid var(--accent); background: var(--panel);
           padding: 0.9rem 1.1rem; border-radius: 0 8px 8px 0; }
.prose { max-width: 72ch; }
.prose img { max-width: 100%; }
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.4rem 0.7rem; }
.prose blockquote { border-left: 3px solid var(--line); margin-left: 0; padding-left: 1rem; color: var(--muted); }

/* --- buttons and chips --------------------------------------------------- */

.btn {
  display: inline-block; padding: 0.55rem 1rem; margin: 0 0.4rem 0.4rem 0;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font-size: 0.95rem; cursor: pointer;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: #06231b; border-color: var(--accent); font-weight: 600; }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn.tiny { padding: 0.2rem 0.5rem; font-size: 0.75rem; }
.hero-actions { margin-top: 1.4rem; }

.chip {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem;
  padding: 0.15rem 0.5rem; margin-right: 0.35rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
}
a.chip:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.chip.poll { border-color: var(--accent-2); color: var(--accent-2); }
.chip.task { border-color: var(--accent); color: var(--accent); }
.chip.done { border-color: var(--accent); color: var(--accent); }
/* Presenter-only styling; audience templates do not render these controls. */
.chip.shadow { border-color: var(--shadow); color: var(--shadow); }

.tag { font-family: var(--mono); font-size: 0.72rem; padding: 0.15rem 0.5rem;
       border-radius: 4px; background: var(--panel-2); color: var(--muted); }
.tag.easy { color: var(--accent); }
.tag.medium { color: #ffd166; }
.tag.hard { color: var(--accent-2); }

.status { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.status.next { color: var(--accent-2); }
.status.completed { color: var(--accent); }

/* --- poster entry page --- */

/* Use a darker navy for screens and replace the accent with Akamai blue on the poster page. */
body.bare {
  --accent: var(--akamai);
  background: var(--navy);
  min-height: 100vh;
}
body.bare .topbar.clean {
  background: none; border: none; position: static;
}
/* Keep navigation in the background so it does not compete with the title. */
body.bare .topbar.clean .brand-sub,
body.bare .topbar.clean nav a { color: #6c8199; }
body.bare .topbar.clean nav a:hover { color: var(--text); }
body.bare main { max-width: none; padding: 0; }

.intro {
  --intro-gutter: clamp(1.5rem, 5vw, 4rem);
  --intro-gap: clamp(2rem, 7vw, 7rem);
  --intro-deal-width: min(460px, 40vw, 35vh);
  --intro-deal-offset-y: 50px;
  --intro-safe-shift: max(0px, calc(
    max(0px, 50vw - 38rem) + var(--intro-gutter)
    + max(0px, calc((min(100vw, 76rem) - var(--intro-gutter) - var(--intro-gutter)
      - 36rem - var(--intro-deal-width) - var(--intro-gap)) / 2))
    - 1.375rem
  ));
  position: relative; max-width: 76rem; min-height: calc(100vh - 4.5rem); margin: 0 auto;
  padding: clamp(2rem, 7vh, 5rem) var(--intro-gutter);
  display: grid; grid-template-columns: fit-content(36rem) fit-content(28rem);
  grid-template-rows: auto 1fr; justify-content: center;
  gap: var(--intro-gap); align-items: center;
  text-align: left;
}
.intro-visual { grid-column: 1; grid-row: 2; }
.intro .kicker { color: var(--text); margin-bottom: 1.6rem; }
.intro h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); margin: 0; max-width: 12em; }
.intro-logo { display: block; width: min(420px, 100%); height: auto; margin: -210px 0 4rem; }
.intro-deal { display: block; width: min(460px, 40vw); height: auto; margin: 2rem 0 0;
              transform: rotate(25deg); box-shadow: 0 18px 38px rgb(0 0 0 / 32%); }
.intro-info { grid-column: 2; grid-row: 2; width: fit-content; max-width: 100%; }
.intro-live-slot { display: flex; justify-content: flex-end; margin-bottom: 0.35rem; }
.intro-live {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.28rem 0.65rem 0.28rem 0.75rem;
  border: 1px solid currentColor; border-radius: 999px;
  color: var(--danger); font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.16em; line-height: 1; text-transform: uppercase;
  animation: blink 1.4s ease-in-out infinite; transition: background-color 0.2s ease, color 0.2s ease;
}
.intro-live:hover, .intro-live:focus-visible {
  background: var(--danger); color: #1d0b09; text-decoration: none;
}
.intro-live-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: currentColor; }
.intro .topics { margin: 0 0 2rem; }
.intro .where { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.06em;
                margin: 1.4rem 0 0; }
.intro .where + .where { margin-top: 0; }
.intro-go { margin-top: 2rem; }
.intro-go .btn { padding: 0.8rem 1.6rem; letter-spacing: 0.04em; }

/* Stack poster dates with widely spaced digits. */
.dates { list-style: none; padding: 0; margin: 0; }
.dates li { font-size: clamp(1.3rem, 4vw, 1.9rem); letter-spacing: 0.1em;
            color: var(--soft); margin-bottom: 0.3rem; }
.dates li.past { color: var(--muted); text-decoration: line-through; }

/* --- lecture series poster --- */

/* Highlight the upcoming lecture date for visitors arriving through the poster QR code. */
.next-up {
  max-width: 62ch; margin: 1.6rem 0 1.2rem; padding: 1.1rem 1.3rem;
  border: 1px solid var(--accent-2); border-radius: 12px; background: var(--panel);
}
.next-up .when { font-weight: 600; font-size: 1.6rem; letter-spacing: 0.1em;
                 color: var(--accent-2); margin: 0.1rem 0; }
.next-up .where { font-size: 0.9rem; letter-spacing: 0.06em; color: var(--muted);
                  margin: 0 0 0.7rem; }
.next-up h2 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.next-up h2 a { color: var(--text); }
.next-up h2 a:hover { color: var(--accent); }

/* Stack uppercase poster keywords without bullets. */
.topics { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.topics li { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.18em;
             text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }

.cards.why .card h3 { color: var(--accent); font-size: 1.05rem; }

.terms li { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem;
            align-items: baseline; margin-bottom: 0.7rem; }
.terms .meta { grid-column: 2; }

/* --- cards and lists ------------------------------------------------------ */

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  display: block; padding: 1.1rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--text);
}
/* Only linked cards react to the pointer. */
a.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.card h3 { margin: 0.3rem 0 0.4rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.badge { font-family: var(--mono); color: var(--accent-2); font-weight: 700; }

.list { list-style: none; padding: 0; }
.list li { margin-bottom: 1rem; }
.list.compact li { margin-bottom: 0.3rem; }
.list p { margin: 0.2rem 0 0; font-size: 0.9rem; }

.agenda { list-style: none; padding: 0; counter-reset: item; }
.agenda li { display: flex; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.agenda .mins { font-family: var(--mono); color: var(--accent-2); min-width: 3rem; }
.agenda h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.agenda-links { margin: 0.4rem 0 0; }

.linkbox { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
           margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.linkbox h4 { margin: 0 0 0.4rem; font-size: 0.8rem; text-transform: uppercase;
              letter-spacing: 0.06em; color: var(--muted); }
.linkbox ul { list-style: none; padding: 0; margin: 0; }
.linkbox .missing { color: var(--muted); font-style: italic; }

/* --- live ----------------------------------------------------------------- */

.live-header { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.5rem; }
.live-header h1 { margin: 0; }
.live-header .lead { margin: 0.6rem 0 0; }
.live-status { flex: 0 0 min(21rem, 42%); }
.live-state { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 0.95rem;
              border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.live-state.on { border-color: var(--danger); }
.live-state-dot { color: var(--muted); font-size: 1.1rem; line-height: 1.3; }
.live-state.on .live-state-dot { color: var(--danger); animation: blink 1.4s ease-in-out infinite; }
.live-state strong, .live-state small { display: block; }
.live-state strong { line-height: 1.3; }
.live-state small { color: var(--muted); font-size: 0.78rem; line-height: 1.4; margin-top: 0.2rem; }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); gap: 1.4rem; align-items: start; }
.live-interactions { display: grid; gap: 1rem; min-width: 0; }
.interaction-card { min-width: 0; overflow-wrap: anywhere; margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; }
.interaction-heading { display: flex; gap: 0.8rem; align-items: flex-start; }
.interaction-heading h2 { margin: 0; font-size: 1.05rem; letter-spacing: normal; text-transform: none; }
.interaction-heading .kicker { margin: 0 0 0.15rem; }
.interaction-number { flex: 0 0 auto; font-family: var(--mono); color: var(--accent-2); font-size: 0.85rem; padding-top: 0.1rem; }
.interaction-help { margin: 0.7rem 0 1.1rem; color: var(--muted); font-size: 0.88rem; }
.live-sidebar { position: sticky; top: 5.5rem; min-width: 0; }
.glossary-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 1.15rem; }
.glossary-box h2 { margin: 0; font-size: 1.05rem; letter-spacing: normal; text-transform: none; }
.glossary-box .small { margin: 0.45rem 0 1rem; }
.glossary-list { margin: 0; }
.glossary-entry { padding: 0.75rem 0; border-top: 1px solid var(--line); }
.glossary-entry:first-child { border-top: 0; padding-top: 0; }
.glossary-entry dt { font-weight: 600; color: var(--text); }
.glossary-entry dd { margin: 0.2rem 0 0; color: var(--soft); font-size: 0.84rem; line-height: 1.45; }
.glossary-entry dd + dd { margin-top: 0.35rem; font-size: 0.78rem; }
.glossary-entry dd a { color: var(--accent); }
.glossary-badge { color: var(--muted); font: 0.68rem var(--mono); font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em; }
.pollbox { min-width: 0; }
.question { font-size: clamp(1.3rem, 3.5vw, 2rem); margin: 0.2rem 0 1.2rem; }
.options { display: grid; gap: 0.7rem; }
.option {
  display: flex; align-items: center; gap: 0.8rem; text-align: left; width: 100%;
  padding: 0.9rem 1.1rem; font-size: 1.05rem; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
}
.option:hover { border-color: var(--accent); }
.option.chosen { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option .key { font-family: var(--mono); color: var(--accent-2); text-transform: uppercase; }
.waiting { font-size: 1.1rem; }
.reveal { border-left: 3px solid var(--accent-2); padding-left: 0.9rem; }

.results { margin-top: 1.2rem; display: grid; gap: 0.5rem; }
.bar-row { display: grid; grid-template-columns: minmax(6rem, 14rem) 1fr 2.5rem;
           gap: 0.8rem; align-items: center; font-size: 0.95rem; }
.bar { background: var(--panel-2); border-radius: 999px; height: 0.8rem; overflow: hidden; }
.fill { display: block; height: 100%; background: var(--muted); transition: width 0.4s ease; }
.bar-row.leading .fill { background: var(--accent); }
.bar-count { font-family: var(--mono); text-align: right; color: var(--muted); }

.qa textarea {
  width: 100%; padding: 0.7rem; border-radius: 8px; resize: vertical;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  font: inherit;
}
.qa .questions { margin-bottom: 0; }
.sent { color: var(--accent); }
.questions { list-style: none; padding: 0; margin-top: 1.2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.questions li { display: flex; gap: 0.8rem; align-items: flex-start;
                padding: 0.7rem 0.9rem; background: var(--panel); border: 1px solid var(--line);
                border-radius: 10px; }
.questions li.answered { opacity: 0.55; }
/* Distinguish shadowed writing in the panel; answers use a left border. */
.questions li.shadow { border-color: var(--shadow); }
.answers li.shadow { box-shadow: inset 2px 0 var(--shadow); }
.upvote { font-family: var(--mono); background: var(--panel-2); color: var(--accent);
          border: 1px solid var(--line); border-radius: 8px; padding: 0.2rem 0.5rem; cursor: pointer; }
.upvote.static { cursor: default; }
.upvote.tiny { font-size: 0.75rem; padding: 0.05rem 0.4rem; }
.qbody { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qtext { display: inline; }
.qactions { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.answers { list-style: none; padding: 0 0 0 0.2rem; margin: 0.5rem 0 0;
           display: grid; gap: 0.35rem; border-left: 2px solid var(--line); }
/* Center the upvote control vertically alongside short answers. */
.answers li { display: flex; gap: 0.5rem; align-items: center;
              padding: 0.1rem 0 0.1rem 0.7rem; font-size: 0.92rem; color: var(--soft); }
.answers li > span { min-width: 0; overflow-wrap: anywhere; }
.btn.link { background: none; border: none; color: var(--muted); padding: 0.2rem 0;
            margin: 0.4rem 0 0; font-size: 0.8rem; text-decoration: underline; }
.btn.link:hover { color: var(--accent); }
.btn.link.danger { color: var(--danger); }
.btn.link.danger:hover { color: var(--text); }
.owner-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.owner-actions .btn { margin: 0; }
.answer-form { background: var(--panel); border: 1px solid var(--accent);
               border-radius: 10px; padding: 0.9rem 1.1rem; margin-top: 0.8rem; }
.answer-form blockquote { margin: 0 0 0.6rem; padding-left: 0.8rem;
                          border-left: 3px solid var(--line); color: var(--muted); }

.nick { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.warn { color: var(--danger); }
.whoami { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
          margin-bottom: 0.8rem; font-size: 0.85rem; color: var(--muted); }
.whoami input { font-family: var(--mono); font-size: 0.85rem; padding: 0.25rem 0.5rem;
                border-radius: 6px; background: var(--panel); color: var(--text);
                border: 1px solid var(--line); width: 12rem; }
.whoami .nick-edit { margin: 0; padding: 0.3rem 0.65rem; border: 1px solid var(--line);
                     border-radius: 7px; background: var(--panel-2); color: var(--soft);
                     font-size: 0.78rem; line-height: 1.4; white-space: nowrap; }
.whoami .nick-edit:hover { border-color: var(--accent); background: var(--panel); color: var(--text); }

/* --- presenter panel ------------------------------------------------------- */

.panel-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.panel-col { min-width: 0; }
@media (max-width: 860px) { .panel-grid { grid-template-columns: minmax(0, 1fr); } }
.panel-visibility { margin-bottom: 1.5rem; padding: 1rem 1.2rem;
                    border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.panel-visibility h2 { margin-top: 0; }
.panel-visibility form { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center; }
.visibility-options { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.visibility-options label { display: flex; gap: 0.4rem; align-items: center; color: var(--soft); }
.visibility-options input { accent-color: var(--accent); }
.panel-now { background: var(--panel); border: 1px solid var(--line);
             border-radius: 12px; padding: 1.2rem; }
.panel-buttons { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.polllist { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.polllist li { display: flex; gap: 0.8rem; align-items: center; justify-content: space-between;
               padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; }
.polllist li.on { border-color: var(--accent); }
.polllist-q { font-size: 0.9rem; }

.onair-switch { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
                margin-bottom: 1.5rem; padding: 0.7rem 0.9rem;
                border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.onair-switch.on { border-color: var(--danger); }
.chip.live { border-color: var(--danger); color: var(--danger); animation: blink 1.4s ease-in-out infinite; }

.lockswitch { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
              margin-bottom: 0.8rem; font-size: 0.85rem; }
.people-scroll { max-width: 100%; overflow-x: auto; }
.people { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.people th { text-align: left; font-weight: 500; color: var(--muted);
             border-bottom: 1px solid var(--line); padding: 0.3rem 0.5rem 0.3rem 0; }
.people td { padding: 0.35rem 0.5rem 0.35rem 0; border-bottom: 1px solid var(--line);
             vertical-align: middle; }
.people tr.banned { color: var(--danger); }
.people tr.shadowed { color: var(--shadow); }
.people .ip { font-family: var(--mono); color: var(--muted); }
.small { font-size: 0.8rem; }

/* --- audience reactions --- */

/* Use a separate, non-error color for the lost reaction. */
.mood { margin: 1.4rem 0; }
.mood-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.7rem; }
.mood-buttons .btn.on.lost { border-color: var(--accent-2); color: var(--accent-2); }
.mood-buttons .btn.on.clear { border-color: var(--accent); color: var(--accent); }

.mood-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden;
            background: var(--panel-2); border: 1px solid var(--line); }
.mood-bar .lost { background: var(--accent-2); }
.mood-bar .clear { background: var(--accent); }
.mood-legend { display: flex; gap: 1rem; font-size: 0.8rem; margin: 0.35rem 0 0; }
.mood-legend .lost { color: var(--accent-2); }
.mood-legend .clear { color: var(--accent); }

@media (max-width: 860px) {
  .live-header { display: block; }
  .live-status { max-width: 30rem; margin-top: 1.2rem; }
  .live-layout { grid-template-columns: 1fr; }
  .live-sidebar { position: static; }
}

@media (min-width: 761px) {
  .intro-deal { grid-column: 2; grid-row: 1; justify-self: end; align-self: start;
                width: var(--intro-deal-width); margin: 0;
                translate: min(50%, var(--intro-safe-shift)) var(--intro-deal-offset-y); }
}

@media (max-width: 760px), (orientation: landscape) and (max-height: 520px) {
  .intro { min-height: 0; display: block; padding-top: 3rem; padding-bottom: 2rem; text-align: center; }
  .intro h1 { max-width: none; }
  .intro-logo { width: min(340px, 82%); margin: 0 auto 1.4rem; }
  .intro-info { width: 100%; max-width: none; }
  .intro-deal { position: static; width: min(240px, 68vw); margin: 4rem auto 0; translate: none;
                transform: rotate(25deg); }
}

/* --- hints and graph -------------------------------------------------------- */

.hint { border-left: 3px solid var(--accent-2); background: var(--panel);
        padding: 0.2rem 1rem; margin: 0.8rem 0; border-radius: 0 8px 8px 0; }
.hint h4 { color: var(--accent-2); margin-bottom: 0.3rem; }

#graph-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 0.5rem; }
#graph { width: 100%; height: auto; display: block; cursor: grab; }

/* --- topologies --- */

.chip.topo { border-color: #7aa2f7; color: #7aa2f7; }

.topo { margin: 1.5rem 0 0; }
.topo-views { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.8rem; }
.topo-views .btn.on { border-color: var(--accent); color: var(--accent); }

.topo-svg { width: 100%; height: auto; display: block;
            background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }

/* SVG text is centered on each box; Go geometry only needs its center. */
.topo-svg text { text-anchor: middle; font-size: 13px; fill: var(--text); }
.topo-svg .row-label { text-anchor: start; font-size: 12px; fill: var(--muted);
                       letter-spacing: 0.06em; text-transform: uppercase; }

.node rect { fill: var(--panel-2); stroke: var(--line); stroke-width: 1.5; }
.node .name { font-family: var(--mono); font-weight: 600; }
.node .sub { font-size: 11px; fill: var(--muted); }
.node .mono { font-family: var(--mono); font-size: 11px; fill: var(--accent); }
.node .badge { font-size: 11px; fill: var(--accent-2); letter-spacing: 0.08em; }
.node.start rect, .node.destination rect { stroke: var(--accent-2); stroke-width: 2.5; }

.cable line { stroke: #46566b; fill: none; }
.cable.bundle line { stroke: #55708f; stroke-linecap: round; }
.cable.dim line { stroke: #2c3745; }
.cable.hot line { stroke: var(--accent-2); }
/* A background-colored stroke creates space for /31 labels on cables. */
.cable-label { font-family: var(--mono); font-size: 10px; fill: var(--muted);
               paint-order: stroke; stroke: var(--panel); stroke-width: 4px; }
.cable.bundle .cable-label { font-size: 12px; fill: var(--soft); }

.topo-group rect { fill: none; stroke: var(--line); stroke-dasharray: 5 4; }
.topo-group .group-label { text-anchor: start; font-size: 12px; fill: var(--muted);
                           letter-spacing: 0.06em; }

.topo-panel { margin-top: 1rem; }
.topo-panel .term { font-size: 0.85rem; }
.topo-panel .term code { white-space: pre; }

.addrs { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.addrs th { text-align: left; font-weight: 500; color: var(--muted);
            border-bottom: 1px solid var(--line); padding: 0.3rem 0.6rem 0.3rem 0; }
.addrs td { padding: 0.3rem 0.6rem 0.3rem 0; border-bottom: 1px solid var(--line); }
.addrs .ip { font-family: var(--mono); }
.addrs tr.unrouted { color: var(--muted); }

/* The language choice is available on the poster, materials and live pages. */
.language-switch { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .75rem; }
.language-switch label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.language-switch .custom-select .custom-select-trigger, .language-switch noscript a { font: inherit; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 999px; padding: .35rem .65rem; width: auto; margin: 0; cursor: pointer; }
.language-switch .custom-select-trigger:hover, .language-switch .custom-select-trigger[aria-expanded="true"] { border-color: var(--accent); }

/* Contact cards accept arbitrary profiles and long email addresses. */
.contact-section { margin-top: 2.5rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.contact-card { min-width: 0; margin: 0; padding: 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow-wrap: anywhere; }
.contact-card h3 { margin: 0 0 .5rem; }
.contact-role { color: var(--accent); margin-top: 0; font-size: .9rem; }
.contact-links { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .7rem; }
.contact-links li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .7rem; min-width: 0; }
.contact-links li > span { color: var(--muted); font-size: .85rem; }
.contact-links a { overflow-wrap: anywhere; }
