/* Kajeet Next. One stage: emerald space, a lime sphere, films on a ring of glass. */
@font-face { font-family: Manrope; src: url(/fonts/Manrope-VF.ttf) format('truetype'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(/fonts/DMSans-VF.ttf) format('truetype'); font-weight: 100 1000; font-display: swap; }

:root {
  --emerald: #14333B; --deep: #0B1F24; --lime: #B3E331; --teal: #035E6E; --mist: #DFF1E9; --hi: #EFFFA8;
  /* geometry: main.js sets the same values in px on load and on resize; these are the first-paint defaults */
  --cy: 38vh; --sd: clamp(210px, 44vh, 520px); --cw: 400px; --ch: 234px; --ty: 73vh; --tp: clamp(35px, 4.4vw, 72px); --ry: 82vh; --rp: 16px;
  --pad: 40px;
}
@media (max-width: 699px) { :root { --sd: clamp(210px, 36vh, 520px); --pad: 28px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { background: var(--deep); color: #fff; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow: hidden; background: var(--deep); font: 400 17px/1.5 'DM Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg { display: block; }
::selection { background: var(--lime); color: var(--deep); }

/* ================= space ================= */
#space { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse 78% 86% at 50% var(--cy), #173C45 0%, #153842 18%, #11303A 40%, #0E2830 62%, #0C2228 82%, #0B1F24 100%); }
#space i { position: absolute; left: 50%; display: block; }
/* a very soft, very large lime bloom behind the sphere, cooling to teal at its edge */
.bloom { top: var(--cy); width: calc(var(--sd) * 6.4); height: calc(var(--sd) * 5.2); transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(179, 227, 49, .15) 0%, rgba(179, 227, 49, .085) 26%, rgba(3, 94, 110, .13) 56%, rgba(3, 94, 110, 0) 100%); }
/* the sphere's reflection on an implied floor */
.floor { top: calc(var(--cy) + var(--sd) * 1.16); width: min(calc(var(--sd) * 2.9), 96vw); height: calc(var(--sd) * .46); transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(196, 240, 74, .2) 0%, rgba(179, 227, 49, .1) 36%, rgba(179, 227, 49, .03) 70%, rgba(179, 227, 49, 0) 100%); }

/* ================= stage ================= */
#stage { position: fixed; inset: 0; z-index: 1; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
#stage.dragging { cursor: grabbing; }
#stage.dragging .card { cursor: grabbing; }

/* ---- the sphere ---- */
.halo, .ball { position: absolute; left: 50%; top: var(--cy); pointer-events: none; }
html:not(.ready) .halo, html:not(.ready) .ball { opacity: 0; }   /* main.js fades the sphere up */
.halo { width: 0; height: 0; }
.halo i { position: absolute; display: block; border-radius: 50%; animation: breathe 6s ease-in-out infinite; will-change: transform, opacity; }
.halo.wide { z-index: 2; }
.halo.wide i { --s: calc(var(--sd) * 3.5); width: var(--s); height: var(--s); left: calc(var(--s) / -2); top: calc(var(--s) / -2); animation-delay: -3s;
  background: radial-gradient(closest-side, rgba(179, 227, 49, .24) 0%, rgba(179, 227, 49, .15) 30%, rgba(179, 227, 49, .06) 52%, rgba(3, 94, 110, .07) 74%, rgba(3, 94, 110, 0) 100%); }
.halo.tight { z-index: 499; }
.halo.tight i { --s: calc(var(--sd) * 1.74); width: var(--s); height: var(--s); left: calc(var(--s) / -2); top: calc(var(--s) / -2);
  background: radial-gradient(closest-side, rgba(205, 246, 84, .5) 56%, rgba(190, 236, 64, .22) 65%, rgba(179, 227, 49, .075) 78%, rgba(179, 227, 49, 0) 100%); }
@keyframes breathe { 0%, 100% { transform: scale(.975); opacity: .8; } 50% { transform: scale(1.045); opacity: 1; } }

.ball { z-index: 500; width: calc(var(--sd) * 1.25); height: calc(var(--sd) * 1.25); margin: calc(var(--sd) * -.625) 0 0 calc(var(--sd) * -.625); will-change: transform, opacity; }
.ball canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.gl .ball canvas { opacity: 1; }
.ball .hit { position: absolute; inset: 10%; border-radius: 50%; pointer-events: auto; }
/* the sphere without WebGL: lit upper left, lime body, deep green then emerald at the terminator, a bright rim */
.ball .fallback { position: absolute; inset: 10%; border-radius: 50%;
  background:
    radial-gradient(circle at 31% 27%, rgba(239, 255, 168, .96) 0%, rgba(239, 255, 168, .62) 9%, rgba(239, 255, 168, .2) 22%, rgba(239, 255, 168, 0) 36%),
    radial-gradient(circle at 37% 33%, #C6EE4B 0%, #B3E331 34%, #94C92F 52%, #5E9130 68%, #2E5D36 82%, #17393D 94%, #14333B 100%);
  box-shadow: inset 0 0 0 1.5px rgba(239, 255, 168, .42), inset 3px 4px 22px rgba(239, 255, 168, .45), inset -22px -30px 70px rgba(11, 31, 36, .5); }
.gl .ball .fallback { opacity: 0; }

/* ---- the glass cards ---- */
.card { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2); border-radius: 22px;
  visibility: hidden; cursor: pointer; will-change: transform, opacity; contain: layout style; -webkit-user-drag: none;
  background: linear-gradient(135deg, rgba(223, 241, 233, .2) 0%, rgba(223, 241, 233, .06) 100%);
  box-shadow: 0 36px 70px -30px rgba(3, 12, 14, .8), 0 12px 28px -14px rgba(3, 12, 14, .55), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .05); }
.card.near { background: linear-gradient(135deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .04) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
/* 1 px light edge, brightest at the top left */
.card::before, .pframe::before { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .78) 0%, rgba(255, 255, 255, .3) 22%, rgba(255, 255, 255, .08) 52%, rgba(255, 255, 255, .2) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
/* lime light caught by the glass from the sphere: a soft pool in the frame and a crisp line on the edge, both placed by main.js */
.lit, .edge { position: absolute; inset: 0; z-index: 0; border-radius: inherit; overflow: hidden; pointer-events: none; visibility: hidden; }
.lit i, .edge i { position: absolute; left: 50%; top: 50%; display: block; border-radius: 50%; opacity: 0; will-change: transform, opacity; }
.lit i { --s: calc(var(--cw) * .8); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: radial-gradient(closest-side, rgba(205, 246, 84, .5) 0%, rgba(179, 227, 49, .24) 34%, rgba(179, 227, 49, .07) 68%, rgba(179, 227, 49, 0) 100%); }
.edge { z-index: 4; padding: 1.5px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.edge i { --s: calc(var(--cw) * 1.0); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: radial-gradient(closest-side, rgba(239, 255, 168, 1) 0%, rgba(200, 244, 70, .95) 22%, rgba(179, 227, 49, .5) 55%, rgba(179, 227, 49, 0) 100%); }
.pic { position: absolute; inset: 10px; z-index: 2; border-radius: 14px; overflow: hidden; background: #10292F; box-shadow: 0 0 0 1px rgba(11, 31, 36, .28), 0 3px 12px rgba(3, 12, 14, .3); }
.pic img, .pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pic video { opacity: 0; transition: opacity .55s ease; }
.pic video.on { opacity: 1; }
.pic::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); pointer-events: none; }
.shade { position: absolute; inset: 0; z-index: 3; border-radius: inherit; background: var(--deep); opacity: 0; pointer-events: none; will-change: opacity; }
.play { position: absolute; left: 50%; top: 50%; z-index: 5; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; display: grid; place-items: center; visibility: hidden; opacity: 0; will-change: transform, opacity;
  background: linear-gradient(135deg, rgba(20, 51, 59, .46) 0%, rgba(11, 31, 36, .3) 100%);   /* emerald glass, so the lime triangle reads on any picture */
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34), inset 0 1.5px 0 rgba(255, 255, 255, .42), inset 0 -12px 18px -12px rgba(255, 255, 255, .14), 0 12px 32px -8px rgba(3, 12, 14, .65); }
.play svg { width: 28px; height: 28px; margin-left: 4px; fill: var(--lime); filter: drop-shadow(0 0 10px rgba(179, 227, 49, .55)); }

/* ---- the title of the film in front, and under it the film's two ratings ---- */
#title { position: absolute; left: 0; right: 0; top: var(--ty); z-index: 1000; margin: 0; pointer-events: none; text-align: center;
  font: 300 var(--tp)/1.06 Manrope, system-ui, sans-serif; letter-spacing: -.045em; color: #fff; text-shadow: 0 2px 30px rgba(11, 31, 36, .55); }
#title .t { position: absolute; left: 0; right: 0; top: 0; margin: 0 auto; width: min(90vw, 1340px); opacity: 0; text-wrap: balance; will-change: transform, opacity; }
#rate { position: absolute; left: 0; right: 0; top: var(--ry); z-index: 1000; margin: 0; pointer-events: none; text-align: center;
  font: 400 var(--rp)/1.3 'DM Sans', system-ui, sans-serif; letter-spacing: .012em; color: rgba(223, 241, 233, .66); font-variant-numeric: tabular-nums; }
