/* Toolbox download page. Plain CSS, no build step. */

:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #566074;
  --border: #e2e8f0;
  --accent: #2362ea;
  --accent-hover: #1b50c7;
  --on-accent: #ffffff;
  --link: #1d55d4;
  --soft: #e8effd;
  --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 18px 40px -12px rgb(15 23 42 / .22);
  --video: #2563eb;
  --subs: #7c3aed;
  --exp: #c2650a;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d111c;
    --surface: #151a28;
    --text: #e8ecf4;
    --muted: #9aa4b6;
    --border: #262d40;
    --accent-hover: #3a74f0;
    --link: #7ea6ff;
    --soft: #172241;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 18px 40px -12px rgb(0 0 0 / .7);
    --video: #3b82f6;
    --subs: #8b5cf6;
    --exp: #d97706;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
code { font: .88em var(--mono); background: var(--soft); padding: .12em .4em; border-radius: 6px; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor;
       stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

[hidden] { display: none !important; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent);
               backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
               border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; text-decoration: none; }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--text); }

/* Hero */
.hero { text-align: center; padding-block: clamp(44px, 9vw, 92px) 0; }
.hero-icon { margin: 0 auto 22px; border-radius: 22px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4rem); font-weight: 780; letter-spacing: -.035em; }
.lead { max-width: 34em; margin: 16px auto 0; color: var(--muted); font-size: clamp(1.05rem, 2.4vw, 1.25rem); }

.cta-block { margin-top: 32px; display: grid; justify-items: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 14px; font-weight: 650;
       text-decoration: none; transition: background-color .15s, transform .15s, box-shadow .15s; }
.btn-primary { background: var(--accent); color: var(--on-accent); padding: 15px 28px; font-size: 1.08rem;
               box-shadow: 0 1px 2px rgb(35 98 234 / .3), 0 10px 24px -8px rgb(35 98 234 / .55); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; transform: translateY(-1px); }
.btn-primary:active { transform: none; }
.btn-primary .ico { width: 1.35em; height: 1.35em; }
button.btn { border: 0; font-family: inherit; cursor: pointer; }

/* Split button: download for the chosen platform, plus a menu to switch platform. */
.split { position: relative; display: inline-flex; border-radius: 14px; transition: transform .15s;
         box-shadow: 0 1px 2px rgb(35 98 234 / .3), 0 10px 24px -8px rgb(35 98 234 / .55); }
.split:hover { transform: translateY(-1px); }
.split .btn-primary { box-shadow: none; }
.split .btn-primary:hover { transform: none; }
.split.has-menu .split-main { border-radius: 14px 0 0 14px; }
.split .split-toggle { border-radius: 0 14px 14px 0; padding-inline: 14px; box-shadow: inset 1px 0 0 rgb(255 255 255 / .3); }
.split-toggle .ico { width: 1.2em; height: 1.2em; transition: transform .2s; }
.split-toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }

.menu { position: absolute; top: calc(100% + 8px); left: 50%; z-index: 5; min-width: min(270px, calc(100vw - 40px));
        padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
        box-shadow: var(--shadow); text-align: left; transform: translateX(-50%); animation: menu-in .14s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translate(-50%, -4px); } }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
             background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.menu-item .ico:first-child { color: var(--accent); }
.menu-item:hover, .menu-item:focus-visible { background: var(--soft); }
.menu-item:focus-visible { outline-offset: -3px; }
.menu-item .tick { margin-left: auto; color: var(--accent); visibility: hidden; }
.menu-item[aria-checked="true"] .tick { visibility: visible; }

.meta { color: var(--muted); font-size: .92rem; }
.notice { display: inline-flex; gap: 10px; align-items: flex-start; text-align: left; max-width: 30em;
          padding: 12px 16px; border-radius: 12px; background: var(--soft); color: var(--text); font-size: .95rem; }
.notice .ico { margin-top: .2em; color: var(--accent); }

/* Screenshots */
.shot { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
        background: var(--surface); box-shadow: var(--shadow); }
