/* ════════════════════════════════════════════════════════════════════
   research.probability.media: the chrome every page shares.

   The bar at the top and the foot at the bottom, written once instead of
   five times. Each page keeps its own sheet for everything between them;
   this file is linked after that sheet, so it has the last word on the
   two things it owns and no say over anything else.

   The family resemblance is deliberate and limited: the glass bar and
   the centred foot are the hub's and Studios', the colours are Research's
   own. Gold for "research.", the three-step spectrum on the links, and a
   hairline that warms from gold into teal where the two meet.
   ════════════════════════════════════════════════════════════════════ */

/* ── The wordmark ─────────────────────────────────────────────────
   The animated artwork itself, research-wordmark.webp, exactly as it was
   drawn: no effect laid over it. The file carries a soft glow round the
   letters, so it is shown a little larger than the letters alone and
   pulled left by the width of that glow, which keeps the letters on the
   bar's edge. */
.rlogo{display:block;height:34px;aspect-ratio:916/105;flex:none;margin-left:-6px;text-decoration:none}
.rlogo img{display:block;width:100%;height:100%}

/* ── The bar ──────────────────────────────────────────────────────── */
.rbar{
  position:sticky;top:0;z-index:40;flex:none;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  min-height:64px;padding:10px clamp(16px,4vw,48px);
  background:rgba(9,15,19,.62);
  -webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%);
  font-family:Arial,Helvetica,sans-serif;
  transition:background-color .35s ease;
}
/* No full-width rule. A hairline that fades out at both ends and glows in
   the middle, gold running into teal: the family's line in Research's
   colours. */
.rbar::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(190,215,230,.09) 16%,rgba(232,178,60,.5) 42%,rgba(79,209,196,.5) 58%,rgba(190,215,230,.09) 84%,transparent);
}
.rbar.scrolled{background:rgba(8,13,17,.86)}
/* Where a page has found the device cannot hold its frame rate, the blur
   is the first thing to go: it is re-composited on every scroll frame. */
