/* smattra.com. The greys are the plugins' own (Tree repo, shared/ui/Theme.h); colour comes only from the plugins' accents
   and the rainbow of all of them, as on the launcher's icon. Layout: header bar, two-column hero (download | launcher), plugin cards, help. */
:root {
  color-scheme: dark;
  --ground:  #1c1d20;
  --window:  #242528;   /* Theme::background */
  --header:  #222326;   /* Theme::header */
  --well:    #191a1c;   /* Theme::panel */
  --line:    #313338;   /* Theme::outline */
  --divider: #17181a;   /* Theme::divider */
  --text:    #d2d4d8;
  --dim:     #969aa1;
  --faint:   #5f636a;
  --glow:    #ff8a3d;   /* follows the family colours (site.js) */
  --rainbow: linear-gradient(90deg, #ff4b4b, #ff8a3d, #ffb547, #c4f05a, #7bd88f, #3fd9c2, #5468ff, #a57bff, #eb60fa, #ff6fb5);
  --rainbow-v: linear-gradient(180deg, #ff4b4b, #ffb547, #7bd88f, #3fd9c2, #5468ff, #a57bff, #ff6fb5);

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --small: 0.8125rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.55;
       padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }

/* The family logo: NAME | TYPE, light and spaced, with a coloured bar */
.logo { display: inline-flex; align-items: center; gap: 0.42em; font-family: var(--font-display); font-weight: 300;
        letter-spacing: 0.14em; text-transform: uppercase; line-height: 1; white-space: nowrap; margin: 0; }
.logo .bar { display: inline-block; width: max(2px, 0.093em); height: 0.88em; background: linear-gradient(var(--a, var(--text)), var(--a2, var(--a, var(--text)))); }
.logo .type { color: var(--dim); }
.logo.brand .bar { background: var(--rainbow-v); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--header) 92%, transparent);
       backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--divider); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.home { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-size: 1.125rem; }
.mark { width: 38px; height: 18px; flex: none; }
.mark path { fill: none; stroke: var(--dim); stroke-width: 1.5; stroke-linecap: round; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a.link { color: var(--dim); text-decoration: none; font-size: 0.9375rem; padding: 8px 12px; border-radius: 6px; }
.nav a.link:hover { color: var(--text); }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 600;
       color: var(--text); background: var(--window); border: 1px solid var(--line); border-radius: 8px; padding: 14px 22px; cursor: pointer;
       text-decoration: none; transition: color .15s, border-color .15s, background-color .15s; }
