/* ─────────────────────────────────────────────────────────────
   Content Saver — Portrait, one-to-one
   Tokens, type, components and layout measured from portrait.so
   (portrait.so/_next css + the supplied DESIGN.md). Only the copy
   and imagery are ours.
   ───────────────────────────────────────────────────────────── */
@font-face { font-family: 'Junicode'; src: url('assets/fonts/junicode-semibold-italic.woff2') format('woff2'); font-style: italic; font-weight: 600; font-display: swap; }

:root {
  /* inks + neutrals */
  --ink: #08304c;            /* brand-blue-1000 */
  --teal: #084e72;           /* brand-blue-900 */
  --g10: #f7f7f7; --g50: #dedede; --g100: #c7c7c7; --g200: #9f9f9f; --g300: #797979; --g400: #585858; --g600: #353535; --g700: #2c2c2c;
  /* washes */
  --b50: #eff9ff; --b100: #dff3ff; --b500: #06acf1; --b600: #0289ce; --b700: #036ea7;
  --mint: #d7ffe2; --sky: #e8f1ff; --peach: #ffebd6;
  --soft: rgba(8, 48, 76, .65);
  --rainbow: linear-gradient(90deg, #26c0ff, #e600c2 20%, #ff494e 40%, #ffa13e 60%, #ffc837 80%, #00cc3d);
  /* type */
  --text: 'Switzer', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Basier Circle', 'General Sans', 'Switzer', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Junicode', 'Times New Roman', serif;
  /* shadows (all layers capped at 8%) */
  --sh-sm: 0 16px 16px -8px #00000008, 0 10px 10px -5px #00000008, 0 5px 5px -2.5px #00000008, 0 3px 3px -1.5px #00000008, 0 2px 2px -1px #00000008, 0 1px 1px -.5px #00000008;
  --sh-md: 0 20px 20px -10px #00000012, 0 10px 10px -5px #0000000d, 0 5px 5px -2.5px #00000008, 0 3px 3px -1.5px #00000008, 0 2px 2px -1px #00000008, 0 1px 1px -.5px #00000008;
  --sh-lg: 0 28px 28px -14px #0000000f, 0 16px 16px -8px #0000000d, 0 8px 8px -4px #0000000a, 0 5px 5px -2.5px #0000000a, 0 3px 3px -1.5px #0000000a, 0 1px 1px -.5px #00000008;
  --ring: 0 0 0 1px rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.26, .08, .25, 1);
  --pop: cubic-bezier(.22, 1, .36, 1);
  /* legacy tokens used by the demo widgets */
  --hair: 0 0 0 1px rgba(0, 0, 0, .07);
  --float: var(--sh-sm);
  --lift: var(--sh-md);
  --cream: #f7f7f7; --sand: #f3f3f3; --stone: #f1f1f1; --mist: #eee; --ash: #dedede; --body: #2c2c2c;
}

html { scroll-behavior: smooth; }
body { background: var(--g10); color: var(--g600); font-family: var(--text); font-size: 16px; line-height: 24px; letter-spacing: normal; -webkit-font-smoothing: antialiased; }
::selection { background: var(--b100); color: var(--ink); }
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 32px; }
@media (min-width: 768px) { .container { padding-inline: 48px; } }
@media (min-width: 1280px) { .container { padding-inline: 64px; } }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 12px; }
svg { display: block; }

/* reveal (calmer than before) */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

/* ── type ─────────────────────────────────────────────── */
.pt-h3.big { font-size: clamp(1.802rem, 1.313rem + 2.1734vw, 3.0518rem); line-height: 1.04; letter-spacing: -.032em; }
.pt-h2.sm { font-size: clamp(1.6018rem, 1.2733rem + 1.4602vw, 2.4414rem); line-height: 1.08; letter-spacing: -.0256em; }

/* ── buttons ──────────────────────────────────────────── */
.rb { display: inline-flex; border-radius: 9999px; outline: none; }
.rb-i {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; padding: 0 16px; border-radius: 9999px; white-space: nowrap;
  font-weight: 540; font-size: 16px; line-height: 1; color: var(--g700); background: #fff; box-shadow: var(--sh-sm);
  border: 1px solid; border-color: var(--g50) var(--g50) transparent var(--g50); transition: box-shadow .3s, border-color .3s;
}
.rb:hover .rb-i { box-shadow: var(--sh-lg); border-color: var(--g100) var(--g100) transparent var(--g100); }

