/* UKBOX Connect - the house look, shared by every page of the site (home, help, open source, quick start).
   Night of 24 to 25 Nov 2026, website lane. Taken from the home page's own stylesheet (home3) and sharpened.
   Rules of the site's content security policy that this file keeps: no inline styles, no pictures or fonts from
   anywhere but this site, no data: addresses. Fonts are the two the site already ships (sg-600, sg-700), beside
   this file in /ukbox/a/. Movement is switched off for people who ask for less motion. Dark only. */

@font-face { font-family: "SG"; src: url("sg-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "SG"; src: url("sg-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* colour: obsidian grounds, emerald for action and "live", gold ONLY for "needs you" */
  --bg: #050B08; --bg2: #08110D; --bg3: #0C1813; --panel: #0A1410; --panel2: #0F1D17;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14); --line-em: rgba(127, 224, 168, .28);
  --green: #2FBF71; --green2: #7FE0A8; --mint: #B9F3D3; --teal: #4FD1C5; --gold: #F5B840; --red: #E5484D;
  --text: #F1F6F3; --body: #C3D2CA; --muted: #8DA298; --ink: #04110A;
  /* type */
  --head: "SG", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --fs-display: clamp(2.5rem, 6.4vw, 5.1rem); --fs-h1: clamp(2.1rem, 4.8vw, 3.6rem); --fs-h2: clamp(1.9rem, 4.1vw, 3.2rem);
  --fs-h3: 1.22rem; --fs-lead: clamp(1.05rem, 1.6vw, 1.22rem); --fs-body: 1rem; --fs-small: .94rem; --fs-fine: .86rem; --fs-label: .78rem;
  /* space (4px steps), radius, depth */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --sec: clamp(72px, 10vw, 136px);
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 32px; --r-pill: 999px;
  --glow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 10px 26px rgba(47, 191, 113, .28);
  --glow2: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 16px 34px rgba(47, 191, 113, .38);
  --drop: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  /* movement */
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1); --out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
html, body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.6 var(--sans); }
body { overflow-x: hidden; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--green2); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--text); margin: 0; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
p { margin: 0; }
b, strong { color: var(--text); }
:focus-visible { outline: 2px solid var(--green2); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(47, 191, 113, .35); color: #fff; }

/* ---- layout */
.wrap { width: min(1200px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }
.wrap.narrow { width: min(820px, calc(100% - 32px)); }
.sec { padding: var(--sec) 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2, .grid-4 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--green); color: var(--ink); border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---- words */
.kicker { margin: 0 0 14px; font: 700 var(--fs-label)/1 var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--green); }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--body); }
.sec-head { max-width: 46rem; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head p:not(.kicker) { margin-top: 18px; font-size: 1.1rem; }
.muted { color: var(--muted); }
.fine { font-size: var(--fs-fine); color: var(--muted); }
.label { font: 600 var(--fs-label)/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
.grad { background: linear-gradient(100deg, #7FE0A8 0%, #2FBF71 38%, #B9F3D3 62%, #4FD1C5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* long text (help, open source, quick start): put it in .prose */
.prose { max-width: 46rem; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { margin: 1em 0 0; padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--green); }

/* ---- buttons: ONE primary action per screenful (.btn); anything else is .btn-ghost or a plain link */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border: 0; border-radius: var(--r-pill);
  font: 700 .98rem/1 var(--head); text-decoration: none; color: var(--ink); background: linear-gradient(180deg, #4BDB8D, #27B366);
  box-shadow: var(--glow); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--glow2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.06rem; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .92rem; }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 1px var(--line2) inset; }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1px var(--line-em) inset; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---- small labels */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--fs-fine); font-weight: 600; color: var(--mint);
  background: rgba(47, 191, 113, .08); border: 1px solid rgba(127, 224, 168, .22); }
.chip.quiet { color: var(--body); background: rgba(255, 255, 255, .04); border-color: var(--line2); }
.chip.gold { color: var(--gold); background: rgba(245, 184, 64, .08); border-color: rgba(245, 184, 64, .3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }

/* ---- cards and panels */
.card { position: relative; padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015)); }
.card h3 + p { margin-top: 8px; color: var(--muted); font-size: var(--fs-small); }
a.card, .card.lift { transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease); }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover, .card.lift:hover { transform: translateY(-4px); border-color: var(--line-em); background: linear-gradient(180deg, rgba(47, 191, 113, .08), rgba(47, 191, 113, .02)); }
.card .ico { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: var(--s4); border-radius: 12px; color: var(--green2);
  background: rgba(47, 191, 113, .1); border: 1px solid rgba(127, 224, 168, .25); }
