/* fonts are served from this site, so a visit sends nothing to anyone else */
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-serif-italic-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-serif-normal-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/inter-italic-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/inter-normal-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-normal-latin.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/vazirmatn-couplet.woff2") format('woff2'); unicode-range: U+627-628, U+62a, U+62f, U+631-634, U+639, U+641, U+644, U+646-648, U+67e, U+686, U+6a9, U+6af, U+6cc, U+200c; }
/* Maryam Akhyani. Night ink, warm paper text, gold and teal. One field of marks travels through the page. */
:root {
  --bg: #163f45;
  --bg2: #1d4f56;
  --ink: #efe8da;
  --muted: #c9c3b8;
  --faint: #b5afa5;
  --line: rgba(239, 232, 218, .13);
  --line2: rgba(239, 232, 218, .26);
  --gold: #d9ab3e;
  --plum: #d9ab3e;
  --plum-ink: #d9ab3e;
  --on-gold: #10282c;
  --teal: #3a7f82;
  --teal-ink: #8fd0cc;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fa: "Vazirmatn", "Geeza Pro", "Noto Naskh Arabic", -apple-system, serif;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --head: 4.6rem;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: var(--head); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.62 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before {
  /* faint eight-point stars, the only ornament */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23efe8da' stroke-opacity='.05'%3E%3Crect x='38' y='38' width='20' height='20'/%3E%3Crect x='38' y='38' width='20' height='20' transform='rotate(45 48 48)'/%3E%3C/g%3E%3C/svg%3E");
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--line2); }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--plum-ink); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: .7rem; z-index: 50; background: var(--bg2); padding: .5rem .8rem; }
.mono { font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; }
canvas#marks { position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; }

