/* riddellious.dev index.
 *
 * Family resemblance to the child sites, not a colour match — the children don't
 * match each other either:
 *
 *   unum tools   #0D0D0D ground, cyan  #00D4FF accent, scanline overlay
 *   kosmos       #0d1117 ground, amber #f9b042 accent
 *
 * What they share is the actual house style: dark, 13px monospace, hairline
 * borders, flat panels, one saturated accent against muted body text, a header
 * strip and a status bar. This page keeps all of that and takes violet as its
 * own accent, so the index reads as the parent of the two rather than a copy of
 * either. Ground sits between their two backgrounds.
 *
 * Dark only — kosmos has no light mode and the unum tools default to dark
 * regardless of OS preference, so a light homepage would be the odd one out.
 */

:root {
  --bg:        #0d1014;
  --bg-panel:  #141821;
  --bg-hover:  #1a1f2a;
  --border:    #242a34;
  --accent:    #bc8cff;
  --text:      #d7dde3;
  --muted:     #7b838d;
  --faint:     #5c646e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, 'JetBrains Mono', SFMono-Regular, 'SF Mono', Menlo, 'Cascadia Code', Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scanline overlay — borrowed from unum's shared.css. Subtle enough to read as
   texture rather than a theme, which is what makes it a family tell. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

#header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}

.brand {
  color: var(--accent);
  font-weight: bold;
  letter-spacing: 0.1em;
  font-size: 14px;
  white-space: nowrap;
}

.hdr-tool {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

/* ── Body ───────────────────────────────────────────────────────────────────── */

/* Header and status bar stay pinned, the list scrolls between them — same shell
   as the tools, so the admin link never drops below the fold. */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px;
}

.section, .hint { max-width: 760px; }

.section + .section { margin-top: 28px; }

.section-title {
  color: var(--accent);
  font-weight: bold;
  letter-spacing: 0.06em;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* minmax(0, 1fr) rather than a bare auto column: an auto track floors at the
   widest item's min-content and overflows a narrow viewport instead of wrapping. */
.entries {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.entry {
  display: block;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.entry:hover, .entry:focus-visible {
  border-color: var(--accent);
  background: var(--bg-hover);
  outline: none;
}

.entry-name { color: var(--accent); font-weight: bold; }

.entry-host {
  color: var(--faint);
  font-size: 12px;
  margin-left: 10px;
  word-break: break-all;
}

.entry-desc {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}

.hint { color: var(--faint); font-size: 12px; margin-top: 20px; }

/* ── Status bar ─────────────────────────────────────────────────────────────── */

#status-bar {
  padding: 5px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  flex-shrink: 0;
  color: var(--faint);
}

#status-bar a { color: var(--muted); text-decoration: none; }
#status-bar a:hover { color: var(--accent); }
.status-spacer { flex: 1; }

/* ── Scrollbars ─────────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .entry { transition: none; }
}

@media (max-width: 640px) {
  .main { padding: 20px 16px; }
  .entry-host { display: block; margin-left: 0; }
}
