:root {
  --bs-primary:#062c79
}
body {
  background:#f6f8fc;
  color:#15243b
}
.card {
  border-top:4px solid #efbd19
}
.btn-primary {
  background:#062c79;
  border-color:#062c79
}
button,input {
  min-height:44px
}
#conversation {
  min-height:140px;
  max-height:55vh;
  overflow:auto
}
#conversation p {
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
dt {
  font-weight:600
}
dd {
  font-variant-numeric:tabular-nums
}
textarea {
  scroll-margin-bottom:5rem
}
.brand-wordmark {
  display:block;
  width:min(100%,20rem);
  height:auto
}
header>a:first-child {
  max-width:100%
}
a:focus-visible {
  outline:3px solid #062c79;
  outline-offset:4px
}
.brand-lockup {
  display:flex;
  align-items:center;
  gap:clamp(.5rem,2.5vw,1.75rem);
  width:min(100%,42rem)
}
.brand-lockup .brand-home {
  min-width:0;
  flex:0 1 390px
}
.brand-lockup .brand-wordmark {
  width:100%
}
.brand-plus {
  flex:none;
  font-size:clamp(1.25rem,3vw,2rem);
  color:#062c79
}
.workshop-home {
  display:block;
  min-width:0;
  flex:0 1 220px
}
.workshop-wordmark {
  display:block;
  width:100%;
  height:auto
}
/* Workspace/phone interactions follow Travis's prototype page and PR43/PR50.
   Release identity, server-derived data and authenticated controls are retained. */
