:root {
  --bg: #0f172a;
  --card: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --danger: #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
code { background: #0b1220; padding: 1px 6px; border-radius: 4px; }
pre { background: #0b1220; padding: 12px; border-radius: 8px; overflow-x: auto; }

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: #0b1220;
}
.brand { font-weight: 700; color: var(--text); font-size: 1.1rem; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 16px; }
.topbar nav a { color: var(--muted); }
.topbar nav a.active, .topbar nav a:hover { color: var(--accent); text-decoration: none; }

.container { width: 100%; max-width: 860px; margin: 28px auto; padding: 0 20px; flex: 1; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 18px;
}
.card h1 { margin-top: 0; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); font-size: 0.92rem; }
.alert {
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 8px 12px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile { color: var(--text); margin: 0; }
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile h3 { margin: 0 0 6px; color: var(--accent); }
.tile p { margin: 0; color: var(--muted); }

.row { display: flex; gap: 10px; }
.row input { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; color: var(--muted); }

input, textarea {
  background: #0b1220;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }

button {
  background: var(--accent);
  color: #04202e;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.1); }

.entry p { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; }
.entry .muted { margin-left: 8px; }

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
