html:has(.cp-demo) { scroll-padding-top: 82px; }
.cp-demo {
  --app-ink: #10384b;
  --app-muted: #46616b;
  --app-surface: #fff;
  --app-canvas: #eff3f2;
  --app-blue: #1268b3;
  --app-teal: #10635f;
  --app-line: #d2dedc;
  --mast-height: 62px;
  margin: 0;
  color: var(--app-ink);
  background: var(--app-canvas);
  font: 400 14px/1.55 var(--hn-font, system-ui, sans-serif);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.cp-demo *, .cp-demo ::before, .cp-demo ::after { box-sizing: border-box; }
.cp-demo [hidden] { display: none !important; }
.cp-demo a { color: inherit; }
.cp-demo button, .cp-demo select { font: inherit; }
.cp-demo button:not(:disabled), .cp-demo summary { cursor: pointer; }
.cp-demo button:disabled { opacity: .55; }
.cp-demo :focus-visible { outline: 2px solid var(--app-blue); outline-offset: 3px; }
.cp-demo :is(h1,h2,h3,h4,p,dl,dd,ol,ul) { margin: 0; }
.demo-skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 12;
  padding: 9px 14px;
  background: white;
  transform: translateY(-170%);
}
.demo-skip:focus { transform: none; }
.demo-mast {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--app-ink);
  color: #f6fbfb;
  border-block-end: 1px solid #315666;
}
.mast-inner {
  min-height: var(--mast-height);
  max-width: 1712px;
  margin-inline: auto;
  padding-inline: clamp(12px, 2.5vw, 32px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}
.demo-brand { display: flex; align-items: center; min-height: 44px; }
.demo-brand img { display: block; width: clamp(68px, 10vw, 112px); height: auto; }
.product-name {
  display: flex;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  min-height: 30px;
  padding-inline-start: clamp(10px, 2vw, 22px);
  border-inline-start: 1px solid #64828c;
  font-size: clamp(.75rem, 1.5vw, 1.0625rem);
  font-weight: 620;
  line-height: 1.4;
}
.product-name span { white-space: nowrap; }
.intro-return {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  font-size: .875rem;
  color: #def0f0 !important;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.intro-return:hover { color: white !important; }
.app-shell {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  max-width: 1712px;
  margin-inline: auto;
}
.module-sidebar {
  position: sticky;
  inset-block-start: var(--mast-height);
  align-self: start;
  min-height: calc(100dvh - var(--mast-height));
  max-height: calc(100dvh - var(--mast-height));
  overflow-y: auto;
  padding: 23px 13px 20px 16px;
  background: #fbfdfc;
  border-inline-end: 1px solid var(--app-line);
}
#module-toggle { display: none; }
.module-nav a {
  display: flex;
  align-items: center;
  min-height: 41px;
  border-inline-start: 3px solid transparent;
  padding: 7px 11px;
  color: #2b4f5d;
  text-decoration: none;
}
.module-nav a:hover { background: #edf5f5; }
.module-nav a[aria-current="page"] {
  border-color: var(--app-blue);
  color: #0f548d;
  background: #e4eef5;
  font-weight: 650;
}
.module-nav p {
  margin: 21px 0 3px;
  padding-inline: 14px;
  font-size: .75rem;
  color: var(--app-muted);
  font-weight: 620;
}
.module-nav .module-home { border-radius: 3px; }
.sample-context {
  margin: 23px 10px 0;
  padding-block-start: 13px;
  border-block-start: 1px solid var(--app-line);
  color: var(--app-muted);
  font-size: .8125rem;
}
.sample-context > span::before { content: ''; display: inline-block; background: var(--app-teal); border-radius: 50%; width: 7px; height: 7px; margin-inline-end: 7px; }
.sample-context p { margin-block: 3px; }
.demo-content { min-width: 0; display: grid; gap: 17px; align-content: start; padding: clamp(16px, 2.4vw, 34px); }
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 9px 24px;
  margin-block-end: 1px;
}
.workspace-heading h1 { font-size: clamp(1.55rem, 2.9vw, 2.15rem); letter-spacing: -.035em; line-height: 1.2; }
.workspace-heading h1:focus { outline: 0; box-shadow: none; }
.workspace-heading p { margin-block-start: 6px; color: var(--app-muted); }
.context-note {
  display: grid;
  gap: 1px;
  color: var(--app-muted);
  font-size: .76rem;
  text-align: end;
}
.context-note > span { font-weight: 630; color: var(--app-teal); }
.context-note time, .metric-value, .stage-index, .table-scroll td { font-variant-numeric: tabular-nums; }
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 147px), 1fr));
  gap: 10px;
}
.metrics > div {
  min-width: 0;
  border: 1px solid var(--app-line);
  border-top: 2px solid #5399b7;
  padding: 11px 13px 12px;
  border-radius: 4px;
  background: white;
}
.metrics > div:nth-child(even) { border-top-color: #76aaa2; }
.metrics dt { font-size: .825rem; color: var(--app-muted); font-weight: 600; }
.metric-value { margin-block: 3px 2px !important; font-size: clamp(1.3rem, 2.8vw, 1.85rem); font-weight: 690; letter-spacing: -.033em; line-height: 1.25; }
.metric-note { font-size: .75rem; color: var(--app-muted); }
.dashboard-columns, .equal-columns { display: grid; gap: 17px; }
.dashboard-columns { grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); }
.equal-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.panel {
  min-width: 0;
  padding: clamp(13px, 1.65vw, 22px);
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 5px;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-block-end: 12px;
}
.panel-head h2 { font-size: 1.04rem; line-height: 1.4; font-weight: 680; }
.minor-label { color: var(--app-teal); font-size: .75rem; }
.simulation-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.progress-board {
  --progress-line: #baccce;
  --stage-size: clamp(36px, 5.5vw, 48px);
  border: 1px solid var(--app-line);
  border-radius: 4px;
  padding: 12px;
  background: #f4f9f8;
}
.progress-meta { display: flex; justify-content: space-between; gap: 10px; margin-block-end: 7px; color: #245363; font-size: .8rem; font-weight: 650; }
.simulation-track { height: 4px; overflow: hidden; border-radius: 5px; background: #dfebe9; margin-block-end: 17px; }
.simulation-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #187d78, #1268b3);
  transition: width .34s ease-out;
}
.pipeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  list-style: none;
  padding: 0;
}
.pipeline li {
  display: grid;
  align-content: start;
  justify-items: center;
  position: relative;
  gap: 2px;
  padding: 0 1px 5px;
  text-align: center;
  color: var(--app-muted);
  font-size: .74rem;
}
.pipeline li strong { color: var(--app-ink); font-size: .79rem; line-height: 1.35; }
.stage-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--stage-size);
  height: var(--stage-size);
  margin-block-end: 5px;
  border-radius: 10px;
  border: 1px solid var(--progress-line);
  background: #fff;
  transition: background-color .24s, border-color .24s;
}
.stage-icon { font-size: clamp(18px, 5vw, 25px); line-height: 1; }
.stage--idle .stage-icon { filter: grayscale(.9); opacity: .65; }
.stage-index {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--progress-line);
  border-radius: 50%;
  background: #f4f9f8;
  color: #41616a;
  font-size: .7rem;
  font-weight: 680;
  line-height: 1.38;
}
.stage-marker .stage-index {
  position: absolute;
  inset: -6px auto auto -6px;
  width: auto;
  height: auto;
  min-width: 21px;
  padding: 0 4px;
  border-radius: 4px;
}
.stage--done .stage-marker, .stage--done .stage-index { background: #e1f1ec; border-color: #7eaba1; color: #13564e; }
.stage--active .stage-marker {
  background: #e5f2fb;
  border-color: #1268b3;
  box-shadow: 0 0 0 3px rgb(18 104 179 / .19);
  animation: flow-node-glow 1.25s ease-in-out infinite;
}
.stage--active .stage-marker::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid #238ab8;
  border-radius: inherit;
  pointer-events: none;
  animation: flow-node-ring 1.25s ease-out infinite;
}
.stage--active .stage-index { color: #fff; background: var(--app-blue); border-color: var(--app-blue); }
.stage-status {
  margin-block-start: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: .68rem;
  background: #eaf0ef;
}
.stage--done .stage-status { color: var(--app-teal); background: #e0f0e9; }
.stage--active .stage-status { color: #0d578e; background: #e1eff9; font-weight: 650; }
.stage-connector {
  position: absolute;
  inset-block-start: calc(var(--stage-size) / 2 - 1px);
  inset-inline-start: calc(50% + var(--stage-size) / 2 + 3px);
  inset-inline-end: calc(-50% + var(--stage-size) / 2 + 4px);
  height: 2px;
  border-radius: 2px;
  background: var(--progress-line);
  color: #92a9af;
  pointer-events: none;
  transition: background-color .24s, color .24s;
}
.stage-connector::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -1px;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}
.stage--done .stage-connector { background: #8ab8ae; color: #598f85; }
.stage--active .stage-connector, .stage--done:has(+ .stage--active) .stage-connector { background: #97c9dd; color: #196d9e; }
.stage-signal { position: absolute; inset: -2px 0; overflow: hidden; }
.stage--active .stage-signal::after, .stage--done:has(+ .stage--active) .stage-signal::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 60%;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, #1268b3 60%, #46a5cf);
  animation: flow-link-forward .95s linear infinite;
}
@keyframes flow-node-glow { 50% { box-shadow: 0 0 0 5px rgb(18 104 179 / .25); } }
@keyframes flow-node-ring { from { transform: scale(.98); opacity: .7; } to { transform: scale(1.29); opacity: 0; } }
@keyframes flow-link-forward { to { left: 100%; } }
.sim-log-wrap { border-block-start: 1px solid var(--app-line); margin-block-start: 12px; padding-block-start: 9px; }
.sim-log-wrap h3 { font-size: .77rem; color: var(--app-muted); margin-block-end: 5px; font-weight: 620; }
.sim-log {
  height: clamp(96px, 10vw, 124px);
  padding: 0;
  list-style: none;
  overflow: auto;
  overscroll-behavior: contain;
}
.sim-log li { display: flex; flex-wrap: wrap; gap: 0 9px; font-size: .77rem; padding: 3px 0; }
.sim-log li > span { color: var(--app-teal); font-weight: 660; white-space: nowrap; }
.sim-log li > p { color: var(--app-muted); }
.sim-log li[data-result="returned"] > span { color: #8a541e; }
.sim-log li[data-result="signed"] > span { color: #0f644f; }
.sim-log .log-arrival { animation: flow-log-arrival .32s ease-out both; }
@keyframes flow-log-arrival { from { transform: translateY(5px); opacity: 0; } to { transform: none; opacity: 1; } }
.key-values { display: grid; padding: 0; }
.key-values > div { display: grid; grid-template-columns: minmax(62px, .37fr) minmax(0, 1fr); align-items: baseline; gap: 10px; padding-block: 7px; border-block-end: 1px solid #e4ebeb; }
.key-values dt { color: var(--app-muted); font-size: .8rem; }
.action-row, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.action-row { margin-top: 12px; }
.primary-button, .secondary-button, .quiet-button {
  padding: 6px 11px;
  min-height: 36px;
  border: 1px solid transparent;
  background: none;
  color: var(--app-blue);
  font-size: .8125rem !important;
  font-weight: 640 !important;
  line-height: 1.3;
  border-radius: 3px;
  text-align: center;
}
.primary-button { color: #fff; background: var(--app-blue); border-color: var(--app-blue); }
.primary-button:hover:not(:disabled) { background: #0b548e; }
.secondary-button { color: var(--app-ink); border-color: #a8c0c5; background: #fcfdfd; }
.secondary-button:hover, .quiet-button:hover { background: #eaf4f5; }
.quiet-button { padding-inline: 4px; min-height: 30px; }
.work-link { color: #115c99 !important; text-decoration-color: #88aabc; text-underline-offset: 3px; }
.work-link:hover { color: var(--app-teal) !important; text-decoration-color: currentColor; }
.activity { list-style: none; padding: 0; }
.activity li { display: flex; gap: 12px; border-block-start: 1px solid #e4eeec; padding: 7px 0; }
.activity li > time { color: var(--app-muted); font-variant-numeric: tabular-nums; font-size: .8125rem; }
.activity li:last-child { padding-block-end: 0; }
.quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.quick-links .work-link { display: flex; align-items: center; min-height: 36px; padding-block: 4px; }
.quick-links .work-link::after { content: '↗'; margin-inline-start: 5px; color: #446e7a; }
.table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.panel :is(.table-scroll, .sub-disclosure) + :is(.table-scroll, .sub-disclosure) { margin-block-start: 9px; }
.table-scroll table { width: 100%; min-width: max(100%, 21rem); border-collapse: collapse; font-size: .8125rem; line-height: 1.5; }
.table-scroll th, .table-scroll td { text-align: start; padding: 8px 10px; border-block-end: 1px solid #e2ebea; vertical-align: top; overflow-wrap: anywhere; }
.table-scroll th { background: #edf4f4; white-space: nowrap; font-weight: 620; color: #294f5b; }
.table-scroll tr:last-child td { border-block-end: 0; }
.table-scroll tbody tr:nth-child(even) { background: #fafcfb; }
.table-scroll :is(th,td):first-child { padding-inline-start: 9px; }
.table-scroll .row-actions { flex-wrap: nowrap; }
.table-scroll .row-actions button { white-space: nowrap; }
.badge { display: inline-flex; min-width: max-content; border-radius: 3px; padding: 2px 7px; line-height: 1.5; font-size: .72rem; font-weight: 630; }
.badge--ok { background: #def1eb; color: #14584e; }
.badge--info { background: #e5eff8; color: #155886; }
.badge--wait { background: #f7edde; color: #754914; }
.badge--issue { background: #eef5f5; color: #0c538f; }
.badge--quiet { background: #edf1f0; color: #4b6570; }
.record-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.record-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record {
  min-width: 0;
  padding: clamp(11px, 1.65vw, 17px);
  border: 1px solid var(--app-line);
  background: #fcfefd;
  border-radius: 4px;
}
.record:target, .record:has(> details[open]) { border-color: #8eb4bf; background: #fff; }
.record h3 { font-size: 1rem; line-height: 1.4; }
.record > p { margin-block-start: 5px; color: var(--app-muted); }
.record-meta {
  color: var(--app-teal);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: .76rem;
  margin-block-end: 6px;
}
.record-data { color: var(--app-muted); margin-block: 7px 0; font-size: .8rem; }
.record details { margin-block-start: 9px; border-block-start: 1px solid #e4ebeb; }
.record summary, .sub-disclosure summary { padding: 8px 2px 3px; color: var(--app-blue); font-size: .86rem; font-weight: 630; }
.record details[open] summary { margin-block-end: 6px; }
.record details > .secondary-button { margin-block-start: 9px; }
.record :is(h4, .linked-assets) { margin-block: 12px 5px; }
.record h4 { font-size: .87rem; }
.linked-assets { color: var(--app-muted); font-size: .8rem; }
.tag-links { margin-block-start: 8px; display: flex; gap: 6px 12px; flex-wrap: wrap; }
.reading-block { padding: 10px; background: #f1f7f7; border-inline-start: 2px solid #82aaa7; margin: 8px 0; }
.reading-block h4 { margin-block-start: 0; }
.reading-block p + p { margin-block-start: 6px; }
.compare { display: grid; gap: 6px; }
.compare > div { background: #f8f1e9; padding: 9px; border-inline-start: 2px solid #bd834e; }
.compare > div + div { background: #eaf5f1; border-color: #589189; }
.compare strong { font-size: .78rem; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 12px; }
.filters button {
  min-height: 34px;
  padding: 4px 8px;
  background: #f4f8f8;
  border: 1px solid #c6d7d8;
  color: #305562;
  border-radius: 3px;
}
.filters button > span { font-size: .74em; margin-inline-start: 6px; }
.filters button:hover, .filters button[aria-pressed="true"] { background: #e3eff6; color: #104f81; border-color: #8cbbd5; }
.filters button[aria-pressed="true"] { font-weight: 650; }
.conversation { list-style: none; padding: 0; display: grid; gap: 7px; }
.conversation li { padding: 8px 10px; background: #f0f6f5; border-radius: 3px; }
.conversation li > span { color: var(--app-muted); font-size: .74rem; }
.conversation li > p { margin-block-start: 2px; }
.inquiry-card:has(> details[open]) { grid-column: 1 / -1; }
.inquiry-detail { display: grid; gap: 12px; }
.inquiry-assignment { padding: 9px 12px; background: #f6f9f8; align-self: start; }
.inquiry-assignment h4 { margin-block-start: 2px; }
.inquiry-assignment button { margin-block-start: 10px; }
@media (width >= 780px) {
  .inquiry-detail { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; }
}
.work-feedback {
  position: fixed;
  z-index: 9;
  inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) auto;
  max-width: calc(100% - 24px);
  pointer-events: none;
  padding: 9px 14px;
  background: var(--app-ink);
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgb(16 56 75 / .18);
  opacity: 0;
  transition: opacity .18s;
}
.work-feedback.is-visible { opacity: 1; }
.work-dialog {
  width: min(410px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 22px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  color: var(--app-ink);
}
.work-dialog::backdrop { background: rgb(16 56 75 / .52); }
.work-dialog h2 { font-size: 1.18rem; margin-block-end: 6px; }
.work-dialog p { color: var(--app-muted); }
.work-dialog label { display: block; margin-block: 12px 4px; }
.work-dialog select { border: 1px solid #9eb8bd; padding: 7px; width: 100%; min-height: 42px; font-size: 16px; background: #fff; color: var(--app-ink); }

@media (width < 1250px) {
  .pipeline { grid-template-columns: repeat(4,minmax(0, 1fr)); row-gap: 13px; }
  .pipeline li:nth-child(4) .stage-connector { display: none; }
}
@media (width < 1020px) {
  .dashboard-columns, .equal-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (width < 870px) {
  html:has(.cp-demo) { scroll-padding-top: 125px; }
  .cp-demo { --mast-height: 55px; }
  .intro-return { font-size: .76rem; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .module-sidebar {
    position: sticky;
    inset-block-start: var(--mast-height);
    min-height: 0;
    max-height: none;
    overflow: visible;
    align-self: start;
    padding: 6px 13px 5px;
    border-inline: 0;
    border-block-end: 1px solid var(--app-line);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0 10px;
    z-index: 5;
  }
  #module-toggle {
    border: 0;
    display: flex;
    gap: 5px;
    align-items: center;
    min-height: 44px;
    background: transparent;
    color: var(--app-ink);
    padding: 4px 6px;
  }
  #module-toggle strong { color: var(--app-blue); }
  #module-toggle::after { content: '⌄'; display: inline-block; font-size: 17px; padding-inline-start: 4px; }
  #module-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
  .module-nav {
    display: none;
    position: absolute;
    inset: calc(100% + 4px) auto auto 13px;
    width: min(360px, calc(100vw - 26px));
    max-height: calc(100dvh - 125px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 5px;
    box-shadow: 0 8px 27px rgb(16 56 75 / .2);
    padding: 8px;
  }
  .module-nav.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .module-nav > p, .module-nav .module-home { grid-column: 1 / -1; }
  .module-nav p { margin-block: 8px 0; }
  .module-nav a { min-height: 43px; }
  .sample-context { display: flex; justify-self: end; align-items: center; gap: 7px; margin: 0; padding: 0; border: 0; }
  .sample-context p { display: none; }
  .sample-context .quiet-button { min-height: 38px; }
  .context-note { text-align: start; }
}
@media (width < 620px) {
  .record-grid, .record-grid--two { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics > div:last-child:nth-child(odd) { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 9px; }
  .metrics > div:last-child:nth-child(odd) .metric-note { grid-row: 2; }
  .metrics > div:last-child:nth-child(odd) .metric-value { grid-area: 1 / 2 / span 2; }
  .demo-content { gap: 12px; padding: 14px 12px 22px; }
  .dashboard-columns, .equal-columns { gap: 12px; }
  .mast-inner { gap: 8px; }
  .demo-brand img { width: 72px; }
  .intro-return { gap: 3px; }
  .table-scroll table { font-size: .8rem; }
  .table-scroll th, .table-scroll td { padding: 7px 8px; }
}
@media (width < 380px) {
  .product-name { max-width: 8.2rem; }
  .sample-context > span { display: none; }
  .progress-board { padding-inline: 8px; }
}
@media (pointer: coarse) {
  .cp-demo :is(.quiet-button,.primary-button,.secondary-button,.filters button,.record summary) { min-height: 44px; }
  .record summary { align-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .stage--active .stage-marker, .sim-log .log-arrival { animation: none; }
  .stage--active .stage-marker::after, .stage-signal { display: none; }
  .stage-marker, .stage-connector, .simulation-track > span, .work-feedback { transition: none; }
}
