/* The site around the articles: the top bar and the footer on every page, the home page, the research index.
   Loaded after theme.css and before dark.css; colours come from the tokens those two define. */

/* ---------- top bar ---------- */
/* The language and theme switch (.modes) keeps its own place at the top right; the links leave room for it. */
.site-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 29; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; min-height: 72px; --modes-w: 165px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 17px/1 var(--sans); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 28px; height: 20px; overflow: visible; }
.brand-mark circle { fill: none; stroke: var(--ink); stroke-width: 1.7; }
.brand-mark .lens { fill: var(--accent); }
.site-links { display: flex; gap: 22px; margin-right: calc(var(--modes-w) + 20px); }
.nav-link { font: 500 14px/1.5 var(--sans); color: var(--ink-2); text-decoration: none; transition: color .2s; }
.nav-link:hover, .nav-link[aria-current] { color: var(--ink); }
@media (max-width: 820px) { .site-bar { padding: 14px 18px; min-height: 64px; } .site-links { margin-right: calc(var(--modes-w) + 12px); } }

/* ---------- footer ---------- */
.site-foot {
  display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: clamp(80px, 12vh, 130px) auto 0;
  padding: 26px clamp(20px, 5vw, 56px) 34px; border-top: 1px solid var(--line-soft);
}
.site-foot .brand { font-size: 15px; }
.site-foot .brand-mark { width: 24px; height: 17px; }