.ico svg, .ticks svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.panel { border-radius: var(--r-xl); border: 1px solid var(--line-em); background: radial-gradient(120% 140% at 50% 0%, rgba(47, 191, 113, .16), rgba(47, 191, 113, .02) 60%), var(--bg2); }
.note { padding: var(--s4) var(--s5); border-radius: var(--r-md); border: 1px solid var(--line2); border-left: 3px solid var(--green); background: rgba(255, 255, 255, .03); }
.note.gold { border-left-color: var(--gold); }

/* a picture of a screen: thin frame, corner marks drawn by the frame itself */
.shot { position: relative; margin: 0; border-radius: var(--r-md); background: #030705; box-shadow: var(--drop); }
.shot img { display: block; width: 100%; height: auto; border-radius: inherit; }
.shot.marks::before, .shot.marks::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--green2); opacity: .8; pointer-events: none; }
.shot.marks::before { left: -8px; top: -8px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.shot.marks::after { right: -8px; bottom: -8px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.shot figcaption, .cap { margin-top: 12px; font-size: var(--fs-fine); color: var(--muted); }

/* ---- lists */
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: rgba(47, 191, 113, .16); border: 1px solid rgba(127, 224, 168, .45); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: calc(.35em + 4px); width: 5px; height: 8px; border: solid var(--green2); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.steps { list-style: none; counter-reset: s; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.steps li { position: relative; padding-left: 54px; counter-increment: s; min-height: 38px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  font: 700 1rem/1 var(--head); color: var(--ink); background: linear-gradient(180deg, #7FE0A8, #2FBF71); }

/* ---- tables (the open source page's list of files; guides) */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); }
table.t { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.t th, .t td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.t th { font: 700 var(--fs-label)/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .03); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- the bar at the top (same on every page) */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background .35s var(--ease), border-color .35s var(--ease); }
.nav.scrolled, .nav.solid { background: rgba(5, 11, 8, .78); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.nav-in { height: 68px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); font: 700 1.08rem/1 var(--head); letter-spacing: -0.01em; }
.brand:hover { color: #fff; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.nav-links { display: none; margin-left: auto; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: var(--r-pill); color: var(--body); text-decoration: none; font-size: var(--fs-small); font-weight: 500; transition: background .2s, color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-cta { margin-left: auto; }
@media (min-width: 980px) { .nav-links { display: flex; } .nav-cta { margin-left: 8px; } }
.page-top { padding-top: 116px; }  /* first block of a page that has no hero: clears the fixed bar */

/* ---- the foot (same on every page) */
.foot { border-top: 1px solid var(--line); padding: 46px 0 34px; background: var(--bg); }
.foot-in { display: grid; gap: 22px; }
.foot-brand p { margin: 12px 0 0; color: var(--muted); max-width: 30rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.foot-links a { color: var(--body); text-decoration: none; }
.foot-links a:hover { color: #fff; }
.foot-legal { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.foot-legal p { margin: 0 0 8px; color: var(--muted); font-size: var(--fs-fine); }
.foot-legal .tm { font-size: .76rem; opacity: .75; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1fr auto; align-items: end; } }

/* ---- movement: nothing is hidden unless the page's own script has said it is running (html.js) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--out), transform .9s var(--out); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
