/* Sources in search and Narrated casts (prototype; see sources.js). Round 7: search stands alone at the bottom
   left, the panel takes the screen, results come in one card per source, and Style is an inset dock. Built from
   Truffle's own pieces: the capsule's glass for the button, the search panel's frost, result rows, Settings' sliding
   puck, the quiet heading, the kept chip and Settings' menu glass. */

/* ---- the + button: the capsule's own glass, a circle of its own. Large screens only: on phones Home's search field is
   the way into New cast (docs/wikicasts-structure-build-plan.md). In search it becomes ×. Settings' gear (top right of
   Home, truffle.css) wears the same glass. */
#hud #newBtn{display:none}
.hud[data-sel="find"] .puck{opacity:0}
body{--orbB:max(calc(16px + env(safe-area-inset-bottom,0px)),calc(var(--kb,0px) + 10px))}
.sorb,.gear{position:fixed;right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:10;width:58px;height:58px;padding:0;border-radius:50%;
  display:grid;place-items:center;cursor:pointer;color:var(--icon);isolation:isolate;
  background:var(--glass-control);backdrop-filter:blur(16px) saturate(1.6);-webkit-backdrop-filter:blur(16px) saturate(1.6);border:1px solid var(--hairline);
  box-shadow:inset 2px -2px 1px -1px rgba(255,255,255,.34),inset -2px 2px 1px -1px rgba(255,255,255,.34),inset 0 0 2px rgba(255,255,255,.22),0 10px 28px rgba(0,0,0,.6);
  transition:opacity .3s,transform .45s var(--ease-settle),filter .3s,bottom .3s var(--ease-settle)}