/* ── nav ──────────────────────────────────────────────── */
.pt-brand img.brand-mark { height: 26px; }
.pt-brand.big img.brand-mark { height: 32px; }
.pt-brand.big { font-size: 22px; }

/* ═════════ HERO + board (scroll story) ═════════ */

/* hero copy is in flow, so the board always starts below it (and still peeks into the first screen when there is room) */


/* the board — bezel + white card (portrait.so) */
/* the board sits in normal flow, below the hero copy; the page scrolls it into view */

/* flying cards: plain photos, 24px radius, 1px hairline, no polaroid frame */

/* item actions toolbar — shown on hover once the board is ordered */

/* ── floating collections pill ────────────────────────── */

/* folder illustration (our wallet) */
.folder-art { --w: 300px; }
.folder-hero .folder-art { margin-inline: auto; filter: drop-shadow(0 22px 22px rgba(8, 48, 76, .14)); }

/* ═════════ SHOWCASE (wallet dome) ═════════ */

/* ═════════ FEATURE ROWS ═════════ */
.bbar .url { border-radius: 9999px; }
.save-badge.press { background: #202020; }

/* themes */

/* mock inner pieces */
.pill { box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); color: var(--g700); background: #fff; }
.pill.on { background: var(--g700); color: #fff; box-shadow: none; }
@keyframes tg { 0%, 30% { transform: none; } 45%, 85% { transform: translateX(12px); } 100% { transform: none; } }

/* ═════════ PACKS + carousel ═════════ */
.car { display: flex; gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 20px max(24px, calc(50% - 392px)) 40px; scroll-padding-inline: max(24px, calc(50% - 392px)); outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 calc(50% - 480px), #000 calc(50% + 480px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 calc(50% - 480px), #000 calc(50% + 480px), transparent 100%); }
.car::-webkit-scrollbar { display: none; }
.slide { flex: none; width: 784px; max-width: calc(100vw - 48px); height: 380px; scroll-snap-align: center; display: grid; grid-template-columns: 1fr 1.05fr; border-radius: 32px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), var(--sh-lg); overflow: hidden; }
.vid img { width: 100%; height: 100%; object-fit: cover; }
@keyframes hlt { 0%, 14% { background: transparent; } 20%, 90% { background: var(--b100); } 98%, 100% { background: transparent; } }
.arow { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); border-radius: 16px; padding: 12px 14px; color: var(--g700); }
.arow:hover, .arow.hl { background: var(--b50); transform: translateX(3px); }
.arow b { font-size: 15px; font-weight: 540; color: var(--g700); }
.arow span { font-size: 12.5px; color: var(--g300); }

/* ═════════ FEATURE TABS (save · capture · send) ═════════ */
.ft-pause[aria-pressed="true"] .ic-pause { display: none; }
.ft-pause[aria-pressed="true"] .ic-play { display: block; }
.feature .panel-in:not(.wide) { width: min(420px, calc(100% - 56px)); }
@media (max-width: 700px) {
  .feature .msg.a { display: none; }
}
.pit.sel .ck { background: var(--g700); }
.pit .hint { background: rgba(44, 44, 44, .85); }
.dots i.on { background: #00cc3d; }

/* ═════════ CONSTELLATION ═════════ */
@keyframes bob { 50% { translate: 0 -12px; } }
/* ═════════ FAQ + footer ═════════ */
.foot { padding-block: 0 56px; background: var(--g10); }
.foot h5 { margin: 0; font-size: 16px; font-weight: 540; color: var(--g700); }

/* global toast */

/* ═════════ static mode (phones, tablets, reduced motion) ═════════ */

@media (max-width: 1100px) {
  .slide { grid-template-columns: 1fr; height: auto; }
}
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

.wallet-art .fa-cards img { opacity: 0; }
.wallet-art.rise .fa-cards img { animation: rise 1.4s var(--pop) both; animation-delay: calc(.3s + var(--i) * .14s); }

.rbw { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1, "liga" 0; }

/* mobile nav + tap-to-reveal item actions */
@media (max-width: 480px) { .pt-brand span { display: none; } }

.folder-hero .folder-art, .wallet-art .folder-art { width: min(var(--w), calc(100vw - 72px)); }
.bbar .url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 26px; }
html, body { overflow-x: clip; }

/* ═════════ matched to the real extension UI ═════════ */
:root { --or: #ea580c; }

/* type badges on saved images (dark chip, bottom-left) */

/* image-hover mascot (row 1) */
.save-badge.mas { top: 12px; left: 12px; width: 44px; height: 44px; padding: 0; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), var(--sh-md); display: grid; place-items: center; }
.save-badge.mas img { width: 30px; height: 30px; object-fit: contain; }
.save-badge.mas.press { background: #fff6ee; transform: scale(.94); }
.mmenu.on { opacity: 1; transform: none; }
.mmenu .mi.hl { background: #f1f1f1; }
.picker .row.hl { background: #f1f1f1; }

/* save / download buttons */

/* row 3: dashboard */

/* carousel: Page Media panel */

/* carousel: Clip menu (popup) */

/* carousel: Edit mode */
@keyframes edcrop { 0%, 12% { inset: 8% 8% 8% 8%; } 55%, 85% { left: 22%; right: 22%; top: 24%; bottom: 20%; } 100% { inset: 8% 8% 8% 8%; } }

/* paste-queue widget, as in the real extension */
.queue #qthumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.queue.off { opacity: 0; transform: translateY(14px) scale(.96); pointer-events: none; }
.queue #qthumb.swap { animation: q-swap .5s var(--ease); }
@keyframes q-swap { from { opacity: 0; transform: translateY(10px) scale(.85); } }
.ai-cursor.on { opacity: 1; }
#copyBtn.press { transform: scale(.92); background: var(--color-mist-hairline); }
#sendBtn { transition: transform .15s; }
#sendBtn.press { transform: scale(.86); }
.msg.out { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s var(--pop, ease); }
.msg.out.on { opacity: 1; transform: none; }
.msg.out img { display: block; width: 96px; height: 96px; border-radius: 12px; object-fit: cover; }
.att { padding: 0; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; font-size: 0; background: #eee; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.att img { width: 100%; height: 100%; border-radius: 0; }


/* ═════════════════════════════════════════════════════════════
   Design-DNA conformance (Portrait): palette, type, shape, shadow.
   Everything above is overridden here so the guide has the last word.
   ═════════════════════════════════════════════════════════════ */
:root {
  /* DNA tokens, verbatim */
  --color-portrait-ink: #08304c; --color-nautical-teal: #084e72; --color-rainbow-spectrum: #26c0ff;
  --gradient-rainbow-spectrum: linear-gradient(90deg, rgb(38, 192, 255), rgb(230, 0, 194) 20%, rgb(255, 73, 78) 40%, rgb(255, 161, 62) 60%, rgb(255, 200, 55) 80%, rgb(0, 204, 61));
  --color-lavender-violet: #8e51ff; --color-cobalt-pop: #3b82f6; --color-grape-vibrant: #ad46ff; --color-cherry-red: #ff4940; --color-tangerine-warm: #ffa130; --color-sunflower-yellow: #ffc837; --color-leaf-green: #00cc3d;
  --color-charcoal-outline: #353535; --color-graphite-body: #2c2c2c; --color-slate-helper: #797979; --color-iron-quiet: #585858; --color-ash-divider: #dedede; --color-fog-edge: #c7c7c7; --color-mist-hairline: #eeeeee; --color-white-canvas: #ffffff;
  --color-mint-wash: #d7ffe2; --color-sky-wash: #e8f1ff; --color-peach-wash: #ffebd6;
  --font-switzer: 'Switzer', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-basier-circle: 'Basier Circle', 'General Sans', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --radius-nav: 28px; --radius-tags: 9999px; --radius-cards: 24px; --radius-images: 24px; --radius-inputs: 16px; --radius-buttons: 28px;
  --page-max-width: 1200px; --section-gap: 80px; --card-padding: 16px; --element-gap: 16px;
  --shadow-md: rgba(0, 0, 0, 0.03) 0px 16px 16px -8px, rgba(0, 0, 0, 0.03) 0px 10px 10px -5px, rgba(0, 0, 0, 0.03) 0px 5px 5px -2.5px, rgba(0, 0, 0, 0.03) 0px 3px 3px -1.5px, rgba(0, 0, 0, 0.03) 0px 2px 2px -1px, rgba(0, 0, 0, 0.03) 0px 1px 1px -0.5px;
  --shadow-subtle: 0 0 0 1px rgba(0, 0, 0, .08), var(--shadow-md);
  --shadow-subtle-2: 0 0 0 1px rgba(0, 0, 0, .04), var(--shadow-md);
  --shadow-subtle-3: 0 0 0 1px rgba(0, 0, 0, .06), rgba(0, 0, 0, 0.07) 0px 20px 20px -10px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px, rgba(0, 0, 0, 0.03) 0px 5px 5px -2.5px, rgba(0, 0, 0, 0.03) 0px 3px 3px -1.5px, rgba(0, 0, 0, 0.03) 0px 2px 2px -1px, rgba(0, 0, 0, 0.03) 0px 1px 1px -0.5px;
  --shadow-subtle-5: 0 0 0 1px rgba(0, 0, 0, .1);
  /* the working aliases the page was built with, now pointing at the DNA */
  --ink: var(--color-portrait-ink); --teal: var(--color-nautical-teal);
  --g10: #fff; --g50: var(--color-ash-divider); --g100: var(--color-fog-edge); --g200: var(--color-slate-helper); --g300: var(--color-slate-helper);
  --g400: var(--color-iron-quiet); --g600: var(--color-charcoal-outline); --g700: var(--color-graphite-body);
  --b50: var(--color-sky-wash); --b100: var(--color-sky-wash); --b500: var(--color-nautical-teal); --b600: var(--color-nautical-teal); --b700: var(--color-nautical-teal);
  --mint: var(--color-mint-wash); --sky: var(--color-sky-wash); --peach: var(--color-peach-wash); --mist: var(--color-mist-hairline);
  --soft: var(--color-portrait-ink); --body: var(--color-graphite-body);
  --cream: #fff; --sand: var(--color-mist-hairline); --stone: var(--color-mist-hairline); --ash: var(--color-ash-divider);
  --rainbow: var(--gradient-rainbow-spectrum);
  --text: var(--font-switzer); --display: var(--font-basier-circle);
  --sh-sm: var(--shadow-md); --sh-md: var(--shadow-subtle-2); --sh-lg: var(--shadow-subtle-3);
  --hair: var(--shadow-subtle-5); --float: var(--shadow-md); --lift: var(--shadow-subtle-3);
  --or: var(--color-tangerine-warm);
}

/* canvas: pure white, one continuous page */
body, .foot { background: var(--color-white-canvas); }
body { color: var(--color-portrait-ink); }
::selection { background: var(--color-sky-wash); color: var(--color-portrait-ink); }
.container { max-width: var(--page-max-width); padding-inline: 24px; }

/* buttons: rainbow-outlined pill is the only primary; secondary is ghost text */
.rb { display: inline-flex; border: 1.5px solid transparent; border-radius: var(--radius-buttons); background: linear-gradient(#fff, #fff) padding-box, var(--gradient-rainbow-spectrum) border-box; transition: box-shadow .3s; }
.rb:hover, .rb:focus-visible { box-shadow: var(--shadow-subtle-3); }
.rb-i { display: flex; align-items: center; justify-content: center; gap: 8px; height: auto; padding: 10px 18px; font: 500 16px/24px var(--font-switzer); color: var(--color-portrait-ink); background: none; border: 0; box-shadow: none; border-radius: var(--radius-buttons); white-space: nowrap; }
.rb:hover .rb-i { box-shadow: none; border: 0; }
.pill.on { background: var(--color-sky-wash); color: var(--color-portrait-ink); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.pill { color: var(--color-portrait-ink); }

/* nav: flat bar on the hero background, in the top row of the page and scrolling away with it */
.dnav-logo img { height: 32px; width: auto; }
.dnav-links a.on, .dnav.open .dnav-feat { color: var(--color-portrait-ink); }
.dnav.open .dnav-feat svg { transform: rotate(180deg); }
/* pressed: the button drops onto its lip, like Duolingo's */
/* features menu: a popover under the bar, out of the page flow */
.dnav.open .dnav-menu { opacity: 1; transform: none; visibility: visible; transition: opacity .25s, transform .4s var(--ease), visibility 0s; }

/* board: concentric 28 / 20 bezel, photo tiles at 24 with a hairline and no drop shadow */

/* collections pill: wallet teaser card, 24px */
.folder-hero .folder-art { filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .08)); }
.fa-cards img { box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }

/* sections: 80px gaps, no bands, no dividers */
.faq .container { padding-top: 0; }

/* feature panels: small pastel washes only, 24px, flat */
.mmenu .mi.hl, .picker .row.hl { background: var(--color-mist-hairline); }
.bbar .url { background: #fff; }
.arow b { color: var(--color-portrait-ink); }
.arow span { color: var(--color-slate-helper); }

/* carousel + stage surfaces */
.slide { border-radius: var(--radius-cards); box-shadow: var(--shadow-subtle); }
.arow { background: #fff; }
.arow:hover, .arow.hl { background: var(--color-sky-wash); }
@keyframes hlt { 0%, 14% { background: transparent; } 20%, 90% { background: var(--color-sky-wash); } 98%, 100% { background: transparent; } }
.pit.sel .ck { background: var(--color-graphite-body); }
.pit .hint { background: rgba(53, 53, 53, .85); }
.queue .dots i { background: rgba(255, 255, 255, .2); }
.dots i.on, .queue .dots i.on { background: #fff; }

/* integrations, steps */

/* faq + footer: hairlines, minimal links */
.foot { padding-block: 40px; }

/* shape scale: 4 / 8 / 12 / 16 / 20 / 24 / 28 */
.save-badge.mas { border-radius: 12px; }
#qthumb { border-radius: 8px; }
#sq:empty::before { color: var(--color-slate-helper); }
.pit .hint { border-radius: 4px; }
.att { border-radius: 12px; }

/* ═════════ hero copy: portrait.so spacing ═════════ */

/* ═════════ capture demo: a page in the browser + the capture toolbar ═════════ */
.cs-hero img { width: 100%; height: 190px; object-fit: cover; border-radius: 14px; display: block; }
.cs-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; background: var(--color-mist-hairline); }
.cs-maker img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; }

/* full page: the page zooms out to one stitched image */
.cs.stitched .cs-view { background: var(--color-mist-hairline); }
.cs.stitched .cs-site { transition-duration: 1s; transition-timing-function: var(--ease); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 12px 32px rgba(0, 0, 0, .12); border-radius: 18px; }
.cs.scanning .cs-scan { opacity: 1; animation: cs-scan 1.2s ease-in-out infinite alternate; }
@keyframes cs-scan { to { top: calc(100% - 3px); } }

/* visible screen: a frame around the viewport */
.cs.framed .cs-frame { opacity: 1; transform: none; }

/* select area: everything dims except the dragged rectangle */
.cs-rect.on { opacity: 1; }
.cs-rect.drag { transition: opacity .3s, width .9s var(--ease), height .9s var(--ease); }
.cs-rect.drag .cs-size { opacity: 1; }
.cs.flash .cs-flash { opacity: .9; transition: none; }
.cs.done .cs-toast { opacity: 1; transform: none; }

@media (max-width: 560px) {
  .cs-hero img { height: 150px; }
}

/* ═════════ feature tab: page media scanner ═════════ */
.pmx .bbar .ext.press { transform: scale(.82); }
.pmx-site-grid img, .pmx-it > img { width: 100%; height: 100%; object-fit: cover; }
.pmx.open .pmx-site { opacity: .4; }
.pmx.open .pmx-side { transform: none; }
.pmx-tabs button.on { color: var(--color-portrait-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--color-portrait-ink); }
.pmx-tabs button.press { transform: scale(.94); }
.pmx-pane.on { opacity: 1; visibility: visible; transition: opacity .3s; }
.pmx.open .pmx-it { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 60ms + 250ms), calc(var(--i, 0) * 60ms + 250ms), 0s; }
.pmx-it.sel { box-shadow: 0 0 0 2px var(--color-portrait-ink); }
.pmx-it[data-l]::after { content: attr(data-l); position: absolute; left: 5px; bottom: 5px; padding: 2px 4px; border-radius: 4px; background: rgba(53, 53, 53, .85); color: #fff; font-size: 8.5px; line-height: 1.2; font-weight: 700; letter-spacing: .03em; }
.pmx-it .ck { position: absolute; top: 6px; left: 6px; z-index: 1; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(0, 0, 0, .14); color: #fff; transition: background .2s, box-shadow .2s; }
.pmx-it.sel .ck { background: var(--color-portrait-ink); box-shadow: none; }
.pmx-it.sel .ck svg { opacity: 1; }
.pmx-save.ready { background: var(--color-graphite-body); color: #fff; }
.pmx-save.press { transform: scale(.94); }
.pmx .picker { top: auto; left: auto; right: 14px; bottom: 54px; transform-origin: 100% 100%; }

/* ═════════ TALLY: purple stage, live counter, References window ═════════ */
@keyframes tally-live { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.tally-num {
  display: flex; justify-content: center; white-space: nowrap; margin-top: .04em;
  font-family: "Basier Circle", "General Sans", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700; font-size: var(--tf); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums;
  color: rgba(236, 222, 240, .62); padding-top: .12em;
  -webkit-mask-image: linear-gradient(180deg, #000 25%, transparent 92%); mask-image: linear-gradient(180deg, #000 25%, transparent 92%);
  user-select: none; pointer-events: none;
}
.tally-num .td { position: relative; display: inline-block; width: .62em; height: 1em; }
.tally-num .td.c { width: .26em; }
.tally-num .tg { position: absolute; inset: 0; text-align: center; }
.tally-num .tg.in { animation: tally-in .9s var(--ease) both; }
.tally-num .tg.out { animation: tally-out .6s var(--ease) both; }
.tally:not(.on) .tg.in { animation-play-state: paused; }
@keyframes tally-in { from { opacity: 0; transform: translateY(-.32em); filter: blur(.06em); } }
@keyframes tally-out { to { opacity: 0; transform: translateY(.22em); filter: blur(.06em); } }

/* the window rises over the bottom of the digits and is cut off by the section edge */
.refs-win { height: 100%; border-radius: 18px 18px 0 0; background: #fff; color: #1d1d1f; font-family: "Switzer", var(--text); display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.refs-cols img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; flex: none; }
.refs-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { .tally-num .tg, .tally-lbl i { animation: none !important; } }

/* hero social proof: overlapping avatars + line, in a white pill */
.trust-faces img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-sizing: content-box; margin: -3px 0 -3px -3px; }
.trust-faces img + img { margin-left: -11px; }

/* big mascot: Start and End artwork stacked, swapping on a loop (the feedback-button hover swap, on a timer) */
.mascot-loop img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; animation-duration: 10s; animation-iteration-count: infinite; animation-timing-function: var(--e); }
.mascot-loop .ml-a { animation-name: ml-a; }
.mascot-loop .ml-b { animation-name: ml-b; opacity: 0; transform: scale(.8) rotate(-10deg); }
@keyframes ml-a { 0%, 72% { opacity: 1; transform: scale(1); } 75%, 92% { opacity: 0; transform: scale(.8); } 95%, 100% { opacity: 1; transform: scale(1); } }
@keyframes ml-b { 0%, 72% { opacity: 0; transform: scale(.8) rotate(-10deg); } 75%, 92% { opacity: 1; transform: scale(1) rotate(0); } 95%, 100% { opacity: 0; transform: scale(.8) rotate(-10deg); } }
@media (prefers-reduced-motion: reduce) { .mascot-loop img { animation: none; } .mascot-loop .ml-b { display: none; } }

/* FAQ: title on the left, one column of soft grey cards on the right; each card opens in place */
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 20px; height: 20px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d7d74' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M12 4v16M4 12h16'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }

/* page media tab: the hover-save page and the Page Media scanner share one spot and crossfade */
.pm-stack:not(.scan) > #pmx, .pm-stack.scan > #demo { opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s; }

/* collections tab: the extension side panel, folders → dropdown → All Saved Items */
.csp-top img { width: 20px; height: 22px; }
.csp.all .csp-t i:first-child { transform: translateY(100%); opacity: 0; }
.csp.all .csp-t i + i { transform: none; opacity: 1; }
.csp-vt i.on { background: #fff; color: var(--g700); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.csp.all .csp-vt { display: none; }
.csp.all .csp-more { display: flex; }
.csp-menu.on { opacity: 1; transform: none; visibility: visible; transition: opacity .2s, transform .35s var(--pop), visibility 0s; }
.csp.dd-open .csp-dd svg { transform: rotate(180deg); }
.csp-menu .mi.hl { background: #f3f4f6; }
.csp:not(.all) .mi[data-k="col"] svg, .csp.all .mi[data-k="all"] svg { opacity: 1; }
.csp.all .csp-cols, .csp:not(.all) .csp-all { opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), transform .45s var(--ease), visibility 0s .3s; }
.csp.all .csp-cols { transform: translateY(-10px); }
.csp:not(.all) .csp-all { transform: translateY(10px); }
.cc .folder-art { filter: drop-shadow(0 4px 5px rgba(234, 88, 12, .18)); }
.cc .fa-cards img { transition: transform .6s var(--pop); }
.cc.hov { background: #fff4ec; box-shadow: 0 0 0 1px rgba(255, 161, 48, .55); }
.cc.hov .fa-cards img { transform: translate(calc((var(--i) - .7) * 22%), -42%) rotate(calc(var(--r) * 1.7)); }
.csp-tabs b.on { color: var(--g700); }
.csp-tabs b.on em { color: var(--g400); }
.csp-tabs b.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--g700); }
.csp.all .csp-mas figure { opacity: 1; transform: none; transition-delay: calc(var(--i) * 55ms + 120ms); }
.csp-mas .ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) {
  .feature #colDemo { top: 24px; width: calc(100% - 24px); }
  .cc .folder-art { --w: 84px !important; }
}

/* footer: Duolingo-style wavy edge, then a solid brand-blue block */
.foot { position: relative; margin-top: 72px; padding-block: 28px 48px; background: #3d95f2 !important; color: #fff; }

/* tally now closes the page: a wave leads into it, and the footer's wave sits on its bottom */

/* hero board = the References window; the flying cards land in its grey tiles */

/* tally: dark, centered: mascot, headline, counter, then the live pill as its caption */
.tally-lbl i { background: #fe7a32; animation-name: tally-live; }
@keyframes tally-live { 70% { box-shadow: 0 0 0 7px rgba(61, 149, 242, 0); } 0% { box-shadow: 0 0 0 0 rgba(242, 124, 61, 0.75); } 100% { box-shadow: 0 0 0 0 rgba(61, 149, 242, 0); } }

/* ═════════ LIBRARY: Resurf-style feature grid — soft grey cards, a small illustration over a title + line ═════════ */
.lib-art svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lib-card:hover .lib-art > div { transform: translateY(-4px); }
.lib-card .w { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 6px 14px -6px rgba(0, 0, 0, .12); }

/* hover to save */
.la-hover > img { width: 100%; height: 100%; object-fit: cover; }
.la-badge img { width: 17px; }
.lib-card:hover .la-badge { transform: scale(1.15) rotate(-6deg); }
/* quick save */
.la-paper.back { translate: -8px 10px; rotate: -8deg; background: #fafafa; }
.lib-card:hover .la-paper:not(.back) { rotate: 0deg; transition: rotate .5s var(--pop); }
.la-src img { width: 14px; height: 14px; }
/* chips */
.la-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 7px; border-radius: 8px; font-size: 12.5px; color: var(--g700); }
.la-chips img { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; }
/* visual library */
.la-tiles img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
/* sites */
/* search */
/* page media */
.la-media span { display: grid; justify-items: center; gap: 2px; width: 70px; padding: 12px 0 10px; border-radius: 12px; font-size: 11.5px; color: var(--color-slate-helper); }
/* capture */
.la-shot img { width: 100%; height: 100%; object-fit: cover; }
.lib-card:hover .la-shot i { inset: 12% 10% 12% 14%; }
/* quote */
/* ai */
.la-ai span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; transition: transform .4s var(--pop); }
.la-ai img { width: 26px; height: 26px; }
.lib-card:hover .la-ai span:nth-child(2) { transform: translateY(-6px); }
/* private */

/* hero: full-bleed grey background, which clips the bottom of the board */
/* references window: a saved prompt, quote mark and bookmark over the text */

/* showcase: the logos and dashed lines radiate from the centre, behind the copy and folder */

/* tally: one centered column with the counter as the main element */