/* ---------- header ---------- */
.head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 clamp(1rem, 3vw, 2.4rem);
  background: var(--bg);
}
.head::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 1.6rem; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.mono-mark { font: 400 1.75rem/1 var(--serif); letter-spacing: -.02em; }
.brand .rule { width: 2.2rem; height: 1px; background: var(--gold); }
.brand .now { font-family: var(--mono); font-size: .78rem; letter-spacing: .14em; color: var(--muted); }
.head nav ul { display: flex; align-items: center; gap: clamp(.7rem, 1.6vw, 1.4rem); list-style: none; margin: 0; padding: 0; }
.head nav a:not(.pill) { text-decoration: none; font-size: .92rem; color: var(--muted); }
.head nav a:not(.pill):hover, .head nav a:not(.pill)[aria-current] { color: var(--ink); }
.pill {
  font: 500 .8rem/1 var(--mono); letter-spacing: .03em; color: var(--ink); background: transparent;
  border: 1px solid var(--line2); border-radius: 999px; padding: .62rem 1rem; cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color .25s, background .25s;
}
.pill:hover { border-color: var(--gold); }
.pill.solid { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.pill.solid:hover { background: #e6bd5c; }

/* ---------- side markers ---------- */
.rail { position: fixed; right: clamp(.8rem, 2vw, 1.6rem); top: 50%; transform: translateY(-50%); z-index: 15; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.rail a {
  position: relative; display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: 50%;
  border: 1px solid var(--line2); font: 500 .78rem/1 var(--mono); color: var(--muted); text-decoration: none; background: color-mix(in oklab, var(--bg) 70%, transparent);
  transition: background .35s var(--ease), color .35s, border-color .35s;
}
.rail a span {
  position: absolute; right: calc(100% + .7rem); white-space: nowrap; font: 400 .8rem/1 var(--mono); letter-spacing: .04em; color: var(--muted);
  opacity: 0; transform: translateX(.3rem); transition: opacity .3s, transform .3s var(--ease-out); pointer-events: none;
}
.rail a:hover span, .rail a:focus-visible span, .rail a[aria-current] span { opacity: 1; transform: none; }
.rail a[aria-current] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* ---------- sections ---------- */
main { position: relative; z-index: 2; }
.sec { min-height: calc(var(--vh, 1vh) * 100); min-height: calc(var(--vh, 1vh) * 100); display: grid; align-items: center; padding: calc(var(--head) + 2rem) clamp(1.2rem, 6vw, 6.5rem) 4rem; }
.col { width: min(36rem, 46vw); }
.idx { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.2rem; font: 400 .8rem/1 var(--mono); letter-spacing: .14em; color: var(--plum-ink); }
.idx::after { content: ""; width: 3rem; height: 1px; background: var(--gold); opacity: .6; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; margin: 0; }
h2 { font-size: clamp(2.8rem, 5.6vw, 5.2rem); line-height: .98; margin-bottom: 1.6rem; }
h3 { font-size: 1.6rem; line-height: 1.1; }
p { margin: 0 0 1.1rem; max-width: 60ch; }
.muted { color: var(--muted); }

/* arrival */
.arrival { align-items: end; padding-bottom: clamp(3rem, calc(var(--vh, 1vh) * 10), 7rem); }
.arrival .who { font: 400 .82rem/1.5 var(--mono); letter-spacing: .08em; color: var(--muted); margin-bottom: 1.4rem; }
/* the loop (see marks.js): the opening's face fades in over the page's end, exactly where the real opening sits at the top */
.loop-face { position: fixed; top: 0; left: 0; right: 0; z-index: 2; pointer-events: none; opacity: 0; visibility: hidden; }
.loop-gap { display: block; min-height: 0; padding: 0; }
/* the opening's face in the loop (see marks.js) wears the name exactly as the real heading does */
.arrival .h1-again { font-family: var(--serif); font-weight: 400; }
.arrival h1, .arrival .h1-again { font-size: clamp(4rem, 10.5vw, 10.5rem); line-height: .86; letter-spacing: -.025em; margin: 0 0 2rem; }
.arrival h1 span, .arrival .h1-again span { display: block; }
.arrival h1 span + span, .arrival .h1-again span + span { padding-left: .55em; }
.arrival .line { font: 400 clamp(1.5rem, 2.5vw, 2.2rem)/1.16 var(--serif); max-width: none; margin-bottom: 2.2rem; }
.arrival .line span { display: block; }
.arrival .line span:last-child { color: var(--gold); font-style: italic; }
/* the role leads the stanza: same voice as the lines under it, set apart by a breath so a skimmer reads it first */
.arrival .line .role { margin-bottom: .55em; color: var(--gold); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

/* at a glance */
.facts { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); margin: 0; }
.facts dt, .facts dd { margin: 0; padding: .78rem 0; border-top: 1px solid var(--line); }
.facts dt { font: 400 .78rem/1.9 var(--mono); letter-spacing: .06em; color: var(--muted); }
.facts dd b { font-weight: 500; }

/* listening */
.legend { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.legend li { display: flex; align-items: center; gap: .55rem; }
.sw { width: .7rem; height: .7rem; display: inline-block; }
.sw.i { border-radius: 50%; background: var(--gold); }
.sw.s { border-radius: 50%; border: 1.6px solid var(--teal-ink); }
.sw.t { background: #cfc6b6; transform: rotate(45deg) scale(.78); }
figure.voice { margin: 1.8rem 0 0; min-height: 8rem; border-left: 2px solid var(--gold); padding: .2rem 0 .2rem 1.2rem; transition: opacity .35s; }
figure.voice.swap { opacity: 0; }
figure.voice blockquote { margin: 0 0 .6rem; font: italic 400 clamp(1.45rem, 2vw, 1.85rem)/1.22 var(--serif); }
figure.voice figcaption { color: var(--muted); }
.fine { font: 400 .76rem/1.6 var(--mono); color: var(--faint); margin-top: 1rem; }
.btnrow { margin-top: 1.2rem; }

/* routes */
.routes .col { width: min(40rem, 48vw); }
.cases { list-style: none; padding: 0; margin: 1.4rem 0 0; counter-reset: c; }
.case { border-top: 1px solid var(--line); }
.case:last-child { border-bottom: 1px solid var(--line); }
.case a { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: .2rem 1.2rem; padding: 1.05rem 0 1.1rem; text-decoration: none; position: relative; }
.case .num { grid-row: 1 / span 3; font: 400 clamp(2.1rem, 3vw, 2.7rem)/.95 var(--serif); color: var(--gold); letter-spacing: -.02em; }
.case.bl .num { color: var(--teal-ink); }
.case .t { font: 400 1.32rem/1.2 var(--serif); }
.case .unit { font: 400 .74rem/1.5 var(--mono); color: var(--muted); grid-column: 1; grid-row: 4; }
.case .co { font: 400 .76rem/1.5 var(--mono); letter-spacing: .04em; color: var(--muted); }
.case .why { font-size: .95rem; color: var(--muted); margin: 0; }
.case a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease); }
.case.bl a::after { background: var(--teal-ink); }
.case a:hover::after, .case a:focus-visible::after, .case.on a::after { transform: scaleX(1); }
.more { margin-top: 1.8rem; }
.more summary { cursor: pointer; font: 400 .82rem/1 var(--mono); color: var(--muted); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+ "; color: var(--gold); }
.more[open] summary::before { content: "- "; }
.more ul { margin: 1rem 0 0; padding: 0; list-style: none; }
.more li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 1rem; padding: .45rem 0; font-size: .95rem; color: var(--muted); }
.more li b { font: 400 1.15rem/1.3 var(--serif); color: var(--ink); font-weight: 400; }
.confirm { text-decoration: underline dotted var(--gold); text-underline-offset: .3em; }
.confirm::after { content: "to confirm"; font: 600 .62rem/1 var(--sans); letter-spacing: .02em; color: var(--on-gold); background: var(--gold); padding: .18rem .3rem; border-radius: 2px; margin-left: .4rem; vertical-align: .3em; white-space: nowrap; }

/* later sections, text first */
.next .verse { font: 400 clamp(1.1rem, 1.6vw, 1.3rem)/2 var(--fa); color: var(--gold); margin: 0 0 .4rem; }
.next .verse-en { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }
.links { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .5rem; font-size: 1.1rem; }
.doors { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.doors li { border-top: 1px solid var(--line); padding: .9rem 0; }
.doors li:last-child { border-bottom: 1px solid var(--line); }
.doors b { font: 400 1.35rem/1.2 var(--serif); font-weight: 400; display: block; }
.you-note { font: 400 .8rem/1.6 var(--mono); color: var(--plum-ink); min-height: 1.3rem; }

footer.site { position: relative; z-index: 2; padding: 2rem clamp(1.2rem, 6vw, 6.5rem) 2.4rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font: 400 .76rem/1.6 var(--mono); color: var(--faint); }

/* reveal: text rises from behind a mask once */
html.js [data-rise] { clip-path: inset(0 0 100% 0); transform: translateY(1.2rem); transition: clip-path 1s var(--ease-out), transform 1s var(--ease-out); }
html.js [data-rise].in { clip-path: inset(0 0 -10% 0); transform: none; }

/* plain reading and motion off */
html[data-plain="on"] canvas#marks, html[data-plain="on"] body::before { display: none; }
html[data-plain="on"] .col, html[data-plain="on"] .routes .col { width: min(44rem, 100%); }
html[data-plain="on"] .sec { min-height: 0; padding-top: calc(var(--head) + 1.5rem); padding-bottom: 2.5rem; }
html[data-plain="on"] [data-rise] { clip-path: none !important; transform: none !important; }
html[data-plain="on"] .rail { display: none; }
html[data-motion="off"] [data-rise] { clip-path: none !important; transform: none !important; transition: none !important; }
html[data-motion="off"] *, html[data-motion="off"] *::after { transition-duration: 0s !important; }

/* page transitions between documents */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .45s var(--ease) both fade-out; }
::view-transition-new(root) { animation: .8s var(--ease-out) both rise-in; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; clip-path: inset(12% 0 0 0); } to { opacity: 1; clip-path: inset(0); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  :root { --head: 4rem; }
  .col, .routes .col { width: 100%; }
  .sec { min-height: 0; padding-top: calc(var(--head) + 3rem); padding-bottom: 3.5rem; }
  .arrival { min-height: calc(var(--vh, 1vh) * 100); }
  .rail { display: none; }
  .head nav li.wide { display: none; }
  .brand .rule, .brand .now { display: none; }
  .case a { grid-template-columns: 4.8rem minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dt { padding-bottom: 0; }
  .facts dd { border-top: 0; padding-top: .15rem; }
  canvas#marks { opacity: .26; }
}

.doors li > span, .doors li a + span { display: block; margin-top: .25rem; }

/* experience */
.job { margin: 1.6rem 0 0; padding-top: 1.3rem; border-top: 1px solid var(--line2); }
.job header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.job h3 { font-size: clamp(1.7rem, 2.4vw, 2.2rem); }
.job h3 span { font: 400 .78rem/1 var(--mono); color: var(--muted); letter-spacing: .04em; margin-left: .5rem; vertical-align: .35em; }
.job .role { font: 400 .78rem/1.6 var(--mono); color: var(--plum-ink); margin: 0; text-align: right; }
.job.bl .role { color: var(--teal-ink); }
.job.jh .role { color: #cfc6b6; }
.job .ctx { color: var(--muted); margin: .5rem 0 .4rem; }
.hl { list-style: none; margin: .4rem 0 0; padding: 0; }
.hl li { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: 1rem; padding: .55rem .4rem .55rem 0; border-radius: 2px; transition: background .3s; }
.hl li.on { background: rgba(239, 232, 218, .045); }
.hl b { font: 400 1.7rem/1 var(--serif); color: var(--gold); font-weight: 400; letter-spacing: -.02em; }
.job.bl .hl b { color: var(--teal-ink); }
.hl b.dot { width: .55rem; height: .55rem; border-radius: 50%; background: #cfc6b6; margin: .55rem 0 0 .2rem; }
.hl span { font-size: .98rem; }
.hl a { color: var(--ink); white-space: nowrap; }

/* playground */
.play { position: relative; }
.lede-s { font: italic 400 clamp(1.4rem, 2.1vw, 1.85rem)/1.25 var(--serif); color: var(--gold); max-width: 24ch; }
.thumbs { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; max-width: 30rem; }
.thumbs button { all: unset; cursor: pointer; display: grid; gap: .45rem; width: 100%; }
.thumbs img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; border: 1px solid var(--line); opacity: .55; filter: saturate(.6); transition: opacity .35s, filter .35s, border-color .35s; }
.thumbs button:hover img, .thumbs button[aria-pressed="true"] img { opacity: 1; filter: none; border-color: var(--gold); }
.thumbs button:focus-visible { outline: 2px solid var(--plum-ink); outline-offset: 3px; }
.thumbs span { font-size: .85rem; line-height: 1.3; }
.thumbs i { display: block; font: normal 400 .7rem/1.5 var(--mono); color: var(--muted); }
.play { align-items: start; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); width: 100%; padding-right: 4.5rem; align-items: start; min-height: calc(var(--vh, 1vh) * 135); }
.play .col { width: 100%; max-width: 32rem; }
.grp { font: 400 .8rem/1 var(--mono); letter-spacing: .08em; color: var(--muted); margin: 2.2rem 0 0; }
.feature {
  position: sticky; top: calc(var(--head) + calc(var(--vh, 1vh) * 4)); height: calc(calc(var(--vh, 1vh) * 100) - var(--head) - calc(var(--vh, 1vh) * 14)); height: calc(calc(var(--vh, 1vh) * 100) - var(--head) - calc(var(--vh, 1vh) * 14));
  margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 1.1rem; cursor: zoom-in;
}
.feature img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; min-height: 0; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); transition: opacity .45s var(--ease), transform .6s var(--ease-out); }
.feature.swap img { opacity: 0; transform: translateY(8px); }
.feature figcaption { text-align: center; font: 400 .76rem/1.5 var(--mono); color: var(--muted); }


/* closing saying */
.saying { margin: 2.4rem 0 0; padding: 1.4rem 0 0; border-top: 1px solid var(--line); }
.saying .lead { color: var(--muted); font-size: .98rem; }
.saying blockquote { margin: 0; }
.saying .verse { font: 400 clamp(1.15rem, 1.7vw, 1.4rem)/2 var(--fa); color: var(--plum-ink); margin: .9rem 0 .7rem; max-width: none; text-align: center; }
.saying .verse-tr { font: italic 400 clamp(1.4rem, 2vw, 1.75rem)/1.25 var(--serif); margin: 0 0 .5rem; }
.saying figcaption { font: 400 .76rem/1.5 var(--mono); color: var(--muted); }

@media (max-width: 900px) {
  .play-grid { grid-template-columns: minmax(0, 1fr); padding-right: 0; min-height: 0; }
  .feature { position: relative; top: 0; height: auto; display: block; margin-top: .5rem; cursor: default; padding: 18px; }
  .feature img { margin: 0 auto; max-height: calc(var(--vh, 1vh) * 64); }
  .feature figcaption { margin-top: .9rem; }
  .you-spot { height: 150px; margin: 1.6rem 0 .4rem; }
  .job .role { text-align: left; }
  .hl li { grid-template-columns: 3.6rem minmax(0, 1fr); }
}
.saying + .you-note { margin-top: 1.6rem; }

/* ---------- case study pages ---------- */
.case-page { display: block; min-height: 0; padding-top: calc(var(--head) + 3.5rem); }
.case-page article { width: min(40rem, 46vw); }
.back { font: 400 .78rem/1 var(--mono); letter-spacing: .04em; color: var(--muted); text-decoration: none; display: inline-flex; gap: .5rem; margin-bottom: 2.2rem; }
.back:hover { color: var(--ink); }
.case-page h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -.015em; margin: 0 0 1.4rem; }
.case-meta { font: 400 .8rem/1.7 var(--mono); color: var(--plum-ink); margin: 0 0 2.2rem; }
.case-page.bl .case-meta { color: var(--teal-ink); }
.tldr { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); margin: 0 0 2.6rem; border-top: 1px solid var(--line2); }
.tldr dt, .tldr dd { margin: 0; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.tldr dt { font: 400 .76rem/1.9 var(--mono); letter-spacing: .06em; color: var(--muted); }
.big { display: flex; flex-wrap: wrap; gap: 1.2rem 2.6rem; margin: 2.4rem 0; padding: 1.6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.big div { display: grid; gap: .2rem; }
.big b { font: 400 clamp(2.8rem, 4.6vw, 4rem)/.95 var(--serif); font-weight: 400; color: var(--gold); letter-spacing: -.02em; }
.case-page.bl .big b { color: var(--teal-ink); }
.big span { font: 400 .76rem/1.5 var(--mono); color: var(--muted); max-width: 16rem; }
.case-page h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin: 3rem 0 1rem; }
.case-page h3 { font-size: 1.35rem; margin: 1.8rem 0 .6rem; }
.case-page ul.points { padding-left: 1.1rem; margin: 0 0 1.2rem; }
.case-page ul.points li { margin: .35rem 0; }
.case-page blockquote.pull { margin: 2rem 0; padding-left: 1.2rem; border-left: 2px solid var(--gold); font: italic 400 clamp(1.4rem, 2.2vw, 1.8rem)/1.25 var(--serif); }
.case-page .note { font: 400 .76rem/1.6 var(--mono); color: var(--faint); }
.case-page figure.shot { margin: 2rem 0; }
.case-page figure.shot img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; }
.case-page figure.shot figcaption { margin-top: .7rem; font: 400 .76rem/1.6 var(--mono); color: var(--muted); }
.next-case { margin: 3.6rem 0 0; padding: 1.4rem 0; border-top: 1px solid var(--line2); display: grid; gap: .3rem; text-decoration: none; }
.next-case span { font: 400 .76rem/1 var(--mono); color: var(--muted); }
.next-case b { font: 400 1.7rem/1.15 var(--serif); font-weight: 400; }
.next-case:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
@media (max-width: 900px) { .case-page article { width: 100%; } .tldr { grid-template-columns: minmax(0, 1fr); } .tldr dt { padding-bottom: 0; border-bottom: 0; } }

