/* Instrument Sans, bundled so every computer shows the same type. SIL Open
   Font License; see vendor/instrument-sans/LICENSE. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(./vendor/instrument-sans/instrument-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(./vendor/instrument-sans/instrument-sans-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  font-family: "Instrument Sans", system-ui, sans-serif;
  color: #1c3028;
  background: #f5f7f3;
  font-synthesis: none;
  --ink: #1c3028;
  --muted: #52645a;
  --accent: #006644;
  --line: #d8e1d9;
  --paper: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
button, input, a { font: inherit; }
:focus-visible { outline: 3px solid #597c31; outline-offset: 3px; }

.shell { width: min(100% - 3rem, 71rem); margin-inline: auto; }
/* The masthead. With an empty list (.hero) the address is spelled out as three
   numbered slides, centred above the name and the promise. Once a talk is
   added the slides shrink into a stack on a green square, which is the site's
   icon, and "org" ends up on the front slide. Every piece is positioned
   absolutely in both states so the change can be a plain transition; app.mjs
   adds .animate once the saved list has been restored, so a refresh does not
   replay it. */
.masthead {
  --u: calc(2.75rem / 32);      /* one unit of the 32-unit favicon grid */
  --tw: min(8rem, (100vw - 3rem) * .3);  /* hero slide width */
  --stack-top: .625rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  position: relative;
  height: 4rem;
}
.masthead.hero .masthead-inner { height: calc(2.25rem + var(--tw) * .5625 + 8.4rem); }
.brand-mark { position: absolute; inset: 0; pointer-events: none; }
.brand-square {
  position: absolute;
  left: 0;
  top: var(--stack-top);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: calc(var(--u) * 7);
  background: var(--accent);
}
.masthead.hero .brand-square { opacity: 0; transform: scale(.85); }
.tile {
  position: absolute;
  display: grid;
  place-items: center;
  width: calc(var(--u) * 16);
  height: calc(var(--u) * 11.5);
  border-radius: calc(var(--u) * 2);
  font-size: calc(var(--u) * 7.6);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
}
.tile small {
  position: absolute;
  top: 5%;
  left: 7%;
  font-size: calc(var(--tw) * .1);
  font-weight: 500;
  opacity: 0;
}
/* Compact: the stack, front to back org, slide, .org, as in favicon.svg. */
.tile-2 { z-index: 3; left: calc(var(--u) * 6); top: calc(var(--stack-top) + var(--u) * 13); background: #fff; color: var(--accent); }
.tile-1 { z-index: 2; left: calc(var(--u) * 8.5); top: calc(var(--stack-top) + var(--u) * 9.25); background: #a9d3b9; color: #a9d3b9; }
.tile-3 { z-index: 1; left: calc(var(--u) * 11); top: calc(var(--stack-top) + var(--u) * 5.5); background: #5fa47f; color: #5fa47f; }
/* Hero: a row of three 16:9 slides reading slide · org · .org. */
.masthead.hero .tile {
  top: 2.25rem;
  width: var(--tw);
  height: calc(var(--tw) * .5625);
  border-radius: calc(var(--tw) * .07);
  font-size: calc(var(--tw) * .27);
}
.masthead.hero .tile small { opacity: .75; }
.masthead.hero .tile-1 { left: calc(50% - var(--tw) * 1.57); background: #e3efe7; color: var(--ink); }
.masthead.hero .tile-2 { left: calc(50% - var(--tw) * .5); background: #a9d3b9; color: #00402b; }
.masthead.hero .tile-3 { left: calc(50% + var(--tw) * .57); background: var(--accent); color: #fff; }
.masthead h1 {
  position: absolute;
  left: 3.6rem;
  top: 50%;
  transform: translate(0, -50%);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.015em;
  white-space: nowrap;
}
.masthead.hero h1 {
  left: 50%;
  top: calc(2.25rem + var(--tw) * .5625 + 1.1rem);
  transform: translate(-50%, 0);
  font-size: 1.6rem;
}
.tagline, .benefits {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  opacity: 0;
  visibility: hidden;
}
.tagline { top: calc(2.25rem + var(--tw) * .5625 + 3.4rem); font-size: 1rem; }
.benefits { top: calc(2.25rem + var(--tw) * .5625 + 5.2rem); color: var(--muted); font-size: .8rem; line-height: 1.45; }
.benefits span[aria-hidden] { color: #5fa47f; margin: 0 .2em; }
.masthead.hero :is(.tagline, .benefits) { opacity: 1; visibility: visible; }
.masthead .site-address {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: .9rem;
}
.masthead.hero .site-address { opacity: 0; visibility: hidden; }
.site-address { font-weight: 600; white-space: nowrap; }
.site-address b { color: var(--accent); font-weight: inherit; }
.site-address i { color: #5fa47f; font-style: normal; }
@media (max-width: 34rem) {
  .masthead.hero .masthead-inner { height: calc(2.25rem + var(--tw) * .5625 + 9.6rem); }
  .masthead .site-address { display: none; }
  .tagline { font-size: .9rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .masthead.animate :is(.masthead-inner, .brand-square, .tile, h1) {
    transition: .7s cubic-bezier(.65, 0, .35, 1);
    transition-property: height, left, top, width, transform, opacity, border-radius, font-size, background-color, color;
  }
  .masthead.animate .tile small { transition: opacity .2s; }
  .masthead.animate :is(.tagline, .benefits, .site-address) { transition: opacity .35s, visibility .35s; }
  /* Collapsing, the promise goes first and the address arrives last;
     expanding, the other way round. */
  .masthead.animate:not(.hero) .site-address { transition-delay: .45s; }
  .masthead.animate.hero :is(.tagline, .benefits, .tile small) { transition-delay: .45s; }
  .masthead.animate:not(.hero) .brand-square { transition-delay: .15s; }
}
main {
  --order-width: 4rem;
  --preview-width: 6.5rem;
  --trash-width: 2.5rem;
  --row-gap: .8rem;
  --row-padding: .75rem;
  --action-width: 15.6rem;
  --download-width: 6.25rem;
  padding-top: 1.35rem;
}
.drop-zone, .slide, .zip-row {
  display: grid;
  grid-template-columns: var(--order-width) var(--preview-width) minmax(0, 1fr) var(--action-width) var(--trash-width);
  align-items: center;
  gap: var(--row-gap);
  padding: var(--row-padding);
  border-radius: .8rem;
}
h1, h2, p { margin: 0; }
.caveat {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}
.caveat b { font-weight: 700; }
.open-pdf b, .download b { font-weight: 700; margin-left: .1em; }
footer { padding-block: 1.35rem 2rem; color: var(--muted); font-size: .8rem; }
footer a { color: var(--accent); text-underline-offset: .15em; }

.drop-zone {
  min-height: 5rem;
  border: 1px dashed #9eb28f;
  background: #edf4eb;
}
.drop-zone.active { border-color: var(--accent); background: #deeddf; }

/* Before anything is added, the drop zone is the page: larger, and centred
   rather than lined up with rows that are not there yet. */
#slides[hidden] + .drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 15rem;
  padding: 2.25rem 1.25rem 2.75rem;
  border-width: 2px;
  border-radius: 1rem;
  text-align: center;
}
#slides[hidden] + .drop-zone .add-icon {
  width: 3.6rem;
  height: 3.6rem;
  margin-bottom: .9rem;
  border-radius: 50%;
  font-size: 2rem;
  box-shadow: 0 2px 6px #1236250f;
}
#slides[hidden] + .drop-zone .drop-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0;
}
#slides[hidden] + .drop-zone h2 { font-size: 1.35rem; }
#slides[hidden] + .drop-zone .link-entry { justify-content: center; width: min(100%, 30rem); margin-top: 1.1rem; }
#slides[hidden] + .drop-zone .receive-actions {
  position: absolute;
  right: .75rem;
  bottom: .55rem;
  flex-direction: row;
  gap: .9rem;
  margin: 0;
}
#export:disabled { cursor: wait; opacity: .7; }
.zip-row { margin-top: 1rem; border: 1px solid transparent; border-top: 3px solid var(--accent); border-radius: 0; }
.zip-preview { grid-column: 2; }
.zip-icon {
  display: grid;
  place-items: end center;
  width: 1.9rem;
  height: 2.25rem;
  padding-bottom: .2rem;
  border: 1px solid currentColor;
  border-radius: .22rem;
  background: repeating-linear-gradient(var(--accent) 0 2px, transparent 2px 4px) center top / 3px .85rem no-repeat, var(--paper);
  font-size: .58rem;
}
.zip-name { position: relative; }
.zip-name .title { padding-right: 3rem; }
.zip-name span {
  position: absolute;
  inset: 1px 1px 1px auto;
  display: grid;
  place-items: center;
  width: 2.6rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
  pointer-events: none;
}
#slides:not([hidden]) + .drop-zone { margin-top: .65rem; }
.add-icon {
  display: grid;
  grid-column: 2;
  height: 3rem;
  place-items: center;
  border: 1px solid #d2e0d1;
  border-radius: .75rem;
  background: #f9fbf8;
  color: var(--accent);
  font-size: 1.65rem;
  cursor: pointer;
}
.add-icon:hover { border-color: var(--accent); background: #deeddf; }
.drop-copy { min-width: 0; padding-inline: .45rem; }
.receive-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: end;
  gap: .0625rem;
  margin: 0 -.25rem -.25rem 0;
  text-align: right;
  grid-column: 4 / -1;
}
.receive-actions :is(a, button) {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .6875rem;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: .15em;
  cursor: pointer;
}
.receive-actions :is(a, button):is(:hover, :focus-visible) { color: var(--accent); }

.list-tools { display: flex; justify-content: flex-end; margin-top: .35rem; }
.text-button {
  padding: .2rem 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .78rem;
  text-decoration: underline;
  text-underline-offset: .15em;
  cursor: pointer;
}
.text-button:hover { color: #9d2544; }

.confirm-dialog {
  width: min(100% - 2rem, 30rem);
  padding: 1.4rem 1.5rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1.2rem 3rem #12362533;
}
.confirm-dialog::backdrop { background: #1c302866; }
.confirm-dialog h2 { font-size: 1.15rem; letter-spacing: -.015em; }
.confirm-dialog p { margin-top: .6rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }
.dialog-actions .button:disabled { cursor: default; opacity: .65; }
.button.danger { background: #9d2544; border-color: #9d2544; color: #fff; }
.button.danger:hover { background: #7f1d37; }

/* A word on what the tool does, shown only while the list is empty. */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0 .5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
}
#slides:not([hidden]) ~ .how-it-works { display: none; }
.how-it-works li { counter-increment: step; }
.how-it-works li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  margin-bottom: .55rem;
  border-radius: 50%;
  background: #e3eddf;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
}
.how-it-works b { display: block; margin-bottom: .15rem; color: var(--ink); font-weight: 650; }
.how-it-works em { font-style: normal; font-weight: 600; color: var(--ink); }
main kbd {
  padding: 0 .3rem;
  border: 1px solid #c9d7c8;
  border-bottom-width: 2px;
  border-radius: .25rem;
  background: var(--paper);
  font: inherit;
  font-size: .78rem;
}
.drop-copy h2 { font-size: 1.1rem; letter-spacing: -.025em; }
.drop-copy p { margin-top: .25rem; color: var(--muted); font-size: .9rem; }
.link-entry { display: flex; flex-wrap: wrap; gap: .4rem; max-width: 34rem; margin-top: .6rem; }
.link-entry input {
  flex: 1 1 15rem;
  min-width: 0;
  height: 2.25rem;
  padding: .3rem .55rem;
  border: 1px solid #c9d7c8;
  border-radius: .45rem;
  background: #fff;
  color: var(--ink);
  font-size: .85rem;
}
.link-entry input::placeholder { color: #727e75; opacity: 1; }
.link-entry input:hover { border-color: #7f9f88; }
.link-entry .button { min-height: 2.25rem; padding-block: .3rem; font-size: .8rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 650;
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button:hover { background: #edf4eb; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: #004d33; }

#slides { position: relative; list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .65rem; }
.slide {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 2px 4px #1236250a;
  cursor: grab;
}
.slide.dragging {
  position: relative;
  z-index: 1;
  border-color: var(--accent);
  box-shadow: 0 .65rem 1.4rem #12362529;
}
#slides.reordering, #slides.reordering .slide { cursor: grabbing; user-select: none; }
.order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  gap: .4rem;
  min-width: 0;
  padding: 0 .45rem 0 .65rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--muted);
  cursor: inherit;
  touch-action: none;
}
.order:hover { background: #edf4eb; color: var(--accent); }
.grip {
  flex: 0 0 9px;
  height: 75%;
  min-height: 24px;
  background: radial-gradient(circle, currentColor 1px, transparent 1.4px) 0 0 / 4.5px 5px;
  opacity: .75;
}
.position {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.thumbnail {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: #edf4eb;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .045em;
}
.thumbnail img { position: absolute; width: 100%; height: 100%; object-fit: contain; background: #f5f7f3; }
.slide-name { min-width: 0; }
.title {
  width: 100%;
  padding: .38rem .45rem;
  border: 1px solid #dce4dc;
  border-radius: .35rem;
  background: #fff;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 680;
  text-overflow: ellipsis;
}
.title:hover { border-color: #7f9f88; }
.title::placeholder { color: #727e75; opacity: 1; }
.file-details {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  margin: .25rem .45rem 0;
  color: var(--muted);
  font-size: .77rem;
}
.filename { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metadata { white-space: nowrap; }
.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--download-width);
  align-items: center;
  gap: .4rem;
}
.download, .get-pdf { grid-column: 2; }
.get-pdf:disabled { cursor: wait; opacity: .7; }
.link-thumbnail { background: #f5f7f3; color: #6f8a78; }
.preview-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: .62rem;
  font-weight: 650;
  letter-spacing: .02em;
  cursor: pointer;
}
.preview-button span { opacity: 0; transition: opacity .12s; }
.preview-button:is(:hover, :focus-visible) { background: #edf4eb; color: var(--accent); }
.preview-button:is(:hover, :focus-visible) span { opacity: 1; }
.preview-button:disabled { cursor: wait; opacity: .6; }
.source-link { color: var(--muted); white-space: nowrap; text-underline-offset: .15em; }
.source-link:hover { color: var(--accent); }
.refresh-source {
  margin-left: .6em;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: .15em;
  cursor: pointer;
}
.refresh-source::before { content: "↻ "; text-decoration: none; display: inline-block; margin-right: .1em; }
.refresh-source:hover { color: var(--accent); }
.refresh-source:disabled { cursor: wait; opacity: .7; }
.actions .button { height: 2.75rem; }
.icon-button {
  display: grid;
  place-items: center;
  width: var(--trash-width);
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: .45rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-button:hover { color: #9d2544; background: #fff0f4; }
.error { margin-top: 1rem; font-size: .84rem; line-height: 1.5; }
.error { color: #9d2544; }
.error a { color: inherit; text-underline-offset: .15em; font-weight: 650; }
.notice { margin-top: 1rem; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 780px) {
  main { --order-width: 3.35rem; --preview-width: 4.65rem; --row-gap: .55rem; }
  .slide, .drop-zone, .zip-row { grid-template-columns: var(--order-width) var(--preview-width) minmax(0, 1fr) var(--trash-width); }
  .order { grid-row: 1 / 3; padding-inline: .4rem; }
  .slide-name, .drop-copy { grid-column: 3 / -1; }
  .receive-actions { grid-column: 2 / -1; grid-row: 2; }
  .actions { grid-column: 2 / 4; grid-row: 2; width: min(100%, var(--action-width)); justify-self: end; }
  .how-it-works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .remove { grid-column: 4; grid-row: 2; }
}
@media (max-width: 440px) {
  .shell { width: calc(100% - 1.5rem); }
  main { --order-width: 2.7rem; --preview-width: 3.2rem; --row-gap: .45rem; --row-padding: .55rem; --trash-width: 2rem; --download-width: 4.55rem; }
  .position { font-size: 1.08rem; }
  .order { padding-inline: .2rem; gap: .18rem; }
  .actions .button { padding-inline: .3rem; font-size: .75rem; }
  .file-details { flex-wrap: wrap; row-gap: .1rem; }
  .how-it-works { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .how-it-works li { position: relative; padding-left: 2.4rem; }
  .how-it-works li::before { position: absolute; left: 0; top: 0; }
  #slides[hidden] + .drop-zone { padding-bottom: 3.5rem; }
  #slides[hidden] + .drop-zone .receive-actions { left: .75rem; justify-content: center; }
}

/* Presenter page (present.html) */
.deck-body {
  margin: 0;
  background: #101014;
  color: #f2f2f4;
}

.deck-page {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100dvh;
  /* The strip parks below the foot, so clip rather than grow a scrollbar and
     shove the slide around. Clip, not hidden: hidden still makes a scroll
     container that script and focus can scroll, which moved the slide. */
  overflow: clip;
}

.deck-bar {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .5rem .9rem;
  background: #1b1b21;
  border-bottom: 1px solid #2c2c34;
}

/* The site's mark, quietly, ahead of the talk's title; it hides with the rest
   of the bar in full screen. */
.deck-brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: .45rem;
  color: #dfe8e2;
  font-size: .85rem;
}
.deck-brand svg { display: block; }
.deck-brand .site-address b { color: #a9d3b9; }
.deck-brand::after { content: "/"; margin-left: .3rem; color: #6b6b76; font-weight: 400; }

.deck-title {
  flex: 0 1 auto;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The file's own name, for picking the right deck off a projector when the
   talk has been given a friendlier one. It yields the room first. */
.deck-source {
  flex: 0 2 auto;
  min-width: 2rem;
  margin-left: -.35rem;
  color: #8b8b96;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: #b4b4bd;
}

.deck-button {
  font: inherit;
  color: inherit;
  background: #2c2c34;
  border: 1px solid #3c3c46;
  border-radius: .4rem;
  padding: .3rem .7rem;
  cursor: pointer;
}

.deck-button:hover { background: #3a3a44; }

.deck-stage {
  display: grid;
  place-items: center;
  /* clip, not hidden, so nothing can scroll the slide out of place. */
  overflow: clip;
  padding: .5rem;
}

.deck-stage > * { max-width: 100%; max-height: 100%; }

.deck-message {
  color: #b4b4bd;
  text-align: center;
  padding: 2rem;
  max-width: 32rem;
}

/* Click targets along each edge, invisible until focused. */
.deck-edge {
  position: absolute;
  top: 3rem;
  bottom: 0;
  width: 12%;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  /* Drawn over the slide, so they must not take its clicks: a link at the edge
     of a page would never be reachable. present.mjs places edge clicks by
     coordinate instead. Keyboard focus is unaffected. */
  pointer-events: none;
}

.deck-prev { left: 0; }
.deck-next { right: 0; }
.deck-edge:focus-visible { opacity: 1; background: rgba(255, 255, 255, .12); }

/* In full screen the bar hides until the pointer reaches the top. */
:fullscreen .deck-page { grid-template-rows: 1fr; }
:fullscreen .deck-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  opacity: 0;
  transition: opacity .15s;
}
:fullscreen .deck-bar:hover,
:fullscreen .deck-bar:focus-within { opacity: 1; }
:fullscreen .deck-edge { top: 0; }

/* B and W blank the screen, as in PowerPoint. */
.deck-blank {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
}
.deck-blank[data-colour="white"] { background: #fff; }

/* Slide picker: a strip of thumbnails along the bottom. */
.deck-picker {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform .2s ease-out, visibility 0s linear .2s;
  display: flex;
  gap: .5rem;
  padding: .6rem;
  overflow-x: auto;
  overscroll-behavior: contain;
  background: rgba(16, 16, 20, .94);
  border-top: 1px solid #2c2c34;
}

.deck-picker.open {
  transform: none;
  visibility: visible;
  transition: transform .2s ease-out, visibility 0s;
}

.deck-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 9rem;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 2px solid #3c3c46;
  border-radius: .25rem;
  cursor: pointer;
}

.deck-thumb.current { border-color: #f2f2f4; }
.deck-thumb:focus-visible { outline: 2px solid #8ab4f8; outline-offset: 2px; }
.deck-thumb svg { display: block; width: 100%; height: 100%; }

.deck-thumb-number {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: .05rem .3rem;
  font-size: .7rem;
  color: #f2f2f4;
  background: rgba(16, 16, 20, .75);
  border-radius: 0 .25rem 0 0;
}

@media (prefers-reduced-motion: no-preference) {
  .deck-picker { scroll-behavior: smooth; }
}

/* Keyboard guide, raised with ? or / */
.deck-help {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(16, 16, 20, .72);
  backdrop-filter: blur(3px);
}

.deck-help-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .55rem 1.1rem;
  align-items: center;
  margin: 0;
  padding: 1.25rem 1.5rem;
  max-width: min(32rem, 100%);
  font-size: .9rem;
  background: #1b1b21;
  border: 1px solid #3c3c46;
  border-radius: .6rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .45);
}

.deck-help-list dt { display: flex; gap: .3rem; justify-self: end; }
.deck-help-list dd { margin: 0; color: #c9c9d2; }

.deck-help kbd {
  font: inherit;
  font-size: .78rem;
  padding: .1rem .4rem;
  color: #f2f2f4;
  background: #2c2c34;
  border: 1px solid #4a4a56;
  border-bottom-width: 2px;
  border-radius: .3rem;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .deck-picker, .deck-picker.open { transition: none; }
}

/* PDF presenting: the page, and the link layer over it. */
.pdf-page {
  position: relative;
  background: #fff;
  /* PDF.js sizes the link layer from these; --scale-factor is set per page. */
  --user-unit: 1;
  --total-scale-factor: calc(var(--scale-factor) * var(--user-unit));
  --scale-round-x: 1px;
  --scale-round-y: 1px;
}

.pdf-page canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* The subset of PDF.js's annotation styles that clickable links need. Forms,
   popups and editing are not rendered here, so their rules are left out. */
.annotationLayer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  transform-origin: 0 0;
}

.annotationLayer section {
  position: absolute;
  text-align: initial;
  pointer-events: auto;
  box-sizing: border-box;
  transform-origin: 0 0;
}

.annotationLayer .linkAnnotation > a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 1em;
}

.annotationLayer .linkAnnotation:not(.hasBorder) > a:hover {
  opacity: .2;
  background-color: rgb(255 255 0);
}

.annotationLayer .linkAnnotation.hasBorder:hover { background-color: rgb(255 255 0 / .2); }
.annotationLayer .hasBorder { background-size: 100% 100%; }
