/* SPDX-License-Identifier: GPL-3.0-only */
/* The colours and radii of the card page (docs/page.css in gpxcam-t1000e), under the same names; the tests compare
   them. Light and dark follow the system. No web fonts, no scripts. */
:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --text: #1f2328;
  --muted: #5f6670;
  --line: rgba(31, 35, 40, 0.14);
  --accent: #e5202e;
  --accent-text: #ffffff;
  --accent-tint: rgba(229, 32, 46, 0.08);
  --link: #d71a27;
  --field-line: #848d97;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-s: 8px;
  --wrap: 1180px;
  --gutter: 24px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1113;
    --panel: #171c20;
    --text: #e9ecee;
    --muted: #98a3aa;
    --line: #2a3238;
    --accent-tint: rgba(229, 32, 46, 0.16);
    --link: #ff5a64;
    --field-line: #5f6b75;
    --shadow: none;
  }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: var(--link); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 24px; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 1; padding: 8px 12px; background: var(--panel); border-radius: var(--radius-s); }

/* The top: the photo, its caption under it (no text over the photo), then the name, the buttons and the badge. */
.hero { padding: var(--gutter) 0 0; }
.hero-photo { margin: 0; }
/* Cut to at most two thirds of the screen, a computer's to under half: the name and the buttons show at
   1280 × 800 too. Misia's ears and head stay in the frame. */
.hero-photo img { width: 100%; max-height: 66vh; object-fit: cover; object-position: 50% 25%; border-radius: var(--radius); }
@media (min-width: 768px) {
  .hero-photo img { max-height: 46vh; object-position: 50% 22%; }
}
.hero-photo figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }
.intro { max-width: 880px; padding: 20px 0 8px; }
.unofficial {
  display: inline-block;
  margin: 16px 0 0;
  padding: 2px 8px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-s);
  color: var(--muted);
  font-size: 13px;
}
h1 { font-size: 44px; margin: 0 0 8px; letter-spacing: -0.01em; }
.lead { font-size: 21px; font-weight: 600; }
.tested { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-s);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent-tint); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.toc ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 24px auto 0; padding: 12px 0; list-style: none;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc a { text-decoration: none; font-weight: 600; }

main section {
  margin: 24px 0;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.points { padding-left: 20px; margin: 0; }
.points li { margin: 6px 0; }
.what-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.card-photo { margin: 0; }
.card-photo img { border-radius: var(--radius-s); }
.app-shot { margin: 16px 0; max-width: 760px; }
.app-shot img { border: 1px solid var(--line); border-radius: var(--radius-s); }

.table { overflow-x: auto; margin: 12px 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; }
.callout { padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--accent-tint);
  border-radius: var(--radius-s); }
.callout p { margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 16px;
  grid-template-columns: repeat(3, 1fr); }
.steps li { counter-increment: step; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}
.steps p:last-child { margin: 0; }

footer { margin-top: 32px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer ul { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0 0 12px; list-style: none; }

/* Narrow screens: one column; the table's rows as blocks, each cell with its column's name. */
@media (max-width: 800px) {
  .what-grid { grid-template-columns: 1fr; }
  .card-photo { max-width: 320px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  h1 { font-size: 36px; }
  .lead { font-size: 19px; }
  main section { padding: 16px; }
  .table { overflow: visible; }
  table, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tbody tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  tbody th, tbody td { padding: 2px 0; border: 0; }
  td::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
}
