/* PrivateTray website. Colours come from the phone app's lib/theme.dart (Brand
   and brandTheme) so the site, the apps and the icon use the same five blues.
   Type is the system font, as in both apps, so no font file is loaded. */

:root {
  --night: #0e1a45;
  --deep: #1c3c9e;
  --signal: #2f6bff;
  --sky: #8fc2ff;
  --mist: #f1f4fb;

  --bg: var(--mist);
  --card: #ffffff;
  --card-2: #e4eaf7;
  --text: #0e1a45;
  --muted: #55618a;
  --line: #d5ddf0;
  --primary: var(--signal);
  --on-primary: #ffffff;

  --radius: 24px;
  --radius-s: 14px;
  --wrap: 1120px;
  --gutter: 20px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1231;
    --card: #111c47;
    --card-2: #18265c;
    --text: #e8eeff;
    --muted: #9fb1e0;
    --line: #24347a;
    --primary: #7fa8ff;
    --on-primary: var(--night);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--card); color: var(--text); padding: 10px 16px; border-radius: 999px;
}
.skip:focus { top: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(14, 26, 69, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(143, 194, 255, 0.14);
  color: #fff;
}
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: #dfe8ff; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: #fff; }
.lang {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 0.85rem;
  border: 1px solid rgba(143, 194, 255, 0.4); border-radius: 999px; padding: 5px 12px;
}
.lang:hover { background: rgba(143, 194, 255, 0.15); }
.top .btn { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }
@media (max-width: 820px) { .nav { display: none; } .lang { margin-left: auto; } }
/* A phone cannot install the Mac app, and the hero repeats the button. */
@media (max-width: 560px) { .top .btn { display: none; } .top .wrap { gap: 12px; } }

/* Buttons: stadium shape and weight from the app's FilledButton theme */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 999px;
  font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap;
  /* A shade under Brand.signal: white on #2f6bff is 4.5:1, just short of AA. */
  background: #2d68fb; color: #fff; border: 0;
  box-shadow: 0 8px 24px rgba(47, 107, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #2457e6; transform: translateY(-1px); box-shadow: 0 12px 30px rgba(47, 107, 255, 0.45); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-light { background: #fff; color: var(--night); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.btn-light:hover { background: #eef3ff; }

/* Hero: the gradient of the app icon, top to bottom */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(143, 194, 255, 0.28), transparent 60%),
    linear-gradient(180deg, #2f6bff 0%, #1c3c9e 48%, #0e1a45 100%);
  padding: 72px 0 88px;
  margin-top: -65px; padding-top: calc(72px + 65px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 0 239px, rgba(143, 194, 255, 0.10) 240px 241px, transparent 242px),
    radial-gradient(circle at 50% 50%, transparent 0 359px, rgba(143, 194, 255, 0.07) 360px 361px, transparent 362px);
  background-position: 88% 30%; background-repeat: no-repeat; background-size: 900px 900px;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; gap: 44px; } .hero { padding-bottom: 64px; } }
/* On one column the chain follows the headline, so it is seen before the text. */
@media (max-width: 920px) {
  .hero .wrap { gap: 0; }
  .hero .wrap > div:first-child { display: contents; }
  .hero .wrap > div:first-child > * { order: 3; }
  .hero .wrap > div:first-child > .pill { order: 0; justify-self: start; }
  .hero .wrap > div:first-child > h1 { order: 1; }
  .hero .wrap > .path { order: 2; margin: 32px 0 8px; }
}