/* review fixes */
.head nav li.mob { display: none; }
@media (max-width: 900px) { .head nav li.mob { display: list-item; } .head nav li.plain-li { display: none; } }
@media (hover: none) { .hover-only { display: none; } }
.big b.confirm { text-decoration: none; }
.big b.confirm::after { vertical-align: 1.6em; }

/* verification fixes */
.doors a { display: block; }
html.js [data-rise].in { clip-path: inset(-.75rem -.75rem -10% -.75rem); }
html.js [data-rise]:focus-within { clip-path: none !important; transform: none !important; transition: none !important; }
.thumbs img { height: auto; }

.saying figcaption { text-align: center; }
.hl b.confirm { text-decoration: none; }
.hl b.confirm::after { display: block; width: max-content; margin: .4rem 0 0; vertical-align: baseline; }

/* a Persian plum dot for the cursor, on devices with a mouse */
html.has-dot, html.has-dot * { cursor: none !important; }
.cursor-dot {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
  background: #701c1c; box-shadow: 0 0 10px 2px rgba(150, 42, 52, .55);
  transition: width .22s var(--ease-out), height .22s var(--ease-out), margin .22s var(--ease-out), opacity .2s, background .22s, box-shadow .22s;
  will-change: transform;
}
.cursor-dot.hover { width: 16px; height: 16px; margin: -8px 0 0 -8px; box-shadow: 0 0 16px 6px rgba(170, 52, 62, .6); }
.cursor-dot.down { width: 8px; height: 8px; margin: -4px 0 0 -4px; }
.cursor-dot.hover.down { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.cursor-dot.gone { opacity: 0; }
.cursor-light {
  position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 238, 218, .8) 0%, rgba(226, 132, 132, .42) 26%, rgba(112, 28, 28, .22) 48%, rgba(112, 28, 28, 0) 70%);
  animation: cursor-light .65s var(--ease-out) forwards;
}
@keyframes cursor-light { from { transform: var(--at) scale(.15); opacity: 1; } to { transform: var(--at) scale(1.6); opacity: 0; } }
html[data-motion="off"] .cursor-light { animation-duration: .25s; }

