:root {
  --nav-height: 7.2rem;
  --paper: var(--bg);
  --ink: var(--text-strong);
  --muted: var(--text-secondary);
  --line: var(--border);
  --panel: var(--surface-subtle);
  /* The default light warning needs a darker foreground for body-size text.
     Dark mode and named palettes override this with their shared tokens. */
  --warning: #80500d;
  --section-gap: clamp(5.6rem, 7vw, 10rem);
  --section-title: clamp(2.8rem, 3vw, 4rem);
}

body { padding-top: var(--nav-height); background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-soft); color: var(--text); }
a { color: inherit; text-decoration: none; text-underline-offset: .3em; }
a, button, summary { touch-action: manipulation; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: .3rem solid var(--accent); outline-offset: .4rem; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.035em; }
p { text-wrap: pretty; }
#main, #features, #questions, h1, h2, h3 { scroll-margin-top: calc(var(--nav-height) + 2.4rem); }
.wrap { width: min(116rem, calc(100% - 8rem)); margin-inline: auto; }

.site-header { position: fixed; inset: 0 0 auto; height: var(--nav-height); z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-nav { height: 100%; display: flex; align-items: center; gap: 3.2rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; font: 700 2.7rem/1 var(--font-heading); letter-spacing: -.035em; flex-shrink: 0; }
.brand img { width: 3.2rem; height: 3.2rem; }
.nav-links { display: flex; gap: 2.8rem; margin-inline-start: auto; color: var(--muted); font-size: 1.4rem; }
.nav-links a { display: inline-flex; align-items: center; min-height: 4.4rem; }
.nav-links a:hover { color: var(--accent); }
.nav-download { margin-inline-start: auto; flex-shrink: 0; }
.nav-links + .nav-download { margin-inline-start: 0; }

.hero { text-align: center; padding-block: clamp(4.8rem, 6vw, 8rem) 0; }
.hero h1 { max-width: 20ch; margin-inline: auto; font-size: clamp(4rem, 5vw, 6rem); line-height: 1.08; }
.accent-word { color: var(--accent); }
.hero-copy { max-width: 61rem; color: var(--muted); margin: 2.4rem auto 0; font-size: 1.8rem; line-height: 1.7; }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; margin-top: 2.8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-height: 4.8rem; padding: 1.2rem 2.2rem; border: 0; border-radius: .8rem; font-size: 1.4rem; font-weight: 600; line-height: 1.5; text-align: center; }
.button-primary, .button-download, .refresh-release { background: var(--accent); color: var(--on-accent); }
.button-primary:hover, .button-download:hover, .refresh-release:hover:not(:disabled) { background: var(--accent-hover); color: var(--on-accent); }
.hero .button-primary { min-width: 22rem; }
.text-link { font-size: 1.4rem; text-decoration: underline; }
.platform-link { color: var(--muted); font-size: 1.3rem; }
.platform-link:hover { color: var(--accent); }

.feature-cards { display: flex; flex-direction: column; gap: 2.8rem; padding-block: 4.8rem var(--section-gap); }
.feature-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: clamp(2.4rem, 4vw, 5.6rem); min-width: 0; padding: clamp(2rem, 2.5vw, 3.2rem); border: 1px solid var(--line); border-radius: 1.6rem; background: var(--surface); }
.card-copy { min-width: 0; }
.card-copy h2 { max-width: 24ch; font-size: clamp(2.6rem, 2.4vw, 3.2rem); line-height: 1.15; }
.card-copy > p { max-width: 65ch; margin-top: 1.6rem; color: var(--muted); font-size: 1.6rem; line-height: 1.75; }
.card-copy > .small-note { margin-top: 1.2rem; font-size: 1.4rem; line-height: 1.65; }
.card-screenshot { min-width: 0; padding: 0; background: transparent; }
.card-screenshot img { display: block; width: 100%; height: auto; object-fit: contain; border-radius: .6rem; }

