/* Catflap: the website's components. Colours, fonts and shapes come from the
   theme stylesheet the layout links first (static/themes/<theme>.css, copied
   from design/brand/themes by task brand:sync). Use only the theme's
   variables here, never a brand colour. No inline styles: the CSP
   forbids them. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font-family: var(--body); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
body.app { background: var(--surface); }
body > main { flex: 1 0 auto; }
h1, h2, h3, h4, .h { font-family: var(--head); color: var(--ink); margin: 0; letter-spacing: var(--h-spacing); }
h1 { font-weight: var(--h1-weight); font-size: 40px; line-height: 1.12; }
h2 { font-weight: 700; font-size: 28px; line-height: 1.2; }
h3 { font-weight: 600; font-size: 20px; line-height: 1.3; }
h4 { font-weight: 600; font-size: 16px; line-height: 1.35; }
.h { font-weight: 600; }
p { margin: 0; line-height: 1.6; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-color: var(--link-line); }
a:hover { color: var(--primary-hover); }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .92em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
kbd { font-size: 12px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--raised); color: var(--ink-2); }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* copy buttons, the palette and dialogs need app.js; without it they stay out of the way */
html:not(.js) .js-only { display: none !important; }

.eyebrow { font-family: var(--eyebrow-font); font-weight: var(--eyebrow-weight); font-size: var(--eyebrow-size); letter-spacing: var(--eyebrow-spacing); text-transform: uppercase; color: var(--eyebrow-color); }
.eyebrow.turq, .hero .eyebrow, .on-hero .eyebrow { color: var(--hero-accent); }
.eyebrow.gold { color: var(--tint-gold-ink); }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.lead.s17 { font-size: 17px; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .ink { color: var(--ink); }
.small { font-size: 14px; } .tiny { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.self-start { align-self: flex-start; }
a.more { font-weight: 600; }

/* layout */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.s0 { gap: 0; } .stack.s2 { gap: 2px; } .stack.s4 { gap: 4px; } .stack.s8 { gap: 8px; } .stack.s12 { gap: 12px; } .stack.s24 { gap: 24px; } .stack.s32 { gap: 32px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.top { align-items: flex-start; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; }
.row.g8 { gap: 8px; } .row.g10 { gap: 10px; } .row.g14 { gap: 14px; } .row.g16 { gap: 16px; } .row.g20 { gap: 20px; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1 1 0; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; }
.grid2.g20 { gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.split { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; }
.split > .side { flex: 1 1 300px; min-width: 0; }
.sep { height: 1px; background: var(--line); border: 0; margin: 0; }
.page { padding-top: 40px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 28px; }
.page.tight { padding-top: 28px; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 8px; border: 1.5px solid transparent; font-family: var(--btn-font); font-weight: 600; font-size: 15px;
  letter-spacing: .01em; text-decoration: none; cursor: pointer; white-space: nowrap; background: none; color: var(--ink); }
.btn .ico { width: 18px; height: 18px; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); color: var(--on-primary); }
/* the call to action: one per view (the theme's --cta-*) */
.btn.accent { background: var(--cta-bg); color: var(--cta-ink); text-transform: var(--cta-case); letter-spacing: var(--cta-spacing); font-weight: var(--cta-weight); font-size: var(--cta-size); }
.btn.accent:hover { background: var(--cta-hover-bg); color: var(--cta-hover-ink); }
.btn.secondary { border-color: var(--primary); color: var(--primary); background: var(--raised); }
.btn.secondary:hover { background: var(--surface); }
.btn.ghost { color: var(--ink); } .btn.ghost:hover { background: var(--surface-2); }
.btn.on-dark { border-color: rgba(255,255,255,.7); color: #fff; } .btn.on-dark:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger:hover { background: var(--danger-hover); color: #fff; }
.btn.danger-outline { border-color: var(--danger); color: var(--bad-ink); background: var(--raised); } .btn.danger-outline:hover { background: var(--bad-bg); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn.spread { justify-content: space-between; }
.btn.tight { padding: 0 8px; }
.btn[disabled], .btn.htmx-request { opacity: .6; cursor: progress; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.s16 { width: 16px; height: 16px; } .ico.s24 { width: 24px; height: 24px; } .ico.s28 { width: 28px; height: 28px; }
.ico.bold { stroke-width: 3; }
.ico.blue { color: var(--brand); } .ico.turq { color: var(--accent); } .ico.ok { color: var(--ok-ink); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.field.grow { min-width: 240px; }
.input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 8px; font: 15px var(--body);
  color: var(--ink); background: var(--raised); }
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.input-group { display: flex; } .input-group .input { border-radius: 8px 0 0 8px; min-width: 0; } .input-group .btn { border-radius: 0 8px 8px 0; }
.input-group.search { width: 340px; max-width: 100%; }
.btn.field-aligned { margin-top: 27px; }
.switch { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); flex: none; border: 0; padding: 0; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: var(--switch-on); } .switch.on::after { left: 19px; }
.switch-label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; background: none; border: 0; padding: 4px; font: inherit; color: inherit; border-radius: 8px; }

/* surfaces */
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card.tight { padding: 16px; } .card.shadow { box-shadow: var(--shadow); border-color: transparent; }
.card.soft { background: var(--surface); border-color: transparent; }
.card.top-turq { border-top: 4px solid var(--accent); } .card.top-blue { border-top: 4px solid var(--brand); } .card.top-red { border-top: 4px solid var(--danger); }
a.card { text-decoration: none; color: inherit; } a.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: inherit; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); font-size: 14.5px; line-height: 1.55; }
.callout .ico { margin-top: 1px; }
.callout.compact { padding: 10px 12px; font-size: 13.5px; }
.callout.info { background: var(--info-bg); color: var(--info-ink); }
.callout.warn { background: var(--wait-bg); color: var(--wait-ink); }
.callout.bad { background: var(--bad-bg); color: var(--bad-ink); }
.callout.ok { background: var(--ok-bg); color: var(--ok-ink); }
.callout b { color: inherit; }
.flash { margin: 0; }
.badge { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--tint-brand-bg); color: var(--tint-brand-ink); }
.badge.lg { width: 56px; height: 56px; }
.badge.off { background: var(--off-bg); color: var(--ink-2); }

/* status: colour + dot + word, never colour alone */
.status { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 999px; font-family: var(--head); font-weight: 600; font-size: 13px; white-space: nowrap; align-self: flex-start; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.ok { background: var(--ok-bg); color: var(--ok-ink); } .status.ok::before { background: var(--ok-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-dot) 22%, transparent); }
.status.wait { background: var(--wait-bg); color: var(--wait-ink); } .status.wait::before { background: var(--wait-dot); }
.status.off { background: var(--off-bg); color: var(--off-ink); } .status.off::before { background: var(--off-dot); }
.status.bad { background: var(--bad-bg); color: var(--bad-ink); } .status.bad::before { background: var(--bad-dot); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; align-self: flex-start; }
.tag.gold { background: var(--tint-gold-bg); color: var(--tint-gold-ink); } .tag.turq { background: var(--tint-accent-bg); color: var(--tint-accent-ink); } .tag.blue { background: var(--tint-brand-bg); color: var(--tint-brand-ink); }
.tag.risk-high { background: var(--bad-bg); color: var(--bad-ink); } .tag.risk-low { background: var(--ok-bg); color: var(--ok-ink); } .tag.risk-mid { background: var(--wait-bg); color: var(--wait-ink); }
.tag.glass { background: rgba(255,255,255,.1); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: none; background: var(--off-dot); }
.dot.ok { background: var(--ok-dot); } .dot.info { background: var(--info-dot); } .dot.wait { background: var(--wait-dot); } .dot.bad { background: var(--bad-dot); }

/* code */
.code { position: relative; background: var(--code-bg); color: var(--code-ink); border-radius: var(--r); padding: 14px 16px; font: 13.5px/1.6 var(--mono); overflow-x: auto; white-space: pre; margin: 0; }
.code .c { color: var(--code-dim); } .code .k { color: var(--code-key); } .code .s { color: var(--code-str); } .code .p { color: var(--code-prompt); user-select: none; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; background: var(--code-head-bg); color: var(--code-head-ink); border-radius: var(--r) var(--r) 0 0; padding: 6px 8px 6px 14px; font: 600 12.5px var(--eyebrow-font); letter-spacing: .04em; text-transform: uppercase; }
.code-head + .code { border-radius: 0 0 var(--r) var(--r); }
.code-head .icon-btn { color: var(--code-head-ink); width: 30px; height: 30px; } .code-head .icon-btn:hover { background: var(--code-hover); color: #fff; }
.codebox { min-width: 0; }
.copy-field { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-2); border-radius: 8px; padding: 4px 4px 4px 12px; background: var(--surface); min-width: 0; min-height: 46px; }
.copy-field.white { background: var(--raised); }
.copy-field code { background: none; padding: 3px 0; line-height: 1.5; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--ink); overflow-wrap: normal; }
.copied { background: var(--ok-bg) !important; color: var(--ok-ink) !important; border-color: var(--ok-dot) !important; }