.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; border-radius: 20px; padding: 6px 14px 6px 8px; font-weight: 700; font-size: 0.9rem; line-height: 1.35;
}
.pill b { background: #fff; color: var(--deep); border-radius: 999px; padding: 2px 10px; font-size: 0.8rem; letter-spacing: 0.02em; }
.hero h1 span { display: block; }
.hero h1 span + span { margin-top: 12px; font-size: 0.56em; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: #d7e5ff; }
.hero .lead { margin-top: 20px; font-size: clamp(1.08rem, 2vw, 1.25rem); color: #d7e5ff; max-width: 34em; }
.hero .lead strong { color: #fff; }
.cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.cta-note { color: var(--sky); font-size: 0.92rem; line-height: 1.4; }

.stores { margin-top: 26px; }
.stores-label { color: var(--sky); font-size: 0.95rem; font-weight: 600; }
.soon { font-size: 0.8rem; font-weight: 700; color: var(--night); background: var(--sky); border-radius: 999px; padding: 3px 10px; margin-left: 10px; }

/* The path diagram in the hero */
.path {
  background: rgba(10, 18, 49, 0.55); border: 1px solid rgba(143, 194, 255, 0.22);
  border-radius: var(--radius); padding: 26px; box-shadow: 0 30px 80px rgba(5, 10, 35, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.path-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); margin-bottom: 18px; }
.hop { display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(143, 194, 255, 0.16); border-radius: var(--radius-s); padding: 14px 16px; }
.hop-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(143, 194, 255, 0.16); color: #fff; }
.hop-icon svg { width: 22px; height: 22px; }
.hop strong { display: block; font-size: 1rem; }
.hop > div > span { display: block; font-size: 0.88rem; color: #b9cdf5; line-height: 1.35; }
.hop.you .hop-icon { background: #fff; color: var(--signal); }
.hop.server .hop-icon { background: var(--signal); }
.hop-icon.num { font-weight: 800; font-size: 1.15rem; }
.hop .role { font-style: normal; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; vertical-align: 2px; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--sky); color: var(--night); }
.hero .lead-sub { margin-top: 12px; font-size: 1.02rem; }
.no-install { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 8px 16px 8px 10px; border-radius: 20px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); font-weight: 700; font-size: 0.95rem; line-height: 1.35; }
.no-install svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #fff; color: var(--deep); }

/* The wires of the hero chain: light moves from hop to hop, as in the apps'
   live view. The wire sits under the centre of the hop icons. */
.flow { --i: 0; display: flex; align-items: center; gap: 14px; min-height: 46px; padding-left: 33px; color: var(--sky); font-size: 0.84rem; font-weight: 600; line-height: 1.3; }
.flow.f2 { --i: 1; }
.flow.f3 { --i: 2; }
.vwire { position: relative; flex: none; width: 10px; align-self: stretch; }
.vwire::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: linear-gradient(var(--sky), var(--signal)); opacity: 0.6; }
.vwire i { position: absolute; inset: 0; opacity: 0; animation: flow-y 1.6s linear infinite; animation-delay: calc(var(--i) * 0.53s); }
.vwire i + i { animation-delay: calc(var(--i) * 0.53s - 0.8s); }
.vwire i::after { content: ""; position: absolute; left: 1px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px rgba(143, 194, 255, 0.85); }
.nobody { margin-top: 18px; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px dashed rgba(143, 194, 255, 0.3); color: #d7e5ff; font-size: 0.92rem; }
.nobody b { color: #fff; font-size: 1.6rem; line-height: 1; min-width: 1.2ch; }

/* Free band */
.free { background: var(--night); color: #fff; border-top: 1px solid rgba(143, 194, 255, 0.16); }
.free .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; padding: 22px 0; text-align: center; }
.free strong { font-size: 1.15rem; }
.free ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; list-style: none; margin: 0; padding: 0; color: var(--sky); font-weight: 600; font-size: 0.95rem; }
.free li { display: flex; align-items: center; gap: 7px; }
.free li svg { width: 16px; height: 16px; }

/* Sections */
section { scroll-margin-top: 80px; }
.section { padding: 96px 0; }
.section.alt { background: var(--card); }
@media (max-width: 640px) { .section { padding: 68px 0; } }
.eyebrow { color: var(--primary); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.intro { max-width: 46rem; margin-bottom: 44px; }
.intro p { margin-top: 16px; color: var(--muted); font-size: 1.1rem; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.section.alt .card { background: var(--bg); }
.card h3 { margin-bottom: 10px; }
.card p, .card li { color: var(--muted); }
.card p + p { margin-top: 10px; }
.ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; color: #fff; background: linear-gradient(160deg, var(--signal), var(--deep)); }
.ic svg { width: 24px; height: 24px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--card-2); color: var(--muted); }

.modes { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.modes li { padding: 14px 16px; border-radius: var(--radius-s); background: var(--card-2); }
.section.alt .modes li { background: var(--card); }
.modes strong { color: var(--text); display: block; }
.modes .tags { margin-top: 8px; }
.modes .tag { background: var(--card); }
.section.alt .modes .tag { background: var(--card-2); }
.feature-wide { grid-row: span 3; }
/* Nothing to install: the wide card beside the routing modes */
.feature-span { grid-column: span 2; }
@media (max-width: 640px) { .feature-span { grid-column: auto; } }
.card .note { font-size: 0.9rem; padding-left: 12px; border-left: 3px solid var(--line); }
@media (max-width: 920px) { .feature-wide { grid-row: auto; grid-column: 1 / -1; } }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-top: 26px; display: flex; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 28px; z-index: 1;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 1.3rem; color: #fff; background: linear-gradient(160deg, var(--signal), var(--deep));
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.3);
}
.steps .card { flex: 1; padding-top: 44px; }
.steps-cta { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.steps-cta .cta-note { color: var(--muted); }

/* Platforms */
.platforms .card { display: flex; flex-direction: column; gap: 10px; }
.platforms .card .btn { margin-top: auto; align-self: flex-start; }
.platforms h3 { font-size: 1.35rem; }
.req { font-size: 0.92rem; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 52rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); }
.section.alt .faq details { background: var(--bg); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; position: relative;
  font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 22px 22px; color: var(--muted); }
.faq .answer p + p { margin-top: 10px; }

/* Closing call */
.closing { background: linear-gradient(160deg, #2f6bff 0%, #1c3c9e 55%, #0e1a45 100%); color: #fff; text-align: center; }
.closing .wrap { padding: 88px 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.closing img { width: 88px; height: 88px; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.35)); }
.closing p { color: #d7e5ff; font-size: 1.1rem; max-width: 36rem; }
.closing .cta-note { color: var(--sky); font-size: 0.92rem; }

/* Footer */
.foot { background: var(--night); color: #b9cdf5; font-size: 0.9rem; padding: 40px 0 48px; }
.foot .wrap { display: grid; gap: 22px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: #fff; text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }
.foot .brand { font-size: 1rem; }
.foot .legal-note { font-size: 0.78rem; color: #8a9ccc; line-height: 1.5; }

/* Legal pages */
.doc-head { background: linear-gradient(180deg, #1c3c9e, #0e1a45); color: #fff; margin-top: -65px; padding: calc(56px + 65px) 0 48px; }
.doc-head p { color: var(--sky); margin-top: 12px; }
.doc-head .wrap { max-width: 46rem; }
.top .lang-end { margin-left: auto; }
.doc { padding: 48px 0 88px; }
.doc .wrap { max-width: 46rem; }
.doc h2 { font-size: 1.45rem; margin: 40px 0 12px; }
.doc h3 { font-size: 1.1rem; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.25em; margin: 12px 0; }
.doc li + li { margin-top: 6px; }
.doc .summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin: 24px 0 8px; }
.doc .summary h2 { margin-top: 0; }
.doc .summary ul { margin-bottom: 0; }
.doc .placeholder { background: #fff3c4; color: #5c4700; padding: 0 4px; border-radius: 4px; }
@media (prefers-color-scheme: dark) { .doc .placeholder { background: #4d3f0b; color: #ffe7a0; } }
.platforms h3 .soon { display: table; margin: 8px 0 0; font-size: 0.78rem; letter-spacing: 0; }
@media (min-width: 641px) and (max-width: 920px) {
  .feature-wide .modes { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 700px) and (max-width: 920px) {
  .steps.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .steps .card { padding: 40px 20px 22px; }
  .steps li::before { left: 20px; }
}

/* Cascade card: the steps, next to the app window above it. The hero's
   wires keep their light still with Reduce Motion. */
.cascade { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 36px; align-items: center; }
@media (max-width: 920px) { .cascade { grid-template-columns: 1fr; gap: 20px; } }
@keyframes flow-y { 0% { transform: translateY(0); opacity: 0; } 20%, 80% { opacity: 1; } 100% { transform: translateY(100%); opacity: 0; } }
.how { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
.how li { color: var(--muted); padding-left: 4px; }
@media (prefers-reduced-motion: reduce) {
  .vwire i { display: none; }
  .vwire::before { opacity: 1; }
}

/* App window: an illustration of the Mac app with a cascade connected, drawn
   from the app's own layout (MainWindow, CascadeEditor, CascadeChain and
   MenuPanel). Sizes are in em so the whole window scales with the width of
   .demo. Below 600px the sidebar is left out and the route turns vertical, as
   in the phone apps. assets/demo.js pauses the light pulses off screen and
   moves the transfer rate a little. */
.demo-section { padding: 80px 0 0; }
.demo-section + .section { padding-top: 56px; }
.demo {
  container-type: inline-size;
  --mk-bg: #f4f5f8; --mk-side: #e7e9f0; --mk-card: #ffffff; --mk-group: rgba(14, 26, 69, 0.035);
  --mk-text: #1d1d1f; --mk-muted: #6e6e78; --mk-line: rgba(14, 26, 69, 0.1);
  --mk-accent: #2f6bff; --mk-green: #22a845; --mk-red: #e5443a;
}
@media (prefers-color-scheme: dark) {
  .demo {
    --mk-bg: #0e1016; --mk-side: #191c26; --mk-card: #1f2330; --mk-group: rgba(255, 255, 255, 0.04);
    --mk-text: #eceef4; --mk-muted: #9a9fb2; --mk-line: rgba(255, 255, 255, 0.1);
    --mk-accent: #4d82ff; --mk-green: #32d74b; --mk-red: #ff5a50;
  }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.stage { position: relative; font-size: 13px; font-size: min(1.1607cqi, 13px); line-height: 1.3; color: var(--mk-text); padding-bottom: 8.5em; }
.stage b { font-weight: 600; }
.stage small { display: block; font-size: 0.85em; color: var(--mk-muted); }
:where(.stage) svg { width: 1.25em; height: 1.25em; flex: none; }

.mac {
  position: relative; width: 67.7em; display: grid; grid-template-columns: 17.7em minmax(0, 1fr);
  background: var(--mk-bg); border: 1px solid var(--mk-line); border-radius: 0.9em; overflow: hidden;
  box-shadow: 0 2.2em 5em rgba(14, 26, 69, 0.22), 0 0.4em 1.2em rgba(14, 26, 69, 0.12);
}
.lights { position: absolute; top: 1.35em; left: 1.4em; display: flex; gap: 0.62em; z-index: 1; }
.lights i { width: 0.92em; height: 0.92em; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15); }
.lights i + i { background: #febc2e; }
.lights i + i + i { background: #28c840; }

.mac-side { display: flex; flex-direction: column; justify-content: space-between; background: var(--mk-side); border-right: 1px solid var(--mk-line); padding: 3.6em 0.75em 0; }
.side-h { margin: 0.9em 0 0.3em 0.7em; font-size: 0.85em; font-weight: 700; color: var(--mk-muted); }
.side-h:first-child { margin-top: 0; }
.row { display: flex; align-items: center; gap: 0.6em; padding: 0.32em 0.7em; border-radius: 0.5em; }
.row-t { min-width: 0; flex: 1; white-space: nowrap; }
.row-t b { font-weight: 400; }
.row-ic { width: 1.25em; color: var(--mk-muted); }
.row.sel { background: var(--mk-accent); color: #fff; }
.row.sel small, .row.sel .row-ic { color: rgba(255, 255, 255, 0.82); }
.dot { width: 0.62em; height: 0.62em; border-radius: 50%; background: var(--mk-green); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9); }
.side-foot { display: grid; gap: 0.6em; margin: 1.4em -0.75em 0; padding: 0.9em 0.9em 1em; border-top: 1px solid var(--mk-line); }

.flag { display: inline-block; width: 1.4em; height: 1em; border-radius: 0.18em; vertical-align: -0.15em; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18); }
.flag.nl { background: linear-gradient(#ae1c28 0 33.4%, #fff 0 66.6%, #21468b 0); }
.flag.de { background: linear-gradient(#000 0 33.4%, #dd0000 0 66.6%, #ffce00 0); }
.flag.ch { width: 1em; background: linear-gradient(#fff, #fff) 50% 50% / 62% 20% no-repeat, linear-gradient(#fff, #fff) 50% 50% / 20% 62% no-repeat, #da291c; }
.row > .flag { width: 1.25em; height: 0.9em; }
.row > .flag.ch { width: 0.9em; margin: 0 0.175em; }

.mbtn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45em; border-radius: 0.5em; white-space: nowrap; font-weight: 500; stroke: #fff; }
.mbtn.blue, .mbtn.line { padding: 0.5em 0.8em; }
.mbtn.blue { background: var(--mk-accent); color: #fff; }
.mbtn.line { border: 1px solid var(--mk-line); background: var(--mk-card); stroke: var(--mk-card); }
.mbtn.push { padding: 0.2em 0.75em; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 0.4em; box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.12); }
.mbtn.off { color: var(--mk-muted); opacity: 0.7; }

.mac-main { display: flex; flex-direction: column; min-width: 0; }
.mac-title { margin: 0; padding: 1.05em 1.5em 0.9em; font-size: 1.12em; font-weight: 700; border-bottom: 1px solid var(--mk-line); }
.form { flex: 1; padding: 1.3em 1.5em 1.5em; }
.group { background: var(--mk-group); border: 1px solid var(--mk-line); border-radius: 0.75em; padding: 0.9em 1em; }
.group-h { margin: 1.3em 0 0.5em 0.3em; font-weight: 700; }
.m-head { display: flex; align-items: center; gap: 0.9em; }
.m-head-ic { width: 2em; height: 2em; color: var(--mk-accent); margin: 0 0.2em; }
.m-head-t { flex: 1; min-width: 0; }
.m-head-t b { display: block; font-size: 1.32em; font-weight: 700; }
.m-head-t small { font-size: 0.92em; }
.m-lock { display: flex; align-items: center; gap: 0.5em; margin: 0.75em 0 0; padding-top: 0.75em; border-top: 1px solid var(--mk-line); color: var(--mk-muted); }
.m-lock svg { width: 1.1em; height: 1.1em; }
.m-bottom { display: flex; align-items: center; gap: 0.6em; padding: 0.8em 1.5em; border-top: 1px solid var(--mk-line); }
.m-del { margin-right: auto; color: var(--mk-red); opacity: 0.55; }

/* The live route: chain cards and wires, as LiveChainView draws them. */
.route { display: flex; align-items: center; justify-content: center; padding-top: 0.6em; }
.cc {
  position: relative; flex: 1 1 8em; min-width: 6.5em; max-width: 11.5em; min-height: 8em;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25em; text-align: center;
  padding: 0.75em 0.6em; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 0.92em;
}
.cc.on { border: 1.5px solid color-mix(in srgb, var(--mk-green) 60%, transparent); }
.cc-ic { width: 1.6em; height: 1.6em; color: var(--mk-accent); margin-bottom: 0.2em; }
.cc-flag { font-size: 1.55em; line-height: 1; margin-bottom: 0.12em; }
.cc b, .cc-t small { display: block; white-space: nowrap; }
.cc em { font-style: normal; font-size: 0.85em; font-weight: 500; color: var(--mk-green); }
.badge { position: absolute; top: -0.65em; left: 50%; transform: translateX(-50%); font-size: 0.78em; font-weight: 600; padding: 0.05em 0.55em; border-radius: 999px; background: color-mix(in srgb, var(--mk-accent) 18%, var(--mk-card)); }
.mw { --d: 0s; position: relative; flex: 1 1 3em; min-width: 1.3em; max-width: 5em; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--mk-accent) 70%, transparent); overflow: hidden; }
.route > .mw:nth-of-type(2) { --d: -0.26s; }
.route > .mw:nth-of-type(3) { --d: -0.52s; }
.mw i { position: absolute; inset: 0; animation: mw-x 1.5s linear infinite; animation-delay: var(--d); }
.mw i:nth-child(2) { animation-delay: calc(var(--d) - 0.5s); }
.mw i:nth-child(3) { animation-delay: calc(var(--d) - 1s); }
.mw i::after { content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 45%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95) 75%, transparent); }
@keyframes mw-x { from { transform: translateX(0); } to { transform: translateX(145%); } }
@keyframes mw-y { from { transform: translateY(0); } to { transform: translateY(145%); } }
.demo.is-paused .mw i { animation-play-state: paused; }
.rate { display: flex; align-items: center; gap: 0.45em; margin: 0.9em 0 0; color: var(--mk-muted); font-variant-numeric: tabular-nums; }
.rate-v { white-space: pre; }

/* The menu bar panel, over the corner of the window. */
.tray {
  position: absolute; right: 0; top: 29.5em; width: 24.6em; padding: 1.1em 1.1em 0.8em;
  border-radius: 0.95em; border: 1px solid var(--mk-line);
  background: color-mix(in srgb, var(--mk-bg) 94%, transparent);
  box-shadow: 0 1.6em 3.6em rgba(14, 26, 69, 0.3), 0 0.3em 0.9em rgba(14, 26, 69, 0.15);
}
.tray-head { display: flex; align-items: center; gap: 0.7em; }
.tray-head img { width: 3em; height: 3em; }
.tray-head b { flex: 1; font-size: 1.15em; font-weight: 700; }
.tray-lock { color: var(--mk-muted); }
.tray-status { display: flex; align-items: center; gap: 0.8em; margin: 1em 0; padding: 0.85em; border-radius: 0.75em; background: var(--mk-group); border: 1px solid var(--mk-line); }
.tray-shield { width: 3.1em; height: 3.1em; border-radius: 50%; display: grid; place-items: center; color: var(--mk-green); background: color-mix(in srgb, var(--mk-green) 15%, transparent); }
.tray-shield svg { width: 1.45em; height: 1.45em; }
.tray-t b { display: block; font-size: 1.08em; }
.tray-t > span { display: block; font-size: 0.92em; }
.tray-btn { display: block; text-align: center; padding: 0.5em; border-radius: 0.5em; background: var(--mk-red); color: #fff; font-weight: 600; }
.tray-foot { display: flex; justify-content: space-between; margin-top: 0.8em; padding-top: 0.7em; border-top: 1px solid var(--mk-line); font-size: 0.92em; }

@container (max-width: 1000px) {
  .stage { font-size: min(1.477cqi, 13px); padding-bottom: 0; }
  .mac { width: 100%; }
  .tray { display: none; }
}
@container (max-width: 600px) {
  .stage { font-size: 13px; }
  .mac { grid-template-columns: minmax(0, 1fr); }
  .mac-side, .m-bottom { display: none; }
  .mac-title { padding-left: 5.6em; }
  .lights { top: 1.25em; left: 1.2em; }
  .form { padding: 1em; }
  .m-head .mbtn { display: none; }
  .route { flex-direction: column; align-items: stretch; padding-top: 0.4em; }
  .cc { flex: none; max-width: none; min-height: 0; flex-direction: row; justify-content: flex-start; gap: 0.75em; text-align: left; padding: 0.7em 0.85em; }
  .cc-ic, .cc-flag { width: 1.85rem; margin: 0; text-align: center; }
  .cc-flag { font-size: 1.3em; }
  .cc-t { flex: 1; min-width: 0; }
  .badge { top: -0.7em; left: auto; right: 0.8em; transform: none; }
  .mw { flex: 0 0 1.6em; width: 3px; height: auto; min-width: 0; margin-left: calc(0.85em + 0.925rem - 1px); }
  .mw i { animation-name: mw-y; }
  .mw i::after { top: auto; bottom: 100%; left: 0; right: 0; width: auto; height: 45%; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.95) 75%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .mw i { display: none; }
  .mw { background: var(--mk-accent); box-shadow: 0 0 6px color-mix(in srgb, var(--mk-accent) 70%, transparent); }
}