#rate .r { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: center; gap: 2.1em; white-space: nowrap; opacity: 0; will-change: transform, opacity; }
#rate .g { display: inline-flex; align-items: baseline; }
#rate .k { margin-right: .62em; }
#rate .v { font-weight: 600; font-size: 1.14em; color: #fff; }
#rate .o { margin-left: .06em; color: rgba(223, 241, 233, .46); }

/* ---- the product without WebGL: the picture laid over the CSS sphere. It takes its lime from the ball (luminosity) and the
   ball's highlight and shade are laid back over it. With WebGL the shader draws the product inside the glass and this is off. ---- */
#product { position: absolute; left: 50%; top: calc(var(--cy) - var(--sd) / 2); z-index: 501; width: var(--sd); height: var(--sd); margin-left: calc(var(--sd) / -2); pointer-events: none;
  border-radius: 50%; overflow: hidden; mix-blend-mode: luminosity;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 62%, transparent 97%); mask-image: radial-gradient(circle closest-side, #000 62%, transparent 97%); }
.gl #product { display: none; }
#product .p { position: absolute; inset: 7% -8% auto -8%; height: 62.1%; opacity: 0; will-change: transform, opacity; }
#product img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(.8) contrast(1.12); }
#product::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .16) 13%, rgba(255, 255, 255, 0) 30%),
              radial-gradient(circle at 36% 30%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, .2) 72%, rgba(0, 0, 0, .5) 100%); }