/* tables */
.table-box { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--raised); }
.table-box.plain { border: 0; border-radius: 0; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font: 700 12px var(--head); letter-spacing: var(--label-spacing); text-transform: var(--label-case); color: var(--ink-2); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
table.t td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.dim td { color: var(--ink-3); }
table.t.compact { font-size: 13.5px; } table.t.compact td { padding: 8px 8px 8px 0; } table.t.compact td:last-child { padding-right: 0; }
table.t td.right, table.t th.right { text-align: right; }

/* tabs and segmented controls (links, so they work without scripts) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border: 0; background: none; border-bottom: 3px solid transparent;
  font: 600 14.5px var(--head); color: var(--ink-2); cursor: pointer; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--ink); }
/* the shadow paints over the container's 1px rule so the active underline reads as one bar */
.tab.on { color: var(--nav-on); border-bottom-color: var(--nav-on-line); box-shadow: 0 1px 0 var(--nav-on-line); }
.seg { display: inline-flex; flex-wrap: wrap; align-self: flex-start; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 7px 14px; border-radius: 8px; font: 600 13.5px var(--head); color: var(--ink-2); cursor: pointer; min-height: 34px; text-decoration: none; }
.seg a:hover { color: var(--ink); }
.seg a.on { background: var(--raised); color: var(--ink); box-shadow: var(--shadow); }
/* the download page's system switch: the active tab carries a pill (.seg-thumb)
   that glides to the next tab, and the panel eases in, as a view transition
   started by htmx (see osTab); without view transitions the swap is instant */
.seg.slide a { position: relative; isolation: isolate; }
.seg.slide a.on { background: none; box-shadow: none; }
.seg-thumb { position: absolute; inset: 0; z-index: -1; border-radius: 8px; background: var(--raised); box-shadow: var(--shadow); view-transition-name: os-thumb; }
#os-windows .seg-lbl { view-transition-name: os-l-windows; }
#os-macos .seg-lbl { view-transition-name: os-l-macos; }
#os-linux .seg-lbl { view-transition-name: os-l-linux; }
#os-cli .seg-lbl { view-transition-name: os-l-cli; }
/* the switch itself ("Choose your system" + the segmented track) takes no
   part in the transition: only the pill glides and the panel below eases in */
.dl-swap { view-transition-name: dl-copy; }
.next-card { view-transition-name: dl-next; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
::view-transition-group(os-thumb) { animation-duration: .34s; animation-timing-function: cubic-bezier(.3, .8, .25, 1); }
::view-transition-old(os-thumb), ::view-transition-new(os-thumb) { animation: none; }
/* pin the pill snapshots to the group box: the box widens from the old tab
   to the new one, and the UA default keeps the snapshot's aspect ratio —
   that squashes or stretches the pill vertically. Filling the box instead
   keeps the pill exactly 34px tall through the whole glide. */
::view-transition-old(os-thumb), ::view-transition-new(os-thumb) { width: 100%; height: 100%; object-fit: fill; }
/* in the live page the pill hides behind the labels (isolation + z-index:-1),
   but in the transition pseudo-tree the groups are siblings and that order is
   lost: set it here, so the labels stay readable while the pill glides
   (track: root 0) < pill 1 < labels 2 */
::view-transition-group(os-thumb) { z-index: 1; }
::view-transition-group(os-l-windows), ::view-transition-group(os-l-macos),
::view-transition-group(os-l-linux), ::view-transition-group(os-l-cli) { z-index: 2; }
::view-transition-group(dl-copy), ::view-transition-group(dl-next) { animation: none; }
::view-transition-old(dl-copy), ::view-transition-old(dl-next) { animation: dl-out .12s ease-in both; }
::view-transition-new(dl-copy), ::view-transition-new(dl-next) { animation: dl-in .34s .05s cubic-bezier(.2, .7, .2, 1) both; }
::view-transition-new(dl-next) { animation-delay: .1s; }
@keyframes dl-out { to { opacity: 0; } }
@keyframes dl-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
.picker { display: flex; flex-wrap: wrap; gap: 8px; }

/* steps: numbers in rounded squares */
.step-no { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; color: var(--step-ink); background: var(--step-bg); border-radius: var(--step-radius); font: 700 16px var(--head); }
.step-no span { position: relative; display: grid; place-items: center; }
.step-no.done { color: var(--step-done-ink); background: var(--step-done-bg); }
.checklist { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; padding: 0; }
.check-item { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-start; padding: 14px; border-radius: var(--r); }
.check-item > .grow { min-width: 180px; }
/* the step text on the download card takes the row beside the number and
   wraps inside itself, instead of the whole block dropping under the number
   when its text is long (a wrapped flex item sizes by its max-content) */
.next-card .check-item > .stack { flex: 1 1 0; min-width: 0; }
.check-item.current { background: var(--surface); }
.check-item.done b.h { color: var(--ink-2); }
ol.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
ol.steps > li { display: flex; gap: 14px; align-items: flex-start; }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; max-width: 280px; }
.progress i { display: block; height: 100%; width: 0; background: var(--cta-bg); border-radius: 3px; }
.progress i.p1 { width: 25%; } .progress i.p2 { width: 50%; } .progress i.p3 { width: 75%; } .progress i.p4 { width: 100%; }

/* website chrome */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 32px; min-height: 76px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { font-family: var(--head); font-weight: var(--nav-weight); font-size: var(--nav-size); letter-spacing: var(--nav-spacing); text-transform: var(--nav-case); color: var(--nav-ink); text-decoration: none; padding: 10px 12px; border-radius: 6px; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--nav-on); background: var(--surface); }
.nav a.on { color: var(--nav-on); border-bottom-color: var(--nav-on-line); border-radius: 0; }
.lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.lockup svg { width: var(--mark-size); height: var(--mark-size); flex: none; }
.site-foot .lockup svg { width: calc(var(--mark-size) - 4px); height: calc(var(--mark-size) - 4px); }
.lockup .word { display: block; font: var(--word-weight) 26px/1 var(--head); color: var(--brand); letter-spacing: var(--word-spacing); text-transform: var(--word-case); }
.lockup.white .word { color: var(--hero-ink); font-size: 22px; }
.site-foot .lockup .word { color: var(--foot-head); font-size: 22px; }
.btn.search { border: 1.5px solid var(--line); color: var(--ink-2); min-width: 220px; justify-content: flex-start; }
.btn.search .keys { margin-left: auto; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--avatar-bg); color: var(--avatar-ink); display: grid; place-items: center; font: 700 14px var(--head); flex: none; text-transform: uppercase; }
.avatar.turq { background: var(--accent); color: var(--brand-dk); }
.avatar.grey { background: var(--off-dot); }
/* menus are <details>: they open without scripts */
details.menu { position: relative; }
details.menu > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px; border-radius: 8px; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary:hover { background: var(--surface); }
details.menu .who { display: flex; flex-direction: column; text-align: left; }
details.menu .who b { font: 600 14px var(--head); }
.menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 240px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; }
.menu-body .menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.menu-body a, .menu-body button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font: 600 14px var(--head); color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.menu-body a:hover, .menu-body button:hover { background: var(--surface); color: var(--brand); }
.menu-body form { margin: 0; }
.hero { position: relative; overflow: hidden; background: var(--hero-bg); color: var(--hero-ink); }
.hero h1, .hero h2, .hero h3 { color: var(--hero-ink); } .hero .lead { color: var(--hero-ink-2); }
.site-foot { background: var(--foot-bg); color: var(--foot-ink); font-size: 14px; border-top: 1px solid var(--foot-line); }
.site-foot a { color: var(--foot-link); text-decoration: none; } .site-foot a:hover { color: var(--foot-link-hover); text-decoration: underline; }
.site-foot h4 { color: var(--foot-head); font-family: var(--eyebrow-font); font-weight: var(--eyebrow-weight); font-size: 12px; letter-spacing: var(--eyebrow-spacing); text-transform: uppercase; margin-bottom: 14px; }
.site-foot .wrap { padding-top: 56px; padding-bottom: 32px; }
.site-foot.compact .wrap { padding-top: 28px; padding-bottom: 28px; gap: 20px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 32px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-grid .brand { grid-column: span 2; }
.foot-grid .brand p { max-width: 360px; }
.foot-bottom { border-top: 1px solid var(--foot-line); padding-top: 20px; font-size: 13px; }
.uni-logo { height: 56px; width: auto; } .uni-logo.sm { height: 44px; }
.vr { width: 1px; height: 44px; background: var(--foot-line); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); } .crumbs a:hover { color: var(--brand); }