/* ---------- home ---------- */
.home { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.home .label { margin: 0 0 14px; font: 500 13px/1.5 var(--sans); color: var(--ink-2); }
.home .more { display: inline-flex; align-items: center; gap: 6px; font: 500 14px/1.5 var(--sans); color: var(--ink); text-decoration: none; }
.home .more:hover span { text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.home .go { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.home .more:hover .go { transform: translate(2px, -2px); }
.home .btn { border-color: var(--line); color: var(--ink); background: none; }
.home .btn:hover { background: var(--cream); }
.home .btn.solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.home .btn.solid:hover { background: var(--ink); opacity: .86; color: var(--paper); }
.home video.clip { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--tile); }

.hero { padding-top: clamp(120px, 19vh, 200px); }
.hero h1, .page-head h1 { margin: 0 0 22px; font-family: var(--serif); font-weight: 500; font-size: clamp(54px, 6.6vw, 92px); line-height: 1; letter-spacing: -.025em; color: var(--ink); }
.mission { margin: 0; max-width: 31em; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; }
.hero-demo { margin: 0; }
.hero-demo figcaption { margin-top: 12px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }

/* what we believe: one statement at a time; the panels share one grid cell, so the card keeps the height of the tallest */
.believe { margin-top: clamp(72px, 11vh, 124px); }
.b-card { display: grid; background: var(--card); border-radius: 16px; padding: clamp(18px, 2.8vw, 34px); }
.b-panel { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(22px, 4vw, 52px); align-items: center; transition: opacity .35s; }
.b-panel[hidden] { display: grid; visibility: hidden; opacity: 0; }
.b-n { margin: 0 0 14px; font: 500 13px/1.5 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink-3); }
.b-text h2 { margin: 0 0 14px; font-family: var(--serif); font-weight: 500; font-size: clamp(25px, 2.5vw, 33px); line-height: 1.18; letter-spacing: -.01em; text-wrap: balance; }
.b-why { margin: 0 0 20px; font-size: 16px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.b-pic { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--tile); }
.b-pic video.clip { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.b-plate { display: grid; place-items: center; width: 100%; height: 100%; padding: clamp(10px, 1.6vw, 18px); }
.b-plate.white { background: #fff; padding: 6px; }
.b-plate .fx-wrap { display: contents; }
.b-plate svg, .b-plate img { display: block; width: 100%; height: 100%; min-width: 0; object-fit: contain; }
.b-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; margin-top: 14px; }
.b-tab {
  padding: 12px 0 10px; border: 0; border-top: 2px solid var(--line-soft); background: none; text-align: left; cursor: pointer;
  font: 500 13.5px/1.5 var(--sans); color: var(--ink-3); transition: color .2s, border-color .2s;
}
.b-tab b { margin-right: 6px; font-weight: 500; font-variant-numeric: tabular-nums; }
.b-tab:hover { color: var(--ink); }
.b-tab[aria-selected="true"] { color: var(--ink); border-top-color: var(--accent); }

/* a small chart of horizontal bars */
.hb text { font-family: var(--sans); }
.hb-name { font-size: 15px; font-weight: 600; fill: var(--ink); text-anchor: end; }
.hb-kind { font-size: 12px; fill: var(--ink-3); text-anchor: end; }
.hb-track { fill: none; }
.hb-fill { fill: var(--ink); }
.hb-val { font-size: 15px; font-weight: 600; fill: var(--ink); font-variant-numeric: tabular-nums; }
.hb-row.hot .hb-fill { fill: var(--accent); }
.hb-row.hot .hb-val { fill: var(--accent); }
.hb-note { font-size: 12.5px; fill: var(--ink-2); }

/* the papers */
.highlights { margin-top: clamp(72px, 11vh, 120px); }
.sec-top { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.sec-top .label { margin: 0; }
.paper-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 68px); align-items: center; padding: clamp(34px, 5vh, 52px) 0; border-bottom: 1px solid var(--line-soft); }
.paper-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tag { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px/1.5 var(--sans); color: var(--ink-2); }
.date { font: 400 13px/1.5 var(--sans); color: var(--ink-3); }
.paper-row h3, .index-row h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2.1vw, 27px); line-height: 1.24; letter-spacing: -.008em; text-wrap: balance; }
.paper-row h3 a, .index-row h2 a { text-decoration: none; color: var(--ink); }
.paper-row h3 a:hover, .index-row h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--ink-3); text-underline-offset: 4px; }
.paper-sum { margin: 0; max-width: 46em; font-size: 15.5px; line-height: 1.62; color: var(--ink-2); text-wrap: pretty; }
.paper-links { margin: 0; font: 500 14px/1.5 var(--sans); }
.paper-links a { color: var(--ink); text-decoration: none; }
.paper-links a:hover { text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.paper-links .dot { margin: 0 5px; color: var(--ink-3); }

.cover {
  display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 16 / 9; padding: clamp(20px, 2.6vw, 32px);
  border-radius: 16px; background: var(--tile); color: var(--ink); text-decoration: none; transition: transform .35s var(--ease, ease);
}
.cover:hover { transform: translateY(-3px); }
.cover-overlap { background: var(--peach-soft); }
.cover svg { width: clamp(92px, 11vw, 132px); height: auto; overflow: visible; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cover svg .lens { fill: var(--accent); }
.cover-overlap svg .lens { stroke: none; }
.cover-t { margin: 0 0 6px; font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2.5vw, 32px); line-height: 1.12; letter-spacing: -.012em; }
.cover-s { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* ---------- research index ---------- */
.page-head { padding-top: clamp(112px, 17vh, 176px); }
.page-head h1 { font-size: clamp(46px, 5.2vw, 72px); }
.index-list { list-style: none; margin: clamp(44px, 7vh, 72px) 0 0; padding: 0; border-top: 1px solid var(--line-soft); }
.index-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0 clamp(24px, 4vw, 56px); padding: clamp(30px, 4.6vh, 44px) 0; border-bottom: 1px solid var(--line-soft); }
.index-row .paper-meta { flex-direction: column; align-items: flex-start; gap: 10px; margin: 6px 0 0; }

/* ---------- Chinese ---------- */
html[lang^="zh"] .hero h1, html[lang^="zh"] .page-head h1, html[lang^="zh"] .b-text h2, html[lang^="zh"] .paper-row h3, html[lang^="zh"] .index-row h2, html[lang^="zh"] .cover-t { font-weight: 700; letter-spacing: 0; }
html[lang^="zh"] .b-text h2, html[lang^="zh"] .paper-row h3, html[lang^="zh"] .index-row h2, html[lang^="zh"] .cover-t { line-height: 1.4; }
html[lang^="zh"] .mission, html[lang^="zh"] .b-why, html[lang^="zh"] .paper-sum { line-height: 1.8; }

.nb { white-space: nowrap; }

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
  .hero { padding-top: 108px; }
  .b-panel { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .b-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .paper-row { grid-template-columns: minmax(0, 1fr); }
  .index-row { grid-template-columns: minmax(0, 1fr); }
  .index-row .paper-meta { flex-direction: row; align-items: center; margin: 0 0 14px; }
  .site-foot { padding-right: 76px; }
}

/* ---------- RoboProbe's logo: two masks, the mark in its orange and the ink in the theme's ink ---------- */
.logo { position: relative; display: inline-block; height: 26px; aspect-ratio: 655 / 114; vertical-align: middle; }
.logo i { position: absolute; inset: 0; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.logo .o { background: #f86b44; -webkit-mask-image: url(brand/roboprobe-orange.png); mask-image: url(brand/roboprobe-orange.png); }
.logo .k { background: var(--ink); -webkit-mask-image: url(brand/roboprobe-ink.png); mask-image: url(brand/roboprobe-ink.png); }
.site-foot .logo { height: 22px; }
.hero h1 { margin-bottom: 30px; line-height: 0; }
.logo.big { height: auto; width: min(100%, 420px); }
/* on a phone the top bar shows the face only */
@media (max-width: 480px) {
  .site-bar .logo { aspect-ratio: 184 / 114; }
  .site-bar .logo .o { -webkit-mask-image: url(brand/mark-orange.png); mask-image: url(brand/mark-orange.png); }
  .site-bar .logo .k { -webkit-mask-image: url(brand/mark-ink.png); mask-image: url(brand/mark-ink.png); }
}

.site-links { align-items: center; }
.gh-link { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--ink-2); transition: color .2s; }
.gh-link:hover { color: var(--ink); }
.gh { width: 19px; height: 19px; fill: currentColor; }
.site-foot nav { display: flex; align-items: center; gap: 18px; }

/* ---------- a post's place on the site ---------- */
.crumbs { display: flex; gap: 8px; margin: 0 0 18px; font: 500 13.5px/1.5 var(--sans); color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the post's details: in the right-hand column on wide screens, under the title otherwise ---------- */
.blog-side { grid-column: 2; }
.blog-side .blog-meta { margin: 0 0 40px; }
@media (min-width: 821px) {
  .blog-head { grid-row: 1; }
  .blog-side { grid-row: 2; }
  .blog-rule { grid-row: 3; }
  .blog-toc { grid-row: 4; }
  .blog-body { grid-row: 4; }
  .blog-head { padding-bottom: 36px; }
}
@media (min-width: 1340px) {
  .blog-side { grid-column: 3; grid-row: 4; position: sticky; top: 40px; }
  .blog-side .blog-meta { flex-direction: column; flex-wrap: nowrap; gap: 20px; margin: 0; max-width: none; }
  .blog-side .blog-meta dd { line-height: 1.45; }
  .blog-head { padding-bottom: 48px; }
}

/* ---------- covers: a figure from the paper ---------- */
.cover.cover-pathway, .cover.cover-board { display: block; padding: 0; overflow: hidden; background: var(--card); }
.cover-plate { display: grid; place-items: center; height: 100%; padding: 4%; background: #fff; }
.cover-plate img { display: block; width: 100%; height: auto; }
.cover-chart { display: flex; flex-direction: column; height: 100%; padding: clamp(16px, 2.2vw, 26px); }
.cover-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 6px; font: 400 12.5px/1.4 var(--sans); color: var(--ink-2); }
.cover-h b { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.cover-chart svg.rc { display: block; width: 100%; height: auto; margin-top: auto; overflow: visible; }

/* the post's lead authors, and a link down to everyone */
.blog-meta dd .all { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.blog-meta dd .all:hover { color: var(--ink); }

/* ---------- the home page's logo: a live face beside the brand's wordmark ---------- */
/* Each eye is one line: a dot is a dash of almost no length as thick as the dot, an arc is the whole line, thin.
   The dot sits 10-11 units below the middle of its arc. Moods are classes on .logo.live (set by assets/site.js). */
.logo.live .mark { position: absolute; left: 0; top: 0; width: calc(184 / 655 * 100%); height: 100%; overflow: visible; }
.logo.live .w { background: var(--ink); -webkit-mask-image: url(brand/roboprobe-word.png); mask-image: url(brand/roboprobe-word.png); }
.logo.live .mark * { transform-box: view-box; }
.logo.live .jaws { fill: none; stroke: #f86b44; stroke-linecap: round; stroke-linejoin: round; }
.logo.live .lid { fill: none; stroke: var(--ink); stroke-linecap: round; }

/* how a change of face moves: a little past the mark, then back */
.logo.live .eye, .logo.live .eyes, .logo.live .jaw-l, .logo.live .jaw-r { transition: translate .32s cubic-bezier(.34, 1.56, .64, 1), scale .32s cubic-bezier(.34, 1.56, .64, 1); }
.logo.live .lid { transition: stroke-width .3s cubic-bezier(.34, 1.4, .64, 1), stroke-dasharray .3s cubic-bezier(.34, 1.4, .64, 1), stroke-dashoffset .3s cubic-bezier(.34, 1.4, .64, 1); }

/* default: left a dot, right the wink */
.logo.live .eye-l { translate: 0 10.35px; transform-origin: 66.6px 49.65px; }
.logo.live .eye-r { translate: 0 0; transform-origin: 110.6px 49px; }
.logo.live .eye-l .lid { stroke-width: 19.2; stroke-dasharray: .001 2; stroke-dashoffset: -.4995; }
.logo.live .eye-r .lid { stroke-width: 8.4; stroke-dasharray: 1 2; stroke-dashoffset: 0; }
/* left eye as an arc; right eye as a dot */
.logo.live.l-arc .eye-l { translate: 0 0; }
.logo.live.l-arc .eye-l .lid { stroke-width: 8.4; stroke-dasharray: 1 2; stroke-dashoffset: 0; }
.logo.live.r-dot .eye-r { translate: 0 11px; }
.logo.live.r-dot .eye-r .lid { stroke-width: 19.2; stroke-dasharray: .001 2; stroke-dashoffset: -.4995; }
/* looking this way and that; eyes wide; jaws a little apart */
.logo.live.look-l .eyes { translate: -5px 0; }
.logo.live.look-r .eyes { translate: 5px 0; }
.logo.live.eyes-wide .eye { scale: 1.28; }
.logo.live.jaws-out .jaw-l { translate: -4px 0; }
.logo.live.jaws-out .jaw-r { translate: 4px 0; }

/* stand-in shapes for an eye: > < - x and a heart; each pops in over the eye's own line, which steps aside */
.logo.live .s { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; scale: .2;
  transition: opacity .16s ease, scale .36s cubic-bezier(.34, 1.7, .64, 1); }
.logo.live .s-heart { fill: #f86b44; stroke: none; }
.logo.live .hw { transition: opacity .14s ease, scale .3s cubic-bezier(.34, 1.56, .64, 1); }
.logo.live .eye-l .hw { transform-origin: 66.6px 54.5px; }
.logo.live .eye-r .hw { transform-origin: 110.6px 54.5px; }
.logo.live:is(.l-gt, .l-lt, .l-line, .l-x, .l-heart) .eye-l .hw, .logo.live:is(.r-gt, .r-lt, .r-line, .r-x, .r-heart) .eye-r .hw { opacity: 0; scale: .3; }
.logo.live.l-gt .ov-l .s-gt, .logo.live.l-lt .ov-l .s-lt, .logo.live.l-line .ov-l .s-line, .logo.live.l-x .ov-l .s-x, .logo.live.l-heart .ov-l .s-heart,
.logo.live.r-gt .ov-r .s-gt, .logo.live.r-lt .ov-r .s-lt, .logo.live.r-line .ov-r .s-line, .logo.live.r-x .ov-r .s-x, .logo.live.r-heart .ov-r .s-heart { opacity: 1; scale: 1; }
/* hearts beat; x eyes spin a little; the jaws squeeze in; the eyes droop; the head shakes or wobbles */
.logo.live.beat .s-heart { animation: lg-beat .5s ease-in-out 2 .25s; }
@keyframes lg-beat { 0%, 100% { scale: 1; } 30% { scale: 1.28; } 55% { scale: .94; } }
.logo.live.spin .s-x { animation: lg-spin .9s ease-in-out; }
@keyframes lg-spin { 0% { rotate: 0deg; } 100% { rotate: 180deg; } }
.logo.live.jaws-in .jaw-l { translate: 3px 0; }
.logo.live.jaws-in .jaw-r { translate: -3px 0; }
.logo.live.droop .eyes { translate: 0 3px; }
.logo.live.shake .mark { animation: lg-shake .42s ease-in-out; transform-box: view-box; transform-origin: 92px 57px; }
@keyframes lg-shake { 0%, 100% { translate: 0 0; } 20% { translate: -3px 0; } 40% { translate: 3px 0; } 60% { translate: -2px 0; } 80% { translate: 1.5px 0; } }
.logo.live.wobble .mark { animation: lg-wobble 1.1s ease-in-out; transform-box: view-box; transform-origin: 92px 100px; }
@keyframes lg-wobble { 0%, 100% { rotate: 0deg; } 20% { rotate: -7deg; } 45% { rotate: 6deg; } 70% { rotate: -3deg; } 88% { rotate: 1.5deg; } }

/* the blink: both eyes close together, about a quarter of a second, closing faster than they open */
.logo.live .bl { transform-origin: 66.6px 49.65px; }
.logo.live .eye-r .bl { transform-origin: 110.6px 56px; }
.logo.live.l-arc .eye-l .bl { transform-origin: 66.6px 56px; }
.logo.live.r-dot .eye-r .bl { transform-origin: 110.6px 49px; }
.logo.live.blink .bl { animation: lg-blink .26s cubic-bezier(.4, 0, .2, 1); }
.logo.live.blink2 .bl { animation: lg-blink .26s cubic-bezier(.4, 0, .2, 1), lg-blink .26s cubic-bezier(.4, 0, .2, 1) .32s; }
@keyframes lg-blink { 0%, 100% { scale: 1 1; } 35%, 50% { scale: 1.1 .14; } }
/* a hop of the whole face, and the jaws clapping */
.logo.live.hop .mark { animation: lg-hop .5s cubic-bezier(.3, 0, .3, 1); transform-box: view-box; transform-origin: 92px 114px; }
@keyframes lg-hop { 0%, 100% { translate: 0 0; scale: 1 1; } 25% { translate: 0 0; scale: 1.05 .94; } 55% { translate: 0 -6px; scale: .97 1.04; } 80% { translate: 0 0; scale: 1.03 .97; } }
.logo.live.clap .jaw-l { animation: lg-clap-l .44s ease-in-out 2; }
.logo.live.clap .jaw-r { animation: lg-clap-r .44s ease-in-out 2; }
@keyframes lg-clap-l { 0%, 100% { translate: 0 0; } 40% { translate: -7px 0; } 70% { translate: 2px 0; } }
@keyframes lg-clap-r { 0%, 100% { translate: 0 0; } 40% { translate: 7px 0; } 70% { translate: -2px 0; } }

/* ---------- the top bar stays at the top: logo, Blog, GitHub, and the language and theme switch ---------- */
html { scroll-padding-top: 96px; }
/* The bar's paper and blur sit on a layer that reaches below the bar and fades out, so text scrolling under the bar
   dissolves into it instead of being cut off at a line. */
.site-bar { position: fixed; z-index: 40; background: none; }
.site-bar::before {
  content: ""; position: absolute; inset: 0 0 -30px 0; z-index: -1; pointer-events: none;
  background: var(--paper); background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 46px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 46px), transparent 100%);
}
.modes { position: fixed; z-index: 41; }
.blog-toc { top: 96px; }
@media (min-width: 1340px) { .blog-side { top: 96px; } }
@media (max-width: 820px) { html { scroll-padding-top: 84px; } }

/* ---------- the letters of RoboProbe move with the face ---------- */
.logo.live .ws { position: absolute; inset: 0; }
.logo.live .ch { position: absolute; top: 0; height: 100%; background: var(--ink); -webkit-mask: center / 100% 100% no-repeat; mask: center / 100% 100% no-repeat;
  transform-origin: 50% 82%; transition: translate .34s cubic-bezier(.34, 1.56, .64, 1), rotate .34s cubic-bezier(.34, 1.56, .64, 1); }
.logo.live .ch0 { left: 31.145%; width: 7.786%; --i: 0; -webkit-mask-image: url(brand/word/0.png); mask-image: url(brand/word/0.png); }
.logo.live .ch1 { left: 38.931%; width: 7.939%; --i: 1; -webkit-mask-image: url(brand/word/1.png); mask-image: url(brand/word/1.png); }
.logo.live .ch2 { left: 47.176%; width: 7.786%; --i: 2; -webkit-mask-image: url(brand/word/2.png); mask-image: url(brand/word/2.png); }
.logo.live .ch3 { left: 55.115%; width: 7.939%; --i: 3; -webkit-mask-image: url(brand/word/3.png); mask-image: url(brand/word/3.png); }
.logo.live .ch4 { left: 63.359%; width: 8.092%; --i: 4; -webkit-mask-image: url(brand/word/4.png); mask-image: url(brand/word/4.png); }
.logo.live .ch5 { left: 71.603%; width: 4.580%; --i: 5; -webkit-mask-image: url(brand/word/5.png); mask-image: url(brand/word/5.png); }
.logo.live .ch6 { left: 76.183%; width: 7.939%; --i: 6; -webkit-mask-image: url(brand/word/6.png); mask-image: url(brand/word/6.png); }
.logo.live .ch7 { left: 84.275%; width: 7.939%; --i: 7; -webkit-mask-image: url(brand/word/7.png); mask-image: url(brand/word/7.png); }
.logo.live .ch8 { left: 92.214%; width: 7.481%; --i: 8; -webkit-mask-image: url(brand/word/8.png); mask-image: url(brand/word/8.png); }
.logo.live .ch:nth-child(even) { --s: -1; }
.logo.live .ch:nth-child(odd) { --s: 1; }
/* happy, love, the swapped wink: a wave from left to right */
.logo.live:is(.hop, .l-arc.r-dot) .ch { animation: lg-wave .5s cubic-bezier(.3, 0, .3, 1) calc(var(--i) * 45ms) both; }
@keyframes lg-wave { 0%, 100% { translate: 0 0; } 40% { translate: 0 -7px; } 70% { translate: 0 1px; } }
/* squint: squeezed, with a jiggle */
.logo.live.shake .ch { animation: lg-squeeze .42s ease-in-out calc(var(--i) * 15ms); }
@keyframes lg-squeeze { 0%, 100% { scale: 1 1; } 25% { scale: 1.08 .86; } 55% { scale: .95 1.06; } 80% { scale: 1.02 .98; } }
/* surprised: all jump at once */
.logo.live.jaws-out .ch { animation: lg-jump .46s cubic-bezier(.2, .8, .3, 1) calc(var(--i) * 12ms); }
@keyframes lg-jump { 0%, 100% { translate: 0 0; } 30% { translate: 0 -9px; } 65% { translate: 0 1.5px; } }
/* meh: they sag and lean askew while the face is unimpressed */
.logo.live.droop .ch { translate: 0 3px; rotate: calc(var(--s) * 3deg); transition-duration: .6s; transition-timing-function: cubic-bezier(.4, 0, .2, 1); }
/* dizzy: a wobble, every other letter the other way */
.logo.live.wobble .ch { animation: lg-letter-wobble 1.1s ease-in-out; }
@keyframes lg-letter-wobble { 0%, 100% { rotate: 0deg; } 25% { rotate: calc(var(--s) * 9deg); } 55% { rotate: calc(var(--s) * -7deg); } 80% { rotate: calc(var(--s) * 3deg); } }
/* excited: two quick bounces */
.logo.live.clap .ch { animation: lg-bounce .44s ease-in-out calc(var(--i) * 20ms) 2; }
@keyframes lg-bounce { 0%, 100% { translate: 0 0; } 45% { translate: 0 -5px; } }
/* looking this way and that: the letters lean the same way */
.logo.live.look-l .ch { translate: -2px 0; rotate: -4deg; }
.logo.live.look-r .ch { translate: 2px 0; rotate: 4deg; }

/* a cover drawn for the paper: the picture fills the card */
.cover:has(> .art) { display: block; padding: 0; overflow: hidden; background: var(--tile); }
.cover > .art { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease, ease); }
.cover:hover > .art { transform: scale(1.02); }

/* an animated cover (an inline SVG with root class "cv") fills the card like a picture */
.cover:has(> svg.cv) { display: block; padding: 0; overflow: hidden; background: #faf9f5; }
.cover > svg.cv { display: block; width: 100%; height: 100%; overflow: hidden;
  /* undo the line-drawing defaults that .cover svg sets for the older icon covers */
  fill: initial; stroke: initial; stroke-width: initial; stroke-linecap: initial; stroke-linejoin: initial; }

/* ---------- Probie on its own (no wordmark), and its page ---------- */
.logo.live.face-only { aspect-ratio: 184 / 114; height: auto; }
.logo.live.face-only .mark { width: 100%; }
.probie .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.probie .hero .label { margin-bottom: 10px; }
.probie .hero h1 { margin: 0 0 20px; font-family: var(--serif); font-weight: 500; font-size: clamp(54px, 6.6vw, 92px); line-height: 1; letter-spacing: -.025em; }
.probie .hero-face { display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); }
.probie .hero-face .logo { width: min(100%, 300px); }
.probie .sec { margin-top: clamp(72px, 11vh, 120px); }
.probie .sec > h2 { margin: 0 0 18px; font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.15; letter-spacing: -.01em; }
.probie .sec p { max-width: 40em; margin: 0 0 18px; font-size: 18px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.probie .two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.probie .facts { margin: 0; padding: clamp(20px, 2.6vw, 30px); border-radius: 16px; background: var(--card); }
.probie .facts div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.probie .facts div:last-child { border-bottom: 0; }
.probie .facts dt { font: 400 13.5px/1.5 var(--sans); color: var(--ink-3); }
.probie .facts dd { margin: 0; font: 500 15px/1.5 var(--sans); color: var(--ink); }
.probie .story { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.probie .story-stage { min-height: 260px; display: grid; place-items: center; }
.probie .moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.probie .mood-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 6px; border: 0; border-radius: 12px; background: none;
  text-align: left; cursor: pointer; font: inherit; color: inherit; }
.probie .mood-card .logo { transition: translate .3s cubic-bezier(.34, 1.56, .64, 1); }
.probie .mood-card:hover .logo, .probie .mood-card:focus-visible .logo { translate: 0 -3px; }
.probie .mood-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.probie .mood-card .logo { width: 92px; }
.probie .mood-card b { display: block; font: 600 16px/1.4 var(--sans); color: var(--ink); }
.probie .mood-card b span { margin-left: 6px; font-weight: 500; color: var(--ink-3); }
.probie .mood-card em { display: block; margin-top: 2px; font: 400 14px/1.45 var(--sans); font-style: normal; color: var(--ink-2); }
.probie .tips { margin: 0; padding-left: 22px; max-width: 40em; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.probie .tips li { margin-bottom: 8px; }
.probie .tips li::marker { color: var(--accent); }
.probie .end { margin-top: 30px; }
@media (max-width: 860px) {
  .probie .hero, .probie .two, .probie .story { grid-template-columns: minmax(0, 1fr); }
  .probie .moods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .probie .mood-card { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}
@media (max-width: 480px) { .probie .moods { grid-template-columns: minmax(0, 1fr); } .probie .mood-card { grid-template-columns: 80px minmax(0, 1fr); } .probie .mood-card .logo { width: 80px; } }
@media (max-width: 520px) { .site-links { gap: 14px; } }

/* ---------- Probie's world: a workbench (assets/world.js) ---------- */
.probie .world-head { padding-top: clamp(110px, 15vh, 150px); max-width: 44em; }
.probie .world-head h1 { margin: 0 0 16px; font-family: var(--serif); font-weight: 500; font-size: clamp(48px, 5.6vw, 80px); line-height: 1; letter-spacing: -.025em; }
.probie .world-wrap { margin-top: clamp(28px, 4vh, 44px); }
.world {
  --w-wall: #f3efe6; --w-floor: #ebe5d8; --w-bench: #e7d3bf; --w-edge: #1f1e1d; --w-or: #f86b44; --w-tint: #f8c9b6; --w-ink: #202126;
  position: relative; aspect-ratio: 1000 / 560; border-radius: 24px; overflow: hidden; background: var(--w-wall);
  user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
html[data-theme="dark"] .world { --w-wall: #23221f; --w-floor: #1c1b19; --w-bench: #4a3a2e; --w-edge: #f3f1ea; --w-tint: #7a3f2a; --w-ink: #f3f1ea; }
.world-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.world .w-floor { fill: var(--w-floor); }
.world .w-bench .top { fill: var(--w-bench); }
.world .w-bench .leg { fill: var(--w-edge); }
.world .w-spot { stroke: var(--w-or); stroke-width: 4; stroke-linecap: round; opacity: .55; }
.world .w-bowl { fill: var(--w-tint); stroke: var(--w-or); stroke-width: 6; stroke-linejoin: round; }
.world .w-rail { stroke: var(--w-edge); stroke-width: 6; stroke-linecap: round; }
.world .w-rod { stroke: var(--w-edge); stroke-width: 4; stroke-linecap: round; }
.world .w-carriage rect { fill: var(--w-edge); }
.world .w-thing { cursor: grab; touch-action: none; }
.world.dragging .w-thing { cursor: grabbing; }
.world .w-thing.or { fill: var(--w-or); }
.world .w-thing.ink { fill: var(--w-ink); }
.world .w-thing.tint { fill: var(--w-tint); }
.world .actor { position: absolute; width: 12%; z-index: 3; cursor: pointer; }
.world .actor.grip .jaw-l { translate: calc(var(--g) * 1px) 0; }
.world .actor.grip .jaw-r { translate: calc(var(--g) * -1px) 0; }
.world .bubble { position: absolute; z-index: 4; margin: 0; max-width: 34%; padding: 8px 13px; border-radius: 14px 14px 14px 4px; background: var(--card); box-shadow: 0 4px 16px rgba(20, 20, 19, .12);
  font: 500 clamp(11px, 1.25vw, 14.5px)/1.4 var(--sans); color: var(--ink); pointer-events: none; animation: w-pop .3s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes w-pop { from { scale: .6; opacity: 0; } to { scale: 1; opacity: 1; } }
.world .w-notes { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.world .w-note { position: absolute; margin: 0; padding: .6em .8em; width: 12%; border-radius: 6px; background: var(--card); box-shadow: 0 2px 6px rgba(20, 20, 19, .08);
  font: 400 clamp(8px, 1.05vw, 12.5px)/1.35 var(--sans); color: var(--ink-2); }
.world .w-note b { display: block; font-weight: 700; color: var(--ink); }
/* the notes hang from the rail (y = 36 of the 1000-wide scene = 3.6cqw) on two cords each; --y is how far down
   the note's top hangs, in the same container units, so each pair of cords is exactly long enough */
.world .w-note { top: var(--y); transform-origin: 50% calc(3.6cqw - var(--y)); }
.world .w-note::before, .world .w-note::after { content: ""; position: absolute; bottom: 100%; width: max(1.5px, .22cqw);
  height: calc(var(--y) - 3.6cqw); background: var(--w-ink); border-radius: 1px; }
.world .w-note::before { left: 18%; }
.world .w-note::after { right: 18%; }
.world .w-note.n0 { left: 5%; --y: 7.5cqw; }
.world .w-note.n1 { left: 21%; --y: 10cqw; }
.world .w-note.n2 { left: 51%; --y: 8cqw; }
.world .w-note.n3 { left: 67%; --y: 10.5cqw; }
@media (prefers-reduced-motion: no-preference) {
  .world .w-note { animation: w-sway 5.5s ease-in-out infinite; }
  .world .w-note.n1 { animation-duration: 6.3s; animation-delay: -2s; }
  .world .w-note.n2 { animation-duration: 5.1s; animation-delay: -3.5s; }
  .world .w-note.n3 { animation-duration: 6.8s; animation-delay: -1s; }
  @keyframes w-sway { 0%, 100% { rotate: -1.6deg; } 50% { rotate: 1.6deg; } }
}
.world .w-frame { position: absolute; right: 4%; top: 17%; width: 13%; margin: 0; z-index: 1; pointer-events: none; }
.world .w-frame .rp-loader.inline { padding: 8% 6%; border: clamp(3px, .5vw, 6px) solid var(--w-edge); border-radius: 10px; background: var(--card); }
.world .w-frame .rp-loader svg { width: 100%; }
.world .w-frame figcaption { margin-top: .5em; text-align: center; font: 500 clamp(8px, 1vw, 12px)/1.3 var(--sans); color: var(--ink-2); }
@media (max-width: 620px) { .world { border-radius: 16px; } }
/* text in the world grows and shrinks with the bench (container units); notes have their own paper in the dark */
.world { container-type: inline-size; }
.world .w-note { font-size: max(7px, 1.2cqw); }
.world .w-frame figcaption { font-size: max(7px, 1.15cqw); }
.world .bubble { font-size: clamp(11px, 1.45cqw, 14.5px); }
html[data-theme="dark"] .world .w-note, html[data-theme="dark"] .world .w-frame .rp-loader.inline { background: #33312d; box-shadow: 0 0 0 1px #4a4843; }
html[data-theme="dark"] .world .bubble { background: #3a3834; }
@media (max-width: 560px) { .world .w-notes, .world .w-frame figcaption { display: none; } .world .bubble { max-width: 48%; } }

/* the bench and, beside it, the page's discussion (assets/discuss.js fills the section in); stacked on narrow screens */
.probie .probie-play { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; margin-top: clamp(28px, 4vh, 44px); }
.probie .probie-play .world-wrap { margin-top: 0; }
.probie .probie-side { min-width: 0; }
.probie .probie-side .discuss { margin-top: 0; border-top: 0; padding-top: 0; }
@media (max-width: 1040px) { .probie .probie-play { grid-template-columns: minmax(0, 1fr); } .probie .probie-side { margin-top: 12px; } }

/* the home page's big logo is also the hidden door to Probie's page: it looks like nothing but the logo */
/* the logo's width is a share of its parent, so the door takes the logo's own width */
.hero .secret-door { display: block; width: min(100%, 420px); color: inherit; text-decoration: none; cursor: pointer; border-radius: 12px; }
.hero .secret-door > .logo.big { width: 100%; }
.hero .secret-door:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

/* on a phone the top bar has room for Blog, Discussion and the language switch; GitHub stays in the footer */
.site-foot .nav-link { white-space: nowrap; }
@media (max-width: 480px) {
  .site-bar .gh-link { display: none; }
  .site-foot { flex-wrap: wrap; gap: 14px 16px; }
  .site-foot nav { flex-wrap: wrap; gap: 8px 14px; }   /* Community, Discussion, Join us, GitHub: two lines if need be */
}

/* ---------- Probie's stickers: a grid of looping GIFs, each a link that saves it ---------- */
.probie .stickers > p { max-width: 40em; }
.probie .st-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 16px); margin: 26px 0 0; padding: 0; list-style: none; }
.probie .st-grid a { display: block; padding: 6%; border-radius: 16px; background: var(--card); transition: translate .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s; }
.probie .st-grid a:hover { translate: 0 -4px; box-shadow: 0 8px 22px rgba(20, 20, 19, .08); }
.probie .st-grid a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.probie .st-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.probie .stickers .st-all { margin: clamp(26px, 3vw, 34px) 0 0; }   /* beats .probie .sec p's margin */
@media (max-width: 900px) { .probie .st-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .probie .st-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .probie .st-grid a { transition: none; } .probie .st-grid a:hover { translate: none; } }
