/* DÆMA portal — same graphite tokens as the dashboard (CoLoopTheme.h). */
@font-face { font-family: "Barlow"; src: url(/fonts/Barlow-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/Barlow-SemiBold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url(/fonts/BarlowSemiCondensed-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/JetBrainsMono-Regular.ttf); font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #15181d; --panel: #1c2026; --raised: #262b33; --line: #323843;
  --fg: #e8ebef; --dim: #8d96a3; --faint: #5d6672;
  --accent: #38c9cf; --on: #2a9fb8; --amber: #e5a33a; --red: #e5484d;
  --label: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 "Barlow", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1 { font-size: 28px; font-weight: 600; margin: 0 0 18px; }
h2 { margin: 0 0 12px; }
p { margin: 0 0 8px; }

.label { font-family: var(--label); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.label.strong { color: var(--fg); font-size: 15px; letter-spacing: 0.12em; }
.label.sub { margin-top: 18px; }
.dim { color: var(--dim); } .label.dim { color: var(--faint); }
.small { font-size: 13px; } .big { font-size: 22px; font-weight: 600; }
.num, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }
.pre { white-space: pre-wrap; } .break { word-break: break-all; }
.error { color: var(--red); }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 20px; height: 56px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 8px; text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav a { color: var(--fg); text-decoration: none; }
.topbar nav a:hover { color: var(--accent); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 18px 20px; margin-bottom: 18px; }
.panel.narrow { max-width: 420px; margin: 40px auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid2 > .panel { margin-bottom: 0; } .grid2 { margin-bottom: 18px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head-row h1 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-form { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; } .row-form input:first-child { flex: 1; min-width: 160px; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); }
input, select, textarea { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,.08); background: var(--raised); color: var(--fg); cursor: pointer; text-decoration: none; font: 700 12px var(--label); letter-spacing: .08em; text-transform: uppercase; }
.btn:hover { filter: brightness(1.12); }
.btn.on { background: var(--on); color: #fff; }
.btn.ghost { background: transparent; color: var(--dim); }
.btn.tiny { height: 24px; padding: 0 8px; font-size: 10px; }
.btn.danger:hover { background: var(--red); }
form.inline { display: inline; }

.pill { font: 700 10px var(--label); letter-spacing: .08em; text-transform: uppercase; background: var(--raised); color: var(--dim); padding: 2px 7px; border-radius: 4px; vertical-align: middle; }
.pill.ok { color: var(--accent); }
.banner { background: var(--raised); border-left: 3px solid var(--amber); padding: 10px 14px; border-radius: 6px; }
.callout { background: var(--bg); border: 1px solid var(--accent); border-radius: 6px; padding: 12px; margin-bottom: 12px; }

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 6px 0; border-top: 1px solid var(--line); }
.plain li:first-child { border-top: 0; }
.goals li.done, .checks li.done strong { text-decoration: line-through; color: var(--faint); }
.checks { list-style: none; margin: 12px 0 0; padding: 0; }
.checks li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.tick { flex: none; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; padding: 0; }
.checks li.done .tick { background: var(--on); color: #fff; border-color: var(--on); }
.notes li p { margin: 0; }
details summary { cursor: pointer; } details form { margin-top: 8px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--raised); border: 2px solid var(--line); }
.timeline li.milestone::before { background: var(--accent); border-color: var(--accent); }
.timeline time { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--faint); }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font: 700 11px var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 0 8px 8px; }
table.list td { padding: 9px 8px; border-top: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 6px; color: var(--dim); text-decoration: none; }
.tabs a.on { background: var(--raised); color: var(--fg); }

@media (max-width: 860px) {
  .grid2, .grid-side, .row2 { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 16px 16px 48px; }
  table.list th:nth-child(3), table.list td:nth-child(3) { display: none; }
}
.qr { background: #fff; padding: 12px; border-radius: 6px; width: max-content; margin: 8px 0 12px; }
.steps { padding-left: 20px; margin: 8px 0; color: var(--dim); }
