/* ===== SealPal product homepage in the workspace's style (2026-11-14) =====
   Loaded last in home.html, after the page's own <style>, paper.css, home.css and the hero files. Same
   tokens as the workspace (glass/ed-tokens.css): flat warm paper, ink type, hairlines, radii 4 / 8 / 12 / 16,
   weights 400 / 500, ink as the primary colour and pale blue only on hover, selection and focus. It points
   the page's variables at the tokens and overrides what the page hard-codes; layout, copy, the opening
   video and the scroll behaviour are untouched. */
:root:root[data-theme]{
  --bg:var(--ed-paper);--surface:var(--ed-card);--ink:var(--ed-ink);--muted:var(--ed-sub);--line:var(--ed-line);
  --wash:rgba(var(--ed-acc-rgb),.28);--sun:var(--ed-ink);--sun-ink:var(--ed-paper);--sun-deep:var(--ed-acc-ink);
  --night:var(--ed-dark);--night-fg:var(--ed-on-dark);--night-muted:var(--ed-on-dark-sub);
  --paper:var(--ed-paper);--glass-border:var(--ed-line);--glass-blur:none;--glass-shadow:none;
  --font-display:var(--ed-font);--font-body:var(--ed-font);--font-data:var(--ed-font);--serif:var(--ed-font);
  --radius:var(--ed-r-panel);--radius-panel:var(--ed-r-panel);--radius-control:var(--ed-r-ctl);--radius-inset:var(--ed-r-ctl);--radius-dialog:var(--ed-r-dialog);
  --w-gold:var(--ed-acc-ink);--w-yel-wash:rgba(var(--ed-acc-rgb),.3);--w-fillbg:rgba(var(--ed-acc-rgb),.22);
  background:var(--ed-paper);color:var(--ed-ink);font-family:var(--ed-font);scrollbar-color:var(--ed-line-2) transparent;
}
:root:root[data-theme] body{font-family:var(--ed-font);background:var(--ed-paper);color:var(--ed-ink);-webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums}
:root:root[data-theme] body::after{display:none}/* flat paper: no grain */
:root:root[data-theme] ::selection{background:rgba(var(--ed-acc-rgb),.6);color:#1c1917}
:root:root[data-theme] :is(input,textarea){caret-color:var(--ed-acc-ink)}

/* ---------- type: one sans, weights 400 / 500, no tracking on Chinese ---------- */
:root:root[data-theme] :is(h1,h2,h3,h4,.hf-title,#sh-title,.section-head h2,.final h2){font-family:var(--ed-font);font-weight:500;letter-spacing:-.02em;text-wrap:balance}
:root:root[data-theme] :is(h1,h2,h3,h4,.hf-title,#sh-title,.section-head h2,.final h2) .zh{letter-spacing:0}
:root:root[data-theme][lang=zh] :is(h1,h2,h3,h4,.hf-title,#sh-title){letter-spacing:0}
:root:root[data-theme] :is(b,strong,th,.btn,.pf-name,.link-arrow,nav.menu a,.plan h3,summary){font-weight:500}
:root:root[data-theme] :is(.tag,.pf-b b,.zz-num,.pf-st,.b-kicker){font-family:var(--ed-font);letter-spacing:0;text-transform:none}
:root:root[data-theme] :is(.tag,.pf-st){font-size:13px;line-height:18px;font-weight:500;padding:2px 8px;border-radius:var(--ed-r-tag)}
:root:root[data-theme] .tag{background:rgba(var(--ed-acc-rgb),.32);color:var(--ed-ink)}
:root:root[data-theme] main :is(small,.tiny,figcaption,.pf-st),:root:root[data-theme] footer :is(small,p,a,span){font-size:max(13px,1em)}
:root:root[data-theme] p{text-wrap:pretty}

/* ---------- surfaces: flat, hairlines, no glass ---------- */
:root:root[data-theme] main *,:root:root[data-theme] footer *,:root:root[data-theme] dialog{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
:root:root[data-theme] .hero-full :is(.hf-ask-box,.hf-play){-webkit-backdrop-filter:blur(14px)!important;backdrop-filter:blur(14px)!important}/* over the video only */
:root:root[data-theme] :is(.slip,.mock,.ask-steps li,.table-wrap,.plan,.faq details,.review-slot,.sources){background:var(--ed-card);border:1px solid var(--ed-line);box-shadow:none}
:root:root[data-theme] :is(.slip,.table-wrap,.plan,.faq details,.review-slot,.sources){border-radius:var(--ed-r-panel)}
:root:root[data-theme] .band+.band{border-top-color:var(--ed-line)}
:root:root[data-theme] dialog{background:var(--ed-card);border:1px solid var(--ed-line);border-radius:var(--ed-r-dialog);box-shadow:var(--ed-float);color:var(--ed-ink)}
:root:root[data-theme] dialog::backdrop{background:rgba(28,23,20,.38)}
:root:root[data-theme] .tip-pop{background:var(--ed-card);border:1px solid var(--ed-line);border-radius:var(--ed-r-ctl);box-shadow:var(--ed-float);color:var(--ed-ink)}

/* ---------- header ---------- */
:root:root[data-theme] header.top{background:var(--ed-paper);border-bottom:1px solid var(--ed-line);-webkit-backdrop-filter:none;backdrop-filter:none}
:root:root[data-theme] nav.menu a{color:var(--ed-sub);transition:color var(--ed-fast) var(--ed-ease)}
:root:root[data-theme] nav.menu a:hover{color:var(--ed-ink)}
:root:root[data-theme] :is(.lang,.menu-toggle){background:transparent;border:1px solid var(--ed-line-2);border-radius:var(--ed-r-ctl);color:var(--ed-ink)}
:root:root[data-theme] header.top.compact.menu-open nav.menu{background:var(--ed-card);border:1px solid var(--ed-line);border-radius:var(--ed-r-panel);box-shadow:var(--ed-float)}
:root:root[data-theme] header.top.compact.menu-open nav.menu :is(a,button):hover{background:var(--ed-sand)}

/* over the opening film the bar is clear and its controls are white (home.html adds .on-hero) */
:root:root[data-theme] header.top.on-hero{background:transparent;border-bottom-color:transparent}
:root:root[data-theme] header.top.on-hero:not(.compact) nav.menu a{color:rgba(255,255,255,.86)}
:root:root[data-theme] header.top.on-hero:not(.compact) nav.menu a:hover{color:#fff}
:root:root[data-theme] header.top.on-hero :is(.lang,.menu-toggle){border-color:rgba(255,255,255,.7);color:#fff}
:root:root[data-theme] header.top.on-hero .btn.primary{border-color:rgba(255,255,255,.8);color:#fff}
:root:root[data-theme] header.top.on-hero .btn.primary:hover{background:#fdfbf5;border-color:#fdfbf5;color:#1c1917}

/* ---------- buttons and links: ink solid, ink outline, colour-only transitions ---------- */
:root:root[data-theme] .btn{border:1px solid var(--ed-line-2);border-radius:var(--ed-r-ctl);background:transparent;color:var(--ed-ink);box-shadow:none;transition:background-color var(--ed-fast) var(--ed-ease),border-color var(--ed-fast) var(--ed-ease),color var(--ed-fast) var(--ed-ease),transform var(--ed-fast) var(--ed-ease)}
:root:root[data-theme] .btn:hover{transform:none;background:var(--ed-sand)}
:root:root[data-theme] .btn:active{transform:scale(.98)}
:root:root[data-theme] .btn.primary{background:var(--ed-accent);border-color:var(--ed-accent);color:var(--ed-on-accent)}
:root:root[data-theme] .btn.primary:hover{background:var(--ed-ink);border-color:var(--ed-ink);color:var(--ed-surface)}
/* the header's early-access button is an outline: the page's one solid action is in the hero */
:root:root[data-theme] header.top .btn.primary{background:transparent;color:var(--ed-ink)}
:root:root[data-theme] header.top .btn.primary:hover{background:var(--ed-acc);color:var(--ed-ink)}
:root:root[data-theme] .link-arrow{border-bottom:1px solid color-mix(in srgb,currentColor 40%,transparent);color:var(--ed-ink);transition:color var(--ed-fast) var(--ed-ease),border-color var(--ed-fast) var(--ed-ease)}
:root:root[data-theme] .link-arrow:hover{color:var(--ed-acc-ink);border-color:currentColor}
:root:root[data-theme] main a:not(.btn):not(.link-arrow):not(.logo),:root:root[data-theme] footer a{text-underline-offset:3px}
:root:root[data-theme] :is(a,button,summary,[tabindex]):focus-visible{outline:2px solid var(--ed-acc-ink);outline-offset:2px}
:root:root[data-theme] :is(input[type=email],input[type=text],input[type=search],select,textarea):not(.hf-ask-box input){border:1px solid var(--ed-line-2);border-radius:var(--ed-r-ctl);background:var(--ed-card);color:var(--ed-ink)}
:root:root[data-theme] :is(input[type=email],input[type=text],select,textarea):focus{outline:none;border-color:var(--ed-ink);box-shadow:0 0 0 3px rgba(var(--ed-acc-rgb),.6)}

/* ---------- opening screen: the film stays; controls are paper on film ---------- */
:root:root[data-theme] .hf-flow{display:none}/* no coloured washes behind the film */
:root:root[data-theme] .hf-title{font-weight:500;text-shadow:0 1px 24px rgba(0,0,0,.35)}
:root:root[data-theme] .hf-actions :is(a,button){border-radius:var(--ed-r-ctl);font-weight:500;box-shadow:none;transition:background-color var(--ed-fast) var(--ed-ease),color var(--ed-fast) var(--ed-ease),border-color var(--ed-fast) var(--ed-ease)}
:root:root[data-theme] .hf-ask-box{border-radius:14px}
:root:root[data-theme] .hf-ask-box:focus-within{border-color:#fff;box-shadow:0 0 0 3px rgba(var(--ed-acc-rgb),.6)}
:root:root[data-theme] .hf-ask-box .btn{border-radius:var(--ed-r-ctl)}
/* Paper on film at every width: phones show the film behind the opening screen too (2026-11-15) */
@media all{
  :root:root[data-theme] .hf-actions .hf-request{background:#fdfbf5;border:1px solid #fdfbf5;color:#1c1917}
  :root:root[data-theme] .hf-actions .hf-request:hover{background:#e5ebf9;border-color:#e5ebf9}
  :root:root[data-theme] .hf-actions .hf-access{background:transparent;border:1px solid rgba(255,255,255,.8);color:#fff}
  :root:root[data-theme] .hf-actions .hf-access:hover{background:rgba(255,255,255,.16);border-color:#fff}
}

/* ---------- product tour, plans, questions ---------- */
:root:root[data-theme] .pf-bar{border-top:1px solid var(--ed-line)}
:root:root[data-theme] .pf-bar::before{top:-1px;height:1px;background:var(--ed-ink)}
:root:root[data-theme] .pf-bar li.on .pf-b b{color:var(--ed-ink)}
:root:root[data-theme] .zz-num{color:var(--ed-sub)}
:root:root[data-theme] .zz-visual .mock{border-radius:var(--ed-r-panel)}
:root:root[data-theme] .plan.best{border:1px solid var(--ed-ink)}
:root:root[data-theme] .faq summary{transition:color var(--ed-fast) var(--ed-ease)}
:root:root[data-theme] .faq summary:hover{color:var(--ed-acc-ink)}

/* ---------- the one dark panel: early access ---------- */
:root:root[data-theme] .final{background:var(--ed-dark);color:var(--ed-on-dark)}
:root:root[data-theme] .final :is(h2,p,label,small){color:var(--ed-on-dark)}
:root:root[data-theme] .final :is(.btn,button[type=submit]){background:var(--ed-on-dark);border:1px solid var(--ed-on-dark);color:var(--ed-dark);border-radius:var(--ed-r-ctl)}
:root:root[data-theme] .final :is(.btn,button[type=submit]):hover{background:var(--ed-acc);border-color:var(--ed-acc);color:var(--ed-ink)}
:root:root[data-theme] .final input{background:var(--ed-card);border:1px solid transparent;color:var(--ed-ink)}
:root:root[data-theme] .final :is(a,button,input):focus-visible{outline-color:var(--ed-acc)}
:root:root[data-theme=night] .final :is(a,button,input):focus-visible{outline-color:#0f5bc4}

@media (prefers-reduced-motion:reduce){:root:root[data-theme] :is(.btn,.link-arrow,nav.menu a,.faq summary,.hf-actions a,.hf-actions button){transition:none}:root:root[data-theme] .btn:active{transform:none}}

/* ---------- weights: 400 everywhere, 500 for headings, names, figures and controls ---------- */
:root:root[data-theme] body *{font-weight:400}
:root:root[data-theme] body :is(span,a,small,em,i){font-weight:inherit}
:root:root[data-theme] body :is(h1,h2,h3,h4,b,strong,th,dt,summary,button,label,.btn,.pr-price,.pf-name,.logo,.link-arrow,.hf-title,.pr-mark){font-weight:500}
/* the logo keeps its own blue; the page's primary colour is ink */
:root:root[data-theme] .logo{font-weight:600}
:root:root[data-theme] .logo b{font-weight:600;color:#1b2130}
:root:root[data-theme] .logo .sp-back{stroke:#3a3f94}
:root:root[data-theme] .logo .sp-word{color:#3a3f94}
:root:root[data-theme] .logo .sp-nose{fill:#1b2130}
:root:root[data-theme] .logo .sp-whisk{stroke:#1b2130}
:root:root[data-theme=night] .logo b,:root:root[data-theme] header.top.on-hero .logo b{color:#fff}
:root:root[data-theme=night] .logo .sp-nose,:root:root[data-theme] header.top.on-hero .logo .sp-nose{fill:#fff}
:root:root[data-theme=night] .logo .sp-whisk,:root:root[data-theme] header.top.on-hero .logo .sp-whisk{stroke:#fff}
:root:root[data-theme=night] .logo .sp-back,:root:root[data-theme] header.top.on-hero .logo .sp-back{stroke:#a9adf0}
:root:root[data-theme=night] .logo .sp-word,:root:root[data-theme] header.top.on-hero .logo .sp-word{color:#a9adf0}
/* plans: the open one is marked by an ink rule, figures are medium weight */
:root:root[data-theme] .pr-plan.best{background:linear-gradient(var(--ed-ink),var(--ed-ink)) top/100% 2px no-repeat}
:root:root[data-theme] .pr-price{letter-spacing:-.02em}
:root:root[data-theme] .pr-price .zh{letter-spacing:0}
:root:root[data-theme] .pr-mark{color:var(--ed-sub);letter-spacing:0;font-size:13px}
:root:root[data-theme] .pr-deal{border-radius:var(--ed-r-ctl);background:rgba(var(--ed-acc-rgb),.28)}
:root:root[data-theme] .pr-deal b{color:var(--ed-ink)}
/* the Ask button on the film */
:root:root[data-theme] .hf-ask-box .hf-ask-go{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.7);color:#fff}
:root:root[data-theme] .hf-ask-box .hf-ask-go:hover{background:#fdfbf5;border-color:#fdfbf5;color:#1c1917}
/* the opening title: room between Latin letters at display size */
:root:root[data-theme]:is([lang=en],[lang=es],[lang=pt]) .hf-title{letter-spacing:-.01em}

/* ---------- opening screen, wide (2026-11-14, Elsie): the title is the big thing, bottom left; the six
   figures sit small in one row at the bottom right. Under 1100px the stacked layout stays. ---------- */
@media (min-width:1100px){
  /* one wider measure for the whole page, so the header, the opening screen and the sections share their edges */
  :root:root[data-theme]{--wrap:1320px}
  :root:root[data-theme] .hero-full{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:1fr;align-items:end;column-gap:clamp(40px,4.5vw,88px);
    padding-inline:max(var(--page-gutter),calc((100vw - var(--wrap)) / 2 + var(--page-gutter)));padding-bottom:clamp(32px,5vh,56px)}
  :root:root[data-theme] :is(.hf-body,.hf-foot){width:auto;max-width:none;margin:0;padding:0;min-width:0}
  :root:root[data-theme] .hf-body{grid-column:1;flex:none;align-self:end;align-items:flex-start;justify-content:flex-end;text-align:left}
  :root:root[data-theme] .hf-foot{grid-column:2;align-self:end}
  :root:root[data-theme] .hf-title{max-width:none;margin:0;font-size:clamp(60px,5.8vw,84px);line-height:1.12;text-align:left}
  /* three lines of at most seven characters: each phrase is its own line, and the full stop never drops alone */
  :root:root[data-theme] .hf-title .zh i{display:block}
  :root:root[data-theme] .hf-title .zh>span:last-child{white-space:nowrap}
  :root:root[data-theme]:is([lang=en],[lang=es],[lang=pt]) .hf-title{font-size:clamp(56px,5.2vw,76px);line-height:1.04;letter-spacing:-.02em}
  :root:root[data-theme] .hf-sub{max-width:none;margin:20px 0 0;text-align:left}
  :root:root[data-theme] .hf-act{align-items:flex-start;max-width:560px;margin-top:28px;gap:16px}
  :root:root[data-theme] .hf-actions{gap:16px}
  :root:root[data-theme] .hf-actions .hf-request{min-height:52px;font-size:18px}
  :root:root[data-theme] .hf-motion :is(.hf-ask,.hf-actions){transform-origin:left center}
  :root:root[data-theme] .hf-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 20px;padding-top:16px}
  :root:root[data-theme] .hf-stats li{grid-template-rows:28px auto;gap:4px}
  :root:root[data-theme] .hf-stats b{font-size:22px;line-height:28px;letter-spacing:-.01em}
  :root:root[data-theme] .hf-stats>li>span{font-size:13px;line-height:18px;color:rgba(255,255,255,.8)}
}
/* Three figures only, small, in the bottom corner of the opening screen at every width (Elsie 2026-11-15:
   prep time, the time saved, real cases behind the tests). Wide screens keep them at the bottom right. */
:root:root[data-theme] .hf-stats{grid-template-columns:repeat(3,minmax(0,max-content));justify-content:start;gap:12px clamp(20px,3vw,40px);padding-top:14px}
:root:root[data-theme] .hf-stats li{grid-template-rows:auto auto;gap:2px;max-width:15em}
:root:root[data-theme] .hf-stats b{font-size:20px;line-height:26px;font-weight:600;letter-spacing:-.01em;transform:none}
:root:root[data-theme] .hf-stats>li>span{font-size:13px;line-height:18px;color:rgba(255,255,255,.8)}
@media (min-width:1100px){:root:root[data-theme] .hf-foot{justify-self:end}:root:root[data-theme] .hf-stats{justify-content:end}}
@media (max-width:600px){:root:root[data-theme] .hf-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px}:root:root[data-theme] .hf-stats li{max-width:none}}
/* the film's play / pause control moves up under the header on wide screens, clear of the figures */
@media (min-width:1100px){:root:root[data-theme] .hf-pause{top:calc(var(--hdr-h) + 16px);bottom:auto;right:max(var(--page-gutter),calc((100vw - var(--wrap)) / 2 + var(--page-gutter)))}}
/* Phones and tablets, one size down (Elsie 2026-11-15: "手机的太大了"): a smaller title, Ask and buttons, so the
   film shows through like a phone hero should. Touch targets stay at least 44px. */
@media (max-width:900px){
  :root:root[data-theme] .hf-title{font-size:clamp(28px,7.6vw,34px);line-height:1.2}
  :root:root[data-theme]:is([lang=en],[lang=es],[lang=pt]) .hf-title{font-size:clamp(28px,7.6vw,34px);line-height:1.12}
  :root:root[data-theme] .hf-sub{margin-top:10px;font-size:14px}
  :root:root[data-theme] .hf-act{margin-top:16px;gap:18px}
  /* the scroll zoom nudged Ask 10px down at the top of the page and ate this gap; phones keep it still */
  :root:root[data-theme] .hf-motion :is(.hf-ask,.hf-actions){transform:none}
  :root:root[data-theme] .hf-ask-box{min-height:48px;padding:2px 2px 2px 12px}
  :root:root[data-theme] .hf-ask-box input[type=search]{height:44px;font-size:16px}
  :root:root[data-theme] .hf-ask-box .hf-ask-go{min-height:44px;padding:0 14px;font-size:14px}
  :root:root[data-theme] .hf-actions .hf-request{min-height:44px;padding:6px 14px;font-size:16px}
  :root:root[data-theme] .hf-stats{padding-top:12px}
  /* The film reaches the bottom edge of the screen, under Safari's floating toolbar (Elsie 2026-11-15, iPhone 17:
     no paper strip below the opening screen). 100lvh is the screen with the toolbars away; the copy keeps clear of
     the toolbar by the difference between that and the visible height (100svh), plus the home-indicator inset. */
  :root:root[data-theme] .hero-full{min-height:100vh;min-height:100lvh}
  :root:root[data-theme] .hf-foot{padding-bottom:calc(max(20px, env(safe-area-inset-bottom, 0px)) + 100lvh - 100svh)}
  :root:root[data-theme] .hf-stats b{font-size:17px;line-height:22px}
  :root:root[data-theme] .hf-stats>li>span{font-size:13px;line-height:17px}
}