/* stat tiles */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .n { font: 700 28px/1.1 var(--head); color: var(--ink); }
.stat .n small { font-size: 18px; color: var(--ink-3); font-weight: 700; }
.stat .l { font-size: 13px; color: var(--ink-2); }

/* usage statistics: charts are inline SVG coloured from here */
.insights .card h3 { font-size: 16px; }
.stat .delta { color: var(--ok-ink); font-weight: 600; } .stat .delta.down { color: var(--bad-ink); }
.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { font: 15px var(--body); fill: var(--ink-3); }
.chart .hit { fill: transparent; }
.chart .bar { fill: var(--chart-1); } .chart .bar.part { fill: var(--chart-2); } .chart .bar.part.bad { fill: var(--bad-dot); }
.chart g:hover .bar:not(.part) { fill: var(--chart-1-hover); } .chart g:hover .hit { fill: var(--surface); }
.chart-data > summary, details.card > summary { cursor: pointer; color: var(--ink-2); }
details.card[open] > summary { margin-bottom: 12px; }
.meters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.meters li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 14px; }
.meters .name { overflow-wrap: anywhere; }
.meters .num, table.t .right { font-variant-numeric: tabular-nums; }
.meters .num { white-space: nowrap; text-align: right; }
.meters .meter { grid-column: 1 / -1; display: block; width: 100%; height: 6px; border-radius: 3px; }
.meter .track { fill: var(--surface-2); } .meter .fill { fill: var(--chart-1); } .funnel .meter .fill { fill: var(--chart-2); }
table.cohorts td { white-space: nowrap; }
.heat.h1 { background: var(--heat-1); } .heat.h2 { background: var(--heat-2); } .heat.h3 { background: var(--heat-3); }
.heat.h4 { background: var(--heat-4); color: #fff; } .heat.h5 { background: var(--heat-5); color: #fff; }
table.registry td { vertical-align: top; }
.bad-ink { color: var(--bad-ink); }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; line-height: 1.55; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14.5px; }
dl.facts dt { color: var(--ink-2); } dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.page.prose { max-width: 880px; }
.prose ul { margin: 0; padding-left: 20px; line-height: 1.6; display: flex; flex-direction: column; gap: 6px; }
pre.legal { margin: 0; padding: 24px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); font: 14.5px/1.6 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; }

