/* The Remote Desk (demo partner page). Off, a calm partner blog; with the x-ray on, a blueprint of how it is built. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/BricolageGrotesque-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f1f4f2;
  --ink: #17212b;
  --slate: #56626e;
  --lagoon: #0d6b63;
  --tag: #f2c14e;
  --bp: #0e3a7a;
  --bp-deep: #0a2c5e;
  --bp-line: #7fa8f5;
  --bp-ink: #f4f8ff;
  --ok: #7bc590;
  --wait: #f2c14e;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--body);
}
html[data-xray] body {
  background-image:
    linear-gradient(to right, rgba(14, 58, 122, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 58, 122, .07) 1px, transparent 1px);
  background-size: 24px 24px;
}
a { color: var(--lagoon); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--lagoon); outline-offset: 2px; }
.demobar :focus-visible, .note :focus-visible { outline-color: var(--bp-ink); }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1, h2, .wordmark { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: .5rem; }
h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; }
h2::before { content: ""; display: block; width: 2.2rem; height: 6px; background: var(--tag); margin-bottom: .6rem; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; }
code, pre, .chip, .label, time { font-family: var(--mono); }

/* demo bar */
.demobar {
  position: sticky; top: 0; z-index: 10; background: var(--bp); color: var(--bp-ink);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between;
  padding: .6rem 16px; font-size: .95rem;
}
.demobar p { margin: 0; flex: 1 1 22rem; }
.demobar-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.demobar button, .demobar .join {
  font: 600 .9rem/1.2 var(--body); padding: .55rem .9rem; border-radius: 6px; cursor: pointer; text-decoration: none;
  border: 2px solid var(--bp-ink); color: var(--bp-ink); background: transparent;
}
.demobar button[aria-pressed="true"] { background: var(--bp-ink); color: var(--bp); }
.demobar .join { background: var(--tag); border-color: var(--tag); color: #17212b; }

/* masthead */
.mast { max-width: 712px; margin: 0 auto; padding: 1.4rem 16px .6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1rem; border-bottom: 1px solid #c9d2cd; }
.wordmark { font-size: 1.7rem; margin: 0; }
.blogname { margin: 0; color: var(--slate); font-family: var(--mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.disclosure { flex-basis: 100%; margin: .4rem 0 0; color: var(--slate); font-size: .9rem; }

/* article */
.article { display: grid; grid-template-columns: minmax(0, 680px); justify-content: center; padding: 1.5rem 16px 3rem; column-gap: 40px; }
.article > *, .article > .head > *, .article > section > * { grid-column: 1; min-width: 0; }
.head .dek { font-size: 1.15rem; color: var(--slate); }
.article section { min-width: 0; }
/* sections and the head only group text: their children join the article grid, so a placement can span both columns */
.article > .head, .article > section:not(.panel) { display: contents; }

.placement { margin: 1.4rem 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.live a#link-classic, .live a#link-path { font-weight: 600; }
.live { position: relative; }
.live a[data-fvpn-open], .live > a:not([id^="link-"]) { display: inline-block; }
#click-id { display: block; margin-top: .6rem; font-size: .85rem; color: var(--slate); }
#click-id code { font-size: .85rem; }
.qr-prompt { margin-bottom: .6rem; }
#qr { display: block; width: 168px; height: 168px; background: #fff; padding: 12px; border: 1px solid #c9d2cd; border-radius: 6px; }
#qr path { fill: var(--ink); }
.qr-link { margin: .8rem 0 0; }
/* the V1 link (and V2) are plain links until the loader runs; give them a button's weight */
#link-v1, #v2 { font-weight: 600; }

/* x-ray: dashed outline and mono tab on every live element */
html[data-xray] .live { outline: 2px dashed var(--bp); outline-offset: 6px; margin-top: 1.4rem; }
html[data-xray] .live::before {
  content: attr(data-label); position: absolute; left: -2px; top: -1.45rem; background: var(--bp); color: var(--bp-ink);
  font: 600 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: .3rem .5rem;
}

/* notes (the blueprint) */
.note {
  background: var(--bp); color: var(--bp-ink); border: 1px solid var(--bp-line); border-radius: 8px;
  padding: 1rem 1.1rem; font-size: .88rem; line-height: 1.5; min-width: 0;
}
.note p { margin: 0 0 .7em; }
.note a { color: var(--bp-ink); }
.note .label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--bp-line); }
.note .meta { font-family: var(--mono); font-size: .78rem; }
.note pre { background: var(--bp-deep); border: 1px solid var(--bp-line); border-radius: 6px; }
.note pre code { color: var(--bp-ink); }
.chip { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border: 1px solid currentColor; border-radius: 999px; }
.chip.ok { color: var(--ok); }
.chip.wait { color: var(--wait); }
td .chip { margin-left: .4rem; color: var(--slate); }
.copy {
  font: 600 .8rem/1.2 var(--mono); padding: .45rem .75rem; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--lagoon); border: 2px solid var(--lagoon); margin: .2rem 0 .6rem;
}
.note .copy { color: var(--bp-ink); border-color: var(--bp-line); }

/* no script: every note is visible; with script, only under the x-ray */
html.js:not([data-xray]) .note { display: none; }
html.js[data-xray] .note { animation: note-in 200ms ease-out both; }
@keyframes note-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

pre {
  margin: .6rem 0; padding: .8rem 1rem; overflow-x: auto; max-width: 100%;
  background: #e3e9e6; border-radius: 6px; font-size: .8rem; line-height: 1.5;
}
pre code { font-size: inherit; white-space: pre; }
.scroll { overflow-x: auto; max-width: 100%; }

.panel { background: #fff; border: 1px solid #c9d2cd; border-radius: 10px; padding: 0 1.2rem 1.2rem; margin-top: 2rem; }
.panel h2 { margin-top: 1.4rem; }
#events { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
#events li { padding: .35rem 0; border-top: 1px solid #e3e9e6; overflow-wrap: anywhere; }
#events time { color: var(--slate); margin-right: .5rem; }

table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: .78rem; min-width: 720px; }
caption { text-align: left; font-family: var(--body); font-weight: 600; padding-bottom: .4rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid #e3e9e6; white-space: nowrap; }
th { background: #e3e9e6; font-weight: 600; }
#pb-empty { color: var(--slate); margin-top: 1rem; }
.steps li { margin-bottom: .6rem; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.trio h3 { margin-top: .6rem; }
.links { padding-left: 1.2rem; }
.join.big { display: inline-block; background: var(--lagoon); color: #fff; padding: .8rem 1.4rem; border-radius: 8px; font-weight: 600; text-decoration: none; }
.foot { text-align: center; padding: 1.5rem 16px 3rem; color: var(--slate); font-size: .9rem; }

/* the R-5 row 7 wrapper: transformed and animated on purpose; kept under reduced motion */
.tx { transform: translateZ(0); animation: tx-in 600ms ease-out both; }
@keyframes tx-in { from { opacity: 0; } to { opacity: 1; } }
.testpage .article { grid-template-columns: minmax(0, 760px); }

/* wide: the rail sits beside each placement (x-ray on, or no script so the notes are visible) */
@media (min-width: 1100px) {
  html[data-xray] .mast, html:not(.js) .mast { max-width: 1092px; }
  html[data-xray] .article, html:not(.js) .article { grid-template-columns: minmax(0, 640px) minmax(0, 380px); }
  html[data-xray] .placement, html:not(.js) .placement { grid-column: 1 / -1; grid-template-columns: subgrid; align-items: start; }
  html[data-xray] .placement > .live, html:not(.js) .placement > .live { grid-column: 1; }
  html[data-xray] .placement > .note, html:not(.js) .placement > .note { grid-column: 2; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .demobar { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html.js[data-xray] .note { animation: none; }
}
