* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { --night: #101110; --frame-x: 24px; --frame-y: 14px;
 --edge-t: calc(var(--frame-y) + env(safe-area-inset-top, 0px)); --edge-r: calc(var(--frame-x) + env(safe-area-inset-right, 0px));
 --edge-b: calc(var(--frame-y) + env(safe-area-inset-bottom, 0px)); --edge-l: calc(var(--frame-x) + env(safe-area-inset-left, 0px));
 color-scheme: dark; }
@media (max-width: 650px) { :root { --frame-x: 12px; --frame-y: 10px; } }
html, body { height: 100%; overflow: hidden; background: #101110; }
body { margin: 0; color: #302e28; font-family: Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
canvas, input { -webkit-tap-highlight-color: transparent; }
h1:focus, .note:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* The frame: the page is a window at the --edge-* insets; content scrolls inside it. */
.page { position: fixed; top: var(--edge-t); right: var(--edge-r); bottom: var(--edge-b); left: var(--edge-l); z-index: 1; overflow: hidden; background: #101110; }
.page-scroll { position: absolute; top: calc(-1 * var(--edge-t)); right: calc(-1 * var(--edge-r)); bottom: calc(-1 * var(--edge-b)); left: calc(-1 * var(--edge-l)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html.intro-pending .page-scroll { overflow: hidden; }
.page-scroll:focus { outline: none; }

/* The portrait and the wordmark live in .shell, laid out exactly as on the full site's first screen
   (never shown: visibility hidden while the gate is up, display none after). The gate script stands
   them in the gate's slots; keeping the same untransformed position keeps the same sub-pixel
   rendering of the photo and the wordmark. .shell is its own stacking context so the photo's
   multiply blend has nothing under it to darken. */
:root { --mast-h: 116px; --peek: 230px; }
.shell { display: none; margin: auto; position: relative; z-index: 1; width: min(100% - 112px, 1040px); }
html.gate .shell { display: block; }
html.intro-pending .shell { visibility: hidden; }
@supports (padding: env(safe-area-inset-top)) {
 .shell { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
}
.light-content { position: relative; }
.mast { align-items: center; gap: 54px; display: flex; height: 116px; justify-content: flex-start; padding: 42px 0 18px; }
.home-space { display: flex; flex-direction: column; min-height: calc(100svh - var(--mast-h) - env(safe-area-inset-top, 0px) - var(--edge-b) - var(--peek)); padding: 100px 0 48px; overflow-x: clip; }
.identity { align-items: center; gap: 100px; display: flex; }
.identity .lines { font-size: clamp(52px, 5.5vw, 72px); font-weight: 400; letter-spacing: -0.055em; line-height: 1.02; margin: 0; }
.identity .line { display: block; }
.identity .line + .line { text-wrap: balance; }
.brand { display: inline-flex; align-items: center; min-height: 44px; margin-block: -9.5px; font: 700 25px / 1 Helvetica, Arial, sans-serif; letter-spacing: -1.5px; }
.star { font-weight: 400; margin-left: 3px; display: inline-block; transition: transform .4s ease; }
.mast .brand { will-change: transform; }
.mast .brand-word { color: inherit; align-items: center; display: inline-flex; min-height: 44px; }
.mast .star { color: inherit; position: relative; }
.portrait { align-self: center; flex-shrink: 0; margin: 0; position: relative; }
.portrait-link { display: block; width: 106px; height: 106px; }
.portrait img { border-radius: 50%; display: block; height: 106px; width: 106px; mix-blend-mode: multiply; box-shadow: 0 7px 14px rgba(48, 46, 40, .28), 0 1px 3px rgba(48, 46, 40, .25); }
@media (max-width: 650px) {
 :root { --mast-h: 72px; --peek: 184px; }
 .shell { width: calc(100% - 88px); }
 .mast { align-items: flex-start; gap: 16px; flex-direction: column; height: var(--mast-h); justify-content: flex-start; padding: 24px 0 0; }
 .home-space { justify-content: flex-start; padding: 22px 0 24px; }
 .identity { justify-content: space-between; flex-wrap: wrap; gap: 14px 18px; }
 .identity .lines { font-size: clamp(35px, 9.8vw, 52px); flex: 1 1 100%; }
 .portrait { margin-left: auto; }
 .portrait-link, .portrait img { height: 86px; width: 86px; }
}
@media (max-width: 350px) {
 .shell { width: calc(100% - 76px); }
 .identity .lines { font-size: 31px; }
 .portrait-link, .portrait img { height: 78px; width: 78px; }
}
@media (min-width: 651px) {
 :root { --square: calc(clamp(52px, 5.5vw, 72px) * 7.6 + 206px); }
 .mast { justify-content: space-between; width: var(--square); max-width: 100%; margin-inline: auto; height: var(--mast-h); }
 .home-space { align-items: center; }
 .identity { justify-content: space-between; min-width: min(var(--square), 100%); }
 .identity .lines { flex: 1 1 auto; max-width: calc(clamp(52px, 5.5vw, 72px) * 7.6); }
}

/* The gate. */
.intro-gate { display: none; position: fixed; inset: 0; z-index: 1110; border: 0; background: transparent; color: #eee8dc; align-content: center; justify-items: center; gap: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.intro-pending .intro-gate { display: grid; }
html.intro-opening .intro-gate { display: grid; pointer-events: none; }
html.intro-pending .intro-gate:hover ~ .page .mast .brand .star { animation: gate-star .65s ease-in-out; }
.intro-slot { display: block; width: clamp(90px, 18vw, 142px); height: clamp(90px, 18vw, 142px); visibility: hidden; }
.intro-wordmark { font: 700 25px/1 Helvetica, Arial, sans-serif; letter-spacing: -1.5px; font-style: normal; white-space: nowrap; visibility: hidden; }
.intro-wordmark span { display: inline-block; margin-left: 2px; font-size: .72em; vertical-align: top; }
.intro-cue { margin-top: -4px; visibility: hidden; font: 9px/1.4 Helvetica, Arial, sans-serif; letter-spacing: .035em; color: #777064; }
html.intro-placed .intro-cue { visibility: visible; }
.intro-gate:focus-visible { outline: 1px solid #777064; outline-offset: -20px; }
@keyframes gate-star { 50% { transform: rotate(36deg) scale(1.16); } }
.intro-world { display: none; position: absolute; inset: 0; z-index: 0; background: #101110; pointer-events: none; }
html.intro-pending .intro-world, html.intro-opening .intro-world { display: block; }
html.intro-placed .mast .brand, html.intro-placed .portrait img { visibility: visible; }
html.intro-placed .mast { position: relative; z-index: 2; }
html.intro-pending .mast .brand { color: #eee8dc; }
html.intro-pending .mast .brand .star { font-weight: 700; font-size: .72em; margin-left: 2px; translate: 0 -.19444em; }
html.intro-pending .mast .brand, html.intro-opening .mast .brand { transform-origin: 0 50%; }
html.intro-pending .portrait img { clip-path: circle(47%); filter: sepia(.18); }
html.intro-pending .portrait img, html.intro-opening .portrait img { box-shadow: 0 10px 26px rgba(16, 17, 16, .42); }

/* After the gate: the window opens to the full screen, still charcoal. */
html.holding-open .page, html.holding-open .page-scroll { inset: 0; }
html.holding-open .page-scroll { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
html.gate .holding, html.gate .site-foot { visibility: hidden; }

/* The holding page. */
.holding, .site-foot { width: min(100% - 40px, 880px); margin-inline: auto; }
.holding { padding-top: clamp(56px, 12vh, 120px); }
.holding { position: relative; }
/* The note is a hand-drawn stroke drawing, a separate scribble above the toy with clear air below it.
   The sentences themselves are in visually hidden text beside it. Stroke widths are in drawing units
   and are set so the line stays about 2 px on screen at the smaller sizes. */
.note { position: relative; z-index: 1; margin: 28px 0 96px 2px; transform: rotate(-1.5deg); transform-origin: 0 100%; pointer-events: none; }
.note-art { display: block; height: auto; color: #eee8dc; opacity: .85; overflow: visible; }
.note-wide { width: min(100%, 630px); stroke-width: 3.1; }
.note-narrow { display: none; width: clamp(257px, calc(257px + (100vw - 390px) * .3), 350px); stroke-width: 3.2; }
@media (max-width: 700px) {
 .note-wide { display: none; }
 .note-narrow { display: block; }
 .note { margin: 14px 0 clamp(62px, calc(62px + (100vw - 390px) * .07), 84px) 2px; }
}
.site-foot { margin-top: 72px; padding-bottom: 32px; color: #9a9285; font: 11px / 1.6 Helvetica, Arial, sans-serif; }

/* The toy. */
#small-detour { --sd-ink: #ece2cf; --sd-dim: #b1a797; color: var(--sd-ink); font-family: Helvetica, Arial, sans-serif; color-scheme: dark; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#small-detour, #small-detour * { text-transform: lowercase; }
#small-detour .sd-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 50px 0 25px; }
#small-detour h2 { font: 400 clamp(35px, 6vw, 57px) / 1.1 Helvetica, Arial, sans-serif; letter-spacing: -2px; margin: 0; }
#small-detour p { font-size: 11px; line-height: 1.7; color: var(--sd-dim); margin: 0; }
#small-detour .sd-space { position: relative; height: 300px; margin: 30px 0 22px; isolation: isolate; }
#small-detour canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#small-detour .sd-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(5, 1fr); }
#small-detour button { font: 12px / 1.5 Helvetica, Arial, sans-serif; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; touch-action: manipulation; }
#small-detour .sd-cell { position: relative; min-width: 0; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
/* A drag that starts on a note moves the note; a drag on an empty square still scrolls the page. */
#small-detour .sd-cell[aria-pressed=true] { touch-action: none; }
/* Until detour.js runs there is nothing to play: hide the field and the controls, show one line. */
#small-detour:not(.sd-ready) .sd-space, #small-detour:not(.sd-ready) .sd-controls, #small-detour:not(.sd-ready) .sd-foot { display: none; }
#small-detour .sd-nojs { margin: 30px 0 0; font-size: 12px; }
#small-detour.sd-ready .sd-nojs { display: none; }
#small-detour .sd-cell::before { content: ''; position: absolute; top: 50%; left: 50%; width: 3px; height: 3px; transform: translate(-50%, -50%); background: #585044; border-radius: 50%; }
#small-detour .sd-cell::after { content: ''; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); border: 1px solid transparent; border-radius: 50%; }
#small-detour .sd-cell[aria-pressed=true]::before { width: 16px; height: 16px; background: var(--sd-ink); box-shadow: 0 0 22px #ead3ac25; border-radius: 45% 55% 55% 45%; }
#small-detour .sd-cell[data-row='0'][aria-pressed=true]::before { border-radius: 0; transform: translate(-50%, -50%) rotate(45deg); width: 11px; height: 11px; }
#small-detour .sd-cell[data-row='1'][aria-pressed=true]::before { width: 20px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%) rotate(-25deg); }
#small-detour .sd-cell[data-row='3'][aria-pressed=true]::before { width: 10px; height: 21px; border-radius: 50%; transform: translate(-50%, -50%) rotate(30deg); }
#small-detour .sd-cell[data-row='4'][aria-pressed=true]::before { width: 20px; height: 20px; background: #101110; border: 2px solid var(--sd-ink); }
#small-detour .sd-cell:hover::after { width: 31px; height: 31px; border-color: #9f927e; }
#small-detour .sd-cell.sd-sounding::after { width: 42px; height: 42px; border-color: #f0dcc1; box-shadow: 0 0 24px #cfb38b38; }
#small-detour .sd-cell:focus-visible { outline: 0; }
#small-detour .sd-cell:focus-visible::after { width: 36px; height: 36px; border-color: #e9ddc8; }
#small-detour .sd-controls { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
#small-detour .sd-play { border-radius: 50%; padding: 18px 22px; min-width: 158px; min-height: 44px; background: #e9ddc8; color: #171511; text-align: center; }
#small-detour .sd-clear { min-height: 44px; padding: 0 4px; }
#small-detour .sd-play:focus-visible, #small-detour .sd-clear:focus-visible { outline: 2px solid #927450; outline-offset: 5px; }
#small-detour .sd-status { font-size: 11px; line-height: 1.5; color: var(--sd-dim); margin-left: auto; }
#small-detour .sd-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 35px; font-size: 11px; line-height: 1.6; color: var(--sd-dim); }
@media (max-width: 560px) {
 #small-detour .sd-heading { flex-direction: column; align-items: start; gap: 18px; margin-top: 35px; }
 #small-detour .sd-space { height: 280px; }
 #small-detour .sd-play { padding: 15px 20px; }
 #small-detour .sd-status { margin-left: 0; flex-basis: 100%; }
 #small-detour .sd-foot { flex-direction: column; gap: 8px; }
}
@media (hover: none) { #small-detour .sd-cell:hover::after { border-color: transparent; } }

/* Not-found page. */
html.lost, html.lost body { height: auto; overflow: auto; }
.lost-page { width: min(100% - 40px, 880px); margin: 0 auto; padding: clamp(56px, 12vh, 120px) 0 48px; color: #bfb5a4; font: 400 16px / 1.5 Helvetica, Arial, sans-serif; }
.lost-page p { margin: 0; }
.lost-page a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.lost-page a:hover { color: #ece2cf; }
.lost-page a:focus-visible { outline: 2px solid #927450; outline-offset: 5px; }

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