/* home */
.hero-inner { position: relative; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 96px; }
.hero-copy { flex: 1 1 520px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero h1.display { font-size: 56px; line-height: 1.08; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--hero-ink-2); font-size: 14.5px; margin-top: 8px; }
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .ico { color: var(--hero-accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.hero-side { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; max-width: 520px; min-width: 0; }
.hero-side .card { padding: 20px; display: flex; flex-direction: column; gap: 14px; color: var(--ink); }
.hero-side .apps { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.section { padding-top: 72px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 32px; }
.section.first { padding-top: 80px; }
.section.last { padding-bottom: 80px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
h2.big { font-size: 36px; }
.flow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.flow-node { width: 210px; text-align: center; align-items: center; }
.flow-node.gateway { background: var(--hero-bg); border: 0; color: var(--hero-ink-2); }
.flow-node.gateway b { color: var(--hero-ink); }
.flow-link { width: 170px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 8px; }
.flow-link i { display: block; height: 2px; width: 100%; background: var(--brand); }
.flow-link i.dashed { background: repeating-linear-gradient(90deg, var(--accent-dk) 0 8px, transparent 8px 14px); }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .ico { color: var(--brand); }
.faq details > summary { font-family: var(--head); font-weight: 600; cursor: pointer; min-height: 32px; padding: 4px 0; }
.faq details > p { margin-top: 6px; }
.band { background: var(--surface); }
.band .wrap { padding-top: 56px; padding-bottom: 56px; gap: 24px; }

/* download */
.dl-hero { background: var(--surface); position: relative; overflow: hidden; }
.dl-hero-inner { position: relative; padding-top: 56px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.dl-hero-copy { flex: 1 1 520px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
/* a little extra air around the main download button, so it breathes away from the lead and the "Also for" lines */
.dl-actions { margin: 8px 0; }
.dl-hero h1 { font-size: 48px; }
.next-card { flex: 1 1 380px; max-width: 460px; display: flex; flex-direction: column; gap: 4px; }
.next-card h3 { margin-bottom: 8px; }
.cli-card { display: flex; flex-wrap: wrap; gap: 32px; padding: 32px; }
.cli-card > .stack { flex: 1 1 320px; }
.cli-card > .codebox { flex: 2 1 480px; }
details.verify { padding: 16px 20px; }
details.verify > summary { font-family: var(--head); font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 28px; }
details.verify > .stack { margin-top: 14px; }
details.plain > summary { cursor: pointer; color: var(--ink-2); min-height: 28px; }
details.plain > .code, details.plain > div { margin-top: 8px; }

/* dashboard */
.guide { display: flex; flex-wrap: wrap; gap: 32px; padding: 28px 32px; }
.guide .intro { flex: 1 1 260px; }
.guide .checklist { flex: 2 1 560px; min-width: 0; }
.tunnel { gap: 16px; }
.tunnel.offline { background: var(--surface); }
.tunnel h3 a { color: inherit; text-decoration: none; } .tunnel h3 a:hover { color: var(--brand); text-decoration: underline; }
.tunnel-state { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.tunnel-state .status { align-self: flex-end; }
.tunnel-state .tiny { max-width: 300px; text-align: right; }
.tech { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; color: var(--ink-2); }
ol.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
ol.activity li { display: flex; gap: 12px; align-items: flex-start; }
.tunnel-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.tunnel-head h1 { font-size: 32px; overflow-wrap: anywhere; }
.tunnel-head .address { flex: 1 1 420px; max-width: 560px; min-width: 0; }
.access-item { display: flex; gap: 12px; align-items: flex-start; }
.empty { padding: 28px; text-align: center; color: var(--ink-2); }
.empty .stack { align-items: center; }

/* help */
.help-hero { position: relative; padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.help-hero .input-group { width: 100%; max-width: 640px; }
.help-hero .input { min-height: 52px; font-size: 16px; border-color: transparent; }
.help-hero .btn { min-height: 52px; }
.popular { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--hero-ink-2); }
.popular a { color: var(--hero-ink); }
.help-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 48px; padding-bottom: 80px; }
.help-nav { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.help-nav .eyebrow { padding: 0 12px 10px; }
.help-nav .btn { justify-content: flex-start; }
.help-nav .btn.on { background: var(--surface); color: var(--brand); }
.help-nav .card { margin-top: 20px; }
.help-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.help-main section { scroll-margin-top: 16px; }
dl.glossary { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px 40px; }
dl.glossary dt { font-family: var(--head); font-weight: 700; }
dl.glossary dd { margin: 0; }
.guide-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.6; }
mark { background: var(--wait-bg); color: inherit; padding: 0 2px; border-radius: 3px; }

/* errors */
.err-hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.err-mark { position: relative; width: 300px; height: 300px; flex: none; background: var(--step-bg); border-radius: calc(var(--step-radius) * 6); }
.err-mark span { position: absolute; left: 0; right: 0; top: 96px; text-align: center; font: 700 88px/1 var(--head); color: var(--step-ink); letter-spacing: -0.02em; }
.err-copy { flex: 1 1 460px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.err-copy h1 { font-size: 44px; }

/* dialogs and the command palette */
dialog.dlg { border: 0; padding: 0; background: transparent; max-width: min(560px, calc(100vw - 32px)); width: 100%; }
dialog.dlg::backdrop, dialog.palette::backdrop { background: var(--scrim); }
dialog.dlg > .card { border-top: 4px solid var(--danger); }
dialog.palette { border: 1px solid var(--line); padding: 0; width: min(560px, calc(100vw - 32px)); margin-top: 96px; background: var(--raised); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; color: var(--ink); }
.palette .q { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.palette .q .ico { color: var(--ink-3); }
.palette .q input { flex: 1; min-width: 0; border: 0; font: 16px var(--body); color: var(--ink); padding: 10px 0; background: none; }
.palette .q input:focus { outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px 0; max-height: 50vh; overflow-y: auto; }
.palette li a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 14.5px; color: var(--ink); text-decoration: none; }
.palette li a .k { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.palette li.on a, .palette li a:hover { background: var(--surface); }
.palette .foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.jump-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.jump-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--raised); border: 1px solid var(--line); }
.jump-list a:hover { border-color: var(--line-2); color: var(--brand); }
.jump-list .k { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 32px; }
  h2, h2.big { font-size: 26px; }
  .hero h1.display { font-size: 38px; }
  .dl-hero h1, .err-copy h1 { font-size: 34px; }
  .hero-inner { padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .section { padding-top: 48px; }
  .site-head .wrap { gap: 8px 16px; }
  .nav a { padding: 8px; letter-spacing: .08em; }
  .btn.search { min-width: 0; padding: 0 10px; }
  .btn.search .label, .btn.search .keys { display: none; }
  details.menu .who, details.menu > summary > .ico { display: none; }
  .foot-grid .brand { grid-column: auto; }
  .flow-link { width: 100%; padding: 8px 0; }
  .flow-link i { width: 2px; height: 28px; }
  .flow-link i.dashed { background: repeating-linear-gradient(180deg, var(--accent-dk) 0 8px, transparent 8px 14px); }
  .flow-node { width: 100%; }
  .guide { padding: 20px; }
  .guide .checklist { flex-basis: 100%; }
  .check-item { padding: 10px 0; }
  .check-item.current { padding: 12px; }
  .check-item > .btn { margin-left: 54px; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 20px; }
  .cli-card { padding: 20px; }
  .err-mark { width: 180px; height: 180px; }
  .err-mark svg { width: 180px; height: 180px; }
  .err-mark span { top: 58px; font-size: 52px; }
  .help-nav { position: static; max-width: none; }
  .btn.field-aligned { margin-top: 0; }
  .tunnel-state { align-items: flex-start; }
  .tunnel-state .status { align-self: flex-start; }
  .tunnel-state .tiny { text-align: left; }
  dialog.palette { margin-top: 24px; }
  .menu-body { right: -8px; }
}
figure.card { margin: 0; }
.flash-wrap { padding-top: 20px; }
.confirm { max-width: 560px; }
table.t code { white-space: nowrap; overflow-wrap: normal; }
.palette .q input:focus-visible { box-shadow: none; }
.palette li.tiny { padding: 10px 16px; }

/* who makes Catflap (footer, about): the partner logos as supplied, on the
   theme's plate (white where the ground is dark) */
.credits { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: var(--credits-pad); border-radius: var(--r); background: var(--credits-bg); color: var(--ink-2); font-size: 13px; text-decoration: none; }
.site-foot a.credits, .site-foot a.credits:hover { color: var(--ink-2); text-decoration: none; }
.credits img { height: 36px; width: auto; display: block; }
.credits.lg { padding: 0; gap: 20px 48px; background: none; }
.credits.lg img { height: 64px; }
.about .grid2 { gap: 20px; }
.about .card .row { margin-top: auto; }
.grid2.top { align-items: start; }
