:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #182033;
  --muted: #5d667a;
  --faint: #9aa3b5;
  --line: #e2e7f0;
  --accent: #e57000;
  --accent-soft: #fff1e3;
  --navy: #141925;
  --shadow: 0 10px 30px rgba(28, 45, 95, 0.12), 0 1px 3px rgba(28, 45, 95, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; }

/* ---------- top bar ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 28px; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(226, 231, 240, 0.8); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand svg { width: 26px; height: 29px; }
.brand b { font-size: 19px; letter-spacing: -0.3px; }
.brand .beta { padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.nav nav { display: flex; align-items: center; gap: 26px; }
.nav nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav nav a:hover { color: var(--text); }
.nav nav a.cta { color: #fff; background: var(--accent); padding: 8px 16px; border-radius: 9px; font-weight: 600; }

/* ---------- hero: the live city behind ---------- */
.hero { position: relative; height: 100vh; min-height: 620px; overflow: hidden; background: #e6ebf6; }
.hero .city { position: absolute; inset: 0; opacity: 0; transition: opacity 1.5s ease; }
.hero .city.ready { opacity: 1; }
.hero .city canvas { display: block; }
.hero .city .still { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero .city .labels { display: none; }
.hero .shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(244, 246, 251, 0.95) 0%, rgba(244, 246, 251, 0.78) 34%, rgba(244, 246, 251, 0) 62%), linear-gradient(0deg, var(--bg) 0%, rgba(244, 246, 251, 0) 22%); }
.hero .pitch { position: absolute; z-index: 2; left: max(28px, 7vw); top: calc(50% + 32px); transform: translateY(-50%); max-width: 560px; }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 14px 0 18px; font-size: clamp(40px, 5.6vw, 70px); line-height: 1.02; letter-spacing: -2px; }
.hero p { margin: 0 0 28px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.acts { display: flex; gap: 12px; flex-wrap: wrap; }
.acts.center { justify-content: center; margin-top: 26px; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 6px 18px rgba(229, 112, 0, 0.3); }
.btn.ghost { background: var(--panel); color: var(--accent); box-shadow: var(--shadow); }
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-size: 13px; color: var(--muted); }
.live-note { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 4px rgba(31, 157, 85, 0.18); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(31, 157, 85, 0.05); } }

