/* ═══════════════════════════════════════════════════════
   scripts.l4ughingm4n.dev — Design System
   "The Arsenal" — terminal/tool-shed aesthetic
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Recursive:wght@300..800&display=swap');

:root {
  --bg: #0f0e0c;
  --surface: #191613;
  --surface-2: #201c17;
  --border: #2d271f;
  --border-light: #3d342a;
  --text: #cdc0a8;
  --text-bright: #e8dcc8;
  --muted: #7a6f5e;
  --accent: #d4954a;
  --accent-glow: rgba(212, 149, 74, 0.1);
  --accent-dim: rgba(212, 149, 74, 0.3);
  --link: #c9a86c;
  --link-hover: #e0c08a;
  --green: #6b8f3a;
  --cyan: #5a9e8e;
  --red: #b83a2a;
  --font: 'Recursive', 'Courier New', monospace;
  --container: 800px;
  --line: 1.6;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: var(--line);
  background: var(--bg);
  color: var(--text);
  padding: 32px 20px 60px;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(212, 149, 74, 0.025) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(90, 158, 142, 0.02) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Boot / Header ── */
.boot {
  margin-bottom: 32px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
}

.boot .line {
  font-size: 0.8em;
  color: var(--muted);
  line-height: 1.5;
  min-height: 1em;
}

.boot .line .hl { color: var(--green); }
.boot .line .hl2 { color: var(--accent); }
.boot .cursor { animation: blink 1s step-end infinite; }

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Header ── */
.header {
  margin-bottom: 32px;
}

.header h1 {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.header h1 .accent { color: var(--accent); }

.header .subtitle {
  font-size: 0.85em;
  color: var(--muted);
}

/* ── Navigation ── */
.nav {
  display: flex;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.nav a {
  font-size: 0.85em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

/* ── Prompt line ── */
.prompt {
  font-size: 0.85em;
  color: var(--green);
  margin-bottom: 20px;
}

.prompt span { color: var(--accent); }

/* ── Category listing ── */
.cat-list { list-style: none; }

.cat-list li {
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: all 0.2s;
}

.cat-list li:hover {
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

.cat-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
}

.cat-list .emoji {
  font-size: 1.3em;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.cat-list .name {
  font-weight: 600;
  color: var(--accent);
  min-width: 100px;
}

.cat-list .desc {
  font-size: 0.85em;
  color: var(--muted);
  flex: 1;
}

.cat-list .count {
  font-size: 0.75em;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  flex-shrink: 0;
}

/* ── Sub-page (payload table) ── */
.page-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.page-header .back {
  font-size: 0.8em;
  color: var(--muted);
  text-decoration: none;
}

.page-header .back:hover { color: var(--accent); }

/* ── Payload table ── */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface); }

td {
  padding: 10px 14px;
  vertical-align: top;
  line-height: 1.5;
}

td:first-child {
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent);
}

td code {
  font-family: var(--font);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid var(--border);
  word-break: break-all;
}

td .tag {
  display: inline-block;
  font-size: 0.75em;
  padding: 1px 6px;
  border: 1px solid var(--border);
  color: var(--muted);
}

td .tag.tech { color: var(--cyan); border-color: rgba(90, 158, 142, 0.3); }

/* ── Footer ── */
footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.75em;
  color: var(--muted);
  text-align: center;
}

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

/* ── Responsive ── */
@media (max-width: 600px) {
  body { padding: 20px 12px; }
  .cat-list a { flex-wrap: wrap; gap: 6px; }
  .cat-list .desc { width: 100%; }
  .header h1 { font-size: 1.4em; }
}
