:root {
  --paper: #fbfaf6;
  --ink: #152936;
  --muted: #516470;
  --line: #d5dfdc;
  --accent: #087b73;
  --tint: #eaf3ef;
  --r-background-color: var(--paper);
  --r-main-color: var(--ink);
  --r-main-font: Arial, Helvetica, sans-serif;
  --r-main-font-size: 30px;
  --r-heading-font: Arial, Helvetica, sans-serif;
  --r-heading-color: var(--ink);
  --r-heading-text-transform: none;
  --r-heading-font-weight: 650;
  --r-link-color: var(--accent);
  --r-link-color-hover: var(--ink);
  --r-selection-background-color: #bee5d8;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--paper); }
a { color: var(--accent); }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.accent-blue { --accent: #315fbd; --tint: #edf1fb; }
.accent-plum { --accent: #79538e; --tint: #f3edf6; }
.accent-amber { --accent: #94521d; --tint: #f7eee2; }
.eyebrow, .label { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The catalogue groups the available lecture decks by teaching day. */
.catalogue { min-height: 100vh; }
.catalogue-main { max-width: 1280px; margin: auto; padding: 32px 48px 28px; }
.event-heading { display: flex; gap: 12px; align-items: center; letter-spacing: .08em; font-size: 16px; font-weight: 700; }
.event-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); }
.event-type { margin-left: auto; font-size: 13px; font-weight: 400; letter-spacing: .02em; color: var(--muted); }
.catalogue-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; font-size: 14px; }
.catalogue-actions a { text-decoration: none; text-underline-offset: 4px; }
.catalogue-actions a:hover { text-decoration: underline; }
.catalogue-intro { margin: 38px 0 30px; }
.catalogue .eyebrow { font-size: 13px; margin: 0 0 20px; }
.catalogue h1 { font-size: clamp(40px, 5vw, 60px); line-height: 1.08; letter-spacing: -.045em; margin: 0 0 22px; font-weight: 600; }
.intro-copy { max-width: 620px; font-size: 18px; color: var(--muted); line-height: 1.6; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.catalogue-day { margin: 35px 0 45px; }
.catalogue-day-title { font-size: 21px; font-weight: 600; margin: 0 0 20px; }
.catalogue-day-title span { color: var(--muted); font-weight: 400; }
.module-card { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 4px; text-decoration: none; color: var(--ink); background: #fffefa; transition: transform .15s, box-shadow .15s; }
.module-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px #1529360d; }
.module-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.module-number { font-size: 38px; font-weight: 600; letter-spacing: -.05em; color: var(--accent); }
.module-card h2 { margin: 28px 0 12px; font-size: 26px; line-height: 1.16; letter-spacing: -.02em; }
.module-card h2 a { color: inherit; text-decoration: none; }
.module-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.module-card .module-topics { font-size: 11px; padding: 25px 0; margin-top: auto; color: var(--accent); }
.module-card-bottom { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); color: var(--accent); font-size: 14px; font-weight: 700; }
.module-card-bottom a { text-decoration: none; text-underline-offset: 4px; }
.module-card a:hover { text-decoration: underline; }

/* The deck has one unobtrusive toolbar; Reveal handles navigation and scaling. */
.deck { height: 100vh; height: 100dvh; overflow: hidden; }
.deck-toolbar { position: relative; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px; border-bottom: 1px solid var(--line); font-size: 12px; z-index: 20; background: var(--paper); }
.deck-toolbar a { text-decoration: none; font-weight: 600; white-space: nowrap; }
.deck-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-name > span { margin: 0 9px; color: #acb9ba; }
.deck-toolbar button { border: 1px solid var(--line); padding: 6px 10px; background: transparent; border-radius: 4px; color: var(--ink); cursor: pointer; font: inherit; white-space: nowrap; }
.deck-toolbar button:hover { background: var(--tint); }
.deck-toolbar button span { margin-left: 7px; }
.reveal { height: calc(100% - 48px); color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 30px; line-height: 1.36; }
.reveal .slides { text-align: left; }
.reveal .slides > section { height: 100%; padding: 26px 42px; box-sizing: border-box; }
.reveal h1, .reveal h2 { color: var(--ink); font-family: inherit; font-weight: 650; text-transform: none; text-shadow: none; word-wrap: normal; }
.reveal h1 { font-size: 78px; line-height: 1.06; letter-spacing: -.045em; margin: 62px 0 28px; max-width: 950px; }
.reveal h2 { font-size: 46px; line-height: 1.12; letter-spacing: -.027em; margin: 0 0 25px; max-width: 1160px; }
.reveal p { margin: 0 0 20px; }
.reveal .eyebrow { font-size: 17px; line-height: 1.3; margin: 0 0 22px; }
.reveal .label { font-size: 16px; line-height: 1.4; margin: 0 0 18px; }
.reveal strong { font-weight: 700; }
.reveal .caption { font-size: 22px; line-height: 1.35; color: var(--muted); margin: 14px 0 0; }
.reveal .takeaway { margin-top: 25px; padding: 16px 0 0; border-top: 2px solid var(--accent); font-size: 27px; line-height: 1.35; }
.reveal .question { color: var(--accent); font-size: 29px; font-weight: 600; margin-top: 24px; }
.reveal .callout { padding: 18px 22px; background: var(--tint); border-left: 3px solid var(--accent); margin-top: 24px; }
.reveal .columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; align-items: center; margin-top: 22px; }
.reveal .columns.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.reveal .columns.compact { margin-top: 15px; }
.reveal .panel { min-width: 0; padding: 26px; background: var(--tint); border-radius: 5px; }
.reveal .panel > :last-child { margin-bottom: 0; }
.reveal .panel p { font-size: 27px; }
.reveal .panel p.label { font-size: 16px; }
.reveal .panel p.caption { font-size: 22px; }
.reveal .math { font-size: 30px; }
.reveal .large-math { font-size: 38px; }
.reveal .katex { font-size: 1.06em; }
.reveal .katex-display { margin: 18px 0; text-align: left; }
.reveal .katex-display > .katex { text-align: left; }
.reveal .answer-example { background: var(--tint); border-left: 4px solid var(--accent); padding: 8px 24px; margin-top: 22px; }
.reveal table { font-size: 25px; width: 100%; border-collapse: collapse; border-spacing: 0; margin: 24px 0 0; }
.reveal table th { color: var(--accent); font-size: 19px; font-weight: 700; background: var(--tint); padding: 14px 18px; border-bottom: 1px solid var(--line); }
.reveal table td { padding: 18px; border-bottom: 1px solid var(--line); line-height: 1.35; }
.reveal table th, .reveal table td { text-align: left; vertical-align: middle; }
.reveal table tr:last-child td { border-bottom: 1px solid var(--line); }
.reveal .compact-table th, .reveal .compact-table td { padding: 11px 18px; }
.reveal .sequence-table { font-size: 25px; }
.reveal .claim-list { margin-top: 42px; }
.reveal .claim-list p { display: flex; gap: 24px; align-items: baseline; padding: 17px 0; margin: 0; font-size: 32px; }
.reveal .claim-list span { color: var(--accent); font-size: 23px; font-weight: 700; }
.reveal .cover { position: relative; }
.reveal .cover-number { position: absolute; right: 48px; top: 18px; color: var(--accent); opacity: .12; font-size: 190px; font-weight: 700; letter-spacing: -.07em; line-height: 1; }
.reveal .cover-message { font-size: 35px; line-height: 1.4; max-width: 980px; color: var(--muted); margin-top: 36px; }
.reveal .roadmap { display: flex; justify-content: space-between; gap: 20px; position: absolute; bottom: 65px; left: 42px; right: 42px; border-top: 2px solid var(--accent); padding-top: 22px; font-size: 20px; color: var(--accent); }
.reveal .exercise-stack { display: grid; gap: 14px; margin: 22px 0; }
.reveal .exercise-row { display: flex; align-items: center; min-height: 82px; padding: 8px 24px; gap: 35px; background: var(--tint); border-radius: 4px; }
.reveal .exercise-number { font-size: 24px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.reveal .exercise-row .math { flex: 1; }
.reveal .exercise-row .katex-display { margin: 10px 0; }
.reveal .next-module { font-size: 21px; margin: 22px 0 0; color: var(--muted); }
.reveal .next-module a { text-underline-offset: 5px; text-decoration: underline; }
.reveal .controls { color: var(--accent); }
.reveal .progress { height: 4px; color: var(--accent); background: #dce3df; }
.reveal .slide-number { right: auto; left: 22px; bottom: 15px; padding: 0; color: var(--muted); background: transparent; font: 12px Arial, sans-serif; }
.reveal .slide-number a { text-decoration: none; }
.reveal.overview .slides > section { background: var(--paper); border: 2px solid var(--line); }
.reveal.overview .slides > section.present { border-color: var(--accent); }
.no-script { position: fixed; inset: auto 0 0; padding: 16px; background: #fff1d6; font-size: 16px; z-index: 100; }

/* Keep the slide canvas and its padding when Reveal creates PDF pages. */
html.reveal-print .deck-toolbar { display: none; }
html.reveal-print .reveal .slides section { height: 720px !important; padding: 26px 42px !important; }

/* Diagrams use vector geometry and the same typography as the surrounding slide. */
.reveal svg[role="img"] { display: block; max-width: 100%; height: auto; overflow: visible; }
.reveal .energy-diagram { width: 420px; margin: auto; }
.energy-axis { fill: none; stroke: var(--muted); stroke-width: 2; }
.energy-level { fill: none; stroke: var(--accent); stroke-width: 4; }
.energy-label { font: 32px Arial, sans-serif; fill: var(--ink); }
.figure-caption { font: 22px Arial, sans-serif; fill: var(--muted); }
.atom { fill: var(--accent); }
.atom-outline { fill: var(--tint); stroke: var(--accent); stroke-width: 3; }
.reveal .sphere-layout { grid-template-columns: 1.25fr 1fr; gap: 40px; margin-top: 0; }
.reveal .bloch-sphere { height: 425px; margin: auto; }
.sphere-fill { fill: var(--tint); stroke: var(--accent); stroke-width: 2; }
.sphere-back { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .7; }
.sphere-line, .sphere-meridian { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .6; }
.sphere-axis { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .65; }
.sphere-points { fill: var(--accent); }
.sphere-label { font: 29px Arial, sans-serif; fill: var(--ink); }
.sphere-projection { fill: none; stroke: #ac6543; stroke-width: 1.5; stroke-dasharray: 5 5; }
.state-arrow { fill: none; stroke: #ac6543; stroke-width: 4; }
.state-point { fill: #ac6543; }
.angle-arc { fill: none; stroke: #ac6543; stroke-width: 2; }
.angle-label { font: italic 28px Georgia, serif; fill: #925030; }
.reveal .probabilities { height: 255px; display: flex; justify-content: space-around; gap: 24px; padding: 5px 22px; }
.reveal .probability { display: flex; flex-direction: column; align-items: center; flex: 1; font-size: 23px; gap: 8px; max-width: 90px; }
.reveal .probability strong { font-size: 22px; color: var(--accent); }
.bar-track { position: relative; height: 164px; width: 100%; border-bottom: 2px solid var(--accent); background: #ffffff80; }
.bar { position: absolute; left: 0; bottom: 0; width: 100%; background: var(--accent); opacity: .8; border-radius: 4px 4px 0 0; }
.reveal .circuit { width: 100%; margin: 8px auto; }
.wires, .control-line { stroke: var(--ink); stroke-width: 2.5; fill: none; }
.gate { fill: var(--paper); stroke: var(--accent); stroke-width: 2.5; }
.gate.measurement { fill: var(--paper); stroke: var(--muted); }
.gate-label { font: 600 27px Arial, sans-serif; fill: var(--accent); text-anchor: middle; }
.circuit-labels { font: 25px Arial, sans-serif; fill: var(--ink); }
.control-dot { fill: var(--accent); }
.target { stroke: var(--accent); stroke-width: 2.5; fill: var(--paper); }
.meter { fill: none; stroke: var(--muted); stroke-width: 2; }
.reveal .wide-circuit { max-width: 840px; margin: 18px auto; }
.reveal .wide-circuit .circuit { max-height: 135px; }
.reveal .circuit-exercises .exercise-row { height: 104px; }
.reveal .circuit-exercises .circuit { width: 660px; height: 93px; margin: 0 auto; }
.reveal .gate-vocabulary { align-items: stretch; }
.reveal .gate-vocabulary .math { font-size: 29px; }
.reveal .coefficient-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 25px 0; gap: 18px; }
.coefficient-grid > div { display: flex; flex-direction: column; gap: 15px; padding: 24px; background: var(--tint); font-size: 38px; }
.coefficient-grid span { font-size: 19px; font-weight: 700; color: var(--accent); }
.reveal .basis-mappings .katex-display { margin: 18px 0; }
.reveal .protocol-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 35px 0 28px; }
.protocol-steps > div { border-top: 2px solid var(--accent); padding-top: 18px; }
.protocol-steps span { font-size: 17px; color: var(--accent); font-weight: 700; }
.protocol-steps p { margin-top: 18px; font-size: 28px; }
.reveal .two-qubit-exercises { margin: 35px 0; align-items: stretch; }
.reveal .two-qubit-exercises .panel { padding: 24px 15px; }
.reveal .two-qubit-exercises .label { min-height: 47px; }

@media (max-width: 760px) {
  .catalogue-main { padding: 24px; }
  .event-type { max-width: 125px; text-align: right; line-height: 1.4; font-size: 11px; }
  .catalogue-intro { margin-top: 46px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { padding: 25px; }
  .module-card h2 { margin-top: 18px; }
  .module-card .module-topics { padding: 20px 0; }
  .deck-toolbar { padding: 0 12px; gap: 12px; }
  .deck-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .module-card { transition: none; }
  .module-card:hover { transform: none; }
  .reveal .fragment { transition: none; }
}