/* ---------- sections ---------- */
.band { padding: 96px max(28px, 7vw); text-align: center; }
.band h2 { margin: 0 0 12px; font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -1px; }
.lead { margin: 0 auto 42px; max-width: 640px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; max-width: 1180px; margin: 0 auto; text-align: left; }
.lg { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); }
.lg b { font-size: 15px; }
.lg span { font-size: 14px; line-height: 1.5; color: var(--muted); }
.feat { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 46px 28px; }
.feat.flip { grid-template-columns: 1fr 1.4fr; }
.feat.flip img { order: 2; }
.feat img { width: 100%; border-radius: 16px; box-shadow: var(--shadow); }
.feat h3 { margin: 0 0 12px; font-size: 28px; letter-spacing: -0.6px; }
.feat p { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.band.dark { background: var(--navy); color: #e6e9f0; margin-top: 50px; }
.band.dark .lead { color: #a0a9bb; }
.layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: 1180px; margin: 0 auto; text-align: left; }
.layers div { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; border: 1px solid #2d3445; border-radius: 14px; background: #1b2130; }
.layers b { font-size: 16px; color: #fff; }
.layers span { font-size: 14px; line-height: 1.55; color: #a0a9bb; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; max-width: 1280px; margin: 0 auto; }
.shots figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.shots img { width: 100%; border-radius: 14px; border: 1px solid #2d3445; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.shots figcaption { font-size: 14px; color: #a0a9bb; }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; max-width: 860px; margin: 0 auto; }
.dlc { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); color: var(--text); text-align: left; border: 1px solid transparent; }
.dlc:hover { border-color: var(--accent); }
.dlc b { font-size: 18px; }
.dlc span { font-size: 14px; color: var(--muted); }
.code { max-width: 860px; margin: 0 auto; padding: 20px 22px; text-align: left; background: var(--navy); color: #dfe6f5; border-radius: 14px; font: 13.5px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; }
.code .c { color: #6f7a8f; }
.foot { display: flex; justify-content: space-between; padding: 28px max(28px, 7vw); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 210px minmax(0, 820px); gap: 48px; justify-content: center; padding: 110px 28px 60px; }
.docs aside { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.docs aside a { padding: 6px 10px; border-radius: 7px; color: var(--muted); font-size: 14px; }
.docs aside a:hover { background: var(--accent-soft); color: var(--accent); }
.docs h1 { margin: 0 0 14px; font-size: 38px; letter-spacing: -1px; }
.docs h2 { margin: 42px 0 12px; font-size: 23px; letter-spacing: -0.4px; scroll-margin-top: 90px; }
.docs p, .docs li { font-size: 15.5px; line-height: 1.65; color: #2c3446; }
.docs .code { margin: 14px 0; max-width: none; }
.docs .note { padding: 10px 14px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 9px; }
.docs table { width: 100%; border-collapse: collapse; margin: 14px 0; background: var(--panel); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); font-size: 14px; }
.docs th, .docs td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs th { background: #f8f9fc; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }

/* ---------- version and changelog ---------- */
.nav { gap: 12px; }
.nav .ver { margin-right: auto; padding: 3px 8px; border-radius: 6px; background: #f0f2f7; color: var(--muted); font-size: 12px; font-weight: 600; }
.nav .ver:hover { color: var(--accent); background: var(--accent-soft); }
.changelog .rel { padding-top: 6px; }
.changelog h2 { display: flex; align-items: baseline; gap: 10px; }
.changelog h2 small { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--faint); }
.changelog .latest { padding: 2px 8px; border-radius: 6px; background: #e2f6ea; color: #1f9d55; font-size: 11.5px; font-weight: 700; letter-spacing: 0.3px; }
.changelog .sec { display: grid; grid-template-columns: 84px 1fr; gap: 12px; margin: 10px 0; }
.changelog .kind { justify-self: start; height: fit-content; margin-top: 3px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.3px; background: #f0f2f7; color: var(--muted); }
.changelog .kind.added { background: #e2f6ea; color: #1f9d55; }
.changelog .kind.changed { background: var(--accent-soft); color: var(--accent); }
.changelog .kind.fixed { background: #fff2d4; color: #b7791f; }
.changelog .kind.removed { background: #fde6e7; color: #d43c3c; }
.changelog ul { margin: 0; padding-left: 18px; }
.changelog li { margin-bottom: 4px; }
.secnote { margin: 18px 0 0; padding: 10px 14px; max-width: 560px; font-size: 14px; line-height: 1.5; border-radius: 9px; border: 1px solid #f3c2c4; border-left: 3px solid #d43c3c; background: #fdecec; color: #5a1b1d; }
.secnote .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.secnote .vtag { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.secnote .vtag.hit { background: #d43c3c; color: #fff; }
.secnote .vtag.ok { background: #1f9d55; color: #fff; }
.secnote.fixed { border-color: #f1d9a6; border-left-color: #b7791f; background: #fff7e6; color: #5a3d0c; }
.changelog .secnote { max-width: none; margin-bottom: 8px; }
.security .ok-note { padding: 10px 14px; border-radius: 9px; border: 1px solid #bfe6cd; border-left: 3px solid #1f9d55; background: #eaf8f0; color: #174d2c; }
.security .secnote { max-width: none; }
.security .res { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.security .res.ok { background: #e2f6ea; color: #1f9d55; }
.security .res.bad { background: #fde6e7; color: #d43c3c; }
.security .cves { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
/* ---------- reconnect screen of the live demo (HeroReconnect.razor) ---------- */
.hero-rc { position: absolute; inset: 0; z-index: 1; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; outline: none; display: none; background: rgba(244, 246, 251, 0.82); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.6s ease; }
/* In the middle of the open part of the city, right of the text (the shade ends at 62%);
   the top bar is taken off, like the text's own centering. */
.hero-rc[open] { display: flex; align-items: center; justify-content: center; padding: 64px 0 0 52vw; }
.hero-rc.vis { opacity: 1; }
.hero-rc .rc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 260px; }
.hero-rc .brand { display: flex; align-items: center; gap: 12px; }
.hero-rc .brand svg { width: 40px; height: 45px; }
.hero-rc .brand b { font-size: 28px; font-weight: 700; letter-spacing: -0.4px; color: var(--text); }
.hero-rc .bar { position: relative; align-self: stretch; height: 3px; border-radius: 2px; background: var(--accent-soft); overflow: hidden; }
.hero-rc .bar i { position: absolute; inset: 0 auto 0 0; width: 45%; border-radius: 2px; background: var(--accent); animation: hero-rc-sweep 1.6s ease-in-out infinite; }
.hero-rc.components-reconnect-failed .bar i, .hero-rc.components-reconnect-resume-failed .bar i { width: 100%; background: #d43c3c; animation: none; }
.hero-rc.components-reconnect-retrying .rc-first, .hero-rc.components-reconnect-failed .rc-first,
.hero-rc.components-reconnect-paused .rc-first, .hero-rc.components-reconnect-resume-failed .rc-first { display: none !important; }
@keyframes hero-rc-sweep { from { transform: translateX(-100%); } to { transform: translateX(230%); } }
.hero-rc p { display: none; margin: 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.hero-rc .rc-acts { display: flex; gap: 8px; }
.hero-rc button { display: none; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 8px; cursor: pointer; }
.hero-rc button#components-reload-button { background: var(--panel); color: var(--accent); }
.hero-rc em.why { display: none; max-width: 300px; font-style: normal; font-size: 12px; line-height: 1.45; color: var(--faint); text-align: center; }
/* Which line and buttons show, by the state class blazor.web.js sets. */
.hero-rc.components-reconnect-show .rc-first,
.hero-rc.components-reconnect-retrying .rc-retry,
.hero-rc.components-reconnect-failed .rc-failed,
.hero-rc.components-reconnect-paused .rc-paused,
.hero-rc.components-reconnect-resume-failed .rc-resume-failed { display: block; }
.hero-rc.components-reconnect-failed button.rc-failed,
.hero-rc.components-reconnect-paused button.rc-paused,
.hero-rc.components-reconnect-resume-failed button.rc-resume-failed { display: inline-block; }

@media (max-width: 860px) { .changelog .sec { grid-template-columns: 1fr; gap: 4px; } }

/* Menu button for phones, hidden on wide screens. */
.mnav { display: none; position: relative; }
.mnav summary { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 9px; color: var(--text); cursor: pointer; list-style: none; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary svg { width: 24px; height: 24px; }
.mnav[open] summary { background: var(--accent-soft); color: var(--accent); }
.mnav > div { position: absolute; right: 0; top: 48px; min-width: 200px; display: flex; flex-direction: column; padding: 8px; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); }
.mnav > div a { padding: 11px 12px; border-radius: 8px; color: var(--text); font-size: 15px; font-weight: 500; }
.mnav > div a:active, .mnav > div a:hover { background: var(--accent-soft); color: var(--accent); }
.docs article { min-width: 0; }
.dtabs { display: flex; gap: 4px; margin: 0 0 26px; padding: 4px; width: fit-content; background: var(--panel); border-radius: 10px; box-shadow: var(--shadow); }
.dtabs a { padding: 6px 14px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--muted); }
.dtabs a:hover { color: var(--accent); }
.dtabs a.on { background: var(--accent); color: #fff; }
/* In the sidebar the tabs stand on top of each other and stay put; the copy at the top of the
   page is only for phones, where there is no sidebar. */
.docs aside .dtabs { flex-direction: column; width: auto; margin: 0 0 14px; }
.docs aside .dtabs a { padding: 8px 12px; color: var(--muted); }
.docs aside .dtabs a.on { color: #fff; }
.docs article > .dtabs { display: none; }

@media (max-width: 860px) {
  .docs article > .dtabs { display: flex; }
  .nav { padding: 0 12px 0 16px; gap: 8px; }
  .nav nav a:not(.cta) { display: none; }
  .nav nav a.cta { white-space: nowrap; padding: 8px 12px; font-size: 13.5px; }
  .mnav { display: block; }
  /* The live city on top, the text below on a calm background. */
  .hero { height: auto; min-height: 0; display: flex; flex-direction: column; padding-top: 64px; background: var(--bg); }
  .hero .city { position: relative; inset: auto; height: 42vh; min-height: 260px; }
  .hero .shade { top: 64px; height: 42vh; min-height: 260px; background: linear-gradient(0deg, var(--bg) 0%, rgba(244, 246, 251, 0) 30%); }
  .hero .pitch { position: static; transform: none; max-width: none; padding: 8px 16px 44px; }
  .hero-rc { inset: 64px 0 auto 0; height: 42vh; min-height: 260px; }
  .hero-rc[open] { justify-content: center; padding: 0; }
  .hero h1 { margin: 10px 0 14px; letter-spacing: -1.2px; }
  .hero p { font-size: 16.5px; margin-bottom: 22px; }
  .band { padding: 64px 16px; }
  .lead { margin-bottom: 28px; }
  .feat, .feat.flip { grid-template-columns: 1fr; gap: 18px; padding: 28px 16px; }
  .feat.flip img { order: 0; }
  .feat h3 { font-size: 23px; }
  .code { font-size: 12px; padding: 14px; border-radius: 10px; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 88px 16px 40px; }
  .docs aside { display: none; }
  .docs h1 { font-size: 32px; }
  .docs table { display: block; overflow-x: auto; font-size: 13px; }
  /* Scrolls when wider than the screen, fills the width when not. */
  .docs table tbody { display: table; width: 100%; }
  .docs th, .docs td { padding: 8px 10px; }
  .foot { flex-direction: column; gap: 6px; padding: 24px 16px; }
}
@media (max-width: 400px) {
  .nav .ver { display: none; }
}

/* ---------- downloads ---------- */
.dlc[data-os].me { border-color: var(--accent); }
.dlb { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 14px; font-size: 14px; margin-top: 4px; }
.dlb small { font-size: 12px; opacity: 0.8; }
.dlc .dlb, .dlc .dlb small { color: #fff; }
.dl-meta { margin: 22px 0 6px; color: var(--muted); font-size: 14px; }
.dl-note { max-width: 680px; margin: 0 auto 24px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.reltab { width: 100%; border-collapse: collapse; font-size: 14px; }
.reltab td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.reltab code { font-size: 12px; word-break: break-all; }

/* Image viewer (site.js): a screenshot big over the page. */
.feat img, .shots img { cursor: zoom-in; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px 16px; background: rgba(12, 14, 20, 0.86); backdrop-filter: blur(4px); animation: lb-in 0.18s ease-out; }
.lb figure { margin: 0; max-width: min(1600px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); cursor: default; }
.lb figcaption { color: #e6e9f0; font-size: 14px; text-align: center; }
.lb button { border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, 0.12); display: flex; align-items: center; justify-content: center; font: inherit; }
.lb button:hover { background: rgba(255, 255, 255, 0.22); }
.lb-x { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 10px; font-size: 26px; line-height: 1; }
.lb-nav { flex: none; width: 44px; height: 64px; border-radius: 12px; font-size: 34px; line-height: 1; }
@media (max-width: 700px) { .lb-nav { position: absolute; bottom: 16px; height: 44px; } .lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; } }
@keyframes lb-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lb { animation: none; } }
