/* Base tokens */
:root {
  --bg: #07070c;
  --panel: #0f1018;
  --ink: #f7f2de;
  --muted: #c8bd8a;
  --accent: #d4a017;
  --accent-2: #f4d35e;
  --border: #2c2616;
  --shadow: 0 12px 45px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --tight-radius: 8px;
}

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

body {
  margin: 0;
  font-family: "Avenir Next", "Montserrat", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, rgba(244, 211, 94, 0.12), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(212, 160, 23, 0.12), transparent 30%),
    var(--bg);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}

.muted {
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  color: var(--ink);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 24px 28px;
}

.site-title {
  display: inline-block;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
  padding: 6px 10px;
  border-radius: var(--tight-radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
  color: #0b1120;
}

.site-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: var(--tight-radius);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: all 0.15s ease;
  font-weight: 600;
  color: #0b1120;
}

.site-nav a:hover {
  color: #0b1120;
  border-color: rgba(244, 211, 94, 0.4);
  transform: translateY(-1px);
}

.site-nav a.active {
  color: #0b1120;
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.25), rgba(244, 211, 94, 0.18));
  border-color: rgba(212, 160, 23, 0.45);
}

.page-content {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid rgba(212, 160, 23, 0.25);
  border-radius: calc(var(--radius) + 4px);
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  box-shadow: var(--shadow);
  color: #0b1120;
}

.hero h1 {
  font-size: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #0b1120;
  margin-bottom: 0.35rem;
}

.lede {
  font-size: 1.05rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  align-content: start;
}

.stat {
  padding: 12px;
  border-radius: var(--tight-radius);
  border: 1px solid var(--border);
  background: rgba(244, 211, 94, 0.06);
  color: #0b1120;
  font-weight: 600;
}

.stat strong {
  display: block;
  color: #0b1120;
  font-size: 1.15rem;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4d35e;
  color: #0b1120;
  border: 1px solid #d4a017;
  font-weight: 600;
  font-size: 0.9rem;
}

.entry-form {
  display: grid;
  gap: 10px;
}

.entry-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
}

.entry-form input,
.entry-form textarea,
.panel input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--tight-radius);
  font-size: 1rem;
  background: #0c0d13;
  color: var(--ink);
}

.entry-form textarea {
  min-height: 110px;
  resize: vertical;
}

.entry-form button {
  justify-self: start;
  padding: 10px 16px;
  border: none;
  border-radius: var(--tight-radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1120;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 12px 24px rgba(212, 160, 23, 0.35);
}

.entry-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(212, 160, 23, 0.4);
}

.entry-list {
  display: grid;
  gap: 12px;
}

.entry-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--tight-radius);
  background: var(--panel);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.entry-link:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 160, 23, 0.45);
  box-shadow: var(--shadow);
}

.entry-link h3 {
  margin: 0;
}

.entry-link small {
  color: var(--muted);
}

.entry-card {
  border: 1px solid var(--border);
  border-radius: var(--tight-radius);
  padding: 12px 14px;
  background: var(--panel);
}

.entry-card h3 {
  margin-bottom: 6px;
}

.badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0;
}

.badge {
  background: rgba(244, 211, 94, 0.12);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  border: 1px dashed rgba(212, 160, 23, 0.35);
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--tight-radius);
  padding: 12px;
  color: var(--muted);
  background: rgba(244, 211, 94, 0.08);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.category-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: grid;
  gap: 6px;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.category-card small {
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar input {
  max-width: 320px;
}

.toolbar select {
  padding: 8px 10px;
  border-radius: var(--tight-radius);
  border: 1px solid var(--border);
  background: var(--panel);
}

.ghost {
  border: 1px dashed var(--border);
  background: rgba(244, 211, 94, 0.12);
  padding: 9px 12px;
  border-radius: var(--tight-radius);
  cursor: pointer;
  font-weight: 700;
}

.inline-form {
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--tight-radius);
  background: rgba(244, 211, 94, 0.08);
}

.inline-form .form-actions {
  display: flex;
  gap: 8px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.note-body {
  line-height: 1.6;
  color: var(--ink);
}

.note-body a {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel {
    padding: 18px;
  }
}
