/* Homepage field and curated suggestions; other working surfaces are unchanged. */
#asking { min-height:var(--home-visible-height,100svh); padding-inline:24px; }
#question-form { position:relative; width:min(100%,560px); }
.question-row { position:relative; --question-start:16px; --question-end:56px; min-height:52px; border:1px solid color-mix(in srgb,var(--ink) 20%,transparent); border-radius:12px; background:rgb(255 255 255 / .32); }
.question-row:focus-within { border-color:color-mix(in srgb,var(--ink) 34%,transparent); }
#question { box-sizing:border-box; display:block; width:100%; resize:none; overflow:hidden; overflow-wrap:anywhere; border:0; outline:none; color:var(--ink); font:inherit; font-size:16px; min-height:50px; max-height:clamp(98px,32svh,146px); padding:13px var(--question-end) 13px var(--question-start); border-radius:11px; text-align:left; line-height:24px; background:transparent; }
/* Offered words grow the field to their full height. Accepted/typed text keeps
   the native scrolling limit instead of clipping the separate prompt layer. */
#question:placeholder-shown { max-height:none; text-align-last:left; }
#question:focus { caret-color:var(--ink); }
#question::placeholder { color:transparent; }
#question-placeholder { position:absolute; inset:13px var(--question-end) auto var(--question-start); overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; color:color-mix(in srgb,var(--ink) 55%,transparent); font-size:16px; line-height:24px; text-align:left; pointer-events:none; user-select:none; opacity:1; transition:opacity .9s ease-in-out; }
#question.home-prompt-fading~#question-placeholder { opacity:0; }
#ask-arrow { position:absolute; display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; background:transparent; color:inherit; opacity:.4; cursor:pointer; touch-action:manipulation; left:auto; right:3px; top:50%; transform:translateY(-50%); transition:opacity .2s ease; }
#ask-arrow:is(:hover,:focus-visible) { opacity:1; }
#ask-arrow:focus-visible { outline:1px solid currentColor; outline-offset:-6px; }
#ask-arrow:disabled { pointer-events:none; }
/* Share the prompt-height easing; a second line adds 4px, with no further growth. */
#ask-arrow svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.2; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; transform:scale(1); transform-origin:center; transition:transform 240ms cubic-bezier(.22,1,.36,1); }
#question.is-wrapped~#ask-arrow svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.2; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; transform:scale(1.25); }
#typed-suggestions { position:absolute; z-index:15; top:calc(100% + 7px); left:0; right:0; max-height:256px; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; border:1px solid color-mix(in srgb,var(--ink) 20%,transparent); border-radius:12px; background:rgb(255 255 255 / .32); text-align:left; }
#typed-suggestions ul { padding:0; margin:0; list-style:none; }
#typed-suggestions li+li { border-top:1px solid color-mix(in srgb,var(--ink) 12%,transparent); }
.home-suggestion { display:flex; align-items:center; gap:12px; width:100%; min-height:48px; padding:11px 16px; border:0; border-radius:0; background:none; color:inherit; font:inherit; font-size:14px; line-height:21px; text-align:left; text-decoration:none; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.home-suggestion:focus-visible { outline:1px solid currentColor; outline-offset:-4px; background:color-mix(in srgb,var(--ink) 5%,transparent); }
.home-suggestion-copy { flex:1; min-width:0; }
.home-suggestions-more { justify-content:center; font-size:12px; color:color-mix(in srgb,var(--ink) 65%,transparent); }
.home-suggestion-copy>span { display:block; overflow-wrap:anywhere; }
.home-suggestion-copy small { display:block; font:inherit; font-size:12px; line-height:18px; opacity:.7; overflow-wrap:anywhere; }
.home-suggestion>img,.home-suggestion-swatch { flex:0 0 20px; width:20px; height:20px; object-fit:contain; }
.home-suggestion-swatch { border:1px solid color-mix(in srgb,var(--ink) 15%,transparent); }
.home-suggestion>svg { flex:0 0 20px; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
@media(hover:hover) { .home-suggestion:hover { background:color-mix(in srgb,var(--ink) 5%,transparent); } }
:root[data-theme="dark"] :is(.question-row,#typed-suggestions) { background:rgb(255 255 255 / .07); }
@media(prefers-reduced-motion:reduce) { #question-placeholder,#ask-arrow,#ask-arrow svg { transition:none; } }
/* In short resting views, scroll the full offer above the fixed footer. The
   existing focused typing surface below still uses the whole visible viewport. */
@media(max-height:420px) { #asking { min-height:0; height:calc(var(--home-visible-height,100svh) - max(12px,env(safe-area-inset-bottom)) - 52px); overflow-y:auto; overscroll-behavior:contain; align-items:start; padding-bottom:16px; } #question-form { transform:none; } #question-form h1 { margin-bottom:16px; } #typed-suggestions { position:relative; top:auto; margin-top:7px; } }

/* A single typing surface follows the visible viewport, including Safari's focus pan. */
body:is(.home-typing,.home-keyboard-closing) { overflow:hidden; }
body:is(.home-typing,.home-keyboard-closing) #asking {
  position:fixed; top:var(--home-viewport-top,0px); left:0; width:100%;
  height:var(--home-visible-height,100svh); min-height:0; overflow-y:auto; overscroll-behavior:contain;
  align-items:start; padding-top:calc(env(safe-area-inset-top) + clamp(12px,calc(var(--home-visible-height,100svh) - 228px),32px)); padding-bottom:12px;
}
body:is(.home-typing,.home-keyboard-closing) #question-form { transform:none; }
/* Keep three complete padded lines before using native textarea scrolling. */
body:is(.home-typing,.home-keyboard-closing) #question { max-height:clamp(98px,calc(var(--home-visible-height,100svh) - 160px),146px); }
body:is(.home-typing,.home-keyboard-closing) #question:placeholder-shown { max-height:none; }
/* In-flow results give the existing typing scroller real space beyond the field. */
body:is(.home-typing,.home-keyboard-closing) #typed-suggestions { position:relative; top:auto; margin-top:7px; }
body:is(.home-typing,.home-keyboard-closing) :is(#site-links,#home-tools,:is(#home-privacy,#home-about),#appearance-controls) { visibility:hidden; pointer-events:none; }

/* Footer labels share a baseline, size and ink; the appearance circle is unchanged. */
#home-tools { left:max(24px,env(safe-area-inset-left)); }
:is(#home-privacy,#home-about) { right:max(24px,env(safe-area-inset-right)); font-size:11px; color:var(--ink); --link-rest-opacity:.55; }
:is(#home-privacy,#home-about):is(:hover,:focus-visible) { color:var(--ink); }

/* All three footer labels share the same text baseline and resting ink. */
#site-links .site-link.bottom-middle {
  display:flex; align-items:flex-end; min-height:44px; padding-bottom:2px;
  font-size:11px; line-height:1.2; color:var(--ink); --link-rest-opacity:.55;
}
#site-links .site-link.bottom-middle:is(:hover,:focus-visible) { color:var(--ink); }
@media(max-width:374px) { #site-links .site-link.bottom-middle { font-size:9px; } }

#home-about {left:max(24px,env(safe-area-inset-left));right:auto;justify-content:flex-start;}
