/* Annotated slides: rebuilt lecture slides with study annotations on top.
   Used by the standalone deck pages under */annotated-slides/*/ (see
   scripts/build_se423_annotated_slides.py). Ink key:
   black = original slide text · purple = the instructor's own marks from the PDF ·
   red = study notes · yellow = sticky tips · green = "seen again" · blue = exam radar. */

:root {
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-slide: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --radius: 10px;
  --maxw: 1240px;
}

html[data-theme="light"] {
  --desk: #e7e3da;
  --desk-2: #ddd8cc;
  --paper: #fdfcf8;
  --paper-edge: #d9d4c7;
  --ink: #1c1c1e;
  --ink-dim: #5e5b55;
  --ui: #ffffff;
  --ui-line: #d6d1c4;
  --head-a: #a3a3a3;
  --head-b: #737373;
  --head-ink: #ffffff;
  --foot: #d2d2d2;
  --red: #c4302b;
  --red-soft: rgba(196, 48, 43, 0.09);
  --hl: rgba(255, 214, 10, 0.55);
  --prof: #6c4fd1;
  --prof-hl: rgba(140, 110, 255, 0.2);
  --green: #1d7a4b;
  --green-soft: rgba(29, 122, 75, 0.1);
  --blue: #2356a8;
  --blue-soft: rgba(35, 86, 168, 0.07);
  --sticky: #fff1a0;
  --sticky-ink: #3b3412;
  --sticky-trap: #ffd2c7;
  --sticky-trick: #d9f0ff;
  --card-head: #20b6df;
  --card-tri: #ec6a2c;
  --good: #1d7a4b;
  --bad: #c4302b;
  --shadow: 0 1px 2px rgba(60, 50, 30, 0.08), 0 8px 24px rgba(60, 50, 30, 0.12);
}

html[data-theme="dark"] {
  --desk: #121316;
  --desk-2: #191b1f;
  --paper: #1d1f24;
  --paper-edge: #2c2f36;
  --ink: #ebe8e2;
  --ink-dim: #a29e96;
  --ui: #23262c;
  --ui-line: #343841;
  --head-a: #4a4d55;
  --head-b: #30333a;
  --head-ink: #f4f4f4;
  --foot: #3a3d44;
  --red: #ff7d70;
  --red-soft: rgba(255, 125, 112, 0.1);
  --hl: rgba(255, 214, 10, 0.3);
  --prof: #b9a5ff;
  --prof-hl: rgba(170, 145, 255, 0.2);
  --green: #5fd39a;
  --green-soft: rgba(95, 211, 154, 0.1);
  --blue: #8fb6ff;
  --blue-soft: rgba(143, 182, 255, 0.07);
  --sticky: #3d3716;
  --sticky-ink: #f6eebd;
  --sticky-trap: #45231f;
  --sticky-trick: #1c3243;
  --card-head: #178fb0;
  --card-tri: #ff8a4f;
  --good: #5fd39a;
  --bad: #ff7d70;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

.as-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* ------------------------------------------------------------------ toolbar */
.as-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--desk) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ui-line);
}

.as-top .as-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.as-brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
}