/* ---- the gate: one glass input ---- */
#gate { position: absolute; left: 0; right: 0; top: calc(var(--cy) + var(--sd) * .5 + clamp(44px, 8vh, 84px)); z-index: 1000; width: fit-content; margin: 0 auto; }
#word { display: block; width: min(320px, 82vw); height: 54px; padding: 0 22px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .24); outline: none; text-align: center; cursor: text;
  font: 500 17px/1 'DM Sans', system-ui, sans-serif; letter-spacing: .02em; color: #fff; caret-color: var(--lime); -webkit-text-security: disc; -webkit-appearance: none; appearance: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .17) 0%, rgba(255, 255, 255, .05) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 22px 44px -22px rgba(3, 12, 14, .8);
  transition: border-color .25s ease, box-shadow .25s ease; }
#word:placeholder-shown { caret-color: transparent; }   /* empty: the caret drawn below stands in for the real one, which would sit in the middle of the word */
@media (hover: hover) { #word:hover { border-color: rgba(255, 255, 255, .42); } }
/* the word in the empty box, with a caret blinking before it, so the box reads as a place to type before anyone has clicked it.
   The input's own placeholder is a single space: it only tells the page when the box is empty. */
#hint { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none;
  font: 500 17px/1 'DM Sans', system-ui, sans-serif; letter-spacing: .01em; color: rgba(223, 241, 233, .62); }
