/* Meet Your Agent — EW stationery-suite aesthetic */
:root {
  --rose: #e27162; --rose-50: #f1b8b1; --rose-dark: #a84133;
  --ink: #38325e; --ink-2: #4d4784; --indigo: #908ac2;
  --platinum: #e8e5e9; --platinum-50: #f1eff3; --azure: #e1f0f4;
  --saffron: #f4c767; --paper: #faf8f6;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Lato', -apple-system, system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--paper);
  background-image: radial-gradient(circle at 85% -10%, rgba(226,113,98,.07), transparent 45%),
                    radial-gradient(circle at -10% 30%, rgba(144,138,194,.08), transparent 40%);
  min-height: 100vh; line-height: 1.55;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 28px 20px 90px; }

/* Masthead */
.masthead { text-align: center; padding: 26px 0 8px; }
.masthead .rule { width: 54px; height: 2px; background: var(--rose); margin: 0 auto 18px; border-radius: 2px; }
.masthead .kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }
.masthead h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 6vw, 42px); margin: 8px 0 6px; }
.masthead h1 em { font-style: italic; color: var(--rose-dark); }
.masthead .sub { color: #6b668f; max-width: 460px; margin: 0 auto; font-size: 15px; }
.badge-row { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.badge { font-size: 12px; background: var(--platinum-50); border: 1px solid var(--platinum); border-radius: 999px; padding: 5px 12px; color: var(--ink-2); }

/* Chapter cards (home) */
.chapters { display: grid; gap: 12px; margin-top: 26px; }
.chapter-card {
  display: flex; align-items: center; gap: 16px; text-align: left; width: 100%;
  background: #fff; border: 1px solid var(--platinum); border-radius: 14px;
  padding: 16px 18px; cursor: pointer; font-family: var(--sans);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  animation: rise .5s both;
}
.chapter-card:nth-child(odd) { animation-delay: .04s; }
.chapter-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(56,50,94,.10); border-color: var(--rose-50); }
.chapter-card:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
.ch-num {
  font-family: var(--serif); font-size: 17px; color: var(--rose-dark);
  width: 40px; height: 40px; border: 1.5px solid var(--rose-50); border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0; background: #fff;
}
.chapter-card.done .ch-num { background: var(--ink); border-color: var(--ink); color: #fff; }
.ch-body { flex: 1; min-width: 0; }
.ch-title { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.ch-meta { font-size: 13px; color: #8a86a8; margin-top: 2px; }
.ch-state { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.chapter-card.done .ch-state { color: #2e7d54; font-weight: 700; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

/* Progress */
.progress { display: flex; align-items: center; gap: 10px; margin: 26px 4px 4px; }
.progress .bar { flex: 1; height: 6px; background: var(--platinum); border-radius: 999px; overflow: hidden; }
.progress .fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--rose-dark)); border-radius: 999px; transition: width .4s ease; }
.progress .pct { font-size: 13px; color: var(--ink-2); font-weight: 700; }

/* Chapter view */
.crumb { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.crumb button { background: none; border: none; color: var(--ink-2); font-family: var(--sans); font-size: 14px; cursor: pointer; padding: 13px 6px; min-height: 44px; }
.crumb button:hover { color: var(--rose-dark); }
.ch-head { margin: 6px 0 22px; }
.ch-head .kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--rose-dark); }
.ch-head h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 6px 0; }
.ch-head p { color: #6b668f; font-size: 15px; max-width: 560px; }

.field { background: #fff; border: 1px solid var(--platinum); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.field.flagged { border-left: 4px solid var(--saffron); }
.f-label { font-weight: 700; font-size: 15.5px; display: block; }
.f-label .req, .req { color: var(--rose-dark); }
.f-help { font-size: 13.5px; color: #75719a; margin: 4px 0 2px; }
.req-legend { font-size: 13px; color: #75719a; margin-top: 10px; }
.hint { font-size: 13.5px; color: #75719a; margin-top: 12px; }
.help-line { font-size: 13px; color: #75719a; text-align: center; margin-top: 26px; }
.help-line a { color: var(--rose-dark); }
.chip-hint { font-size: 12.5px; color: #9a96b5; margin-top: 6px; }
.f-ctl { margin-top: 10px; }
input[type=text], textarea, select {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--platinum); border-radius: 10px; padding: 12px 14px;
}
textarea { min-height: 88px; resize: vertical; }
textarea.tall { min-height: 150px; }
input:focus-visible, textarea:focus-visible { outline: 2.5px solid var(--rose); outline-offset: 1px; border-color: var(--rose-50); }

/* Confirm cards */
.confirm-text { font-size: 14.5px; background: var(--azure); border-radius: 10px; padding: 13px 15px; margin-top: 10px; }
.field.flagged .confirm-text { background: #fdf4dd; }
.confirm-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.confirm-actions button {
  font-family: var(--sans); font-size: 14px; font-weight: 700; cursor: pointer;
  border-radius: 999px; padding: 12px 20px; min-height: 44px; border: 1.5px solid var(--platinum); background: #fff; color: var(--ink-2);
  transition: all .12s;
}
.confirm-actions button.on-yes { background: var(--ink); border-color: var(--ink); color: #fff; }
.confirm-actions button.on-fix { background: var(--rose); border-color: var(--rose); color: #fff; }
.confirm-fixbox { margin-top: 10px; display: none; }
.confirm-fixbox.show { display: block; }

/* Chips + radios */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  font-family: var(--sans); font-size: 14px; cursor: pointer; user-select: none;
  border: 1.5px solid var(--platinum); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 12px 18px; min-height: 44px; transition: all .12s;
}
.chips.suggest { margin-top: 10px; }
.chips.suggest .chip { padding: 8px 14px; min-height: 36px; font-size: 13.5px; background: var(--platinum-50); border-color: transparent; }
.chip:hover { border-color: var(--rose-50); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.radios { display: grid; gap: 8px; margin-top: 10px; }
.radio-opt {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  border: 1.5px solid var(--platinum); border-radius: 10px; padding: 12px 14px; background: #fff;
  font-size: 14.5px; transition: all .12s;
}
.radio-opt:hover { border-color: var(--rose-50); }
.radio-opt.on { border-color: var(--rose); background: #fdf1ef; }
.radio-dot { width: 18px; height: 18px; border: 2px solid var(--platinum); border-radius: 50%; flex-shrink: 0; margin-top: 1px; }
.radio-opt.on .radio-dot { border-color: var(--rose); background: radial-gradient(circle, var(--rose) 45%, transparent 50%); }

/* Slider */
.slider-row { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 12px; }
input[type=range] { width: 100%; accent-color: var(--rose); }
.slider-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: #75719a; }
.slider-preview { background: var(--azure); border-radius: 10px; padding: 12px 15px; margin-top: 10px; font-size: 14px; display: grid; gap: 3px; }
.slider-preview b { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.slider-preview span { font-style: italic; }
input[type=range] { height: 34px; }
.list-rows { display: grid; gap: 8px; margin-top: 10px; }
.list-row { display: flex; gap: 8px; align-items: center; }
.row-del { border: none; background: var(--platinum-50); color: var(--rose-dark); font-size: 18px; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; flex-shrink: 0; }
.row-add { border: 1.5px dashed var(--platinum); background: none; color: var(--ink-2); font-family: var(--sans); font-weight: 700; font-size: 14px; border-radius: 10px; padding: 12px; min-height: 44px; cursor: pointer; }
.row-add:hover { border-color: var(--rose-50); color: var(--rose-dark); }

/* Info / link field */
.info-link {
  display: block; text-align: center; background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 700; border-radius: 12px; padding: 15px; font-size: 15px; letter-spacing: .01em;
}
.info-link:hover { background: var(--ink-2); }

/* Buttons */
.btn-row { display: flex; gap: 10px; margin-top: 22px; }
.btn {
  font-family: var(--sans); font-weight: 700; font-size: 15px; cursor: pointer; border-radius: 999px;
  padding: 14px 26px; border: none; transition: all .15s;
}
.btn.primary { background: var(--rose); color: #fff; box-shadow: 0 6px 16px rgba(226,113,98,.35); }
.btn.primary:hover { background: var(--rose-dark); transform: translateY(-1px); }
.btn.ghost { background: #fff; border: 1.5px solid var(--platinum); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--rose-50); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Review */
.review-block { background: #fff; border: 1px solid var(--platinum); border-radius: 14px; padding: 18px; margin-bottom: 12px; }
.review-block h3 { font-family: var(--serif); font-weight: 500; font-size: 19px; margin-bottom: 8px; }
.review-item { font-size: 14px; padding: 6px 0; border-top: 1px dashed var(--platinum); }
.review-item:first-of-type { border-top: none; }
.review-item .q { color: #8a86a8; font-size: 12.5px; }
.gaps { background: #fdf4dd; border: 1px solid var(--saffron); border-radius: 14px; padding: 16px 18px; margin: 16px 0; font-size: 14.5px; }
.gaps b { display: block; margin-bottom: 8px; }
.gap-ch { font-size: 13px; line-height: 1.55; color: var(--body, #4a4458); margin-bottom: 7px; }
.gap-ch-title { display: block; font-weight: 700; font-size: 13.5px; color: var(--ink, #38325e); }
.autosave { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #2e7d54; background: rgba(250,248,246,.95); border: 1px solid var(--platinum); padding: 5px 14px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.autosave.show { opacity: 1; }
.edit-link { float: right; border: none; background: none; color: var(--rose-dark); font-family: var(--sans); font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 10px; }
.next-steps .step-line { font-size: 14px; padding: 6px 0; }
.next-steps .consent { color: var(--ink-2); border-top: 1px dashed var(--platinum); margin-top: 6px; padding-top: 10px; }

/* Done screen */
.done-screen { text-align: center; padding: 60px 10px; }
.done-screen .tick { font-family: var(--serif); font-size: 54px; color: var(--rose); }
.done-screen h2 { font-family: var(--serif); font-weight: 500; font-size: 32px; margin: 10px 0; }
.done-screen p { color: #6b668f; max-width: 440px; margin: 6px auto; }

@media (max-width: 520px) {
  .wrap { padding: 18px 14px 90px; }
  .chapter-card { padding: 14px; gap: 12px; }
  .btn-row { flex-direction: column; }
}

/* Uploads */
.upload-list { display: grid; gap: 6px; margin-bottom: 12px; }
.upload-row { display: flex; justify-content: space-between; align-items: center; background: var(--azure); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.upload-row em { color: #75719a; font-style: normal; }
.file-input { width: 100%; font-family: var(--sans); font-size: 14px; background: var(--paper); border: 1.5px dashed var(--platinum); border-radius: 10px; padding: 12px; }
.up-status { min-height: 18px; margin-top: 8px; }

.chip-count { font-weight: 700; color: var(--rose-dark); }
.chip-count.bump { animation: bump .4s; }
@keyframes bump { 0%,100% { transform: none; } 30% { transform: translateX(3px); } 60% { transform: translateX(-3px); } }

.chip-desc { margin-top: 10px; background: var(--card, #fff); border: 1px solid var(--line, #e9e2dc); border-left: 3px solid var(--rose, #e27162); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; color: var(--body, #4a4458); line-height: 1.45; min-height: 40px; }
.chip-desc b { color: var(--ink, #38325e); }

/* grouped chip pickers (skills + connections) */
.chip-group {
  flex: 0 0 100%; width: 100%; margin: 12px 0 -2px;
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--rose-dark, #a84133);
}
.chip-group:first-child { margin-top: 2px; }
.chip-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle; flex-shrink: 0;
}
.chip-dot.out { background: #e27162; }
.chip-dot.in  { background: #4c9c7a; }
.chip-legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px;
  font-size: 12.5px; color: #9a96b5;
}
.chip-legend span { display: inline-flex; align-items: center; }

/* skill needs a connection it hasn't got: guidance while choosing, not an error at submit */
.dep-notice {
  margin-top: 12px; background: #fdf7e9; border: 1px solid #ecd9a8;
  border-left: 4px solid var(--saffron, #d9a53f); border-radius: 10px; padding: 12px 16px;
}
.dep-notice b { display: block; font-size: 13.5px; color: var(--ink, #38325e); margin-bottom: 6px; }
.dep-row { font-size: 13.5px; line-height: 1.5; color: var(--body, #4a4458); margin-bottom: 3px; }
.dep-row span { font-weight: 700; color: var(--ink, #38325e); }
.dep-foot { font-size: 12.5px; color: #9a96b5; margin-top: 7px; }

/* connection setup SOPs */
.sop-wrap { margin-top:14px; padding:16px; background:#fdf9f6; border:1px solid #eadfd6; border-radius:12px; }
.sop-wrap > b { color:#38325e; font-size:15px; }
.sop-sum { color:#8d87a0; font-size:13.5px; margin:6px 0 10px; }
.sop-card { background:#fff; border:1px solid #eee6de; border-radius:10px; padding:12px 14px; margin-top:10px; }
.sop-head { display:flex; align-items:center; gap:10px; }
.sop-head b { color:#38325e; font-size:14.5px; }
.sop-tag { font-size:11px; font-weight:700; padding:2px 9px; border-radius:99px; }
.sop-oauth { background:#e7f2ea; color:#2a734c; }
.sop-key { background:#fdeee9; color:#a8432f; }
span.sop-key { }
.sop-tag.sop-call, .sop-call { background:#eef0f7; color:#4d5680; }
.sop-mins { margin-left:auto; color:#a9a3b8; font-size:12px; }
.sop-who { color:#6d6782; font-size:12.5px; margin:6px 0 2px; }
.sop-card ol { margin:6px 0 4px 18px; padding:0; }
.sop-card li { font-size:13.5px; color:#4a445f; margin:4px 0; }
div.sop-key { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px; background:transparent; }
div.sop-key input { flex:1; min-width:220px; padding:9px 12px; border:1px solid #ddd3c8; border-radius:8px; font-size:13.5px; }
div.sop-key.ok { color:#2a734c; font-weight:600; font-size:13.5px; }
.sop-save { background:#c9584a; color:#fff; border:0; border-radius:8px; padding:9px 16px; font-weight:700; cursor:pointer; }
.sop-connect { background:#38325e; color:#fff; border:0; border-radius:8px; padding:9px 16px; font-weight:700; cursor:pointer; }
.sop-connect:disabled { opacity:.55; cursor:default; }
.sop-clear { background:none; border:0; color:#a9a3b8; text-decoration:underline; cursor:pointer; font-size:12px; }
.sop-note { flex-basis:100%; color:#a9a3b8; font-size:11.5px; }
