:root {
  color-scheme: light;
  --canvas: #ffffff;
  --ink: #000000;
  --ink-2: rgb(0 0 0 / 64%);
  --ink-3: rgb(0 0 0 / 56%);
  --ink-4: rgb(0 0 0 / 40%);
  --border: rgb(0 0 0 / 10%);
  --wash: rgb(0 0 0 / 4%);
  --hover: rgb(0 0 0 / 5%);
  --pressed: rgb(0 0 0 / 9%);
  --accent: #2f7a5c;
  --on-accent: #ffffff;
  --scrim: rgb(0 0 0 / 56%);
  --gutter: 16px;
  --row: 132px;
  --font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Meiryo", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #0d0d0d;
    --ink: #ffffff;
    --ink-2: rgb(255 255 255 / 64%);
    --ink-3: rgb(255 255 255 / 52%);
    --ink-4: rgb(255 255 255 / 34%);
    --border: rgb(255 255 255 / 12%);
    --wash: rgb(255 255 255 / 6%);
    --hover: rgb(255 255 255 / 9%);
    --pressed: rgb(255 255 255 / 14%);
    --accent: #86d4b1;
    --on-accent: #0d0d0d;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0d0d0d;
  --ink: #ffffff;
  --ink-2: rgb(255 255 255 / 64%);
  --ink-3: rgb(255 255 255 / 52%);
  --ink-4: rgb(255 255 255 / 34%);
  --border: rgb(255 255 255 / 12%);
  --wash: rgb(255 255 255 / 6%);
  --hover: rgb(255 255 255 / 9%);
  --pressed: rgb(255 255 255 / 14%);
  --accent: #86d4b1;
  --on-accent: #0d0d0d;
}

@media (min-width: 40rem) {
  :root { --gutter: 32px; --row: 200px; }
}

@media (min-width: 72rem) {
  :root { --gutter: 48px; --row: 240px; }
}

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

html {
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

img, video, svg { display: block; max-width: 100%; }
picture { display: contents; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

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

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  padding: 8px 12px; background: var(--canvas); color: var(--ink); z-index: 10;
}
.skip:focus { top: 8px; }

.eyebrow a, .chapter h2 a, .tag-cloud a, .pager a { text-decoration: none; }
.eyebrow a:hover, .chapter h2 a:hover, .tag-cloud a:hover, .pager a:hover { text-decoration: underline; }
.prose a:hover, .facts a:hover { text-decoration-thickness: 2px; }

.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px;
  padding: 20px var(--gutter);
}

.brand { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }

.nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; font-size: 14px; font-weight: 500; }
@media (max-width: 39.99rem) { .nav { column-gap: 14px; } }
.nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

.theme-toggle {
  font: inherit; color: var(--ink-3); background: none; border: 0; padding: 4px 0; cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); }

