/* The scrolling homepage and its feed share the original search field. */
#homepage-explore[hidden],#homepage-layout-preview[hidden]{display:none!important}
:root[data-home-exploring] :is(#home-pill-preview,#home-layout-preview){visibility:hidden;pointer-events:none}
/* Only the field floats. Its slot preserves the title and the homepage layout. */
#homepage-search-field{position:relative}
/* The backing sits on the body so it inherits the live page paint, even
   while the search stays in its original form and the feed scrolls behind it. */
:root[data-home-search="docked"] {
 --home-search-top:calc(var(--home-scroll-viewport-top,0px) + max(8px,env(safe-area-inset-top)));
}
:root[data-home-search="docked"] #homepage-search-slot{height:var(--home-search-slot-height)}
:root[data-home-search="docked"] #homepage-search-field,
:root[data-home-search="docked"] body::before,
:root[data-home-search="docked"] body::after {
 position:fixed;top:var(--home-search-top);
 inset-inline:0;margin-inline:auto;width:min(calc(100% - 48px),560px);
}
:root[data-home-search="docked"] #homepage-search-field{z-index:20}
:root[data-home-search="docked"] body::before,
:root[data-home-search="docked"] body::after {
 z-index:19;pointer-events:none;border-radius:12px;background-color:var(--paper);
}
:root[data-home-search="docked"][data-atmosphere-renderer="tone"] body::before,
:root[data-home-search="docked"][data-atmosphere-renderer="tone"] body::after { background-color:inherit }
:root[data-home-search="docked"] body::before { content:"";height:var(--home-search-row-height) }
:root[data-home-search="docked"]:has(#homepage-search-field:focus-within #typed-suggestions:not([hidden])) body::after {
 content:"";top:calc(var(--home-search-top) + var(--home-search-list-offset));height:var(--home-search-list-height);
}
:root[data-home-search="docked"] #homepage-search-field:not(:focus-within) #typed-suggestions{display:none}
:root[data-home-search="docked"] #home-doors{visibility:hidden}
/* Mobile keyboard focus keeps the same docked field in place. */
body.home-docked-typing{overflow:hidden}
body.home-docked-typing #name{visibility:hidden}
:root[data-home-search="docked"] body.home-docked-typing #typed-suggestions{
 position:absolute;
 max-height:clamp(0px,calc(var(--home-docked-visible-height,100svh) - max(8px,env(safe-area-inset-top)) - var(--home-search-row-height,52px) - 19px),256px);
}

@media(prefers-reduced-motion:no-preference){
 :root[data-home-search="docked"] #homepage-search-field :is(.question-row > *,#typed-suggestions ul){animation:home-search-reveal 160ms ease-out}
 @keyframes home-search-reveal{from{opacity:0}}
}
:root[data-homepage="scroll"] body:not(.home-typing):not(.home-keyboard-closing) #asking{overflow:visible;overscroll-behavior:auto;min-height:max(100svh,var(--home-visible-height,100svh));height:auto;margin-top:0}
:root[data-homepage="scroll"] body:not(.home-typing):not(.home-keyboard-closing) #asking[data-home-flow]{padding-top:max(160px,var(--home-layout-flow-top,160px));padding-bottom:100px}
/* The feed whispers below the existing hero; it does not become the hero. */
:root[data-homepage="scroll"] body:not(.home-typing):not(.home-keyboard-closing) #asking{position:relative}
#homepage-feed-hint{position:fixed;z-index:10;bottom:max(8px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:20px;align-items:center;font:inherit;font-size:12px;line-height:1.2;white-space:nowrap;color:var(--ink)}
#homepage-feed-hint[hidden],body:is(.home-typing,.home-keyboard-closing) #homepage-feed-hint{display:none}
#homepage-feed-hint a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 4px;color:inherit;text-decoration:none;--link-rest-opacity:.65}
:root[data-atmosphere][data-atmosphere-version="2"] #homepage-feed-hint a{--link-rest-opacity:var(--atmosphere-quiet-opacity,.96)}
#homepage-feed-hint a:focus-visible{text-decoration:underline;text-underline-offset:4px}
/* Safari's keyboard pan is separate from the homepage's scroll position. */
:root[data-homepage="scroll"]:is([data-home-restoring],:has(body.home-feed-keyboard)){overflow-anchor:none}
/* Preserve the document's scroll position behind the fixed mobile typing view. */
body:is(.home-typing,.home-keyboard-closing) #homepage-explore {
 margin-top:var(--home-hero-height,100svh);
}
body.home-feed-keyboard :is(#homepage-explore,#home-scroll-footer,#homepage-feed-hint,#home-collection-trigger){visibility:hidden;pointer-events:none}
#homepage-explore{
 --feed-tabs-gap:clamp(36px,6vw,58px);--feed-text-gap:32px;
 width:min(100% - 48px,680px);margin:0 auto;
 padding:24px 0 calc(var(--feed-tabs-gap) + var(--feed-text-gap));
 scroll-margin-top:110px;color:var(--ink);
}
.homepage-feed-tabs{display:flex;justify-content:center;gap:22px;margin-bottom:var(--feed-tabs-gap);opacity:1;visibility:visible;transition:opacity 160ms ease,visibility 0s}
/* One handoff on mouse and touch: the full-sized row becomes available at the
   same bottom position as the small footer. Hidden tabs are inert in JS too. */