/* side markers in Persian plum */
.rail a { border-color: rgba(168, 66, 76, .75); }
.rail a:hover { border-color: #c45a64; color: var(--ink); }
.rail a[aria-current] { background: #701c1c; border-color: #701c1c; color: var(--ink); box-shadow: 0 0 14px 3px rgba(150, 42, 52, .55); }

/* over the side markers the cursor steps aside and the marker glows in its own plum */
.cursor-dot.on-rail { opacity: 0; }
.rail a { transition: background .3s var(--ease), color .3s, border-color .3s, box-shadow .35s var(--ease-out); }
.rail a:hover { background: rgba(112, 28, 28, .55); border-color: #a8424c; color: var(--ink); box-shadow: 0 0 16px 4px rgba(150, 42, 52, .6); }
.rail a[aria-current]:hover { background: #7d2222; box-shadow: 0 0 24px 7px rgba(170, 52, 62, .75); }

/* soft lights in front of the marks, behind the text, desktop only */
canvas#bokeh { position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; }
html[data-plain="on"] canvas#bokeh { display: none; }
@media (max-width: 900px), (pointer: coarse) { canvas#bokeh { display: none; } }

/* between Next and Playground */
.between .kicker { font: italic 400 clamp(1.9rem, 3.2vw, 2.9rem)/1.12 var(--serif); color: var(--gold); letter-spacing: -.005em; margin: 0 0 1.4rem; max-width: 20ch; }
.between .saying { border-top: 0; padding-top: 0; margin-top: 0; }
.you-spot { height: 0; }
@media (max-width: 900px) { .you-spot { height: 150px; margin: 1.6rem 0 .4rem; } }
.between .saying + p { margin-top: 1.6rem; }

/* earlier work: pieces open from their marks */
.touch-only { display: none; }
@media (hover: none) { .touch-only { display: inline; } }
.workpop {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none; width: 240px; margin: 0; padding: 8px 8px 10px;
  background: rgba(16, 40, 44, .94); border: 1px solid rgba(217, 171, 62, .55); border-radius: 4px; box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .75);
  opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .25s var(--ease), transform .35s var(--ease-out);
}
.workpop.show { opacity: 1; transform: none; }
.workpop img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: contain; background: #10282c; }
.workpop figcaption { font: 400 .72rem/1.45 var(--mono); color: var(--muted); margin-top: .55rem; }
html[data-motion="off"] .workpop { transition: none; }
@media (min-width: 901px) { .next .you-note { margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); max-width: 34rem; } }
@media (max-width: 900px) { .desktop-only { display: none; } }

/* the "to confirm" badge is retired */
.confirm::after, .confirm.confirm::after { content: none !important; display: none !important; }
.confirm { text-decoration: none !important; }

/* ---------- consistency pass, 2026-11-28 ---------- */
:root { --cap: .76rem; --cap-s: .7rem; --colw: min(38rem, 46vw); }

/* one column width for every text column */
.col, .routes .col, .case-page article { width: var(--colw); }
.play .col { max-width: 38rem; }
.hero-col { width: min(60rem, 92vw); }

/* every section starts its text at the same height; the hero keeps its own footing */
@media (min-width: 901px) {
  .sec:not(.arrival) { align-items: start; padding-top: calc(var(--head) + 5rem); padding-bottom: 5rem; }
  .play-grid { padding-right: max(4.5rem, calc(15rem - 6vw)); }
}
@media (max-width: 900px) {
  .col, .routes .col, .case-page article, .hero-col { width: 100%; }
  .lost { min-height: calc(var(--vh, 1vh) * 100); }
  .back { padding: .7rem 0; margin-bottom: 1.6rem; }
}

/* the 404 title uses the section title size */
.h-like-h2 { font-size: clamp(2.8rem, 5.6vw, 5.2rem); line-height: .98; margin: 0 0 1.6rem; }

/* one caption size per role */
.brand .now, .rail a span, .facts dt, .tldr dt, figure.voice figcaption, .fine, .case .unit, .case .co, .job h3 span, .job .role,
.grp, .you-note, .back, .case-meta, .big span, .case-page .note, .next-case span, .feature figcaption, .saying figcaption,
.doors .mono, footer.site { font-size: var(--cap); }
.thumbs i, .workpop figcaption { font-size: var(--cap-s); }
.case-meta { max-width: none; }

/* header and footer pills share one look */
.head nav a.pill, .actions .pill { font-size: .8rem; color: var(--ink); }
.motion-pill { margin-left: .6rem; padding: .4rem .7rem; font-size: var(--cap-s); }

/* side markers: an unnumbered dot for the pause before the Playground */
.rail li.minor { display: grid; justify-items: center; }
.rail li.minor a { width: .8rem; height: .8rem; }
.rail li.minor a span { right: calc(100% + .7rem + .775rem); }

/* earlier work rows light up like the result rows */
/* every row in a list of doors answers the pointer the same way */
.doors li { transition: background .3s; border-radius: 2px; }
.doors li:hover, .doors li:focus-within, .doors li.on { background: rgba(239, 232, 218, .045); }
html.over-work .cursor-dot { width: 16px; height: 16px; margin: -8px 0 0 -8px; box-shadow: 0 0 16px 6px rgba(170, 52, 62, .6); }

/* the Balad pull quote in Balad teal */
.case-page.bl blockquote.pull { border-left-color: var(--teal-ink); }

/* the Saadi block is centred as a whole */
.saying, .saying .lead, .saying .verse-tr { text-align: center; }
.saying .lead, .saying .verse-tr { margin-left: auto; margin-right: auto; }

/* playground: the caption always sits right under the artwork */
@media (min-width: 901px) {
  .feature { grid-template-rows: auto auto; align-content: center; }
  .feature img { max-height: calc(var(--vh, 1vh) * 86 - var(--head) - 3.6rem); }
}

/* ---------- playground: a space you walk into ---------- */
.play-track { position: relative; }
.play-bar, .pg-only { display: none; }
.pieces { list-style: none; margin: 0; padding: 0; }
.piece { margin: 0; }
.piece a.open { display: block; }
.piece img { display: block; max-width: 100%; height: auto; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.piece figcaption { font: 400 var(--cap)/1.5 var(--mono); color: var(--muted); margin-top: 17px; text-align: center; }
.play-index .grp { margin: 1.5rem 0 .55rem; }
.play-index ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .2rem 1rem; }
.play-index a { display: inline-block; padding: .22rem 0; font-size: .9rem; line-height: 1.3; color: var(--muted); text-decoration: none; transition: color .3s; }
.play-index a:hover, .play-index a:focus-visible { color: var(--ink); }
.play-index a[aria-current]::after { content: ""; display: block; width: 1.4rem; height: 1px; margin-top: .3rem; background: var(--gold); }

/* the calm version: motion off, reduced motion, or no script */
.play:not(.pg-3d) .play-pin { display: grid; grid-template-columns: min(38rem, 36vw) minmax(0, 1fr); gap: max(48px, 5vw); align-items: start; margin-top: 1.6rem; }
.play:not(.pg-3d) .play-side { position: sticky; top: calc(var(--head) + 2rem); }
@media (min-width: 901px) { .play:not(.pg-3d) .play-pin { padding-right: max(4.5rem, calc(15rem - 6vw)); } }
.play:not(.pg-3d) .play-space > .grp { margin: 0 0 2rem; }
.play:not(.pg-3d) .pieces { display: grid; gap: calc(var(--vh, 1vh) * 14); margin-bottom: calc(var(--vh, 1vh) * 14); }
.play:not(.pg-3d) .piece { display: flex; flex-direction: column; align-items: center; }
.play:not(.pg-3d) .piece img { width: auto; max-height: calc(var(--vh, 1vh) * 78); }
@media (max-width: 900px) {
  .play:not(.pg-3d) .play-pin { grid-template-columns: minmax(0, 1fr); }
  .play:not(.pg-3d) .play-side { position: static; }
  .play:not(.pg-3d) .play-index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the walk */
.sec.play.pg-3d { display: block; padding: 0; min-height: 0; }
.pg-3d .pg-only { display: block; }
.pg-3d .play-pin { position: sticky; top: 0; height: calc(var(--vh, 1vh) * 100); overflow: hidden; }
.pg-3d .play-side { position: absolute; z-index: 3; left: clamp(1.2rem, 6vw, 6.5rem); top: calc(var(--head) + 5rem); width: min(38rem, 36vw); }
.pg-3d .play-side .play-head { width: auto; max-width: none; }
/* a long list: the lede runs the full column and the names sit closer, so the whole list fits beside the overview */
.pg-3d .play-side .lede-s { max-width: none; }
.pg-3d .play-index ol { gap: 0 1rem; }
.pg-3d .play-index a { font-size: .86rem; padding: .16rem 0; }
.pg-3d .play-index a { color: var(--faint); }
.pg-3d .play-index a.seen { color: var(--muted); }
.pg-3d .play-index a[aria-current] { color: var(--ink); }
.pg-3d .play-space {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity .13s;
}
.pg-3d .play-space.cut { opacity: 0; }
.pg-3d .play-space.slow { transition: opacity .34s var(--ease); }
.pg-3d .play-space > .grp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pg-3d .piece { position: absolute; left: 0; top: 0; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity; backface-visibility: hidden; }
.pg-3d .piece.still { will-change: auto; }
.pg-3d .piece img { width: 100%; max-width: none; }
.pg-3d .piece figcaption { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); opacity: var(--capa, 0); transition: opacity .3s; }
.pg-3d .piece a.open:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
@media (max-width: 900px) {
  .sec.play.pg-3d .play-head { padding: calc(var(--head) + 3rem) clamp(1.2rem, 6vw, 6.5rem) 1rem; }
  .pg-3d .play-side { display: none; left: 12px; right: 12px; top: auto; bottom: 6.4rem; width: auto; max-height: 62%; overflow: auto; z-index: 5; padding: .4rem 1.1rem 1.1rem; background: rgba(16, 40, 44, .97); border: 1px solid var(--line2); border-radius: 6px; }
  .pg-3d .play-side.sheet { display: block; }
  .pg-3d .play-index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-3d .play-index a { padding: .45rem 0; }
  .pg-3d .play-bar { display: flex; flex-wrap: wrap; position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 4; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
}
.play-count { font: 400 var(--cap)/1.4 var(--mono); color: var(--muted); }
@media (min-width: 901px) {
  .pg-3d .play-bar { display: flex; position: absolute; left: clamp(1.2rem, 6vw, 6.5rem); right: clamp(1.2rem, 6vw, 6.5rem); bottom: 22px; z-index: 4; align-items: center; justify-content: space-between; gap: 1rem; opacity: 0; visibility: hidden; }
  .pg-3d .play-side.sheet { top: auto; bottom: 84px; left: auto; right: clamp(1.2rem, 6vw, 6.5rem); width: min(36rem, 44vw); max-height: calc(var(--vh, 1vh) * 64); overflow: auto; padding: .4rem 1.2rem 1.2rem; background: rgba(16, 40, 44, .97); border: 1px solid var(--line2); border-radius: 6px; z-index: 5; }
  .pg-3d .play-side.sheet .play-head { display: none; }
}
.play-bar-r { display: flex; gap: .6rem; align-items: center; }

/* opening a piece */
.play-open { border: 0; padding: 1.2rem; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(16, 40, 44, .97); color: var(--ink); }
.play-open[open] { display: grid; align-content: center; justify-items: center; gap: 1.2rem; }
.play-open::backdrop { background: rgba(10, 28, 31, .6); }
.play-open figure { margin: 0; display: grid; justify-items: center; gap: 1rem; }
.play-open img { display: block; max-width: min(92vw, 1600px); max-height: calc(100vh - 10rem); max-height: calc(100dvh - 10rem); width: auto; height: auto; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.play-open figcaption { font: 400 var(--cap)/1.5 var(--mono); color: var(--muted); text-align: center; }
.play-open .btnrow { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 0; }
html.has-dot .play-open, html.has-dot .play-open * { cursor: auto !important; }
html.has-dot .play-open button { cursor: pointer !important; }
html[data-motion="off"] .play-space, html[data-motion="off"] .piece figcaption { transition: none; }
@media (min-width: 901px) and (max-height: 860px) {
  .pg-3d .play-side { top: calc(var(--head) + 2.6rem); }
  .pg-3d .play-side .play-head .fine { display: none; }
  .pg-3d .play-index .grp { margin-top: 1.1rem; }
  .pg-3d .play-index a { padding: .1rem 0; font-size: .82rem; }
  .pg-3d .play-side .lede-s { font-size: clamp(1.15rem, 1.55vw, 1.4rem); }
  .pg-3d .play-side h2 { margin-bottom: 1rem; }
}

/* ---------- after Contact: the band of marks and the line ---------- */
/* a short strip in the flow of the page, right under Contact; the script sets its height to the band's */
.sec.wander { display: flex; align-items: center; justify-content: center; padding: 0; min-height: 0; pointer-events: none; }
.wander-line { position: relative; width: max-content; max-width: 100%; margin: 0 auto; text-align: center; font: 400 clamp(2.4rem, 4.4vw, 4.8rem)/1.04 var(--serif); letter-spacing: -.012em; color: var(--ink); }
html.js .wander-line { pointer-events: none; }
html:not(.js) .sec.wander, html[data-plain="on"] .sec.wander { height: auto !important; margin-top: 0 !important; padding: 3rem 0; }
html[data-plain="on"] .wander-line, html[data-plain="on"] .wander-line .l { opacity: 1 !important; transform: none !important; visibility: visible !important; }
.wander-line em { display: block; font-style: italic; color: var(--gold); }
.wander-line .w { display: inline-block; white-space: nowrap; }
.wander-line .l { display: inline-block; will-change: transform; }
@media (max-width: 900px) { .wander-line { font-size: clamp(2.2rem, 10vw, 3.2rem); } }
/* desktop: the line sits where every section's text starts, with the band of marks to its right */
/* desktop: the Playground's title follows the poem at the same distance sections keep elsewhere */
@media (min-width: 901px) { .sec.play.pg-3d { margin-top: calc(-1 * (var(--head) + 4rem)); } }
@media (min-width: 901px) { .sec.wander { justify-content: flex-start; padding-left: clamp(1.2rem, 6vw, 6.5rem); } .wander-line { margin: 0; text-align: left; } }

/* the pause follows the band closely and is only as tall as its content */
.sec.between { min-height: 0; padding-top: 3rem; }
/* her own words sit apart from Saadi's: left aligned, while the verse and its translation stay centred */
.between .saying .lead { text-align: left; margin-left: 0; }
.between .rings-note { color: var(--muted); font-size: .98rem; }
/* the Persian couplet reads as one piece: two lines set close, each stretched to the same width, held in a pair of brackets */
.between .saying .verse { display: table; position: relative; margin: .9rem auto .8rem; padding: .05em .85em; line-height: 1.55; }
.between .saying .verse br { display: none; }
.between .saying .verse .vl { display: block; text-align: justify; text-align-last: justify; }
.between .saying .verse::before, .between .saying .verse::after { content: ''; position: absolute; top: .2em; bottom: .2em; width: .32em; border: 2px solid currentColor; }
.between .saying .verse::before { left: 0; border-right: 0; }
.between .saying .verse::after { right: 0; border-left: 0; }

/* the walk's way out (see marks.js): a small close mark under MA, on MA's left edge, as far below it as MA sits below the top */
.walk-exit { position: fixed; z-index: 25; top: var(--head); left: clamp(1rem, 3vw, 2.4rem); width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2); background: rgba(16, 40, 44, .6); color: var(--muted); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s, color .25s, background .25s, border-color .25s, box-shadow .3s; }
.walk-exit.on { opacity: 1; visibility: visible; transition: opacity .4s var(--ease), visibility 0s, color .25s, background .25s, border-color .25s, box-shadow .3s; }
.walk-exit::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; } /* a fingertip-sized target around the small mark */
.walk-exit svg { width: 9px; height: 9px; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; fill: none; }
.walk-exit:focus-visible { color: var(--ink); background: rgba(112, 28, 28, .55); border-color: #a8424c; box-shadow: 0 0 10px 2px rgba(150, 42, 52, .55); outline: none; }
@media (hover: hover) { .walk-exit:hover { color: var(--ink); background: rgba(112, 28, 28, .55); border-color: #a8424c; box-shadow: 0 0 10px 2px rgba(150, 42, 52, .55); } }
html[data-plain="on"] .walk-exit, html[data-motion="off"] .walk-exit { display: none; }

/* old addresses from the previous site (#home, #about, #contact...) land on the matching section */
.alias { position: absolute; width: 1px; height: 1px; pointer-events: none; }