.page-head { padding: 24px var(--gutter) 32px; max-width: 56rem; }
.page-body { padding: 0 var(--gutter); }
.page-head-quiet { padding-top: 0; padding-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.page-head .prose { margin-top: 16px; }
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.count { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.lede { margin: 0; font-size: 14px; color: var(--ink-2); }
.lede .count { display: inline; margin-left: 12px; }

.grid {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 0 var(--gutter);
}
.grid::after { content: ""; flex-grow: 1000000; }

.tile {
  position: relative; display: block; overflow: hidden;
  flex: var(--r) 1 calc(var(--r) * var(--row));
  aspect-ratio: var(--r);
  max-height: calc(var(--row) * 2.2);
  background: var(--wash);
  color: inherit; text-decoration: none;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }

.pixelated { image-rendering: pixelated; }
.tile-pixel { container-type: size; }
.tile-pixel img {
  position: absolute; inset: 0; margin: auto;
  width: min(100cqw, 100cqh * var(--r)); height: auto;
  aspect-ratio: var(--r); object-fit: fill;
}

.badge {
  position: absolute; left: 6px; bottom: 6px;
  padding: 1px 6px; border-radius: 4px;
  font-size: 12px; font-weight: 500; line-height: 1.6;
  color: #fff; background: var(--scrim);
  font-variant-numeric: tabular-nums;
}

.tile-audio-body {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 12px 36px;
}
.tile-audio .wave { width: 100%; height: 55%; color: var(--ink-4); }
.tile-title {
  font-size: 13px; line-height: 1.45; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile-audio .badge { color: var(--ink-2); background: none; padding: 0; left: 12px; bottom: 10px; }

.wave path { fill: currentColor; }

.pager {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 16px;
  padding: 48px var(--gutter) 0; font-size: 15px; font-weight: 500;
}
.pager a { padding: 8px 0; }
.pager a[rel="next"] { justify-self: end; }
.pager-count { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }

.chapter { padding: 0 0 64px; }
.chapter-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 0 var(--gutter); }
.chapter h2 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 600; }
.chapter .count { margin: 0; }
.chapter-more { margin-left: auto; font-size: 14px; font-weight: 500; text-decoration: none; padding: 4px 0; }
.chapter-more:hover { text-decoration: underline; }
.chapter-desc { margin: 4px 0 16px; padding: 0 var(--gutter); max-width: 44rem; font-size: 14px; color: var(--ink-2); }
.chapter-head + .strip { margin-top: 16px; }

.strip {
  --strip: 120px;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; overflow: hidden;
  height: var(--strip); margin: 0 var(--gutter);
}
.strip .tile { flex: none; width: calc(var(--strip) * var(--r)); height: 100%; aspect-ratio: auto; max-height: none; }
@media (min-width: 40rem) { .strip { --strip: 180px; } }

.toc { margin: 0; padding: 0 var(--gutter); max-width: calc(52rem + 2 * var(--gutter)); list-style: none; }
.toc li + li { border-top: 1px solid var(--border); }
.toc-entry {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 20px 0; color: inherit; text-decoration: none;
}
.toc li:first-child .toc-entry { padding-top: 0; }
.toc-thumb { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--wash); }
.toc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.toc-thumb .wave { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); color: var(--ink-4); }
.toc-text { display: grid; gap: 4px; min-width: 0; }
.toc-title { font-size: 17px; font-weight: 600; line-height: 1.45; }
.toc-entry:hover .toc-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.toc-excerpt {
  font-size: 14px; line-height: 1.85; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.toc-date { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (min-width: 40rem) {
  .toc-entry { grid-template-columns: 160px minmax(0, 1fr); gap: 28px; padding: 28px 0; }
  .toc-title { font-size: 19px; }
}

.tag-cloud {
  display: flex; flex-wrap: wrap; gap: 6px 24px;
  margin: 0; padding: 0 var(--gutter); list-style: none; max-width: 72rem;
}
.tag-cloud a { font-size: 15px; }
.tag-cloud .n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.stage { --stage-h: min(85vh, 1400px); display: flex; justify-content: center; padding: 0 var(--gutter); }
.stage .media {
  width: auto; height: auto; max-width: 100%;
  max-height: var(--stage-h);
  background: var(--wash);
}
.stage-video .media, .stage-audio .media { background: #000; }
.stage-pixel .media {
  width: min(100%, var(--w), calc(var(--stage-h) * var(--r)));
  aspect-ratio: var(--r);
  object-fit: fill;
}
@media (max-width: 39.99rem) {
  .stage { padding: 0; }
}


.work-body {
  display: grid; gap: 24px;
  max-width: calc(42rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: 32px var(--gutter) 0;
}
.work-title { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }

@media (min-width: 40rem) {
  .work:not(.work-text) .facts dl { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); column-gap: 32px; }
}

@media (min-width: 60rem) {
  .work-body { padding-top: 40px; }
  .work-title { font-size: 30px; }
  .work-text .work-body {
    grid-template-columns: minmax(0, 42rem) 18rem;
    column-gap: 64px;
    max-width: calc(60rem + 64px + 2 * var(--gutter));
  }
  .work-text .work-title { grid-column: 1 / -1; }
  .work-text .prose { grid-column: 1; grid-row: 2; }
  .work-text .facts { grid-column: 2; grid-row: 2; }

  .work-story {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 36em); grid-template-rows: auto 1fr; column-gap: 64px;
    max-width: calc(72rem + 2 * var(--gutter)); margin: 0 auto; padding: 8px var(--gutter) 0;
  }
  .work-story .work-media { grid-column: 1; grid-row: 1 / span 2; }
  .work-story .stage { --stage-h: calc(100vh - 64px); position: sticky; top: 32px; padding: 0; }
  .work-story .work-body { display: contents; }
  .work-story .work-title { grid-column: 2; grid-row: 1; margin-bottom: 32px; }
  .work-story .prose { grid-column: 2; grid-row: 2; }
  .work-story .facts { grid-column: 1 / -1; grid-row: 3; margin-top: 80px; padding-top: 32px; border-top: 1px solid var(--border); }
  .work-story .facts dl { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); column-gap: 32px; }
  .work-story .work-nav { grid-column: 1 / -1; max-width: none; margin: 0; padding-left: 0; padding-right: 0; }
}

.prose { line-height: 1.9; max-width: 42rem; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--accent); }
.prose img { height: auto; }
.prose rt { font-size: 0.6em; }
.prose blockquote { margin: 0 0 1.1em; padding-left: 16px; border-left: 2px solid var(--border); color: var(--ink-2); }
.prose code { font-size: 0.9em; }
.work-story .prose { font-size: 17px; line-height: 2; max-width: 36em; text-align: justify; line-break: strict; }
.work-story .prose p { margin: 0 0 1em; }