.q1 .rbar{-webkit-backdrop-filter:none;backdrop-filter:none;background:#080e12f7}

.rmark{display:inline-flex;align-items:center;gap:11px;flex:none;min-width:0;text-decoration:none}
.rmark .cube{
  display:block;width:28px;height:28px;flex:none;
  filter:drop-shadow(0 0 7px rgba(140,90,255,.45));
  transition:transform .5s cubic-bezier(.2,.7,.2,1);
}
.rmark:hover .cube{transform:rotate(-8deg) scale(1.06)}
.rmark:focus-visible{outline:2px solid #4fd1c4;outline-offset:6px;border-radius:6px}

/* The three links keep the spectrum they have always had, Engine at the
   cyan end and Forum at the magenta end. The page you are on sits in a
   pill, as on Studios, and the pill is all it needs. */
.rnav{display:flex;align-items:center;gap:2px}
.rnav a{
  position:relative;display:inline-flex;align-items:center;
  padding:9px 14px;border-radius:999px;text-decoration:none;
  font-size:13.5px;font-weight:700;letter-spacing:.04em;color:#a8bcc4;
  transition:background-color .25s ease,box-shadow .25s ease;
}
.rnav a span{background-image:var(--g)}
.rnav a.n1{--g:linear-gradient(100deg,#45e0d0,#4aa8f0)}
.rnav a.n2{--g:linear-gradient(100deg,#4aa8f0,#9a7ef0)}
.rnav a.n3{--g:linear-gradient(100deg,#9a7ef0,#d98ae0)}
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  .rnav a span{-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
}
.rnav a:hover{background:rgba(255,255,255,.035)}
.rnav a[aria-current="page"]{background:rgba(255,255,255,.05);box-shadow:inset 0 0 0 1px rgba(190,215,230,.13)}
.rnav a:focus-visible{outline:2px solid #4fd1c4;outline-offset:2px}

/* The engine's build pill sits between the two, pushed to the middle. */
.rbar .buildpill{margin:0 auto}

@media (max-width:640px){
  .rbar{min-height:54px;padding:8px 12px;gap:8px}
  /* The whole wordmark stays on a phone. The cube steps aside to make the
     room, and the links tighten. */
  .rmark .cube{display:none}
  .rmark .rlogo{height:auto;width:min(40.5vw,168px);max-width:100%;margin:0 -4px}
  .rnav a{padding:8px 7px;font-size:12px;letter-spacing:0}
  /* The links never leave the screen. Phones set the bar in their own
     system font, some wider than others, so instead of trusting a width
     the wordmark is the one allowed to give: if the links need more room
     it narrows a little further, and they keep their size. */
  .rnav{flex:none}
  .rmark{flex:0 1 auto;min-width:0}
}
@media (max-width:360px){
  .rbar{padding:8px 10px;gap:6px}
  .rmark .rlogo{width:37vw}
  .rnav a{padding:7px 5px;font-size:11.5px}
}

/* ── The foot ─────────────────────────────────────────────────────
   Centred, like the hub's and Studios'. It is a surface of its own: the
   homepage's line runs the full height of the page and passes behind the
   foot, so the words need something under them. The pane starts at the
   hairline and deepens from there, so the line and the surface read as
   one object, the edge of the page. */
.rfoot{
  position:relative;z-index:1;flex-shrink:0;
  padding:clamp(44px,7vh,68px) 16px 38px;
  background:linear-gradient(180deg,rgba(9,15,19,.55) 0%,rgba(9,15,19,.86) 38%,rgba(9,15,19,.94) 100%);
  font-family:Arial,Helvetica,sans-serif;
}
.rfoot::before{
  content:"";position:absolute;left:0;right:0;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(190,215,230,.08) 20%,rgba(232,178,60,.45) 44%,rgba(79,209,196,.45) 56%,rgba(190,215,230,.08) 80%,transparent);
}
.rfoot-in{max-width:1180px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.rfoot .rlogo{height:auto;width:min(380px,89vw);margin:0 0 4px}
.rfoot p{margin:0}
.rfam{font-family:ui-monospace,"Cascadia Mono",Consolas,monospace;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:#6f838b}
.rfam a{color:#a8bcc4;text-decoration:none}
.rfam a:hover{color:#e6eef0}
.rmotto{font-family:ui-monospace,"Cascadia Mono",Consolas,monospace;font-size:11px;letter-spacing:.3em;text-transform:uppercase;color:#a8bcc4}
.rmotto i{font-style:normal;margin:0 .25em}
.rmotto i:nth-of-type(1){color:#e8b23c}
.rmotto i:nth-of-type(2){color:#c183e7}
.rmotto i:nth-of-type(3){color:#4fd1c4}
.rlegal{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 12px;font-size:13.5px}
.rlegal a{color:#b9cad0;text-decoration:none;padding:2px 0;border-bottom:1px solid transparent;transition:color .2s,border-color .2s}
.rlegal a:hover{color:#fff;border-bottom-color:rgba(79,209,196,.6)}
.rlegal .sep{color:#3e5059}
.rrights{font-size:12.5px;color:#6f838b}
@media (max-width:640px){
  .rfam{font-size:10px;letter-spacing:.14em;line-height:2}
  /* Two deliberate lines rather than one that breaks wherever it runs out. */
  .rfam .lead{display:block}
  .rfam .lead + .sep{display:none}
  .rmotto{font-size:10px;letter-spacing:.24em}
}

@media (prefers-reduced-motion:reduce){
  .rbar,.rmark .cube,.rnav a{transition:none}
}

/* ── The forum's field ────────────────────────────────────────────
   Behind the forum: a slow network of nodes that drift, join when they
   come close, and pass a point of light from one to the next. The
   homepage's sentence, "patterns propagate through substrates", drawn as
   the place where people pass ideas along. Drawn by chrome.js. */
.rnet{
  /* Below everything in the page without anyone else needing a z-index:
     a negative layer paints over the body's background and under the
     content. */
  position:fixed;inset:0;z-index:-1;pointer-events:none;
  /* Dark on purpose. One faint violet light at the top right and nothing
     else: a teal glow used to sit in the lower corner, and because this
     layer is fixed it stayed behind the replies all the way down a thread
     and tinted them green. Reading comes first. */
  background:radial-gradient(1100px 620px at 82% -10%,rgba(64,52,150,.2),transparent 60%);
}
.rnet canvas{
  position:absolute;inset:0;width:100%;height:100%;display:block;
  /* Barely there in the middle, where the reading is, fuller at the edges. */
  -webkit-mask-image:radial-gradient(ellipse 50% 70% at 50% 50%,rgba(0,0,0,.12) 0%,rgba(0,0,0,.3) 55%,#000 100%);
          mask-image:radial-gradient(ellipse 50% 70% at 50% 50%,rgba(0,0,0,.12) 0%,rgba(0,0,0,.3) 55%,#000 100%);
}

/* ── Touch: no rectangle on tap (2026-11-23) ──────────────────────────────
   A phone's browser flashes its own highlight over whatever is tapped, and
   draws it as a plain rectangle over the element's box: on a rounded button
   or chip the square corners stick out past the button's own. It is turned
   off for the whole page (the property is inherited, so one line on <html>
   reaches every link and button, including ones added later), and what is
   pressed says so in its own shape instead, by dimming while the finger is
   down. Only where there is no mouse: a pointer already has :hover. */
html{-webkit-tap-highlight-color:transparent}
@media (hover:none){
  a:active,button:active,summary:active,[role="button"]:active,[role="tab"]:active{opacity:.7}
}
