@font-face{font-family:Rubik;src:url('/assets/rubik-bold.woff') format('woff');font-weight:700;font-display:swap}
:root{--paper:#f8f9f3;--ink:#15201a;--muted:#4f5a50;--border:#c7ccbe;--lime:#c7ee79;--green:#638b33;--mono:"IBM Plex Mono",ui-monospace,"Courier New",monospace;--sans:"Inter","Helvetica Neue",Arial,sans-serif;--display:"Rubik",var(--sans)}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:2rem}
body{margin:0;background:var(--paper);color:var(--ink);font:400 1rem/1.55 var(--sans);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #5d7a14;outline-offset:5px}
button:disabled{cursor:default}h1,h2,h3,p,figure{margin:0}img{display:block;max-width:100%;height:auto}svg{display:block;flex:none}::selection{background:var(--lime);color:var(--ink)}
.skip{position:fixed;left:1rem;top:-5rem;background:var(--ink);color:white;padding:.75rem 1rem;z-index:100}.skip:focus{top:.75rem}
.wrap{width:min(88.5%,82rem);margin-inline:auto}
.header{border-bottom:1px solid var(--border)}.nav{display:flex;justify-content:space-between;align-items:center;min-height:5rem;gap:2rem}
.brand{display:inline-flex;align-items:center;gap:.78rem;font-weight:700;font-size:1rem;letter-spacing:-.04em}.monogram{width:2.55rem;height:2.55rem;display:grid;place-items:center;background:var(--ink);color:var(--lime);font:italic 700 1.48rem/1 var(--display);letter-spacing:-.12em;padding-right:.2em;border-radius:.18rem}
.nav nav{display:flex;align-items:center;gap:2.35rem}.navlink{font-size:.96rem;font-weight:550}.navlink:hover,.underlink:hover{text-decoration:underline;text-underline-offset:.3em}
.pill{display:inline-flex;align-items:center;justify-content:center;gap:.62rem;border:1px solid var(--ink);border-radius:2rem;padding:.64rem 1.07rem;line-height:1.25;font-size:.94rem;font-weight:600;transition:background .15s,transform .15s}
.pill:hover{transform:translateY(-1px);background:var(--lime)}.pill.lime{background:var(--lime)}.pill.lime:hover{background:#b6e45e}.pill.dark{background:var(--ink);color:var(--paper);padding:.88rem 1.28rem}.pill.dark:hover{background:#344435}
.hero{display:grid;grid-template-columns:1fr 1.02fr;align-items:center;gap:6.2%;padding-block:clamp(3.3rem,5.7vw,6rem) clamp(3.7rem,5.8vw,6.2rem)}
.meta{font-family:var(--mono);font-size:.81rem;line-height:1.35;letter-spacing:.06em;text-transform:uppercase}.location{display:flex;align-items:center;gap:.54rem;color:#344c35}.location svg{width:1rem;height:1rem}
h1,h2,h3{font-family:var(--display);font-weight:700}.hero h1{font-size:clamp(5.2rem,8.25vw,8.5rem);letter-spacing:-.079em;line-height:.87;margin:1.35rem 0 1.45rem}.hero h1 span{display:block}.hero h1 b{color:#779e43;font-weight:inherit}
.hero p{font-size:clamp(1.1rem,1.4vw,1.38rem);line-height:1.43;color:#39463c;max-width:25.8em;letter-spacing:-.025em}.hero .actions{margin-top:1.65rem}
.actions{display:flex;align-items:center;gap:1.4rem;flex-wrap:wrap}.underlink{font-size:.96rem;font-weight:600;border-bottom:1px solid #7a8277;line-height:1.4}.underlink:hover{border-color:var(--ink);text-decoration:none}
.photo-area{position:relative;margin:.4rem .85rem .65rem .5rem}.print{position:relative;isolation:isolate;background:#fffef9;padding:clamp(.42rem,.62vw,.64rem);border:1px solid #c1c4b7;box-shadow:1px 6px 10px #2029171a;transform:rotate(2deg)}.print img{width:100%;aspect-ratio:1.53;object-fit:cover}
.tape{position:absolute;width:22%;height:7.1%;left:39%;top:-2.8%;background:repeating-linear-gradient(90deg,#e0dfab66 0 1px,transparent 1px 3px),#e4e1afe6;transform:rotate(-4deg);box-shadow:0 1px 1px #0001;clip-path:polygon(1% 0,99% 2%,98% 14%,100% 22%,98% 33%,100% 48%,98% 63%,99% 75%,98% 89%,100% 98%,1% 100%,2% 86%,0 68%,2% 55%,0 40%,2% 29%,0 15%)}
.photo-star{position:absolute;left:-5.9%;bottom:-6.4%;width:clamp(4.2rem,7.6vw,7.7rem);height:auto;transform:rotate(-10deg);filter:drop-shadow(2px 2px 0 #15201a)}
.work{border-top:1px solid var(--border);padding:2.3rem 0 4.4rem;scroll-margin-top:1rem}.section-top{display:flex;align-items:center;justify-content:space-between;gap:1.4rem;margin-bottom:1.7rem}
.section-title{font-size:clamp(2.15rem,3.5vw,3.8rem);line-height:1.05;letter-spacing:-.068em}.filters{display:flex;align-items:center;gap:.32rem;flex-wrap:wrap}.filter{background:transparent;border:1px solid transparent;border-radius:1.5rem;font-size:.91rem;line-height:1.2;padding:.55rem .92rem;transition:background .13s}.filter[aria-pressed="true"]{border-color:var(--ink);background:var(--ink);color:var(--paper)}.filter:hover:not([aria-pressed="true"]){background:#e6ebde}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2.5rem 1.7rem}.project[hidden]{display:none}.project{display:block;min-width:0}.cover{overflow:hidden;position:relative;background:#e2e6d9;border:1px solid #182019;border-radius:.25rem}.cover img{width:100%;aspect-ratio:1.9;object-fit:cover;transition:transform .28s ease}.project:hover .cover img{transform:scale(1.025)}
.card-body{padding-top:1rem}.card-meta{color:#4e5c50;font-size:.77rem;letter-spacing:.075em}.card-body h3{font-size:clamp(1.65rem,2.5vw,2.65rem);line-height:1.12;letter-spacing:-.06em;margin:.35rem 0}.project:hover h3{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:.12em}.card-body p{color:var(--muted);line-height:1.5;max-width:37em}
.about{border-top:1px solid var(--border);display:grid;grid-template-columns:1fr 1.25fr;gap:8%;padding-block:clamp(3rem,5.2vw,6rem)}.about-copy{max-width:39rem}.about-copy .lead,.story .lead{font-size:clamp(1.27rem,2vw,1.8rem);line-height:1.41;letter-spacing:-.035em;color:var(--ink)}.about-copy p+p{margin-top:1.15rem;color:var(--muted)}
.footer{display:grid;place-items:center;background:var(--ink);padding:clamp(2rem,4vw,4rem) 1rem}.footer .pill{padding:.88rem 1.25rem}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.breadcrumb{display:flex;align-items:center;gap:.6rem;margin-top:2.1rem;font-size:.88rem;color:var(--muted)}.breadcrumb a{text-decoration:underline;text-underline-offset:3px}.breadcrumb span{color:#939b91}
.detail-top{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:7%;padding:2.4rem 0 3.4rem}.detail-top h1{font-size:clamp(3.8rem,6.5vw,6.8rem);letter-spacing:-.075em;line-height:.95;margin:1.1rem 0}.detail-top .intro{font-size:clamp(1.15rem,1.5vw,1.45rem);line-height:1.45;color:var(--muted)}.detail-top .actions{margin-top:1.6rem}.detail-top .cover img{aspect-ratio:1.5}.story{display:grid;grid-template-columns:1fr 1.55fr;border-top:1px solid var(--border);padding:3.6rem 0;gap:8%}.story h2{font-size:clamp(1.8rem,2.5vw,2.8rem);line-height:1.1;letter-spacing:-.055em}.story p+p{margin-top:1.1rem}.story p{max-width:42rem;color:var(--muted);font-size:1.07rem}.reading{display:flex;flex-direction:column;align-items:flex-start;gap:.8rem;margin:1.4rem 0 0;padding:0;list-style:none}.reading a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.25rem}.reading a:hover{color:#526939}.related{border-top:1px solid var(--border);padding:1.6rem 0 2.5rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.related .next{font-family:var(--display);font-size:1.3rem;letter-spacing:-.05em}.related .next:hover{text-decoration:underline}
@media(min-width:1600px){.hero{gap:7%;padding-block:5.7rem}.photo-area{margin-left:1.5rem}}
@media(max-width:900px){.wrap{width:90%}.hero{gap:4.5%}.hero h1{font-size:clamp(4.1rem,9vw,5.75rem)}.hero p{font-size:1.12rem}.photo-area{margin-right:.2rem}.nav nav{gap:1.5rem}.work{padding-top:2rem}.filter{padding:.48rem .68rem}.grid{gap:2rem 1.2rem}}
@media(max-width:680px){html{scroll-padding-top:1rem}.wrap{width:89.5%}.nav{min-height:4.3rem;gap:.5rem}.brand{font-size:.94rem;gap:.55rem}.monogram{width:2.05rem;height:2.05rem;font-size:1.25rem}.nav nav{gap:.9rem}.navlink{font-size:.88rem}.nav .pill{padding:.49rem .74rem;font-size:.84rem}.nav .pill svg{display:none}.hero{grid-template-columns:1fr;gap:2.25rem;padding-block:2.65rem 3.1rem}.hero h1{font-size:clamp(4.65rem,14.2vw,6.9rem);margin-block:1.18rem}.hero p{font-size:1.18rem;max-width:24em}.hero .actions{margin-top:1.35rem}.photo-area{margin:.3rem 2% .7rem 3.5%}.print img{aspect-ratio:1.67}.photo-star{width:16%;left:-5%;bottom:-5.3%}.work{padding:1.7rem 0 2.8rem}.section-top{align-items:flex-start;flex-direction:column;gap:1rem;margin-bottom:1.2rem}.filter{padding:.45rem .8rem}.filters{gap:.13rem}.grid{grid-template-columns:1fr;gap:1.9rem}.cover img{aspect-ratio:1.75}.card-body{padding-top:.75rem}.card-body h3{font-size:1.85rem}.about,.story{grid-template-columns:1fr;gap:1.25rem;padding:2.7rem 0}.detail-top{grid-template-columns:1fr;gap:1.7rem;padding:1.8rem 0 2.2rem}.detail-top h1{font-size:clamp(3.8rem,13.5vw,5.5rem)}.breadcrumb{margin-top:1.45rem}.related .next{font-size:1.05rem}}
@media(max-width:405px){.brand .brand-name{display:none}.nav nav{gap:1rem}.hero h1{font-size:clamp(4.05rem,15.7vw,4.7rem)}.filters{gap:0}.filter{padding:.44rem .64rem}.related{align-items:flex-start;flex-direction:column}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important}}
.filters[hidden]{display:none}

/* Section navigation and the five chapters on the homepage. */
.chapter-header {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  align-items: center;
  gap: 2rem;
  padding-block: 1.1rem;
}
.chapter-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: clamp(.9rem, 2vw, 2rem);
  row-gap: .35rem;
}
.chapter-links a { white-space: nowrap; }
.chapter-header > .pill { justify-self: end; }
.chapter {
  padding-block: clamp(2.8rem, 5.4vw, 5.8rem);
  border-top: 1px solid var(--border);
}
.chapter-split, .now-panel {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.chapter-text .section-title { margin-bottom: 1.1rem; }
.chapter-text h3 {
  font-size: clamp(1.4rem, 2vw, 2.05rem);
  line-height: 1.14;
  letter-spacing: -.045em;
  margin: 1.5rem 0 .48rem;
}
.chapter-text p, .chapter-intro, .now-copy p {
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  color: var(--muted);
  line-height: 1.55;
}
.chapter-text > .underlink { display: inline-block; margin-top: 1.1rem; }
.chapter-text .actions { margin-top: 1.5rem; }
.data-figure img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: .25rem;
}
.data-figure a { display: block; }
.data-figure figcaption { margin-top: .6rem; color: var(--muted); font-size: .91rem; }
.chapter-art img { aspect-ratio: 1.6; }
.chapter-intro { max-width: 49rem; margin: 1rem 0 1.75rem; }
.now-panel {
  gap: 0;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: .35rem;
  overflow: hidden;
  align-items: stretch;
  margin-top: 1.6rem;
}
.now-copy { padding: clamp(1.6rem, 3.4vw, 3.7rem); align-self: center; }
.now-copy h3 { font-size: clamp(2.5rem, 4.6vw, 5rem); letter-spacing: -.06em; line-height: 1; }
.now-copy p { color: #dde6d9; margin-top: .9rem; }
.now-copy .pill { color: var(--ink); margin-top: 1.3rem; }
.now-art, .psycade-cover {
  display: grid;
  place-items: center;
  background: #faf6ed;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}
.now-art img, .detail-top .psycade-cover img {
  width: min(100%, 26rem);
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
@media(max-width: 1000px) {
  .chapter-header { column-gap: 1rem; }
  .chapter-links { column-gap: 1rem; }
  .chapter-header .brand-name { display: none; }
}
@media(max-width: 760px) {
  .chapter-header { grid-template-columns: 1fr max-content; row-gap: .75rem; padding-block: .8rem; }
  .chapter-header .brand-name { display: inline; }
  .chapter-links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; margin-top: .1rem; }
  .chapter-header > .pill { grid-column: 2; grid-row: 1; }
  .chapter-links .navlink { font-size: .88rem; }
  .chapter-split, .now-panel { grid-template-columns: 1fr; }
  .chapter-split { gap: 1.5rem; }
  .chapter-intro { margin-bottom: 1.3rem; }
  .now-art img, .detail-top .psycade-cover img { max-width: min(100%, 20rem); }
  .chapter-art img { aspect-ratio: 1.75; }
}
@media(max-width: 440px) {
  .chapter-links { column-gap: .85rem; }
  .chapter-header .pill { font-size: .83rem; padding: .5rem .65rem; }
  .chapter-header .brand { gap: .45rem; }
}

.chapter > .section-title + .grid { margin-top: 1.6rem; }

.rich-nerd-card { position: relative; }
.rich-nerd-card .cover { background-color: #15cf88; }
.rich-nerd-card .cover img { object-fit: contain; }
.rich-nerd-card .channel-link::after { content: ""; position: absolute; inset: 0; }
.rich-nerd-card .newsletter-link { position: relative; z-index: 1; text-decoration: underline; text-underline-offset: .15em; }
.rich-nerd-card .channel-link:focus-visible::after { outline: 2px solid currentColor; outline-offset: 4px; }
.chapter-intro:last-child { margin-bottom: 0; }
@media (min-width: 920px) {
  .chapter .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.amigo-cover { background: #fff; }
.amigo-cover img { object-fit: contain; }
.project:hover .amigo-cover img { transform: none; }

.portrait-hero {
  container-type: inline-size;
  padding-block: clamp(1rem, 2vw, 2rem);
  overflow: clip;
}
.portrait-ring {
  /* Three times the original portrait diameters, including their responsive caps. */
  --photo-size: min(27.225rem, 43.8075cqw);
  --disc-size: min(41rem, 94cqw);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  gap: 1rem;
  width: min(100%, 104rem);
  margin: 0 auto;
}
.portrait-intro {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  width: var(--disc-size);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #dce1d0;
  background: #eef1e6;
  text-align: center;
}
.intro-safe {
  /* All four corners of this rectangle lie inside the inscribed square. */
  width: 68%;
  max-height: 68%;
  overflow: auto;
  scrollbar-width: thin;
}
.portrait-intro h1 {
  font: 700 clamp(1.6rem, 3vw, 2.3rem)/1.06 var(--display);
  letter-spacing: -.055em;
  text-wrap: balance;
}
.intro-bio {
  margin-top: .85rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  color: var(--ink);
}
.intro-bio p + p { margin-top: .65em; }
.intro-open, .intro-close {
  padding: .4rem .15rem;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .22em;
  font-weight: 700;
}
.intro-open { margin-top: .4rem; }
.intro-close { margin-top: .8rem; }
.ring-photo {
  width: min(100%, var(--photo-size));
  aspect-ratio: 1;
  display: block;
  margin: 0;
  padding: 4px;
  border: 1px solid #b9c0ae;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 3px 9px #19281718;
}
.ring-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.portrait-ring.is-arranged {
  display: block;
  height: var(--ring-height);
}
.is-arranged::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--orbit-width);
  height: var(--orbit-height);
  transform: translate(-50%, -50%);
  border: 1px solid #c7cdbb;
  border-radius: 50%;
}
.is-arranged .portrait-intro {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.is-arranged .ring-photo {
  position: absolute;
  z-index: 1;
  left: calc(50% + var(--offset-x));
  top: calc(50% + var(--offset-y));
  translate: -50% -50%;
}
@media (max-width: 62rem) {
  .portrait-ring { --photo-size: min(22.8rem, 50.445cqw); }
  .portrait-ring:has(.intro-bio[popover]) { --disc-size: clamp(12rem, 65cqw, 26rem); }
  .portrait-intro h1 { font-size: clamp(1.4rem, 4.8vw, 2.35rem); }
  .intro-bio[popover] {
    position: fixed;
    inset: 0;
    width: min(96vw, 90dvh, 36rem);
    height: auto;
    max-height: none;
    margin: auto;
    padding: 0;
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 1rem 4rem #15201a30;
  }
  .intro-bio:popover-open { display: grid; place-items: center; }
  .intro-bio[popover] .bio-reader {
    width: 68%;
    max-height: 68%;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .intro-bio::backdrop { background: #15201a55; }
}
@media (max-width: 900px) {
  .portrait-ring { --photo-size: min(22.8rem, 51.3cqw); }
}
@media (max-width: 680px) {
  .portrait-ring { --photo-size: min(22.8rem, 51.015cqw); }
}

.cipher-clue {
  width: max-content;
  max-width: 100%;
  margin-top: .75rem;
  padding-block: .35rem;
  background: var(--paper);
  color: var(--paper);
  font: 600 1rem/1.4 var(--mono);
  letter-spacing: .08em;
  cursor: text;
  -webkit-user-select: all;
  user-select: all;
}
.cipher-clue::selection,
.hunt-form ::selection {
  color: var(--ink);
  background: var(--lime);
}

.hunt-form {
  width: min(100%, 24rem);
  margin-top: 2rem;
  color: transparent;
}
.hunt-form label {
  display: block;
  user-select: text;
}
.hunt-form input {
  display: block;
  appearance: none;
  width: 100%;
  padding: .5rem 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font: inherit;
}
.hunt-form input:autofill {
  -webkit-text-fill-color: transparent;
  box-shadow: 0 0 0 100vmax var(--ink) inset;
}

.photo-dial { display: contents; }
.is-arranged .photo-dial { display: block; position: absolute; inset: 0; }
.is-unlocked .ring-photo, .is-unlocked .dial-face b {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.photo-dial.is-dragging, .photo-dial.is-dragging .ring-photo,
.portrait-ring:has(.is-dragging) .dial-face b { cursor: grabbing; }
.photo-dial:focus-visible { outline: 0; }
.photo-dial:focus-visible .ring-photo:first-child { outline: 3px solid var(--green); outline-offset: 3px; }
.dial-face {
  position: absolute;
  inset: 4%;
  pointer-events: none;
}
.dial-face > span {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transform: rotate(calc(var(--bearing) + var(--dial-turn, 0rad)));
}
.dial-face b {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: clamp(1.2rem, 3vw, 1.9rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font: 700 clamp(.87rem, 1.5vw, 1.125rem)/1 var(--mono);
  transform: rotate(calc(0deg - var(--bearing) - var(--dial-turn, 0rad)));
}
.dial-popup:not([hidden]) {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(.75rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .85rem 1.15rem;
  border-radius: .85rem;
  border: 1px solid #42543f;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 .35rem 1.5rem #14231930;
  pointer-events: none;
}
#dial-message { font: 700 1.25rem/1.25 var(--display); }
.dial-popup.is-solved #dial-message { color: var(--lime); }
.is-unlocked .portrait-intro::before {
  content: "";
  position: absolute;
  inset: 1.5%;
  border-radius: 50%;
  background: repeating-conic-gradient(#879777 0deg 1deg, transparent 1deg 6deg);
  mask-image: radial-gradient(closest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  transform: rotate(var(--dial-turn, 0rad));
  pointer-events: none;
}
.is-unlocked .portrait-intro::after {
  content: "";
  position: absolute;
  top: 1.2%;
  left: 50%;
  transform: translateX(-50%);
  border-inline: 4px solid transparent;
  border-top: 9px solid var(--ink);
  pointer-events: none;
}

/* Responsive additions to the imported stylesheet. Keep the original files intact. */
:root {
  --page-gutter: clamp(1rem, max(4.7vw, calc(12vw - 2.5rem)), 8rem);
  --portrait-gutter: clamp(.75rem, max(3.5vw, calc(7vw - 1.25rem)), 6rem);
}

.wrap {
  width: min(82rem, calc(100% - 2 * var(--page-gutter)));
}

.portrait-ring {
  --layout-photo-size: var(--photo-size);
  /* The existing dial measures this width, including during a turn. */
  width: min(104rem, calc(100% - 2 * var(--portrait-gutter)));
}

.ring-photo {
  width: min(100%, var(--layout-photo-size));
}

@media (max-width: 62rem) {
  .portrait-ring {
    /* Keep the original size until a pair of portraits no longer fits side by side. */
    --layout-photo-size: min(var(--photo-size), calc(50cqw - var(--portrait-gutter) - max(.6875rem, 2.3vw)));
  }
}

@media (min-width: 75rem) {
  .portrait-ring {
    /* Reference: 333px portraits and a 500px disc across a 2048px viewport. */
    --intro-unit: min(1cqw, 1.40625rem);
    --photo-size: calc(16.26 * var(--intro-unit));
    /* A minimum keeps the full inline bio legible on the smallest desktop layout. */
    --disc-size: max(20.375rem, calc(24.414 * var(--intro-unit)));
    /* The original dial derives its clearance from the ring width. This
       yields a 438px radius in the reference, with room for a flat-top hexagon. */
    width: calc(65.625 * var(--intro-unit));
  }

  .portrait-intro {
    height: var(--disc-size);
  }

  .is-arranged .intro-safe {
    position: absolute;
    inset: 1px;
    display: flow-root;
    width: auto;
    max-height: none;
    padding-top: 18%;
    overflow: visible;
  }

  /* Let line lengths follow the circle instead of confining the full bio
     to a narrow rectangle. The two mirrored shapes reserve the curved edges. */
  .is-arranged .intro-bio::before,
  .is-arranged .bio-reader::before {
    content: "";
    width: 48%;
    height: calc(.765 * var(--disc-size));
  }

  .is-arranged .intro-bio::before {
    float: left;
    shape-outside: polygon(0 0, 31% 0, 19% 10%, 12% 20%, 7% 30%, 6% 40%, 7% 50%, 10% 60%, 17% 70%, 28% 80%, 44% 90%, 74% 100%, 0 100%);
  }

  .is-arranged .bio-reader::before {
    float: right;
    shape-outside: polygon(69% 0, 100% 0, 100% 100%, 26% 100%, 56% 90%, 72% 80%, 83% 70%, 90% 60%, 93% 50%, 94% 40%, 93% 30%, 88% 20%, 81% 10%);
  }

  .is-arranged .portrait-intro h1 {
    position: absolute;
    inset: 11.45% 0 auto;
    font-size: calc(.0476 * var(--disc-size));
  }

  .is-arranged .intro-bio {
    margin-top: 0;
    font-family: Arial, "Liberation Sans", sans-serif;
    font-size: calc(.0394 * var(--disc-size));
    line-height: 1.16;
    letter-spacing: -.023em;
    text-align: center;
  }

  .is-arranged .intro-bio p + p {
    margin-top: .24em;
  }

  /* Keep the original dial readable without covering the full inline bio. */
  .is-arranged .dial-face {
    inset: calc(-.036 * var(--disc-size));
  }

  .is-arranged .dial-face b {
    width: calc(.057 * var(--disc-size));
    font-size: calc(.034 * var(--disc-size));
  }
}

/* A turned portrait can reach the full height of its orbit before the dial receives focus. */
.portrait-ring.is-arranged.is-unlocked {
  height: max(var(--ring-height), calc(var(--orbit-height) + var(--layout-photo-size)));
}

.detail-top h1 {
  overflow-wrap: anywhere;
}

/* Give long work titles and their artwork full-width rows on smaller tablets. */
@media (681px <= width <= 820px) {
  .detail-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}
