/* See PRINCE work: the console. Seven needs; one stage open at a time; each clip plays inside a drawn phone.

   Without script (no siw-js class on the root) every stage is shown in order with plain video controls.
   The script only adds classes and attributes; every rule that moves anything lives here.

   Colours are the shared tokens from prince-site.css (--ps-bg, --ps-panel, --ps-line, --ps-ink,
   --ps-soft, --ps-gold) and each guardian's accent, --gAccent, set by the g-* classes in
   prince-instrument.css (shield, patch, nana, beacon, wallah). Lingua and Solomon have no g-* class
   there, so their accents are set below from the values the site already uses for them. */

body{ margin:0; background:#0e0c0e; color:#f4efe9; line-height:1.55; }

.siw{ --siw-dim:#aba1ac; --siw-deep:#0b090b; --siw-lift:#201b21; --siw-screen:300px; --siw-col:322px;
  box-sizing:border-box; max-width:1120px; margin:0 auto; padding:36px 16px 64px; font-size:17px; }
/* The phone screen is never wider than 320px nor taller than about 68 percent of the window (35vh wide is
   68vh tall at this shape). Its column on wide screens is never narrower than 284px, so three tabs fit. */
@supports (width:min(1px, 1vh)){ .siw{ --siw-screen:min(320px, 35vh); --siw-col:max(calc(var(--siw-screen) + 22px), 284px); } }
.siw [hidden]{ display:none !important; }
.siw .g-lingua{ --gAccent:#7f7cff; }    /* js/pages/home-next-1.js: the homepage lane colour for Lingua */
.siw .g-solomon{ --gAccent:#e6c34a; }   /* header.html belt and the homepage lane colour for Solomon */

/* ---------- hero ---------- */
.siw-hero{ padding:4px 0 28px; text-align:center; }
.siw-crown{ display:grid; place-items:center; width:128px; height:128px; margin:0 auto 20px; border:1px solid var(--ps-gold); border-radius:50%; }
.siw-crown img{ display:block; width:72px; height:72px; }
.siw-hero h1{ margin:0 0 30px; }
.siw-hero-line{ margin:0; font-size:21px; color:var(--ps-ink); }
.siw-hero-note{ margin:18px auto 0; max-width:620px; font-size:16px; color:var(--ps-soft); }
.siw-hero-note a, .siw-foot a{ color:var(--ps-gold); text-underline-offset:.2em; }
.siw-hero-note a:focus-visible, .siw-foot a:focus-visible, .siw-lead-action:focus-visible{ outline:2px solid var(--ps-ink); outline-offset:4px; }
.siw-lead-action{ display:inline-flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px;
  min-height:48px; margin-top:18px; padding:7px 16px; background:var(--ps-gold); color:#141014;
  border-radius:8px; font-weight:800; text-decoration:none; }
.siw-lead-action:hover{ text-decoration:underline; text-underline-offset:.2em; }
.siw-lead-action span{ font-size:14px; font-variant-numeric:tabular-nums; }
@media (max-width:599px){
  .siw-crown{ width:84px; height:84px; margin-bottom:14px; }
  .siw-crown img{ width:54px; height:54px; }
  .siw-hero h1{ margin-bottom:18px; }
}
@media (max-width:360px) and (max-height:600px){
  .siw-crown{ display:none; }
}

/* the team: seven medallions, dim until that need's clip has been started */
.siw-team{ list-style:none; display:flex; flex-wrap:wrap; justify-content:center; gap:0; margin:18px -4px 0; padding:0; }
.siw-medal{ position:relative; display:grid; place-items:center; width:48px; height:48px; margin:0; padding:0; background:transparent; border:0; border-radius:50%; cursor:pointer; }
.siw-medal-ring{ display:grid; place-items:center; width:40px; height:40px; border:1px solid var(--ps-line); border-radius:50%; background:var(--siw-deep); overflow:hidden; transition:border-color .2s ease; }
.siw-medal-ring img{ display:block; width:24px; height:36px; object-fit:contain; filter:grayscale(1); opacity:.6; transition:filter .3s ease, opacity .3s ease; }
.siw-medal-crown .siw-medal-ring img{ width:26px; height:26px; }
.siw-medal:hover .siw-medal-ring{ border-color:var(--ps-gold); }
.siw-medal.is-seen .siw-medal-ring{ border:2px solid var(--gAccent); }
.siw-medal.is-seen .siw-medal-ring img{ filter:none; opacity:1; }
.siw-medal.is-seen::after{ content:""; position:absolute; right:1px; bottom:3px; width:15px; height:15px; border:1px solid var(--ps-gold); border-radius:50%; background:var(--ps-bg); }
.siw-medal.is-seen::before{ content:""; position:absolute; z-index:1; right:7px; bottom:8px; width:3px; height:7px; border-right:2px solid var(--ps-gold); border-bottom:2px solid var(--ps-gold); transform:rotate(45deg); }

/* ---------- the seven needs ---------- */
.siw-needs ul{ list-style:none; display:grid; gap:14px; margin:0; padding:0; }
.siw-needs li{ display:flex; min-width:0; }
.siw-featured{ grid-template-columns:minmax(0, 1fr); }
.siw-needs .siw-more{ grid-template-columns:repeat(2, minmax(0, 1fr)); margin-top:14px; }
.siw-more li:last-child{ grid-column:1 / -1; }
.siw-need{ flex:1 1 auto; display:flex; flex-direction:column; align-items:flex-start; gap:12px; box-sizing:border-box; min-width:0; min-height:48px; margin:0; padding:16px;
  background:var(--ps-panel); border:1px solid var(--ps-line); border-radius:8px; color:var(--ps-ink); font:inherit; text-align:left; text-decoration:none; cursor:pointer;
  transition:transform .18s ease, border-color .18s ease, background-color .18s ease; }
.siw-need:hover, .siw-need:focus-visible{ transform:translateY(-2px); border-color:var(--ps-gold); background:var(--siw-lift); }
.siw-need[aria-expanded="true"]{ border-color:var(--ps-gold); background:var(--siw-lift); }
.siw-need-face{ flex:none; display:grid; place-items:center; width:60px; height:60px; border:1px solid var(--ps-line); border-radius:50%; background:var(--siw-deep); overflow:hidden; }
.siw-need-face img{ display:block; width:36px; height:54px; object-fit:contain; transition:transform .18s ease; }
.siw-need:hover .siw-need-face img, .siw-need:focus-visible .siw-need-face img{ transform:scale(1.06); }
.siw-need-text{ display:block; min-width:0; }
.siw-need-words{ display:block; font-size:19px; font-weight:800; line-height:1.25; overflow-wrap:anywhere; }
.siw-need-line{ display:block; margin-top:4px; font-size:16px; line-height:1.4; color:var(--ps-soft); }
.siw-featured .siw-need{ flex-direction:row; align-items:center; gap:16px; padding:20px; border-color:var(--ps-gold); box-shadow:inset 3px 0 0 var(--ps-gold); }   /* the two scam checks lead: a gold edge */
.siw-featured .siw-need-face{ width:76px; height:76px; }
.siw-featured .siw-need-face img{ width:46px; height:69px; }
.siw-featured .siw-need-words{ font-size:24px; }
.siw-featured .siw-need::after{ content:""; flex:none; width:10px; height:10px; margin:0 4px 0 auto; border-right:2px solid var(--ps-gold); border-bottom:2px solid var(--ps-gold); transform:rotate(-45deg); transition:transform .18s ease; }
.siw-featured .siw-need[aria-expanded="true"]::after{ transform:rotate(45deg); }

/* ---------- a stage ---------- */
.siw-stage{ margin-top:28px; padding:16px 16px 22px; background:var(--ps-panel); border:1px solid var(--ps-line); border-top-color:var(--gAccent); border-radius:8px; scroll-margin-top:16px; }
.siw-js .siw-stage{ display:none; }
.siw-js .siw-stage.is-open{ display:block; animation:siw-open .2s ease-out 1 both; }

.siw-close{ display:block; min-height:48px; margin:0 0 10px auto; padding:0 18px; background:transparent; border:1px solid var(--ps-line); border-radius:8px; color:var(--ps-ink); font:inherit; font-weight:700; cursor:pointer; }
.siw-close:hover{ border-color:var(--ps-gold); }

/* the summon: crown, a gold line, then the guardian */
.siw-summon{ display:flex; align-items:center; gap:10px; min-width:0; margin:0 0 16px; }
.siw-summon-crown{ flex:none; display:block; width:44px; height:44px; }
.siw-summon-line{ flex:1 1 24px; min-width:24px; height:1px; background:var(--ps-gold); transform-origin:left center; }
.siw-summon-who{ flex:0 1 auto; display:flex; align-items:center; gap:10px; min-width:0; }
.siw-face{ flex:none; display:grid; place-items:center; width:60px; height:60px; border:2px solid var(--gAccent); border-radius:50%; background:var(--siw-deep); overflow:hidden; }
.siw-face img{ display:block; width:34px; height:51px; object-fit:contain; }
.siw-summon-text{ display:block; min-width:0; }
.siw-summon-name{ display:block; font-size:15px; font-weight:800; letter-spacing:.12em; line-height:1.3; text-transform:uppercase; color:var(--ps-ink); }
.siw-summon-role{ display:block; font-size:14px; line-height:1.3; color:var(--ps-soft); overflow-wrap:anywhere; }

/* what the guardian says */
.siw-says{ margin:0 0 18px; padding:12px 14px; background:var(--siw-deep); border:1px solid var(--gAccent); border-radius:8px; }
.siw-says-label{ margin:0 0 4px; font-size:13px; font-weight:800; letter-spacing:.12em; line-height:1.4; color:var(--gAccent); }
.siw-says-line{ margin:0; font-size:19px; line-height:1.4; color:var(--ps-ink); }

/* tabs (plain links to each part until the script makes them tabs) */
.siw-tabs{ list-style:none; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:6px; margin:0 0 18px; padding:0; }
.siw-tabs-expanded{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
.siw-tabs li{ display:flex; min-width:0; }
.siw-tab{ flex:1 1 auto; display:flex; align-items:center; justify-content:center; box-sizing:border-box; min-width:0; min-height:48px; margin:0; padding:6px 8px;
  background:transparent; border:1px solid var(--ps-line); border-radius:8px; color:var(--ps-soft); font:inherit; font-size:16px; font-weight:700; line-height:1.2; text-align:center; text-decoration:none; overflow-wrap:anywhere; cursor:pointer; }
.siw-tab:hover{ border-color:var(--ps-gold); color:var(--ps-ink); }
.siw-tab[aria-selected="true"]{ border-color:var(--ps-gold); background:var(--siw-lift); color:var(--ps-ink); }

.siw-panel + .siw-panel{ margin-top:36px; padding-top:36px; border-top:1px solid var(--ps-line); }   /* seen only without script, when all three parts show */
.siw-js .siw-panel + .siw-panel{ margin-top:0; padding-top:0; border-top:0; }

/* the brief */
.siw-brief h2{ margin:0 0 12px; }
.siw-brief > p{ max-width:620px; margin:0 0 22px; font-size:18px; color:var(--ps-soft); }
.siw-brief h3{ margin:0 0 12px; font-size:16px; font-weight:800; color:var(--ps-gold); }
.siw-crown-details{ margin-top:24px; }
.siw-crown-details h3{ margin:0 0 8px; font-size:16px; color:var(--ps-gold); }
.siw-crown-details p{ max-width:66ch; margin:0 0 8px; color:var(--ps-soft); }
.siw-comparisons{ margin:24px 0 0; padding:12px 0; border-top:1px solid var(--ps-line); }
.siw-comparisons summary{ min-height:44px; padding:10px 0; color:var(--ps-gold); font-weight:700; cursor:pointer; }
.siw-comparisons summary:focus-visible{ outline:2px solid var(--ps-ink); outline-offset:3px; }
.siw-comparisons video{ display:block; width:min(100%, 315px); height:auto; aspect-ratio:720 / 1396; margin:12px 0 18px; }
#crown .siw-play{ margin-top:0; }
.siw-steps{ list-style:none; margin:0; padding:0; counter-reset:siw-step; }
.siw-steps li{ position:relative; min-height:32px; margin:0 0 12px; padding:3px 0 3px 46px; font-size:17px; color:var(--ps-ink); counter-increment:siw-step; }
.siw-steps li::before{ content:counter(siw-step); position:absolute; left:0; top:0; display:grid; place-items:center; width:32px; height:32px; border:1px solid var(--ps-gold); border-radius:8px; color:var(--ps-gold); font:700 15px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }

.siw-play{ display:inline-flex; align-items:center; justify-content:center; min-height:52px; margin:22px 0 0; padding:0 38px; background:var(--ps-gold); border:0; border-radius:999px; color:#141014; font:inherit; font-size:18px; font-weight:800; cursor:pointer; }
.siw-play:hover{ filter:brightness(1.08); }
.siw-play-crown{ flex-direction:column; gap:14px; min-height:0; padding:12px 14px 6px; background:transparent; border-radius:8px; color:var(--ps-ink); }
.siw-play-crown:hover{ filter:none; }
.siw-play-ring{ position:relative; display:grid; place-items:center; width:96px; height:96px; border:1px solid var(--ps-gold); border-radius:50%; background:var(--siw-deep); transition:background-color .18s ease; }
.siw-play-ring::after{ content:""; position:absolute; top:-9px; right:-9px; bottom:-9px; left:-9px; border:1px solid var(--ps-gold); border-radius:50%; opacity:.35; pointer-events:none; }
.siw-play-crown:hover .siw-play-ring{ background:var(--siw-lift); }
.siw-play-ring img{ display:block; width:56px; height:56px; }

/* the phone */
.siw-show{ width:calc(var(--siw-screen) + 22px); max-width:100%; margin:28px auto 0; }
.siw-phone{ position:relative; padding:10px; background:var(--siw-deep); border:1px solid var(--ps-gold); border-radius:30px; }
.siw-phone::after{ content:""; position:absolute; z-index:2; top:10px; right:10px; left:10px; height:1px; background:linear-gradient(90deg, transparent, var(--ps-gold), transparent); opacity:0; pointer-events:none; }
.siw-screen{ position:relative; overflow:hidden; background:#000; border-radius:20px; }
.siw-screen noscript img{ position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; }
.siw-screen video{ position:relative; z-index:1; display:block; width:100%; height:auto; aspect-ratio:720 / 1396; }
.siw-js .siw-screen video{ opacity:0; transition:opacity .6s ease-out; }
.siw-js .siw-screen.is-awake video{ opacity:1; }

.siw-hear{ margin-top:14px; background:var(--siw-deep); border:1px solid var(--ps-line); border-radius:8px; }
.siw-hear > summary{ box-sizing:border-box; min-height:48px; padding:12px 14px; color:var(--ps-ink); font-weight:700; cursor:pointer; }
.siw-hear > summary::marker{ color:var(--ps-gold); }
.siw-hear > summary::-webkit-details-marker{ color:var(--ps-gold); }
.siw-hear > p{ margin:0; padding:0 14px 14px; font-size:17px; color:var(--ps-soft); }

/* the other needs, at the foot of a stage */
.siw-chips{ list-style:none; display:flex; flex-wrap:wrap; gap:10px; margin:28px 0 0; padding:20px 0 0; border-top:1px solid var(--ps-line); }
.siw-chips a{ display:inline-flex; align-items:center; box-sizing:border-box; min-height:48px; padding:4px 16px; border:1px solid var(--ps-line); border-radius:8px; color:var(--ps-ink); font-size:16px; font-weight:600; line-height:1.25; text-decoration:none; }
.siw-chips a:hover{ border-color:var(--ps-gold); background:var(--siw-lift); }

.siw-foot{ margin:40px 0 0; padding-top:16px; border-top:1px solid var(--ps-line); font-size:15px; color:var(--siw-dim); }

/* ---------- motion: each of these plays once, when the script adds its class ---------- */
.siw-stage.is-summoning .siw-summon-line{ animation:siw-draw .5s ease-out .1s 1 both; }
.siw-stage.is-summoning .siw-summon-who{ animation:siw-arrive .3s ease-out .55s 1 both; }
.siw-stage.is-summoning .siw-says,
.siw-stage.is-summoning .siw-tabs,
.siw-stage.is-summoning .siw-brief{ animation:siw-fade .3s ease-out .75s 1 both; }
.siw-stage.is-summoning .siw-phone::after{ animation:siw-sweep .9s ease-in-out .2s 1 both; }
.siw-face.is-glowing{ animation:siw-glow 1.1s ease-out 1; }
@keyframes siw-open{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@keyframes siw-draw{ from{ transform:scaleX(0); } to{ transform:scaleX(1); } }
@keyframes siw-arrive{ from{ opacity:0; transform:translateX(-10px) scale(.92); } to{ opacity:1; transform:none; } }
@keyframes siw-fade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes siw-sweep{ 0%{ top:10px; opacity:0; } 12%{ opacity:.9; } 88%{ opacity:.9; } 100%{ top:calc(100% - 11px); opacity:0; } }
@keyframes siw-glow{ 0%{ box-shadow:0 0 0 0 color-mix(in srgb, var(--gAccent) 60%, transparent); } 100%{ box-shadow:0 0 0 14px color-mix(in srgb, var(--gAccent) 0%, transparent); } }
@keyframes siw-breathe{ 0%, 100%{ transform:scale(1); opacity:.5; } 50%{ transform:scale(1.1); opacity:.12; } }
/* The one loop on the page: the ring round the crown play button breathes while it waits to be tapped,
   and stops once its clip has started. The shared stylesheet holds every animation to a single run, so
   this rule is written to outrank it on purpose. It exists only when motion is welcome. */
@media (prefers-reduced-motion:no-preference){
  html.siw-js body.prince-site .siw-play-crown:not([data-started]) .siw-play-ring::after{ animation:siw-breathe 2.4s ease-in-out infinite; animation-iteration-count:infinite !important; }
}

/* ---------- wider screens ---------- */
@media (min-width:480px){
  .siw-team{ gap:8px; margin-right:0; margin-left:0; }
  .siw-medal{ width:52px; height:52px; }
  .siw-medal-ring{ width:46px; height:46px; }
  .siw-medal-ring img{ width:28px; height:42px; }
  .siw-medal-crown .siw-medal-ring img{ width:30px; height:30px; }
}
@media (min-width:640px){
  .siw-featured{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .siw-needs .siw-more{ grid-template-columns:repeat(6, minmax(0, 1fr)); }
  .siw-more li{ grid-column:span 2; }
  .siw-more li:nth-child(n+4){ grid-column:span 3; }
}
@media (min-width:900px){
  .siw{ padding:44px 24px 72px; }
  .siw-stage{ padding:24px 32px 30px; }
  .siw-face{ width:72px; height:72px; }
  .siw-face img{ width:42px; height:63px; }
  .siw-says{ max-width:620px; }
  .siw-tabs{ max-width:520px; }
  .siw-js .siw-tabs{ width:var(--siw-col); max-width:none; margin-left:auto; }
  .siw-panel{ display:grid; grid-template-columns:minmax(0, 1fr) var(--siw-col); column-gap:56px; align-items:start; }
  .siw-show{ margin:0 auto; }
}
@media (min-width:1000px){
  .siw-needs .siw-more{ grid-template-columns:repeat(5, minmax(0, 1fr)); }
  .siw-more li, .siw-more li:nth-child(n+4){ grid-column:auto; }
}
/* With script and a wide screen the open stage is one grid: the summon and Close on the first row,
   what the guardian says beside the tabs on the second, the brief beside the phone on the third. Each
   part (a tab's panel) borrows those rows, so the phone sits right under the tabs. Browsers without
   subgrid keep the simpler stacked rows above. */
@supports (grid-template-rows:subgrid){
  @media (min-width:900px){
    .siw-js .siw-stage.is-open{ display:grid; grid-template-columns:minmax(0, 1fr) var(--siw-col); grid-template-rows:auto auto 1fr auto; column-gap:56px; }
    .siw-js .siw-summon{ grid-column:1; grid-row:1; align-self:center; margin:0 0 20px; }
    .siw-js .siw-close{ grid-column:2; grid-row:1; align-self:start; justify-self:end; margin:0 0 20px; }
    .siw-js .siw-says{ grid-column:1; grid-row:2; align-self:start; position:relative; z-index:1; max-width:none; }
    .siw-js .siw-tabs{ grid-column:2; grid-row:2; align-self:end; position:relative; z-index:1; width:auto; margin:0 0 14px; }
    .siw-js .siw-panel{ grid-column:1 / -1; grid-row:2 / span 2; grid-template-columns:subgrid; grid-template-rows:subgrid; }
    .siw-js .siw-brief{ grid-column:1; grid-row:2; align-self:start; }
    .siw-js .siw-show{ grid-column:2; grid-row:1 / span 2; align-self:start; }
    .siw-js .siw-stage-tabbed .siw-show{ grid-row:2; }
    .siw-js .siw-chips{ grid-column:1 / -1; grid-row:4; }
    .siw-js .siw-crown-details{ grid-column:1 / -1; grid-row:4; }
    .siw-js #crown .siw-chips{ grid-row:5; }
  }
}

/* ---------- no motion when the reader asks for none ---------- */
@media (prefers-reduced-motion:reduce){
  .siw *, .siw *::before, .siw *::after{ animation:none !important; transition:none !important; }
}
