/* BrightCore artifacts: tokens from context/brightcore/design/tokens.css (brightcoreinnovations.com). */
:root {
  --paper: #f3eee4; --paper-2: #ebe4d6; --field: #fbf8f2;
  --ink: #16171b; --ink-soft: #4a4b50; --rule: #cfc6b4;
  --core: #e59a2f; --core-hot: #f6c35d; --core-text: #c46d06;
  --ok: #2f6b45; --err: #9c2f22;
  --display: "Spline Sans", "Helvetica Neue", Arial, sans-serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121317; --paper-2: #1a1b20; --field: #1d1e23;
    --ink: #efe9dc; --ink-soft: #a8a59d; --rule: #34353b;
    --core-text: #f2a93f; --ok: #7fc493; --err: #f08a7a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121317; --paper-2: #1a1b20; --field: #1d1e23;
  --ink: #efe9dc; --ink-soft: #a8a59d; --rule: #34353b;
  --core-text: #f2a93f; --ok: #7fc493; --err: #f08a7a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.55 var(--sans);
  scrollbar-color: var(--rule) transparent; scrollbar-width: thin;
}
a { color: var(--core-text); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(21px, 2.4vw, 26px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.soft { color: var(--ink-soft); }
.small { font-size: 14px; }

.bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--rule);
}
.bar .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; }
.mark { width: 26px; height: 26px; flex: none; }
.mark .ring { fill: none; stroke: currentColor; stroke-width: 1.5; }
.mark .core { fill: var(--core); }
.bar .spacer { flex: 1; }

.wrap { width: min(720px, 100%); margin: 0 auto; padding: 32px 16px 64px; }
.wrap.wide { width: min(1200px, 100%); }

/* Buttons */
.btn {
  appearance: none; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 600 16px/1 var(--display); padding: 13px 22px; border-radius: 999px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 46px;
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { font-size: 14px; padding: 8px 14px; min-height: 36px; }
.btn.danger { border-color: var(--err); color: var(--err); background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .opt input:focus-visible + span {
  outline: 3px solid var(--core); outline-offset: 2px;
}
.actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 28px; flex-wrap: wrap; }

/* Progress */
.progress { height: 6px; background: var(--paper-2); border-radius: 999px; overflow: hidden; margin: 4px 0 24px; }
.progress span { display: block; height: 100%; width: 0; background: var(--core); transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }

/* Questions */
.q { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
.q > legend, .q > label.lbl { display: block; font-weight: 600; margin-bottom: 10px; padding: 0; }
.q .help { display: block; font-size: 14px; color: var(--ink-soft); margin: -6px 0 10px; }
.opts { display: grid; gap: 8px; }
.opt { display: block; position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 14px; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--field);
}
.opt span::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px;
  border: 1.5px solid var(--ink-soft); border-radius: 50%;
}
.opt input[type="checkbox"] + span::before { border-radius: 5px; }
.opt input:checked + span { border-color: var(--core); background: color-mix(in srgb, var(--core) 12%, var(--field)); }
.opt input:checked + span::before { background: var(--core); border-color: var(--core); box-shadow: inset 0 0 0 3px var(--field); }
input[type="text"], input[type="email"], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1.5px solid var(--rule); border-radius: 12px; padding: 11px 14px;
}
textarea { min-height: 120px; resize: vertical; }
.other { margin-top: 8px; }
.q.invalid > legend, .q.invalid > label.lbl { color: var(--err); }
.err { color: var(--err); font-size: 15px; }
.ok { color: var(--ok); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.card { background: var(--field); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.note { font-size: 14px; color: var(--ink-soft); border-left: 3px solid var(--core); padding: 2px 0 2px 12px; margin: 18px 0; }

/* Interview mode */
.probe { font-size: 14px; color: var(--core-text); margin: -4px 0 10px; }
.notes-box { margin-top: 10px; }
.notes-box textarea { min-height: 70px; background: var(--paper-2); }
.section { border-top: 1px solid var(--rule); padding-top: 24px; margin-top: 8px; }
.sticky {
  position: sticky; top: 0; z-index: 2; background: var(--paper);
  border-bottom: 1px solid var(--rule); padding: 10px 16px;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
}
.sticky label { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.sticky input[type="text"] { width: 90px; padding: 6px 10px; }
.sticky select { width: auto; padding: 6px 10px; }
.timer { font: 600 18px/1 var(--display); font-variant-numeric: tabular-nums; min-width: 64px; }
.status { font-size: 14px; color: var(--ink-soft); }

/* Responses view */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--display); font-weight: 600; background: var(--paper-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: 13px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule); white-space: nowrap; }
.pill.call { border-color: var(--core); color: var(--core-text); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat { background: var(--field); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font: 600 24px/1.1 var(--display); }
.stat small { color: var(--ink-soft); font-size: 13px; }
.row-actions { display: flex; gap: 8px; }
.flush { margin: 0; }
h2.gap { margin-top: 28px; }
textarea.tall { min-height: 180px; }
.stat span { display: block; }
.stat small { display: block; }
td:first-child { white-space: nowrap; }
