/* Local system fonts and static decoration: no network resources or motion. */
:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-weight: 400;
  line-height: 1.7;
  --page: #fff5f8;
  --paper: #fffcfd;
  --ink: #352735;
  --accent: #873d5b;
  --muted: #765567;
  --line: #e8d0da;
  --panel-corners: 0.3rem 3.5rem 0.3rem 0.3rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}

body.sky-yak {
  --page: #f0f8ff;
  --paper: #fcfeff;
  --ink: #21384a;
  --accent: #285d7d;
  --muted: #4d6576;
  --line: #cddfe9;
  --panel-corners: 3.5rem 0.3rem 0.3rem 0.3rem;
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.13em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

.skip-link {
  position: absolute;
  z-index: 5;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.preview-banner {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
}

main {
  width: min(100%, 82rem);
  margin-inline: auto;
  padding: clamp(2rem, 7vw, 6.75rem) clamp(1rem, 5vw, 4.5rem);
}

main:focus { outline: none; }

.opening { position: relative; isolation: isolate; }

.introduction {
  position: relative;
  z-index: 1;
  width: min(100%, 43rem);
  padding: clamp(1.5rem, 4.5vw, 4rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--panel-corners);
}

.small-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 4rem;
  height: 0.75rem;
  margin-bottom: 2.5rem;
  color: var(--accent);
}

.small-mark::before, .small-mark::after {
  content: "";
  width: 1.2rem;
  height: 1px;
  background: currentColor;
}

.small-mark span {
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}

h1 {
  margin: 0 0 1.65rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 5.4vw, 4.75rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-wrap: balance;
}

.intro {
  max-width: 42ch;
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.85;
}

.motto {
  margin: 2.75rem 0 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

blockquote { margin: 0; }

.motto blockquote p {
  margin: 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.45;
}

.motto figcaption, .motto cite {
  display: block;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-style: normal;
  line-height: 1.6;
}

.watermark {
  position: absolute;
  z-index: 0;
  top: -2.5rem;
  right: -1rem;
  width: min(51%, 37rem);
  height: auto;
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
}

.sky-yak .watermark { top: 1rem; right: -2rem; }

/* A collection only exists when the model contains approved works. */
.works, .collection {
  margin-top: clamp(2rem, 6vw, 5rem);
  max-width: 60rem;
}

h2 {
  margin: 0 0 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.2;
}

h3 { font-size: 1.15rem; line-height: 1.4; }

.works article, .collection article {
  margin-block: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--paper);
}

.works figure, .collection figure { margin: 0; }
.works img, .collection img { display: block; max-width: 100%; height: auto; }
.works audio, .collection audio { display: block; width: 100%; max-width: 36rem; margin-block: 1rem; }
.works a, .collection a { display: inline-block; padding-block: 0.65rem; }
.works figcaption, .collection figcaption { margin-top: 1rem; }

@media (max-width: 62rem) {
  /* Paint paper below the motif, then text above it. An opaque introduction
     would hide the illustration when the card fills the available width. */
  .opening {
    width: min(100%, 39rem);
    background: var(--paper);
    border-radius: var(--panel-corners);
  }
  .introduction { background: transparent; }
  .watermark, .sky-yak .watermark {
    top: 1rem;
    right: 0;
    width: min(76%, 24rem);
    max-height: calc(100% - 2rem);
    object-fit: contain;
    object-position: top right;
    opacity: 0.18;
  }
}

@media (max-width: 42rem) {
  main { padding-top: 4rem; }
  .introduction { padding: 1.75rem 1.35rem 2rem; }
  .small-mark { margin-bottom: 2rem; }
  .motto { margin-top: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .watermark { display: none; }
  .small-mark { color: CanvasText; }
}

@media print {
  .skip-link, .watermark { display: none; }
  main { width: 100%; padding: 0; }
  .introduction { width: 100%; border: 0; padding: 1rem 0; }
}
