:root {
  --paper: #fafaf8;
  --ink: #0a0a0a;
  --grey-1: #f0f0ee;
  --grey-2: #d4d4d2;
  --grey-3: #737373;
  --accent: #c5e803;
  --accent-on: #0a0a0a;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --sans-zh: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--grey-1);
  color: var(--ink);
  font-family: var(--sans), var(--sans-zh);
  -webkit-font-smoothing: antialiased;
}

.p-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--grey-2);
  background: var(--paper);
}

.p-toolbar strong,
.p-toolbar span,
.p-toolbar a,
.p-chrome,
.meta {
  font-family: var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.p-toolbar strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}

.p-toolbar span {
  display: block;
  margin-top: 4px;
  color: var(--grey-3);
  font-size: 10px;
}

.p-toolbar a {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 0 12px;
  text-decoration: none;
  font-size: 10px;
}

.p-toolbar a:hover {
  background: var(--accent);
}

.p-deck {
  display: grid;
  gap: 28px;
  justify-items: center;
  padding: 28px 0 64px;
}

.p-slide {
  position: relative;
  width: min(100vw, 540px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

.p-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.p-slide.ink {
  background: var(--ink);
  color: var(--paper);
}

.p-slide.accent {
  background: var(--accent);
  color: var(--accent-on);
}

.p-slide.grey {
  background: var(--grey-1);
}

.p-chrome {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 5vw;
  border-bottom: 1px solid currentColor;
  background: var(--paper);
  color: var(--ink);
  font-size: 9px;
}

.ink .p-chrome {
  background: var(--ink);
  color: var(--paper);
}

.accent .p-chrome {
  background: var(--accent);
  color: var(--accent-on);
}

.p-copy {
  position: absolute;
  z-index: 2;
  width: 52%;
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  padding: 4.2% 4vw;
}

.p-copy.left {
  left: 0;
  top: 16%;
}

.p-copy.right {
  right: 0;
  top: 17%;
}

.p-copy.top {
  left: 0;
  right: 0;
  top: 11.8%;
  width: 100%;
}

.p-copy.bottom {
  left: 0;
  bottom: 7.5%;
}

.ink-panel {
  background: var(--ink);
  color: var(--paper);
}

.accent-panel {
  background: var(--accent);
  color: var(--accent-on);
}

.meta {
  margin: 0 0 10px;
  color: var(--grey-3);
  font-size: 8px;
  line-height: 1.4;
}

.ink-panel .meta {
  color: rgba(250, 250, 248, .66);
}

.accent-panel .meta {
  color: rgba(10, 10, 10, .7);
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-weight: 200;
  line-height: .98;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(42px, 12vw, 76px);
}

h2 {
  font-size: clamp(23px, 6vw, 36px);
}

.p-copy p:last-child {
  margin-top: 12px;
  font-size: clamp(12px, 2.7vw, 15px);
  font-weight: 300;
  line-height: 1.55;
}

@media (max-width: 560px) {
  .p-toolbar {
    height: 42px;
    padding: 7px 10px;
  }

  .p-toolbar span,
  .p-toolbar a {
    display: none;
  }

  .p-deck {
    display: block;
    padding: 0;
  }

  .p-slide {
    width: 100%;
  }
}

body.export-mode {
  overflow: hidden;
  background: var(--paper);
}

body.export-mode .p-toolbar {
  display: none !important;
}

body.export-mode .p-deck {
  display: block;
  width: 100vw;
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

body.export-mode .p-slide {
  display: none;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

body.export-mode .p-slide.export-active {
  display: block;
}

@media print {
  @page {
    size: 1080px 1920px;
    margin: 0;
  }

  .p-toolbar {
    display: none;
  }

  .p-deck {
    display: block;
    padding: 0;
  }

  .p-slide {
    width: 1080px;
    height: 1920px;
    break-after: page;
    page-break-after: always;
  }
}
