:root {
  color-scheme: dark;
  --bg: #08101e;
  --panel: #111e32;
  --panel2: #15243b;
  --line: #26364e;
  --text: #edf3ff;
  --muted: #a6b5cc;
  --blue: #73aaff;
  --button: #2668d9;
  --green: #72dfb4;
  --danger: #ffb3b3;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
}
.gm-home {
  min-width: 0;
}
.gm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.gm-home .gm-grid > .panel {
  margin: 0;
}
.gm-intro {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 28px;
  background: linear-gradient(130deg, #163455, #112137);
  border: 1px solid #355475;
  border-radius: 14px;
}
.gm-intro h2 {
  margin-bottom: 10px;
}
.gm-status {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
  flex-shrink: 0;
}
.gm-scope {
  padding-left: 14px;
  border-left: 3px solid var(--blue);
}
.gm-items {
  display: grid;
  gap: 15px;
  min-width: 0;
}
.gm-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}
.gm-item > div {
  min-width: 0;
}
.gm-item button {
  flex-shrink: 0;
}
.gm-item h3,
.gm-brief-item h3 {
  margin-bottom: 7px;
}
.gm-brief-item {
  display: grid;
  gap: 8px;
}
.gm-brief-item + .gm-brief-item,
.gm-item + .gm-item {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.gm-brief-item .pill,
.gm-brief-item button {
  justify-self: start;
}
.gm-home p,
.gm-home h3,
.gm-home small,
.gm-home .pill {
  overflow-wrap: anywhere;
  white-space: normal;
}
.gm-help {
  font-weight: 400;
  font-size: 0.8rem;
}
.coach-work-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.coach-work-card {
  text-align: left;
  min-width: 0;
}
.coach-work-card > div {
  min-width: 0;
}
.coach-work-card strong,
.coach-work-card small,
.coach-detail p,
.coach-detail h3,
.coach-message p {
  overflow-wrap: anywhere;
  white-space: normal;
}
.coach-work-card > .pill {
  max-width: 220px;
  white-space: normal;
  flex-shrink: 0;
}
.coach-detail {
  min-width: 0;
}
.coach-requester {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.coach-audience {
  border-left: 3px solid var(--blue);
  padding: 12px 14px;
  background: #142a44;
  font-size: 0.9rem;
}
.coach-message {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1a2c;
  display: grid;
  gap: 9px;
  min-width: 0;
}
.coach-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.coach-message > .pill {
  justify-self: start;
}
.coach-private {
  padding: 16px;
  border: 1px solid #816bad;
  border-radius: 10px;
  background: #211e38;
}
.coach-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.coach-choices legend {
  padding: 0 8px;
  font-weight: 600;
}
.coach-choices label {
  align-items: start;
  min-width: 0;
  overflow-wrap: anywhere;
}
.coach-choices input[type="checkbox"] {
  flex-shrink: 0;
}
.coach-resource {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
}
.coach-resource summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 600;
}
.coach-resource p {
  padding: 10px 0;
  white-space: pre-wrap;
}
@media (max-width: 700px) {
  .coach-work-card {
    flex-direction: column;
    align-items: start;
  }
  .coach-work-card > .pill {
    max-width: 100%;
  }
  .coach-choices {
    grid-template-columns: minmax(0, 1fr);
  }
}
.gm-empty {
  padding: 8px 0;
}
.gm-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}
.gm-details summary {
  cursor: pointer;
  min-height: 44px;
  font-weight: 600;
  padding: 10px 0;
}
.gm-details summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.gm-details[open] summary {
  margin-bottom: 12px;
}
.gm-form .form-grid > label {
  min-width: 0;
}
@media (max-width: 1000px) {
  .gm-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .gm-intro {
    flex-direction: column;
  }
  .gm-status {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .gm-intro {
    padding: 20px;
  }
  .gm-panel > button {
    width: 100%;
  }
  .gm-item {
    flex-wrap: wrap;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 15px;
  background: var(--panel2);
  color: var(--text);
  font-weight: 600;
  min-height: 42px;
}
button:hover {
  border-color: var(--blue);
  background: #213654;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button.primary {
  background: var(--button);
  border-color: #4a88ec;
  color: white;
  box-shadow: 0 4px 20px #1766d922;
}
button.danger {
  color: var(--danger);
  border-color: #713b49;
}
button.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #354762;
  border-radius: 8px;
  background: #0c1728;
  color: var(--text);
  padding: 11px 12px;
  min-height: 44px;
  max-width: 100%;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
textarea {
  resize: vertical;
  min-height: 115px;
  line-height: 1.6;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--blue);
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cad7ec;
}
label.check {
  flex-direction: row;
  align-items: center;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -1px;
  font-weight: 650;
}
h2 {
  font-size: 1.35rem;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}
.eyebrow {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  color: var(--blue);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.brand strong {
  font-size: 18px;
  letter-spacing: 1.5px;
}
.brand strong > span {
  font-weight: 350;
  margin-left: 3px;
  color: #a7caff;
}
.brand-mark {
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -4px;
  color: white;
}
.brand-mark > span {
  font-size: 12px;
  color: #5799ff;
  letter-spacing: 0;
  margin-left: 2px;
}
.topbar {
  height: 86px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  background: #0b1526;
}
.workspace-picker {
  max-width: 280px;
}
.workspace-picker select {
  background: transparent;
}
.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 86px);
}
nav {
  border-right: 1px solid var(--line);
  padding: 26px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav button {
  text-align: left;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 0.87rem;
  white-space: nowrap;
}
nav button.active {
  color: white;
  background: #193557;
  border-color: #2c5180;
}
nav button[data-view="gm-work"] {
  white-space: normal;
}
nav button[data-view="gm-playbooks"] {
  white-space: normal;
}
.launch-page {
  max-width: 1000px;
  min-width: 0;
}
.launch-page p,
.launch-page h3,
.launch-page small {
  overflow-wrap: anywhere;
}
.launch-page button {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}
.launch-lead {
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--line);
}
.launch-lead h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin-bottom: 12px;
}
.launch-lead p {
  max-width: 70ch;
}
.launch-steps {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.launch-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
}
.launch-step.is-current {
  background: #102a45;
  border-color: #315b82;
}
.launch-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #193557;
  font-size: 0.85rem;
}
.launch-step-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.launch-step-title h3,
.launch-step p,
.launch-check p {
  margin: 0;
}
.launch-step .stack {
  gap: 8px;
  align-items: flex-start;
}
.launch-step button,
.launch-lead button {
  white-space: normal;
  text-align: left;
  max-width: 100%;
}
.launch-details {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.launch-details > summary {
  cursor: pointer;
  font-weight: 600;
}
.launch-details > .stack {
  margin-top: 18px;
}
.launch-check {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.launch-check:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.gm-operations {
  min-width: 0;
}
.gm-operations p,
.gm-operations h3,
.gm-operations li,
.gm-operations dd,
.gm-operations small {
  overflow-wrap: anywhere;
}
.gm-operation-tabs,
.gm-operation-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.gm-operation-summary {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.gm-playbook-grid,
.gm-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}
.gm-playbook,
.gm-measurement,
.gm-location {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
}
.gm-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  border-left: 3px solid var(--blue);
  background: #142a44;
}
.gm-evidence-grid dt {
  color: var(--muted);
  font-size: 0.82rem;
}
.gm-evidence-grid dd {
  margin: 8px 0 0;
  font-weight: 700;
  font-size: 1.3rem;
}
.gm-measured-value {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}
nav .nav-label {
  margin: 22px 12px 10px;
  color: #7186a4;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  font-weight: 750;
}
nav .nav-label:first-child {
  margin-top: 0;
}
.nav-foot {
  padding: 25px 12px 0;
  color: #7488a5;
  font-size: 0.73rem;
  line-height: 1.7;
}
main {
  padding: 36px 38px 70px;
  min-width: 0;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
  align-self: start;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading p.muted {
  margin-top: 12px;
  max-width: 760px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(140deg, #15273e, #101c2e);
  text-align: left;
}
.metric strong {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.metric span {
  font-size: 0.8rem;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
.connections-grid {
  align-items: start;
}
.connections-grid .pill {
  justify-self: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  min-width: 0;
}
.panel + .panel {
  margin-top: 18px;
}
.grid > .panel + .panel {
  margin-top: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.panel > p + .actions {
  margin-top: 16px;
}
.card-list {
  display: grid;
  gap: 10px;
}
.record-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  background: #122138;
  text-align: left;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  min-width: 0;
}
.record-card strong {
  display: block;
  font-size: 0.97rem;
  overflow-wrap: anywhere;
}
.record-card small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #355276;
  border-radius: 100px;
  background: #142b47;
  color: #b8d7ff;
  font-size: 0.69rem;
  white-space: nowrap;
  line-height: 1.3;
}
.pill.good {
  color: var(--green);
  border-color: #26624e;
  background: #12382d;
}
.pill.warn {
  color: #ffd796;
  border-color: #71532b;
  background: #352b1b;
}
.pill.bad {
  color: var(--danger);
  border-color: #713b49;
  background: #351e2a;
}
.empty {
  text-align: center;
  padding: 40px 22px;
  border: 1px dashed #334863;
  border-radius: 12px;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--text);
  margin-bottom: 9px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar input {
  flex: 1;
  min-width: 160px;
  max-width: 440px;
}
.toolbar .check {
  margin-left: auto;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.field-help {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.78rem;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 24px;
}
dialog {
  width: min(820px, calc(100vw - 28px));
  max-height: 92dvh;
  border: 1px solid #3e5578;
  border-radius: 18px;
  padding: 28px;
  background: #101e32;
  color: var(--text);
  box-shadow: 0 40px 160px #000b;
}
dialog::backdrop {
  background: #030813b3;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 1.6rem;
}
dialog .tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.details {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.timeline {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.timeline-item {
  border-left: 2px solid #355d8f;
  padding-left: 14px;
  overflow-wrap: anywhere;
}
.timeline-item .body {
  white-space: pre-wrap;
  font-size: 0.88rem;
  margin-top: 7px;
}
.timeline-item time {
  font-size: 0.73rem;
  color: var(--muted);
}
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.pipeline-column {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #0d1b2d;
}
.pipeline-column h3 {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.pipeline-column .record-card {
  margin-top: 10px;
  display: block;
}
.pipeline-column .pill {
  margin-top: 10px;
}
.stack {
  display: grid;
  gap: 18px;
}
.inline-form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.inline-form label {
  flex: 1;
  min-width: 160px;
}
.inline-form button {
  flex: none;
}
.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 16px;
  white-space: pre-wrap;
}
.success {
  color: var(--green);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #0c1728;
  padding: 16px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.6;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}
summary {
  cursor: pointer;
  font-weight: 650;
  color: #c5d9f6;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 200;
  padding: 10px;
  background: #172c4b;
}
.skip:focus {
  top: 10px;
}
#notice {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  max-width: min(600px, calc(100vw - 28px));
  width: max-content;
  padding: 13px 20px;
  background: #17364c;
  border: 1px solid #3e8a9e;
  border-radius: 12px;
  box-shadow: 0 10px 50px #0008;
  font-size: 0.9rem;
}
#notice.error {
  background: #42222e;
  border-color: #a05262;
  margin: 0;
}
.auth-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 100dvh;
}
.auth-brand {
  padding: 12vh 8vw;
  background:
    radial-gradient(ellipse at 25% 45%, #193d70, transparent 70%), #0b172b;
  position: relative;
  overflow: hidden;
}
.auth-brand > .eyebrow {
  margin-top: 80px;
}
.auth-brand h1 {
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -2.2px;
  margin-bottom: 28px;
}
.auth-brand > p:not(.eyebrow) {
  max-width: 420px;
  color: #b8c9e3;
}
.auth-lines {
  display: flex;
  gap: 20px;
  margin-top: 60px;
  opacity: 0.4;
}
.auth-lines span {
  height: 4px;
  background: linear-gradient(90deg, #73aaff, transparent);
  width: 70px;
}
.auth-lines span:nth-child(2) {
  width: 140px;
}
.auth-panel {
  padding: 12vh 7vw;
  display: flex;
  justify-content: center;
  flex-direction: column;
}
.auth-panel form {
  display: grid;
  gap: 22px;
  max-width: 400px;
  width: 100%;
}
.auth-panel form[hidden] {
  display: none;
}
.auth-panel h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.auth-panel button {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
}
.auth-panel .eyebrow {
  margin: 0;
}
.auth-panel > p {
  max-width: 400px;
}
.auth-panel form .muted {
  font-size: 0.8rem;
}
.auth-shell[hidden],
#workspace[hidden],
[hidden] {
  display: none !important;
}
.read-only {
  padding: 12px 16px;
  background: #152a43;
  border: 1px solid #2a4b71;
  border-radius: 8px;
  margin-bottom: 18px;
}
.reference-search {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.reference-search input {
  font-size: 0.8rem;
  min-height: 38px;
}
.reference-search button {
  min-height: 38px;
  font-size: 0.8rem;
  padding: 6px 10px;
}
@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  main {
    padding: 28px 22px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .grid > .panel + .panel {
    margin: 0;
  }
  .account > #account-name {
    display: none;
  }
  .auth-brand {
    padding: 10vh 6vw;
  }
  .auth-panel {
    padding: 10vh 5vw;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: auto;
    min-height: 76px;
    padding: 17px 16px;
    gap: 14px;
    flex-wrap: wrap;
  }
  .topbar .brand strong {
    font-size: 14px;
  }
  .workspace-picker {
    order: 3;
    max-width: none;
    width: 100%;
  }
  .account {
    gap: 0;
  }
  .layout {
    display: block;
  }
  nav {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  nav .nav-label,
  nav .nav-foot {
    display: none;
  }
  nav button {
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 8px 12px;
    min-height: 40px;
  }
  main {
    padding: 25px 16px 50px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    margin-bottom: 22px;
    gap: 16px;
  }
  .page-heading > .actions {
    width: 100%;
  }
  .page-heading > .actions button {
    flex: 1;
  }
  .metrics {
    gap: 9px;
  }
  .metric {
    padding: 17px;
  }
  .metric strong {
    font-size: 1.8rem;
  }
  .panel {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .record-card {
    gap: 10px;
    padding: 14px;
  }
  .record-card > .pill {
    max-width: 110px;
    white-space: normal;
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    padding: 35px 25px;
  }
  .auth-brand > .eyebrow {
    margin-top: 40px;
  }
  .auth-brand h1 {
    font-size: 2.8rem;
  }
  .auth-brand .auth-lines {
    display: none;
  }
  .auth-brand > p:not(.eyebrow) {
    font-size: 0.85rem;
  }
  .auth-panel {
    padding: 35px 25px 60px;
  }
  .auth-panel form {
    max-width: none;
  }
  dialog {
    padding: 20px;
    max-height: 94dvh;
  }
  .toolbar .check {
    margin-left: 0;
  }
  .pipeline-board {
    grid-template-columns: 1fr;
  }
  .form-footer button {
    flex: 1;
  }
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
  .inline-form button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 700px) {
  #notice {
    top: auto;
    bottom: 18px;
  }
}

/* Communications tools share the workspace design and remain usable on a phone. */
.place-call {
  font-size: 1rem;
  min-height: 54px;
  padding: 15px 24px !important;
  letter-spacing: 0.02em;
}
.communications-summary {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
}
.phone-number {
  font-size: 1.65rem;
  letter-spacing: 0.03em;
}
.pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.wrap {
  overflow-wrap: anywhere;
}
.transcript-line {
  padding: 12px;
  border-left: 3px solid var(--blue);
  background: var(--panel2);
  border-radius: 4px;
}
.live-strip {
  position: fixed;
  bottom: 16px;
  left: 280px;
  right: 24px;
  z-index: 30;
  background: #103b37;
  border: 1px solid var(--green);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px #0008;
}
.live-strip[hidden] {
  display: none;
}
.live-strip span {
  flex: 1;
}
.end-call {
  background: #622737 !important;
  color: #fff !important;
  font-size: 1rem;
  min-height: 52px;
}
@media (max-width: 800px) {
  .communications-summary {
    grid-template-columns: 1fr;
  }
  .live-strip {
    left: 12px;
    right: 12px;
    bottom: 10px;
    flex-wrap: wrap;
  }
  .live-strip span {
    flex-basis: 100%;
  }
  .place-call {
    width: 100%;
  }
}

/* Private assistant planning on desktop and phone. */
.assistant-home {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: start;
}
.assistant-card {
  width: 100%;
  overflow-wrap: anywhere;
}
.assistant-card time {
  font-size: 0.75rem;
  color: var(--muted);
}
.assistant-step {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.assistant-step h3 {
  margin: 0;
  font-size: 1rem;
}
.preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assistant-voice {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.assistant-voice small {
  flex-basis: 100%;
}
.assistant-message {
  padding: 14px;
  border-left: 3px solid var(--blue);
  margin: 12px 0;
  background: #10213a;
  border-radius: 8px;
}
.assistant-message.owner {
  border-color: var(--muted);
}
.notice-inline {
  padding: 14px;
  background: #273c58;
  border-radius: 10px;
  white-space: pre-wrap;
}
@media (max-width: 900px) {
  .assistant-home,
  .assistant-layout {
    grid-template-columns: 1fr;
  }
  .assistant-voice button {
    flex: 1;
    min-height: 48px;
  }
  .assistant-step .actions {
    flex-wrap: wrap;
  }
}

/* Marketing workspace */
.marketing .pill {
  justify-self: start;
}
.marketing-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.marketing-stats .panel {
  display: grid;
  gap: 8px;
}
.marketing-stats strong {
  font-size: 2rem;
  color: var(--accent, #75baff);
}
.marketing-accounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.marketing-accounts .panel {
  display: grid;
  gap: 7px;
}
.marketing-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}
.post-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.post-excerpt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 100px;
  overflow: hidden;
}
.social-preview {
  border: 1px solid var(--line, #334155);
  border-radius: 16px;
  padding: 22px;
  background: #101c31;
}
.media-preview {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  overflow-wrap: anywhere;
}
.media-preview img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
}
.marketing-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.calendar-weekday {
  font-size: 0.75rem;
  color: #a6b5ca;
  padding: 5px;
}
.calendar-day {
  min-height: 72px;
  padding: 7px;
  border: 1px solid #2c3e56;
  border-radius: 8px;
  min-width: 0;
}
.calendar-day.outside {
  opacity: 0.45;
}
.calendar-day > span {
  font-size: 0.8rem;
  color: #a6b5ca;
}
.calendar-post {
  display: block;
  width: 100%;
  padding: 4px;
  margin-top: 5px;
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
@media (max-width: 650px) {
  .marketing-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .marketing-post {
    grid-template-columns: 1fr;
  }
  .calendar-day {
    min-height: 56px;
    padding: 3px;
  }
  .marketing-calendar {
    gap: 2px;
  }
  .calendar-weekday {
    font-size: 0.65rem;
    padding: 1px;
  }
  .social-preview {
    padding: 14px;
  }
}
.marketing-stats > .panel + .panel,
.marketing-accounts > .panel + .panel {
  margin-top: 0;
}

.crm-mapping {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.crm-run {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border, #ddd);
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.table-wrap td {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .crm-mapping {
    grid-template-columns: 1fr;
  }
  .crm-run {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Store & Finances */
.finance-page {
  max-width: 1320px;
}
.finance-filters {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) repeat(4, minmax(115px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}
.finance-filters label {
  min-width: 0;
}
.finance-filters input,
.finance-filters select {
  width: 100%;
  min-width: 0;
}
.finance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
}
.finance-stat {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--line, #26364e);
  border-radius: 14px;
  background: var(--panel, #fff);
  min-width: 0;
}
.finance-stat strong {
  font-size: clamp(23px, 2.4vw, 32px);
  letter-spacing: -0.7px;
  overflow-wrap: anywhere;
}
.finance-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line, #26364e);
  padding-bottom: 12px;
}
.finance-tabs .active {
  background: #154ba5;
  color: #fff;
  border-color: #154ba5;
}
.finance-connect-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.finance-provider,
.finance-store {
  border: 1px solid var(--line, #26364e);
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
.finance-source {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr);
  gap: 10px;
}
.finance-source dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.finance-wrap {
  overflow-wrap: anywhere;
  white-space: normal;
  display: block;
}
.finance-page table,
.finance-work-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.finance-page th,
.finance-page td,
.finance-work-table th,
.finance-work-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.finance-report button.link {
  padding: 7px 0;
  background: transparent;
  border-color: transparent;
  color: var(--blue);
}
.finance-report button.link:hover {
  text-decoration: underline;
}
.finance-report th:last-child,
.finance-report td:last-child {
  text-align: right;
}
.finance-report td {
  white-space: normal;
}
.finance-report td:last-child {
  white-space: nowrap;
}
.finance-row-heading {
  font-weight: 650;
  background: var(--panel2);
}
.finance-row-total {
  font-weight: 700;
  border-top: 1px solid var(--line);
}
.finance-indent-1 {
  padding-left: 24px !important;
}
.finance-indent-2 {
  padding-left: 36px !important;
}
.finance-indent-3 {
  padding-left: 48px !important;
}
.finance-indent-4 {
  padding-left: 60px !important;
}
.finance-run {
  padding: 12px 0;
  border-bottom: 1px solid var(--line, #26364e);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.finance-run p {
  flex-basis: 100%;
  margin: 0;
}
.finance-finding {
  padding: 14px;
  border-left: 3px solid #427ed7;
  background: var(--panel2);
  border-radius: 8px;
}
.finance-finding li {
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.finance-attention {
  padding-left: 20px;
  margin: 0;
}
.finance-attention li {
  margin: 8px 0;
}
@media (max-width: 1100px) {
  .finance-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .finance-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finance-filters label:first-child {
    grid-column: 1/-1;
  }
  .finance-connect-grid {
    grid-template-columns: 1fr;
  }
  .finance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finance-stat {
    padding: 14px;
  }
  .finance-stat strong {
    font-size: 23px;
  }
  .finance-tabs button {
    flex: 1 1 40%;
  }
  .finance-source {
    grid-template-columns: 1fr;
  }
  .finance-source dd {
    margin-bottom: 8px;
  }
}

.finance-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.finance-form-grid label {
  min-width: 0;
}
.finance-form-grid input {
  width: 100%;
}
.finance-page .finance-tabs {
  flex-wrap: wrap;
}
@media (max-width: 520px) {
  .finance-form-grid {
    grid-template-columns: 1fr;
  }
}

.finance-work-wide {
  min-width: 720px;
}
.finance-case-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
}
.finance-case-filters label {
  flex: 1 1 260px;
  max-width: 520px;
}

/* The assistant is mounted once in the authenticated shell. */
.agent-bubble {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  background: #3178ef;
  color: white;
  border: 1px solid #6d9dff;
  box-shadow: 0 12px 42px #0006;
  border-radius: 30px;
  padding: 15px 24px;
  font-weight: 700;
}
.agent-window {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 81;
  width: 460px;
  height: 680px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 100px);
  min-width: 320px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  background: #101f35;
  border: 1px solid #395778;
  border-radius: 18px;
  box-shadow: 0 20px 80px #0009;
  resize: both;
  overflow: hidden;
  color: #edf4ff;
}
.agent-window[hidden],
.agent-bubble[hidden] {
  display: none;
}
.agent-window[data-mode="expanded"] {
  width: min(1000px, calc(100vw - 40px));
  height: calc(100dvh - 110px);
  resize: none;
}
.agent-window[data-mode="dock"] {
  right: 0;
  bottom: 0;
  height: calc(100dvh - 80px);
  border-radius: 16px 0 0 0;
  resize: none;
}
.agent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid #2b405b;
  background: #122945;
}
.agent-header strong {
  font-size: 20px;
}
.agent-header small {
  display: block;
  font-size: 11px;
  color: #adc2e0;
  margin-top: 3px;
}
.agent-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.agent-controls button {
  padding: 7px 10px;
  font-size: 12px;
}
.agent-controls label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.agent-controls input {
  width: auto;
}
.agent-context {
  font-size: 12px;
  padding: 8px 16px;
  margin: 0;
  background: #172b46;
  color: #bed0e9;
  overflow-wrap: anywhere;
}
.agent-history-menu {
  padding: 9px 16px;
  font-size: 12px;
  border-bottom: 1px solid #2b405b;
}
.agent-history {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 180px;
  overflow: auto;
  margin-top: 10px;
}
.agent-history button {
  text-align: left;
  font-size: 12px;
}
.agent-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.agent-body h3 {
  font-size: 16px;
}
.agent-body .panel {
  padding: 12px;
}
.agent-body .actions {
  flex-wrap: wrap;
}
.agent-body button {
  font-size: 12px;
}
.agent-body .grid {
  grid-template-columns: 1fr;
}
.agent-body pre {
  white-space: pre-wrap;
  word-break: break-word;
}
.agent-compose {
  padding: 12px 16px;
  border-top: 1px solid #2b405b;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #102039;
}
.agent-compose textarea {
  resize: vertical;
  min-height: 64px;
  max-height: 160px;
  width: 100%;
  font-size: 14px;
}
.agent-status {
  font-size: 11px;
  color: #b8cde9;
  margin: 0;
  min-height: 16px;
}
@media (min-width: 1100px) {
  body.agent-docked #main {
    margin-right: 460px;
  }
}
@media (max-width: 600px) {
  .agent-window,
  .agent-window[data-mode="dock"],
  .agent-window[data-mode="expanded"] {
    inset: auto 8px 8px;
    width: calc(100vw - 16px);
    height: calc(100dvh - 90px);
    max-width: none;
    max-height: calc(100dvh - 90px);
    min-width: 0;
    border-radius: 16px;
    resize: none;
  }
  .agent-header {
    padding: 12px;
  }
  .agent-bubble {
    right: 14px;
    bottom: 14px;
  }
  .agent-header small {
    display: none;
  }
  .agent-compose {
    padding: 10px;
  }
  .agent-body {
    padding: 12px;
  }
}
.agent-run-heading,
.agent-step-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.agent-pinned {
  font-size: 11px;
  border-bottom: 1px solid #2b405b;
  padding-bottom: 12px;
}
.agent-message {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  background: #152c45;
}
.agent-message.user {
  background: #233a5e;
  margin-left: 20px;
}
.agent-message small {
  color: #a9c8f2;
  font-weight: 600;
}
.agent-message p {
  white-space: pre-wrap;
  margin: 6px 0 0;
  line-height: 1.6;
}
.agent-step {
  border: 1px solid #38506b;
  padding: 12px;
  border-radius: 12px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agent-step-heading strong {
  font-size: 12px;
  line-height: 1.45;
}
.agent-step pre {
  font-size: 11px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  background: #0e1b2e;
  border-radius: 8px;
}
.agent-step summary {
  font-size: 12px;
  cursor: pointer;
  color: #b4d3ff;
}

/* Business phone onboarding uses the same focused review flow on every screen. */
.phone-setup {
  min-width: 0;
}
.phone-setup .panel + .panel {
  margin-top: 0;
}
.phone-setup p,
.phone-setup strong,
.phone-setup dd,
.phone-setup .pill {
  overflow-wrap: anywhere;
}
.phone-intro {
  padding: 22px;
  border: 1px solid #365777;
  background: linear-gradient(130deg, #163455, #112137);
  border-radius: 14px;
}
.phone-intro .phone-number {
  display: block;
  margin: 10px 0;
  letter-spacing: 0;
}
.phone-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.phone-choice {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 20px;
  text-align: left;
  background: var(--panel);
  border: 1px solid #355475;
}
.phone-choice:hover {
  border-color: var(--blue);
  background: #172b46;
}
.phone-choice strong {
  font-size: 1rem;
}
.phone-choice > .muted {
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 400;
}
.phone-choice-icon {
  color: var(--green);
  font-size: 1.5rem;
  line-height: 1;
}
.phone-details {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px 18px;
  margin: 0;
}
.phone-details dt {
  color: var(--muted);
}
.phone-details dd {
  margin: 0;
  min-width: 0;
}
.phone-price {
  color: var(--green);
  font-size: 1.7rem;
}
.phone-activity .pill {
  flex-shrink: 0;
  max-width: 45%;
  white-space: normal;
}
.phone-setup .check {
  align-items: flex-start;
  line-height: 1.5;
}
.phone-setup li {
  margin: 8px 0;
}
@media (max-width: 560px) {
  .phone-choices,
  .phone-details {
    grid-template-columns: minmax(0, 1fr);
  }
  .phone-details {
    gap: 5px;
  }
  .phone-details dd + dt {
    margin-top: 10px;
  }
  .phone-setup .panel,
  .phone-intro {
    padding: 17px;
  }
  .phone-activity {
    align-items: flex-start;
    flex-direction: column;
  }
  .phone-activity .pill {
    max-width: 100%;
  }
  .phone-setup .actions button {
    width: 100%;
  }
}
.phone-readiness {
  display: grid;
  gap: 13px;
}
.phone-readiness > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.phone-readiness small {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.phone-test-code {
  font-size: 1.7rem;
  color: var(--green);
  letter-spacing: 0.18em;
}
@media (max-width: 560px) {
  .phone-readiness > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}
@media (max-width: 700px) {
  #editor:has(> #editor-body > .phone-setup) .agent-bubble:not([hidden]) {
    position: static;
    display: block;
    margin: 20px 0 0 auto;
    width: fit-content;
  }
}