.btn:hover { border-color: #43464c; color: #eceef0; }
.btn.primary { color: #f1f2f4; border: 1px solid transparent; isolation: isolate;
               background: linear-gradient(#2b2c30, #2b2c30) padding-box, var(--rainbow) border-box; }
.btn.primary::after { content: ""; position: absolute; z-index: -1; left: 10%; right: 10%; bottom: -8px; height: 14px; border-radius: 50%;
                      background: var(--rainbow); filter: blur(14px); opacity: .5; transition: opacity .2s; }
.btn.primary:hover { background: linear-gradient(#323337, #323337) padding-box, var(--rainbow) border-box; }
.btn.primary:hover::after { opacity: .8; }
.btn.small { padding: 8px 14px; font-size: 0.9375rem; border-radius: 7px; }
.btn.small::after { bottom: -5px; height: 10px; filter: blur(10px); }
.btn.small .os { width: 15px; height: 15px; }
.btn.is-soon { cursor: default; color: var(--faint); border-style: dashed; }
.btn.is-soon:hover { border-color: var(--line); color: var(--faint); }

/* Hero */
.hero { position: relative; overflow: clip; border-bottom: 1px solid var(--divider); }
.hero::before { content: ""; position: absolute; right: 2%; top: 14%; width: 46%; height: 64%; border-radius: 50%;
                background: var(--glow); filter: blur(130px); opacity: .17; transition: background-color 2.5s ease; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 64px);
              align-items: center; padding-block: clamp(40px, 7vw, 88px); }
.hero h1 { font-size: clamp(1.625rem, 1.1rem + 2.3vw, 2.75rem); }
.lede { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.3; margin: 22px 0 10px; text-wrap: balance; color: #e3e4e7; }
.sub { color: var(--dim); margin: 0 0 30px; max-width: 46ch; }

.dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; max-width: 520px; }
.dl-opt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dl-opt .meta { margin: 0; font-size: var(--small); color: var(--dim); font-variant-numeric: tabular-nums; padding-left: 2px; }
.dl .btn { width: 100%; padding: 11px 14px; gap: 13px; text-align: left; white-space: nowrap; }
.os { flex: none; width: 22px; height: 22px; fill: currentColor; }
.os.win { width: 19px; height: 19px; }
.lbl { display: flex; flex-direction: column; line-height: 1.2; }
.lbl small { font-size: 0.75rem; font-weight: 400; color: var(--dim); }
.lbl b { font-size: 1.125rem; font-weight: 600; }
.phone-note { margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--dim); font-size: 0.9375rem; }

.news { margin-top: 30px; background: var(--well); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.news h2 { margin: 0 0 6px; font-size: var(--small); font-weight: 600; color: var(--dim); letter-spacing: .02em; }
.news h2 span { font-weight: 400; color: var(--faint); }
.news p { margin: 0; font-size: 0.9375rem; white-space: pre-line; }
details.prev { margin-top: 10px; font-size: 0.875rem; }
details.prev summary { cursor: pointer; color: var(--dim); }
details.prev summary:hover { color: var(--text); }
.prev-empty { margin: 8px 0 0; color: var(--faint); }
.prev-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.prev-list li { display: grid; grid-template-columns: 4.5em 7em minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.prev-list .v { font-weight: 600; }
.prev-list .d { color: var(--faint); }
.prev-list .l { display: flex; gap: 14px; flex-wrap: wrap; justify-content: end; }
.prev-list a { color: var(--dim); }
.prev-list a span { color: var(--faint); }

.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line);
            box-shadow: 0 40px 90px -40px color-mix(in srgb, var(--glow) 55%, transparent), 0 18px 40px -20px #000;
            transition: box-shadow 2.5s ease; }
.shot figcaption { margin-top: 12px; font-size: var(--small); color: var(--faint); }

/* After the click */
.thanks { border: 1px solid var(--line); background: var(--well); border-radius: 10px; padding: 20px 22px; }
.thanks h2 { margin: 0 0 16px; font-size: 1.1875rem; font-weight: 600; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #3a3c42; display: grid; place-items: center;
                    font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.steps b { font-weight: 600; color: #eceef0; }
.thanks .links { margin: 18px 0 0; font-size: 0.875rem; display: flex; gap: 18px; flex-wrap: wrap; }
.thanks .links a, .thanks .links button { font: inherit; color: var(--dim); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.thanks .links a:hover, .thanks .links button:hover { color: var(--text); }

/* Sections */
section.block { padding-block: clamp(48px, 7vw, 84px); scroll-margin-top: 60px; }
section.help-block { padding-top: 0; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); line-height: 1.1; text-wrap: balance; }
.head p { margin: 0; color: var(--dim); max-width: 52ch; }

/* Plugin cards, as in the launcher */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 679px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card { display: flex; flex-direction: column; text-align: left; font: inherit; color: inherit; background: var(--window); border: 1px solid var(--line);
        border-radius: 9px; padding: 10px; cursor: pointer; transition: border-color .2s, box-shadow .25s, transform .25s; }
.card:hover, .card:focus-visible { border-color: color-mix(in srgb, var(--a) 65%, var(--line));
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--a) 30%, transparent), 0 18px 44px -22px color-mix(in srgb, var(--a) 70%, transparent); }
.card:focus-visible { outline: none; }
@media (prefers-reduced-motion: no-preference) { .card:hover { transform: translateY(-2px); } }
.well { display: block; aspect-ratio: 2.4 / 1; max-width: 100%; background: var(--well); border-radius: 6px; overflow: hidden; }
.well canvas { display: block; width: 100%; height: 100%; }
.card .logo { font-size: 1rem; margin: 16px 6px 0; }
.card .line { margin: 8px 6px 0; color: var(--dim); font-size: 0.9375rem; }
.card .foot { margin: auto 6px 2px; padding-top: 14px; display: flex; justify-content: space-between; font-size: var(--small); color: var(--faint); }
.card .more { color: var(--dim); }
.card:hover .more { color: var(--text); }

/* Plugin details */
dialog.pd { width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px;
            background: var(--window); color: var(--text); overflow: auto;
            box-shadow: 0 30px 90px -30px color-mix(in srgb, var(--a, #000) 55%, transparent), 0 20px 60px -20px #000; }
dialog.pd::backdrop { background: rgb(10 10 12 / .72); backdrop-filter: blur(4px); }
.pd-in { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
@media (max-width: 779px) { .pd-in { grid-template-columns: minmax(0, 1fr); } }
.pd-shot { margin: 0; padding: 18px; background: var(--well); display: grid; place-items: center; }
.pd-shot img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 10px 30px -12px #000; transition: opacity .2s; }
.pd-shot img.loading { opacity: 0; }
.pd-text { padding: 26px 26px 24px; display: flex; flex-direction: column; min-width: 0; }
.pd-text .logo { font-size: 1.5rem; }
.pd-line { margin: 18px 0 6px; font-size: 1.1875rem; color: #e3e4e7; }
.pd-about { margin: 0 0 16px; color: var(--dim); }
.pd-points { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 9px; }
.pd-points li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; font-size: 0.9375rem; }
.pd-points li::before { content: ""; width: 7px; height: 7px; margin: 8px 0 0 3px; border-radius: 50%;
                        background: color-mix(in srgb, var(--a) 75%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a) 22%, transparent), 0 0 9px var(--a); }
.pd-facts { margin: 0 0 22px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 0.875rem; }
.pd-facts div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
.pd-facts dt { color: var(--faint); }
.pd-facts dd { margin: 0; color: var(--dim); }
.pd-actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.pd-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
        background: var(--window); color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; z-index: 1; }
.pd-x:hover { color: var(--text); }

/* Help */
.help { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }
@media (max-width: 779px) { .help { grid-template-columns: minmax(0, 1fr); } }
.help details { border-top: 1px solid var(--line); padding: 14px 0; }
.help summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 1.25rem; line-height: 1; }
.help details[open] summary::after { content: "–"; }
.help details p { margin: 10px 0 0; color: var(--dim); max-width: 60ch; }
.help kbd { font: inherit; color: var(--text); }

footer { border-top: 1px solid var(--divider); background: var(--header); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 26px; font-size: 0.875rem; color: var(--faint); }
footer .home { font-size: 0.875rem; color: var(--dim); }
footer .mark { width: 30px; height: 14px; }

/* Small pages: not found, coming soon */
body.message main { padding-block: 48px; display: grid; gap: 8px; justify-items: start; }
body.message h1 { margin: 40px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 2rem; }
body.message p { margin: 0; color: var(--dim); }
body.message .btn { margin-top: 18px; }

@media (max-width: 899px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero::before { width: 90%; top: 50%; }
}
@media (max-width: 639px) {
  .nav a.link { display: none; }
  .dl { grid-template-columns: minmax(0, 1fr); }
  .prev-list li { grid-template-columns: 4.5em minmax(0, 1fr); }
  .prev-list .l { grid-column: 1 / -1; justify-content: start; }
}
