:root {
  --black: #070908;
  --bone: #f4f0e7;
  --indigo: #2521d8;
  --yellow: #e8f21b;
  --coral: #ff6f61;
  --green: #00ff41;
  --muted: #a5a69f;
  --rule: rgba(244, 240, 231, 0.28);
  --pad: clamp(1rem, 2.5vw, 2.75rem);
  --font: "Courier New", Courier, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  background: var(--black);
  color: var(--bone);
  font-family: var(--font);
}

body {
  margin: 0;
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  overflow-x: clip;
  background: var(--black);
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

p,
h1,
h2,
h3,
ol,
figure {
  margin: 0;
}

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

img,
canvas {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--yellow);
  color: var(--black);
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-180%);
  background: var(--yellow);
  color: var(--black);
  font-weight: 700;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.gallery-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: 5.5rem;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--rule);
  background: var(--black);
  background: color-mix(in srgb, var(--black) 94%, transparent);
  backdrop-filter: blur(12px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.protocol-link {
  --protocol-text-height: 1.27rem;
  --protocol-mark-size: 1.524rem;

  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  width: max-content;
  font-size: 0.66rem;
  letter-spacing: 0.035em;
  line-height: 0.9;
}

.protocol-error-mark {
  width: var(--protocol-mark-size);
  height: var(--protocol-mark-size);
  flex: 0 0 auto;
  transition: transform 140ms var(--ease);
}

.protocol-link:is(:hover, :focus-visible) .protocol-error-mark {
  transform: translate(2px, -1px);
}

.protocol-parent-name {
  min-height: var(--protocol-text-height);
  display: grid;
  gap: 0.08rem;
  align-content: start;
}

.subproject-brand {
  display: grid;
  justify-self: center;
  color: var(--bone);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.82;
  text-align: center;
}

.subproject-brand b {
  color: var(--yellow);
  font-size: inherit;
}

.header-links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.4rem);
  justify-self: end;
  white-space: nowrap;
}

.header-links > a {
  font-size: 0.64rem;
}

.header-links > a:is(:hover, :focus-visible) {
  color: var(--yellow);
}

#main,
.chapter,
.archive,
.design-library,
.converter {
  scroll-margin-top: 6rem;
}

.motion-toggle,
.artwork-actions button,
.artwork-actions a {
  min-height: 2.85rem;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-align: center;
  text-transform: uppercase;
}

.motion-toggle {
  padding: 0 1rem;
}

.motion-toggle:hover,
.motion-toggle[aria-pressed="true"],
.artwork-actions button:hover,
.artwork-actions button[aria-pressed="true"],
.artwork-actions a:hover {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--black);
}

.gallery-hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-height: calc(100svh - 5.5rem);
  padding: var(--pad);
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

.gallery-hero::after {
  position: absolute;
  right: -4vw;
  bottom: 4vh;
  width: clamp(8rem, 16vw, 16rem);
  aspect-ratio: 1;
  content: "";
  background:
    linear-gradient(90deg, transparent 50%, var(--yellow) 50%) 0 0 / 25% 25%,
    linear-gradient(var(--coral) 50%, transparent 50%) 0 0 / 25% 25%;
  clip-path: polygon(0 75%, 25% 75%, 25% 50%, 50% 50%, 50% 25%, 75% 25%, 75% 0, 100% 0, 100% 25%, 75% 25%, 75% 50%, 50% 50%, 50% 75%, 25% 75%, 25% 100%, 0 100%);
  opacity: 0.92;
}

.eyebrow,
.chapter-head > p:first-child,
.archive-head > p:first-child,
.archive-work header > p:first-child,
.design-library header > p:first-child,
.collection header > p,
.artwork figcaption,
.gallery-footer,
.collection-list,
.manifesto > p:first-child {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  z-index: 2;
  grid-column: 1 / 6;
}

