/*
 * The site's look, one copy for every page: the front page, Squill's and Glint's download pages (each app's
 * web/index.html, uploaded to squill/ and glint/ by its deploy) and the bug form and its admin page (bugs/, at
 * <app>/report/). Each page links it relatively, so the site works under any path, and keeps in its own <style>
 * only what is its alone. Light and dark follow the system.
 */

/* ---------- Colours ---------- */
:root {
  color-scheme: light dark;
  --paper: #f7f2e9;
  --card: #fffdf8;
  --card-hover: #f3ecdf;  /* a box or pill under the pointer */
  --ink: #2e1846;
  --muted: #6f6478;
  --line: #e7dfd0;
  --gold: #e6a22e;
  --code: #2e1846;
  --code-ink: #f7f2e9;
  --on-gold: #2e1846;
  --button: #2e1846;
  --button-hover: #452768;
  --button-ink: #f7f2e9;
  --error: #a3322a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111112;
    --card: #1c1c1e;
    --card-hover: #2a2a2e;
    --ink: #f3ecdf;
    --muted: #a6a6ab;
    --line: #2e2e32;
    --code: #0a0a0b;
    --code-ink: #f3ecdf;
    --button: #e6a22e;
    --button-hover: #f0b44a;
    --button-ink: #2e1846;
    --error: #f2a196;
  }
}

/* ---------- Every page ---------- */
* { box-sizing: border-box; }
/* What is hidden stays hidden, whatever display its other rules give it: the other language's parts too. */
[hidden] { display: none !important; }
html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 ui-sans-serif, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 2px; }
p { margin: 0 0 10px; }
main { max-width: 680px; margin: 0 auto; padding: 56px 20px 0; }
/* The page's header: the app's logo, its name, a line on it and the version. */
header { text-align: center; margin-bottom: 44px; }
header img { width: 148px; height: 148px; display: block; margin: 0 auto 6px; }
header h1 { font-size: 46px; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
.tagline { margin: 12px 0 14px; font-size: 21px; }
.version {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-ink);
  font-size: 14px;
  font-weight: 600;
}
section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 16px;
}
h2 { font-size: 21px; margin: 0; }
pre {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--code);
  color: var(--code-ink);
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
footer { margin-top: 30px; text-align: center; font-size: 15px; color: var(--muted); }
footer p { margin-bottom: 6px; }
footer a { color: var(--ink); }
.muted { color: var(--muted); }
.error { color: var(--error); font-weight: 600; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Buttons and fields ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
.button {
  display: inline-block;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--button-hover); }
.pill {
  padding: 4px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.pill:hover { color: var(--ink); background: var(--card-hover); border-color: var(--gold); }
.pill.on { background: var(--button); border-color: var(--button); color: var(--button-ink); font-weight: 600; }
.pill.on:hover { background: var(--button-hover); border-color: var(--button-hover); color: var(--button-ink); }
.pill, .tabs button { transition: background-color .12s, border-color .12s, color .12s; }

/* ---------- Svenska / English: the switch of the pages in both (site.js) ---------- */
.languages { display: flex; justify-content: flex-end; gap: 6px; margin: -32px 0 12px; }
/* An app's page: the way back to the site's front page on the left, the switch on the right */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -32px 0 12px; }
.topbar .languages { margin: 0; }

/* ---------- The apps' download pages ---------- */
.features { max-width: 1080px; margin: 56px auto 0; padding: 0 20px; }
.end { max-width: 680px; margin: 0 auto; padding: 0 20px 40px; }
.needs { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.note { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
/* A command to paste, with its Copy button in the corner. */
.command { position: relative; }
.command pre { padding-right: 76px; }
.command button {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 11px;
  border: 0;
  border-radius: 7px;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
/* One tab per system; with site.js only the visitor's system is shown, without it all of them. */
.tabs { display: none; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 14px; }
.js .tabs { display: flex; }
.js .platforms section:not(.shown) { display: none; }
.tabs button {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--button); border-color: var(--button); color: var(--button-ink); font-weight: 600; }
.tabs button:hover { color: var(--ink); background: var(--card-hover); border-color: var(--gold); }
.tabs button[aria-selected="true"]:hover { color: var(--button-ink); background: var(--button-hover); border-color: var(--button-hover); }
.feature { padding: 0; overflow: hidden; margin-bottom: 28px; }
.feature .words { padding: 22px 26px 18px; max-width: 720px; }
.feature h2 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; }
.feature video, .feature img { display: block; width: 100%; height: auto; border-top: 1px solid var(--line); background: #1b1b1d; }

/* ---------- Phones ---------- */
@media (max-width: 480px) {
  main { padding-top: 32px; }
  .languages, .topbar { margin-top: -16px; }
  .topbar .languages { margin-top: 0; }
  header img { width: 120px; height: 120px; }
  header h1 { font-size: 38px; }
  section { padding: 18px; }
  .feature { padding: 0; }
  .feature .words { padding: 18px; }
}
