/* Home page, "Launchpad" layout (6 Nov, user picked option B; Wix-style): typed greeting, a one-line Spectra box with a
   soft glow, example questions as pills, a status strip, and four "Explore Prism" tiles with live previews. One screen at
   1440x900 and 1280x800. Depth and motion: layered shadows, lift on hover, press on click, staggered entrance; all motion
   off under prefers-reduced-motion. Scoped to the Browse home; the Spectra tab keeps its own landing (body.sv-on). */
:root{--hm-up:#12834b;--hm-down:#c33b49;--hm-glow-a:rgba(0,77,192,.10);--hm-glow-b:rgba(120,90,220,.08);--hm-tint:#eaf2fd;--hm-tint-ink:#004dc0;
  --hm-shadow:0 1px 2px rgba(16,24,40,.04),0 1px 3px rgba(16,24,40,.05);--hm-lift:0 2px 4px rgba(16,24,40,.04),0 14px 30px -10px rgba(16,24,40,.16);
  --hm-ease:cubic-bezier(.2,.8,.2,1);
  --hm-art-1:linear-gradient(135deg,#e6f0fd,#eaf6ef);--hm-art-2:linear-gradient(135deg,#eef2fb,#f3eefc);--hm-art-3:linear-gradient(135deg,#fdf3e7,#eef2fb);--hm-art-4:linear-gradient(135deg,#eaf6ef,#e6f0fd)}
html[data-theme=dark]{--hm-up:#66ce96;--hm-down:#ff8f99;--hm-glow-a:rgba(64,140,255,.16);--hm-glow-b:rgba(150,110,255,.12);--hm-tint:#16264a;--hm-tint-ink:#8fc0ff;
  --hm-shadow:0 1px 2px rgba(0,0,0,.4);--hm-lift:0 2px 6px rgba(0,0,0,.4),0 16px 32px -12px rgba(0,0,0,.6);
  --hm-art-1:linear-gradient(135deg,#132544,#12291f);--hm-art-2:linear-gradient(135deg,#161f3d,#21183b);--hm-art-3:linear-gradient(135deg,#2a2016,#161f3d);--hm-art-4:linear-gradient(135deg,#12291f,#132544)}
@media (prefers-color-scheme:dark){html:not([data-theme=light]){--hm-up:#66ce96;--hm-down:#ff8f99;--hm-glow-a:rgba(64,140,255,.16);--hm-glow-b:rgba(150,110,255,.12);--hm-tint:#16264a;--hm-tint-ink:#8fc0ff;
  --hm-shadow:0 1px 2px rgba(0,0,0,.4);--hm-lift:0 2px 6px rgba(0,0,0,.4),0 16px 32px -12px rgba(0,0,0,.6);
  --hm-art-1:linear-gradient(135deg,#132544,#12291f);--hm-art-2:linear-gradient(135deg,#161f3d,#21183b);--hm-art-3:linear-gradient(135deg,#2a2016,#161f3d);--hm-art-4:linear-gradient(135deg,#12291f,#132544)}}

body:not(.sv-on) #home-view{position:relative;min-height:0;height:calc(100vh - 66px);overflow:hidden;isolation:isolate}
body:not(.sv-on) #home-view::before{content:'';position:absolute;z-index:-1;left:50%;top:2%;width:min(980px,90%);height:360px;transform:translateX(-50%);
  background:radial-gradient(closest-side at 38% 50%,var(--hm-glow-a),transparent),radial-gradient(closest-side at 64% 46%,var(--hm-glow-b),transparent);filter:blur(30px);pointer-events:none}
#home-view .hero{width:min(1000px,calc(100% - 70px));padding:0;margin:auto;text-align:center}
body:not(.sv-on) #home-view .hero .spectra-mark{display:none}

/* greeting, typed */
#home-view .hm-greet{margin:0 0 22px;min-height:1.15em;font-size:clamp(30px,2.8vw,40px);font-weight:500;letter-spacing:-.025em;line-height:1.15;color:var(--text)}
#home-view .hm-caret{display:inline-block;width:2px;height:.9em;margin-left:3px;vertical-align:-.08em;background:var(--tech-blue,#004dc0);animation:hm-blink 1s steps(1) infinite}
#home-view .hm-typed .hm-caret{animation:hm-blink 1s steps(1) 2 forwards,hm-out .3s 2s forwards}
@keyframes hm-blink{50%{opacity:0}}@keyframes hm-out{to{opacity:0;width:0;margin:0}}
body.sv-on #home-view .hm-greet{display:none}

/* Spectra box: one line, glow on focus, send wakes up with text */
body:not(.sv-on) #home-view #composer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;width:min(720px,100%);margin:0 auto;
  padding:10px 10px 10px 18px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:var(--hm-lift);transition:border-color .2s,box-shadow .25s var(--hm-ease)}
body:not(.sv-on) #home-view #composer:focus-within{border-color:color-mix(in srgb,var(--tech-blue,#004dc0) 45%,var(--border));
  box-shadow:0 0 0 4px color-mix(in srgb,var(--tech-blue,#004dc0) 12%,transparent),var(--hm-lift)}
body:not(.sv-on) #home-view #prompt{height:26px;min-height:0;padding:0;font-size:15px;line-height:26px;overflow:hidden;white-space:nowrap}
body:not(.sv-on) #home-view #composer .composer-bottom{margin:0}
body:not(.sv-on) #home-view #composer .context-label{display:none}
body:not(.sv-on) #home-view #composer .send{width:34px;height:34px;border-radius:50%;opacity:.35;transition:opacity .2s,transform .15s var(--hm-ease)}
body:not(.sv-on) #home-view #composer.hm-ready .send{opacity:1}
body:not(.sv-on) #home-view #composer.hm-ready .send:hover{transform:translateY(-1px)}
body:not(.sv-on) #home-view #composer .send:active{transform:scale(.9)}

/* example questions */
#home-view .hm-asks{display:flex;flex-wrap:nowrap;justify-content:center;gap:8px;max-width:100%;margin:16px auto 0}
#home-view .hm-ask{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);
  color:var(--text);font:400 13px/1 Inter,Arial,sans-serif;box-shadow:var(--hm-shadow);cursor:pointer;transition:transform .2s var(--hm-ease),box-shadow .2s var(--hm-ease),border-color .2s,color .2s}
#home-view .hm-ask span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#home-view .hm-ask{min-width:0;flex:0 1 auto}
#home-view .hm-ask svg{width:14px;height:14px;flex:none;fill:none;stroke:var(--hm-tint-ink);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#home-view .hm-ask:hover,#home-view .hm-ask:focus-visible{transform:translateY(-1px);box-shadow:var(--hm-lift);border-color:color-mix(in srgb,var(--tech-blue,#004dc0) 25%,var(--border))}
#home-view .hm-ask:active{transform:scale(.97);transition-duration:.08s}
body.sv-on #home-view :is(.hm-asks,.hm-explore){display:none}

/* Explore PRISM: plain cards (user, 6 Nov: "i dont like how the explore prism placards visuals look"), the approved
   Spectra "Some examples" style: 1px border, small line icon, bold title, one grey line. No art, chips or colour. */
#home-view .hm-explore{margin-top:44px;text-align:left}
#home-view .hm-explore h2{margin:0 0 12px;font-size:14px;font-weight:550;color:var(--secondary);letter-spacing:0}
#home-view .hm-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#home-view .hm-tile{display:flex;flex-direction:column;gap:3px;min-width:0;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);
  color:var(--text);text-decoration:none;transition:transform .2s var(--hm-ease),box-shadow .2s var(--hm-ease),border-color .2s,background .2s}
#home-view .hm-tile:hover,#home-view .hm-tile:focus-visible{transform:translateY(-2px);box-shadow:var(--hm-lift);border-color:color-mix(in srgb,var(--text) 14%,var(--border))}
#home-view .hm-tile:active{transform:translateY(0) scale(.985);transition-duration:.08s}
#home-view .hm-tile:focus-visible{outline:2px solid var(--tech-blue,#004dc0);outline-offset:2px}
#home-view .hm-tile .hm-ico{display:block;width:18px;height:18px;margin-bottom:10px;color:var(--secondary)}
#home-view .hm-tile .hm-ico svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#home-view .hm-tile strong{font-size:14px;font-weight:550;line-height:20px}
#home-view .hm-tile-d{font-size:13px;line-height:19px;color:var(--secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* entrance */
body:not(.sv-on) #home-view:not([hidden]) :is(#composer,.hm-asks,.hm-explore){animation:hm-rise .5s var(--hm-ease) both}
body:not(.sv-on) #home-view #composer{animation-delay:.1s}
#home-view .hm-asks{animation-delay:.18s}#home-view .hm-explore{animation-delay:.28s}
@keyframes hm-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){#home-view *,#home-view *::before,#home-view *::after{animation:none!important;transition:none!important}#home-view .hm-spark polyline{stroke-dashoffset:0}}

@media (max-height:780px){#home-view .hm-greet{margin-bottom:16px}#home-view .hm-strip{margin-top:26px}#home-view .hm-art{height:74px}#home-view .hm-explore{padding:14px 16px 16px}#home-view .hm-explore h2{margin-bottom:10px}}
@media (max-width:1180px){#home-view .hm-setup-head small{display:none}}
@media (max-width:1000px){#home-view .hm-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}#home-view .hm-strip{flex-direction:column}#home-view .hm-setup,#home-view .hm-stats{flex-wrap:wrap;border-left:0;border-top:1px solid var(--border);padding:8px 4px 2px}#home-view .hm-step{flex:1 1 40%}#home-view .hm-asks{flex-wrap:wrap}
  body:not(.sv-on) #home-view{height:auto;overflow:visible;min-height:calc(100vh - 66px)}#home-view .hero{padding:32px 0}}
@media (max-width:640px){#home-view .hero{width:calc(100% - 32px);padding:24px 0}#home-view .hm-greet{font-size:28px}
  #home-view .hm-ask{height:auto;min-height:34px;padding:8px 12px;text-align:left;line-height:1.35}
  #home-view .hm-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#home-view .hm-art{height:64px}}
#home-view .hm-chip-name{min-width:0;overflow:hidden;text-overflow:ellipsis}#home-view .hm-chip b{flex:none}

/* Prism mark left of the greeting, cap-height tall, on the same line (user, 6 Nov). The PNG is mark + wordmark;
   the box shows the triangle only, as .spectra-mark does. */
#home-view .hm-greet{display:flex;align-items:center;justify-content:center;gap:.32em}
#home-view .hm-logo{display:block;flex:none;width:1.2em;height:1.06em;overflow:hidden;margin-top:-.06em}   /* user: bigger than cap height */
#home-view .hm-logo img{display:block;height:100%;width:auto;max-width:none}
body:not(.sv-on) #home-view:not([hidden]) .hm-logo{animation:hm-pop .5s var(--hm-ease) both}
@keyframes hm-pop{from{opacity:0;transform:scale(.8) rotate(-8deg)}to{opacity:1;transform:none}}

/* Spectra answers carry a small Prism mark beside them (user, 6 Nov). Lives here, not in spectra-answer.css, so the
   Spectra session's files stay theirs: a gutter on the left of each answer in the chat, the triangle only. */
#messages.spa-chat .message.agent:not(.hs-error){position:relative;padding-left:38px}
#messages.spa-chat .message.agent:not(.hs-error)::before{content:'';position:absolute;left:0;top:2px;width:26px;height:23px;
  background:url(assets/prism-logo-124.png?v=1) left center/auto 100% no-repeat}
#messages.spa-chat .message.agent.hs-pending::before{animation:hm-think 1.6s ease-in-out infinite}
@keyframes hm-think{50%{opacity:.45;transform:scale(.92)}}
@media (max-width:640px){#messages.spa-chat .message.agent:not(.hs-error){padding-left:30px}#messages.spa-chat .message.agent:not(.hs-error)::before{width:21px;height:18px}}
@media (prefers-reduced-motion:reduce){#messages.spa-chat .message.agent.hs-pending::before{animation:none}}

/* Explore PRISM, with life (user, 6 Nov: plain cards "look too dead"; earlier the gradient art and chips were disliked).
   Still no art, chips or numbers: a brand-blue icon tile, a soft spotlight that follows the cursor, a corner arrow that
   slides in, a lift on hover and a press on click, and a staggered entrance. home-markets.js feeds --mx/--my. */
#home-view .hm-tile{position:relative;overflow:hidden;isolation:isolate;padding:16px 18px 16px;gap:4px;box-shadow:var(--hm-shadow)}
#home-view .hm-tile::before{content:'';position:absolute;inset:0;z-index:-1;opacity:0;transition:opacity .3s;
  background:radial-gradient(240px circle at var(--mx,50%) var(--my,0%),color-mix(in srgb,var(--tech-blue,#004dc0) 9%,transparent),transparent 70%)}
#home-view .hm-tile:hover::before,#home-view .hm-tile:focus-visible::before{opacity:1}
#home-view .hm-tile:hover,#home-view .hm-tile:focus-visible{border-color:color-mix(in srgb,var(--text) 14%,var(--border))}   /* neutral edge (user, 6 Nov: no copper) */
#home-view .hm-tile .hm-ico{display:grid;place-items:center;width:34px;height:34px;margin-bottom:12px;border-radius:10px;background:var(--hm-tint);color:var(--hm-tint-ink);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--hm-tint-ink) 10%,transparent);transition:transform .3s var(--hm-ease)}
#home-view .hm-tile .hm-ico svg{width:18px;height:18px}
#home-view .hm-tile:hover .hm-ico{transform:scale(1.06) rotate(-5deg)}
#home-view .hm-tile::after{content:'↗';position:absolute;top:16px;right:16px;font-size:15px;line-height:1;color:var(--hm-tint-ink);opacity:0;transform:translate(-5px,5px);
  transition:opacity .2s,transform .3s var(--hm-ease)}
#home-view .hm-tile:hover::after,#home-view .hm-tile:focus-visible::after{opacity:1;transform:none}
body:not(.sv-on) #home-view:not([hidden]) .hm-tile{animation:hm-rise .5s var(--hm-ease) both}
#home-view .hm-tile:nth-child(1){animation-delay:.32s}#home-view .hm-tile:nth-child(2){animation-delay:.38s}#home-view .hm-tile:nth-child(3){animation-delay:.44s}#home-view .hm-tile:nth-child(4){animation-delay:.5s}
@media (max-width:640px){#home-view .hm-tile .hm-ico{display:grid;width:30px;height:30px;margin-bottom:10px}}


/* Solid navy icon tiles on the Explore PRISM cards (user, 6 Nov: "i like the coloured boxes"), the same values as the
   Spectra landing's column icons. Light: #0F2A4A with a #F5EFEB icon; dark: #1B3F6B so it reads on the dark surface. */
:root{--hm-ico-bg:#0F2A4A;--hm-ico-ink:#F5EFEB}
html[data-theme=dark]{--hm-ico-bg:#1B3F6B}
@media (prefers-color-scheme:dark){html:not([data-theme=light]){--hm-ico-bg:#1B3F6B}}
#home-view .hm-tile .hm-ico{background:var(--hm-ico-bg);color:var(--hm-ico-ink);box-shadow:none}

/* Cream page behind Home (user, 6 Nov: "try the background in cream #F5EFEB"). Light mode only; the pane and its header
   turn cream while Home (or the Spectra landing, which shares #home-view) is showing; cards and the box stay white. */
html:not([data-theme=dark]) body:has(#home-view:not([hidden])) #main{background:#F5EFEB;--page:#F5EFEB}
html:not([data-theme=dark]) body:has(#home-view:not([hidden])) #main > header{background:transparent}
@media (prefers-color-scheme:dark){html:not([data-theme=light]) body:has(#home-view:not([hidden])) #main{background:var(--sv-pane);--page:var(--sv-pane)}}

/* Explore PRISM cards: title beside the icon, the description on one line under both (user, 6 Nov). */
#home-view .hm-tile{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"ico title" "desc desc";align-items:center;column-gap:12px;row-gap:10px}
#home-view .hm-tile .hm-ico{grid-area:ico;margin:0}
#home-view .hm-tile strong{grid-area:title;min-width:0;padding-right:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#home-view .hm-tile-d{grid-area:desc}

/* The Spectra landing's send button rests grey until something is typed, as on Home (user, 6 Nov). home-markets.js
   toggles .hm-ready on #composer from the #prompt input in both tabs. */
body.sv-on #home-view #composer .send{transition:opacity .2s,transform .15s var(--hm-ease)}
body.sv-on #home-view #composer:not(.hm-ready) .send{opacity:.35}

/* No tint (user, 6 Nov: "try no tint"): the blue/violet glow behind the greeting goes, on Home and the Spectra
   landing (which reads --hm-glow-a/b); the cream stays plain. The sidebar matches the cream while #home-view shows. */
:root,html[data-theme=dark]{--hm-glow-a:transparent;--hm-glow-b:transparent}
#home-view::before{display:none!important}
html:not([data-theme=dark]) body.sv-shell:has(#home-view:not([hidden])){--sv-shell:#F5EFEB}
html:not([data-theme=dark]) body:has(#home-view:not([hidden])) aside{background:#F5EFEB}
@media (prefers-color-scheme:dark){html:not([data-theme=light]) body:has(#home-view:not([hidden])) aside{background:var(--sv-shell)}}

/* Off-white widgets (user, 6 Nov: the other pages use #FAF8F5 widgets on the cream page). Light mode only; covers
   Home and the Spectra landing (same #home-view): cards, the Spectra box, example chips and the model menu. */
html:not([data-theme=dark]) #home-view{--surface:#FAF8F5;--svx-card:#FAF8F5}
html:not([data-theme=dark]) #home-view :is(.hm-tile,.hm-ask,#composer,.svn-col,.svn-mcp,.hs-model-menu){background:#FAF8F5}
@media (prefers-color-scheme:dark){html:not([data-theme=light]) #home-view{--surface:revert-layer}}

/* Example chips: icons in the text colour, not brand blue (user, 6 Nov: "try these icons in black maybe?"). */
#home-view .hm-ask svg{stroke:var(--text)}

/* Dark mode: Explore card icon tiles orange #FF7F50 with #F5EFEB glyphs (user, 6 Nov: "use orange as the background"),
   the same as the Spectra landing's column icons. Light mode keeps navy #0F2A4A. */
html[data-theme=dark]{--hm-ico-bg:#FF7F50;--hm-ico-ink:#F5EFEB}
@media (prefers-color-scheme:dark){html:not([data-theme=light]){--hm-ico-bg:#FF7F50;--hm-ico-ink:#F5EFEB}}
