/* Lightning CV prototype system - tokens and components from DESIGN.md.
   Shared by all four flow prototypes. Self-contained: deploy this folder
   to Netlify as-is, or serve it as part of the main site build. */

* { box-sizing: border-box; caret-color: #1F5FA8; }
html, body { margin: 0; padding: 0; }
body {
  background: #F7F6F3; color: #1C2024;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.5;
}
::selection { background: #CFE0F1; }
:focus-visible { outline: 2px solid #1F5FA8; outline-offset: 1px; border-radius: 4px; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #D6D5CE; border-radius: 6px; border: 2px solid #F7F6F3; }
*::-webkit-scrollbar-track { background: transparent; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
a { color: #1F5FA8; }
[hidden] { display: none !important; }

/* ---- prototype scaffolding strip (not product chrome) ---- */
.proto-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #EDF3FA; border-bottom: 1px solid #D9E7F5;
  padding: 7px 16px; font-size: 12.5px; color: #17497F; font-weight: 600;
  position: sticky; top: 0; z-index: 40;
}
.proto-strip .tag {
  background: #1F5FA8; color: #fff; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 9px;
}
.proto-strip a { color: #17497F; font-weight: 650; text-decoration: none; }
.proto-strip a:hover { text-decoration: underline; }
.proto-strip .step-readout { margin-left: auto; color: #2E6BAA; font-weight: 600; font-size: 12px; }
.proto-strip .synthetic { color: #4A76AC; font-weight: 500; font-size: 11.5px; }

/* ---- flow controls (scaffolding) ---- */
.flowbar {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: flex; align-items: center; gap: 8px;
  background: #F3F8FD; border: 1.5px dashed #9FB6D0; border-radius: 12px;
  padding: 8px 12px; box-shadow: 0 4px 14px rgba(28,32,36,.10);
}
.flowbar .flowlabel {
  font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #4A76AC; margin-right: 2px; white-space: nowrap;
}
.flowbar .where { font-size: 12px; color: #56606B; font-weight: 600; padding: 0 4px; max-width: 260px; }
.flowbtn {
  border: 1px solid #D6D5CE; background: #FFFFFF; border-radius: 8px;
  font-size: 12.5px; font-weight: 650; color: #1C2024; padding: 7px 13px;
}
.flowbtn:hover:not(:disabled) { border-color: #1F5FA8; background: #EDF3FA; }
.flowbtn:disabled { opacity: .4; cursor: default; }
.flowbtn.primary { background: #1F5FA8; border-color: #1F5FA8; color: #fff; }
.flowbtn.primary:hover:not(:disabled) { background: #17497F; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  background: #FFFFFF; border-bottom: 1px solid #E3E3DD;
  padding: 0 20px; height: 54px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; text-decoration: none; color: #1C2024; }
.brand img { width: 26px; height: 26px; border-radius: 6px; display: block; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav a {
  color: #56606B; text-decoration: none; font-weight: 600; font-size: 13.5px;
  padding: 7px 12px; border-radius: 8px;
}
.nav a:hover { color: #1C2024; background: #F0EFEB; }
.nav a[aria-current="page"] { color: #17497F; font-weight: 700; background: none; border-radius: 0; border-bottom: 2px solid #17497F; }
.user {
  width: 32px; height: 32px; border-radius: 50%; background: #1F5FA8; color: #fff;
  font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ---- honest state marks and pills ---- */
.mark { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.mark-full { background: #E7F3EC; color: #16704A; }
.mark-part { background: #F1EDE2; color: #8A6D3B; }
.mark-gap { background: #F6ECEA; color: #A64B44; }
.mark-sm { width: 20px; height: 20px; }
.pill { border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 650; }
.pill-full { background: #E7F3EC; color: #14563A; }
.pill-part { background: #F1EDE2; color: #6E5730; }
.pill-gap { background: #F6ECEA; color: #8C3F38; }
.stbadge {
  min-width: 17px; height: 17px; border-radius: 999px; padding: 0 5px;
  background: #A64B44; color: #FFFFFF; font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; margin-left: 2px;
}

/* ---- conversation ---- */
.conv-head {
  padding: 13px 18px; border-bottom: 1px solid #E3E3DD;
  font-weight: 700; font-size: 13.5px; display: flex; align-items: baseline; gap: 8px;
}
.conv-head span { font-weight: 500; color: #7A828C; font-size: 12px; }
.conv-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 13px; }
.msg { max-width: 92%; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; line-height: 1.55; }
.msg-user { align-self: flex-end; background: #1F5FA8; color: #FFFFFF; border-bottom-right-radius: 4px; }
.msg-it { align-self: flex-start; background: #F0EFEB; color: #1C2024; border-bottom-left-radius: 4px; }
.msg-it .quote {
  font-size: 12.5px; color: #56606B; border-left: 2px solid #D6D5CE;
  padding: 2px 0 2px 10px; margin: 8px 0 2px;
}
.msg-time { display: block; font-size: 11px; color: rgba(255,255,255,.9); margin-top: 6px; font-weight: 500; }
.msg-it .msg-time { color: #7A828C; }
.msg.enter { animation: msg-in .4s cubic-bezier(.16,1,.3,1) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 11px 18px 14px; border-top: 1px solid #E3E3DD; }
.chip {
  border: 1px solid #D6D5CE; background: #FFFFFF; border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; font-weight: 600; color: #1F5FA8;
}
.chip:hover { border-color: #1F5FA8; background: #EDF3FA; }
.conv-input { display: flex; gap: 8px; padding: 0 18px 16px; }
.conv-input input {
  flex: 1; min-width: 0; border: 1px solid #D6D5CE; border-radius: 10px; padding: 10px 13px;
  font-family: inherit; font-size: 13.5px; color: #1C2024; background: #FFFFFF;
}
.conv-input input::placeholder { color: #6E7680; }
.send {
  width: 40px; border: none; border-radius: 10px; background: #1F5FA8; color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.send:hover { background: #17497F; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 8px; background: #1F5FA8; color: #fff;
  font-weight: 600; font-size: 13px; padding: 9px 15px;
}
.btn:hover { background: #17497F; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid #D6D5CE;
  background: #FFFFFF; border-radius: 8px; color: #1C2024; font-weight: 600;
  font-size: 12.5px; padding: 7px 13px;
}
.btn-ghost:hover { border-color: #1F5FA8; background: #EDF3FA; }
.addevidence {
  border: none; background: none; color: #1F5FA8; font-weight: 650; font-size: 12px;
  padding: 3px 8px 3px 0; border-radius: 6px; cursor: pointer;
}
.addevidence:hover { background: #EDF3FA; }
.addevidence u { text-decoration: underline; text-underline-offset: 2px; }

/* ---- looks + download ---- */
.looks { display: flex; border: 1px solid #D6D5CE; border-radius: 8px; overflow: hidden; background: #fff; }
.looks button { border: none; background: #FFFFFF; padding: 6px 12px; font-size: 12px; font-weight: 600; color: #56606B; }
.looks button + button { border-left: 1px solid #E3E3DD; }
.looks button[aria-pressed="true"] { background: #1F5FA8; color: #fff; }

/* ---- the document ---- */
.well { background: #EFEDE8; display: flex; justify-content: center; padding: 26px; border-radius: 10px; border: 1px solid #DDDBD3; }
.cvpage {
  background: #FFFFFF; border: 1px solid #DDDBD3; border-radius: 6px;
  box-shadow: 0 2px 6px rgba(28,32,36,.06), 0 12px 28px rgba(28,32,36,.08);
  width: 460px; max-width: 100%; padding: 38px 40px;
  font-size: 9.6px; line-height: 1.5; color: #26292D;
  animation: page-in .5s cubic-bezier(.16,1,.3,1) both;
}
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cvpage h3 { margin: 0; font-size: 14.5px; letter-spacing: -0.01em; }
.cvcontact { color: #56606B; margin: 0 0 12px; }
.cvpage h4 {
  margin: 13px 0 4px; font-size: 8.8px; letter-spacing: .08em; text-transform: uppercase;
  color: #56606B; border-bottom: 1px solid #E3E3DD; padding-bottom: 2px;
}
.cvpage p { margin: 0 0 6px; }
.cvpage ul { margin: 0; padding-left: 13px; }
.cvpage li { margin-bottom: 4px; }
.cvrole { display: flex; justify-content: space-between; font-weight: 650; margin-top: 9px; font-size: 9.8px; }
.cvrole span { font-weight: 500; color: #56606B; }
.cvline-used { background: #EDF3FA; border-radius: 3px; box-shadow: 0 0 0 3px #EDF3FA; }
.cvpage.refade { animation: page-in .45s cubic-bezier(.16,1,.3,1) both; }

/* ---- requirement / coverage rows ---- */
.req { background: #FFFFFF; border: 1px solid #E3E3DD; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.req > summary { list-style: none; display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; cursor: pointer; }
.req > summary::-webkit-details-marker { display: none; }
.req > summary:hover { background: #FBFAF8; }
.req-text { flex: 1; }
.req-text b { font-size: 13.5px; font-weight: 650; display: block; }
.req-text small { color: #56606B; font-size: 12.5px; }
.req-count { flex: none; font-size: 12px; font-weight: 650; color: #56606B; padding-top: 3px; white-space: nowrap; }
.facts { border-top: 1px solid #EFEDE8; padding: 4px 16px 12px 50px; }
.fact { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 12.5px; }
.fact + .fact { border-top: 1px solid #F4F2EE; }
.fact svg { flex: none; margin-top: 3px; color: #16704A; }
.fact .src { color: #7A828C; font-size: 11.5px; margin-left: auto; white-space: nowrap; padding-left: 12px; }
.gapnote { border-top: 1px solid #F4F2EE; margin: 0 16px 0 50px; padding: 10px 0 2px; font-size: 12.5px; color: #A64B44; }
.gapnote b { font-weight: 650; }
.spine-total { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 13px; color: #56606B; font-weight: 600; }

/* ---- gap rail (gaps travel with the document) ---- */
.gaprail { margin-top: 16px; }
.gaprail h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.gaprail h3 span { font-weight: 500; color: #56606B; font-size: 12px; }
.gapcells { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.gapcell {
  display: flex; gap: 10px; align-items: flex-start;
  background: #FFFFFF; border: 1px solid #E3E3DD; border-radius: 10px; padding: 10px 12px;
}
.gapcell b { font-size: 12.5px; display: block; }
.gapcell small { color: #56606B; font-size: 11.5px; display: block; margin: 1px 0 6px; }

/* ---- responsive shell (grids defined per page) ---- */
@media (max-width: 980px) {
  .nav { display: none; }
  body { padding-bottom: 96px; } /* keep content clear of the fixed flowbar */
  .flowbar { right: 8px; bottom: 8px; left: 8px; justify-content: space-between; }
  .flowbar .where { max-width: none; flex: 1; }
}

@media (max-width: 700px) {  }
