/* Opening */

.open {
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 40px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 56px;
  align-items: end;
}
.open .logo {
  display: block;
  width: 168px;
  height: auto;
  margin: 0 0 14px;
}
.open h1 {
  margin: 0;
  max-width: 24ch;
  color: var(--text-high);
  font-size: clamp(32px, 3.4vw, 50px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.open-action .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.open-action .note {
  margin: 8px 0 0;
  max-width: 38ch;
  color: var(--text-low);
  font-size: 13px;
  line-height: 1.5;
}

/* The simulation bar */

.sim {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}
.sim-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 0 4px 12px 16px;
}
.sim-tag {
  margin: 0 auto 0 0;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-low);
  font-size: 12px;
  font-weight: 500;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-high);
  font: 600 13px var(--font-sans);
  cursor: pointer;
}
.switch {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--border);
  transition: background-color 0.25s var(--ease-out);
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.25s var(--ease-out);
}
[aria-checked='true'] .switch {
  background: var(--brand);
}
[aria-checked='true'] .switch::after {
  transform: translateX(14px);
}
.ctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-high);
  font: 600 13px var(--font-sans);
  cursor: pointer;
}
.ctl:hover {
  background: var(--panel);
}
.ctl svg {
  width: 14px;
  height: 14px;
}

/* The stage: the customer's thread beside the kitchen */

.convo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  height: clamp(640px, calc(100vh - 250px), 700px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
}
.pane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  height: 46px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-high);
  font-size: 14px;
  font-weight: 700;
}
.pane-head small {
  color: var(--text-low);
  font-size: 12px;
  font-weight: 500;
}
.thread {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.msgs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding: 16px 20px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.msg {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0 12px;
  padding: 8px 0;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}
.avatar.cust {
  background: var(--panel);
  color: var(--text-high);
}
.avatar.team {
  background: var(--brand-soft);
  color: var(--brand-soft-fg);
}
.avatar.tammy {
  background: var(--bg);
  border: 1px solid var(--border);
}
.avatar.tammy img {
  width: 24px;
  height: 24px;
}
.who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-high);
  font-size: 14px;
  font-weight: 700;
}
.who time {
  color: var(--text-low);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.who em {
  padding: 0 6px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--text-low);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}
.body {
  max-width: 60ch;
}
.body p {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
.body ol {
  margin: 4px 0 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
.cite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--text-low);
  font-size: 13px;
  font-style: italic;
}
.cite svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-high);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.tool::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.hide-tools .tools {
  display: none;
}
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 8px 0 2px;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-low);
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.2s;
}
.typing i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

.kitchen {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}
.board {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cols {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 12px;
  min-height: 0;
  padding: 14px 18px;
  overflow: hidden auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.col-head b {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-high);
  font-size: 14px;
}
.col-head b em {
  color: var(--text-low);
  font-style: normal;
  font-weight: 500;
}
.col-head small {
  display: block;
  margin-top: 2px;
  color: var(--text-low);
  font-size: 12px;
}
.dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.dot.amber {
  background: var(--attention);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--attention-soft);
  color: var(--attention-fg);
  font-size: 12px;
  font-weight: 600;
}
.pill[hidden] {
  display: none;
}
.k {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.k.need {
  border-color: var(--attention-border);
}
.k-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: var(--attention-soft);
  color: var(--attention-fg);
  font-size: 12px;
  font-weight: 700;
}
.k-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 14px 12px;
}
.k-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.k-key {
  color: var(--text-low);
  font-family: var(--font-mono);
  font-size: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
}
.chip.bug {
  background: var(--error-soft);
  color: var(--error);
}
.chip.inv {
  background: var(--panel);
  color: var(--text);
}
.k-title {
  margin: 0;
  color: var(--text-high);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.k-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  line-height: 1.35;
}
.k-status.working {
  color: var(--brand-text);
  font-weight: 500;
}
.k-status.working .dot {
  animation: breathe 1.6s ease-in-out infinite;
}
.k-status.idle {
  color: var(--text-low);
}
.k-status.attn {
  color: var(--attention-fg);
  font-weight: 600;
}
.k-actions {
  display: flex;
  gap: 8px;
}
.fbtn {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-high);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.fbtn.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}
@keyframes breathe {
  50% {
    opacity: 0.35;
  }
}
.team {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.team .pane-head {
  height: 40px;
  font-size: 13px;
}
.team .msgs {
  height: 150px;
  flex: none;
  padding: 6px 18px 12px;
}
.team .msg {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0 10px;
  padding: 5px 0;
}
.team .avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}
.team .avatar.tammy img {
  width: 18px;
  height: 18px;
}
.team .who {
  font-size: 13px;
}
.team .body p {
  font-size: 13.5px;
}
.team code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-high);
}
.empty {
  margin: auto 0;
  color: var(--text-low);
  font-size: 13px;
  text-align: center;
}
.report {
  margin: 2px 0 0;
  padding: 9px 10px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: var(--raised);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}
