:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1f2933; --muted: #6b7280;
  --accent: #2f6f4f; --border: #e2e6ea; --danger: #b3261e;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; color: var(--ink); background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 1.2rem; padding: 0.7rem 1.4rem;
  background: var(--card); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--accent); text-decoration: none; }
.topbar nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
.topbar nav a { color: var(--ink); text-decoration: none; }
.topbar nav a:hover { color: var(--accent); }
.lp-form { display: flex; align-items: center; gap: 0.35rem; }
.lp-form label { font-size: 0.8rem; color: var(--muted); }
main { max-width: 1000px; margin: 1.4rem auto; padding: 0 1.4rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.3rem; margin-bottom: 1.1rem; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.1rem; }
label { display: block; margin: 0.5rem 0 0.2rem; font-size: 0.85rem; color: var(--muted); }
input, select, textarea { width: 100%; padding: 0.5rem; border: 1px solid var(--border);
  border-radius: 6px; font: inherit; background: #fff; }
input[type=checkbox] { width: auto; }
textarea { min-height: 4rem; }
button, .btn { display: inline-block; padding: 0.5rem 1rem; border: none; border-radius: 6px;
  background: var(--accent); color: #fff; font: inherit; cursor: pointer; text-decoration: none; }
button.secondary, .btn.secondary { background: #e8edf0; color: var(--ink); }
button.danger { background: var(--danger); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border);
  font-size: 0.88rem; vertical-align: top; }
.flash { padding: 0.6rem 0.9rem; border-radius: 7px; margin-bottom: 0.9rem; }
.flash-success { background: #e6f4ec; color: #1d6b3f; }
.flash-error { background: #fbeae9; color: var(--danger); }
.muted { color: var(--muted); font-size: 0.85rem; }
.tree-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0;
  border-bottom: 1px solid var(--border); }
.tag { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.72rem;
  background: #eef2f5; color: var(--muted); }
.tag.new { background: #e6f4ec; color: var(--accent); }
.tag.error { background: #fbeae9; color: var(--danger); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.row-actions { display: flex; gap: 0.4rem; }
.scroll { overflow-x: auto; }
.matrix { width: auto; }
.matrix th, .matrix td { text-align: center; min-width: 2.4rem; text-transform: uppercase;
  font-variant-numeric: tabular-nums; }
.matrix tbody th { font-weight: 600; }
.matrix td.hit { color: var(--accent); font-weight: 700; }
.matrix td.miss { color: var(--muted); }
.small { font-size: 0.8rem; padding: 0.3rem 0.6rem; }
.inline { display: inline; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex;
  align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; z-index: 50; }
.modal[hidden] { display: none; }
.modal-box { background: var(--card, #fff); border-radius: 10px; padding: 1.2rem;
  max-width: 560px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,0.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.idea { border: 1px solid var(--border); border-radius: 8px; padding: 0.7rem; margin: 0.6rem 0;
  display: flex; flex-direction: column; gap: 0.4rem; }
.idea .idea-name { font-weight: 600; }
.idea button { align-self: flex-start; }
