/* One stylesheet, no framework, no fonts to fetch.
   A page about self-hosted software should load on a slow connection in a
   market where data costs money, which is most of the audience for these
   modules. */

:root {
  --ink: #16202e;
  --muted: #5c6673;
  --line: #e2e7ee;
  --bg: #ffffff;
  --wash: #f5f7fa;
  --accent: #1558c0;
  --warn-bg: #fff7e6;
  --warn-line: #f0d9a8;
  --warn-ink: #7a5600;
  --ok: #17703d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin-bottom: 40px;
}
header.site .wrap { display: flex; align-items: baseline; gap: 22px; }
header.site a.brand { font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; }
header.site nav a { color: var(--muted); text-decoration: none; margin-right: 16px; font-size: 15px; }
header.site nav a:hover { color: var(--accent); }

h1 { font-size: 34px; line-height: 1.25; margin: 0 0 10px; }
h2 { font-size: 23px; margin: 42px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; margin: 26px 0 6px; }
p { margin: 0 0 14px; }
.lead { font-size: 19px; color: var(--muted); margin-bottom: 26px; }

a { color: var(--accent); }

ul { padding-left: 20px; }
li { margin-bottom: 7px; }

table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 16px; }
th, td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
th { background: var(--wash); font-weight: 600; }

code { background: var(--wash); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; font-size: 14px; }

.price { font-size: 28px; font-weight: 700; }
.price small { font-size: 15px; font-weight: 400; color: var(--muted); }

.buy {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
}
.buy:hover { background: #10469b; }
.secondary {
  display: inline-block;
  padding: 12px 18px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-left: 8px;
}

.actions { margin: 22px 0 8px; }

.note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 20px 0;
}
.note strong { color: inherit; }

/* Images keep their own proportions. The width and height attributes in the
   HTML reserve the right space while the page loads; without height:auto the
   CSS width fights them and every picture comes out squashed. */
img { max-width: 100%; height: auto; }

figure { margin: 26px 0; }
figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
}

/* A receipt is a tall narrow strip. Stretched to the column it dwarfs the
   page, so it is shown at a readable height and centred like the paper it is. */
figure.paper img {
  width: auto;
  max-height: 560px;
  margin: 0 auto;
  background: #fcfbf8;
}

figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; text-align: center; }
figure:not(.paper) figcaption { text-align: left; }

.cards { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; margin: 28px 0; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.card h3 { margin-top: 0; }
.card p { font-size: 16px; color: var(--muted); }
.card .price { font-size: 21px; }

.demo { background: var(--wash); border-radius: 6px; padding: 14px 16px; font-size: 15px; }
.demo code { background: #fff; }

footer.site {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding: 22px 0 50px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  h1 { font-size: 27px; }
  .cards { grid-template-columns: 1fr; }
  .secondary { margin: 10px 0 0; display: block; text-align: center; }
}