.facts { font-size: 15px; }
.facts dl { margin: 0; display: grid; gap: 16px; }
.facts dt { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.facts dd { margin: 2px 0 0; }
.facts a { color: var(--ink); }
.facts a[rel="license"] { color: var(--accent); }
.attribution { display: block; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; padding: 0; list-style: none; }

.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-top: 28px; }
.download { min-height: 44px; }
.download-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  font: inherit; font-size: 15px; font-weight: 500;
  color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: 8px; cursor: pointer;
  transition: background-color 120ms ease;
}
.download-button:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.download-button:active { background: color-mix(in srgb, var(--accent) 76%, var(--ink)); }
.download-button:disabled, .download-button[aria-busy="true"] {
  color: var(--ink-3); background: var(--pressed); cursor: progress;
}
.share-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; box-sizing: border-box;
  font-size: 15px; font-weight: 500; text-decoration: none;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 8px;
  transition: background-color 120ms ease;
}
.share-button:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.share-button:active { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.download-status { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.download-status:empty { display: none; }
.download-challenge { margin-top: 12px; min-height: 65px; }

.work-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: calc(60rem + 64px + 2 * var(--gutter)); margin: 0 auto; padding: 80px var(--gutter) 0;
}
.work:not(.work-text) .work-nav { max-width: calc(42rem + 2 * var(--gutter)); }
.work-nav a { display: grid; gap: 2px; text-decoration: none; }
.work-nav a:hover .t { text-decoration: underline; }
.work-nav .label { font-size: 13px; color: var(--ink-2); }
.work-nav .t { font-size: 15px; font-weight: 500; line-height: 1.45; }
.work-nav-older { text-align: right; justify-self: end; }

.footer {
  display: flex; flex-wrap: wrap; gap: 4px 24px;
  margin-top: 96px; padding: 24px var(--gutter) 40px;
  font-size: 13px; color: var(--ink-2);
}
.footer p { margin: 0; }
.footer .theme-toggle { padding: 0; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
