/* Gideon Signal — intake. Clean white mode: editorial serif + grotesque body,
   deep ink, one emerald accent, coral for urgent. Calm, trustworthy, not techy. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg:        #f5f7f6;
  --panel:     #ffffff;
  --ink:       #11201c;
  --muted:     #5d6f69;
  --faint:     #8a9a94;
  --line:      #e4eae7;
  --accent:    #0b8f5f;   /* emerald */
  --accent-ink:#076244;
  --accent-soft:#e8f5ef;
  --urgent:    #d9492f;   /* coral */
  --urgent-soft:#fdece8;
  --amber:     #b8770a;
  --amber-soft:#fbf2e0;
  --radius:    16px;
  --shadow:    0 1px 2px rgba(17,32,28,.04), 0 12px 32px rgba(17,32,28,.06);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(60rem 32rem at 82% -8%, rgba(11,143,95,.07), transparent 70%),
    radial-gradient(50rem 30rem at -6% 4%, rgba(11,143,95,.05), transparent 70%);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- top bar ---- */
.topbar {
  max-width: 980px; margin: 0 auto; padding: 22px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing:-.01em; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft); }
.topbar .tag { color: var(--muted); font-size: 13px; }

/* ---- hero ---- */
.hero { max-width: 980px; margin: 0 auto; padding: 40px 24px 8px; }
.eyebrow { color: var(--accent-ink); font-weight: 700; font-size: 12.5px;
  letter-spacing: .14em; text-transform: uppercase; }
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 5vw, 50px);
  line-height: 1.04; letter-spacing: -.02em; margin: 12px 0 14px; max-width: 18ch;
}
.hero h1 em { font-style: italic; color: var(--accent-ink); }
.lede { color: var(--muted); font-size: 17px; max-width: 56ch; margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pill { font-size: 12.5px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }

/* ---- card ---- */
main { max-width: 980px; margin: 0 auto; padding: 26px 24px 64px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; }
.card-pad { padding: 26px 28px; }

/* ---- segmented either/or toggle ---- */
.switch { display: inline-flex; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; gap: 4px; }
.switch button { border: 0; background: transparent; color: var(--muted); font-weight: 600;
  padding: 9px 16px; border-radius: 9px; cursor: pointer; transition: .15s; }
.switch button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.switch-row { display:flex; flex-direction: column; align-items:center; gap:14px;
  padding: 22px 28px 32px; border-bottom: 1px solid var(--line); }
.switch-row p { margin: 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.or-sep { align-self: center; color: var(--muted); font-size: 13px; font-weight: 600;
  font-style: italic; padding: 0 6px; }
/* breathing room between the chooser and the form/chat below it */
#form-pane.card-pad, #chat-pane.card-pad { padding-top: 30px; }

.pane { display: none; }
.pane.on { display: block; animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- form ---- */
.section-label { font-family: var(--serif); font-weight: 600; font-size: 19px;
  margin: 26px 0 4px; letter-spacing: -.01em; }
.section-label:first-child { margin-top: 0; }
.section-hint { color: var(--faint); font-size: 13px; margin: 0 0 14px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.field .help { color: var(--faint); font-weight: 400; }
input[type=text], input[type=email], input:not([type]), select, textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft); }
.divider { height: 1px; background: var(--line); margin: 28px 0; border: 0; }

/* ---- choice chips (the alert dials) ---- */
.dial { margin: 16px 0; }
.dial > span { display:block; font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.dial > .help { color: var(--faint); font-weight: 400; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choices .chip { display: inline-flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 120px;
  background: var(--panel); transition: .15s; }
.choices .chip b { font-size: 14px; }
.choices .chip small { color: var(--faint); font-size: 12px; }
.choices input:checked + .chip { border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent); }
.choices input:focus-visible + .chip { box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---- buttons ---- */
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 12px;
  padding: 12px 18px; font-weight: 700; cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--faint); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-primary:disabled { opacity: .6; cursor: wait; }

/* ---- guided Q&A ---- */
.qa-log { display: grid; gap: 10px; margin-bottom: 14px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.msg { padding: 12px 14px; border-radius: 14px; font-size: 14px; max-width: 86%; }
.msg.bot { background: var(--bg); border: 1px solid var(--line); }
.msg.you { background: var(--accent-soft); border: 1px solid #cfe9dd; margin-left: auto; }
.qa-status { color: var(--faint); font-size: 12.5px; }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 52px; }

/* ---- result / proposed profile ---- */
.result { margin-top: 22px; }
.result-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding: 22px 28px 0; }
.result-head h2 { font-family: var(--serif); font-weight: 600; margin: 0; font-size: 24px; letter-spacing:-.01em; }
.result-head .sub { color: var(--muted); font-size: 13.5px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 28px 0; }
.stat { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: var(--panel); }
.stat b { font-family: var(--serif); font-weight: 600; font-size: 26px; display: block; }
.stat span { color: var(--muted); font-size: 12.5px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 28px 0; }
.tabs button { border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab-panels { padding: 16px 28px 28px; }
.tab-panel { display: none; }
.tab-panel.on { display: block; }
.row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; margin-bottom: 10px; }
.row strong { display: block; }
.row small { display: block; color: var(--muted); margin-top: 3px; }
.tag-chip { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  border-radius: 999px; padding: 5px 9px; white-space: nowrap; }
.tag-chip.good { background: var(--accent-soft); color: var(--accent-ink); }
.tag-chip.warn { background: var(--amber-soft); color: var(--amber); }
.tag-chip.review { background: #eef3ff; color: #2c5cc4; }
.tag-chip.src { background: var(--bg); color: var(--muted); }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 13px; padding: 18px; }
.source-group { margin-bottom: 18px; }
.source-group:last-child { margin-bottom: 0; }
.source-group-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin: 2px 0 4px; }
.source-group-head h3 { margin:0; font-family: var(--serif); font-size: 18px; font-weight:600; letter-spacing:-.01em; }
.source-group-head span { color: var(--muted); background: var(--bg); border:1px solid var(--line); border-radius:999px; padding:2px 8px; font-size:12px; font-weight:700; }
.source-group > p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }

.notice { border-radius: 12px; padding: 12px 14px; margin: 14px 28px; }
.notice.error { background: var(--urgent-soft); border: 1px solid #f3c7bd; color: #8a2a18; }
.foot { color: var(--faint); font-size: 12px; text-align: center; padding: 26px 0 0; }

@media (max-width: 720px) {
  .grid.two { grid-template-columns: 1fr; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .card-pad { padding: 22px; }
}

/* curate + activate the proposed profile */
.result-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, #e5e9e7); flex-wrap: wrap;
}
.result-actions .section-hint { margin: 0; flex: 1; min-width: 220px; }
.row-pick { display: flex; gap: 10px; align-items: center; flex: 1; cursor: pointer; margin: 0; }
.row-pick input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent, #0b8f5f); cursor: pointer; }
