/* One stylesheet for the whole site. No external fonts, no images, no scripts. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d2327;
  --muted: #5a646b;
  --line: #dedbd3;
  --accent: #1f5f8b;
  --accent-soft: #e4eef5;
  --mark-a: #1f5f8b;
  --mark-b: #b0572b;
  --mark-c: #4d7c4a;
  --radius: 10px;
  --measure: 68ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181b;
    --surface: #1c2226;
    --text: #e8eaeb;
    --muted: #a3adb3;
    --line: #333c42;
    --accent: #8cc0e3;
    --accent-soft: #223440;
    --mark-a: #8cc0e3;
    --mark-b: #e0966d;
    --mark-c: #93c28f;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
summary:focus-visible,
.table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  background: var(--surface);
  padding: 6px 10px;
  z-index: 2;
}

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

/* ---- header and footer ---- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-header nav ul,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a,
.site-footer ul a {
  display: inline-block;
  padding: 6px 0;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
}

.site-footer {
  overflow-wrap: anywhere;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  padding-top: 20px;
  padding-bottom: 28px;
}

.site-footer p {
  margin: 10px 0 0;
  max-width: var(--measure);
}

/* ---- product page ---- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
  padding: 44px 0 28px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero p {
  margin: 0 0 12px;
  max-width: 54ch;
}

.lede {
  font-size: 1.15rem;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.facts li {
  padding: 4px 0 12px;
}

.facts strong {
  display: block;
}

.facts span {
  color: var(--muted);
  font-size: 0.95rem;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.plans h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.plans p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* A drawing of the widget, made of plain boxes. Decorative only. */

.mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.mock-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-weight: 600;
}

.mock-head span:last-child {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mock-grid span {
  display: block;
  min-height: 38px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.mock-grid .today {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.mock-grid i {
  display: block;
  height: 5px;
  margin-top: 4px;
  border-radius: 3px;
  background: var(--mark-a);
}

.mock-grid i.b {
  background: var(--mark-b);
}

.mock-grid i.c {
  background: var(--mark-c);
}

/* ---- text pages ---- */

.doc {
  overflow-wrap: break-word;
  max-width: var(--measure);
  padding: 36px 0 0;
}

.doc h1 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc .meta {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc h2 {
  margin: 40px 0 10px;
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.doc h3 {
  margin: 26px 0 6px;
  font-size: 1.05rem;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 14px;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
}

.doc li {
  margin-bottom: 6px;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px 6px;
  margin-bottom: 8px;
}

.summary h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.toc {
  columns: 2;
  column-gap: 32px;
  padding-left: 1.3em;
  font-size: 0.95rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
}

code,
kbd {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

details:last-of-type {
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details > *:not(summary) {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }

  .facts,
  .plans {
    grid-template-columns: 1fr;
  }

  .toc {
    columns: 1;
  }
}

@media print {
  /* Paper is white whatever the screen's colour scheme: use the light colours. */
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --muted: #444444;
    --line: #bbbbbb;
    --accent: #1f5f8b;
    --accent-soft: #eeeeee;
    --mark-a: #1f5f8b;
    --mark-b: #b0572b;
    --mark-c: #4d7c4a;
    color-scheme: light;
  }

  .site-header nav,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .table-scroll {
    overflow: visible;
  }

  /* Print the troubleshooting answers even when they are collapsed on screen. */
  details:not([open]) > *:not(summary) {
    display: revert;
  }

  details:not([open])::details-content {
    content-visibility: visible;
    display: block;
  }
}
