/* The whole stylesheet for the GitHub Pages site (Phase 4 Task 32). No fonts, scripts or images are fetched from anywhere. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --band: #f3f3f5;
  --fg: #1a1a1f;
  --muted: #55555f;
  --link: #0b57b0;
  --rule: #cfcfd6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141a;
    --band: #1f1f27;
    --fg: #ececf1;
    --muted: #b4b4bf;
    --link: #8ab8ff;
    --rule: #3b3b46;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans TC", "Noto Sans SC", sans-serif;
}

header,
main,
footer {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.brand {
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}

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

h1 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.75rem;
  line-height: 1.25;
}

h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.lead {
  color: var(--muted);
  font-size: 1.125rem;
}

code {
  padding: 0 0.25em;
  border-radius: 3px;
  background: var(--band);
  font: 0.9em ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.table-scroll {
  margin: 1rem 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow-x: auto;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--band);
}

tbody th {
  font-weight: 600;
}

footer {
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}
