body.fio-site-page:has(.fio-manifesto) {
  --fio-page-background: #0000ff;
  --fio-menu-toggle-color: yellow;
  color: white;
  height: 100svh;
  overflow: hidden;
}
html:has(.fio-manifesto) { height: 100%; overflow: hidden; }
body:has(.fio-manifesto) .fio-site-header { color: white; }
body:has(.fio-manifesto) .fio-site-header :is(a:hover, a[aria-current]) { color: yellow; }
body:has(.fio-manifesto) .fio-site-header :focus-visible,
.fio-manifesto :focus-visible { outline: 2px solid yellow; outline-offset: 4px; }
.fio-manifesto [hidden] { display: none !important; }
.fio-manifesto-mobile-turn { display: none; }
.fio-manifesto {
  --manifesto-top: max(60px, 8.2dvh, env(safe-area-inset-top));
  --manifesto-bottom: max(20px, 3.6dvh, env(safe-area-inset-bottom));
  box-sizing: border-box;
  height: 100dvh;
  padding: var(--manifesto-top) 0 var(--manifesto-bottom);
  font: 400 16px/1.35 "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.fio-manifesto > section { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 0; }
.fio-manifesto button {
  appearance: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 0;
}
.fio-manifesto-book {
  --book-height: calc(100svh - var(--manifesto-top) - var(--manifesto-bottom));
  position: relative;
  inset-block-start: calc(-1 * clamp(6px, 1.5dvh, 16px));
  isolation: isolate;
  width: min(90vw, calc(var(--book-height) * 1.5));
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  flex: none;
  perspective: 2400px;
  scroll-margin-top: 80px;
}
.fio-manifesto-scan {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.fio-manifesto-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fio-manifesto-book.is-interactive .fio-manifesto-pages {
  height: 100%;
  aspect-ratio: 3 / 2;
  touch-action: pan-y pinch-zoom;
}
.fio-manifesto-page { position: relative; min-width: 0; }
.fio-manifesto-page svg { display: block; overflow: hidden; width: 100%; height: auto; aspect-ratio: 3 / 4; }
.fio-manifesto-art-detail { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: grab !important; }
.fio-manifesto-book.is-interactive .fio-manifesto-page { height: 100%; overflow: hidden; }
.fio-manifesto-paper {
  box-sizing: border-box;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 3 / 4;
  padding: 7% 9%;
  color: white;
}
.fio-manifesto-paper-title { margin: 0; font-size: clamp(14px, 1.2vw, 18px); }
.fio-manifesto-verse { padding-block: 1em; }
.fio-manifesto-verse p {
  margin: 0 0 .7em;
  font-size: clamp(26px, 3.2vw, 60px);
  font-size: clamp(24px, 10.8cqw, 64px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.045em;
  overflow-wrap: normal;
}
.fio-manifesto-verse p:last-child { margin: 0; }
.fio-manifesto-paper footer { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.fio-manifesto-paper:focus-visible { outline-color: #0000ff; }
.fio-manifesto-leaf {
  position: absolute;
  inset: 0 0 0 50%;
  z-index: 3;
  pointer-events: none;
  transform-origin: left center;
  transform-style: preserve-3d;
  will-change: transform;
}
.fio-manifesto-leaf[data-direction="back"] { inset: 0 50% 0 0; transform-origin: right center; }
.fio-manifesto-leaf-face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; background: white; }
.fio-manifesto-leaf-back { transform: rotateY(180deg); }
.fio-manifesto-leaf-face > .fio-manifesto-page { width: 100%; height: 100%; }
.fio-manifesto-leaf-face > .fio-manifesto-paper { padding: 14% 18%; }
.fio-manifesto-leaf-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #00000044, transparent 30%, #00000022);
  opacity: var(--fold-shade, 0);
}
.fio-manifesto-book[data-turning] { cursor: grabbing; }
.fio-manifesto-book[data-turning] .fio-manifesto-pages { user-select: none; }
.fio-manifesto-controls,
.fio-manifesto-page-hint { width: min(90vw, 1100px); margin-inline: auto; }
.fio-manifesto-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; margin-top: 26px; }
.fio-manifesto-turn-controls,
.fio-manifesto-view-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.fio-manifesto-controls button { padding: 10px 0; min-height: 44px; border: 0; background: none; }
.fio-manifesto-controls button:is(:hover, [aria-pressed="true"]) { color: yellow; }
.fio-manifesto-controls button:disabled { opacity: .35; cursor: default; }
.fio-manifesto-controls button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: .25em; }
.fio-manifesto-progress { min-width: 88px; text-align: center; font-size: 14px; }
.fio-manifesto-page-hint { margin-top: 12px; margin-bottom: 0; font-size: 14px; opacity: .85; text-align: center; }
.fio-manifesto a { color: inherit; text-underline-offset: .2em; }
.fio-manifesto a:is(:hover, :focus-visible) { color: yellow; }
.fio-articles {
  box-sizing: border-box;
  min-height: 100dvh;
  padding-block: clamp(72px, 8.4dvh, 102px) max(28px, 4dvh, env(safe-area-inset-bottom));
  padding-inline: max(5.5vw, env(safe-area-inset-left)) max(3.2vw, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5dvh, 30px);
  font: 400 clamp(16px, 1vw, 21px)/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.fio-articles a { color: inherit; text-underline-offset: .2em; }
.fio-articles a:is(:hover, :focus-visible) { opacity: .75; }
.fio-articles h1 {
  margin: 0;
  font-size: clamp(48px, min(7.6vw, 14dvh), 160px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.075em;
  text-transform: uppercase;
}
.fio-articles-header p { margin: .9em 0 .8em; }
.fio-articles > section, .fio-manifesto-articles, .fio-manifesto-articles li {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.fio-manifesto-articles {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #FAF8F299;
}
.fio-manifesto-articles li { border-bottom: 1px solid #FAF8F299; }
.fio-manifesto-articles a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: .55em;
  font-size: clamp(18px, 1.9vw, 39px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.04em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.fio-manifesto-articles a svg { flex: none; width: .85em; height: .85em; }
.fio-articles-methodology { align-self: flex-start; display: inline-flex; align-items: center; gap: .5em; }
html:has(.fio-articles), body.fio-site-page:has(.fio-articles) {
  --fio-page-background: #000000;
  --fio-menu-toggle-color: #FAF8F2;
  background: #000000;
  color: #FAF8F2;
  color-scheme: dark;
}
body:has(.fio-articles) .fio-site-header,
body:has(.fio-articles) .fio-site-header .fio-site-menu a:is(:hover, [aria-current]) { color: #FAF8F2; }
@media (max-width: 650px) {
  .fio-articles {
    padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right));
    gap: 19px;
  }
  .fio-articles h1 { font-size: clamp(48px, 13vw, 80px); }
  .fio-manifesto-articles a { padding-block: .72em; }
}
.fio-manifesto.is-ink-ready .fio-manifesto-pages .fio-manifesto-lettering { mask: var(--ink-mask); }
.fio-manifesto.is-ink-ready .fio-manifesto-ink-stroke {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  opacity: 0;
}
.fio-manifesto.is-writing .fio-manifesto-ink-stroke { animation: manifesto-write var(--ink-duration) linear var(--ink-delay) forwards; }
@keyframes manifesto-write {
  0% { opacity: 0; }
  2% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
.fio-manifesto-detail {
  width: min(96vw, 1500px);
  height: 94svh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid #FAF8F266;
  background: #0000ff;
  color: white;
}
.fio-manifesto-detail[open] { display: flex; flex-direction: column; }
.fio-manifesto-detail::backdrop { background: #000000bb; }
body:has(.fio-manifesto-detail[open]) { overflow: hidden; }
.fio-manifesto-detail-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: 8px 20px; border-bottom: 1px solid #FAF8F255; }
.fio-manifesto-detail-toolbar h2 { margin: 0; font-size: 16px; font-weight: 400; }
.fio-manifesto-detail-toolbar [role="group"] { display: flex; align-items: center; gap: 14px; }
.fio-manifesto-detail-toolbar button { min-height: 44px; min-width: 44px; padding: 4px; border: 0; background: none; }
.fio-manifesto-detail-toolbar button:is(:hover, [aria-pressed="true"]) { color: yellow; }
.fio-manifesto-detail-toolbar button:disabled { opacity: .35; cursor: default; }
.fio-manifesto-detail-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.fio-manifesto-detail-canvas { width: max(100%, var(--detail-width, 0px)); display: grid; justify-items: center; min-height: 100%; }
.fio-manifesto-detail-canvas svg { display: block; width: var(--detail-width, 450px); height: auto; }
@media (min-width: 651px) and (max-height: 580px) {
  .fio-manifesto-book { --book-height: calc(100svh - var(--manifesto-top) - var(--manifesto-bottom) - 88px); }
  .fio-manifesto-paper { padding: 4% 6%; }
  .fio-manifesto-leaf-face > .fio-manifesto-paper { padding: 8% 12%; }
  .fio-manifesto-verse { padding-block: 0; }
  .fio-manifesto-verse p { font-size: clamp(16px, 10.8cqw, 38px); margin-bottom: .5em; }
  .fio-manifesto-paper-title { font-size: 14px; }
  .fio-manifesto-paper footer { font-size: 12px; }
  .fio-manifesto-controls { margin-top: 10px; }
  .fio-manifesto-page-hint { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .fio-manifesto .fio-manifesto-lettering { mask: none !important; }
  .fio-manifesto .fio-manifesto-ink-stroke { animation: none !important; }
  .fio-manifesto-leaf { display: none !important; }
}

/* Illustrated, reading and visitor drawing spreads. */
.fio-manifesto-pages.is-pointer-focused:focus-visible { outline: none; }
.fio-manifesto-book {
  --book-height: calc(100svh - var(--manifesto-top) - var(--manifesto-bottom));
  width: min(90vw, calc(var(--book-height) * 1.5));
}
.fio-manifesto-pages { position: relative; }
.fio-manifesto-art[data-art-side="left"] { grid-area: 1 / 1; z-index: 1; }
.fio-manifesto-art[data-art-side="right"] { grid-area: 1 / 2; z-index: 1; }
.fio-manifesto-paper {
  grid-area: 1 / 1 / 2 / 3; justify-self: center; box-sizing: border-box;
  display: block; width: 50%; padding: 0;
}
.fio-manifesto-curl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.fio-manifesto-book[data-turning="desktop"] { z-index: 101; }
.fio-manifesto-book[data-turning="desktop"] .fio-manifesto-curl {
  inset: calc(-1 * var(--curl-bleed-y)) auto auto calc(-1 * var(--curl-bleed-x));
  width: calc(100% + 2 * var(--curl-bleed-x));
  height: calc(100% + 2 * var(--curl-bleed-y));
}
.fio-manifesto-paper[data-drawing-side="left"] { grid-area: 1 / 1; width: 100%; }
.fio-manifesto-paper[data-drawing-side="right"] { grid-area: 1 / 2; width: 100%; }
.fio-manifesto-rail {
  --article-rail-button: var(--fio-section-row, 44px);
  position: fixed; z-index: 4; top: 50%; left: var(--fio-section-left);
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center;
  width: var(--article-rail-button);
  /* Keep Article in place while the two drawing actions are hidden. */
  height: calc(var(--article-rail-button) * 3 + 19px);
}
.fio-manifesto-articles-link {
  position: relative; display: grid; place-items: center;
  width: var(--article-rail-button); height: var(--article-rail-button);
  flex: none;
  font: var(--fio-navigation-font);
  letter-spacing: var(--fio-navigation-tracking);
  text-transform: uppercase;
  text-decoration: none;
}
.fio-manifesto-articles-link svg {
  display: block; flex: none; width: 24px; height: 24px;
}
.fio-manifesto-article-tip {
  position: absolute; top: 50%; left: calc(100% + 9px);
  transform: translateY(-50%);
  padding: 5px 8px; border: 1px solid #FAF8F24d; border-radius: 4px;
  background: #0000ff; color: white; white-space: nowrap;
  font-size: 14px; line-height: 1.3;
  visibility: hidden; pointer-events: none;
}
.fio-manifesto-articles-link:is(:hover, :focus-visible) .fio-manifesto-article-tip { visibility: visible; }


.fio-articles-background { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #000000; }
.fio-articles-background img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.fio-articles-background img:nth-child(2) { object-position: 40% center; }
.fio-articles-background img:nth-child(3) { object-position: 10% center; }
.fio-articles-background img:nth-child(7) { object-position: 58% center; }
.fio-articles-background img:nth-child(8) { object-position: 34% center; }

@media (prefers-reduced-motion: no-preference) {
  .fio-articles-background img:not(:first-child) {
    opacity: 0;
    animation: fio-articles-frame 3s step-end infinite;
  }
  .fio-articles-background img:nth-child(2) { animation-delay: 0.375s; }
  .fio-articles-background img:nth-child(3) { animation-delay: 0.75s; }
  .fio-articles-background img:nth-child(4) { animation-delay: 1.125s; }
  .fio-articles-background img:nth-child(5) { animation-delay: 1.5s; }
  .fio-articles-background img:nth-child(6) { animation-delay: 1.875s; }
  .fio-articles-background img:nth-child(7) { animation-delay: 2.25s; }
  .fio-articles-background img:nth-child(8) { animation-delay: 2.625s; }
}
@media (prefers-reduced-motion: reduce) {
  .fio-articles-background img:not(:first-child) { display: none; }
}
@keyframes fio-articles-frame {
  from { opacity: 1; }
  12.5%, to { opacity: 0; }
}
.fio-articles-background::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .35); }
.fio-articles { position: relative; z-index: 1; }

/* Ink lives in the paper coordinate system, including while pages are resized. */
.fio-manifesto-ink-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
}
.fio-manifesto-book[data-spread="draw"] .fio-manifesto-pages {
  touch-action: none;
  cursor: crosshair;
}
.fio-manifesto-book[data-ink-edge="back"][data-can-prev="true"] .fio-manifesto-pages,
.fio-manifesto-book[data-ink-edge="next"][data-can-next="true"] .fio-manifesto-pages { cursor: grab; }
.fio-manifesto-book[data-turning] .fio-manifesto-pages { cursor: grabbing; }

/* A lifted paper corner suggests turning without adding a menu. */
.fio-manifesto-pages::before,
.fio-manifesto-pages::after {
  content: "";
  position: absolute;
  bottom: 0;
  z-index: 2;
  width: clamp(22px, 2.1vw, 30px);
  height: clamp(22px, 2.1vw, 30px);
  pointer-events: none;
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.fio-manifesto-pages::before {
  left: 0;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  background: linear-gradient(135deg, #7181ed, #1723a5);
  transform-origin: bottom left;
}
.fio-manifesto-pages::after {
  right: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  background: linear-gradient(225deg, #7181ed, #1723a5);
  transform-origin: bottom right;
}
.fio-manifesto-book[data-can-prev="true"] .fio-manifesto-pages::before,
.fio-manifesto-book[data-can-next="true"] .fio-manifesto-pages::after { opacity: .8; }
.fio-manifesto-book[data-ink-edge="back"] .fio-manifesto-pages::before,
.fio-manifesto-book[data-ink-edge="next"] .fio-manifesto-pages::after { transform: scale(1.3); }
.fio-manifesto-book[data-turning] .fio-manifesto-pages::before,
.fio-manifesto-book[data-turning] .fio-manifesto-pages::after { opacity: 0; }

/* Icon actions live outside the book's layout, beneath Article. */
.fio-manifesto-drawing-actions {
  position: relative; display: flex; flex-direction: column;
  width: var(--article-rail-button); margin-top: 19px;
}
.fio-manifesto-drawing-actions::before {
  content: ""; position: absolute; inset: -10px 4px auto;
  height: 1px; background: #FAF8F24d; pointer-events: none;
}
.fio-manifesto-drawing-actions button {
  display: grid; place-items: center;
  width: var(--article-rail-button); height: var(--article-rail-button);
  min-width: 40px; min-height: 40px;
  padding: 0; border: 0; background: transparent;
}
.fio-manifesto-drawing-actions svg { display: block; width: 24px; height: 24px; }
.fio-manifesto-drawing-actions button:is(:hover, :focus-visible),
.fio-manifesto-drawing-actions [data-state="sent"] { color: yellow; }
.fio-manifesto-drawing-actions button:disabled { opacity: .35; cursor: default; }
.fio-manifesto-drawing-actions [data-state="sent"]:disabled { opacity: 1; }
.fio-manifesto-drawing-actions .fio-manifesto-send-check { display: none; }
.fio-manifesto-drawing-actions [data-state="sent"] .fio-manifesto-send-plane { display: none; }
.fio-manifesto-drawing-actions [data-state="sent"] .fio-manifesto-send-check { display: block; }
.fio-manifesto-send-feedback {
  position: absolute; z-index: 6;
  box-sizing: border-box;
  top: calc(100% - var(--article-rail-button));
  left: calc(100% + 8px);
  width: max-content;
  max-width: min(300px, calc(100vw - 92px));
  padding: 10px 14px;
  border: 1px solid #FAF8F288;
  background: #0000ff; color: white;
  font-size: 14px; line-height: 1.4;
}
.fio-manifesto-send-feedback p { margin: 0; }
#manifesto-verification { line-height: 0; }
@media (prefers-reduced-motion: no-preference) {
  .fio-manifesto-drawing-actions [data-state="sending"] svg { animation: manifesto-send-pulse .8s ease-in-out infinite alternate; }
}
@keyframes manifesto-send-pulse { to { opacity: .35; } }

/* Compact viewports use separate full-screen artwork and drawing surfaces. */
@media (max-width: 650px), (max-aspect-ratio: 4/5), (max-width: 880px) and (min-height: 581px), (max-width: 960px) and (max-height: 500px) and (pointer: coarse) {
  .fio-manifesto {
    padding: 0;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }
  .fio-manifesto > section { position: relative; }
  .fio-manifesto-book {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    margin: 0;
    perspective: none;
  }
  .fio-manifesto-scan,
  .fio-manifesto-pages::before,
  .fio-manifesto-pages::after,
  .fio-manifesto-pages > :not([data-mobile-page]) { display: none !important; }
  .fio-manifesto-book .fio-manifesto-pages,
  .fio-manifesto-book.is-interactive .fio-manifesto-pages {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    overflow: hidden;
    touch-action: pinch-zoom;
  }
  .fio-manifesto-book .fio-manifesto-page[data-mobile-page] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    background: #0000ff;
  }
  .fio-manifesto-book[data-spread="draw"] .fio-manifesto-pages {
    touch-action: none;
  }
  .fio-manifesto-mobile-paper::before,
  .fio-manifesto-mobile-paper > .fio-manifesto-ink-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }
  .fio-manifesto-mobile-art > svg {
    /* Type fills the same surface as the navigation, including behind the icons. */
    position: absolute;
    inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right));
    height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    aspect-ratio: auto;
  }
  .fio-manifesto-mobile-art [data-mobile-layout="landscape"] { display: none; }
  .fio-manifesto-mobile-paper::before {
    content: "";
    background: url("/manifesto/mobile-paper.svg") center / 100% 100% no-repeat;
    pointer-events: none;
  }
  .fio-manifesto-rail {
    --article-rail-button: 44px;
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
    height: 44px;
    transform: none;
    flex-direction: row;
  }
  .fio-manifesto-drawing-actions {
    flex-direction: row;
    width: auto;
    margin: 0 0 0 16px;
  }
  .fio-manifesto-drawing-actions::before {
    inset: 6px auto 6px -8px;
    width: 1px;
    height: auto;
  }
  .fio-manifesto-article-tip {
    top: auto;
    bottom: calc(100% + 8px);
    left: 0;
    transform: none;
  }
  .fio-manifesto-send-feedback {
    top: auto;
    bottom: calc(100% + 12px);
    left: 0;
    max-width: min(300px, calc(100vw - 24px));
  }
  .fio-manifesto-mobile-turn {
    position: fixed;
    z-index: 4;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
  }
  .fio-manifesto-mobile-turn svg { width: 23px; height: 23px; }
  .fio-manifesto-mobile-turn[data-direction="back"] svg { transform: rotate(-135deg) !important; }

  @media (orientation: landscape) {
    .fio-manifesto-mobile-art [data-mobile-layout="portrait"] { display: none; }
    .fio-manifesto-mobile-art [data-mobile-layout="landscape"] { display: inline; }
  }
}