[hidden] {
  display:none!important
}
button:focus-visible,summary:focus-visible,[tabindex]:focus-visible {
  outline:3px solid #062c79;
  outline-offset:3px
}
summary {
  cursor:pointer
}
p {
  overflow-wrap:anywhere
}
.brand-lockup {
  width:min(100%,30rem)
}
header .brand-wordmark {
  max-height:64px
}
header .workshop-wordmark {
  max-height:64px;
  object-fit:contain
}
.demo-notice {
  padding:.5rem .75rem;
  border-left:4px solid #efbd19;
  background:#fff8e1;
  border-radius:.35rem;
  margin-bottom:.5rem;
  font-size:.85rem
}
.data-notice {
  font-size:.8rem;
  margin-bottom:.75rem
}
.data-notice p {
  max-width:70rem
}
.workspace-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1rem
}
.workspace-toolbar h2 {
  margin:.1rem 0
}
.eyebrow {
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#4b586d;
  font-weight:700;
  margin:0
}
#retention {
  font-size:.75rem;
  margin:0;
  color:#4b586d
}
.workspace-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.5rem
}
.workspace-actions select {
  max-width:18rem;
  font-size:.85rem
}
.bid-menu {
  position:relative;
  font-size:.85rem
}
.bid-menu summary {
  padding:.75rem
}
.bid-menu>div {
  position:absolute;
  right:0;
  z-index:5;
  background:white;
  padding:.75rem;
  box-shadow:0 4px 20px #15243b22;
  display:grid;
  gap:.5rem;
  min-width:11rem
}
.workspace-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:1.25rem;
  align-items:start
}
.workspace-card {
  background:white;
  border:1px solid #d2d8e3;
  border-top:4px solid #efbd19;
  border-radius:.65rem;
  padding:1rem
}
.chat-panel {
  border-top-color:#062c79;
  padding:0;
  overflow:hidden
}
.chat-heading,.estimate-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:.75rem
}
.chat-heading {
  padding:.85rem 1rem;
  border-bottom:1px solid #e1e6ef
}
.chat-heading h2,.chat-heading p,.estimate-heading h2 {
  margin:0
}
.chat-heading p,.estimate-heading span {
  color:#546176
}
.chat-compose {
  padding:.75rem 1rem;
  border-top:1px solid #e1e6ef
}
.compose-row {
  display:flex;
  align-items:stretch;
  gap:.5rem
}
.compose-row textarea {
  min-width:0;
  resize:vertical;
  font-size:.9rem
}
.compose-row button {
  flex:none
}
#typing-help {
  font-size:.75rem;
  color:#546176;
  margin:.35rem 0
}
.input-options {
  font-size:.8rem
}
.input-options[open] {
  max-height:30vh;
  overflow:auto;
  padding-bottom:.5rem
}
.input-options button,.input-options input {
  margin:.4rem 0
}
.request-status {
  padding:0 1rem .65rem;
  font-size:.8rem
}
.request-status p {
  margin:.25rem 0
}
.request-status:has(p:empty) {
  padding-bottom:0
}
#conversation {
  display:flex;
  flex-direction:column;
  gap:.65rem;
  min-height:220px;
  max-height:52vh;
  overflow:auto;
  padding:1rem;
  background:#f6f8fc;
  scroll-padding:1rem
}
#conversation:empty:before {
  content:'Tell Sōl what you know about the job. Your saved figures stay beside the conversation.';
  font-size:.9rem;
  color:#546176;
  max-width:24rem
}
.user-message {
  align-self:flex-end;
  background:#062c79;
  color:white;
  border-radius:.75rem .75rem .15rem .75rem;
  padding:.6rem .8rem;
  max-width:90%;
  margin:0
}
.assistant-message {
  align-self:flex-start;
  max-width:100%;
  width:100%;
  background:#edf2fb;
  border-left:3px solid #efbd19;
  border-radius:.2rem .6rem .6rem .2rem;
  padding:.65rem .75rem;
  font-size:.9rem
}
.assistant-message p {
  margin:0 0 .4rem
}
.fact-card {
  border:1px solid #c9d3e6;
  border-left:3px solid #062c79;
  border-radius:.4rem;
  background:#fff;
  padding:.65rem .75rem
}
.fact-card h3 {
  font-size:.8rem;
  color:#40516d
}
.number-rows {
  margin:0
}
.number-rows>div {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:1rem;
  padding:.25rem 0;
  border-top:1px solid #e6eaf1
}
.number-rows dt {
  font-weight:400;
  min-width:0;
  overflow-wrap:anywhere
}
.number-rows dd {
  text-align:right;
  font-weight:600;
  margin:0;
  flex-shrink:0;
  max-width:60%;
  overflow-wrap:anywhere
}
.decision-row {
  flex-wrap:wrap
}
.decision-row button {
  flex:1;
  min-width:6rem;
  font-size:.9rem
}
.assistant-message details {
  margin-top:.4rem
}
.estimate-figures {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.65rem 1rem;
  margin:1rem 0
}
.estimate-figures dt {
  font-size:.75rem;
  color:#546176
}
.estimate-figures dd {
  font-size:1.05rem;
  margin:0;
  font-weight:600
}
.bid-health {
  display:flex;
  gap:.6rem;
  align-items:center;
  padding:.65rem .8rem;
  border-radius:.45rem;
  margin-top:.75rem;
  background:#edf2fb
}
.bid-health>span {
  font-size:1.3rem
}
.bid-health p {
  margin:0;
  font-size:.8rem
}
.bid-health[data-tone=OK] {
  background:#e6f4ed;
  color:#145c38
}
.bid-health[data-tone=THIN] {
  background:#fff3d6;
  color:#7a4200
}
.bid-health[data-tone=LOSS] {
  background:#fce8e8;
  color:#8e1b12
}
.suggestions {
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
  margin:.75rem 0
}
.suggestions button {
  font-size:.8rem;
  padding:.35rem .55rem
}
#bid-controls {
  border-top:1px solid #e1e6ef;
  padding-top:.75rem
}
#bid-controls legend {
  float:none;
  width:auto;
  font-size:.85rem;
  margin-bottom:.25rem
}
#bid-controls p {
  font-size:.75rem;
  margin-bottom:.4rem
}
#bid-controls label {
  font-size:.8rem;
  margin-bottom:0
}
#bid-controls input[type=range] {
  min-height:24px;
  height:24px
}
#bid-controls input[type=number] {
  display:block;
  max-width:12rem;
  min-height:36px;
  font-size:.85rem
}
.estimate-detail {
  border-top:1px solid #e1e6ef;
  padding-top:.7rem;
  font-size:.85rem
}
.filed-notes {
  list-style:none;
  padding:0;
  margin:0
}
.filed-notes li {
  border-top:1px solid #e1e6ef;
  padding:.6rem 0
}
.filed-notes p {
  margin:.25rem 0
}
.customer-copies {
  margin-top:1rem;
  font-size:.85rem
}
.customer-copies button {
  font-size:.85rem
}
.mobile-only,.mobile-summary {
  display:none
}
#chat-sheet {
  border:0;
  padding:0
}
#estimate-heading {
  scroll-margin-top:1rem
}
#workspace-status:empty {
  display:none
}
dialog::backdrop {
  background:#15243b88
}
#delete-dialog {
  max-width:min(90vw,28rem);
  border:1px solid #c9d3e6;
  border-radius:.6rem;
  padding:1.25rem
}
@media(min-width:992px) {
  #chat-home {
    position:sticky;
    top:1rem
  }
  .estimate-card {
    scroll-margin-top:1rem
  }
}
@media(max-width:991.98px) {
  body:has(#workspace:not([hidden])) {
    padding-bottom:8rem
  }
  .workspace-grid {
    grid-template-columns:1fr
  }
  .workspace-toolbar {
    align-items:flex-start;
    flex-direction:column;
    gap:.5rem
  }
  .workspace-actions {
    width:100%;
    gap:.4rem
  }
  .workspace-actions select {
    flex:1;
    max-width:none;
    min-width:8rem;
    width:8rem
  }
  .workspace-actions button {
    font-size:.8rem
  }
  .bid-menu summary {
    padding:.5rem
  }
  #chat-home {
    display:none
  }
  .mobile-only {
    display:flex
  }
  .mobile-summary {
    display:flex;
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:10;
    flex-direction:column;
    gap:.4rem;
    padding:.5rem .75rem max(.6rem,env(safe-area-inset-bottom));
    border-top:3px solid #efbd19;
    background:#fff;
    box-shadow:0 -3px 16px #15243b18
  }
  .summary-estimate {
    display:flex;
    justify-content:space-between;
    gap:.5rem;
    text-align:left;
    align-items:center;
    background:none;
    border:0;
    color:#062c79;
    font-size:.8rem
  }
  .summary-estimate span:last-child {
    font-weight:600;
    flex:none
  }
  .sheet-totals {
    justify-content:space-between;
    gap:.5rem;
    padding:.45rem .75rem;
    background:#edf2fb;
    font-size:.75rem
  }
  .sheet-totals strong {
    font-variant-numeric:tabular-nums
  }
  #chat-sheet[open] {
    position:fixed;
    inset:auto 0 0;
    margin:0;
    width:100%;
    max-width:none;
    height:calc(100dvh - 1rem);
    max-height:calc(100dvh - 1rem);
    border-radius:1rem 1rem 0 0;
    background:white;
    overflow:hidden
  }
  #chat-sheet .chat-panel {
    display:flex;
    flex-direction:column;
    height:100%;
    border:0;
    border-radius:0;
    padding-bottom:env(safe-area-inset-bottom)
  }
  #chat-sheet #conversation {
    flex:1;
    min-height:0;
    max-height:none;
    padding:.75rem
  }
  #chat-sheet .chat-heading {
    flex:none;
    padding:.65rem .75rem
  }
  #chat-sheet .chat-compose {
    flex:none;
    padding:.5rem .75rem
  }
  #chat-sheet .request-status {
    flex:none;
    max-height:20vh;
    overflow:auto
  }
  #sheet-close {
    font-size:.8rem
  }
  .chat-sheet-open {
    overflow:hidden
  }
  .chat-sheet-open .mobile-summary {
    display:none
  }
  .brand-lockup {
    width:min(100%,25rem)
  }
  header {
    gap:.5rem!important
  }
  header>a.btn {
    font-size:.75rem;
    min-height:36px;
    padding:.4rem .6rem
  }
  .estimate-figures {
    gap:.6rem
  }
  .workspace-card {
    padding:.85rem
  }
  .number-rows {
    font-size:.85rem
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important
  }
}

.chat-heading > div { min-width: 0; flex: 1; }
#chat-job { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