.faq { padding-block: 0 var(--section-gap); max-width: 84rem; }
.faq h2 { margin-bottom: 3.2rem; font-size: var(--section-title); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 6.8rem; padding-block: 1.6rem; cursor: pointer; font-size: 1.6rem; font-weight: 550; line-height: 1.5; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { color: var(--accent); font-size: 2.4rem; font-weight: 400; line-height: 1; flex-shrink: 0; }
.faq details[open] summary span { transform: rotate(45deg); }
.faq details p { max-width: 68ch; padding: 0 3.6rem 2.4rem 0; color: var(--muted); font-size: 1.6rem; line-height: 1.75; }

.footer { display: flex; justify-content: space-between; align-items: center; gap: 3.2rem; width: min(116rem, calc(100% - 8rem)); margin-inline: auto; padding-block: 3.2rem 4rem; border-top: 1px solid var(--line); }
.footer .brand { font-size: 2.4rem; }
.footer .brand img { width: 2.8rem; height: 2.8rem; }
.footer p { margin-top: 1.2rem; color: var(--muted); font-size: 1.4rem; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem 2.4rem; color: var(--muted); font-size: 1.3rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 4.4rem; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.skip-link { position: fixed; top: 1.2rem; left: 1.2rem; z-index: 20; padding: 1.2rem; background: var(--paper); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Downloads are grouped by operating system, with one row per format. */
.downloads { max-width: 96rem; padding-block: 5.6rem 7.2rem; }
.downloads h1 { font-size: clamp(3.2rem, 4vw, 4.4rem); line-height: 1.15; }
.download-intro { margin-top: 1.6rem; color: var(--muted); font-size: 1.6rem; line-height: 1.7; }
.download-status, .release-version { margin-top: 1.2rem; color: var(--muted); font-size: 1.4rem; line-height: 1.7; }
.release-version { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; }
.platforms { margin-top: 4rem; border-top: 1px solid var(--line); }
.download-platform { display: grid; grid-template-columns: 18rem minmax(0, 1fr); column-gap: 4rem; padding-block: 2.8rem; border-bottom: 1px solid var(--line); }
.download-os { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: 1rem; padding-top: .8rem; }
.download-os > svg { width: 2.8rem; height: 2.8rem; flex-shrink: 0; fill: var(--ink); }
.download-os h2 { font-size: 2.2rem; line-height: 1.3; }
.recommended { flex-basis: 100%; color: var(--accent); font-size: 1.2rem; margin-inline-start: 3.8rem; }
.recommended[hidden] { display: none; }
.download-list { list-style: none; min-width: 0; }
.download-row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1.2rem; }
.download-row + .download-row { border-top: 1px solid var(--line); }
.download-format { min-width: 0; }
.download-format h3 { font-family: var(--font-body); font-size: 1.6rem; font-weight: 600; letter-spacing: 0; line-height: 1.5; }
.download-format p { margin-top: .4rem; color: var(--muted); font-size: 1.3rem; line-height: 1.6; overflow-wrap: anywhere; }
.button-download { flex-shrink: 0; min-height: 4.4rem; padding: 1rem 1.6rem; }
.unavailable { flex-shrink: 0; color: var(--muted); font-size: 1.3rem; }
.platform-note { grid-column: 2; max-width: 65ch; margin-top: 1.2rem; color: var(--muted); font-size: 1.3rem; line-height: 1.7; }
.download-notes { display: grid; grid-template-columns: 18rem minmax(0, 1fr); gap: 4rem; padding-block: 3.2rem; }
.download-notes h2, .release-history h2 { font-size: 2.2rem; line-height: 1.3; }
.download-notes p, .release-details { max-width: 70ch; color: var(--muted); font-size: 1.4rem; line-height: 1.75; }
.download-notes p + p { margin-top: 1.2rem; }
.download-notes .text-link { display: inline-flex; align-items: center; min-height: 4.4rem; margin-top: .8rem; }
.release-history { border-top: 1px solid var(--line); padding-top: 3.2rem; }
.release-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; margin-bottom: 1.6rem; }
.release-meta { margin-bottom: 1.2rem; color: var(--ink); font-size: 1.4rem; }
.release-details ul { padding-inline-start: 2rem; }
.release-details li + li { margin-top: .8rem; }
.refresh-release { min-height: 4.4rem; padding: .8rem .2rem; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: .3em; font-size: 1.3rem; font-weight: 400; }
.refresh-release:hover:not(:disabled) { background: transparent; color: var(--accent); }
.refresh-release:disabled { opacity: .6; cursor: wait; }
.release-feedback { margin-top: 1.2rem; color: var(--muted); font-size: 1.4rem; }

@media (max-width: 1000px) {
  .footer { align-items: flex-start; }
  .footer-links { max-width: 32rem; }
}

@media (max-width: 760px) {
  :root { --nav-height: 6.4rem; }
  .wrap, .footer { width: calc(100% - 4rem); }
  .site-nav { gap: 1.6rem; justify-content: space-between; }
  .nav-links { display: none; }
  .nav-download, .nav-links + .nav-download { margin-inline-start: auto; }
  .site-nav .brand { font-size: 2.4rem; }
  .site-nav .brand img { width: 2.8rem; height: 2.8rem; }
  .hero { padding-top: 4.8rem; }
  .hero h1 { max-width: 17ch; font-size: clamp(4rem, 8vw, 5.4rem); }
  .hero-copy { font-size: 1.6rem; }
  .feature-cards { gap: 2.4rem; padding-top: 4rem; }
  .feature-card { grid-template-columns: 1fr; gap: 2.4rem; padding: 2.4rem; }
  .card-copy h2 { max-width: 24ch; }
  .faq h2 { margin-bottom: 2.4rem; }
  .faq summary { min-height: 6.4rem; }
  .footer { flex-direction: column; }
  .footer-links { max-width: none; }
  .downloads { padding-block: 3.2rem 4.8rem; }
  .platforms { margin-top: 2.8rem; }
  .download-platform { grid-template-columns: 1fr; padding-block: 2.4rem; }
  .download-os { padding-top: 0; margin-bottom: 1.2rem; }
  .recommended { flex-basis: auto; margin-inline-start: auto; }
  .platform-note { grid-column: 1; }
  .download-notes { grid-template-columns: 1fr; gap: 1.6rem; }
  .release-heading { flex-wrap: wrap; gap: .8rem; }
}

@media (max-width: 420px) {
  .wrap, .footer { width: calc(100% - 3.2rem); }
  .site-nav { gap: 1.2rem; }
  .site-nav .brand { font-size: 2.2rem; gap: .6rem; }
  .site-nav .brand img { width: 2.6rem; height: 2.6rem; }
  .nav-download { min-height: 4.4rem; padding-inline: 1.4rem; font-size: 1.2rem; }
  .feature-card { padding: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}

.nav-download-short { display: none; }
.theme-trigger { display: inline-flex; align-items: center; gap: .8rem; min-width: 0; max-width: 24rem; min-height: 4.4rem; padding: .8rem .4rem; border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.theme-trigger svg { width: 2rem; height: 2rem; flex-shrink: 0; }
.theme-trigger-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-trigger:hover, .theme-trigger[aria-expanded=true] { color: var(--ink); }
.theme-trigger[hidden] { display: none; }
.theme-picker { width: min(52rem, calc(100vw - 3.2rem)); max-height: min(64rem, calc(100dvh - 3.2rem)); margin: auto; padding: 0; border: 1px solid var(--border-strong); border-radius: 1.2rem; background: var(--surface); color: var(--text); }
.theme-picker[open] { display: flex; flex-direction: column; }
.theme-picker::backdrop { background: rgb(0 0 0 / 48%); }
.theme-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; padding: 1.6rem 2rem .8rem; }
.theme-picker-heading h2 { font-size: 2.4rem; }
.theme-close { display: grid; place-items: center; flex-shrink: 0; width: 4.4rem; height: 4.4rem; border: 0; border-radius: .6rem; background: transparent; color: var(--text); }
.theme-close:hover { background: var(--surface-hover); }
.theme-search { padding: .8rem 2rem 0; }
.theme-search label { display: block; margin-bottom: .6rem; font-size: 1.4rem; color: var(--text-secondary); }
.theme-search input { width: 100%; min-height: 4.4rem; padding: 1rem 1.2rem; border: 1px solid var(--border-strong); border-radius: .6rem; background: var(--bg); color: var(--text); font-size: 1.6rem; caret-color: var(--accent); }
.theme-search input::placeholder { color: var(--text-secondary); }
.theme-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme-count { padding: 1.2rem 2rem; color: var(--text-secondary); font-size: 1.3rem; border-bottom: 1px solid var(--border); }
.theme-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .8rem; }
.theme-options [role=option] { display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 4.8rem; padding: 1rem 1.2rem; border: 0; border-radius: .6rem; background: transparent; color: var(--text); font-size: 1.5rem; text-align: start; cursor: pointer; }
.theme-options [role=option][hidden] { display: none; }
.theme-options [role=option].highlighted, .theme-options [aria-selected=true] { background: var(--surface-hover); }
.theme-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-selected { display: none; color: var(--accent); font-size: 1.2rem; }
[aria-selected=true] > .theme-selected { display: inline; }
.theme-preview { display: flex; align-items: center; justify-content: center; gap: .4rem; flex-shrink: 0; width: 7.6rem; height: 2.8rem; padding: .5rem; background: var(--preview-bg); border: 1px solid var(--border-strong); border-radius: .4rem; }
.theme-preview i { width: 1.4rem; height: 1.4rem; border-radius: .2rem; }
.theme-preview i:nth-child(1) { background: var(--preview-main); }
.theme-preview i:nth-child(2) { background: var(--preview-sub); }
.theme-preview i:nth-child(3) { background: var(--preview-text); }
@media (max-width: 760px) {
  .theme-trigger { margin-inline-start: auto; }
  .nav-download { margin-inline-start: 0; padding-inline: 1.4rem; }
  .nav-download-long { display: none; }
  .nav-download-short { display: inline; }
}
@media (max-width: 420px) {
  .theme-trigger { padding-inline: .4rem; font-size: 1.3rem; }
  .site-nav .nav-download { display: none; }
  .theme-picker-heading { padding-inline: 1.6rem; }
  .theme-search, .theme-count { padding-inline: 1.6rem; }
  .theme-options [role=option] { gap: .6rem; padding-inline: .8rem; }
  .theme-preview { width: 6.4rem; }
}


html { scrollbar-gutter: stable; }
html.screenshot-open { overflow: hidden; }
.screenshot-link { display: block; border-radius: .6rem; cursor: zoom-in; }
.screenshot-modal { width: fit-content; max-width: calc(100vw - 3.2rem); max-height: calc(100dvh - 3.2rem); margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.screenshot-modal[open] { display: block; }
.screenshot-modal::backdrop { background: rgb(0 0 0 / 72%); }
.screenshot-close { position: absolute; top: .8rem; right: .8rem; z-index: 1; display: grid; place-items: center; width: 4.4rem; height: 4.4rem; border: 0; border-radius: .4rem; background: rgb(0 0 0 / 72%); color: #fff; cursor: pointer; }
.screenshot-close:hover { background: rgb(0 0 0 / 90%); }
.screenshot-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.screenshot-stage { display: grid; place-items: center; padding: 0; background: transparent; }
.screenshot-stage img { display: block; width: auto; height: auto; max-width: calc(100vw - 3.2rem); max-height: calc(100dvh - 3.2rem); object-fit: contain; }
.screenshot-stage img[hidden], .screenshot-status[hidden] { display: none; }
.screenshot-status { max-width: 50ch; padding: 6rem 2.4rem 2.4rem; color: #fff; font-size: 1.6rem; text-align: center; }