#word:placeholder-shown + #hint { display: flex; }
#hint span { position: relative; }
#hint i { position: absolute; right: calc(100% + 6px); top: 50%; width: 2px; height: 22px; margin-top: -11px; border-radius: 1px; background: var(--lime); animation: caret 1.1s infinite; }
@keyframes caret { 0%, 42% { opacity: 1; } 50%, 92% { opacity: 0; } 100% { opacity: 1; } }
#word:focus-visible { border-color: rgba(179, 227, 49, .72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 22px 44px -22px rgba(3, 12, 14, .8), 0 0 0 3px rgba(179, 227, 49, .16); }

/* ================= header ================= */
#brand { position: fixed; left: var(--pad); top: var(--pad); z-index: 5; margin: 0; pointer-events: none; }
#brand img { display: block; height: 38px; width: auto; }       /* 180 by 38: the sizes scripts/logo.py cuts */
#tools { position: fixed; right: var(--pad); top: calc(var(--pad) - 1px); z-index: 5; opacity: 0; }
/* one flat button, shared with the research page: no gradient, no shadow, no blur */
.kbtn { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px 0 13px; border-radius: 10px; white-space: nowrap; text-decoration: none; cursor: pointer;
  font: 600 14px/1 'DM Sans', system-ui, sans-serif; letter-spacing: .01em; color: #F4FBF7; background: rgba(223, 241, 233, .09);
  transition: background-color .2s ease, color .2s ease; -webkit-tap-highlight-color: transparent; }
.kbtn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s ease; }
.kbtn:hover, .kbtn:focus-visible { background: var(--lime); color: var(--emerald); }
.kbtn:hover svg, .kbtn:focus-visible svg { stroke: var(--emerald); }
.kbtn:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; }
/* the toggle between the sets of ideas: one flat track, the lime thumb under the chosen name */
#sets { position: fixed; left: 0; right: 0; top: calc(var(--pad) - 1px); z-index: 5; display: flex; justify-content: center; pointer-events: none; opacity: 0; }
.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); height: 40px; padding: 3px; border-radius: 10px; background: rgba(223, 241, 233, .09); pointer-events: auto; }
.seg .thumb { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / var(--n, 2)); border-radius: 8px; background: var(--lime);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .5s cubic-bezier(.3, .75, .15, 1); }
.seg button { position: relative; min-width: 106px; padding: 0 18px; border-radius: 8px; white-space: nowrap;
  font: 600 14px/1 'DM Sans', system-ui, sans-serif; letter-spacing: .01em; color: rgba(244, 251, 247, .74); transition: color .3s ease; }
.seg button:hover { color: #fff; }
.seg button[aria-pressed="true"] { color: var(--emerald); cursor: default; }
.seg button:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }
/* a window too narrow to hold the toggle between the logo and the research button: main.js sets this and the toggle takes the row below them */
.sets-below #sets { top: calc(var(--pad) + 52px); }

