/* The site's shared chrome: design tokens, the header, the footer, the
   page container every public page uses, and the release lists the download
   and extension pages render through /releases.js. The header and footer
   markup is written into each page by /chrome.py. Page-specific styles live
   with the page (inline for the download pages, extensions/extension.css for
   the extension pages, legal.css and account.css for the pages whose CSP
   forbids inline styles). */
:root {
  color-scheme: light;
  --accent:#6b52f2; --link:#6b52f2;
  --bg:#fbfbfd; --surface:#ffffff;
  --ink:#1d1d21; --muted:#6e6e73; --line:#d8d8dd;
  --danger:#b3261e;
  --shadow: 0 1px 2px rgba(26,20,64,.05), 0 14px 30px -16px rgba(26,20,64,.30);
  --site-width: 62rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  font: 16px/1.55 -apple-system, system-ui, "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(75% 30rem at 8% -6rem, color-mix(in srgb, var(--accent) 15%, transparent), transparent 72%);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

/* Header */
.site-header { flex: none; }
.site-header-inner {
  max-width: var(--site-width); margin: 0 auto; padding: 1.1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; letter-spacing: -.012em; color: var(--ink); text-decoration: none;
}
.brand img { width: 26px; height: 26px; display: block; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: .4rem .7rem; border-radius: 8px; transition: color .15s ease, background-color .15s ease;
}
.site-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav .site-cta {
  margin-left: .5rem; color: #fff; background: var(--accent); font-weight: 600;
  padding: .5rem .95rem; border-radius: 10px;
}
.site-nav .site-cta:hover { color: #fff; background: color-mix(in srgb, var(--accent) 86%, #000); }

/* Main */
.site-main { flex: 1 0 auto; width: 100%; }
.page { max-width: var(--site-width); margin: 0 auto; padding: 1rem 1.25rem 4.5rem; }
.page-narrow { max-width: 48rem; }

/* Footer */
.site-footer { flex: none; margin-top: auto; border-top: 1px solid var(--line);
               background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }
.site-footer-inner { max-width: var(--site-width); margin: 0 auto; padding: 2.6rem 1.25rem 2.2rem; }
.site-footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem 1.5rem;
}
.site-footer-brand p { margin: .8rem 0 0; font-size: .92rem; color: var(--muted); max-width: 30ch; }
.site-footer h2 {
  margin: 0 0 .7rem; font-size: .8rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 .45rem; }
.site-footer li a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.site-footer li a:hover { color: var(--link); text-decoration: underline; }
.site-footer-source {
  margin-top: 2.2rem; padding: 1.05rem 1.2rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
  display: grid; grid-template-columns: auto 1fr; gap: .2rem 1.2rem; align-items: center;
}
.site-footer-source .label { font-size: .85rem; font-weight: 600; color: var(--muted); grid-row: 1; }
.site-footer-source code {
  grid-row: 1; justify-self: start;
  font: .9rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; overflow-wrap: anywhere;
  padding: .3rem .6rem; border-radius: 8px; background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.site-footer-source .hint { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }

@media (max-width: 820px) {
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-header-inner { padding: .9rem 1rem; gap: .5rem; flex-wrap: wrap; }
  .site-nav { gap: 0; }
  .site-nav a { padding: .4rem .4rem; font-size: .9rem; }
  .site-nav .site-cta { display: none; }
  .site-footer-inner { padding-left: 1rem; padding-right: 1rem; }
  .site-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-footer-source { grid-template-columns: 1fr; }
  .site-footer-source .label, .site-footer-source code { grid-row: auto; }
  .page { padding-left: 1rem; padding-right: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Release lists and download rows, written by /releases.js on the download
   and extension pages. */
.release { padding: 1.35rem 0; border-top: 1px solid var(--line); }
.release-head { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.release h3 { margin: 0; font-size: 1.06rem; letter-spacing: -.018em; font-variant-numeric: tabular-nums; }
.release .tag { font-size: .74rem; font-weight: 700; padding: .14rem .5rem; border-radius: 999px;
                color: var(--link); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.release .date { font-size: .9rem; color: var(--muted); }
.release .dl { font-size: .87rem; font-weight: 600; text-decoration: none;
               padding: .32rem .7rem; border-radius: 8px; color: var(--link);
               border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
               transition: background-color .15s ease; }
.release .dl:first-of-type { margin-left: auto; }
.release .dl:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.release .needs { margin: .45rem 0 0; font-size: .88rem; color: var(--muted); }
.release .notes { margin: .7rem 0 0; padding-left: 1.15rem; max-width: 68ch; }
.release .notes li { margin: .35rem 0; }
.empty { padding: 1.4rem 0; color: var(--muted); border-top: 1px solid var(--line); }

.platforms { margin: 0 0 .9rem; }
.platform { display: flex; align-items: baseline; gap: .3rem 1rem; flex-wrap: wrap;
            padding: .7rem 0; border-top: 1px solid var(--line); }
.platform:first-child { border-top: 0; padding-top: 0; }
.platform-name { flex: 0 0 9.8rem; font-weight: 600; }
.platform-how { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.platform-how.pending { color: var(--muted); }
.platform .size { font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.platform .sum { flex-basis: 100%; font: .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
                 color: var(--muted); overflow-wrap: anywhere; }
.platform-group + .platform-group { margin-top: 1.6rem; }
.platform-os { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem;
               font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
.platform-os svg { width: 1.15rem; height: 1.15rem; flex: none; fill: currentColor; }
.platform-os + .platform { border-top: 0; padding-top: .2rem; }
.platform-group .platform-name { flex-basis: 12.5rem; font-weight: 500; }
.platform-later { margin: 0; color: var(--muted); }

@media (max-width: 560px) {
  .release .dl:first-of-type { margin-left: 0; }
  .platform-name { flex-basis: 100%; }
}