.report b {
  display: block;
  margin-bottom: 4px;
  color: var(--text-high);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}
.report dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  margin: 0;
}
.report dt {
  color: var(--text-low);
}
.report dd {
  margin: 0;
}
.sim-after {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 48px;
  align-items: baseline;
  padding: 18px 16px 0;
}
.sim-lede {
  margin: 0;
  max-width: 68ch;
  color: var(--text-high);
  font-size: 18px;
  line-height: 1.55;
}
.sim-caption {
  margin: 0;
  max-width: 36ch;
  color: var(--text-low);
  font-size: 13px;
  line-height: 1.5;
}
.clear {
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}
.clear.show {
  opacity: 0.9;
}

/* Sections */

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.sec {
  padding-top: 112px;
}
.sec h2 {
  margin: 0 0 14px;
  max-width: 22ch;
  color: var(--text-high);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.sec .lede {
  margin: 0 0 40px;
  max-width: 62ch;
  font-size: 18px;
}
code {
  font-family: var(--font-mono);
}
.sec :not(pre) > code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--panel);
  color: var(--text-high);
  font-size: 0.86em;
}

.track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.track li {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--brand);
}
.track li::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--bg);
}
.track h3 {
  margin: 0 0 10px;
  color: var(--text-high);
  font-size: 19px;
  font-weight: 700;
}
.track p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px 72px;
  align-items: start;
}
.split .lede {
  margin-bottom: 0;
}
.nevers {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: never;
}
.nevers li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  color: var(--text-high);
  font-size: 18px;
  line-height: 1.5;
}
.nevers li:last-child {
  border-bottom: 1px solid var(--border);
}
.nevers li::before {
  content: '';
  width: 14px;
  height: 2px;
  margin-top: 13px;
  background: var(--brand);
}
.aside-note {
  margin: 20px 0 0;
  font-size: 15px;
}

.table-wrap {
  margin-top: 8px;
}
.table-wrap td:first-child code {
  white-space: nowrap;
}

.seats {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}
.seats div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.seats dt {
  color: var(--text-high);
  font-weight: 700;
}
.seats dt small {
  display: block;
  margin-top: 4px;
  color: var(--text-low);
  font-weight: 500;
}
.seats dd {
  margin: 0;
  font-size: 15px;
}

.close {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 40px 72px;
  align-items: start;
}
.links {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.links li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  font-size: 15px;
}
.links li:last-child {
  border-bottom: 1px solid var(--border);
}
.links a {
  font-weight: 600;
}
.close .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.close .need {
  margin: 0 0 16px;
  font-size: 15px;
}

@media (max-width: 1099px) {
  .split,
  .close,
  .sim-after {
    grid-template-columns: minmax(0, 1fr);
  }
  .track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 28px;
  }
}
@media (max-width: 899px) {
  .open {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .convo {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }
  .thread {
    height: 460px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .kitchen {
    height: auto;
  }
  .cols {
    min-height: 250px;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 639px) {
  .open {
    padding: 22px 16px 18px;
  }
  .open .logo {
    width: 132px;
  }
  .sim {
    padding: 0 8px;
  }
  .sim-bar {
    padding: 0 8px 10px;
  }
  .sim-tag {
    order: 9;
    margin: 0;
  }
  .msgs {
    padding: 12px 14px 16px;
  }
  .body p,
  .body ol {
    font-size: 14.5px;
  }
  .cols {
    padding: 12px 14px;
  }
  .team .msgs {
    height: 170px;
  }
  .wrap {
    padding: 0 16px;
  }
  .sec {
    padding-top: 80px;
  }
  .sec .lede,
  .sim-lede {
    font-size: 16px;
  }
  .track {
    grid-template-columns: minmax(0, 1fr);
  }
  .seats div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .nevers li {
    font-size: 16px;
  }
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
  }
  .table-wrap thead {
    display: none;
  }
  .table-wrap tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--divider);
  }
  .table-wrap tr:last-child {
    border-bottom: 0;
  }
  .table-wrap td {
    padding: 2px 0;
    border: 0;
  }
  .table-wrap td:last-child {
    color: var(--text-low);
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .typing i,
  .k-status.working .dot {
    animation: none;
  }
}