.gallery-hero h1 {
  z-index: 2;
  grid-column: 1 / -1;
  align-self: center;
  max-width: 100%;
  font-size: clamp(5rem, 13.5vw, 13.5rem);
  line-height: 0.75;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.hero-line--signal {
  color: var(--yellow);
}

.gallery-intro {
  position: relative;
  z-index: 2;
  grid-column: 8 / 12;
  align-self: end;
  display: grid;
  gap: 1.5rem;
  max-width: 34rem;
  padding-bottom: 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 1.5;
}

.gallery-intro a,
.library-source,
.collection-copy a,
.gallery-footer a {
  width: max-content;
  border-bottom: 1px solid currentColor;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-sequence {
  position: absolute;
  top: 40%;
  right: var(--pad);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transform: rotate(90deg) translateX(50%);
  transform-origin: right center;
  font-size: 0.58rem;
  font-weight: 700;
}

.hero-sequence i {
  width: 2rem;
  height: 1px;
  background: currentColor;
}

.hero-palette {
  position: absolute;
  bottom: var(--pad);
  left: var(--pad);
  display: flex;
  gap: 1rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-palette span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-palette span::before {
  width: 0.7rem;
  height: 0.7rem;
  content: "";
  background: var(--indigo);
}

.hero-palette span:nth-child(2)::before {
  background: var(--yellow);
}

.hero-palette span:nth-child(3)::before {
  background: var(--coral);
}

.manifesto {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem;
  min-height: 78svh;
  padding: clamp(5rem, 10vw, 10rem) var(--pad);
  border-bottom: 1px solid var(--rule);
  background: var(--bone);
  color: var(--black);
}

.manifesto > p {
  grid-column: 1 / 3;
}

.manifesto h2 {
  grid-column: 3 / 9;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 0.83;
  letter-spacing: -0.04em;
}

.manifesto h2 span {
  color: var(--indigo);
}

.manifesto > div {
  grid-column: 9 / -1;
  display: grid;
  align-content: end;
  gap: 1.5rem;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.55;
}

.chapter,
.archive-work {
  --accent: var(--yellow);
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  min-height: 100svh;
  padding: clamp(5rem, 9vw, 9rem) var(--pad) var(--pad);
  border-bottom: 1px solid var(--rule);
}

.chapter::before,
.archive-work::before {
  position: absolute;
  top: 0;
  left: var(--pad);
  width: 7rem;
  height: 0.65rem;
  content: "";
  background: repeating-linear-gradient(90deg, var(--accent) 0 0.65rem, transparent 0.65rem 1.3rem);
}

.chapter--contact {
  --accent: var(--yellow);
}

.chapter--memory {
  --accent: #5148ff;
}

.chapter--symbiosis {
  --accent: var(--coral);
  background: #100b09;
}

.chapter-head,
.archive-work > header {
  grid-column: 1 / 5;
  align-self: start;
  display: grid;
  gap: 1.6rem;
  position: sticky;
  top: 2rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.chapter-head > *,
.chapter-story > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.chapter-head h2,
.archive-head h2,
.design-library h2,
.collection h2 {
  font-size: clamp(3.4rem, 7.4vw, 8rem);
  line-height: 0.78;
  letter-spacing: -0.105em;
}

.chapter-head h2 {
  max-width: 100%;
  font-size: clamp(2.4rem, 4.4vw, 4.6rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
}

.chapter-lead {
  max-width: 30rem;
  color: var(--accent);
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.25;
}

.chapter-story {
  display: grid;
  gap: 1rem;
  max-width: 31rem;
  color: #c8c7c0;
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: 1.55;
}

.artwork {
  grid-column: 5 / -1;
  display: grid;
  width: 100%;
  max-width: 72rem;
  gap: 0.75rem;
  align-self: start;
  justify-self: end;
}

.artwork-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #020303;
  cursor: cell;
  isolation: isolate;
  touch-action: none;
}

.artwork-stage--portrait {
  aspect-ratio: 2 / 3;
  width: min(100%, 42rem);
  margin-inline: auto;
}

.artwork-stage--legacy-portrait {
  aspect-ratio: 1063 / 1480;
  width: min(100%, 37rem);
  margin-inline: auto;
}

.artwork-stage > img,
.artwork-stage > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artwork-stage > img {
  display: none;
}

.artwork-stage > canvas {
  z-index: 2;
  opacity: 0;
  image-rendering: pixelated;
  transition: opacity 300ms var(--ease);
}

.artwork-stage.is-ready > canvas {
  opacity: 1;
}

.stage-signal {
  position: absolute;
  z-index: 5;
  right: clamp(0.65rem, 1.5vw, 1.2rem);
  bottom: clamp(0.65rem, 1.5vw, 1.2rem);
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: 0.42rem 0.55rem;
  border-left: 0.22rem solid var(--accent, var(--yellow));
  background: rgba(7, 9, 8, 0.88);
  color: var(--bone);
  font-size: clamp(0.58rem, 0.7vw, 0.68rem);
  font-weight: 700;
  letter-spacing: 0.035em;
  pointer-events: none;
}

.protocol-mark {
  position: absolute;
  z-index: 4;
  top: clamp(0.65rem, 1.5vw, 1.2rem);
  left: clamp(0.65rem, 1.5vw, 1.2rem);
  display: grid;
  gap: 0.32rem;
  max-width: calc(100% - 2rem);
  pointer-events: none;
  text-transform: uppercase;
}

.protocol-mark span {
  width: max-content;
  max-width: 100%;
  padding: 0.38rem 0.55rem 0.34rem 0.72rem;
  border-left: 0.25rem solid var(--accent, var(--yellow));
  background: rgba(7, 9, 8, 0.88);
  color: var(--bone);
  font-size: clamp(0.55rem, 0.9vw, 0.72rem);
  letter-spacing: 0.025em;
}

.protocol-mark small {
  padding-left: 0.72rem;
  color: var(--accent, var(--yellow));
  font-size: clamp(0.43rem, 0.65vw, 0.58rem);
  font-weight: 700;
}

.video-recording-status {
  position: absolute;
  z-index: 6;
  top: clamp(0.65rem, 1.5vw, 1.2rem);
  right: clamp(0.65rem, 1.5vw, 1.2rem);
  margin: 0;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--coral);
  background: rgba(7, 9, 8, 0.92);
  color: var(--coral);
  font-size: clamp(0.52rem, 0.7vw, 0.66rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.stage-bracket {
  position: absolute;
  z-index: 3;
  width: clamp(2.2rem, 5vw, 5rem);
  height: clamp(2.2rem, 5vw, 5rem);
  pointer-events: none;
  transition: transform 180ms var(--ease);
}

.stage-bracket--a {
  top: 1rem;
  right: 1rem;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.stage-bracket--b {
  right: 1rem;
  bottom: 1rem;
  border-right: 2px solid var(--coral);
  border-bottom: 2px solid var(--coral);
}

.artwork-stage:hover .stage-bracket--a {
  transform: translate(0.35rem, -0.35rem);
}

.artwork-stage:hover .stage-bracket--b {
  transform: translate(0.35rem, 0.35rem);
}

.artwork figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.artwork-actions {
  grid-column: 5 / -1;
  display: grid;
  width: 100%;
  max-width: 72rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.65rem;
  justify-self: end;
  margin-top: 0.25rem;
}

.artwork-actions button,
.artwork-actions a {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0.7rem;
}

.artwork-actions .video-recording-action[data-recording="true"] {
  border-color: var(--coral);
  background: var(--coral);
  color: var(--black);
}

.artwork-actions button[aria-busy="true"] {
  border-color: var(--yellow);
  color: var(--yellow);
  cursor: progress;
  opacity: 1;
}

.artwork-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  pointer-events: none;
}

.artwork-actions button:disabled:hover {
  background: transparent;
  color: inherit;
}

.motion-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.archive {
  border-top: 0.8rem solid var(--yellow);
}

.archive-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem;
  padding: clamp(6rem, 10vw, 10rem) var(--pad);
  border-bottom: 1px solid var(--rule);
  background: var(--indigo);
}

.archive-head > p:first-child {
  grid-column: 1 / 3;
}

.archive-head h2 {
  grid-column: 3 / 9;
  font-size: clamp(2.8rem, 5.6vw, 5.5rem);
  letter-spacing: -0.04em;
}

.archive-head > p:last-child {
  grid-column: 9 / -1;
  align-self: end;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.5;
}

.archive-work {
  --accent: var(--yellow);
  min-height: auto;
  padding-top: clamp(4.5rem, 7vw, 7rem);
}

.archive-work:nth-of-type(3) {
  --accent: #5148ff;
}

.archive-work:nth-of-type(4) {
  --accent: var(--coral);
}

.archive-work > header h3 {
  font-size: clamp(2.4rem, 5.5vw, 6rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
}

.archive-work > header > p:last-child {
  color: #c8c7c0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.design-library,
.collection {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 5rem);
  padding: clamp(6rem, 11vw, 11rem) var(--pad);
  border-bottom: 1px solid var(--rule);
}

.design-library {
  background: var(--bone);
  color: var(--black);
}

.design-library > header {
  grid-column: 1 / 5;
  display: grid;
  align-content: start;
  gap: 2rem;
  position: sticky;
  top: 2rem;
}

.design-library h2 {
  font-size: clamp(2.7rem, 4vw, 3.5rem);
  letter-spacing: -0.04em;
}

.design-library > header > p:last-child,
.collection-copy {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.55;
}

.library-list {
  grid-column: 5 / -1;
  border-top: 1px solid currentColor;
}

.library-list li {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) 2fr;
  gap: 0.75rem 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid currentColor;
}

.library-list span,
.library-list code {
  font-size: 0.67rem;
  font-weight: 700;
}

.library-list h3 {
  font-size: clamp(1.1rem, 2vw, 1.8rem);
  letter-spacing: -0.05em;
}

.library-list p,
.library-list code {
  grid-column: 2;
}

.library-list p {
  max-width: 42rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.library-list code {
  width: max-content;
  padding: 0.25rem 0.4rem;
  background: var(--indigo);
  color: var(--bone);
}

.library-source {
  grid-column: 5 / -1;
  justify-self: start;
}

.collection > header {
  grid-column: 1 / 6;
}

.collection h2 {
  font-size: clamp(2.7rem, 3.8vw, 3.3rem);
  letter-spacing: -0.04em;
}

.collection-copy {
  grid-column: 8 / -1;
  display: grid;
  align-content: end;
  gap: 1.5rem;
}

.collection-list {
  grid-column: 1 / -1;
  border-top: 1px solid var(--rule);
}

.collection-list li {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.collection-list li:nth-child(5),
.collection-list li:nth-child(6),
.collection-list li:nth-child(7) {
  color: var(--yellow);
}

.converter {
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
  border-top: 0.8rem solid var(--yellow);
  border-bottom: 1px solid var(--rule);
  background: var(--bone);
  color: var(--black);
}

.converter-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: end;
}

.converter-head > p:first-child,
.converter-notes > p,
.converter-label,
.converter-format legend {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.converter-head > p:first-child {
  grid-column: 1 / 3;
  align-self: start;
}

.converter-head h2 {
  grid-column: 3 / 9;
  font-size: clamp(2.8rem, 5.6vw, 6rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
}

.converter-head > p:last-child {
  grid-column: 9 / -1;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.55;
}

.converter-workspace {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  margin-top: clamp(3rem, 6vw, 6rem);
}

.converter-form {
  grid-column: 1 / 9;
  display: grid;
  gap: 1.5rem;
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--black);
  color: var(--bone);
}

.converter-format {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.converter-format legend {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 0.7rem;
  color: var(--muted);
}

.converter-format label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.converter-format input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.converter-format span {
  display: grid;
  min-height: 3.5rem;
  place-items: center;
  border: 1px solid var(--rule);
  font-size: 0.78rem;
  font-weight: 700;
}

.converter-effect span {
  min-height: 4.8rem;
  align-content: center;
  justify-items: start;
  gap: 0.35rem;
  padding: 0.8rem 1rem;
}

.converter-effect b {
  font-size: 0.76rem;
  letter-spacing: 0.025em;
}

.converter-effect small {
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.35;
}

.converter-effect input:checked + span small {
  color: rgba(7, 9, 8, 0.68);
}

.converter-format input:checked + span {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--black);
}

.converter-format input:focus-visible + span {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.converter-format input:disabled + span {
  cursor: not-allowed;
  opacity: 0.42;
}

.converter-upload,
.converter-text {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}

.converter-label,
.converter-format legend {
  color: var(--muted);
}

.converter-upload-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  border: 1px solid var(--rule);
}

.converter-upload-shell.has-file {
  border-color: var(--yellow);
}

.converter-upload-target {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  min-height: 5.5rem;
  align-content: center;
  padding: 1rem 1.2rem;
  cursor: pointer;
}

.converter-upload-target:hover {
  background: rgba(232, 242, 27, 0.08);
}

.converter-upload-target span,
.converter-upload-target small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.converter-upload-target span {
  font-size: clamp(0.82rem, 1.2vw, 1rem);
  font-weight: 700;
}

.converter-upload-target small,
.converter-text small {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.converter-upload-shell > input:focus-visible + .converter-upload-target {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.converter-file-remove {
  width: 4.25rem;
  border: 0;
  border-left: 1px solid var(--yellow);
  border-radius: 0;
  background: transparent;
  color: var(--yellow);
  cursor: pointer;
  font-size: 1.4rem;
}

.converter-file-remove:hover {
  background: var(--coral);
  color: var(--black);
}

.converter-file-remove:disabled,
.converter-upload-shell.is-busy .converter-upload-target {
  cursor: not-allowed;
  opacity: 0.42;
}

.converter-limits {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.025em;
}

.converter-limits.is-alert {
  padding: 0.65rem 0.75rem;
  border-left: 0.25rem solid var(--coral);
  background: rgba(255, 111, 97, 0.12);
  color: var(--coral);
}

.converter-text {
  cursor: text;
}

.converter-text-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--rule);
}

.converter-text-field:focus-within {
  border-color: var(--yellow);
}

.converter-text input {
  width: 100%;
  min-width: 0;
  min-height: 3.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--bone);
  font: inherit;
  font-size: 0.8rem;
}

.converter-text input::placeholder {
  color: #6f706b;
}

.converter-text output {
  align-self: center;
  padding: 0 1rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.converter-generate {
  min-height: 4rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--yellow);
  border-radius: 0;
  background: var(--yellow);
  color: var(--black);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.converter-generate:hover:not(:disabled) {
  border-color: var(--coral);
  background: var(--coral);
}

.converter-generate:disabled {
  border-color: var(--rule);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
}

.converter-status {
  min-height: 1.1rem;
  color: var(--yellow);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.025em;
}

.converter-status.is-error {
  color: var(--coral);
}

.converter-notes {
  grid-column: 9 / -1;
  display: grid;
  align-content: start;
  gap: 1.2rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid currentColor;
}

.converter-notes > p {
  color: var(--indigo);
}

.converter-notes ol {
  border-top: 1px solid currentColor;
}

.converter-notes li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.35rem 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid currentColor;
}

.converter-notes li span,
.converter-notes li b {
  font-size: 0.7rem;
}

.converter-notes li small {
  grid-column: 2;
  font-size: 0.72rem;
  line-height: 1.5;
}

.gallery-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem var(--pad) max(2rem, env(safe-area-inset-bottom));
}

@media (max-width: 1100px) {
  .chapter > .chapter-head,
  .chapter > .artwork,
  .chapter > .artwork-actions {
    grid-column: 1 / -1;
  }

  .chapter > .chapter-head {
    position: static;
    width: min(100%, 44rem);
  }
}

@media (max-width: 960px) {
  .manifesto h2 {
    grid-column: 3 / -1;
  }

  .manifesto > div {
    grid-column: 5 / -1;
    margin-top: 2rem;
  }

  .chapter-head,
  .archive-work > header {
    grid-column: 1 / 6;
  }

  .artwork,
  .artwork-actions {
    grid-column: 6 / -1;
  }

  .archive-head h2 {
    grid-column: 3 / -1;
  }

  .archive-head > p:last-child {
    grid-column: 5 / -1;
  }
}

@media (max-width: 720px) {
  .gallery-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 4.5rem;
    padding-inline: 0.75rem;
  }

  .header-links > a {
    display: none;
  }

  .protocol-link {
    --protocol-text-height: 1.09rem;
    --protocol-mark-size: 1.308rem;

    gap: 0.45rem;
    font-size: 0.56rem;
  }

  .subproject-brand {
    font-size: 0.67rem;
  }

  .header-links {
    gap: 0;
  }

  .motion-toggle {
    min-height: 2.75rem;
    padding-inline: 0.6rem;
    font-size: 0.6rem;
  }

  #main,
  .chapter,
  .archive,
  .design-library,
  .converter {
    scroll-margin-top: 5rem;
  }

  .gallery-hero {
    min-height: calc(100svh - 4.5rem);
  }

  .gallery-hero h1 {
    grid-column: 1 / -1;
    font-size: clamp(3rem, 15.5vw, 4.35rem);
    line-height: 0.82;
    letter-spacing: -0.04em;
  }

  .hero-line {
    width: 100%;
    white-space: nowrap;
  }

  .gallery-intro {
    grid-column: 1 / -1;
    padding: 0 0 3rem;
  }

  .hero-palette,
  .hero-sequence,
  .gallery-hero::after {
    display: none;
  }

  .manifesto,
  .chapter,
  .archive-work,
  .archive-head,
  .design-library,
  .collection,
  .converter-head,
  .converter-workspace {
    grid-template-columns: 1fr;
  }

  .manifesto {
    gap: 1.75rem;
    min-height: auto;
  }

  .manifesto > p,
  .manifesto h2,
  .manifesto > div,
  .chapter-head,
  .archive-work > header,
  .artwork,
  .artwork-actions,
  .archive-head > p:first-child,
  .archive-head h2,
  .archive-head > p:last-child,
  .design-library > header,
  .library-list,
  .library-source,
  .collection > header,
  .collection-copy,
  .collection-list {
    grid-column: 1;
  }

  .chapter-head,
  .archive-work > header,
  .design-library > header {
    position: static;
  }

  .chapter-head h2,
  .archive-head h2,
  .design-library h2,
  .collection h2,
  .manifesto h2 {
    letter-spacing: -0.04em;
  }

  .manifesto h2,
  .collection h2 {
    font-size: clamp(2.05rem, 9.4vw, 2.5rem);
  }

  .archive-head h2,
  .design-library h2 {
    font-size: clamp(2.35rem, 10.5vw, 3rem);
  }

  .chapter-head h2 {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
  }

  .artwork-stage--portrait,
  .artwork-stage--legacy-portrait {
    width: 100%;
  }

  .artwork-actions {
    grid-template-columns: 1fr;
  }

  .archive-head {
    gap: 1.5rem;
  }

  .design-library > header {
    margin-bottom: 1.5rem;
  }

  .library-list li {
    grid-template-columns: 1fr;
  }

  .library-list p,
  .library-list code {
    grid-column: 1;
  }

  .collection-copy {
    margin-top: -1rem;
  }

  .converter-head > p:first-child,
  .converter-head h2,
  .converter-head > p:last-child,
  .converter-form,
  .converter-notes {
    grid-column: 1;
  }

  .converter-head h2 {
    font-size: clamp(2.35rem, 11vw, 3.2rem);
  }

  .gallery-footer {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .gallery-hero h1 {
    font-size: 15vw;
    letter-spacing: -0.04em;
  }

  .gallery-intro {
    font-size: 0.94rem;
  }

  .chapter,
  .archive-work {
    padding-top: 4rem;
  }

  .artwork figcaption {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .collection-list li {
    grid-template-columns: 2.7rem 1fr;
  }

  .collection-list code {
    grid-column: 2;
  }

  .converter-format {
    grid-template-columns: 1fr;
  }

  .converter-upload-target {
    min-height: 4.75rem;
  }

  .converter-file-remove {
    width: 3.5rem;
  }

  .converter-text-field {
    grid-template-columns: 1fr;
  }

  .converter-text output {
    padding: 0 1rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
