:root {
  /* LION Digital brand — derived from sample decks (src/learning/brand.json) */
  --bg: #0b0b0d;
  --panel: #17171b;
  --panel-2: #1f1f24;
  --fg: #ffffff;
  --muted: #b9b6bf;
  --accent: #ef4056;
  --accent-2: #ff6a7d;
  --line: #2a2a30;
  --ok: #4ea36b;
  --warn: #d9a441;
  --radius: 12px;
  --font: "Poppins", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .3px; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-mark { color: var(--accent); margin-right: 6px; }
.brand-sub { color: var(--muted); font-weight: 500; padding-left: 12px; border-left: 1px solid var(--line); }
.mode-pill {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.mode-pill.stub { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.mode-pill.grounded { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }

.wrap { max-width: 900px; margin: 0 auto; padding: 32px 24px 80px; }

.builder h1 { margin: 0 0 4px; font-size: 28px; }
.lede { color: var(--muted); margin: 0 0 16px; }
textarea {
  width: 100%; background: var(--panel); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; font: inherit; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }

/* Context & screenshots panel */
.ctx { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; background: var(--panel); }
.ctx > summary { cursor: pointer; padding: 12px 0; color: var(--muted); font-size: 14px; font-weight: 600; list-style: none; }
.ctx > summary::-webkit-details-marker { display: none; }
.ctx[open] > summary { color: var(--fg); border-bottom: 1px solid var(--line); }
.ctx-label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.dropzone {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center;
  color: var(--muted); font-size: 14px; background: var(--bg); transition: border-color .15s;
}
.dropzone.drag, .dropzone:focus { border-color: var(--accent); color: var(--fg); outline: none; }
.dropzone .link { color: var(--accent-2); cursor: pointer; text-decoration: underline; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.thumb { position: relative; width: 84px; height: 60px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.examples { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.chip:hover { color: var(--fg); border-color: var(--accent); }

button.primary {
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius); padding: 11px 20px; font-weight: 600; cursor: pointer;
}
button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
button.primary:disabled { opacity: .6; cursor: default; }

.decks { margin-top: 44px; }
.decks-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.decks-head h2 { margin: 0; font-size: 18px; }
.muted { color: var(--muted); font-size: 13px; }

.deck-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.deck-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.deck-card .meta { flex: 1; min-width: 0; }
.deck-card .title { font-weight: 600; }
.deck-card .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.deck-card .focus-tags { display: inline-flex; gap: 6px; margin-left: 8px; }
.tag { font-size: 11px; color: var(--accent-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

.badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; }
.badge.draft { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.badge.approved { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.badge.generating { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-2); }

.actions { display: flex; gap: 6px; }
.actions button {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--fg);
  border-radius: 8px; padding: 7px 11px; font-size: 13px; cursor: pointer;
}
.actions button:hover { border-color: var(--accent); }
.actions button.danger:hover { border-color: #b5442a; color: #ff9f86; }

.empty { padding: 24px 0; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--fg);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50;
}
