:root {
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#17232d;
  background:#f5f7f8;
  font-synthesis:none;
  font-size:15px;
  line-height:1.5;
  --ink:#17232d;
  --muted:#60717d;
  --line:#dde5e9;
  --accent:#17654e;
  --accent-soft:#e6f2eb;
  --red:#a53737;
  --amber:#865516
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select,textarea {
  font:inherit
}
button,input,select,textarea,a {
  touch-action:manipulation
}
button {
  cursor:pointer;
  border:1px solid transparent;
  border-radius:8px;
  padding:9px 14px;
  min-height:40px;
  font-weight:600;
  background:#fff;
  color:var(--ink)
}
button:disabled {
  cursor:not-allowed;
  opacity:.48
}
button.primary {
  background:var(--accent);
  color:white
}
button.primary:hover:enabled {
  background:#10513d
}
button.secondary {
  border-color:#cbd8de;
  background:white
}
button.quiet {
  background:transparent;
  border-color:transparent;
  color:#526673;
  padding:7px 10px
}
button.danger {
  border-color:#e8c8c8;
  color:var(--red);
  background:#fffafa
}
button:hover:enabled {
  filter:brightness(.97)
}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid #80b9da;
  outline-offset:2px
}
input,select,textarea {
  width:100%;
  border:1px solid #cbd6dc;
  border-radius:8px;
  padding:10px 12px;
  background:#fff;
  color:var(--ink)
}
input[readonly] {
  background:#f5f7f8;
  color:#4f6270
}
textarea {
  resize:vertical;
  min-height:85px;
  line-height:1.55
}
input[type=checkbox],input[type=radio] {
  width:18px;
  height:18px;
  accent-color:var(--accent);
  flex-shrink:0;
  margin:2px 0
}
label,legend {
  font-weight:600;
  font-size:.9rem
}
label {
  display:block;
  margin-bottom:6px
}
fieldset {
  border:0;
  padding:0;
  margin:23px 0
}
legend {
  padding:0;
  margin-bottom:10px
}
h1,h2,h3,h4,p {
  margin-top:0
}
h1 {
  font-size:1.32rem;
  letter-spacing:-.03em;
  line-height:1.2;
  margin-bottom:0
}
h2 {
  font-size:1.22rem;
  letter-spacing:-.025em;
  margin-bottom:8px
}
h3 {
  font-size:1rem;
  margin-bottom:5px
}
h4 {
  font-size:.93rem;
  margin-bottom:6px
}
p {
  margin-bottom:12px
}
a {
  color:#226783;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
  overflow-wrap:anywhere
}
pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:inherit;
  margin:0
}
code {
  font-size:.8rem;
  overflow-wrap:anywhere
}
details>summary {
  cursor:pointer;
  color:#526673;
  font-size:.84rem;
  padding:5px 0
}
.topbar {
  height:91px;
  padding:0 max(24px,calc((100vw - 1280px)/2));
  background:white;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px
}
.brand {
  display:flex;
  gap:13px;
  align-items:center
}
.brand-mark {
  display:grid;
  place-items:center;
  background:#16392f;
  color:white;
  width:38px;
  height:42px;
  border-radius:9px;
  font-size:24px;
  font-weight:650
}
.eyebrow {
  display:block;
  font-size:.65rem;
  letter-spacing:.13em;
  color:var(--muted);
  font-weight:700;
  margin-bottom:3px
}
.header-controls {
  display:flex;
  gap:10px;
  align-items:center
}
.badge {
  display:inline-flex;
  align-items:center;
  border-radius:20px;
  padding:4px 9px;
  font-size:.73rem;
  font-weight:650;
  white-space:nowrap;
  background:#edf1f3;
  color:#526673
}
.badge.good {
  background:var(--accent-soft);
  color:#236047
}
.badge.warn {
  background:#fff1d9;
  color:var(--amber)
}
.badge.bad {
  background:#fae8e8;
  color:var(--red)
}
main {
  max-width:1280px;
  margin:0 auto;
  padding:30px 24px 70px
}
.card {
  background:white;
  border:1px solid var(--line);
  border-radius:13px;
  padding:22px;
  box-shadow:0 2px 3px #162d3c03
}
.login {
  max-width:530px;
  margin:8vh auto;
  padding:32px
}
.login h2 {
  font-size:1.55rem;
  margin:10px 0
}
.login form {
  margin-top:25px
}
.login form button {
  width:100%;
  margin:15px 0
}
.muted {
  color:var(--muted);
  font-size:.9rem
}
.fine {
  font-size:.78rem;
  color:var(--muted);
  line-height:1.55;
  margin:7px 0
}
.error {
  color:var(--red);
  font-size:.86rem
}
.notice {
  padding:13px 16px;
  border:1px solid #b8d3c7;
  border-radius:9px;
  background:#edf7f2;
  color:#265c46;
  margin:18px 0;
  font-size:.9rem
}
.notice.error {
  border-color:#e0bcbc;
  background:#fff4f3;
  color:#923a36
}
.workspace-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  margin:0 0 21px
}
.workspace-heading h2 {
  font-size:1.65rem
}
.workspace-heading p {
  margin-bottom:0
}
.configuration {
  display:flex;
  gap:22px;
  flex-wrap:wrap;
  padding:14px 18px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#eef3f4;
  margin-bottom:22px;
  font-size:.82rem
}
.configuration strong {
  font-weight:650;
  color:#345460
}
.work-grid {
  display:grid;
  grid-template-columns:310px minmax(0,1fr);
  align-items:start;
  gap:22px
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px
}
.section-heading h2 {
  margin:0
}
.count {
  font-size:.76rem;
  font-weight:700;
  background:#eef3f5;
  border-radius:6px;
  min-width:24px;
  text-align:center;
  padding:3px 7px;
  color:#566c78
}
.leads-panel {
  padding:20px 14px
}
.leads-panel>.section-heading,.leads-panel>input {
  margin-left:6px;
  margin-right:6px
}
.leads-panel>input {
  width:calc(100% - 12px)
}
.lead-list {
  max-height:660px;
  overflow:auto;
  margin-top:13px
}
.lead-button {
  width:100%;
  display:block;
  text-align:left;
  padding:12px 10px;
  margin:3px 0;
  border:1px solid transparent;
  background:white
}
.lead-button.selected {
  background:#edf5f1;
  border-color:#b5cfc2
}
.lead-button strong {
  display:block;
  overflow-wrap:anywhere
}
.lead-button small {
  display:block;
  color:var(--muted);
  font-weight:400;
  font-size:.76rem;
  margin:2px 0 5px
}
.lead-button .badge {
  font-size:.65rem;
  padding:2px 7px
}
.empty {
  padding:24px 14px;
  text-align:center;
  color:var(--muted);
  font-size:.86rem
}
.compose-panel>.empty {
  min-height:150px;
  display:grid;
  place-items:center
}
.evidence {
  padding:15px 17px;
  background:#f8fafb;
  border:1px solid #e3eaee;
  border-radius:9px;
  margin-bottom:20px
}
.evidence-heading {
  display:flex;
  align-items:start;
  justify-content:space-between;
  gap:14px
}
.evidence .events {
  max-height:180px;
  overflow:auto;
  padding:0;
  margin:10px 0 0;
  list-style:none
}
.event {
  border-top:1px solid #e2e8ec;
  padding:10px 0;
  font-size:.82rem
}
.event p {
  margin:3px 0
}
.event time {
  color:var(--muted);
  font-size:.73rem
}
.hold-reasons {
  font-size:.8rem;
  color:var(--amber);
  margin:8px 0
}
.mode-options {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px
}
.option {
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:13px;
  border:1px solid #d5dfe4;
  border-radius:9px;
  font-weight:400;
  margin:0
}
.option strong {
  display:block;
  font-size:.85rem
}
.option small {
  display:block;
  font-size:.74rem;
  color:var(--muted);
  font-weight:400;
  line-height:1.4;
  margin-top:4px
}
.option:has(input:checked) {
  border-color:#8bb39e;
  background:#f2f8f4
}
.checkbox-label {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px
}
.checkbox-label .fine {
  margin:0 0 0 auto
}
.action-editor {
  border:1px solid #dce5e9;
  border-radius:10px;
  padding:15px;
  margin:12px 0
}
.action-editor textarea {
  margin-top:2px
}
.field-footer {
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:.71rem;
  color:var(--muted);
  margin-top:5px
}
.draft-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  border-top:1px solid var(--line);
  padding-top:18px
}
.draft-footer p {
  max-width:370px;
  margin:0
}
.draft-footer button {
  flex-shrink:0
}
.technical {
  margin-top:15px
}
.queue-section {
  margin-top:36px
}
.queue-section>.section-heading {
  margin-bottom:9px
}
.plans {
  display:grid;
  gap:16px;
  margin-top:17px
}
.plan {
  background:white;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden
}
.plan.highlight {
  border-color:#6eaa8e;
  box-shadow:0 0 0 2px #e0efe7
}
.plan-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:15px;
  padding:18px 21px;
  border-bottom:1px solid #e7edef;
  background:#fbfcfd
}
.plan-heading p {
  margin:4px 0 0
}
.plan-title {
  display:flex;
  gap:9px;
  align-items:center;
  flex-wrap:wrap
}
.plan-controls {
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap
}
.plan-meta {
  padding:11px 21px;
  color:var(--muted);
  font-size:.76rem
}
.plan-action {
  padding:17px 21px;
  border-top:1px solid #e7edef
}
.action-heading {
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px
}
.exact-message {
  padding:13px 15px;
  border:1px solid #e1e8ec;
  background:#f8fafb;
  border-radius:8px;
  font-size:.89rem;
  line-height:1.65
}
.action-target {
  font-size:.76rem;
  margin:8px 0
}
.action-buttons {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:13px
}
.action-buttons button {
  font-size:.82rem;
  padding:7px 11px
}
.action-evidence {
  padding:10px 12px;
  border-left:3px solid #b7c9d2;
  background:#f5f8fa;
  margin-top:12px;
  font-size:.81rem
}
.action-evidence.good {
  border-color:#589875;
  background:#edf6f0
}
.action-evidence.warn {
  border-color:#c28b38;
  background:#fff8ea
}
.manual-copy {
  width:100%;
  min-height:85px;
  margin-top:10px
}
.result-data {
  font-family:ui-monospace,SFMono-Regular,monospace;
  font-size:.73rem;
  max-height:220px;
  overflow:auto;
  padding:10px;
  background:#f4f7f8;
  border-radius:7px
}
dialog {
  max-width:510px;
  width:calc(100vw - 32px);
  border:1px solid #c6d3da;
  border-radius:13px;
  padding:25px;
  box-shadow:0 18px 90px #152c3a36
}
dialog::backdrop {
  background:#142c3e65
}
dialog p {
  font-size:.88rem;
  color:var(--muted)
}
dialog button[type=submit] {
  margin-top:15px
}
dialog textarea {
  width:100%
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
[hidden] {
  display:none!important
}
@media(max-width:950px) {
  .work-grid {
    grid-template-columns:260px minmax(0,1fr)
  }
  .mode-options {
    grid-template-columns:1fr
  }
  .draft-footer {
    align-items:stretch;
    flex-direction:column;
    gap:12px
  }
  .plan-heading {
    flex-direction:column
  }
  .plan-controls {
    width:100%
  }
}
@media(max-width:700px) {
  main {
    padding:22px 14px 45px
  }
  .topbar {
    padding:0 18px;
    height:80px
  }
  .work-grid {
    grid-template-columns:1fr
  }
  .lead-list {
    max-height:250px
  }
  .workspace-heading {
    align-items:flex-start
  }
  .workspace-heading h2 {
    font-size:1.35rem
  }
  .workspace-heading p {
    font-size:.8rem
  }
  .configuration {
    gap:9px 18px
  }
  .compose-panel {
    padding:17px
  }
  .draft-footer button {
    width:100%
  }
  .mode-options {
    grid-template-columns:1fr 1fr
  }
  .login {
    padding:24px;
    margin:30px auto
  }
  .plan-heading,.plan-meta,.plan-action {
    padding-left:16px;
    padding-right:16px
  }
  .header-controls {
    gap:3px
  }
  .header-controls .badge {
    font-size:.65rem
  }
  .plan-controls button {
    font-size:.8rem
  }
  .action-buttons button {
    flex-grow:1
  }
}
@media(prefers-reduced-motion:no-preference) {
  button {
    transition:background .12s,border-color .12s
  }
}
.device-panel{padding:20px;margin:18px 0}.device-panel>summary{font-weight:650;cursor:pointer;margin-bottom:12px}.device-panel>p{margin-top:12px}.device-panel form{max-width:520px;margin-top:20px}.device-panel select{max-width:520px}.device-panel code{font-size:1.15rem;overflow-wrap:anywhere;letter-spacing:.04em}.device-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #e5e9e1}.device-row p{margin:4px 0}.device-panel #pair-result{margin-top:18px;padding:16px;background:#eef4e7;border-radius:8px}
.routing-panel { margin-bottom:18px }
.routing-modes { margin:20px 0 }
.routing-modes .mode-options { grid-template-columns:repeat(3,minmax(0,1fr)) }
.routing-fields { display:grid; grid-template-columns:1fr 1fr; gap:28px }
.routing-fields fieldset { margin:5px 0 }
.notification-preference { padding-top:7px }
.notification-preference .checkbox-label { align-items:flex-start }
.routing-panel .field { max-width:550px; margin:14px 0 }
.limit-fields { display:grid; grid-template-columns:repeat(2,minmax(0,200px)); gap:18px; margin:12px 0 }
.settings-footer { display:flex; justify-content:space-between; align-items:center; gap:22px; margin-top:18px; padding-top:18px; border-top:1px solid var(--line) }
.settings-footer>.fine { max-width:570px }
.settings-buttons { display:flex; gap:8px; flex-shrink:0 }
.prepare-tasks { display:flex; align-items:center; justify-content:space-between; gap:25px; margin-top:20px; padding:18px; border:1px solid var(--line); border-radius:9px; background:#f8fafb }
.prepare-tasks .checkbox-label { font-size:.8rem; font-weight:500; margin:12px 0 0 }
.prepare-tasks button { flex-shrink:0 }
.run-summary { margin-top:14px; padding:12px 15px; border-left:3px solid #9abdaa; background:#f2f8f4; font-size:.84rem }
.run-summary p:last-child { margin-bottom:0 }
.notifications-panel { margin-bottom:18px }
.notification-row { display:flex; gap:20px; align-items:center; justify-content:space-between; border-top:1px solid var(--line); padding:13px 0 }
.notification-row.read { color:var(--muted) }
.notification-content { min-width:0; overflow-wrap:anywhere; font-size:.85rem }
.notification-content p { margin:5px 0 0 }
.notification-actions { display:flex; align-items:center; gap:5px; flex-shrink:0 }
.notification-actions button { font-size:.78rem }
.outcome-report { margin:0 21px 17px; padding-top:12px; border-top:1px solid var(--line) }
.outcome-fields { display:grid; grid-template-columns:minmax(150px,1fr) minmax(200px,2fr) auto; gap:12px; align-items:end; margin-top:12px }
.outcome-fields label { font-size:.78rem }
.outcome-fields input,.outcome-fields select,.outcome-fields button { font-size:.82rem }
.task-attention { margin-top:17px; border-color:#e2cba4; background:#fffdf9 }
.attention-row { border-top:1px solid #ece3d6; padding:12px 0; font-size:.82rem }
.attention-row .technical { margin-top:4px }
.custom-plan>summary { font-weight:650; padding:12px 0; font-size:.9rem }
.custom-plan .work-grid { margin-top:10px }
@media(max-width:800px) {
  .routing-modes .mode-options { grid-template-columns:1fr }
  .settings-footer,.prepare-tasks { align-items:flex-start; flex-direction:column; gap:12px }
  .routing-fields { grid-template-columns:1fr; gap:16px }
  .notification-row { align-items:flex-start; flex-direction:column; gap:4px }
  .outcome-fields { grid-template-columns:1fr }
}
@media(max-width:420px) {
  .settings-buttons { flex-wrap:wrap }
  .limit-fields { grid-template-columns:1fr }
}

/* Account controls extend the existing workspace without changing its layout. */
.login input + label, #password-form input + label { margin-top:16px }
.header-controls { flex-wrap:wrap; justify-content:flex-end }
#connection { max-width:290px; overflow:hidden; text-overflow:ellipsis }
.team-panel { margin-bottom:22px }
.team-panel > summary { font-weight:650; font-size:.95rem }
.team-panel > p { margin-top:12px }
.team-panel > h3 { margin-top:25px }
.person-row { display:flex; align-items:center; justify-content:space-between; gap:20px; border-top:1px solid var(--line); padding:16px 0 }
.person-identity { min-width:180px; overflow-wrap:anywhere }
.person-identity p { margin:3px 0 6px }
.person-controls { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px }
.person-controls select { width:auto; min-width:140px }
.person-controls button, .person-controls select { font-size:.82rem }
.invite-fields { display:grid; grid-template-columns:1.4fr 1fr 1fr auto; gap:12px; align-items:end; margin-top:14px }
.invite-fields input, .invite-fields select, .invite-fields button { font-size:.85rem }
.dialog-actions { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin-top:18px }
.dialog-actions button[type=submit] { margin:0 }
#account-dialog, #reauth-dialog, #access-link-dialog { max-width:550px }
#access-link-value { font-family:ui-monospace,monospace; font-size:.8rem }
#password-form h3 { margin:22px 0 15px }
#copy-access-link { margin-top:12px }
@media(max-width:800px) {
  .invite-fields { grid-template-columns:1fr 1fr }
  .person-row { align-items:flex-start; flex-direction:column }
  .person-controls { justify-content:flex-start }
}
@media(max-width:540px) {
  .topbar { height:auto; min-height:91px; padding-top:16px; padding-bottom:16px; align-items:flex-start }
  #connection { max-width:170px }
  .header-controls { max-width:190px }
  .header-controls button { font-size:.75rem }
  .invite-fields { grid-template-columns:1fr }
}
