/* The look of the site's article pages (messenger-no-storage.html,
   fido2-yubikey-messenger.html, voice-changer-encrypted-calls.html,
   zeromem-vs-signal.html) and of the user guide (guide.html, guide-zh.html).
   Colours, type, header and footer are those of index.html, which keeps its
   own styles inline: change both together. Light and dark follow the
   system, as on the homepage. */
:root {
  --accent: #3390EC;
  --accent-ink: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --card: #ffffff;
  --text: #111418;
  --muted: #5d6670;
  --line: #e3e8ee;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1621;
    --bg-soft: #17212b;
    --card: #1b2733;
    --text: #f2f4f6;
    --muted: #93a3b4;
    --line: #2a3a4b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
header { border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.top { border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: 14px; text-decoration: none; white-space: nowrap; }
main { padding: 48px 0 56px; }
h1 { font-size: clamp(30px, 5.5vw, 42px); line-height: 1.15; margin: 0 0 18px; }
h2 { font-size: 22px; line-height: 1.3; margin: 36px 0 8px; }
p { margin: 0 0 14px; }
.lede { font-size: 18px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin: 4px 0; }
.table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--bg-soft); font-size: 14px; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 36px 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.secondary { border: 1px solid var(--line); color: var(--text); }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer p { margin: 4px 0; }
/* The user guide: two links in the header, a table of contents, steps. */
.tools { display: flex; align-items: center; gap: 8px; }
h3 { font-size: 17px; line-height: 1.35; margin: 24px 0 6px; }
ol { margin: 0 0 14px; padding-left: 24px; }
.toc { margin: 28px 0 8px; padding: 16px 20px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-soft); }
.toc h2 { font-size: 15px; margin: 0 0 6px; color: var(--muted); }
.toc ol { columns: 2; column-gap: 32px; margin: 0 0 10px; }
.toc li { break-inside: avoid; margin: 2px 0 6px; }
.note { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--bg-soft); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; overflow-wrap: anywhere; }
.guide td, .guide th { overflow-wrap: break-word; }
.stack tbody th { width: 42%; }
@media (max-width: 560px) {
  .toc ol { columns: 1; }
  .toc li { margin: 2px 0 4px; }
  /* A two-column table of long cells reads better as one column. */
  .stack thead { display: none; }
  .stack tr, .stack tbody th, .stack td { display: block; width: auto; }
  .stack tbody th { border-bottom: 0; padding-bottom: 2px; }
}
@media (max-width: 359px) {
  .guide .brand span { display: none; }
}
@media (max-width: 480px) {
  main { padding-top: 32px; }
  .lede { font-size: 16.5px; }
  table { font-size: 14px; }
  th, td { padding: 10px; }
}