.as-brand small {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.as-brand strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.as-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.seg {
  display: inline-flex;
  background: var(--ui);
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  padding: 3px;
}

.seg button {
  border: 0;
  background: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-dim);
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.chip-btn {
  border: 1px solid var(--ui-line);
  background: var(--ui);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip-btn[aria-pressed="true"] {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

.as-jump {
  border: 1px solid var(--ui-line);
  background: var(--ui);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  max-width: 220px;
}

button:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------- intro */
.as-intro {
  padding: 28px 0 8px;
}

.as-intro h1 {
  font-family: var(--font-slide);
  font-size: clamp(26px, 4vw, 40px);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.as-intro .kicker {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
}

.as-intro p {
  max-width: 70ch;
  color: var(--ink-dim);
  margin: 8px 0 0;
}

.as-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.as-stats li {
  background: var(--ui);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

.as-stats b {
  font-size: 15px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px dashed var(--paper-edge);
  border-radius: var(--radius);
  font-size: 13px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  flex: none;
}

.lg-ink {
  background: var(--ink);
}

.lg-prof {
  background: var(--prof);
}

.lg-red {
  background: var(--red);
}

.lg-hl {
  background: var(--hl);
  outline: 1px solid var(--ui-line);
}

.lg-tip {
  background: var(--sticky);
  outline: 1px solid var(--ui-line);
}

.lg-seen {
  background: var(--green);
}

.lg-exam {
  background: var(--blue);
}

/* -------------------------------------------------------------------- sheets */
.as-deck {
  padding: 18px 0 120px;
}

.sheet {
  scroll-margin-top: 84px;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: clamp(14px, 2.4vw, 28px);
  margin: 0 0 28px;
  position: relative;
}

.sheet[hidden] {
  display: none;
}

.sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(14px, 2vw, 26px);
  align-items: start;
}

.sheet.no-margin .sheet-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* the rebuilt slide */
.slide {
  container-type: inline-size;
  background: #ffffff;
  color: #111111;
  border: 1px solid #cfcfcf;
  position: relative;
  font-family: var(--font-slide);
}

html[data-theme="dark"] .slide {
  background: #f3f1ec;
  border-color: #000;
}

.slide-inner {
  min-height: 56.25cqw;
  display: flex;
  flex-direction: column;
}

.slide-head {
  background: linear-gradient(180deg, var(--head-a), var(--head-b));
  color: var(--head-ink);
  padding: 2.4cqw 3.4cqw 2.2cqw;
}

html[data-theme="dark"] .slide-head {
  background: linear-gradient(180deg, #a3a3a3, #737373);
  color: #fff;
}

.slide-head h2 {
  margin: 0;
  font-size: clamp(17px, 3.9cqw, 38px);
  line-height: 1.15;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.slide-head .sub {
  display: block;
  margin-top: 0.3em;
  font-size: 0.55em;
  color: #6b2fb8;
  text-shadow: none;
}

.slide-body {
  flex: 1;
  padding: 2.6cqw 3.6cqw 2cqw;
  font-size: clamp(13px, 2.05cqw, 20px);
  line-height: 1.35;
  display: grid;
  gap: 2.4cqw;
  align-content: start;
}

.slide-body.has-fig {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}

.slide-body.fig-only {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.slide-body ul,
.slide-body ol {
  margin: 0;
  padding-left: 1.2em;
}

.slide-body li {
  margin: 0 0 0.45em;
}

.slide-body li li {
  font-size: 0.9em;
  margin-bottom: 0.3em;
}

.slide-body ul ul {
  list-style: "• ";
}

.slide-body p {
  margin: 0 0 0.55em;
}

.slide-body h3 {
  font-size: 1.04em;
  margin: 0.2em 0 0.5em;
}

.slide-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3cqw;
}

.slide-fig {
  margin: 0;
  text-align: center;
}

.slide-fig img,
.slide-fig svg {
  max-width: 100%;
  max-height: 46cqw;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

.slide-body.fig-only .slide-fig img {
  max-height: 40cqw;
  width: auto;
}

.slide-body.has-fig:has(.slide-fig.tall) {
  grid-template-columns: minmax(0, 1fr);
}

.slide-body.has-fig .slide-fig.tall img {
  max-height: none;
  width: min(100%, 88cqw);
}

.slide-body.fig-only .slide-fig.tall {
  width: min(100%, 88cqw);
}

.slide-body.fig-only .slide-fig.tall img {
  max-height: none;
  width: 100%;
}

.fig-stack {
  display: grid;
  gap: 2cqw;
}

.slide-fig figcaption {
  font-size: 0.72em;
  color: #555;
  margin-top: 0.5em;
  font-family: var(--font-ui);
}

.slide-foot {
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  padding: 0 2cqw 1.4cqw;
}

.slide-foot .bar {
  flex: 1;
  height: 1.4cqw;
  min-height: 7px;
  background: linear-gradient(180deg, #e6e6e6, #cfcfcf);
  clip-path: polygon(0 0, 98.5% 0, 100% 50%, 98.5% 100%, 0 100%, 0.8% 50%);
}

.slide-foot .num {
  font-size: clamp(10px, 1.3cqw, 13px);
  color: #555;
  border: 1px solid #c8c8c8;
  border-radius: 999px;
  padding: 0 0.7em;
}

/* section-divider and title slides */
.slide.section .slide-inner,
.slide.title .slide-inner {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.slide.section h2,
.slide.title h2 {
  font-size: clamp(22px, 5.6cqw, 54px);
  font-weight: 400;
  margin: 0 6cqw;
}

.slide.title .tsub {
  margin-top: 1.6cqw;
  font-size: clamp(14px, 2.8cqw, 26px);
}

.slide.section .slide-foot,
.slide.title .slide-foot {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* PMBOK principle cards */
.pcard {
  border: 0.5cqw solid #3b3f63;
  border-radius: 0.6cqw;
  overflow: hidden;
  background: #fff;
}

.pcard h4 {
  margin: 0;
  background: var(--card-head);
  color: #fff;
  padding: 1.2cqw 2cqw;
  font-family: "Arial Narrow", var(--font-slide);
  font-size: clamp(16px, 3cqw, 30px);
  letter-spacing: 0.03em;
}

.pcard-body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2.6cqw;
  padding: 2cqw 2.4cqw;
}

.pcard-lead {
  border-right: 1px solid #555;
  padding-right: 2cqw;
  font-weight: 600;
  font-size: 0.95em;
}

.pcard ul {
  list-style: none;
  padding: 0;
}

.pcard li {
  position: relative;
  padding-left: 1.3em;
  font-size: 0.88em;
}

.pcard li::before {
  content: "";
  position: absolute;
  left: 0.15em;
  top: 0.35em;
  border-left: 0.65em solid var(--card-tri);
  border-top: 0.38em solid transparent;
  border-bottom: 0.38em solid transparent;
}

.pcard li ul li::before {
  display: none;
}

.pcard li ul li {
  padding-left: 0.4em;
  margin-bottom: 0.1em;
}

/* --------------------------------------------------- the instructor's marks */
.pm-mark {
  background: linear-gradient(transparent 62%, var(--prof-hl) 62%);
  border-bottom: 2px solid color-mix(in srgb, var(--prof) 55%, transparent);
}

.slide .pm-mark {
  --prof: #6c4fd1;
  --prof-hl: rgba(140, 110, 255, 0.25);
}

.pm-circle {
  border: 2px solid #6c4fd1;
  border-radius: 50%;
  padding: 0 0.25em;
  margin: 0 -0.1em;
}

.prof-note {
  margin: 10px 0 0;
  color: var(--prof);
  font-family: var(--font-hand);
  font-size: 21px;
  line-height: 1.2;
}

.prof-note::before {
  content: "✎ in-class: ";
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ------------------------------------------------------- study annotations */
mark.an-hl {
  background: linear-gradient(100deg, transparent 0.2em, var(--hl) 0.25em, var(--hl) calc(100% - 0.2em), transparent);
  color: inherit;
  padding: 0 0.08em;
  border-radius: 0.2em;
}

.slide mark.an-hl {
  --hl: rgba(255, 214, 10, 0.6);
}

.an-ul {
  text-decoration: underline wavy;
  text-decoration-color: #c4302b;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

.an-circle {
  outline: 2px solid #c4302b;
  outline-offset: 1px;
  border-radius: 40% / 60%;
  padding: 0 0.15em;
}

sup.an-ref {
  color: #c4302b;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 0.95em;
  margin-left: 0.1em;
  line-height: 0;
}

/* margin column: handwritten notes */
.margin {
  font-family: var(--font-hand);
  color: var(--red);
  font-size: 21px;
  line-height: 1.22;
  border-left: 2px dashed var(--red-soft);
  padding-left: 14px;
}

.margin ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.margin li {
  margin: 0 0 12px;
  position: relative;
  padding-left: 26px;
}

.margin li::before {
  content: attr(data-n);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  font-size: 15px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

.weight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.weight .dots {
  letter-spacing: 2px;
  font-size: 14px;
}

/* past-exam stamp on the slide */
.stamp {
  position: absolute;
  top: -12px;
  right: -10px;
  transform: rotate(6deg);
  background: var(--paper);
  color: var(--red);
  border: 2.5px solid var(--red);
  border-radius: 6px;
  padding: 3px 9px;
  font: 800 12px/1.2 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

/* extras row under the slide */
.extras {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.stickies {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sticky {
  background: var(--sticky);
  color: var(--sticky-ink);
  padding: 10px 14px 12px;
  flex: 1 1 260px;
  max-width: 520px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  transform: rotate(-0.6deg);
  font-size: 14.5px;
  position: relative;
}

.sticky:nth-child(even) {
  transform: rotate(0.7deg);
}

.sticky.trap {
  background: var(--sticky-trap);
}

.sticky.trick {
  background: var(--sticky-trick);
}

.sticky b {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.sticky::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 54px;
  height: 14px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.row-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.seen .row-label {
  color: var(--green);
}

.past .row-label {
  color: var(--red);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.links a {
  text-decoration: none;
  font-size: 13.5px;
  border-radius: 999px;
  padding: 5px 11px;
  line-height: 1.3;
}

.seen .links a {
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
}

.past .links a {
  color: var(--red);
  background: var(--red-soft);
  border: 1.5px solid var(--red);
  font-weight: 600;
}

.past .links a.rel {
  border-style: dashed;
  font-weight: 500;
}

.links a:hover {
  filter: brightness(0.92);
}

.links small {
  opacity: 0.8;
}

/* exam radar */
.radar {
  border: 1.5px solid color-mix(in srgb, var(--blue) 45%, transparent);
  background: var(--blue-soft);
  border-radius: var(--radius);
}

.radar > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.radar > summary::-webkit-details-marker {
  display: none;
}

.radar > summary::after {
  content: "▾";
  margin-left: auto;
  transition: transform 0.2s;
}

.radar:not([open]) > summary::after {
  transform: rotate(-90deg);
}

.radar-items {
  padding: 0 14px 14px;
  display: grid;
  gap: 12px;
}

.q {
  background: var(--paper);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  padding: 12px 14px;
}

.q-type {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--blue);
  color: var(--paper);
  margin-right: 6px;
}

.q-type.tf {
  background: #7a4bd1;
}

.q-type.scenario {
  background: #b5651d;
}

.q-type.short {
  background: #2c7a7b;
}

.q p {
  margin: 6px 0 10px;
  font-weight: 600;
}

.opts {
  display: grid;
  gap: 6px;
}

.opt {
  text-align: left;
  border: 1px solid var(--ui-line);
  background: var(--ui);
  border-radius: 7px;
  padding: 8px 11px;
  cursor: pointer;
  font-size: 14px;
}

.opt:hover:not([disabled]) {
  border-color: var(--blue);
}

.opt.right {
  border-color: var(--good);
  background: color-mix(in srgb, var(--good) 14%, var(--ui));
}

.opt.wrong {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, var(--ui));
  text-decoration: line-through;
}

.opt[disabled] {
  cursor: default;
}

.tf-opts {
  grid-template-columns: repeat(2, minmax(0, 160px));
}

.reveal {
  border: 1px dashed var(--blue);
  background: none;
  color: var(--blue);
  border-radius: 7px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
}

.why {
  margin: 10px 0 0;
  font-family: var(--font-hand);
  color: var(--red);
  font-size: 19px;
  line-height: 1.25;
}

.why[hidden] {
  display: none;
}

/* ---------------------------------------------------- annotations hidden */
body.no-ann .margin,
body.no-ann .extras,
body.no-ann .stamp,
body.no-ann sup.an-ref {
  display: none;
}

body.no-ann .sheet-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.no-ann mark.an-hl {
  background: none;
}

body.no-ann .an-ul {
  text-decoration: none;
}

body.no-ann .an-circle {
  outline: none;
}

/* --------------------------------------------------------------- flip mode */
.flipbar {
  display: none;
}

body.mode-flip .flipbar {
  display: flex;
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 30;
  align-items: center;
  gap: 10px;
  background: var(--ui);
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow);
  width: min(560px, calc(100% - 24px));
}

.flipbar button {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}

.flipbar button[disabled] {
  opacity: 0.35;
  cursor: default;
}

.flip-pos {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.flip-pos .track {
  display: block;
  height: 4px;
  background: var(--ui-line);
  border-radius: 99px;
  margin-top: 4px;
  overflow: hidden;
}

.flip-pos .fill {
  display: block;
  height: 100%;
  background: var(--red);
  width: 0;
  transition: width 0.25s;
}

body.mode-flip .sheet:not(.is-current) {
  display: none;
}

body.mode-flip .sheet.is-current {
  margin-bottom: 0;
}

body.mode-flip .sheet.turn-next {
  animation: turn-next 0.32s ease-out;
}

body.mode-flip .sheet.turn-prev {
  animation: turn-prev 0.32s ease-out;
}

@keyframes turn-next {
  from {
    opacity: 0;
    transform: perspective(1400px) rotateY(-9deg) translateX(40px);
    transform-origin: left center;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes turn-prev {
  from {
    opacity: 0;
    transform: perspective(1400px) rotateY(9deg) translateX(-40px);
    transform-origin: right center;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mode-flip .sheet.turn-next,
  body.mode-flip .sheet.turn-prev {
    animation: none;
  }
}

.empty-filter {
  text-align: center;
  color: var(--ink-dim);
  padding: 40px 0;
}

.as-foot {
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
  padding: 0 0 40px;
}

body.mode-flip .as-foot {
  padding-bottom: 90px;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .sheet-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .margin {
    border-left: 0;
    border-top: 2px dashed var(--red-soft);
    padding: 12px 0 0;
  }
}

@media (max-width: 640px) {
  .as-top {
    position: static;
  }

  .sheet {
    scroll-margin-top: 10px;
  }

  .as-brand strong {
    white-space: normal;
  }

  .as-controls {
    width: 100%;
  }

  .as-jump {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  /* Phones: spend the width on the slide, not on nested gutters. */
  .as-wrap {
    padding: 0 6px;
  }

  .sheet {
    padding: 10px 6px;
  }

  .slide-head,
  .slide-body {
    padding-left: 2.2cqw;
    padding-right: 2.2cqw;
  }

  .radar-items {
    padding: 0 0 8px;
  }

  .q {
    padding: 10px 8px;
  }

  .slide-body.has-fig,
  .slide-cols,
  .pcard-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .pcard-lead {
    border-right: 0;
    border-bottom: 1px solid #555;
    padding: 0 0 2cqw;
  }

  .slide-inner {
    min-height: 0;
  }

  .slide.section .slide-inner,
  .slide.title .slide-inner {
    min-height: 56.25cqw;
    padding-bottom: 6cqw;
  }

  .stamp {
    right: -4px;
    top: -10px;
  }

  .margin,
  .prof-note {
    font-size: 19px;
  }
}

@media print {
  .as-top,
  .flipbar {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .sheet {
    box-shadow: none;
    break-inside: avoid;
  }

  body.mode-flip .sheet:not(.is-current) {
    display: block;
  }
}
