/* Samatas site. One stylesheet for every page.
   Colours and sizes follow the picture-to-waterfall page:
   one text colour, one accent, one text size (17px) with a larger title,
   two gaps (8px inside a part, 40px between parts). */
:root {
    --bg: #0a0c16;
    --panel: #10131f;
    --line: #222838;
    --text: #e4e8f1;
    --accent: #5aa3c7;
    --amber: #e3a83a;
    --ink-on-accent: #06121a;
    /* Width / height of the plugin window as it opens, with CONTROLS on:
       analyzereditor::kDefaultW (900) and kDefaultPlotH + kStripH (460 + 80). */
    --shot-ratio: 900 / 540;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
    font: 17px/1.5 "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    padding: 40px 20px;
}
.page { max-width: 760px; margin: 0 auto; }
p, li { text-wrap: pretty; }
p { margin: 0 0 8px 0; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The top line: the brand on the left, links on the right. */
.top { display: flex; justify-content: space-between; align-items: baseline; gap: clamp(12px, 3vw, 16px); flex-wrap: wrap; margin-bottom: 40px; font-size: clamp(15px, 4vw, 17px); }
.top a { text-decoration: none; }
.brand { font-weight: 700; color: var(--text); }
.top nav { display: flex; gap: clamp(12px, 3vw, 16px); flex-wrap: wrap; }

h1 { font-size: 26px; line-height: 1.25; font-weight: 700; color: var(--accent); margin: 0 0 8px 0; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 8px 0; }
section { margin-bottom: 40px; }

/* A screenshot. Until the real picture exists it is a plain blue box of the
   right shape. To use a real picture, replace the div with:
   <img class="shot" src="shots/name.png" alt="what it shows"> */
.shot {
    display: flex; align-items: center; justify-content: center;
    width: 100%; aspect-ratio: var(--shot-ratio);
    background: var(--accent); color: var(--ink-on-accent);
    border-radius: 4px; text-align: center; padding: 16px;
}
img.shot { display: block; height: auto; padding: 0; background: none; }
.shot + p { margin-top: 8px; }

ul, ol { margin: 0; padding-left: 1.4em; }
li { margin-bottom: 8px; }
li:last-child { margin-bottom: 0; }
.amber { color: var(--amber); }

pre {
    margin: 8px 0; padding: 12px 14px; overflow-x: auto;
    background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
    font: 14px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
code { font: 14px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

footer { border-top: 1px solid var(--line); padding-top: 16px; }
footer p { font-size: 14px; }

/* The manual page. */
.manual h1 { font-size: 30px; }
.manual h2 { font-size: 22px; color: var(--accent); margin: 40px 0 8px 0; }
.manual h3 { font-size: 17px; font-weight: 700; margin: 24px 0 8px 0; }
.manual h4 { font-size: 15px; font-weight: 700; margin: 16px 0 8px 0; }
.manual hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.manual img { display: block; max-width: 100%; height: auto; margin: 8px 0 16px 0; border-radius: 4px; }
.manual ul, .manual ol { margin-bottom: 8px; }
.manual code { background: var(--panel); padding: 1px 4px; border-radius: 3px; }
.manual :target { scroll-margin-top: 16px; }

/* Pictures on the plugin pages. */
figure { margin: 8px 0 16px 0; }
.pic { display: block; width: 100%; height: auto; border-radius: 4px; }

/* Landing page (samatas_analyzer.html, body class "landing"). */
body.landing { overflow-x: clip; }
.landing h2 { font-size: 26px; line-height: 1.2; margin: 0 0 12px 0; }
.landing h3 { font-size: 18px; line-height: 1.3; margin: 0 0 8px 0; }
.kicker { font-size: clamp(16px, 2.4vw, 19px); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.row-text .kicker { font-size: 28px; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.row-text h2 { font-size: clamp(16px, 2.4vw, 19px); font-weight: 700; color: var(--text); }

.wide { width: min(1080px, calc(100vw - 40px)); margin-left: calc(50% - min(540px, 50vw - 20px)); }

.hero { text-align: center; margin: 40px 0 80px 0; }
.hero h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; color: var(--text); margin: 0 0 8px 0; }
.tagline { font-size: clamp(22px, 4vw, 30px); font-weight: 600; line-height: 1.2; color: var(--accent); margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.lead { font-size: 20px; color: #b4bccc; max-width: 620px; margin: 0 auto 8px auto; }
.badges { font-size: 14px; color: #8a93a6; }
.hero figure { margin-top: 40px; }
.hero.end { margin-bottom: 40px; }

.actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 16px 0; }
.btn { display: inline-block; padding: 14px 26px; border-radius: 8px; font-weight: 700; text-decoration: none; line-height: 1.2; }
.btn-main { background: var(--accent); color: var(--ink-on-accent); }
.btn-main:hover { filter: brightness(1.1); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn.is-soon { background: var(--panel); color: var(--text); border: 1px dashed var(--accent); cursor: default; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card p { margin: 0; color: #c3cad8; }

.rows { margin-top: 80px; }
.row { display: grid; gap: 20px; margin-bottom: 64px; }
.row figure { order: -1; margin: 0; }
@media (min-width: 900px) {
    .row { grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: center; }
    .row figure { order: 0; }
    .row:nth-child(even) { grid-template-columns: 1.5fr 1fr; }
    .row:nth-child(even) figure { order: -1; }
}

.facts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: inset 0 3px 0 var(--accent); padding: 28px 20px 24px 20px; text-align: center; display: flex; flex-direction: column; }
.fact .big { font-size: clamp(16px, 2.4vw, 19px); font-weight: 700; line-height: 1.2; color: var(--text); margin: 0 0 14px 0; font-variant-numeric: tabular-nums; }
.fact h3 { order: -1; font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--accent); margin: 0 0 8px 0; }
.fact p { margin: 0; color: #c3cad8; }
.landing main p { max-width: 65ch; }
.hero p, .buy p, .maker p { margin-left: auto; margin-right: auto; }
.offer { font-size: 15px; color: #b4bccc; }
.license { list-style: none; padding: 0; margin: 16px 0; }
.license li { margin: 0 0 4px 0; }
.maker { text-align: center; border-top: 1px solid var(--line); padding-top: 40px; }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { margin: 0; padding: 6px 14px; font-size: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }

.buy { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 40px 24px; margin: 80px 0; }
.deal { display: inline-block; padding: 4px 12px; font-size: 14px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; }
.price { font-size: 48px; font-weight: 700; line-height: 1.1; margin: 16px 0 8px 0; }
.price s { font-size: 26px; font-weight: 400; color: #6c7488; margin-right: 12px; }

.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs th { width: 30%; padding-right: 16px; }

.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0 0; }

/* Manual contents: #TOC from pandoc, opened and followed by manual.js. */
#TOC h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: #8a93a6; margin: 0 0 8px 8px; padding: 0; border: 0; }
#TOC ul { list-style: none; margin: 0; padding: 0; }
#TOC > ul > li > a { display: none; }
#TOC a { display: block; padding: 4px 8px; border-radius: 4px; text-decoration: none; color: #b4bccc; font-size: 16px; line-height: 1.4; }
#TOC a:hover { color: var(--text); background: var(--panel); }
#TOC li li li { padding-left: 12px; }
#TOC li li li a { font-size: 15px; color: #8a93a6; }
#TOC li.active > a { color: var(--accent); background: var(--panel); font-weight: 600; }
.has-toc #TOC li li ul { display: none; }
.has-toc #TOC li li.active ul { display: block; }
.toc-toggle { display: none; }
@media (max-width: 1199px) {
    .has-toc .toc-toggle { display: inline-block; font: inherit; font-size: 15px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; margin-bottom: 16px; cursor: pointer; }
    .has-toc #TOC { display: none; margin-bottom: 40px; }
    .has-toc #TOC.open { display: block; }
}
@media (min-width: 1200px) {
    body:has(#TOC) .page { margin-left: max(340px, calc(50% - 380px)); margin-right: auto; }
    #TOC { position: fixed; top: 40px; left: calc(max(360px, 50vw - 380px) - 320px); width: 280px; max-height: calc(100vh - 80px); overflow-y: auto; }
}