:root[data-homepage="scroll"]:not([data-home-feed-tabs-visible]) .homepage-feed-tabs{opacity:0;visibility:hidden;pointer-events:none;transition:opacity 160ms ease,visibility 0s 160ms}
@media(prefers-reduced-motion:reduce){.homepage-feed-tabs{transition:none!important}}
@media(max-width:600px){
 :root[data-homepage="scroll"] body:not(.home-typing):not(.home-keyboard-closing) #asking{min-height:max(100svh,var(--home-scroll-hero-height,100svh))}
}
.homepage-feed-tabs button{
 font:inherit;font-size:13px;text-transform:uppercase;color:inherit;background:transparent;border:0;
 min-height:44px;padding:0 5px;cursor:pointer;opacity:.62;
}
.homepage-feed-tabs button:is([aria-selected="true"],:hover,:focus-visible){opacity:1}
#homepage-explore [role="tabpanel"][hidden]{display:none}

#homepage-discover-responses,#homepage-panel-updates{display:grid;gap:clamp(152px,20vw,264px)}
/* On a tall phone, let the entry in the middle have room to itself. */
@media(max-width:600px) and (orientation:portrait){
 #homepage-discover-responses,#homepage-panel-updates{row-gap:clamp(216px,38svh,364px)}
}
.homepage-feed-response,.homepage-feed-update{min-width:0}
/* Give the opening text room below the tabs; media keeps its existing gap. */
.homepage-feed-response:first-child:has(.homepage-feed-text,.homepage-feed-pair-copy):not(:has(.homepage-feed-image,.homepage-feed-video)){margin-top:var(--feed-text-gap)}
#homepage-panel-updates{padding-top:var(--feed-text-gap)}
.homepage-feed-response:has(.homepage-feed-text),.homepage-feed-update{width:min(100%,600px);margin-inline:auto}
.homepage-feed-text{
 width:var(--feed-copy-width,100%);margin:0 auto;font-size:14px;font-weight:var(--feed-copy-weight,400);line-height:1.7;
 text-align:left;text-transform:var(--feed-copy-case,none);white-space:pre-wrap;overflow-wrap:anywhere;
}
:is(.homepage-feed-text,.homepage-feed-answer)[data-feed-width="medium"]{--feed-copy-width:84%}
:is(.homepage-feed-text,.homepage-feed-answer)[data-feed-width="small"]{--feed-copy-width:68%}
:is(.homepage-feed-text,.homepage-feed-answer)[data-feed-width="extra-small"]{--feed-copy-width:52%}
.homepage-feed-text[data-feed-justify]:not([data-feed-single-line]){
 text-align:justify;text-align-last:justify;
}
@media(max-width:600px){.homepage-feed-text{font-size:12px}}
.homepage-feed-text[data-feed-single-line]{
 width:fit-content;max-width:100%;margin-inline:auto;text-align:center;
 font-size:var(--feed-single-size,clamp(16px,2.2vw,20px));
 font-weight:700;line-height:1.16;white-space:pre;text-transform:uppercase;
}
.homepage-feed-answer{position:relative;width:var(--feed-copy-width,100%);margin-inline:auto}
.homepage-feed-answer > .homepage-feed-text{width:100%;cursor:auto}
.homepage-feed-query{
 display:block;margin:0;
 font-size:clamp(11px,1vw,13px);font-weight:400;line-height:1.4;
 text-align:left;overflow-wrap:anywhere;opacity:.72;pointer-events:none;
}
/* Keep the existing question footprint clickable even while its text is hidden. */
.homepage-feed-query[hidden]{display:block!important;opacity:0;visibility:hidden}
.homepage-feed-query-toggle{
 position:absolute;inset-inline:0;bottom:100%;width:100%;padding:0 0 14px;
 border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;
 -webkit-tap-highlight-color:transparent;
}
.homepage-feed-answer:has(> .homepage-feed-query-toggle:focus-visible){outline:1px solid currentColor;outline-offset:5px}
.homepage-feed-text a,.homepage-feed-update > a{text-decoration:underline;text-underline-offset:3px}
.homepage-feed-update time,.homepage-feed-update > a{font-size:12px}
.homepage-feed-update h2{font-size:16px;font-weight:400;margin:10px 0 16px}
.homepage-feed-update > a{display:inline-flex;align-items:center;min-height:44px;margin-top:8px}
.homepage-feed-about{margin:16px 0 0;font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
/* A portrait's intrinsic size must never extend past the reserved grid row. */
.homepage-feed-image{margin:0;width:100%;aspect-ratio:4/3}
:is(.homepage-feed-image,.homepage-feed-enlarge){
 display:grid;grid-template:minmax(0,1fr) / minmax(0,1fr);place-items:center;
}
.homepage-feed-image img{display:block;width:100%;height:100%;min-height:0;max-height:70svh;object-fit:contain;-webkit-touch-callout:none}
.homepage-feed-enlarge{
 width:100%;height:100%;min-width:0;min-height:0;
 padding:0;border:0;background:none;color:inherit;
}
@media(max-width:600px){
 :is(.homepage-feed-response > .homepage-feed-image,[data-feed-pair-layout="diptych"] .homepage-feed-image){
  display:block;aspect-ratio:auto;
 }
 :is(.homepage-feed-response > .homepage-feed-image,[data-feed-pair-layout="diptych"] .homepage-feed-image) .homepage-feed-enlarge{
  display:block;height:auto;
 }
 :is(.homepage-feed-response > .homepage-feed-image,[data-feed-pair-layout="diptych"] .homepage-feed-image) img{
  height:auto;max-height:none;aspect-ratio:auto 4/3;
 }
 .homepage-feed-pair[data-feed-pair-layout="diptych"]{gap:14px}
}
.homepage-feed-enlarge:enabled{cursor:zoom-in}
.homepage-feed-enlarge:focus-visible,#homepage-feed-photo-viewer button:focus-visible{outline:1px solid currentColor;outline-offset:4px}
html:has(#homepage-feed-photo-viewer[open]){overflow:hidden;scrollbar-gutter:stable;overscroll-behavior:none}
#homepage-feed-photo-viewer{
 --photo-inset:max(54px,env(safe-area-inset-top),env(safe-area-inset-bottom));
 position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;
 padding:var(--photo-inset) max(18px,env(safe-area-inset-left),env(safe-area-inset-right));
 border:0;background:var(--paper);color:var(--ink);overflow:hidden;
}
#homepage-feed-photo-viewer[open]{display:grid;place-items:center}
#homepage-feed-photo-viewer::backdrop{background:transparent}
:root[data-atmosphere-renderer="tone"] #homepage-feed-photo-viewer{background-color:inherit}
#homepage-feed-photo-viewer img{
 display:block;width:min(100%,calc(var(--photo-ratio) * (100dvh - 2 * var(--photo-inset))));height:auto;
 object-fit:contain;-webkit-touch-callout:none;
}
#homepage-feed-photo-viewer button{
 position:absolute;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));
 width:44px;height:44px;padding:0;border:0;background:none;color:inherit;font:inherit;font-size:24px;cursor:pointer;
}
.homepage-feed-image-error{font-size:13px;line-height:1.7;margin:0}
.homepage-feed-video{display:block;width:100%;aspect-ratio:16/9;max-height:70svh;object-fit:contain}
.homepage-feed-project-title{white-space:nowrap;overflow-wrap:normal}
.homepage-feed-link{
 display:flex;align-items:center;justify-content:center;width:fit-content;max-width:100%;
 min-height:44px;margin:2px auto 0;padding-inline:6px;color:inherit;opacity:.5;
 font-size:clamp(13px,1.4vw,15px);line-height:1.4;text-align:center;text-decoration:none;overflow-wrap:anywhere;
}
.homepage-feed-link:is(:hover,:focus-visible,:active){opacity:1}
.homepage-feed-pair{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:clamp(12px,3vw,28px);
}
.homepage-feed-pair[data-feed-pair-layout="overlay"]{display:block}
.homepage-feed-pair-piece{min-width:0}
.homepage-feed-pair-overlay{
 position:relative;isolation:isolate;display:grid;place-items:center;
 min-height:clamp(260px,56vw,440px);padding:clamp(24px,6vw,56px);background:#222;
}
.homepage-feed-pair-overlay > :first-child{position:absolute;inset:0}
.homepage-feed-pair-overlay .homepage-feed-image{height:100%;aspect-ratio:auto}
.homepage-feed-pair-overlay .homepage-feed-image img{max-height:none;object-fit:cover}
.homepage-feed-pair-overlay > :last-child{position:relative;z-index:1;color:white;pointer-events:none}
.homepage-feed-pair-overlay a{pointer-events:auto}
.homepage-feed-pair-copy{
 max-width:54ch;margin:0 auto;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;
 font-size:clamp(14px,1.5vw,16px);line-height:1.65;
}
.homepage-feed-pair-copy[data-feed-pair-short]{
 max-width:28ch;text-align:center;text-wrap:balance;
 font-size:clamp(16px,2.5vw,24px);line-height:1.45;
}
/* Let the photo frame set the measure for the lettering. */
#homepage-feed-save{
 position:fixed;z-index:12;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));
 min-width:44px;min-height:44px;padding:12px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:12px;opacity:.55;cursor:pointer;
 -webkit-tap-highlight-color:transparent;
}
#homepage-feed-save:hover,#homepage-feed-save:focus-visible{opacity:1}
#homepage-feed-save[hidden]{display:none}
#homepage-feed-photo-viewer .feed-photo-save{top:auto;bottom:max(12px,env(safe-area-inset-bottom));right:max(12px,env(safe-area-inset-right));width:auto;font-size:12px;opacity:.65}
.homepage-feed-pair-overlay .homepage-feed-pair-copy{
 text-transform:lowercase;
 max-width:44ch;text-align:left;font-size:clamp(16px,3.2vw,21px);line-height:1.48;
}
.homepage-feed-pair-overlay .homepage-feed-pair-copy[data-feed-pair-short]{
 max-width:22ch;font-size:clamp(24px,7vw,44px);line-height:1.1;
}
.homepage-feed-pair-overlay .homepage-feed-pair-copy[data-feed-justify]{
 text-align:justify;text-align-last:justify;text-wrap:wrap;
}
.homepage-feed-sentinel{height:1px}
#homepage-explore:not([data-feed-more]) .homepage-feed-sentinel{height:0}
@media(prefers-reduced-motion:no-preference){
 .homepage-feed-link{transition:opacity 150ms ease}
 .homepage-feed-query{transition:opacity 180ms ease-out,visibility 0s linear}
 .homepage-feed-query[hidden]{transition-delay:0s,180ms}
 .homepage-feed-response[data-feed-reveal="pending"]:not(:focus-within){opacity:0}
 .homepage-feed-response[data-feed-reveal="shown"]{
  animation:homepage-feed-reveal 320ms ease-out var(--feed-reveal-delay,0ms) backwards;
 }
 .homepage-feed-response[data-feed-reveal] img{
  opacity:0;transition:opacity 280ms ease-out;
 }
 .homepage-feed-response[data-feed-reveal] img[data-ready]{opacity:1}
 @keyframes homepage-feed-reveal{from{opacity:0}to{opacity:1}}
}
:root[data-home-search="docked"] :is(#home-tools,:is(#home-privacy,#home-about),#appearance-controls){visibility:hidden;pointer-events:none}

.homepage-feed-text[data-feed-single-line]{--response-font-weight:var(--response-font-bold,700)}

/* Two presentations of the same mounted Discover sequence. */
.homepage-discover-views{display:flex;justify-content:center;gap:16px;margin:-20px 0 32px}
.homepage-discover-views button{min-height:44px;padding:8px;font:inherit;font-size:12px;line-height:1.5;border:0;background:none;color:inherit;cursor:pointer;opacity:.55}
.homepage-discover-views button[aria-pressed=true]{opacity:1}
#homepage-explore[data-discover-view=slideshow] #homepage-panel-discover{position:relative}
#homepage-explore[data-discover-view=slideshow] #homepage-discover-responses{display:grid;gap:0;min-height:max(280px,calc(100svh - 44px));align-items:center;padding:28px 0 48px}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-response{margin-block:0;cursor:pointer}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-response[hidden]{display:none!important}
#homepage-explore[data-discover-view=slideshow] :is(.homepage-feed-image,.homepage-feed-enlarge){height:auto;max-height:55svh;aspect-ratio:auto}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-image img{width:100%;height:auto;max-height:55svh;object-fit:contain}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-pair-overlay{max-height:55svh}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-pair-overlay .homepage-feed-image{height:100%;max-height:none}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-pair-overlay .homepage-feed-image img{height:100%;max-height:none;object-fit:cover}
/* No visible slideshow arrows; native keyboard/SR navigation remains available. */
.homepage-slideshow-nav{display:contents}
.homepage-slideshow-nav button:focus-visible{font:inherit;font-size:12px}

/* One small downward notch, rather than a full-width backing strip. */
.homepage-discover-views{position:sticky;top:calc(var(--home-scroll-viewport-top,0px) + max(0px,env(safe-area-inset-top)));z-index:30;isolation:isolate;width:max-content;max-width:100%;margin-inline:auto;padding-inline:12px;background:none}
.homepage-discover-views::before{content:"";position:absolute;inset:0 -12px;z-index:-1;pointer-events:none;background:var(--workspace-background,var(--site-surface,var(--paper)));--discover-notch-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 44' preserveAspectRatio='none'%3E%3Cpath d='M0 0H240Q228 0 228 12V32Q228 44 216 44H24Q12 44 12 32V12Q12 0 0 0Z'/%3E%3C/svg%3E");-webkit-mask:var(--discover-notch-mask) center/100% 100% no-repeat;mask:var(--discover-notch-mask) center/100% 100% no-repeat}
:root[data-discover-pinned][data-home-search=docked]{--home-search-top:calc(var(--home-scroll-viewport-top,0px) + max(0px,env(safe-area-inset-top)) + 52px)}

/* Slideshow is the native response canvas beneath its44px view header. */
#homepage-explore[data-discover-view=slideshow]{width:100%;padding-bottom:0}
#homepage-explore[data-discover-view=slideshow] .homepage-discover-views{margin-top:0;margin-bottom:0}
#homepage-explore[data-discover-view=slideshow] #homepage-discover-responses{display:grid;min-height:calc(100dvh - 44px);padding:0;gap:0}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-response{width:100%;max-width:none;margin:0}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-response:has(>.homepage-slideshow-work)>:not(.homepage-slideshow-work){display:none!important}
.homepage-slideshow-work{display:none}
#homepage-explore[data-discover-view=slideshow] .homepage-slideshow-work{display:grid;place-items:center;min-height:calc(100dvh - 44px);padding:24px 24px max(72px,calc(env(safe-area-inset-bottom) + 72px));box-sizing:border-box;--image-footer-clearance:72px}
#homepage-explore[data-discover-view=slideshow] .homepage-slideshow-work:has(>img,>.pair-composition){height:calc(100dvh - 44px);padding:0}
#homepage-explore[data-discover-view=slideshow] .homepage-slideshow-work>img{display:block;width:100%;height:auto;max-height:min(80dvh,max(1px,calc(100dvh - 188px)));object-fit:contain}
.homepage-slideshow-work .pair-card img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
:root[data-discover-view=slideshow] #homepage-feed-save{position:absolute;top:calc(var(--slideshow-slide-bottom,56px) - 44px - max(12px,env(safe-area-inset-bottom)));bottom:auto;left:50%;right:auto;transform:translateX(-50%)}
#homepage-explore[data-discover-view=slideshow] .homepage-slideshow-work[data-text-pair]{display:flex;flex-direction:column;justify-content:center;gap:28px}
#homepage-explore[data-discover-view=slideshow] .homepage-slideshow-work[data-text-pair] .text-work{margin:0 auto;padding:0}
.homepage-slideshow-work .pair-word.slideshow-pair-long{font-size:clamp(14px,2vw,21px);line-height:1.5;white-space:pre-wrap;text-align:left;max-width:80%;text-shadow:none}
#homepage-explore[data-discover-view=slideshow] .homepage-feed-response:has(>.homepage-slideshow-work){display:block}

.homepage-slideshow-link{width:min(100%,600px);min-width:0}.homepage-slideshow-link .homepage-feed-project-title{text-align:center}
.homepage-slideshow-work>video{display:block;width:min(100%,960px);max-height:max(1px,calc(100dvh - 164px));object-fit:contain}

.homepage-discover-views .homepage-slideshow-play{position:absolute;left:100%;right:auto;top:0;width:44px;height:44px;padding:12px;display:grid;place-items:center;opacity:.65}.homepage-slideshow-play svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.homepage-discover-views .homepage-slideshow-play[aria-pressed=true]{opacity:1}.homepage-discover-views .homepage-slideshow-play[hidden]{display:none}
