/* Light theme, from the light-mode app icon: white, black and Feedback green.
   Dark is the default; html[data-theme="light"] switches. */

html[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f4f5f2;
  --panel-2: #eef0ec;
  --line: #e2e5df;
  --text: #0b0c0d;
  --muted: #585c63;
  --green: #0c8f3d;          /* green for text and small marks, readable on white */
  --green-ink: #06130a;
  color-scheme: light;
}
html[data-theme="dark"] { color-scheme: dark; }

/* Buttons and badges keep the icon's bright green with black text. */
html[data-theme="light"] .button:not(.ghost),
html[data-theme="light"] .top nav .cta,
html[data-theme="light"] .pro { background: #20e261; color: #06130a; }

html[data-theme="light"] .top { background: rgba(255, 255, 255, .82); border-bottom: 1px solid rgba(0, 0, 0, .06); }
html[data-theme="light"] .hero { background: linear-gradient(180deg, rgba(32, 226, 97, .16), rgba(32, 226, 97, 0) 440px); }
html[data-theme="light"] .hero .icon { filter: drop-shadow(0 16px 34px rgba(12, 143, 61, .22)); }
html[data-theme="light"] figure { background: #ffffff; }
html[data-theme="light"] .plan.featured { background: linear-gradient(180deg, rgba(32, 226, 97, .14), rgba(32, 226, 97, .03)), var(--panel); border-color: rgba(12, 143, 61, .45); }
html[data-theme="light"] .cta-box { background: linear-gradient(180deg, rgba(32, 226, 97, .14), rgba(32, 226, 97, .03)), var(--panel); border-color: rgba(12, 143, 61, .4); }
html[data-theme="light"] kbd { background: #ffffff; }

/* Enlarged images */
html[data-theme="light"] .lb.on { background: rgba(250, 251, 249, .9); }
html[data-theme="light"] .lb img { box-shadow: 0 30px 80px rgba(0, 0, 0, .22); }
html[data-theme="light"] .lb .hint { color: rgba(0, 0, 0, .5); }

/* <picture> wrappers (AVIF with a JPEG fallback) lay out as if the image were there on its own. */
picture { display: contents; }

/* The switch */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-left: 18px; padding: 0;
  border-radius: 9px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; vertical-align: middle;
  transition: color .2s, background .2s;
}
.theme-toggle:hover { color: var(--text); background: var(--panel); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
html[data-theme="light"] .theme-toggle .sun { display: block; }
html[data-theme="light"] .theme-toggle .moon { display: none; }

/* Smooth switch between themes, but not on first paint. */
html.theme-anim, html.theme-anim * { transition: background-color .3s ease, color .3s ease, border-color .3s ease !important; }

/* One top bar for every page, identical down to the pixel, so nothing moves between pages. */
/* Every page keeps its scroll track, short or long, so the width never changes between pages (works in Safari too). */
html { overflow-y: scroll; scrollbar-gutter: stable; }
header.top { position: sticky; top: 0; z-index: 10; }
header.top > div { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 64px;
                   display: flex; justify-content: space-between; align-items: center; }
header.top .brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; line-height: 1;
                    font-weight: 650; letter-spacing: -.01em; text-decoration: none; }
header.top .brand img { width: 28px; height: 28px; }
header.top .brand .mark { display: block; height: 22px; width: auto; color: var(--text); }
header.top nav { display: flex; align-items: center; flex-wrap: nowrap; }
header.top nav a { margin-left: 22px; font-size: 15px; line-height: 1; color: var(--muted); text-decoration: none; }
header.top nav a:hover, header.top nav a.current { color: var(--text); }
header.top nav .cta { margin-left: 14px; padding: 9px 14px; border-radius: 9px; font-weight: 600; color: #06130a; background: #20e261; }
header.top nav .cta:hover { filter: brightness(1.06); }
header.top .theme-toggle { margin-left: 18px; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: 10px; padding: 0;
            border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.menu-btn svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  header.top nav a:not(.cta) { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 520px) {
  header.top nav .cta { display: none; }   /* the menu has Download */
}

/* Moving between pages: the top bar stays put while the page underneath fades over,
   instead of the whole window blanking and redrawing. (Safari 18.2+, Chrome 126+;
   other browsers simply load the page as before.) */
@view-transition { navigation: auto; }
header.top { view-transition-name: site-header; }
::view-transition-group(site-header) { animation: none; }
::view-transition-old(site-header), ::view-transition-new(site-header) { animation-duration: .15s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