/* ================= player ================= */
#player { position: fixed; inset: 0; z-index: 10; }
.veil { position: absolute; inset: 0; opacity: 0; background: rgba(8, 23, 27, .64); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.pframe { position: absolute; left: 0; top: 0; padding: 5px; border-radius: 23px; transform-origin: 0 0; will-change: transform;
  background: linear-gradient(135deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, .05) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 70px 140px -50px rgba(2, 9, 11, .9), 0 24px 60px -30px rgba(2, 9, 11, .7); }
.pscreen { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--deep); transform: translateZ(0); }
.pscreen video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: var(--deep); outline: none; }
.pscreen .cover { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; }
/* captions, drawn over the film by main.js (its font size follows the player), and the button that turns them on */
.pcap { position: absolute; left: 0; right: 0; bottom: max(16%, 54px); z-index: 2; display: flex; justify-content: center; padding: 0 4%; pointer-events: none; }
.pcap span { max-width: 88%; padding: .28em .72em; border-radius: .42em; white-space: pre-line; text-align: center; font: 500 1em/1.35 'DM Sans', system-ui, sans-serif; color: #fff; background: rgba(8, 23, 27, .8); }
.pcc { position: absolute; right: 12px; top: 12px; z-index: 2; height: 32px; padding: 0 10px; border-radius: 8px; opacity: 0;
  font: 700 12px/1 'DM Sans', system-ui, sans-serif; letter-spacing: .06em; color: #fff; background: rgba(11, 31, 36, .58); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.pcc[aria-pressed="true"] { background: var(--lime); color: var(--emerald); box-shadow: none; }
.pcc:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
/* the lime light round the frame: drawn by js/border.js, placed by main.js. Without WebGL the frame takes a still lime edge instead. */
.pglow { position: absolute; left: 0; top: 0; display: block; pointer-events: none; visibility: hidden; }
#player.lit .pframe { box-shadow: 0 70px 140px -50px rgba(2, 9, 11, .9), 0 24px 60px -30px rgba(2, 9, 11, .7), 0 0 0 1px rgba(200, 244, 70, .7), 0 0 26px rgba(179, 227, 49, .34), 0 0 80px rgba(179, 227, 49, .16); transition: box-shadow .6s ease; }
.pmeta { position: absolute; left: 0; top: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.pwords { min-width: 0; }
.pmeta h2 { margin: 0; font: 575 34px/1.12 Manrope, system-ui, sans-serif; letter-spacing: -.03em; color: #fff; }
.pmeta p { margin: 8px 0 0; max-width: 64ch; font: 400 18px/1.42 'DM Sans', system-ui, sans-serif; color: var(--mist); }
.brief { flex: none; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 1px; padding: 6px 2px; border-radius: 6px; white-space: nowrap; text-decoration: none;
  font: 500 17px/1.2 'DM Sans', system-ui, sans-serif; color: #fff; opacity: .84; transition: opacity .2s ease; }
.brief svg { width: 15px; height: 15px; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.2, .7, .1, 1); }
.brief:hover, .brief:focus-visible { opacity: 1; }
.brief:hover svg, .brief:focus-visible svg { transform: translate(2px, -2px); }
.pclose { position: absolute; right: 28px; top: 28px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; opacity: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, .06) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26), inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 30px -12px rgba(2, 9, 11, .7); transition: background-color .2s ease; }
.pclose:hover { background-color: rgba(255, 255, 255, .1); }
.pclose svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; }
.brief:focus-visible, .pclose:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }

@media (max-width: 699px) {
  /* a narrow screen holds less glow, so the space stays emerald */
  .bloom { opacity: .55; }
  .halo.wide i { --s: calc(var(--sd) * 2.6); }
  .halo.tight i { --s: calc(var(--sd) * 1.56); background: radial-gradient(closest-side, rgba(205, 246, 84, .5) 63%, rgba(190, 236, 64, .2) 72%, rgba(179, 227, 49, .06) 85%, rgba(179, 227, 49, 0) 100%); }
  .pmeta { flex-direction: column; align-items: flex-start; gap: 14px; }
  .pmeta h2 { font-size: 26px; }
  .pmeta p { font-size: 16px; }
  .pclose { right: 18px; top: 18px; }
  .pcc { right: 8px; top: 8px; }
  /* the logo is two words wide: smaller here, and smaller again under 385 px, so it clears the research button; it stays centred on that button */
  #brand { top: calc(var(--pad) + 19px - min(15px, 3.9vw)); }
  #brand img { height: min(30px, 7.8vw); }
  #sets { top: calc(var(--pad) + 52px); }                          /* a second row, under the logo and the research button */
  .seg { height: 36px; }
  .seg button { min-width: 98px; padding: 0 10px; font-size: 13.5px; }   /* three sets across stay inside the page's own margins; two keep their 98 px each */
}

@media (max-width: 349px) { #tools .kbtn { gap: 6px; padding: 0 11px 0 9px; font-size: 13px; } .seg button { padding: 0 6px; } }   /* the narrowest phones */
@media (prefers-reduced-motion: reduce) {
  .halo i { animation: none; opacity: .92; }
  .brief svg { transition: none; }
  .seg .thumb { transition: none; }
  #hint i { animation: none; }                                     /* a steady caret */
}
