/* glances-rs site stylesheet.
 *
 * Extracted from the glances-rs / homepage-rs theme so all three
 * sites share the same cream + #ce422b palette. Don't change a
 * variable here without updating firewalld-rs and homepage-rs.
 */

:root {
  --bg: #fbf8f3;
  --bg-soft: #f3eee5;
  --fg: #1a1612;
  --fg-muted: #6b6359;
  --border: #e5dfd2;
  --accent: #ce422b;
  --accent-soft: #f4d9d3;
  --code-bg: #1a1612;
  --code-fg: #f3eee5;
  --link: var(--accent);
  --max-width: 720px;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
}
.hero .eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.8rem;
  font-weight: 600;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.hero h1 .accent { color: var(--accent); }
.hero .lede {
  font-size: 1.12rem;
  color: var(--fg-muted);
  max-width: 38em;
  margin: 0;
}
.hero .lede strong { color: var(--fg); font-weight: 600; }

/* ---------- Sections ---------- */
section { margin-bottom: 3rem; }
section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -0.005em;
  margin: 0 0 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
section h2 .num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-right: 0.6rem;
  vertical-align: 0.15em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
a:hover { border-bottom-color: var(--accent); }

/* ---------- Why pure stdlib ---------- */
.benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}
.benefits li {
  padding: 0.9rem 1rem 0.9rem 1.2rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
}
.benefits li strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.benefits li span {
  color: var(--fg-muted);
  font-size: 0.96rem;
}

/* ---------- Status table ---------- */
.table-scroll { overflow-x: auto; margin: 0 -0.5rem; }
table.status {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 540px;
}
table.status th,
table.status td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.status th {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 2px solid var(--border);
}
table.status td.milestone {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
table.status td.version {
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}
table.status td.status-done { color: var(--accent); font-weight: 600; }
table.status td.status-next { color: var(--fg-muted); font-style: italic; }
table.status tr:last-child td { border-bottom: none; }

/* ---------- Code blocks ---------- */
pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1rem 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}
pre code { background: transparent; padding: 0; color: inherit; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* ---------- Page header (about) ---------- */
.page-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-head .back {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}
.page-head .back a { color: var(--accent); border-bottom: none; }
.page-head .back a:hover { border-bottom: 1px solid var(--accent); }
.page-head .tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 0.8rem;
  letter-spacing: -0.01em;
}
h1 .accent { color: var(--accent); }

h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 1.8rem 0 0.8rem;
}

ul { padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }
li:last-child { margin-bottom: 0; }

/* ---------- About page: history + version pills ---------- */
.history { list-style: none; padding-left: 0; }
.history li {
  margin-bottom: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.history li:last-child { border-bottom: none; }
.history .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  margin-right: 0.6rem;
}
.history .note { color: var(--fg-muted); }

/* ---------- Footer ---------- */
footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
footer.site a { color: var(--fg-muted); }
footer.site a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 540px) {
  html { font-size: 16px; }
  .wrap { padding: 2.5rem 1.1rem 3.5rem; }
  .hero h1 { font-size: 2.2rem; }
}
