/* Centaur Apps: one stylesheet for the whole site. Light and dark follow the
   visitor's system setting. No web fonts, no scripts. */

:root {
  --bg: #ffffff;
  --surface: #f6f8fa;
  --text: #1b2330;
  --muted: #586374;
  --border: #e1e6ec;
  --accent: #1d4f91;
  --accent-hover: #163d70;
  --accent-soft: #eaf1fa;
  --radius: 10px;
  --measure: 44rem;
  --page: 64rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a;
    --surface: #161d26;
    --text: #e4e9ef;
    --muted: #9aa6b4;
    --border: #273240;
    --accent: #82b2ef;
    --accent-hover: #a9caf5;
    --accent-soft: #172334;
  }
}

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

html { -webkit-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.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 1rem; }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 0.5rem; background: var(--bg); padding: 0.5rem 0.75rem; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem; }
.wordmark { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--accent); }
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); }

/* An app's own tabs: Overview, Help, Privacy ... */
.app-nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.app-nav-row { display: flex; gap: 0.25rem; overflow-x: auto; }
.app-nav a { display: block; padding: 0.6rem 0.75rem; color: var(--muted); text-decoration: none; font-size: 0.95rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.app-nav a:hover { color: var(--text); }
.app-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* Main content */
main { flex: 1; padding-top: 2.5rem; padding-bottom: 4rem; }
.prose { max-width: calc(var(--measure) + 2rem); }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2rem; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; padding-top: 0.5rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
p, ul, ol, table { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
code { font-size: 0.9em; background: var(--surface); padding: 0.1em 0.35em; border-radius: 4px; }
em:first-child:last-child { color: var(--muted); }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); }
th { background: var(--surface); font-weight: 600; }

/* Home */
.lede { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); }
.app-cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.app-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.25rem 1rem; background: var(--bg); margin: 0; }
.app-card h3 { margin: 0 0 0.35rem; font-size: 1.2rem; }
.app-card h3 a { color: var(--text); text-decoration: none; }
.app-card h3 a:hover { color: var(--accent); }
.app-card .status { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0.1rem 0.6rem; margin-bottom: 0.75rem; }
.app-card .card-links { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.95rem; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.footer-row p { margin: 0; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  h1 { font-size: 1.6rem; }
  main { padding-top: 1.75rem; }
  table { display: block; overflow-x: auto; }
}