.shot img { width: 100%; }
.shot-hero { margin: 52px auto 0; max-width: 1000px; aspect-ratio: 16 / 10; border-bottom: 0;
             border-bottom-left-radius: 0; border-bottom-right-radius: 0;
             -webkit-mask-image: linear-gradient(#000 74%, transparent); mask-image: linear-gradient(#000 74%, transparent); }
.shot-hero img { height: 100%; object-fit: cover; object-position: top; }

/* Swipeable strip: large enough to read, no JavaScript needed. */
.screens { display: flex; gap: 20px; margin-top: 28px; padding: 4px 4px 22px; overflow-x: auto;
           scroll-snap-type: x mandatory; scrollbar-width: thin; overscroll-behavior-x: contain; }
.shot-card { flex: 0 0 min(880px, 88%); scroll-snap-align: start; display: flex; flex-direction: column; }
.shot-card img { aspect-ratio: 2560 / 1960; }
.shot-card figcaption { padding: 12px 18px; font-weight: 600; border-top: 1px solid var(--border); }

/* Sections */
.section { padding-block: clamp(48px, 8vw, 84px) 0; }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 750; }
.section-sub { margin-top: 10px; color: var(--muted); max-width: 42em; }

/* Platforms */
.platforms { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.platform, .tool { transition: border-color .15s, box-shadow .15s, transform .15s; }
.platform:hover, .tool:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.platform { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border);
            border-radius: var(--radius); background: var(--surface); color: var(--text); }
.p-select { display: grid; gap: 2px; flex: 1; width: 100%; padding: 22px; border: 0; border-radius: var(--radius);
            background: none; color: inherit; font: inherit; text-align: left; align-content: start; cursor: pointer; }
.p-select:focus-visible { outline-offset: -5px; border-radius: 12px; }
.platform .p-select .ico { width: 30px; height: 30px; color: var(--accent); margin-bottom: 10px; }
.p-name { font-size: 1.2rem; font-weight: 700; }
.p-detail { color: var(--muted); font-size: .93rem; }
.p-size { color: var(--muted); font-size: .85rem; }
.p-size:empty { display: none; }
.platform.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.platform.is-selected:hover { box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.p-badge { position: absolute; top: 16px; right: 16px; padding: 2px 10px; border-radius: 999px; font-size: .75rem;
           font-weight: 650; background: var(--accent); color: var(--on-accent); pointer-events: none; }
.platform.is-missing { opacity: .7; }

/* The Download button shows under the selected card only. Its space is always reserved, so
   selecting a card never changes the height of the page. Without JavaScript every card keeps its button. */
.p-action { transition: opacity .25s ease, transform .25s ease, visibility 0s; }
.p-download { display: flex; justify-content: center; margin: 0 22px 22px; padding: 12px 20px; font-size: 1rem; }
.p-download:hover { transform: none; }
.platforms.is-interactive .platform:not(.is-selected) .p-action { opacity: 0; transform: translateY(-6px); visibility: hidden;
                                                                   transition: opacity .2s ease, transform .2s ease, visibility 0s .2s; }

/* Tools */
.group { margin: 36px 0 14px; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.tool { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border);
        border-radius: 14px; background: var(--surface); }
.tool strong { display: block; font-size: 1.02rem; }
.tool p { margin-top: 2px; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.chip { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; color: #fff; }
.chip .ico { width: 20px; height: 20px; }
.video .chip { background: var(--video); }
.subs  .chip { background: var(--subs); }
.exp   .chip { background: var(--exp); }

/* Install help */
.steps { margin-top: 26px; display: grid; gap: 12px; align-content: start; }
details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
details[open]:not(.is-closing) { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 650; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary .ico:first-child { color: var(--accent); }
summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
details[open]:not(.is-closing) .chev { transform: rotate(180deg); }
details ol { margin: 0; padding: 0 22px 20px 44px; color: var(--muted); }
details li { padding-left: 6px; margin-top: 8px; }
details li strong { color: var(--text); }

.callout { margin-top: 20px; display: flex; gap: 14px; padding: 18px 20px; border-radius: 14px; background: var(--soft); }
.callout > .ico { width: 24px; height: 24px; margin-top: 2px; color: var(--accent); }
.callout p { margin-top: 4px; color: var(--muted); font-size: .96rem; }

/* Footer */
.site-footer { margin-top: clamp(56px, 9vw, 96px); border-top: 1px solid var(--border); padding-block: 32px calc(32px + env(safe-area-inset-bottom)); }
.foot { display: grid; gap: 8px; color: var(--muted); font-size: .92rem; }
.foot .links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.foot .links a { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 560px) {
  .nav { gap: 14px; }
  .nav a:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .platform:hover, .tool:hover, .split:hover { transform: none; }
}
