:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --muted: #8b949e;
  --accent: #58a6ff;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 960px;
}

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

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, kbd, pre, samp { font-family: var(--mono); }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}

.brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }

.site-nav {
  display: flex;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.95rem;
}

/* Main */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

h1, h2, h3 { line-height: 1.2; margin-top: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 2rem; }

/* Tool index list */
.tool-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.75rem; }
.tool-list a {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.tool-list a:hover { border-color: var(--accent); text-decoration: none; }
.tool-list .name { font-family: var(--mono); font-weight: 600; }
.tool-list .desc { color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }

/* Tables (used by ASCII and likely others) */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.9rem;
}
table.data th, table.data td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table.data th {
  background: var(--surface);
  font-weight: 600;
  position: sticky;
  top: 0;
}
table.data tr:hover td { background: var(--surface); }

/* Ad slot */
.ad-slot {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.ad-slot:empty { display: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 0; }