/* Settings' gear: smaller, at the top right of Home (truffle.css shows it on Home only). */
.gear{top:calc(12px + env(safe-area-inset-top,0px));bottom:auto;width:46px;height:46px;transition:opacity .3s,transform .4s var(--ease-settle),filter .3s}
@media (min-width:960px){.gear{right:24px;top:24px}}
.sorb svg,.gear svg{filter:drop-shadow(0 6px 3px rgba(0,0,0,.35));transition:rotate .35s cubic-bezier(.45,0,.2,1)}
body.finding .sorb svg{rotate:45deg}
.sorb:active,.gear:active{transform:scale(.92)}
body:has(#hud.away):not(.finding) .sorb,body:has(#hud.dock):not(.finding) .sorb{opacity:0;filter:blur(6px);transform:translateY(18px) scale(.9);pointer-events:none}
@media (max-width:959px){
  .sorb{display:none}
  /* The menu capsule steps aside while search is open. */
  body.finding #hud{opacity:0;filter:blur(6px);transform:translate(-50%,18px) scale(.96);pointer-events:none}
}
@media (min-width:960px){
  .sorb{left:20px;right:auto;bottom:auto;top:calc(var(--mid) - 160px)}
  body.finding .sorb{color:#fff;background:var(--glass-lit)}
  body:has(#hud.dock):not(.finding) .sorb{transform:translateX(-18px) scale(.9)}
}

/* ---- the container, three ways to compare (?sv=). */
.find.srcmode .find-in{display:flex;flex-direction:column;gap:10px}
@media (max-width:959px){
  /* open (default): no box. The page behind steps back under a deep blur and the results sit straight on it;
     the field is a capsule of its own beside the ×. */
  .sv-open .find.srcmode::before{content:"";position:fixed;inset:0;background:color-mix(in srgb,var(--page-background) 55%,transparent);backdrop-filter:blur(26px) saturate(1.4);-webkit-backdrop-filter:blur(26px) saturate(1.4);
    opacity:0;transition:opacity .4s}
  .sv-open .find.srcmode.on::before{opacity:1}
  .sv-open .find.srcmode .find-in{top:calc(var(--vvTop,0px) + max(12px,env(safe-area-inset-top,0px)) + 8px);left:calc(16px + env(safe-area-inset-left,0px));right:calc(16px + env(safe-area-inset-right,0px));bottom:var(--orbB);padding:0;border-radius:0;
    background:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;transform-origin:100% 100%}
  .sv-open .find.srcmode .find-in::after{display:none}
  /* sheet: rises from the bottom edge, nearly to the top, with a grabber. */
  /* slab: the inset frosted box, now ending above the × row. */
  /* slab: the inset frosted box, holding the field; the × sits in its corner. */
}
@media (min-width:960px){
  /* Desktop: the search panel's frosted box, Library's height and place, beside the capsule; no ×. Esc, the + button
     or a click outside closes. */
  /* The same height and place as Library's panel, centred on the capsule. As on phones, the bar is at the bottom and
     the best result sits just above it, the rest receding upward. */
  .find.srcmode .find-in{left:90px;right:auto;width:420px;top:var(--mid);bottom:auto;height:min(560px,calc(100vh - 106px));padding:8px 10px 10px;border-radius:32px;
    transform-origin:0 50%;transform:translate(0,-50%) scale(.97)}
  .find.srcmode.on .find-in{transform:translate(0,-50%)}
  .find.srcmode .find-head .find-x{display:none}
  .find.srcmode .find-head{min-height:0;padding:4px 0 0 4px}
}
.find.srcmode #sugs{display:none!important}
.find.srcshow .find-ideas{display:none}
.sbody{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;margin:0 -4px;padding:0 4px 8px;
  /* Soft edges where the list runs under the heading and down behind the search bar: each fade only shows while
     there is more that way, and eases in and out as you reach the end. */
  --sfade-t:70px;--sfade-b:36px;transition:--sfade-t .25s ease,--sfade-b .25s ease;
  -webkit-mask:linear-gradient(transparent,#000 var(--sfade-t),#000 calc(100% - var(--sfade-b)),transparent);mask:linear-gradient(transparent,#000 var(--sfade-t),#000 calc(100% - var(--sfade-b)),transparent)}
/* Named for search alone: a registered property is global, and the Library uses its own --fb. */
@property --sfade-t{syntax:'<length>';inherits:false;initial-value:0px}
@property --sfade-b{syntax:'<length>';inherits:false;initial-value:0px}
.sbody::-webkit-scrollbar{display:none}
.srclist{max-height:none;overflow:visible}
.srclist:empty{display:none}
.find.srcmode .find-head{min-height:44px;padding:6px 0 4px 8px;gap:8px;justify-content:flex-start}
.find.srcmode .find-head .find-x{margin-left:auto;width:44px;height:44px;color:var(--icon);border:1px solid var(--hairline);
  background:var(--glass-control);backdrop-filter:blur(16px) saturate(1.6);-webkit-backdrop-filter:blur(16px) saturate(1.6);
  box-shadow:inset 2px -2px 1px -1px rgba(255,255,255,.34),inset -2px 2px 1px -1px rgba(255,255,255,.34),inset 0 0 2px rgba(255,255,255,.22),0 10px 28px rgba(0,0,0,.6)}
.find.srcmode .find-head .find-x svg{filter:drop-shadow(0 4px 2px rgba(0,0,0,.35))}
/* The header stays put above the results; the results scroll beneath it. */
.sbody{display:flex;flex-direction:column}
.sbody>.find-head{flex:none;position:sticky;top:0;z-index:4}
/* Results gather at the bottom, next to the field, while they fit; longer lists start from their top. */
.sbody>.srclist,.sbody>.find-ideas{margin-top:auto}
.sbody>.srclist:not(:empty)~.find-ideas{margin-top:0}
.find.srcmode .find-head #findLabel{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;font-weight:700;color:var(--text);letter-spacing:-.02em}
.find.drill .find-head #findLabel{font-size:20px}
.find-head .hico .sico{width:24px;height:24px;border-radius:7px}
.sback{flex:none;width:36px;height:36px;margin-left:-6px;border:0;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:var(--text);background:var(--hairline)}
.sback[hidden]{display:none}
.sback:active{transform:scale(.92)}
.frow{display:flex;align-items:center;gap:8px}
.frow .field{flex:1;min-width:0}
.frow .find-x{width:52px;height:52px}
.find.srcmode .find-ideas .idea{padding:9px 8px}

/* No arrow: Return (the keyboard's Go) makes the cast, or tap a result. A pasted link brings it back, since a link
   has to be fetched and read before it can become a cast. */
.find.srcmode:not(.haslink) .field>.go{display:none}
.find.srcmode:not(.haslink) .field{padding-right:18px}
.find.srcmode.haslink .field>.go{animation:sgoin .42s cubic-bezier(.3,1.15,.45,1)}
@keyframes sgoin{from{opacity:0;transform:scale(.4);filter:blur(4px)}}

/* ---- One search field (docs/wikicasts-structure-build-plan.md): New cast's field is Home's and Your casts' (truffle.css
   .ask, .lfind): the flat hairline fill, a 15 px magnifier, 52 px tall, 16 px text. */
.find.srcmode .field{position:relative;overflow:hidden;display:flex;align-items:center;gap:10px;height:52px;padding:0 6px 0 18px;border:0;color:var(--muted);
  background:var(--hairline);box-shadow:inset 0 0 0 .5px rgba(255,255,255,.08);backdrop-filter:none;-webkit-backdrop-filter:none}
.find.srcmode .field .fmag{flex:none}
.find.srcmode .field input{padding-left:0;font-size:16px}
:root[data-theme="light"] .find.srcmode .field{box-shadow:none}

/* ---- results: no boxes. Each source opens with a small glass pill (icon, name, arrow) that shows its full list;
   its results run below as open rows, the picture under a lens and the title. */
.sgrp{display:block}
.rrow.h{padding-top:34px}
.sgrp:first-child .rrow.h:first-child{padding-top:0}
.sgrp:first-child{margin-top:6px}
/* Between sources: a hairline and room, so each source reads as its own group. */
.sgrp+.sgrp{position:relative}
.sgrp+.sgrp::before{content:"";position:absolute;left:8px;right:8px;top:16px;height:1px;background:var(--hairline)}
.sgh{margin:0;padding:6px 8px;font-size:13px;font-weight:600;color:var(--muted)}
.spill{display:inline-flex;align-items:center;gap:10px;margin:0 0 4px 4px;padding:6px 0;border:0;background:none;cursor:pointer;
  color:var(--text);font-family:inherit;font-weight:700;font-size:18px;line-height:1;letter-spacing:-.02em}
.spill:active{opacity:.6}
.spill .sico{width:24px;height:24px;border-radius:7px}
.spill .sico.w{font-size:13px}
/* With Narration, Wikipedia's heading notes the ten-minute limit and each article shows how much is read. */
.tpills{display:flex;flex-wrap:wrap;gap:8px;padding:0 2px}
.tpill{animation:none;max-width:100%}
.tpill .ct{overflow:hidden;text-overflow:ellipsis}
.tpill.free{padding-left:5px}
.tpill .ficon{position:relative;z-index:2;flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--hairline);color:var(--text-2)}
.stories{display:flex;flex-direction:column;gap:2px}
.sug.grow{align-items:center;gap:12px;height:auto;min-height:56px;padding:10px 6px}
.slens{position:relative;flex:none;width:34px;height:34px}
.slens .lens{inset:0;font-size:34px;box-shadow:var(--shadow-lens)}
.sug.grow .a{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:15px;line-height:1.32;color:var(--text-2);font-weight:400}
.sug.grow .a b{font-weight:600;color:var(--text)}
.sug.grow .d{margin-top:3px}
.sug .chev{flex:none;color:var(--muted);display:grid;place-items:center;padding-right:4px}
.sug .w .sico{width:20px;height:20px}
.sug.quiet{cursor:default;font-size:14px;color:var(--muted);padding:10px 10px 8px}
.sug.quiet:hover{background:none}
.sug.dim .a,.sug.dim .slens{opacity:.45}
.sug .spin{width:16px;height:16px;flex:none;align-self:center;border-radius:50%;border:2px solid var(--hairline);border-top-color:var(--text-2);opacity:0}
.sug.busy .spin{opacity:1;animation:sspin .8s linear infinite}
@keyframes sspin{to{transform:rotate(360deg)}}
.nnote{margin:2px 8px 10px;font-size:13.5px;line-height:1.45;color:var(--text-2)}

/* Source chips (used by Catch Me Up's setup) and source icons. */
.src{flex:none;display:flex;align-items:center;gap:6px;height:30px;padding:0 12px 0 10px;border:0;border-radius:var(--radius-pill);cursor:pointer;
  background:var(--hairline);color:var(--text-2);font-family:inherit;font-weight:500;font-size:13px;line-height:1;transition:background .2s,color .2s,transform .2s var(--ease-settle)}
.src[aria-pressed="true"]{background:var(--glass-lit);color:var(--text);box-shadow:var(--shadow-puck,0 1px 4px rgba(0,0,0,.25))}
.src:active{transform:scale(.95)}
.sico{width:16px;height:16px;border-radius:4px;flex:none;object-fit:cover;display:inline-grid;place-items:center}
.sico.w,.sico.txt{font:600 11px Georgia,"Times New Roman",serif;color:var(--text-2);background:var(--hairline);border-radius:50%}
.sico.txt{font-family:inherit;font-size:10px}
.sico.sm{width:14px;height:14px}

/* A short note in place, under the row it is about. */
.snote{padding:0 8px 12px 52px;animation:snote .3s var(--ease-settle)}
.snote p{margin:0 0 8px;font-size:13.5px;line-height:1.45;color:var(--text-2)}
.snote .kept{margin:0}
/* Paywall: one card in the link card's material, in a story's place or as a pasted link's card: the title, the
   warning with the amber mark, then the choice. Make it anyway is the white button (the arrow's ready state); Cancel
   is quiet text. */
.spay{display:grid;gap:8px;margin:2px 0 6px;padding:14px 14px 10px 16px;border-radius:22px;background:var(--hairline);animation:slkin .42s cubic-bezier(.2,.9,.25,1)}
.spay-head{display:flex;align-items:center;gap:12px}
.spay-link .slk-lens,.spay-link .slk-lens>.lens{width:46px;height:46px}
.spay-link .slk-logo,.spay-link .slk-logo .sico{width:42px;height:42px}
/* A logo that failed to load leaves nothing behind. */
.spay-head .slk-lens:has(.slk-logo:empty){display:none}
.spay-t{min-width:0;font-size:16px;font-weight:600;line-height:1.3;letter-spacing:-.01em;color:var(--text);text-wrap:pretty}
.spay-w{display:flex;align-items:flex-start;gap:7px;margin:0;font-size:13.5px;line-height:1.42;color:var(--text-2)}
.spay-w .slk-warn{margin:1px 0 0}
.spay-acts{display:flex;align-items:center;justify-content:flex-end;gap:2px;margin-top:2px}
.spay-acts button{height:34px;padding:0 14px;border:0;border-radius:var(--radius-pill);font:inherit;font-size:14px;font-weight:600;letter-spacing:-.01em;cursor:pointer}
.spay-no{background:none;color:var(--text-2)}
.spay-yes{background:#fff;color:var(--ground)}
.spay-acts button:active{transform:scale(.96)}
.spay-acts button:focus-visible{outline:2px solid var(--text);outline-offset:2px}
:root[data-theme="light"] .spay{background:rgba(255,255,255,.62);box-shadow:0 1px 2px rgba(30,28,40,.06),0 6px 18px rgba(30,28,40,.06)}
:root[data-theme="light"] .spay-yes{background:var(--ink);color:#fff}
@media(prefers-reduced-motion:reduce){.spay{animation:none}}
@keyframes snote{from{opacity:0;transform:translateY(-4px)}}
.srcmenu .srow.off .slabel{color:var(--muted)}

/* Where a cast came from, and its format, under the player's title. (Library rows: truffle.css, .lw and .lfmt.) */
.ncap{display:flex;align-items:center;justify-content:center;gap:6px;margin:8px 0 0;font-size:13px;font-weight:500;color:var(--muted)}
.ncap[hidden]{display:none}
.ncap img{width:16px;height:16px;border-radius:5px;object-fit:contain;background:var(--publisher-logo-paper)}


/* The two-stop capsule (Settings' segmented glass with a sliding puck), still used by Library's filter and
   Catch Me Up's time. */
.fmt{position:relative;flex:none;display:flex;padding:3px;border-radius:var(--radius-pill);background:var(--slot);box-shadow:inset 0 1px 3px rgba(0,0,0,.35)}
.fmt button{position:relative;z-index:1;height:28px;padding:0 11px;border:0;border-radius:var(--radius-pill);background:none;cursor:pointer;
  font-family:inherit;font-weight:600;font-size:12.5px;line-height:1;color:var(--text-2);transition:color .25s}
.fmt button[aria-checked="true"]{color:var(--text)}
.fmt .fpuck{position:absolute;left:3px;top:3px;height:28px;border-radius:var(--radius-pill);background:var(--glass-lit);box-shadow:var(--shadow-puck);
  transition:transform .42s var(--ease-settle),width .42s var(--ease-settle)}

/* ---- More sources above: a small glass stack of the icons of sources scrolled out of sight, hanging at the top of the
   results. It takes no room, so the list never jumps when it comes and goes. */
/* ---- All sources: every source by subject. Each row is the source's icon in the lens spot, its name and its newest
   headline. The way in, at the top of the default view, is a quiet line like the one under the title. */
.ssrc .slens .sico{width:34px;height:34px;border-radius:10px}
.ssrc .slens .sico.w,.ssrc .slens .sico.txt{font-size:16px;border-radius:50%}
.ssrc .a{-webkit-line-clamp:1!important}
.ssrc .d{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sall{display:inline-flex;align-items:center;gap:8px;margin:0 0 4px 4px;padding:6px 0;border:0;background:none;cursor:pointer;
  color:var(--muted);font-family:inherit;font-size:14px;font-weight:500}
.sall .sico{width:18px;height:18px;border-radius:5px;display:grid}
.sall span{margin-left:2px}
.sall:active{opacity:.6}
.find.attop .sbody{--sfade-t:0px}
.find.atend .sbody{--sfade-b:0px}
/* A picture the lens renderer could not shade (its site blocks it) still sits in a circle. */
.slens .lens{overflow:hidden}
.slens .lens img{border-radius:50%;object-fit:cover}

.ssrc{min-height:52px!important}
.stcol>#findLabel{grid-column:2}
.stcol:not(:has(.hico))>#findLabel{grid-column:1/-1}
/* Logos drawn on transparency (Variety's black V, NPR's letters) vanish on dark, so every source logo sits on a light tile. */
img.sico{background:#fff}

/* ---- header: the sources capsule (right of the title) and the breadcrumb (before it). Slim and quiet: a faint fill
   and hairline, no heavy glass, so the title stays the loudest thing. Logos sit in small round lenses on a light ground,
   overlapping like the library's artwork trio. */
.stcol{flex:1;min-width:0;display:flex;align-items:center;gap:8px}
.scap,.strail{position:relative;isolation:isolate;flex:none;height:44px;border-radius:22px;border:0;color:var(--text-2);overflow:hidden;
  /* Small-control glass, after Liquid Glass: light falls from above (a brighter top fading down), a thin bright line
     where the top edge catches it, a faint lift at the bottom edge, strong blur and colour from what is behind, and a
     soft shadow. No outline and no corner rims. */
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.04) 60%,rgba(255,255,255,.07));
  backdrop-filter:blur(22px) saturate(1.9) brightness(1.08);-webkit-backdrop-filter:blur(22px) saturate(1.9) brightness(1.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 -1px 0 rgba(255,255,255,.05),0 8px 22px rgba(0,0,0,.38),0 1px 2px rgba(0,0,0,.3)}
/* A soft glow across the top half, as light pooling in the curve of the glass. */
.scap::after,.strail::after{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit;pointer-events:none;
  background:radial-gradient(120% 70% at 50% -10%,rgba(255,255,255,.14),transparent 65%)}
.scap{display:flex;align-items:center;justify-content:flex-start;gap:6px;padding:0 12px 0 9px;cursor:pointer;white-space:nowrap}
.scap[hidden],.strail[hidden]{display:none}
.scap:active,.strail button:active{opacity:.6}
.slset{grid-area:1/1;display:flex;align-items:center;gap:6px}
.slset>svg{flex:none}
.scount{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;margin-left:2px;margin-right:-2px}
.strio{display:flex}
.slogo{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;object-fit:cover;background:#fff;box-shadow:0 0 0 1.5px rgba(0,0,0,.5)}
.slogo+.slogo{margin-left:-6px}
.slogo.w{border-radius:7px;background:var(--hairline);color:var(--text-2);font:600 10px Georgia,"Times New Roman",serif}
.strail{display:flex;align-items:center;margin-left:-2px;border:0}
.strail button{display:flex;align-items:center;gap:7px;height:44px;padding:0 12px 0 14px;border:0;background:none;color:inherit;cursor:pointer}
.strail button svg{flex:none;width:7px;height:12px}
.strail.solo{width:44px}
.strail.solo button{width:44px;padding:0;justify-content:center}
/* Phones: two lenses, so the title keeps its full width. */
@media(max-width:420px){.scap{gap:5px;padding:0 10px 0 8px}}
/* Publisher stories: no picture, just the title. */
.sug.grow.nolens{min-height:48px}

/* ==== Light theme. Every floating control (the + button, close, the sources capsule, the breadcrumb, the search bar)
   wears the same light glass as the menu capsule and the player bar: Truffle's --glass-fill, --glass and --glass-blur,
   with its soft top-left sheen and no dark shadows. Selection is a raised white bead (--bead), as on the menu capsule,
   instead of the white glow used in dark. */
:root[data-theme="light"] .sorb,:root[data-theme="light"] .gear,
:root[data-theme="light"] .find.srcmode .find-head .find-x,
:root[data-theme="light"] .scap,:root[data-theme="light"] .strail{
  border:0;color:var(--ink);background:var(--glass-fill);box-shadow:var(--glass);backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur)}
:root[data-theme="light"] .sorb svg,:root[data-theme="light"] .gear svg,:root[data-theme="light"] .find.srcmode .find-head .find-x svg{filter:none}
:root[data-theme="light"] .sorb::after,:root[data-theme="light"] .gear::after,:root[data-theme="light"] .scap::after,:root[data-theme="light"] .strail::after{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit;pointer-events:none;filter:blur(5px);
  background:radial-gradient(70% 90% at 22% 0%,rgba(255,255,255,.75),transparent 60%),linear-gradient(135deg,transparent 70%,rgba(255,255,255,.5))}
/* Desktop: while search is open the + (now ×) is the lit one, a white bead. */
@media(min-width:960px){:root[data-theme="light"] body.finding .sorb{color:var(--ink);background:linear-gradient(160deg,#fff,rgba(255,255,255,.82));box-shadow:var(--bead)}}
/* Phone: a pale wash of the page's own ground behind the panel. */
@media(max-width:959px){
  :root[data-theme="light"] .sv-open .find.srcmode::before{background:color-mix(in srgb,var(--page-background) 80%,transparent);backdrop-filter:blur(26px) saturate(1.2);-webkit-backdrop-filter:blur(26px) saturate(1.2)}
}
/* Capsule contents and logos: the count in the muted ink; logos ringed in white with a hairline, so they separate
   from each other and from the white glass. */
:root[data-theme="light"] .scap,:root[data-theme="light"] .strail{color:var(--muted)}
:root[data-theme="light"] .strail button{color:var(--icon)}
:root[data-theme="light"] .slogo{box-shadow:0 0 0 1.5px #fff,0 0 0 2px rgba(22,24,34,.1),0 1px 2px rgba(30,28,40,.08)}
:root[data-theme="light"] img.sico{box-shadow:inset 0 0 0 .5px rgba(22,24,34,.1)}
/* Results: titles in the light theme's second text colour, matches in ink. */
:root[data-theme="light"] .sug.grow .a{color:var(--text-2)}
:root[data-theme="light"] .sug.grow .a b{color:var(--ink)}
:root[data-theme="light"] .sgrp+.sgrp::before{background:var(--edge)}

/* ==== Source logos: plain circles, not lenses. The whole logo fits inside, with room for the circle's curve (a square
   fits a circle at about 70% of its width), on the background colour read from the logo's edge (set in sources.js). */
img.sico,img.slogo{box-sizing:border-box;border-radius:50%!important;object-fit:contain!important;background:#fff}
.spill img.sico,.find-head .hico img.sico{padding:3.5px}
.ssrc .slens img.sico{padding:5px}
.slogo{padding:3px}
.spill .sico.w,.ssrc .sico.w,.slogo.w{border-radius:50%!important}
:root[data-theme="light"] img.sico{box-shadow:inset 0 0 0 .5px rgba(22,24,34,.08)}
/* Overlapping logos: a real see-through bite where the next logo sits, instead of a painted ring.
   Next logo's centre is 16px right (22px - 6px overlap) → 27px from this one's left; 1.5px gap. */
.strio .slogo,:root[data-theme="light"] .strio .slogo{box-shadow:none}
.strio .slogo{-webkit-mask:radial-gradient(circle at 27px 50%,transparent var(--cut),#000 calc(var(--cut) + .5px));mask:radial-gradient(circle at 27px 50%,transparent var(--cut),#000 calc(var(--cut) + .5px))}

/* ==== Every floating × and ‹ wears the breadcrumb's glass: search close, Catch me up close, Hosts' back to Settings
   and, on desktop, the + while it is ×. (Controls that sit inside other glass, the player bar's close and the
   library field's clear, stay plain: glass on glass reads muddy.) Same light-from-above fill, top catch-light, blur, soft shadow and top glow; no outline. */
.find.srcmode .find-head .find-x,.cmu .find-head .find-x,.hhead .hback{position:relative}
.hhead{gap:10px;padding-left:8px}
.hhead .hback{width:36px;height:36px;border-radius:50%;color:var(--text-2)}
.hhead .hback svg{width:8px;height:14px;margin-left:-1px}
.find.srcmode .find-head .find-x,.cmu .find-head .find-x,.hhead .hback,body.finding .sorb{isolation:isolate;overflow:hidden;border:0;color:var(--text-2);
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.04) 60%,rgba(255,255,255,.07));
  backdrop-filter:blur(22px) saturate(1.9) brightness(1.08);-webkit-backdrop-filter:blur(22px) saturate(1.9) brightness(1.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 -1px 0 rgba(255,255,255,.05),0 8px 22px rgba(0,0,0,.38),0 1px 2px rgba(0,0,0,.3)}
.find.srcmode .find-head .find-x::after,.cmu .find-head .find-x::after,.hhead .hback::after,body.finding .sorb::after{content:"";position:absolute;inset:0;z-index:2;border-radius:inherit;pointer-events:none;
  background:radial-gradient(120% 70% at 50% -10%,rgba(255,255,255,.14),transparent 65%)}
.find.srcmode .find-head .find-x svg,.cmu .find-head .find-x svg,body.finding .sorb svg{filter:none}
.cmu .find-head .find-x:hover{background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.07) 60%,rgba(255,255,255,.1))}
@media(min-width:960px){body.finding .sorb{color:var(--text)}}
:root[data-theme="light"] .find.srcmode .find-head .find-x,:root[data-theme="light"] .cmu .find-head .find-x,:root[data-theme="light"] .hhead .hback,:root[data-theme="light"] body.finding .sorb{
  color:var(--ink);background:var(--glass-fill);box-shadow:var(--glass);backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur)}
:root[data-theme="light"] .find.srcmode .find-head .find-x::after,:root[data-theme="light"] .cmu .find-head .find-x::after,:root[data-theme="light"] .hhead .hback::after,:root[data-theme="light"] body.finding .sorb::after{filter:blur(5px);
  background:radial-gradient(70% 90% at 22% 0%,rgba(255,255,255,.75),transparent 60%),linear-gradient(135deg,transparent 70%,rgba(255,255,255,.5))}

/* ==== Motion parts (see "Motion" in sources.js). */
/* The bite grows and closes as a neighbour arrives or leaves, rather than snapping. */
@property --cut{syntax:'<length>';inherits:false;initial-value:0px}
.strio{position:relative;isolation:isolate}
.strio .slogo{position:relative;z-index:1;--cut:0px;transition:--cut .4s cubic-bezier(.2,.9,.25,1)}
.strio .slogo.cut{--cut:12.5px}
/* A logo on its way out leaves the row (so the others can close up) and shrinks away beneath them. */
.strio .slogo.gone{position:absolute;top:0;margin:0!important;z-index:0;pointer-events:none}
/* The count: digits share one cell, so the old one can roll out as the new one rolls in. With no count, it takes no
   room (the margin cancels its gap). */
.scap .scount{position:relative;display:inline-grid;margin:0 -2px 0 2px}
.scap:not(.up) .scount{margin:0 0 0 -6px}
.scap .scount b{grid-area:1/1;font:inherit}
.scap .scount b.gone{position:absolute;left:0;top:0}
/* One chevron: it points right to All sources, and turns to point up while sources are out of sight above. */
.scap .sarrow{flex:none;transition:rotate .45s cubic-bezier(.3,.7,.4,1.3)}
.scap.up .sarrow{rotate:-90deg}
/* Copies used while moving between views: the page being left, the old title, the logo flying back to its row. */
.sghost{position:absolute;z-index:3;margin:0;pointer-events:none}
.sbody{overflow-x:hidden}
.stcol{position:relative}
.sttl-ghost{position:absolute;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.sico-ghost{position:absolute;z-index:7;display:grid;place-items:center;pointer-events:none;transform-origin:0 0}
.sico-ghost .sico{width:100%;height:100%;box-sizing:border-box}
.sico-ghost img.sico{padding:3.5px}

/* ==== Pasted links (see "Pasted links" in sources.js). */
/* The app hides its lists while it reads a link itself; ours holds the link's card, so it stays. */
.find.srcmode.linking .srclist.on{display:block}
/* The chip in the field: the publisher's logo, the site in bold, the rest of the address faded, and a clear button.
   The address itself sits hidden behind it (still focused, so Return works) until you tap the chip to edit. */
.field.chipped input{position:absolute;left:0;width:1px;opacity:0;pointer-events:none}
.slchip{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:34px;padding:0 4px 0 2px;cursor:text;animation:slcin .36s cubic-bezier(.2,.9,.25,1)}
.slchip[hidden]{display:none}
@keyframes slcin{from{opacity:0;transform:translateY(4px);filter:blur(3px)}}
.slc-ico{flex:none;width:24px;height:24px;display:grid;place-items:center;color:var(--muted)}
.slc-ico .sico{width:24px;height:24px}
.slc-ico img.sico{padding:3px}
.slc-tx{flex:1;min-width:0;display:flex;align-items:baseline;white-space:nowrap;overflow:hidden;font-size:16px;
  -webkit-mask:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
.slc-tx b{flex:none;font-weight:600;color:var(--text)}
.slc-p{min-width:0;overflow:hidden;color:var(--muted)}
.slc-x{flex:none;width:24px;height:24px;border:0;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:var(--text-2);background:var(--hairline)}
.slc-x:active{transform:scale(.9)}
/* Reading: a soft light passes along the address. */
.slchip.working .slc-tx{background:linear-gradient(90deg,transparent 0,rgba(255,255,255,.22) 50%,transparent 100%) -60% 0/40% 100% no-repeat;animation:slcsweep 1.4s linear infinite}
@keyframes slcsweep{to{background-position:160% 0}}
.slchip.bad .slc-tx b{color:var(--warn)}
/* The card. */
.slink{display:flex;align-items:center;gap:14px;width:100%;margin:2px 0 6px;padding:14px 14px 14px 12px;border:0;border-radius:22px;text-align:left;font:inherit;color:inherit;cursor:pointer;
  position:relative;overflow:hidden;background:var(--hairline)}
.slink.fresh{animation:slkin .42s cubic-bezier(.2,.9,.25,1)}
@keyframes slkin{from{opacity:0;transform:translateY(8px)}}
.slink:active{transform:scale(.985)}
.slk-lens{flex:none;width:58px;height:58px;display:grid;place-items:center}
.slk-lens>.lens{width:58px;height:58px}
.slk-logo{width:52px;height:52px;display:grid;place-items:center;color:var(--muted)}
.slk-logo .sico{width:52px;height:52px}
.slk-logo img.sico{padding:8px}
.slk-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.slk-src{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden}
.slk-src .sico{width:16px;height:16px;flex:none}
.slk-src img.sico{padding:2px}
.slk-src b{font-weight:600;color:var(--text-2)}
.slk-src i{font-style:normal;overflow:hidden;text-overflow:ellipsis}
.slk-src i::before{content:"·";margin-right:6px}
.slk-t{font-size:16px;line-height:1.3;font-weight:600;color:var(--text);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.slk-st{display:flex;align-items:center;gap:6px;font-size:13px;line-height:1.35;color:var(--muted)}
/* Looking: the title is two soft bars. */
.slk-sk{display:block;height:12px;margin:3px 0;border-radius:6px;width:92%;background:linear-gradient(90deg,var(--hairline),rgba(255,255,255,.14),var(--hairline)) 0 0/200% 100%;animation:slksk 1.3s ease-in-out infinite}
.slk-sk.s2{width:58%}
@keyframes slksk{to{background-position:-200% 0}}
/* Reading: a slow light crosses the card, and the line under the title changes as it goes. */
.slink.s-resolving::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.08) 50%,transparent 70%) -100% 0/60% 100% no-repeat;animation:slkread 1.8s cubic-bezier(.4,0,.6,1) infinite}
@keyframes slkread{to{background-position:220% 0}}
.slink.s-resolving .slk-st{animation:slkst .4s ease-out}
@keyframes slkst{from{opacity:0;transform:translateY(3px)}}
.slink.s-done .slk-st{color:var(--text-2)}
.slink.s-done .slk-st svg{flex:none;width:16px;height:16px;padding:2px;border-radius:50%;color:var(--ground,#000);background:var(--text);animation:slktick .42s cubic-bezier(.3,.7,.4,1.4)}
@keyframes slktick{from{transform:scale(.3);opacity:0}}
/* Something went wrong: the same card, full width, with a small amber mark before the headline (no icon column),
   and one plain line of why. No buttons. */
.slink.s-error{cursor:default;padding:14px 16px}
.slink.s-error:active{transform:none}
.slk-warn{display:inline-grid;vertical-align:-2px;margin-right:7px;color:var(--warn)}
.slink.s-error .slk-st{display:block;color:var(--text-2)}
:root[data-theme="light"] .slink{background:rgba(255,255,255,.62);box-shadow:0 1px 2px rgba(30,28,40,.06),0 6px 18px rgba(30,28,40,.06)}
:root[data-theme="light"] .slk-sk{background:linear-gradient(90deg,rgba(22,24,34,.06),rgba(22,24,34,.12),rgba(22,24,34,.06)) 0 0/200% 100%}
:root[data-theme="light"] .slink.s-resolving::after{background-image:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.7) 50%,transparent 70%)}
:root[data-theme="light"] .slchip.working .slc-tx{background-image:linear-gradient(90deg,transparent 0,rgba(22,24,34,.08) 50%,transparent 100%)}
:root[data-theme="light"] .slk-warn path,:root[data-theme="light"] .slk-warn circle+circle{stroke:#fff;fill:#fff}
:root[data-theme="light"] .slink.s-done .slk-st svg{color:#fff;background:var(--ink)}
@media(prefers-reduced-motion:reduce){.slchip,.slink,.slk-sk,.slink.s-resolving::after,.slchip.working .slc-tx{animation:none}}
