*, *:before, *:after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 15px/1.45 system-ui, -apple-system, Segoe UI, sans-serif;
  background: #f5f7fb;
  color: #152032;
  overflow-x: hidden;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.shell {
  width: min(1320px, 100% - 32px);
  max-width: 100%;
  margin: 0 auto 28px;
}

.panel, form {
  background: #fff;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(30, 45, 70, 0.08);
  min-width: 0;
}

h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

p {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.muted {
  color: #5b6778;
}

.eyebrow {
  margin: 0 0 6px;
  color: #175cff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.actions, .chips, .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #175cff;
  color: #fff;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.subtle {
  background: #eef4ff;
  color: #175cff;
}

.button.warning, button.warning {
  border: 1px solid #e4bd67;
  background: #fff1d6;
  color: #76510a;
}

.button.danger, button.danger {
  background: #c62828;
  color: #fff;
}

button[data-clean-restart-replay] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

html.clean-restart-replay-shift-held button[data-clean-restart-replay], button.clean-restart-replay-active, .clean-restart-replay-selected button.clean-restart-replay-active {
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.24);
  outline: 2px solid #c62828;
  outline-offset: 2px;
}

html.clean-restart-replay-shift-held button[data-clean-restart-replay]::after, button.clean-restart-replay-active::after {
  content: "Replay";
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.clean-restart-replay-hint {
  font-size: 12px;
  margin: 0 0 12px;
  color: #8a1f1f;
}

html.clean-restart-replay-shift-held .clean-restart-replay-hint {
  font-weight: 900;
  color: #c62828;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(30, 45, 70, 0.06);
}

.topbar-home {
  font-weight: 900;
  color: #152032;
  text-decoration: none;
}

.topbar-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #175cff;
  text-decoration: none;
  font-weight: 850;
}

.topbar span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.topbar form {
  display: inline-flex;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

label {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #c6cfdb;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

input[type=checkbox] {
  width: auto;
  padding: 0;
}

.login-form {
  width: min(430px, 100%);
  margin: clamp(32px, 10vh, 96px) auto 0;
}

.login-form .actions {
  margin-top: 4px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 16px;
  font-size: 14px;
  font-weight: 750;
  color: #334155;
  cursor: pointer;
}

.checkbox-row input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

textarea {
  min-height: 82px;
}

.prompt-editor {
  min-height: 320px;
  font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.prompt-addendum-editor {
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  background: #fbfcff;
  padding: 10px;
  margin: 10px 0;
}

.prompt-addendum-editor summary {
  cursor: pointer;
  color: #175cff;
  font-weight: 850;
}

.prompt-addendum-editor form {
  margin-top: 10px;
  box-shadow: none;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.check-line input {
  width: auto;
}

.permission-set {
  grid-column: 1/-1;
  display: grid;
  gap: 8px;
  border: 1px solid #c6cfdb;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}

.permission-set legend {
  font-weight: 900;
  color: #152032;
}

.permission-set small {
  display: block;
  font-weight: 650;
}

.notice {
  border-left: 4px solid #175cff;
  background: #eef4ff;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.notice-warning {
  border-left-color: #a15c00;
  background: #fff5df;
}

.error {
  border-left-color: #c62828;
  background: #fff0f0;
}

.proof-status-success {
  border-left-color: #16784a;
  background: #eefbf4;
}

.proof-status-warning {
  border-left-color: #a15c00;
  background: #fff5df;
}

.proof-status-info {
  border-left-color: #175cff;
  background: #eef4ff;
}

.proof-status-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: #334155;
  font-size: 12px;
}

.proof-status-list li {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.proof-status-list strong {
  min-width: 96px;
  color: #5b6778;
}

.proof-status-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.worker-activity-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #334155;
}

.worker-activity-list li {
  margin: 3px 0;
}

.app-bar {
  position: relative;
  z-index: 120;
  width: 100%;
  margin: 0 0 18px;
  border-bottom: 3px solid #00e80b;
  background: #292928;
  color: #fff;
}

.app-bar__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  width: min(1320px, 100% - 32px);
  margin: 0 auto;
}

.app-bar a,
.app-shell a {
  color: inherit;
  text-decoration: none;
}

.app-shell__primary,
.app-status,
.app-shell__project,
.app-shell__ops {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-weight: 950;
  color: #fff;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #00e80b;
  color: #152032;
  font-size: 13px;
  font-weight: 950;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9aa7b8;
}

.status-dot--success {
  background: #16784a;
}

.status-dot--warning {
  background: #c77d00;
}

.status-dot--danger {
  background: #c62828;
}

.app-shell__tickets,
.app-shell__route,
.app-shell__details > summary,
.app-shell__account > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.app-shell__tickets-current {
  border-bottom-color: #00e80b;
  border-radius: 0;
}

.app-status {
  justify-self: end;
  max-width: 100%;
  flex-wrap: nowrap;
}

.app-shell__ops,
.app-shell__main {
  flex-shrink: 0;
}

.app-shell__route {
  min-width: 0;
}

.app-shell__route > span {
  flex-shrink: 0;
}

.app-shell__project {
  justify-self: end;
  flex: 1 1 auto;
}

.test-routes,
.app-shell__routes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.app-shell__route small {
  display: inline;
  margin-left: 6px;
  max-width: min(18vw, 240px);
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  font-size: 11px;
  font-weight: 650;
  opacity: 0.78;
  white-space: nowrap;
}

.app-shell__route--inactive {
  color: #ffd28a;
}

.menu,
.app-shell__details,
.app-shell__account {
  position: relative;
  min-width: 0;
}

.menu > summary,
.app-shell__details > summary,
.app-shell__account > summary {
  cursor: pointer;
  list-style: none;
}

.menu > summary::-webkit-details-marker,
.app-shell__details > summary::-webkit-details-marker,
.app-shell__account > summary::-webkit-details-marker {
  display: none;
}

.menu[open] > summary,
.app-shell__details[open] > summary,
.app-shell__account[open] > summary {
  background: rgba(255, 255, 255, 0.12);
}

.status-summary {
  gap: 7px;
}

.app-shell__main-status {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
}

.app-shell .base-snapshot-status small {
  display: none;
}

.menu__surface,
.app-shell__popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(420px, 100vw - 32px);
  padding: 12px;
  border: 1px solid #cfd8e5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(30, 45, 70, 0.18);
  color: #152032;
}

.menu:not([open]) > .menu__surface,
.app-shell__details:not([open]) > .app-shell__popover,
.app-shell__account:not([open]) > .app-shell__popover {
  display: none;
}

.app-shell__main .app-shell__popover {
  right: auto;
  left: 0;
}

.app-shell__popover p {
  margin: 0;
}

.app-shell__ops {
  justify-self: end;
  margin-left: auto;
}

.app-shell__ops .usage-strip,
.app-shell__ops .commit-strip {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell__ops .usage-table {
  font-size: 12px;
}

.app-shell__ops .commit-list {
  max-height: 240px;
  overflow: auto;
}

.account-summary {
  width: 34px;
  padding: 0;
  border-color: #dbeafe;
  border-radius: 999px;
  background: #dbeafe;
  color: #143f99;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #dbeafe;
  color: #143f99;
  font-size: 12px;
  font-weight: 950;
}

.account-menu,
.app-shell__account-menu {
  gap: 7px;
  min-width: 240px;
  max-width: min(320px, 100vw - 20px);
  overflow-wrap: anywhere;
}

.account-menu > *,
.app-shell__account-menu > * {
  min-width: 0;
}

.app-shell__attestation {
  overflow-wrap: anywhere;
}

.app-shell__account-ops {
  display: none;
}

.mobile-menu-button,
.mobile-menu {
  display: none;
}

.mobile-menu-button {
  position: relative;
  color: #fff;
}

/* SYM-UX-SHELL-002; meta/requests/2026-08-14/SYM-REQ-MOBILE-NAV-DESKTOP-20260814.md */
.app-bar .mobile-menu-button.icon-button {
  display: none;
  color: #fff;
}

.account-menu a,
.app-shell__account-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: #175cff;
  font-weight: 850;
}

.account-menu form,
.app-shell__account-menu form {
  display: block;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (min-width: 961px) and (max-width: 1100px) {
  .app-bar__inner {
    gap: 8px;
  }
  .app-shell__primary, .app-status, .app-shell__project, .app-shell__ops {
    gap: 4px;
  }
  .app-shell__tickets, .app-shell__route, .app-shell__details > summary {
    padding-inline: 6px;
  }
}
@media (max-width: 960px) {
  .app-bar__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    width: calc(100% - 20px);
  }
  .app-shell__primary {
    gap: 6px;
  }
  .app-status {
    min-width: 0;
    justify-self: stretch;
  }
  .app-shell__project {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    width: 100%;
  }
  .app-status .app-shell__main {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .app-status .app-shell__main > summary {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
    overflow: hidden;
  }
  .app-shell__ops, .app-shell__account {
    display: none;
  }
  .app-bar .mobile-menu-button.icon-button {
    display: inline-flex;
    justify-self: end;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }
  .mobile-menu {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: #fff;
    color: #152032;
    padding: 8px 12px 12px;
  }
  .mobile-menu:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .mobile-menu > a, .mobile-menu > form > button, .mobile-menu__detail {
    min-height: 40px;
    border: 0;
    border-radius: 5px;
    background: #f1f3f6;
    color: #394656;
    padding: 9px 10px;
    text-align: left;
    text-decoration: none;
  }
  .mobile-menu > a, .mobile-menu > form > button {
    display: flex;
    align-items: center;
    font-weight: 760;
  }
  .mobile-menu > form {
    display: contents;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .mobile-menu__detail {
    padding: 0;
  }
  .mobile-menu__detail > summary {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    font-weight: 760;
    list-style: none;
  }
  .mobile-menu__detail > summary::-webkit-details-marker {
    display: none;
  }
  .mobile-menu__detail > div {
    display: grid;
    gap: 5px;
    border-top: 1px solid #d8dee6;
    padding: 8px 10px 10px;
    color: #586777;
    font-size: 0.78rem;
  }
  .mobile-menu__detail:not([open]) > div {
    display: none;
  }
  .mobile-menu__detail > div > span, .mobile-menu__detail > div > strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .test-routes, .app-shell__routes {
    min-width: 0;
    flex-wrap: nowrap;
    gap: 2px;
  }
  .test-routes > .muted, .app-shell__routes > .muted, .app-shell__tickets {
    display: none;
  }
  .brand__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .brand, .app-shell__tickets, .app-shell__details > summary, .app-shell__account > summary, .app-shell__main-status {
    min-height: 44px;
  }
  .app-shell__route {
    min-width: 0;
    min-height: 44px;
    padding-inline: 5px;
    font-size: 12px;
  }
  .app-shell__route small {
    display: none;
  }
  .app-shell__main-status {
    max-width: 100%;
    padding-inline: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    white-space: nowrap;
  }
  .app-shell__account {
    justify-self: end;
  }
  .app-shell .menu__surface, .app-shell .app-shell__popover {
    position: fixed;
    top: 58px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 80px);
    overflow: auto;
  }
  .app-shell__account-ops {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d9e0ea;
  }
  .app-shell__account-ops .app-shell__details {
    position: static;
  }
  .app-shell__account-ops .app-shell__details > summary {
    color: #152032;
  }
  .app-shell__account-ops .app-shell__popover {
    position: static;
    width: auto;
    max-height: 260px;
    box-shadow: none;
  }
  .mobile-menu__detail:has(.usage-reserve-note)[open] {
    grid-column: 1/-1;
  }
  .app-shell__account-ops .app-shell__usage .app-shell__popover:has(.usage-reserve-note) {
    max-height: none;
  }
}
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 14px;
}

.filters {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.filters label {
  min-width: 320px;
  margin: 0;
}

.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #cfd8e5;
  border-radius: 999px;
  background: #fff;
  color: #152032;
  text-decoration: none;
  font-weight: 800;
}

.chip.active {
  border-color: #175cff;
  color: #175cff;
  box-shadow: 0 0 0 3px rgba(23, 92, 255, 0.11);
}

.chip.disabled {
  opacity: 0.46;
  cursor: default;
}

.preview-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
  padding: 12px 14px;
  border: 1px solid #143f99;
  border-radius: 12px;
  background: #102b63;
  color: #fff;
  box-shadow: 0 12px 28px rgba(16, 43, 99, 0.18);
}

.preview-strip strong {
  margin-right: 2px;
}

.preview-route-list, .preview-strip [data-live-route-list] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-strip .muted {
  color: #d5def0;
}

.preview-strip a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fff;
  color: #175cff;
  padding: 7px 11px;
  text-decoration: none;
  font-weight: 850;
}

.preview-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ffdede;
  color: #7a0b0b;
  padding: 7px 11px;
  font-weight: 850;
}

.base-snapshot-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #145d2b;
  padding: 6px 10px;
  font-weight: 900;
  max-width: 100%;
  white-space: nowrap;
}

.base-snapshot-status small {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  font-size: 11px;
  font-weight: 750;
  opacity: 0.9;
}

.base-snapshot-status-building, .base-snapshot-status-checking, .base-snapshot-status-recovering, .base-snapshot-status-queued {
  background: #fff5d8;
  color: #76510a;
}

.base-snapshot-status-failed, .base-snapshot-status-missing, .base-snapshot-status-unknown {
  background: #ffdede;
  color: #7a0b0b;
}

.usage-strip, .commit-strip {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(30, 45, 70, 0.06);
}

.board-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 460px));
  justify-content: end;
  gap: 12px;
  margin-top: 18px;
}

.board-footer .usage-strip, .board-footer .commit-strip {
  width: auto;
  margin: 0;
}

.usage-head {
  display: flex;
  justify-content: space-between;
  gap: 4px 10px;
  align-items: center;
  flex-wrap: wrap;
}

.usage-head .muted {
  font-size: 11px;
}

.usage-current-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  flex-wrap: wrap;
}

.usage-current {
  font-size: 14px;
  padding: 5px 10px;
  gap: 7px;
}

.usage-current::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.usage-shutoff {
  font-size: 11px;
  color: #607089;
  white-space: nowrap;
}

.usage-shutoff .usage-reserve-number {
  font-size: 18px;
  color: #9d1c28;
}

.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.usage-table th, .usage-table td {
  padding: 8px 6px;
  border-top: 1px solid #eef2f8;
  text-align: right;
  white-space: nowrap;
}

.usage-table th:first-child, .usage-table td:first-child {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.usage-table thead th {
  font-size: 11px;
  color: #607089;
  font-weight: 750;
}

.usage-table thead small {
  font-size: 10px;
  font-weight: 600;
}

.usage-table tbody th {
  font-size: 12px;
  font-weight: 850;
  color: #152032;
}

.usage-table tbody td {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #176335;
  font-weight: 850;
}

.usage-cell {
  vertical-align: top;
}

.usage-cell > span {
  display: block;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -1px;
}

.usage-cell small {
  display: block;
  margin-top: 3px;
  color: #607089;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

.usage-cell--warn > span, .usage-cell--danger > span {
  color: var(--usage-cell-color, #9a3412);
}

.usage-cell--same > span {
  color: #607089;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0;
  white-space: normal;
}

.usage-cell--unknown > span {
  color: #607089;
  font-size: 20px;
  letter-spacing: 0;
}

.usage-table .usage-credit-row > td {
  padding: 0 6px 9px;
  border-top: 0;
  text-align: left;
  white-space: normal;
  font: 400 11px/1.5 ui-sans-serif, system-ui, sans-serif;
  color: #607089;
}

.usage-account-credits {
  display: grid;
  gap: 8px;
  padding: 8px 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.usage-balance-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.usage-balance-value {
  font: 750 18px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #263447;
  overflow-wrap: anywhere;
}

.usage-account-credits p {
  margin: 0;
}

.usage-credit-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.usage-credit-controls form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.usage-credit-controls .checkbox-row {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0;
  font-size: 12px;
  min-width: 0;
  flex: 1 1 180px;
}

.usage-credit-controls input[type=checkbox] {
  flex: 0 0 auto;
}

.usage-credit-controls button {
  font-size: 12px;
  padding: 5px 9px;
}

.usage-credit-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.usage-control-note, .usage-control-feedback {
  font-size: 11px;
  line-height: 1.4;
}

.usage-control-feedback[data-tone=error] {
  color: #9d1c28;
  font-weight: 700;
}

.usage-control-feedback[data-tone=success] {
  color: #176335;
  font-weight: 700;
}

.usage-credits > summary {
  cursor: pointer;
  overflow-wrap: anywhere;
}

.usage-credits > summary strong {
  color: #263447;
  font-weight: 700;
}

.usage-credits[open] > summary {
  margin-bottom: 7px;
}

.usage-credit-history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.usage-credit-history li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 8px;
  border-top: 1px solid #eef2f8;
  padding-top: 5px;
  overflow-wrap: anywhere;
}

.usage-credit-history small {
  flex-basis: 100%;
  font-size: 11px;
}

.usage-credit-history time {
  font-variant-numeric: tabular-nums;
}

.usage-credits p {
  margin: 7px 0 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.usage-reserve-note {
  display: grid;
  gap: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #263447;
}

.usage-reserve-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 9px 0;
  border-top: 1px solid #e5eaf1;
  min-width: 0;
}

.usage-reserve-row:last-child {
  padding-bottom: 2px;
}

.usage-reserve-row > strong {
  font-size: 12px;
}

.usage-reserve-state {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  color: #607089;
}

.usage-reserve-limit {
  grid-column: 1/-1;
  color: #607089;
  font-size: 11px;
}

.usage-reserve-number {
  font-size: 15px;
  font-weight: 850;
  color: #263447;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.usage-policy-details {
  border-top: 1px solid #e5eaf1;
  padding-top: 9px;
  font-size: 12px;
  color: #607089;
}

.usage-policy-details > summary {
  cursor: pointer;
  font-weight: 700;
  width: fit-content;
}

.usage-policy-details p {
  margin: 9px 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.usage-policy-details .provider-status-line {
  margin-top: 10px;
}

.usage-empty {
  color: #607089;
  font-size: 13px;
}

.usage-error-row td {
  font-family: inherit;
  font-size: 12px;
  color: #76510a;
  white-space: normal;
}

.provider-status-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 4px 10px;
  align-items: start;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
}

.provider-status-line > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.provider-status-line > [data-provider-codex], .provider-status-line > [data-provider-ninfer], .provider-status-line > [data-provider-shutdown] {
  font-weight: 850;
  color: #263447;
}

.provider-status-line[data-provider-status-stale="1"] > [data-provider-codex], .provider-status-line[data-provider-status-stale="1"] > [data-provider-ninfer] {
  color: #76510a;
}

.provider-status-line .muted {
  grid-column: 1/-1;
  color: #607089;
}

.commit-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}

.commit-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  border-top: 1px solid #eef2f8;
  padding: 4px 0;
  min-width: 0;
}

.commit-list code {
  font: 800 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #175cff;
}

.commit-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.commit-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5b6778;
}

.board-shell {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.board-shell[data-symfonish-branch-context] {
  --branch-accent-soft: color-mix(in srgb, var(--branch-accent,var(--accent)) 11%, var(--surface));
}

.board-shell[data-symfonish-branch-context][data-branch-default="0"] {
  border-top: var(--branch-rail-width) solid var(--branch-accent, var(--accent));
  border-left: var(--branch-rail-width) solid var(--branch-accent, var(--accent));
  border-radius: var(--radius-md) 0 0 0;
  background: linear-gradient(90deg, var(--branch-accent-soft), var(--surface) min(34vw, 420px));
  margin-bottom: var(--space-4);
  padding: var(--space-4);
}

.board-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  grid-template-areas: "breadcrumb breadcrumb" "context search" "intake intake";
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid #cfd8e5;
  min-width: 0;
}

.board-breadcrumb {
  grid-area: breadcrumb;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: #607089;
  font-size: 13px;
  font-weight: 800;
}

.board-breadcrumb a {
  color: #175cff;
  text-decoration: none;
}

.board-breadcrumb a:hover {
  text-decoration: underline;
}

.board-breadcrumb h1 {
  min-width: 0;
  margin: 0;
  color: #152032;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.board-command__context {
  grid-area: context;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.board-command > .board-command-search {
  grid-area: search;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.section-heading h2 {
  margin: 0 0 3px;
  font-size: 18px;
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  color: #607089;
  font-size: 12px;
}

.branch-switcher {
  position: relative;
  min-width: 0;
}

.branch-switcher > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 3px 10px;
  border: 1px solid #d8e0ea;
  border-left: 5px solid var(--branch-accent, #175cff);
  border-radius: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--branch-accent, #175cff) 10%, #fff), #fff 72%);
  cursor: pointer;
  list-style: none;
}

.branch-switcher > summary::-webkit-details-marker {
  display: none;
}

.branch-accent {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--branch-accent, #175cff), color-mix(in srgb, var(--branch-accent, #175cff) 54%, #fff));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.branch-switcher__text {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.branch-switcher__text small {
  font-size: 10px;
  color: #607089;
  text-transform: uppercase;
  font-weight: 900;
}

.branch-switcher__text strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.branch-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 25;
  display: grid;
  gap: 8px;
  width: min(320px, 100vw - 32px);
  padding: 10px;
  border: 1px solid #cfd8e5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(30, 45, 70, 0.18);
}

.branch-switcher:not([open]) .branch-switcher__menu {
  display: none;
}

.branch-switcher__list, .branch-switcher__manager {
  display: grid;
  gap: 6px;
}

.branch-switcher__list a, .branch-switcher__manager a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  color: #175cff;
  text-decoration: none;
  font-weight: 850;
}

.branch-switcher__option-label {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.08;
}

.branch-switcher__option-label strong, .branch-switcher__option-label code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branch-switcher__option-label code {
  color: #607089;
  font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.branch-switcher__counts {
  display: grid;
  gap: 2px;
  justify-items: end;
  margin-left: auto;
  color: #607089;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.15;
  text-align: right;
}

.branch-switcher__counts:empty {
  display: none;
}

.branch-switcher__counts-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.branch-switcher__counts-row em {
  font-style: normal;
  color: #8a97a8;
  font-weight: 700;
}

.branch-switcher__counts-row i {
  font-style: normal;
  color: #b6c1cf;
  font-weight: 700;
}

.branch-switcher > summary .branch-switcher__counts {
  margin-left: 2px;
  min-width: 0;
}

.branch-switcher > summary .branch-switcher__counts:empty {
  display: none;
}

.branch-switcher > summary .branch-switcher__counts-row:nth-child(2) {
  display: none;
}

.branch-switcher > summary .branch-switcher__counts-row em {
  display: none;
}

.branch-switcher__list a.is-active .branch-switcher__counts span {
  background: #e8f0ff;
  color: #175cff;
}

.branch-accent-all {
  background: linear-gradient(135deg, #175cff, #8b3fb2);
}

.branch-switcher__manager {
  border-top: 1px solid #eef2f8;
  padding-top: 8px;
  color: #607089;
  font-size: 12px;
}

.scope-switch {
  display: inline-flex;
  gap: 0;
  align-items: center;
  border: 1px solid #cfd8e5;
  border-radius: 999px;
  background: #fff;
  padding: 2px;
}

.scope-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 10px;
  color: #39485b;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.scope-switch a.is-active {
  background: #175cff;
  color: #fff;
}

.scope-switch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  border-radius: 999px;
  background: #eef2f8;
  color: inherit;
  font-size: 11px;
  font-weight: 950;
}

.scope-switch a.is-active span {
  background: rgba(255, 255, 255, 0.24);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #cfd8e5;
  border-radius: 999px;
  background: #fff;
  padding: 0 10px;
  min-width: 0;
}

.search-field:focus-within {
  border-color: #175cff;
  box-shadow: 0 0 0 3px rgba(23, 92, 255, 0.12);
}

.search-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font: inherit;
}

.search-field input:focus {
  outline: 0;
}

.search-field kbd {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 6px;
  background: #eef2f8;
  color: #607089;
  padding: 0 6px;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.board-search-status {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 190px;
  color: #607089;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-search-status:not(.is-active) {
  display: none;
}

.board-command-search[data-search-state=loading] {
  border-color: #7aa2ff;
}

.board-command-search[data-search-state=error] {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.1);
}

.board-command-search[data-search-state=error] .board-search-status {
  color: #b3261e;
}

.board-reset-view {
  flex: 0 0 auto;
  white-space: nowrap;
  text-decoration: none;
}

.new-ticket-band {
  grid-area: intake;
  grid-column: 1/-1;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px 0 0;
}

.new-ticket-band[hidden] {
  display: none;
}

.new-ticket-band__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.new-ticket-band__heading h2 {
  margin: 0 0 3px;
  font-size: 18px;
  line-height: 1.15;
}

.new-ticket-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
  margin-top: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.new-ticket-form label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #394656;
  font-size: 0.84rem;
  font-weight: 650;
}

.new-ticket-form textarea {
  min-height: 96px;
}

.field--wide {
  grid-column: 1/-1;
}

.file-field {
  display: grid;
  gap: 6px;
  align-self: start;
  min-width: 0;
}

.branch-fixed {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-block: 1px solid #d9e0ea;
  border-left: 4px solid var(--branch-accent, #175cff);
  padding: 9px 0 9px 9px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--branch-accent, #175cff) 9%, transparent), transparent 80%);
}

.branch-fixed > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.branch-fixed small, .branch-fixed em {
  color: #607089;
  font-size: 0.72rem;
  font-style: normal;
}

.branch-fixed strong {
  overflow-wrap: anywhere;
}

.new-ticket-form .agent-model-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.new-ticket-form .agent-model-select label {
  margin: 0;
}

.new-ticket-form .agent-model-select select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-create {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr auto;
  gap: 16px;
  align-items: end;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.quick-create h2 {
  margin: 0 0 4px;
}

.quick-create label {
  margin: 0;
}

.quick-create .form-grid {
  display: grid;
  grid-template-columns: 1.4fr 180px 1.1fr;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.quick-create .span-2 {
  grid-column: 1/-1;
}

.quick-create .agent-model-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.quick-create select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-create textarea {
  min-height: 54px;
}

.branch-manage-disclosure {
  position: relative;
}

.branch-manage-disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #175cff;
  border-radius: 9px;
  background: #175cff;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  list-style: none;
}

.branch-manage-disclosure > summary::-webkit-details-marker {
  display: none;
}

.branch-manage-disclosure[open] > summary {
  background: #0f47d0;
}

.branch-manage-disclosure .quick-create {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: min(680px, 86vw);
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 18px 40px rgba(21, 32, 50, 0.16);
  grid-template-columns: 1fr;
}

.branch-create-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.branch-create-form label {
  min-width: 0;
}

.branch-create-form select {
  width: 100%;
  min-width: 0;
}

.branch-source-notes {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.branch-source-notes ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (max-width: 680px) {
  .branch-create-form .form-grid {
    grid-template-columns: 1fr;
  }
}
.file-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid #cfd8e5;
  border-radius: 999px;
  background: #fff;
  padding: 0 10px;
  cursor: pointer;
  max-width: 100%;
}

.file-control input {
  max-width: 180px;
  min-width: 0;
  font: inherit;
}

.board-notice {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  color: #39485b;
  font-size: 0.86rem;
}

.board-notice--warning {
  border-bottom: 1px solid #dfbf73;
  color: #74501a;
}

.board-notice--danger {
  border-bottom: 1px solid #e7a8ae;
  color: #8c2730;
}

.board-notice > span:nth-child(2) {
  min-width: 0;
}

.board-notice strong {
  font-weight: 850;
}

.board-notice .worker-activity-list {
  display: flex;
  min-width: 0;
  gap: 8px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  color: inherit;
  font-size: 0.78rem;
  overflow: hidden;
}

.board-notice .worker-activity-list li {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-list-controls {
  display: contents;
}

.lane-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  margin: 0 0 12px;
  border: 1px solid #cfd8e5;
  border-radius: 999px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.lane-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #39485b;
  text-decoration: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 850;
  min-width: 0;
}

.lane-tab + .lane-tab {
  border-left: 1px solid #e2e8f0;
}

.lane-tab:hover {
  background: rgba(23, 92, 255, 0.06);
}

.lane-tab.active, .lane-tab.is-active {
  color: #143f99;
  background: #e8f0ff;
  box-shadow: inset 0 -2px 0 #175cff;
}

.lane-tab-waiting_user.active, .lane-tab-waiting_user.is-active {
  color: #176335;
  background: #eaf7ee;
  box-shadow: inset 0 -2px 0 #176335;
}

.lane-tab-working.active, .lane-tab-working.is-active {
  color: #76510a;
  background: #fff1d6;
  box-shadow: inset 0 -2px 0 #a15c00;
}

.lane-tab-label, .lane-tab-short {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-tab-short {
  display: none;
}

.lane-tab small {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #607089;
  font-size: 11px;
  font-weight: 650;
}

.lane-tab-count {
  grid-column: 2;
  grid-row: 1/3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  background: #e7ebf0;
  color: inherit;
  font-size: 11px;
  font-weight: 950;
  flex: 0 0 auto;
}

.lane-tab.active .lane-tab-count, .lane-tab.is-active .lane-tab-count {
  background: #fff;
}

.lane-detail {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ticket-list-section {
  min-width: 0;
}

.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 0 0 8px;
  min-width: 0;
}

.list-heading h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.list-heading h2 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  background: #eef2f8;
  color: #39485b;
  font-size: 12px;
  font-weight: 950;
}

.list-heading p {
  margin: 3px 0 0;
  color: #607089;
  font-size: 12px;
  font-weight: 750;
}

.status-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.status-filters .chip {
  font-size: 12px;
  padding: 4px 8px;
  min-height: 30px;
}

.status-filters .chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 18px;
  border-radius: 999px;
  background: #eef2f8;
  color: inherit;
  font-size: 11px;
}

.ticket-list {
  display: grid;
  gap: 0;
  min-width: 0;
  border-top: 1px solid #cfd8e5;
}

.ticket-row {
  display: grid;
  grid-template-columns: 3px minmax(14rem, 1fr) minmax(150px, 0.28fr);
  grid-template-areas: "rail identity state" "rail identity meta";
  gap: 4px 14px;
  align-items: center;
  min-height: 62px;
  border: 0;
  border-bottom: 1px solid #d9e0ea;
  border-radius: 0;
  padding: 8px 8px 8px 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.ticket-row:hover {
  background: #fff;
}

.ticket-row__rail {
  grid-area: rail;
  align-self: stretch;
  border-radius: 999px;
  background: #cdd6e3;
}

.ticket-row__rail--review {
  background: #8f5fff;
}

.ticket-row__rail--danger {
  background: #c62828;
}

.ticket-row__rail--active {
  background: #175cff;
}

.ticket-row__rail--warning {
  background: #a15c00;
}

.ticket-row__rail--success {
  background: #16784a;
}

.ticket-row__identity, .ticket-row__state, .ticket-row__meta {
  min-width: 0;
}

.ticket-row__identity {
  grid-area: identity;
  align-self: center;
}

.ticket-row__identity > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 3px 8px;
  min-width: 0;
}

.ticket-row__identity strong {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  color: #152032;
  font-weight: 850;
}

.ticket-row__identity code {
  font: 850 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #175cff;
  flex: 0 0 auto;
}

.ticket-description {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 3px 0 0;
  color: #5b6778;
  font-size: 12px;
  line-height: 1.35;
}

.ticket-search-snippet {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  margin: 3px 0 0;
  color: #405066;
  font-size: 13px;
}

.ticket-search-snippet [data-icon] {
  flex: 0 0 auto;
}

.ticket-search-snippet strong {
  flex: 0 0 auto;
  color: #175cff;
  font-size: 12px;
}

.ticket-search-snippet span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-row__state {
  grid-area: state;
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
  min-width: 0;
}

.ticket-row__state small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  color: #607089;
  font-size: 11px;
  font-weight: 750;
}

.ticket-row__meta {
  grid-area: meta;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.ticket-row__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  border-radius: 999px;
  background: transparent;
  color: #5b6778;
  padding: 2px 0;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-row__meta svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.ticket-row__meta .branch-marker-row {
  max-width: 170px;
  padding: 3px 7px;
  background: #fff;
}

.ticket-row__meta .ownership-chip-mine {
  padding: 3px 7px;
  background: #e8f0ff;
  color: #175cff;
}

.ticket-row__meta .ownership-chip-other {
  padding: 3px 7px;
  background: #f1f4f8;
  color: #6b7280;
}

.ticket-row__meta .merge-queue:not(:empty) {
  padding: 3px 7px;
  background: #fff1d6;
  color: #76510a;
}

.ticket-row__meta .ticket-preview-badge:not(:empty) {
  padding: 3px 7px;
  background: #e8f0ff;
  color: #175cff;
}

.ticket-row__meta .changes:not(:empty) {
  padding: 3px 7px;
  color: #176335;
  background: #eaf7ee;
}

.changes {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.changes ins {
  color: #176335;
  text-decoration: none;
  font-weight: 900;
}

.changes del {
  color: #9b1c1c;
  text-decoration: none;
  font-weight: 900;
}

.changes em {
  font-style: normal;
  color: #5b6778;
}

.execution-profile-active {
  color: #175cff !important;
  background: #e8f0ff !important;
}

.execution-profile-neutral {
  color: #5b6778 !important;
  background: #eef2f8 !important;
}

.ticket-row__meta .execution-profile {
  max-width: min(100%, 260px);
}

.ticket-row__meta .ticket-preview-badge:empty, .ticket-row__meta .merge-queue:empty, .ticket-row__meta .changes:empty {
  display: none;
}

.list-footer, .board-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 0;
  color: #5b6778;
  font-size: 12px;
}

.pagination-summary, .pagination-pages {
  font-weight: 800;
}

.pagination-actions {
  display: inline-flex;
  gap: 5px;
}

.pagination-actions .chip {
  font-size: 12px;
  padding: 4px 8px;
  min-height: 30px;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 160px;
  color: #607089;
  text-align: center;
}

.empty-state strong {
  color: #152032;
}

.empty-state p {
  margin: 0;
}

.branch-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #d9e0ea;
  border-left: 5px solid var(--branch-accent, #175cff);
  border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--branch-accent, #175cff) 10%, #fff), #fff 78%);
  color: #263447;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  vertical-align: middle;
  flex-wrap: wrap;
}

.branch-marker__dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: var(--branch-accent, #175cff);
}

.branch-marker__label, .branch-marker__key {
  min-width: 0;
  overflow-wrap: anywhere;
}

.branch-marker__key {
  color: #607089;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.branch-marker-board {
  max-width: 220px;
}

.branch-marker-row {
  background: #fff;
  max-width: 170px;
}

.branch-board-list {
  max-width: 960px;
  margin: 0 auto;
}

.branch-board-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.branch-board-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  border: 1px solid var(--line);
  border-left: var(--branch-rail-width) solid var(--branch-accent, var(--accent));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--branch-accent, var(--accent)) 5%, var(--surface));
  color: var(--ink);
  padding: var(--space-4);
  min-width: 0;
}

.branch-board-item:hover {
  border-color: var(--branch-accent, #175cff);
  box-shadow: 0 8px 20px rgba(23, 92, 255, 0.1);
}

.branch-board-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  color: #152032;
  text-decoration: none;
  min-width: 0;
}

.branch-board-card .branch-marker {
  grid-column: 1/-1;
  justify-self: start;
  max-width: 100%;
}

.branch-board-card > span {
  color: #607089;
  font-size: 12px;
  font-weight: 850;
}

.branch-board-card > strong {
  font-size: 22px;
  color: #152032;
  line-height: 1;
}

.branch-board-card > small {
  grid-column: 1/-1;
  color: #607089;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.branch-board-action {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
  width: 100%;
  font-size: 12px;
}

.branch-board-action p {
  margin: 0;
  max-width: 62ch;
  overflow-wrap: anywhere;
}

.branch-board-action label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.branch-board-action label input:not([type=checkbox]) {
  flex: 1 1 140px;
  min-width: 0;
  width: 100%;
}

.branch-board-action label input[type=checkbox] {
  flex: 0 0 auto;
  margin-top: 2px;
}

.branch-board-action button {
  justify-self: start;
  white-space: nowrap;
}

.branch-management-page .branch-board-cards {
  grid-template-columns: minmax(0, 1fr);
}

.branch-management-page .branch-board-item {
  padding: var(--space-3) var(--space-4);
}

.branch-settings-page {
  border-left: var(--branch-rail-width) solid var(--branch-accent, var(--accent));
  background: linear-gradient(90deg, color-mix(in srgb, var(--branch-accent, var(--accent)) 8%, var(--surface)), var(--surface) min(34vw, 420px));
}

.branch-management-page .branch-board-card {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.branch-management-page .branch-board-card .branch-marker, .branch-management-page .branch-board-card > small {
  grid-column: auto;
}

.branch-management-page .branch-board-card > .branch-creation-origin {
  grid-column: 1/-1;
}

.branch-management-page .branch-board-card .branch-marker {
  width: auto;
  max-width: min(60%, 420px);
  flex-wrap: nowrap;
}

.branch-management-page .branch-board-card .branch-marker__label, .branch-management-page .branch-board-card .branch-marker__key {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branch-management-page .branch-board-card .branch-marker__label {
  flex: 0 1 auto;
  font-size: 13px;
}

.branch-management-page .branch-board-card .branch-marker__key {
  flex: 0 1 auto;
  max-width: min(40%, 200px);
}

.branch-management-page .branch-board-card > strong {
  font-size: 16px;
}

.branch-management-page .branch-board-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.branch-management-page .branch-board-item .branch-board-actions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.branch-management-page .branch-board-item .branch-board-card {
  grid-column: 1;
  grid-row: 1;
}

.branch-board-settings {
  grid-column: 1/-1;
  min-width: 0;
  border-top: 1px solid #eef2f8;
  padding-top: 7px;
}

.branch-board-settings > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: #175cff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.branch-board-settings > summary::-webkit-details-marker {
  display: none;
}

.branch-board-settings > summary svg {
  width: 15px;
  height: 15px;
}

.branch-board-settings .branch-backend-form {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(200px, 280px) minmax(0, 1fr);
  gap: 12px 18px;
  align-items: end;
  margin-top: 7px;
  padding-top: 10px;
  border-top: 1px solid #eef2f8;
}

.branch-board-settings .branch-backend-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
}

.branch-board-settings .branch-backend-form > .model-policy {
  grid-column: 1/-1;
  margin-top: 2px;
}

.branch-board-settings .branch-backend-form > .form-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.branch-color-control span {
  display: grid;
  grid-template-columns: var(--control-size) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
}

.branch-color-control input[type=color] {
  width: var(--control-size);
  height: var(--control-size);
  padding: var(--space-1);
}

.branch-color-control code {
  overflow: hidden;
  color: #516070;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branch-board-item > .branch-backend-form {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.branch-board-item > .branch-backend-form select {
  flex: 1 1 160px;
  min-width: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1120px) {
  .board-command {
    grid-template-columns: 1fr;
    grid-template-areas: "breadcrumb" "context" "search" "intake";
  }
  .board-command__context {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }
  .board-command__context > .branch-switcher {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }
  .board-command__context > .scope-switch {
    grid-column: 1/-1;
    grid-row: 2;
    min-width: 0;
  }
  .board-command__context > [data-new-ticket-toggle] {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .quick-create {
    grid-template-columns: 1fr;
  }
  .quick-create .form-grid {
    grid-template-columns: 1fr 180px;
  }
  .ticket-row {
    grid-template-columns: 3px minmax(12rem, 1fr) minmax(140px, 0.34fr);
  }
  .ticket-row__meta {
    grid-column: 2/-1;
    justify-content: flex-start;
  }
}
@media (max-width: 960px) {
  .ticket-row {
    grid-template-columns: 3px minmax(0, 1fr);
    grid-template-areas: "rail identity" "rail state" "rail meta";
    gap: 4px 10px;
    min-height: 0;
  }
  .ticket-row__state {
    justify-items: start;
    text-align: left;
  }
  .ticket-row__meta {
    grid-column: auto;
    justify-content: flex-start;
  }
  .ticket-row__meta .branch-marker-row {
    max-width: 100%;
  }
}
@media (max-width: 760px) {
  .board-shell[data-symfonish-branch-context][data-branch-default="0"] {
    padding: var(--space-3);
  }
  .board-breadcrumb {
    gap: 7px;
    font-size: 12px;
  }
  .board-breadcrumb h1 {
    font-size: 22px;
  }
  .branch-fixed {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .branch-fixed em {
    grid-column: 2;
  }
  .scope-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scope-switch a {
    min-height: 44px;
  }
  .board-command__context > [data-new-ticket-toggle] {
    min-height: 44px;
    padding-inline: 12px;
  }
  .new-ticket-band {
    grid-column: 1/-1;
  }
  .search-field {
    min-height: 44px;
  }
  .new-ticket-form {
    grid-template-columns: 1fr;
  }
  .field--wide {
    grid-column: 1;
  }
  .new-ticket-form .form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .new-ticket-form .form-actions button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  .quick-create .form-grid {
    grid-template-columns: 1fr;
  }
  .quick-create .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .quick-create .actions button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  .lane-tab {
    min-height: 44px;
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 6px 4px;
    text-align: center;
  }
  .lane-tab-label {
    display: none;
  }
  .lane-tab-short {
    display: inline;
    max-width: 100%;
    font-size: 13px;
  }
  .lane-tab small {
    display: none;
  }
  .list-heading {
    display: grid;
    gap: 8px;
    align-items: start;
  }
  .ticket-row {
    grid-template-columns: 3px minmax(0, 1fr);
    grid-template-areas: "rail identity" "rail state" "rail meta";
    gap: 4px 10px;
    min-height: 0;
  }
  .ticket-row__state {
    justify-items: start;
    text-align: left;
  }
  .ticket-row__identity > div {
    display: grid;
    gap: 2px;
  }
  .ticket-row__identity strong, .ticket-row__state small {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .ticket-row__meta {
    grid-column: auto;
    justify-content: flex-start;
  }
  .board-footer {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .board-footer .usage-strip, .board-footer .commit-strip {
    width: 100%;
  }
  .commit-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .commit-list small {
    grid-column: 2;
  }
  .branch-management-page .branch-board-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .branch-board-settings .branch-backend-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .branch-board-settings .branch-backend-form > .form-actions {
    grid-column: auto;
    justify-self: stretch;
  }
  .branch-board-settings .branch-backend-form .button {
    width: 100%;
  }
  .branch-management-page .branch-board-item {
    grid-template-columns: 1fr;
  }
  .branch-management-page .branch-board-item .branch-board-card {
    grid-column: 1;
    grid-row: 1;
  }
  .branch-management-page .branch-board-item .branch-board-actions {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .branch-manage-disclosure .quick-create {
    position: static;
    width: 100%;
  }
}
:root {
  --page: #f4f6f8;
  --surface: #fff;
  --surface-subtle: #f8f9fb;
  --surface-raised: #fff;
  --ink: #18202a;
  --ink-soft: #394656;
  --muted: #586777;
  --line: #d8dee6;
  --line-strong: #bcc6d2;
  --accent: #175cd3;
  --accent-strong: #0f48aa;
  --accent-soft: #eaf2ff;
  --success: #167455;
  --success-soft: #e9f6f0;
  --warning: #976000;
  --warning-soft: #fff5dd;
  --danger: #b4232f;
  --danger-soft: #fff0f1;
  --shadow-menu: 0 18px 42px rgba(15, 23, 42, .18);
  --app-bar-height: 52px;
}

/* meta/requests/2026-08-14/SYM-REQ-TICKET-STICKY-HEADER-20260814.md */
html:has([data-ticket-workspace]) {
  --ticket-sticky-clearance: 92px;
  scroll-padding-top: var(--ticket-sticky-clearance);
}

[data-ticket-workspace] :is([id], [data-current-turn], [data-history-record-key], a, button, summary, input, select, textarea, [tabindex]) {
  scroll-margin-top: 12px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon-button, .icon-text-button, .text-button, .change-trigger, .turn-menu-button {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft, #3a4a5e);
  text-decoration: none;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  font-weight: 680;
  white-space: nowrap;
}

.button--small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.9rem;
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button--primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button--subtle, .button.subtle {
  border: 1px solid var(--line, #d8e0ea);
  background: var(--surface-subtle, #f4f7fb);
  color: var(--ink-soft, #3a4a5e);
}

.button--subtle:hover, .button.subtle:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.button--success {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.button--danger, .button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.button--danger-outline {
  border-color: #e9a8ae;
  background: var(--surface);
  color: var(--danger);
}

.icon-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}

.icon-button:hover, .turn-menu-button:hover {
  background: #e9edf2;
  color: var(--ink);
}

.icon-button svg, .icon-text-button svg, .button svg {
  width: 16px;
  height: 16px;
}

.icon-text-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  padding: 0 9px;
  font-size: 0.82rem;
  font-weight: 680;
  white-space: nowrap;
}

.icon-text-button:hover, .icon-text-button.is-pressed {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-text-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.text-button {
  color: var(--accent);
  font-weight: 680;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink-soft);
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill--success {
  border-color: #a6d8c3;
  background: var(--success-soft);
  color: #0d6045;
}

.status-pill--warning {
  border-color: #e9cb83;
  background: var(--warning-soft);
  color: #7b4e00;
}

.status-pill--danger {
  border-color: #edb1b7;
  background: var(--danger-soft);
  color: #9d1c28;
}

.status-pill--active {
  border-color: #aac7f5;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-pill--review {
  border-color: #c3b4e8;
  background: #f2edff;
  color: #5b3b9f;
}

:root {
  --page: #f4f6f8;
  --surface: #fff;
  --surface-subtle: #f8f9fb;
  --surface-raised: #fff;
  --ink: #18202a;
  --ink-soft: #394656;
  --muted: #586777;
  --line: #d8dee6;
  --line-strong: #bcc6d2;
  --accent: #175cd3;
  --accent-strong: #0f48aa;
  --accent-soft: #eaf2ff;
  --success: #167455;
  --success-soft: #e9f6f0;
  --warning: #976000;
  --warning-soft: #fff5dd;
  --danger: #b4232f;
  --danger-soft: #fff0f1;
  --shadow-menu: 0 18px 42px rgba(15, 23, 42, .18);
  --ticket-overlay-scrim: rgba(24, 32, 42, .46);
  --z-ticket-context: 110;
  --z-ticket-popover: 140;
  --z-ticket-menu: 150;
  --app-bar-height: 52px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --branch-rail-width: 4px;
  --control-size: 40px;
}

/* meta/requests/2026-08-14/SYM-REQ-TICKET-STICKY-HEADER-20260814.md */
html:has([data-ticket-workspace]) {
  --ticket-sticky-clearance: 92px;
  scroll-padding-top: var(--ticket-sticky-clearance);
}

[data-ticket-workspace] :is([id], [data-current-turn], [data-history-record-key], a, button, summary, input, select, textarea, [tabindex]) {
  scroll-margin-top: 12px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon-button, .icon-text-button, .text-button, .change-trigger, .turn-menu-button {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft, #3a4a5e);
  text-decoration: none;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  font-weight: 680;
  white-space: nowrap;
}

.button--small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.9rem;
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button--primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button--subtle, .button.subtle {
  border: 1px solid var(--line, #d8e0ea);
  background: var(--surface-subtle, #f4f7fb);
  color: var(--ink-soft, #3a4a5e);
}

.button--subtle:hover, .button.subtle:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.button--success {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.button--danger, .button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.button--danger-outline {
  border-color: #e9a8ae;
  background: var(--surface);
  color: var(--danger);
}

.icon-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}

.icon-button:hover, .turn-menu-button:hover {
  background: #e9edf2;
  color: var(--ink);
}

.icon-button svg, .icon-text-button svg, .button svg {
  width: 16px;
  height: 16px;
}

.icon-text-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  padding: 0 9px;
  font-size: 0.82rem;
  font-weight: 680;
  white-space: nowrap;
}

.icon-text-button:hover, .icon-text-button.is-pressed {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-text-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.text-button {
  color: var(--accent);
  font-weight: 680;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink-soft);
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill--success {
  border-color: #a6d8c3;
  background: var(--success-soft);
  color: #0d6045;
}

.status-pill--warning {
  border-color: #e9cb83;
  background: var(--warning-soft);
  color: #7b4e00;
}

.status-pill--danger {
  border-color: #edb1b7;
  background: var(--danger-soft);
  color: #9d1c28;
}

.status-pill--active {
  border-color: #aac7f5;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-pill--review {
  border-color: #c3b4e8;
  background: #f2edff;
  color: #5b3b9f;
}

.ticket-context {
  position: sticky;
  z-index: var(--z-ticket-context);
  top: 0;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background-color: var(--page);
  background-image: none;
  backdrop-filter: none;
}

.ticket-context[data-symfonish-branch-context] {
  --branch-accent-soft: color-mix(in srgb, var(--branch-accent, var(--accent)) 11%, var(--page));
}

.ticket-context[data-symfonish-branch-context][data-branch-default="0"] {
  border-left: var(--branch-rail-width) solid var(--branch-accent, var(--accent));
  border-bottom-color: color-mix(in srgb, var(--branch-accent, var(--accent)) 34%, var(--line));
  background-color: var(--page);
  background-image: linear-gradient(90deg, var(--branch-accent-soft), var(--page) min(38vw, 520px));
}

.ticket-context__inner {
  display: grid;
  min-height: 66px;
  width: min(1280px, 100% - 40px);
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0 auto;
  padding: 7px 0;
}

.ticket-context__identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ticket-context__identity > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.ticket-context__identity > div > .icon-button {
  width: 28px;
  height: 28px;
  flex: none;
}

.ticket-context__identity > div > code {
  flex: none;
  white-space: nowrap;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
}

.ticket-context__identity > div > :is(.branch-label, .status-pill, .relation-label) {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ticket-context__identity .relation-label > [data-icon] {
  flex: none;
}

.ticket-context__identity h1 {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.18;
}

.branch-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--branch-accent, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--branch-accent, var(--accent)) 10%, #fff);
  color: var(--ink-soft);
  padding: 2px 8px 2px 5px;
  font-size: 0.78rem;
  font-weight: 700;
}

.branch-label .branch-accent {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.branch-accent {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--branch-accent, var(--accent)), color-mix(in srgb, var(--branch-accent, var(--accent)) 54%, #fff));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.relation-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.relation-label svg {
  width: 13px;
  height: 13px;
}

.ticket-context__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.ticket-context__inner > .ticket-context__actions {
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.ticket-context__tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  min-width: 0;
}

.ticket-context__tools .ticket-subscription-controls > form > .icon-text-button {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.ticket-subscription-controls [data-subscribe-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ticket-context__tools .ticket-menu form {
  display: flex;
  width: 100%;
}

.ticket-context__tools .ticket-menu [hidden] {
  display: none;
}

.ticket-context__actions form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ticket-preview-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.ticket-preview-actions .menu {
  flex: 0 0 auto;
}

.ticket-primary-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.ticket-primary-slot:empty {
  display: none;
}

.change-trigger {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.change-trigger:hover, .change-trigger[aria-expanded=true] {
  background: #e9edf2;
}

.change-popover {
  position: absolute;
  z-index: var(--z-ticket-popover);
  top: calc(100% + var(--space-2));
  right: max(20px, (100vw - 1280px) / 2);
  width: min(610px, 100vw - 40px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-menu);
  padding: 12px;
}

.change-popover__heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 3px 9px;
}

.change-popover ul {
  max-height: 260px;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 0;
  list-style: none;
}

.change-popover li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 7px 3px;
}

.change-popover li:last-child {
  border-bottom: 0;
}

.change-popover li code {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.change-popover p {
  margin: 8px 0 0;
}

.change-popover__actions {
  display: flex;
  justify-content: flex-end;
}

.change-popover.change-popover--inline {
  position: static;
  width: 100%;
  border: 0;
  padding: 0;
  box-shadow: none;
  text-align: left;
}

.change-popover--inline .change-popover__heading > span {
  white-space: nowrap;
}

.menu {
  position: relative;
}

.menu > summary {
  list-style: none;
  cursor: pointer;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu__surface {
  position: absolute;
  z-index: var(--z-ticket-menu);
  top: calc(100% + var(--space-2));
  right: 0;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.menu:not([open]) > .menu__surface {
  display: none;
}

.menu--ticket .menu__surface {
  top: calc(100% + var(--space-5));
}

.ticket-menu {
  width: min(360px, 100vw - 28px);
  max-height: min(76vh, 620px);
  overflow: auto;
  padding: 7px;
}

.ticket-menu hr {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 5px;
}

.ticket-menu > a, .ticket-menu > button {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  padding: 7px 8px;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-weight: 650;
}

.ticket-menu > a:hover, .ticket-menu > button:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.ticket-menu__panel {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 7px;
}

.ticket-menu__panel form, .ticket-menu__panel .panel {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ticket-menu__panel h2 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.ticket-menu__panel label {
  margin-bottom: 8px;
}

.turn-menu .conversation-restart-form, .turn-menu .conversation-delete-form {
  display: block;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ticket-menu form > button, .turn-menu button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  padding: 7px 8px;
  text-align: left;
  font: inherit;
  font-weight: 650;
}

.ticket-menu form > button:hover, .turn-menu button:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.ticket-menu form > button.button--danger, .ticket-menu form > button.danger,
.turn-menu button.button--danger, .turn-menu button.danger {
  color: var(--danger);
}

.ticket-failure-details {
  width: min(1280px, 100% - 40px);
  margin: 0 auto;
  padding-block: 8px;
  color: var(--ink-soft);
}

.ticket-failure-details summary {
  cursor: pointer;
}

.ticket-failure-details pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 20rem;
  overflow: auto;
}

.ticket-alert > div:last-child {
  flex-wrap: wrap;
}

.ticket-alert p {
  overflow-wrap: anywhere;
}

.ticket-alert {
  display: flex;
  flex-wrap: wrap;
  width: min(1280px, 100% - 40px);
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid;
  margin: 0 auto;
  padding: 8px 0;
}

.ticket-alert > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.ticket-alert > div > svg,
.ticket-alert > div > [data-icon],
.ticket-alert > div > [data-icon] svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.ticket-alert p {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin: 0;
}

.ticket-alert p span {
  color: var(--muted);
}

.ticket-alert--danger {
  border-color: #e9a8ae;
  color: var(--danger);
}

.ticket-alert--danger p span {
  color: #7e3b42;
}

.ticket-alert--warning {
  border-color: #e4c274;
  color: var(--warning);
}

.ticket-alert.state-processing,
.ticket-alert.state-rebuilding,
.ticket-alert.state-sleeping,
.ticket-alert.state-unreleased,
.ticket-alert.state-failed,
.ticket-alert.state-route-failed,
.ticket-alert.state-evidence-only {
  border-left: 3px solid;
  padding-inline: 10px 0;
}

.ticket-alert.state-processing,
.ticket-alert.state-rebuilding {
  border-color: #83aee8;
  background: linear-gradient(90deg, var(--accent-soft), transparent 44%);
  color: var(--accent-strong);
}

.ticket-alert.state-processing p span,
.ticket-alert.state-rebuilding p span {
  color: #395574;
}

.ticket-alert.state-sleeping {
  border-color: var(--line-strong);
  background: linear-gradient(90deg, var(--surface-subtle), transparent 44%);
  color: var(--ink-soft);
}

.ticket-alert.state-unreleased {
  border-color: #aa8cdf;
  background: linear-gradient(90deg, #f5f1ff, transparent 44%);
  color: #6339a4;
}

.ticket-alert.state-unreleased p span {
  color: #594970;
}

.ticket-alert.state-failed {
  border-color: #e39aa2;
  background: linear-gradient(90deg, var(--danger-soft), transparent 44%);
}

.ticket-alert.state-route-failed {
  border-color: #dc8a4b;
  border-bottom-style: dashed;
  background: linear-gradient(90deg, #fff3e8, transparent 44%);
  color: #9a3e0f;
}

.ticket-alert.state-route-failed p span {
  color: #6f4935;
}

.ticket-alert.state-evidence-only {
  border-color: #98a5b3;
  background: linear-gradient(90deg, #f1f4f7, transparent 44%);
  color: #465667;
}

.ticket-alert.state-evidence-only p span {
  color: #586777;
}

.ticket-alert .worker-activity-list {
  display: grid;
  min-width: 240px;
  max-width: min(520px, 50%);
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.ticket-alert .worker-activity-list li {
  min-width: 0;
  overflow-wrap: anywhere;
}

.conversation {
  width: min(1040px, 100% - 32px);
  margin: 0 auto;
  padding: 28px 0 64px;
}

.conversation-thread {
  display: block;
}

.turn {
  position: relative;
  display: grid;
  max-width: 86ch;
  gap: 8px;
  margin: 0 0 20px;
}

.turn--user {
  width: min(82%, 82ch);
  margin-left: auto;
  border-radius: 8px;
  background: #e9edf2;
  padding: 11px 13px;
}

.turn--user .turn__meta {
  justify-content: flex-end;
}

.turn--agent {
  border-left: 3px solid color-mix(in srgb, var(--branch-accent, var(--accent)) 74%, transparent);
  padding-left: 13px;
}

.turn--active {
  max-width: none;
  border-left-color: var(--accent);
}

.turn--failed {
  border-left-color: var(--danger);
}

.turn--error, .turn--missing-report {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 6%, transparent);
}

.turn--historical-error {
  border-left-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  opacity: 0.78;
}

.turn--historical-error .turn__body {
  color: var(--muted);
}

.turn--merge {
  border-left-color: #c77d00;
}

.turn--review {
  border-left-color: var(--success);
}

.turn--queued {
  border: 1px dashed #d0a749;
  background: #fff9e9;
}

.conversation-live-output .diagnostics-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.ticket-proof-fixture {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin: 0 0 18px;
}

.ticket-proof-fixture:not([open]) > .ticket-proof-fixture__body {
  display: none;
}

.ticket-proof-fixture > summary {
  display: grid;
  min-height: 46px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  list-style: none;
  cursor: pointer;
}

.ticket-proof-fixture > summary::-webkit-details-marker {
  display: none;
}

.ticket-proof-fixture > summary > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ticket-proof-fixture > summary strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-proof-fixture > summary svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.ticket-proof-fixture__body {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 11px;
}

.ticket-proof-fixture__body p {
  margin: 0;
  color: var(--ink-soft);
}

.ticket-proof-fixture__body .compact-facts {
  margin: 0;
}

.turn__meta {
  display: flex;
  min-width: 0;
  min-height: 26px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.79rem;
}

.turn__meta strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.turn__meta time {
  white-space: nowrap;
}

.turn-menu-button {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  color: var(--muted);
}

.turn-menu-button svg {
  width: 15px;
  height: 15px;
}

.avatar, .agent-mark {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 760;
}

.avatar {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.agent-mark--active {
  background: var(--accent);
}

.agent-mark--danger {
  background: var(--danger);
}

.agent-mark--warning {
  background: #a96700;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-strong);
  font-weight: 700;
}

.live-label > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  animation: pulse 1.8s ease-in-out infinite;
}

.live-label--warning {
  color: var(--warning);
}

.live-label--warning > span {
  background: #c77d00;
  box-shadow: 0 0 0 4px rgba(199, 125, 0, 0.16);
}

.model-label {
  border-left: 1px solid var(--line-strong);
  padding-left: 7px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.conversation-source {
  color: var(--accent);
  font-weight: 650;
}

.turn__body {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.turn__body > :last-child {
  margin-bottom: 0;
}

.rich-text p {
  margin-bottom: 10px;
}

.rich-text ul, .rich-text ol {
  margin-bottom: 10px;
  padding-left: 22px;
}

.rich-text code {
  border-radius: 3px;
  background: #e9edf2;
  padding: 1px 4px;
}

.turn--user .rich-text code {
  background: #dde3ea;
}

.conversation-report {
  margin: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  padding: 10px;
  font: 13px/1.48 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.conversation-markdown {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  overflow-wrap: anywhere;
}

.conversation-markdown p, .conversation-markdown ul, .conversation-markdown ol, .conversation-markdown h3, .conversation-markdown h4, .conversation-markdown h5 {
  margin: 0;
}

.conversation-markdown ul, .conversation-markdown ol {
  padding-left: 20px;
}

.conversation-markdown li + li {
  margin-top: 2px;
}

.conversation-markdown .conversation-code {
  margin: 0;
  padding: 10px;
  overflow: auto;
  white-space: pre;
}

.markdown-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.markdown-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 12px;
}

.markdown-table th, .markdown-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.markdown-table th {
  background: var(--surface-subtle);
  font-weight: 850;
  color: var(--ink-soft);
}

.markdown-table tr:last-child td {
  border-bottom: 0;
}

.text-expand-inline {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.text-expand-inline [data-text-expand-target] {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.text-expand-inline:not(.is-expanded) [data-text-expand-body] {
  cursor: pointer;
}

.text-expand-inline.is-expanded [data-text-expand-target] {
  max-height: min(70vh, 900px);
  overflow: auto;
  border-radius: 10px;
}

.text-expand-inline [data-text-expand-body]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.text-expand-button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
}

.text-expand-button:hover, .text-expand-button:focus-visible {
  text-decoration: underline;
}

.turn-assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.turn-assets--images {
  grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
}

.turn-assets > a, .turn-assets > button {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  padding: 7px 9px;
  text-align: left;
  text-decoration: none;
}

.turn-assets > a:hover, .turn-assets > button:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.turn-assets > a > svg, .turn-assets > button > svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.turn-assets > a > span, .turn-assets > button > span {
  display: grid;
  min-width: 0;
}

.turn-assets strong, .turn-assets small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.turn-assets strong {
  font-size: 0.82rem;
}

.turn-assets small {
  color: var(--muted);
  font-size: 0.75rem;
}

.turn-assets__thumb {
  width: 52px;
  height: 38px;
  flex: 0 0 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-subtle);
}

.turn-assets__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.turn-assets-more {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.turn-assets-more > summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 750;
}

.turn-assets-more[open] > summary {
  margin-bottom: 6px;
}

.turn-assets--secondary > a {
  min-height: 40px;
  opacity: 0.86;
}

.ticket-wide-context {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ticket-wide-context > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.ticket-wide-context > summary > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ticket-wide-context strong,
.ticket-wide-context small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-wide-context small {
  color: var(--muted);
}

.ticket-wide-context__body {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.thread-event {
  display: grid;
  grid-template-columns: minmax(20px, 1fr) auto minmax(20px, 1fr);
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  text-align: center;
}

.thread-event > span {
  height: 1px;
  background: var(--line);
}

.thread-event p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 0.78rem;
}

.thread-event strong {
  color: var(--ink-soft);
}

.thread-event small {
  font-size: inherit;
}

.agent-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.agent-summary-grid > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.summary-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e9edf2;
  color: var(--ink-soft);
}

.summary-icon--success {
  background: var(--success-soft);
  color: var(--success);
}

.summary-icon svg {
  width: 16px;
  height: 16px;
}

.agent-summary-grid p {
  display: grid;
  min-width: 0;
  gap: 1px;
  margin: 0;
}

.agent-summary-grid p strong, .agent-summary-grid p span {
  overflow-wrap: anywhere;
}

.agent-summary-grid p span {
  color: var(--muted);
  font-size: 0.78rem;
}

.agent-summary-grid__action {
  margin-left: auto;
  white-space: nowrap;
}

.run-details {
  border-top: 1px solid var(--line);
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.run-details summary {
  width: max-content;
  max-width: 100%;
  color: var(--accent);
  font-weight: 650;
}

.run-details summary, .run-details__body a, .run-details__body button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
}

.run-details__body {
  max-width: 520px;
  border-left: 2px solid var(--line);
  margin-top: 8px;
  padding: 4px 0 4px 12px;
}

.compact-facts {
  display: grid;
  margin: 0;
}

.compact-facts > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 7px 0;
}

.compact-facts dt {
  color: var(--muted);
}

.compact-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.inline-error {
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  margin-top: 10px;
  padding: 10px 12px;
}

.inline-error > strong {
  color: var(--danger);
}

.inline-error .compact-facts {
  margin-top: 6px;
  font-size: 0.88rem;
}

.recovery-actions, .queued-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.queued-metadata, .queued-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.queued-metadata {
  color: var(--muted);
  font-size: 0.78rem;
}

.queued-actions form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.queued-actions {
  justify-content: flex-end;
}

.queued-outcome {
  min-width: 0;
  border-left: 3px solid #d0a749;
  background: var(--warning-soft);
  color: var(--ink-soft);
  margin: 0;
  padding: 8px 10px;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.turn-test-evidence {
  border-block: 1px solid var(--line);
}
.turn-test-evidence > summary {
  display: grid;
  min-height: 48px;
  grid-template-columns: auto minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  cursor: pointer;
  list-style: none;
}
.turn-test-evidence > summary::-webkit-details-marker {
  display: none;
}
.turn-test-evidence > summary > svg {
  width: 16px;
  height: 16px;
  transition: transform 0.16s ease;
}
.turn-test-evidence[open] > summary > svg {
  transform: rotate(180deg);
}

.test-evidence-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #aebbc9;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
}
.test-evidence-icon svg {
  width: 16px;
  height: 16px;
}
.turn-test-evidence--success .test-evidence-icon {
  border-color: #8db5a1;
  color: #1d6b48;
}
.turn-test-evidence--danger .test-evidence-icon {
  border-color: #d8a3a3;
  color: var(--danger);
}

.test-evidence-heading {
  display: grid;
  min-width: 0;
}
.test-evidence-heading strong {
  font-size: 0.82rem;
}
.test-evidence-heading small {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.test-evidence-metrics {
  display: flex;
  max-width: 520px;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px 10px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}
.test-evidence-metrics span {
  min-width: 0;
  white-space: nowrap;
}
.test-evidence-metrics b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.test-evidence-detail {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 9px 0 11px 39px;
}
.test-evidence-detail > p {
  margin: 0;
  font-size: 0.74rem;
}
.test-evidence-detail > .text-button {
  justify-self: start;
}

.test-evidence-metric--danger b {
  color: var(--danger);
}

.test-evidence-metric--warning b {
  color: var(--warning);
}

.test-evidence-detail__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.test-evidence-detail__heading strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.test-evidence-detail__heading span {
  color: var(--muted);
  font-size: 0.74rem;
}

.test-evidence-failures {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.test-evidence-failures li {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.test-evidence-failures div {
  min-width: 0;
}

.test-evidence-failures code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.test-evidence-failures p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.test-evidence-failures time {
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.test-evidence-diagnostic {
  white-space: pre-wrap;
}

.test-evidence-causes {
  display: flex;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px 6px;
}
.test-evidence-causes span {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.test-evidence-machine {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.test-evidence-machine > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  list-style: none;
}

.test-evidence-machine > summary::-webkit-details-marker {
  display: none;
}

.test-evidence-machine > summary svg {
  width: 14px;
  height: 14px;
}

.test-evidence-machine > summary span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.test-evidence-machine > summary strong {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.test-evidence-machine > summary small {
  overflow-wrap: anywhere;
}

.test-evidence-machine__body {
  display: grid;
  gap: 8px;
  padding: 8px 0 0 22px;
}

details.turn-test-evidence:not([open]) > .test-evidence-detail {
  display: none;
}

.current-turn-state {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.active-run-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 9px 10px;
}

.active-run-heading > div:first-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.active-run-heading strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.active-run-heading span {
  color: var(--muted);
  font-size: 0.78rem;
}

.active-run-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
}

.live-output-shell {
  position: relative;
  min-width: 0;
}

.live-output {
  max-height: min(52vh, 620px);
  min-height: 180px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1623;
  color: #dbe7f5;
  padding: 9px;
}

.live-output .diagnostics-panel {
  color: inherit;
}

.live-output .section-head {
  margin-bottom: 8px;
  color: #dbe7f5;
}

.live-output .section-head h2 {
  color: #fff;
  font-size: 0.9rem;
}

.live-output .muted {
  color: #9fb0c4;
}

.live-output .diagnostic-line {
  border-color: rgba(219, 231, 245, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.live-output .diagnostic-line strong,
.live-output .diagnostic-line code,
.live-output .diagnostic-codex-text {
  color: #dbe7f5;
}

.live-output .diagnostic-line small {
  color: #9fb0c4;
}

.live-output .diagnostic-action,
.live-output .diagnostics-popout {
  color: #8fbcff;
}

.live-output .diagnostic-line pre,
.live-output .diagnostic-codex-entry pre {
  border-color: rgba(219, 231, 245, 0.16);
  background: #07101c;
  color: #dbe7f5;
}

.jump-latest {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(143, 188, 255, 0.45);
  border-radius: 999px;
  background: rgba(14, 22, 35, 0.92);
  color: #dbe7f5;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 750;
}

.jump-latest[hidden] {
  display: none;
}

.jump-latest svg {
  width: 14px;
  height: 14px;
}

.live-output-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.turn-kind {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  padding-left: 8px;
  font-size: 0.78rem;
  font-weight: 760;
}

.composer {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  padding: 12px;
}

.composer > form {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.composer label {
  margin: 0;
  font-weight: 720;
}

.composer textarea {
  min-height: 104px;
  border-radius: 8px;
  background: var(--surface);
}

.composer__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.composer__tools, .composer__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.composer__actions {
  justify-content: flex-end;
}

.composer__tools .icon-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.composer__hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.composer .agent-model-select {
  width: min(100%, 360px);
  margin: 0;
  font-size: 0.85rem;
}

.composer .agent-model-select label {
  margin: 0;
}

.composer--locked {
  background: var(--surface-subtle);
}

.composer__locked-copy {
  display: grid;
  gap: 3px;
}

.composer__locked-copy strong {
  color: var(--ink);
}

.composer__locked-copy p {
  margin: 0;
  color: var(--muted);
}

.selected-files {
  display: grid;
  min-height: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.selected-files:empty {
  display: none;
}

.selected-files > span {
  display: grid;
  min-width: 0;
  min-height: 38px;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
  padding: 4px 4px 4px 9px;
}

.selected-files > span > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.selected-files strong, .selected-files small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-files strong {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.selected-files small {
  color: var(--muted);
  font-size: 0.73rem;
}

.selected-files > span > button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.05rem;
}

.selected-files > span > button:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.selected-files > span > button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.conversation-history {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  margin: 0 0 20px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.conversation-history > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.conversation-history > div {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.conversation-history [hidden] {
  display: none;
}

.activity {
  border-bottom: 1px solid var(--line-strong);
  padding: 0 0 16px;
}

.older-turns {
  display: grid;
  gap: 20px;
}

.older-turns:empty {
  display: none;
}

.older-turns > [hidden] {
  display: none;
}

.activity:not([open]) > .activity__body {
  display: none;
}

.activity > summary {
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  list-style: none;
}

.activity > summary::-webkit-details-marker {
  display: none;
}

.activity > summary svg {
  width: 16px;
  height: 16px;
}

.activity > summary b {
  display: inline-flex;
  min-width: 21px;
  height: 21px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #e5e9ee;
  font-size: 0.75rem;
}

.activity > summary small {
  justify-self: end;
  overflow: hidden;
  color: var(--muted);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity__body {
  padding: 6px 0 0 22px;
}

.activity__body ol {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.activity__body li {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 0;
}

.activity__body li:not(:last-child)::before {
  position: absolute;
  top: 18px;
  bottom: -8px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.activity-dot {
  width: 11px;
  height: 11px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--line-strong);
  box-shadow: 0 0 0 1px var(--line-strong);
  margin-top: 4px;
}

.activity-dot--active {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.activity-dot--success {
  background: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.activity__body p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.activity__body time {
  color: var(--muted);
  font-size: 0.77rem;
}

.details-dialog {
  width: min(780px, 100vw - var(--space-4) - var(--space-4));
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow-menu);
}

.details-dialog::backdrop {
  background: var(--ticket-overlay-scrim);
}

.dialog-shell {
  display: grid;
  max-height: min(80dvh, 820px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: 0;
  border: 0;
  border-radius: inherit;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

.dialog-shell > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  border-bottom: 1px solid var(--line);
  padding: var(--space-3) var(--space-4);
}

.dialog-shell > header form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dialog-shell > header h2, .dialog-shell > header p {
  margin: 0;
}

.dialog-shell > header p {
  margin-top: var(--space-1);
  color: var(--ink-soft);
}

.dialog-scroll {
  display: grid;
  gap: var(--space-3);
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--space-4);
}

.dialog-scroll section > .panel, .dialog-scroll section > form {
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.dialog-scroll section {
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-4);
}

.dialog-scroll section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.action-sheet > footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  border-top: 1px solid var(--line);
  padding: var(--space-3) var(--space-4);
}

.detail-list {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.evidence-dialog {
  width: min(680px, 100vw - 24px);
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow-menu);
}

.evidence-dialog::backdrop {
  background: var(--ticket-overlay-scrim);
}

.evidence-dialog__shell {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.evidence-dialog__shell > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.evidence-dialog__shell > header h2, .evidence-dialog__shell > header p {
  margin: 0;
}

.evidence-dialog__shell > header p {
  margin-top: 3px;
  color: var(--muted);
}

.evidence-preview {
  display: grid;
  min-height: 170px;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--page);
  padding: 18px;
  text-align: center;
}

.evidence-dialog [hidden] {
  display: none !important;
}

.evidence-preview > svg {
  width: 28px;
  height: 28px;
  justify-self: center;
  color: var(--accent);
}

.evidence-preview img {
  display: block;
  max-width: 100%;
  max-height: min(62vh, 620px);
  margin: 0 auto;
  border-radius: 6px;
  object-fit: contain;
}

.evidence-preview iframe {
  width: 100%;
  height: min(48vh, 440px);
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.evidence-preview p, .evidence-preview pre {
  margin: 0;
}

.evidence-preview pre {
  max-height: min(52vh, 480px);
  overflow: auto;
  color: var(--ink-soft);
  font: 0.76rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: left;
}

.evidence-preview__frame {
  display: grid;
  gap: 7px;
  border: 1px solid #c9d5e5;
  border-radius: 6px;
  background: var(--surface);
  margin-top: 6px;
  padding: 12px;
  text-align: left;
}

.evidence-preview__frame span {
  color: var(--muted);
  font-size: 0.74rem;
}

.evidence-preview__frame i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--success);
}

.evidence-dialog__shell > footer {
  display: flex;
  justify-content: flex-end;
}

.action-dialog {
  --action-tone: var(--accent);
  border-top: var(--branch-rail-width) solid var(--action-tone);
}

.action-dialog--success {
  --action-tone: var(--success);
}

.action-dialog--warning {
  --action-tone: var(--warning);
}

.action-dialog--danger {
  --action-tone: var(--danger);
}

.action-dialog .eyebrow {
  color: var(--action-tone);
}

.action-dialog .dialog-scroll {
  gap: var(--space-4);
}

.action-dialog__summary {
  max-width: 62ch;
}

.action-dialog__section {
  display: grid;
  gap: var(--space-3);
}

.action-branch-facts {
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-1);
}

.state-impact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.state-impact section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  padding: var(--space-3);
}

.state-impact h3 {
  margin: 0 0 var(--space-2);
  font-size: 0.86rem;
}

.state-impact ul {
  margin: 0;
  padding-left: var(--space-5);
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.state-impact li + li {
  margin-top: var(--space-1);
}

.action-confirmation {
  border-left: var(--branch-rail-width) solid var(--action-tone);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--action-tone) 8%, var(--surface));
  padding: var(--space-3);
}

.action-confirmation strong {
  color: var(--ink);
}

.action-confirmation p {
  margin: var(--space-1) 0 0;
  color: var(--ink-soft);
}

.confirm-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  margin: 0;
  padding: var(--space-3);
}

.confirm-row input {
  margin-top: var(--space-1);
}

.action-dialog :is(button, input, select, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--action-tone) 62%, transparent);
  outline-offset: 2px;
}

.ticket-action-dialog .action-dialog__section > form {
  display: grid;
  gap: var(--space-3);
}

.ticket-action-dialog .action-dialog__section > form > h2 {
  margin: 0;
  font-size: 0.95rem;
}

.ticket-action-dialog .action-dialog__section > form > p,
.ticket-action-dialog .action-dialog__section > form > label {
  margin: 0;
}

.ticket-action-dialog .action-dialog__section > form button[type=submit] {
  justify-self: start;
}

.action-dialog--warning .action-dialog__section > form button[type=submit]:not(.button--subtle) {
  border-color: var(--warning);
  background: var(--warning);
  color: var(--surface);
}

.action-dialog--danger .action-dialog__section > form button[type=submit]:not(.button--subtle) {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--surface);
}

.action-result {
  border-left: var(--branch-rail-width) solid var(--success);
  background: var(--success-soft);
  padding: var(--space-3);
}

.action-result--danger {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.action-result strong {
  color: var(--success);
}

.action-result--danger strong {
  color: var(--danger);
}

.action-result p {
  margin: var(--space-1) 0 0;
  color: var(--ink-soft);
}

.action-result:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.decision-card {
  display: grid;
  gap: 10px;
}

.decision-card label, .decision-card p {
  margin: 0;
}

.decision-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.decision-actions button {
  width: 100%;
}

.compact-cards {
  gap: 8px;
}

.compact-card {
  padding: 11px;
}

.change-summary {
  font-weight: 850;
  color: var(--success);
}

.change-summary:empty {
  display: none;
}

.ticket-detail-note {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 10px;
}

.ticket-detail-note strong {
  color: var(--ink);
}

.ticket-detail-note p {
  margin: 0;
  color: var(--muted);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(0.88);
    opacity: 0.74;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-label > span {
    animation: none;
  }
}
@media (max-width: 1180px) {
  html:has([data-ticket-workspace]) {
    --ticket-sticky-clearance: 132px;
  }
}
@media (max-width: 900px) {
  .ticket-context__inner > .ticket-context__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding-bottom: 2px;
  }
  .ticket-context__tools {
    margin-left: 0;
    justify-content: flex-start;
  }
  .ticket-context__tools > .ticket-subscription-controls {
    margin-left: auto;
  }
}
@media (max-width: 760px) {
  html:has([data-ticket-workspace]) {
    --ticket-sticky-clearance: 176px;
  }
  html:has(.ticket-context[data-ticket-status=review_ready]) {
    --ticket-sticky-clearance: 220px;
  }
  .ticket-context {
    backdrop-filter: none;
  }
  .ticket-context__inner {
    width: calc(100% - 20px);
    padding: 9px 0;
  }
  .ticket-context__identity h1 {
    font-size: 1rem;
  }
  .ticket-primary-slot > .button {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    padding: 0 10px;
  }
  .ticket-context__tools {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .ticket-context__tools > .ticket-preview-actions {
    grid-column: 1;
    grid-row: 1;
  }
  .ticket-context__tools > .mail-launcher {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
  }
  .ticket-context__tools > .change-trigger {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .ticket-context__tools > .ticket-subscription-controls {
    grid-column: 2;
    grid-row: 2;
  }
  .ticket-context__tools > .icon-text-button, .ticket-preview-actions > .icon-text-button {
    padding: 0 6px;
  }
  .ticket-context__tools > .change-trigger {
    padding: 0 4px;
  }
  .ticket-context__tools .is-disabled > span:last-child {
    white-space: normal;
  }
  .ticket-context__tools .menu__surface .icon-text-button {
    width: 100%;
    justify-content: flex-start;
  }
  .change-trigger span {
    display: none;
  }
  .change-popover {
    right: 10px;
    left: 10px;
    width: auto;
  }
  .ticket-alert, .ticket-failure-details {
    width: calc(100% - 20px);
  }
  .ticket-alert {
    align-items: flex-start;
    flex-direction: column;
  }
  .ticket-alert .worker-activity-list {
    max-width: 100%;
    width: 100%;
    min-width: 0;
  }
  .menu--ticket .menu__surface {
    position: fixed;
    z-index: var(--z-ticket-menu);
    right: var(--space-2);
    left: var(--space-2);
    top: calc(var(--ticket-sticky-clearance) + var(--app-bar-height) + var(--space-2));
    width: auto;
    max-height: calc(100dvh - var(--ticket-sticky-clearance) - var(--app-bar-height) - var(--space-2) - var(--space-2));
  }
  .conversation {
    width: calc(100% - 24px);
    padding-top: 20px;
  }
  .turn, .turn--user {
    width: 100%;
    max-width: none;
  }
  .turn--user {
    padding: 10px 11px;
  }
  .turn__meta {
    flex-wrap: wrap;
  }
  .turn__meta > .menu--turn {
    margin-left: auto;
  }
  .model-label {
    order: 4;
    width: 100%;
    border-left: 0;
    padding-left: 31px;
  }
  .turn-assets, .agent-summary-grid {
    grid-template-columns: 1fr;
  }
  .turn-test-evidence > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .turn-test-evidence > summary > .test-evidence-heading {
    grid-column: 2;
    grid-row: 1;
  }
  .turn-test-evidence > summary > .test-evidence-metrics {
    grid-column: 2/-1;
    grid-row: 2;
  }
  .turn-test-evidence > summary > [data-icon=chevron-down],
  .turn-test-evidence > summary > svg {
    grid-column: 3;
    grid-row: 1;
  }
  .test-evidence-metrics, .test-evidence-causes {
    justify-content: flex-start;
  }
  .test-evidence-detail {
    padding-left: 0;
  }
  .test-evidence-failures li {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }
  .test-evidence-failures time {
    grid-column: 2;
  }
  .test-evidence-machine__body {
    padding-left: 0;
  }
  .thread-event p {
    display: grid;
    gap: 1px;
  }
  .active-run-heading {
    align-items: start;
  }
  .live-output {
    max-height: 62vh;
  }
  .conversation-history {
    display: grid;
    align-items: start;
  }
  .conversation-history > div {
    width: 100%;
  }
  .conversation-history .button {
    min-width: 0;
    flex: 1 1 0;
    white-space: normal;
  }
  .composer__footer {
    display: grid;
    align-items: flex-end;
  }
  .composer__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .composer__actions > .model-policy--composer {
    grid-column: 1/-1;
  }
  .composer__hint {
    display: none;
  }
  .queued-actions, .recovery-actions {
    justify-content: stretch;
  }
  .queued-actions > *, .recovery-actions > *, .queued-actions form, .recovery-actions form {
    min-width: 0;
    flex: 1 1 auto;
  }
  .state-impact {
    grid-template-columns: 1fr;
  }
  .compact-facts > div, .detail-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .evidence-dialog {
    max-height: calc(100dvh - 24px);
  }
  .evidence-dialog__shell {
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
  .activity > summary {
    grid-template-columns: auto auto auto;
  }
  .activity > summary small {
    display: none;
  }
  .activity__body {
    padding-left: 0;
  }
}
@media (max-width: 420px) {
  .turn--agent {
    padding-left: 9px;
  }
  .thread-event {
    grid-template-columns: minmax(8px, 1fr) minmax(0, auto) minmax(8px, 1fr);
    gap: 6px;
  }
  .thread-event p {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .selected-files > span {
    grid-template-columns: minmax(0, 1fr) 36px;
  }
  .queued-actions, .recovery-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .queued-actions > *, .recovery-actions > *, .queued-actions form, .recovery-actions form, .queued-actions .button, .recovery-actions .button {
    width: 100%;
  }
  .run-details__body {
    max-width: 100%;
  }
  .evidence-dialog__shell > header {
    align-items: center;
  }
}
.branch-switcher__tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.branch-switcher__tools > a,
.branch-switcher__tools > button {
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  padding: 0 6px;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-weight: 850;
}

.branch-switcher__tools > :hover {
  background: var(--accent-soft);
}

.branch-switcher__tools svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.branch-switcher__tools small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.66rem;
  white-space: nowrap;
}

.branch-switcher__tools [hidden],
.branch-board-actions [hidden],
.branch-prompt-dialog [hidden] {
  display: none;
}

.branch-prompt-dialog {
  width: min(760px, 100vw - 24px);
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-menu);
  padding: 0;
}

.branch-prompt-dialog::backdrop {
  background: rgba(24, 32, 42, 0.4);
}

.branch-safety-dialog {
  width: min(640px, 100vw - 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow-menu);
}

.branch-safety-dialog::backdrop {
  background: rgba(24, 32, 42, 0.46);
}

.branch-safety-sheet {
  display: grid;
  overflow: hidden;
}

.branch-safety-sheet > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.branch-safety-sheet h2,
.branch-safety-sheet p {
  margin: 0;
}

.branch-safety-sheet h2 {
  font-size: 1.05rem;
}

.branch-safety-sheet p {
  margin-top: 4px;
  color: var(--muted);
}

.branch-safety-accent {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--branch-accent, #175cff), color-mix(in srgb, var(--branch-accent, #175cff) 54%, #fff));
}

.branch-safety-sheet > footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
}

.branch-safety-sheet > footer .button {
  min-width: 0;
  white-space: normal;
}

.branch-prompt-sheet {
  display: grid;
  max-height: calc(100dvh - 26px);
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

.branch-prompt-sheet > header,
.branch-prompt-sheet > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.branch-prompt-sheet > header {
  border-bottom: 1px solid var(--line);
}

.branch-prompt-sheet > header > div {
  min-width: 0;
}

.branch-prompt-sheet > header h2,
.branch-prompt-sheet > header p {
  margin: 0;
}

.branch-prompt-sheet > header h2 {
  font-size: 1.05rem;
}

.branch-prompt-sheet > header p {
  margin-top: 3px;
  color: var(--muted);
}

.branch-prompt-sheet > footer {
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.branch-prompt-sheet > footer output {
  min-width: 0;
  flex: 1;
  margin-right: auto;
  color: var(--muted);
  font-size: 0.76rem;
}

.branch-prompt-sheet > footer output.is-error {
  color: var(--danger);
}

.branch-prompt-sheet > header .branch-label > span:last-child {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}

.branch-prompt-sheet .eyebrow {
  letter-spacing: 0;
}

.branch-prompt-sheet .button--primary {
  border-color: #1d1d1b;
  background: #1d1d1b;
  color: #fff;
}

.branch-prompt-sheet .button--primary:hover {
  border-color: #080808;
  background: #080808;
}

.branch-prompt-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.branch-prompt-body {
  display: grid;
  min-height: 0;
  gap: 11px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px;
}

.branch-prompt-template,
.branch-prompt-mode,
.branch-prompt-editor {
  display: grid;
  min-width: 0;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
}

.branch-prompt-template {
  max-width: 360px;
}

.branch-prompt-source,
.branch-prompt-readonly {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
  padding: 9px 10px;
}

.branch-prompt-source[hidden], .branch-prompt-readonly[hidden] {
  display: none;
}

.branch-prompt-source > svg, .branch-prompt-readonly > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--accent);
}

.branch-prompt-source p, .branch-prompt-readonly p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.branch-prompt-source p span, .branch-prompt-readonly p span {
  color: var(--muted);
  font-size: 0.72rem;
}

.branch-prompt-readonly {
  border-color: #c9b77d;
  background: #fffaf0;
}

.branch-prompt-readonly > svg {
  color: #756327;
}

.branch-prompt-editor textarea {
  width: 100%;
  min-height: 160px;
  max-height: min(48dvh, 520px);
  resize: vertical;
  overflow: auto;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.branch-prompt-editor textarea[readonly] {
  background: var(--surface-subtle);
  color: var(--ink);
}

.branch-prompt-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.branch-prompt-preview {
  min-width: 0;
}

.branch-prompt-preview summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.branch-prompt-preview .branch-prompt-help {
  margin-top: 6px;
}

.branch-prompt-preview pre {
  max-height: 240px;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.branch-board-actions {
  grid-column: 1/-1;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.branch-board-actions .branch-board-action {
  flex: 1 1 100%;
}

.branch-board-actions [data-branch-prompt-open] small {
  display: none;
}

@media (max-width: 680px) {
  .branch-prompt-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }
  .branch-safety-dialog {
    width: calc(100vw - 12px);
  }
  .branch-safety-sheet > footer {
    grid-template-columns: 1fr;
  }
  .branch-prompt-sheet {
    max-height: calc(100dvh - 14px);
  }
  .branch-prompt-sheet > header, .branch-prompt-sheet > footer {
    padding: 10px;
  }
  .branch-prompt-body {
    padding: 10px;
  }
  .branch-prompt-editor textarea {
    min-height: 140px;
    max-height: 42dvh;
  }
}
@media (max-width: 480px) {
  .branch-switcher__tools {
    grid-template-columns: minmax(0, 1fr);
  }
  .branch-prompt-sheet > footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .branch-prompt-sheet > footer output,
  .branch-prompt-sheet > footer [data-branch-prompt-admin] {
    grid-column: 1/-1;
  }
  .branch-prompt-sheet > footer [data-branch-prompt-edit] {
    grid-column: 1/-1;
  }
  .branch-prompt-sheet > footer .button {
    min-width: 0;
    white-space: normal;
  }
  .branch-board-actions {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
}
.mail-launcher {
  white-space: nowrap;
}

.mail-workspace {
  width: min(1240px, 100vw - 32px);
  height: min(850px, 100dvh - 32px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid #bdc8d8;
  border-radius: 16px;
  background: #fff;
  color: #152032;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.mail-workspace::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
}

.mail-workspace[open] {
  display: block;
}

.mail-workspace [hidden] {
  display: none !important;
}

.mail-workspace__shell {
  position: relative;
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  background: #fff;
}

.mail-workspace__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #d9e0ea;
  background: linear-gradient(135deg, #fff, #f5f8ff);
}

.mail-workspace__header > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
}

.mail-workspace__header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.mail-workspace__address {
  grid-column: 1/-1;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.mail-workspace__header p {
  margin: 0;
}

.mail-workspace__header form {
  display: block;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mail-workspace__eyebrow {
  color: #175cff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mail-workspace__context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  justify-content: flex-end;
  min-height: 38px;
  padding: 5px 16px;
  border-bottom: 1px solid #e6ebf2;
  background: #fbfcff;
}

.mail-identity {
  display: flex;
  flex: 1 1 300px;
  min-width: 0;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  font-size: 12px;
  font-weight: 850;
  color: #334155;
}

.mail-identity select {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  border: 1px solid #aabbd2;
  background: #fff;
  font-weight: 800;
}

.mail-identity > label, .mail-identity > button {
  flex-shrink: 0;
  white-space: nowrap;
}

.mail-address-form {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid #c6cfdb;
  border-radius: 10px;
  background: #f5f8ff;
  box-shadow: none;
}

.mail-address-form > label {
  display: grid;
  flex: 1 1 200px;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
}

.mail-address-form input {
  width: 100%;
  min-width: 0;
}

.mail-address-form > p {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
}

.mail-runtime {
  position: relative;
}

.mail-runtime > summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.mail-runtime > summary::-webkit-details-marker {
  display: none;
}

.mail-runtime__body {
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  right: 0;
  width: min(520px, 100vw - 48px);
  padding: 12px;
  border: 1px solid #c6cfdb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.mail-runtime__body > p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
}

.mail-runtime__body > dl {
  margin: 0;
}

.mail-runtime dl > div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #edf0f5;
}

.mail-runtime dl > div:last-child {
  border-bottom: 0;
}

.mail-runtime dt {
  color: #5b6778;
  font-size: 12px;
  font-weight: 850;
}

.mail-runtime dd {
  min-width: 0;
  margin: 0;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.mail-workspace__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #d9e0ea;
  background: #fff;
}

.mail-folder-tabs {
  display: flex;
  align-items: stretch;
  gap: 5px;
}

.mail-folder-tab {
  display: grid;
  align-content: center;
  justify-content: start;
  gap: 4px;
  min-width: 164px;
  min-height: 48px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #334155;
  text-align: left;
}

.mail-folder-tab strong {
  font-size: 14px;
}

.mail-folder-tab span {
  font-size: 11px;
  line-height: 1.2;
  color: #5b6778;
}

.mail-folder-tab[aria-selected=true] {
  border-color: #9ebdfd;
  background: #eef4ff;
  color: #174ea6;
}

.mail-folder-tab:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.mail-direction-tabs {
  display: flex;
  align-items: stretch;
  gap: 5px;
}

.mail-direction-tab {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: start;
  column-gap: 10px;
  min-width: 180px;
  min-height: 44px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #334155;
  text-align: left;
}

.mail-direction-tab strong {
  grid-row: 1/-1;
  align-self: center;
  font-size: 14px;
}

.mail-direction-tab span {
  font-size: 10px;
  line-height: 1.05;
  color: #5b6778;
}

.mail-direction-tab[aria-selected=true] {
  border-color: #9ebdfd;
  background: #eef4ff;
  color: #174ea6;
}

.mail-direction-tab:disabled, .mail-control-actions button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.mail-workspace__notice {
  min-height: 0;
  margin: 0;
  padding: 0 16px;
  background: #fff;
  color: #5b6778;
  font-size: 12px;
  line-height: 0;
  transition: padding 0.12s, line-height 0.12s;
}

.mail-workspace__notice:not(:empty) {
  padding-block: 6px;
  line-height: 1.35;
  border-bottom: 1px solid #e6ebf2;
}

.mail-workspace__notice.is-danger {
  background: #fff0f0;
  color: #8f1d1d;
}

.mail-workspace__main {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}

.mail-list-pane {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid #d9e0ea;
  background: #f8f9fb;
}

.mail-list-pane__heading, .mail-list-pane__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid #d9e0ea;
  background: #fff;
}

.mail-list-pane__heading h3, .mail-list-pane__heading p {
  margin: 0;
}

.mail-list-pane__heading h3 {
  font-size: 14px;
}

.mail-list-pane__heading p {
  font-size: 11px;
}

.mail-list-pane__footer {
  justify-content: center;
  border-top: 1px solid #d9e0ea;
  border-bottom: 0;
}

.mail-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.mail-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-height: 72px;
  align-content: center;
  gap: 3px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #e1e6ee;
  border-radius: 0;
  background: #fff;
  color: #152032;
  text-align: left;
}

.mail-list-item:hover {
  background: #f1f5fb;
}

.mail-list-item[aria-selected=true] {
  border-left: 4px solid #175cff;
  padding-left: 8px;
  background: #eaf1ff;
}

.mail-list-item strong, .mail-list-item span, .mail-list-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-list-item strong {
  font-size: 13px;
  font-weight: 650;
}

.mail-list-item.is-unread strong {
  font-weight: 900;
}

.mail-list-item.is-unread small {
  color: #175cff;
}

.mail-list-item span {
  color: #5b6778;
  font-size: 11px;
}

.mail-list-item small {
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}

.mail-list-empty {
  display: grid;
  place-content: center;
  gap: 4px;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: #5b6778;
}

.mail-list-empty strong {
  color: #334155;
}

.mail-list-empty span {
  font-size: 12px;
}

.mail-detail-pane {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
}

.mail-detail-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  height: 100%;
  padding: 24px;
  text-align: center;
}

.mail-detail-empty [data-icon] {
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  color: #8a98ad;
}

.mail-detail-empty h3, .mail-detail-empty p {
  margin: 0;
}

.mail-detail {
  min-height: 100%;
  background: #fff;
}

.mail-detail__header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #d9e0ea;
}

.mail-detail__header h3 {
  margin: 3px 0 13px;
  font-size: 18px;
  line-height: 1.3;
}

.mail-detail__outcome {
  margin: 0;
  color: #175cff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.mail-detail__metadata {
  display: grid;
  gap: 5px;
  margin: 0;
}

.mail-detail__metadata > div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
}

.mail-detail__metadata dt {
  color: #5b6778;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.mail-detail__metadata dd {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.mail-detail-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-bottom: 1px solid #d9e0ea;
  background: #f8f9fb;
  overflow-x: auto;
}

.mail-detail-tabs button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-size: 11px;
}

.mail-detail-tabs button[aria-selected=true] {
  border-color: #c6cfdb;
  background: #fff;
  color: #174ea6;
}

.mail-detail__body {
  padding: 16px 18px;
}

.mail-rewrite-option {
  display: grid;
  flex: 1 0 100%;
  min-width: 0;
  gap: 4px;
  font-size: 12px;
}

.mail-rewrite-option label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-weight: 700;
}

.mail-rewrite-option input {
  width: auto;
  margin: 0;
}

.mail-rewrite-option p {
  margin: 0;
  color: #5b6778;
}

.mail-detail__body pre {
  margin: 0;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mail-html-frame {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #fff;
}

.mail-download-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}

.mail-attachment-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mail-attachment-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #d9e0ea;
  border-radius: 9px;
  background: #f8f9fb;
}

.mail-attachment-list span {
  display: grid;
  min-width: 0;
}

.mail-attachment-list strong, .mail-attachment-list small {
  overflow-wrap: anywhere;
}

.mail-attachment-list small {
  color: #5b6778;
}

.mail-state {
  grid-column: 1/-1;
  place-content: center;
  padding: 28px;
  background: #fff;
}

.mail-state:not([hidden]) {
  display: grid;
}

.mail-state > div {
  width: min(540px, 100%);
  padding: 20px;
  border: 1px solid #e4bd67;
  border-left: 5px solid #a15c00;
  border-radius: 10px;
  background: #fff8e8;
}

.mail-state h3 {
  margin: 0 0 7px;
}

.mail-state p {
  overflow-wrap: anywhere;
}

.mail-mobile-back {
  display: none;
  margin: 0 0 10px;
}

.mail-control-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.mail-composer {
  position: absolute;
  z-index: 12;
  inset: 0;
  overflow: auto;
  padding: 0 0 24px;
  background: #f8f9fb;
}

.mail-composer__header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #d9e0ea;
  background: linear-gradient(135deg, #fff, #f5f8ff);
}

.mail-composer__header h3, .mail-composer__header p {
  margin: 0;
}

.mail-compose-form, .mail-compose-receipt {
  width: min(820px, 100% - 32px);
  margin: 18px auto 0;
  padding: 18px;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(30, 45, 70, 0.08);
}

.mail-compose-form {
  display: grid;
  gap: 13px;
}

.mail-compose-form label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.mail-compose-form input, .mail-compose-form textarea {
  width: 100%;
  min-width: 0;
}

.mail-compose-form textarea {
  resize: vertical;
}

.mail-compose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 13px;
}

.mail-compose-subject {
  grid-column: 1/-1;
}

.mail-compose-files {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 20px;
  color: #334155;
  font-size: 12px;
}

.mail-compose-feedback {
  min-height: 20px;
  margin: 0;
  color: #9b3412;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mail-compose-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.mail-target-warning {
  width: min(820px, 100% - 32px);
  margin: 16px auto 0;
  padding: 13px;
  border: 1px solid #e4bd67;
  border-left: 5px solid #a15c00;
  border-radius: 10px;
  background: #fff8e8;
}

.mail-target-warning p {
  margin: 0 0 10px;
}

.mail-target-warning .actions, .mail-compose-receipt .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.mail-compose-receipt__state {
  margin: 0 0 6px;
  color: #174ea6;
  font-size: 17px;
  font-weight: 900;
}

.mail-compose-receipt details {
  margin: 14px 0;
}

.mail-compose-receipt dl > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
}

.mail-compose-receipt dd {
  margin: 0;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .mail-workspace {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .mail-workspace__header {
    padding: 10px 13px;
  }
  .mail-workspace__header > div {
    grid-template-columns: minmax(0, 1fr);
  }
  .mail-workspace__header h2 {
    overflow-wrap: anywhere;
  }
  .mail-workspace__context {
    padding-inline: 10px;
  }
  .mail-runtime__body {
    width: calc(100vw - 20px);
  }
  .mail-workspace__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 7px 10px;
  }
  .mail-identity {
    display: grid;
    flex-basis: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }
  .mail-identity select {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .mail-identity > button {
    grid-column: 2;
    grid-row: 1;
  }
  .mail-folder-tabs {
    width: 100%;
  }
  .mail-folder-tab {
    min-width: 0;
    flex: 1 1 0;
  }
  .mail-direction-tabs {
    width: 100%;
  }
  .mail-direction-tab {
    min-width: 0;
    flex: 1 1 0;
  }
  .mail-workspace__controls > [data-mail-refresh] {
    width: 100%;
  }
  .mail-workspace__main {
    grid-template-columns: minmax(0, 1fr);
  }
  .mail-list-pane {
    grid-column: 1;
    grid-row: 1;
    border-right: 0;
  }
  .mail-detail-pane {
    grid-column: 1;
    grid-row: 1;
  }
  .mail-workspace__main[data-mobile-view=list] > .mail-detail-pane {
    display: none;
  }
  .mail-workspace__main[data-mobile-view=detail] > .mail-list-pane {
    display: none;
  }
  .mail-mobile-back {
    display: inline-flex;
  }
  .mail-detail__header {
    padding: 13px 14px 10px;
  }
  .mail-detail__body {
    padding: 13px 14px 72px;
  }
  .mail-detail__metadata > div {
    grid-template-columns: 58px minmax(0, 1fr);
  }
  .mail-html-frame {
    min-height: 470px;
  }
  .mail-control-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mail-control-actions .button {
    min-width: 0;
    padding-inline: 7px;
    white-space: normal;
  }
  .mail-composer {
    padding-bottom: 18px;
  }
  .mail-composer__header {
    padding: 12px 13px 10px;
  }
  .mail-compose-form, .mail-compose-receipt, .mail-target-warning {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 12px;
  }
  .mail-compose-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mail-compose-subject {
    grid-column: auto;
  }
  .mail-compose-actions, .mail-target-warning .actions, .mail-compose-receipt .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .mail-compose-actions .button, .mail-target-warning .button, .mail-compose-receipt .button {
    width: 100%;
  }
}
.diagnostics-panel {
  margin-top: 0;
}

.diagnostics-panel-popout {
  margin-top: 0;
}

.diagnostics-panel-inline {
  margin: 0;
}

.diagnostics-view {
  min-height: calc(100vh - var(--app-bar-height, 52px));
  padding: 18px 0 28px;
  background: var(--page, #f4f6f8);
}

.diagnostics-dialog__shell {
  display: grid;
  width: min(1180px, 100% - 40px);
  max-height: calc(100vh - var(--app-bar-height, 52px) - 36px);
  margin: 0 auto;
  border: 1px solid var(--line, #d8dee6);
  border-radius: 10px;
  background: var(--surface, #fff);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.diagnostics-dialog__shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line, #d8dee6);
  padding: 12px 14px;
}

.diagnostics-dialog__shell > header > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.diagnostics-dialog__shell h1 {
  margin: 0;
  color: var(--ink, #18202a);
  font-size: 1.25rem;
  line-height: 1.15;
}

.diagnostics-dialog__shell p {
  margin: 0;
  color: var(--muted, #586777);
}

.diagnostics-dialog__shell code {
  overflow-wrap: anywhere;
}

.diagnostics-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line, #d8dee6);
  padding: 8px 14px;
  flex-wrap: wrap;
}

.diagnostics-toolbar > span:first-child {
  font-size: 0.84rem;
  color: var(--ink-soft, #394656);
  font-weight: 700;
}

.diagnostics-toolbar__status {
  margin-right: auto;
  color: var(--muted, #586777);
  font-size: 0.82rem;
}

.diagnostics-toolbar form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.diagnostics-overflow-cue {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line, #d8dee6);
  padding: 7px 14px;
  font-size: 0.78rem;
}

.diagnostics-overflow-cue svg {
  width: 14px;
  height: 14px;
}

.diagnostics-failure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edb1b7;
  background: #fff1f2;
  color: #8c2730;
  padding: 9px 14px;
}

.diagnostics-failure[hidden] {
  display: none;
}

.diagnostics-failure > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.diagnostics-failure svg {
  width: 16px;
  height: 16px;
}

.diagnostics-failure p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.diagnostics-viewport {
  min-height: 0;
  outline: 0;
}

.diagnostics-viewport:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(23, 92, 255, 0.18);
}

.diagnostics-panel-inline .section-head {
  margin-bottom: 8px;
}

.diagnostics-panel-inline .diagnostics-stream {
  max-height: min(52vh, 620px);
  overscroll-behavior: contain;
}

.diagnostics-panel-inline .diagnostic-line strong,
.diagnostics-panel-inline .diagnostic-line small,
.diagnostics-panel-inline .diagnostic-line code,
.diagnostics-panel-inline .diagnostic-codex-head strong,
.diagnostics-panel-inline .diagnostic-codex-text {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.diagnostics-panel-inline .diagnostic-codex-toggle {
  min-height: 24px;
  padding: 4px 5px;
}

.diagnostics-stat-line {
  margin: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.diagnostics-popout {
  white-space: nowrap;
  flex: 0 0 auto;
}

.diagnostics-stream {
  display: grid;
  gap: 2px;
  max-height: 300px;
  overflow: auto;
  padding-right: 2px;
}

.live-output .diagnostics-stream {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.diagnostics-page__shell .diagnostics-stream {
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px;
}

.diagnostics-panel-popout .diagnostics-stream {
  max-height: calc(100vh - 240px);
}

.diagnostics-history-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.diagnostic-line {
  border: 1px solid #d9e0ea;
  background: #fbfcff;
  border-radius: 8px;
  padding: 0;
}

.diagnostic-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  padding: 4px 6px;
  width: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  border-radius: 8px;
}

.ticket-side .diagnostic-toggle {
  grid-template-columns: 1fr auto;
}

.ticket-side .diagnostic-action {
  justify-self: start;
}

.diagnostic-toggle:hover, .diagnostic-toggle:focus-visible, .diagnostic-codex-toggle:hover, .diagnostic-codex-toggle:focus-visible {
  background: #eef5ff;
  outline: 0;
}

.diagnostic-toggle:focus-visible, .diagnostic-codex-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 92, 255, 0.18);
}

.diagnostic-body {
  display: block;
  min-width: 0;
}

.diagnostic-line strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diagnostic-line small {
  display: block;
  color: #60708a;
  font-size: 10px;
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diagnostic-line code {
  font-size: 10px;
  color: #40516b;
  white-space: nowrap;
}

.diagnostic-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e5e9ee;
  color: #40516b;
  font-size: 10px;
  font-weight: 850;
}

.diagnostic-action {
  font-size: 10px;
  font-weight: 850;
  color: #175cff;
  white-space: nowrap;
}

.diagnostic-line pre {
  margin: 0 6px 6px;
  padding: 10px;
  border: 1px solid #d8e2f1;
  border-radius: 8px;
  background: #fff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #1c293b;
  max-height: 520px;
  overflow: auto;
}

.diagnostic-details {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #d8e2f1;
  border-radius: 10px;
  background: #fbfcff;
}

.diagnostic-details summary {
  cursor: pointer;
  font-weight: 850;
  color: #175cff;
}

.diagnostic-details dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 10px;
  margin: 10px 0 0;
}

.diagnostic-details dt {
  font-weight: 850;
  color: #5b6778;
}

.diagnostic-details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.diagnostic-details pre {
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid #d8e2f1;
  border-radius: 8px;
  background: #fff;
  white-space: pre-wrap;
  overflow: auto;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #1c293b;
}

.diagnostic-codex-run {
  padding: 0;
}

.diagnostic-codex-head {
  padding: 3px 6px 2px;
  border-bottom: 1px solid #e4ebf5;
}

.diagnostic-codex-head strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diagnostic-codex-lines {
  display: grid;
  gap: 0;
  padding: 0 3px 2px;
  min-width: 0;
}

.diagnostic-codex-entry {
  min-width: 0;
}

.diagnostic-codex-toggle {
  display: block;
  width: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  border-radius: 2px;
  padding: 0 3px;
  color: inherit;
  text-align: left;
  font: inherit;
  line-height: 1.16;
  cursor: pointer;
  min-width: 0;
}

.diagnostic-codex-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 11px/1.16 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #1c293b;
}

.diagnostic-codex-entry-agent_message .diagnostic-codex-text, .diagnostic-codex-entry-reasoning .diagnostic-codex-text {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 900;
  color: #152032;
  line-height: 1.24;
}

.diagnostic-codex-entry-prompt .diagnostic-codex-text {
  font-weight: 900;
  color: #6b3b00;
  line-height: 1.24;
}

.diagnostic-codex-entry-file_change .diagnostic-codex-text {
  color: #176335;
}

.diagnostic-codex-entry pre {
  margin: 2px 3px 4px;
  max-height: 420px;
}

.diagnostic-codex-entry-agent_message pre, .diagnostic-codex-entry-reasoning pre {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 700;
  color: #152032;
}

.diagnostic-codex-entry-prompt pre {
  font-weight: 700;
  color: #6b3b00;
}

.live-output .diagnostic-toggle:hover,
.live-output .diagnostic-toggle:focus-visible,
.live-output .diagnostic-codex-toggle:hover,
.live-output .diagnostic-codex-toggle:focus-visible {
  background: rgba(143, 188, 255, 0.12);
}

.live-output .diagnostic-codex-head {
  border-bottom-color: rgba(219, 231, 245, 0.14);
}

.live-output .diagnostic-codex-entry-agent_message .diagnostic-codex-text,
.live-output .diagnostic-codex-entry-reasoning .diagnostic-codex-text,
.live-output .diagnostic-codex-entry-agent_message pre,
.live-output .diagnostic-codex-entry-reasoning pre {
  color: #f2f7ff;
}

.live-output .diagnostic-codex-entry-prompt .diagnostic-codex-text,
.live-output .diagnostic-codex-entry-prompt pre {
  color: #ffd68a;
}

.live-output .diagnostic-codex-entry-file_change .diagnostic-codex-text {
  color: #96e6b1;
}

@media (hover: none), (pointer: coarse) {
  .diagnostics-panel-inline .diagnostic-toggle,
  .diagnostics-panel-inline .diagnostic-codex-toggle {
    min-height: 44px;
  }
}
@media (max-width: 760px) {
  .diagnostics-view {
    padding: 10px 0 16px;
  }
  .diagnostics-dialog__shell {
    width: calc(100% - 16px);
    max-height: none;
  }
  .diagnostics-dialog__shell > header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .diagnostics-toolbar {
    align-items: stretch;
  }
  .diagnostics-toolbar__status {
    width: 100%;
    order: 4;
  }
  .diagnostics-toolbar .button {
    flex: 1 1 auto;
  }
  .diagnostics-page__shell .diagnostics-stream {
    max-height: calc(100vh - 260px);
  }
  .diagnostics-dialog__shell .diagnostic-toggle {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
  .diagnostics-dialog__shell .diagnostic-action {
    justify-self: start;
    white-space: normal;
  }
  .diagnostics-dialog__shell .diagnostic-line strong,
  .diagnostics-dialog__shell .diagnostic-line small,
  .diagnostics-dialog__shell .diagnostic-line code,
  .diagnostics-dialog__shell .diagnostic-codex-head strong,
  .diagnostics-dialog__shell .diagnostic-codex-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
}
/* Shared model policy layout. */
.model-policy,
.model-policy > form,
.mock-composer,
.widget-frame label {
  min-width: 0;
}

form.model-policy,
.model-policy,
.mock-composer {
  display: grid;
  gap: 16px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.model-policy__head,
.widget-frame__head,
.widget-frame__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.model-policy__head > *,
.widget-frame__head > *,
.widget-frame__foot > * {
  min-width: 0;
}

.model-policy__head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.model-policy__head h3,
.model-policy__head p,
.state-card h3,
.state-card p,
.widget-frame p,
.accessibility-notes p {
  margin: 0;
}

.segmented-control,
.choice-row,
.choice-card {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.segmented-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.segmented-control legend,
.choice-row legend,
.choice-card legend {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 760;
}

.segmented-control label,
.choice-row label,
.choice-card label {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 680;
}

.segmented-control label,
.choice-row label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  padding: 0 12px;
}

.segmented-control input,
.choice-row input,
.choice-card input {
  width: auto;
  margin: 0;
}

.segmented-control label:has(input:checked),
.choice-row label:has(input:checked),
.choice-card label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.choice-row--stacked,
.choice-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.choice-card label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 8px;
}

.choice-card span,
.choice-card small {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.choice-card small {
  color: var(--muted);
  font-weight: 520;
}

.is-disabled label {
  opacity: 0.58;
}

.is-disabled .inline-note,
.is-disabled .source-line {
  opacity: 1;
}

.inline-note,
.catalog-status {
  margin: 0;
  font-size: 0.8rem;
}

.scope-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scope-list li,
.source-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scope-list li {
  justify-content: flex-start;
}

.source-line {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 560;
}

.source-chip,
.mini-warning {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink-soft);
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.source-chip--override,
.mini-warning {
  border-color: color-mix(in srgb, var(--warning) 50%, var(--line));
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  color: var(--warning);
}

.link-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  padding: 0;
  font: inherit;
  font-weight: 760;
  text-decoration: underline;
  cursor: pointer;
}

.model-policy__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.model-field,
.field-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.model-field--wide {
  grid-column: 1/-1;
}

.field-copy label,
.field-copy .model-field__label,
.model-primary-row .model-field__label {
  margin: 0;
  color: var(--ink);
  font-weight: 760;
}

/* Each settings scope uses the same compact role list. */
.model-policy__grid--scopes {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.model-policy-scope {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.model-policy-scope--summary {
  grid-column: 1/-1;
}

.model-policy-scope > label {
  margin: 0;
}

.model-policy-scope > label > select {
  width: 100%;
  max-width: 240px;
  min-height: 36px;
}

.model-policy-scope .model-policy__helpers {
  margin: 0;
}

.branch-backend-form > .form-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: end;
  margin: 0;
}

.model-policy-scope > h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
}

details.model-policy-scope {
  display: block;
}

.model-policy-scope > summary,
.model-policy-summary > summary {
  min-height: 36px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  list-style: revert;
}

.model-policy-scope[open] > :not(summary),
.model-policy-summary[open] > .model-policy {
  margin-top: 10px;
}

.model-policy-summary {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.model-policy-scope > summary:focus-visible,
.model-policy-summary > summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 62%, transparent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .model-policy-scope > summary,
  .model-policy-summary > summary {
    min-height: 44px;
  }
}
/* Flat native role controls share one layout in settings and composers. */
.model-choice {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr) 110px;
  gap: 10px;
  min-width: 0;
  align-items: end;
}

.model-choice > [hidden] {
  display: none;
}

.model-role-label {
  align-self: end;
  padding-bottom: 9px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 650;
}

.model-choice > .model-field,
.model-primary-row > .model-field,
.advanced-popout__surface > .model-field {
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 560;
}

.model-choice select,
.model-primary-row select,
.advanced-popout__surface > .model-field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 5px 8px;
  font-size: 0.81rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-choice select:disabled,
.advanced-popout__surface > .model-field select:disabled {
  background: var(--surface-subtle);
  color: var(--muted);
  opacity: 1;
}

.model-choice .inline-note {
  grid-column: 1/-1;
}

.helper-grid {
  display: block;
  min-width: 0;
}

.helper-grid > .model-choice {
  padding-block: 10px;
}

.helper-grid > .model-choice + .model-choice {
  border-top: 1px solid var(--line);
}

.helper-grid > .model-choice:first-child {
  padding-top: 0;
}

.helper-grid > .model-choice:last-child {
  padding-bottom: 0;
}

.advanced-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.model-primary-row {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.model-primary-row .model-choice {
  grid-template-columns: 106px minmax(0, 1fr);
}

.model-primary-row > small {
  font-size: 0.75rem;
}

.advanced-popout {
  min-width: 0;
  border-top: 1px solid var(--line);
}

.advanced-popout > summary {
  display: list-item;
  min-height: 40px;
  padding: 10px 0;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
  list-style: revert;
}

.advanced-popout > summary small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.advanced-popout__surface {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 12px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.advanced-popout__surface > .model-field {
  max-width: 220px;
}

.launch-warning {
  border: 1px solid color-mix(in srgb, var(--warning) 44%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
  padding: 8px;
}

.choice-card label.is-unavailable {
  border-color: color-mix(in srgb, var(--warning) 56%, var(--line));
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
}

.mock-composer {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.mock-composer .branch-fixed,
.mock-composer .model-policy--composer,
.mock-composer .form-actions,
.mock-composer label.field--wide {
  grid-column: 1/-1;
}

.conversation--mock {
  display: grid;
  gap: 12px;
}

.widget-showcase {
  justify-items: center;
}

.widget-frame {
  display: grid;
  width: min(384px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.widget-frame__head {
  align-items: center;
  border-bottom: 3px solid var(--accent);
  background: var(--ink);
  color: var(--surface);
  padding: 8px;
}

.widget-frame__head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--surface-subtle);
  font-size: 0.78rem;
}

.widget-frame__head .icon-button {
  background: transparent;
  color: var(--surface);
}

.widget-frame__head .icon-button:hover {
  background: color-mix(in srgb, var(--surface) 12%, transparent);
  color: var(--surface);
}

.widget-frame__body {
  display: grid;
  max-height: 640px;
  gap: 12px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
}

.widget-frame__body label,
.widget-frame__body textarea {
  margin: 0;
}

.widget-frame__foot {
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 8px 12px;
}

.widget-frame__foot p {
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.model-policy--widget {
  gap: 12px;
}

.model-policy--widget .model-choice {
  grid-template-columns: minmax(0, 1fr) 102px;
  gap: 8px;
}

.model-policy--widget .model-role-label {
  grid-column: 1/-1;
  padding-bottom: 0;
}

.model-policy--widget .model-primary-row .model-choice {
  grid-template-columns: minmax(0, 1fr);
}

.model-policy--widget select {
  min-height: 44px;
  height: 44px;
}

.state-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.state-card {
  align-content: start;
}

.checklist li {
  border-left-color: var(--success);
}

.model-policy--state {
  display: grid;
  gap: 8px;
}

.state-card--model-state {
  border-left-color: var(--warning);
}

.model-policy :is(button, input, textarea, select, summary):focus-visible,
.widget-frame :is(button, input, textarea, select, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 62%, transparent);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .contract-grid,
  .surface-grid,
  .advanced-grid,
  .state-grid,
  .model-policy__grid {
    grid-template-columns: 1fr;
  }
  .model-policy__head,
  .widget-frame__foot {
    display: grid;
  }
}
@media (max-width: 760px) {
  .model-mockup {
    gap: 16px;
    padding-block: 16px;
  }
  .segmented-control,
  .choice-row {
    display: flex;
    flex-wrap: wrap;
  }
  .model-mockup .section-heading {
    display: grid;
  }
  .model-mockup .section-heading .status-pill {
    justify-self: start;
    max-width: 100%;
    white-space: normal;
  }
  .segmented-control label,
  .choice-row label,
  .advanced-popout > summary,
  .icon-button,
  .button {
    min-width: 44px;
    min-height: 44px;
  }
  .link-button,
  .model-mockup input:not([type=radio]):not([type=checkbox]),
  .model-mockup select,
  .model-mockup textarea {
    min-height: 44px;
  }
  .mock-composer {
    grid-template-columns: 1fr;
  }
  .model-policy :is(.model-field, .choice-row, .advanced-popout) {
    overflow-wrap: anywhere;
  }
  .model-choice {
    grid-template-columns: minmax(0, 1fr) 102px;
    gap: 8px;
  }
  .model-role-label {
    grid-column: 1/-1;
    padding-bottom: 0;
  }
  .model-primary-row .model-choice {
    grid-template-columns: minmax(0, 1fr);
  }
  .model-choice select,
  .model-primary-row select,
  .advanced-popout__surface > .model-field select,
  .model-policy-scope > label > select {
    min-height: 44px;
    height: 44px;
  }
  .advanced-popout > summary small {
    display: block;
    margin: 4px 0 0;
  }
}
.activity-list {
  display: grid;
  gap: 8px;
}

.activity-item {
  border: 1px solid #e2e7ef;
  border-radius: 10px;
  padding: 10px;
  background: #fbfcff;
}

.activity-item div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.activity-item span {
  color: #5b6778;
  font-size: 12px;
  font-weight: 750;
}

.activity-item p {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.activity-history {
  margin-top: 10px;
}

.activity-history summary {
  cursor: pointer;
  font-weight: 850;
  color: #175cff;
}

.activity-scroll {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 10px 4px 2px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.form-grid label {
  margin: 0;
}

.form-grid .actions {
  align-self: end;
}

.admin-user-form {
  box-shadow: none;
  border: 0;
  padding: 0;
}

.capability-form {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.capability-options {
  display: grid;
  gap: 4px;
}

.admin-action-panel {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.admin-action-panel form {
  display: inline-flex;
  gap: 8px;
  align-items: end;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.admin-action-panel label {
  margin: 0;
  min-width: 150px;
}

.admin-runtime-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-runtime-copy {
  flex: 1 1 260px;
  min-width: 0;
}

.admin-runtime-copy h2 {
  margin: 0;
}

.admin-runtime-copy p {
  margin: 4px 0 0;
}

.admin-runtime-controls button {
  min-height: 44px;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.admin-table th {
  padding: 0 10px 4px;
  text-align: left;
  color: #5b6778;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-table td {
  padding: 10px;
  border-top: 1px solid #d9e0ea;
  border-bottom: 1px solid #d9e0ea;
  background: #fbfcff;
  vertical-align: top;
}

.admin-table td:first-child {
  border-left: 1px solid #d9e0ea;
  border-radius: 10px 0 0 10px;
}

.admin-table td:last-child {
  border-right: 1px solid #d9e0ea;
  border-radius: 0 10px 10px 0;
}

.admin-table code {
  font-size: 11px;
  color: #40516b;
}

.admin-table small {
  display: block;
  margin-top: 3px;
  color: #5b6778;
}

.admin-job-main strong, .admin-job-ticket strong {
  display: block;
  color: #152032;
}

.admin-job-message {
  max-width: 420px;
  color: #334155;
}

.admin-job-actions summary, .admin-event-details summary {
  cursor: pointer;
  color: #175cff;
  font-weight: 850;
}

.admin-job-actions form {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.admin-job-actions label {
  margin: 0;
}

.admin-events {
  display: grid;
  gap: 8px;
}

.admin-event-details {
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  background: #fbfcff;
  padding: 10px;
}

.admin-event-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.admin-event-details pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid #d8e2f1;
  border-radius: 8px;
  background: #fff;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cards {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ticket-card {
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  padding: 13px;
  background: #fbfcff;
  min-width: 0;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ticket-row.card-link {
  display: grid;
}

.card-link:hover {
  border-color: #175cff;
  box-shadow: 0 10px 24px rgba(23, 92, 255, 0.12);
  transform: translateY(-1px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.card-top a, .card-top strong {
  font-weight: 850;
  color: #152032;
}

.card-top span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #175cff;
  font-weight: 850;
}

.evidence-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #d6dce8;
  border-radius: 10px;
  background: #f7f9fc;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  color: #5b6778;
}

.meta span {
  max-width: 100%;
  background: #eef2f8;
  border-radius: 999px;
  padding: 3px 8px;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta .execution-profile {
  max-width: 100%;
}

.empty-lane {
  border: 1px dashed #cfd8e5;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.stats-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.stats-page [hidden] {
  display: none !important;
}
.stats-page :focus-visible {
  outline: 2px solid #175cff;
  outline-offset: 3px;
}
.stats-page a:not(.button) {
  color: #175cff;
  text-underline-offset: 3px;
}
.stats-page summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
.stats-page small {
  font-size: 11px;
}
.stats-page code {
  overflow-wrap: anywhere;
}
.stats-page:focus {
  outline: none;
}

.stats-heading, .stats-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
}

.stats-heading h1 {
  margin: 0;
  font-size: 22px;
}
.stats-heading p, .stats-heading small {
  margin: 0;
  color: #69798b;
  font-size: 11px;
}

.stats-explorer, .stats-period, .stats-reconciliation {
  padding: 16px;
}

.stats-explorer-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid #e4e9f0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
.stats-explorer-filters > label:first-of-type {
  flex: 0 1 260px;
}
.stats-explorer-filters label {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  font-size: 11px;
  font-weight: 650;
}
.stats-explorer-filters select, .stats-explorer-filters input {
  min-width: 0;
  min-height: 33px;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 5px;
  color: #26374c;
  font-size: 12px;
}

.stats-range-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.stats-range-shortcuts button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #bdcad9;
  border-radius: 5px;
  background: #fff;
  color: #26374c;
  font: inherit;
  font-size: 11px;
}
.stats-range-shortcuts button[aria-pressed=true] {
  background: #edf5ff;
  border-color: #6a9acc;
  color: #235e9b;
}

.stats-filter-options {
  min-width: 0;
}
.stats-filter-options > summary {
  padding: 7px 0;
}
.stats-filter-options[open] {
  flex-basis: 100%;
}

.stats-filter-options-body {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 10px 12px;
  padding-top: 10px;
}
.stats-filter-options-body > label, .stats-filter-options-body [data-stats-token-filters] {
  flex: 1 1 140px;
  min-width: 0;
}
.stats-filter-options-body > small, .stats-filter-options-body > p {
  flex-basis: 100%;
  margin: 0;
  color: #69798b;
  font-size: 11px;
}
.stats-filter-options-body [data-stats-token-filters]:not(label) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.stats-filter-options-body [data-stats-token-filters] label {
  flex: 1 1 130px;
}

.stats-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  flex: 2 1 340px;
  min-width: 0;
}

.stats-date-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: end;
  align-self: start;
  gap: 6px;
  min-width: 0;
  margin-bottom: 8px;
}
.stats-date-field > label {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  gap: 4px;
  min-width: 0;
  margin: 0;
  color: #4e5e73;
  font-size: 11px;
}

.stats-filter-row > .stats-date-field ~ label {
  align-self: start;
}

.stats-filter-row .stats-date-display {
  min-height: 40px;
  padding-inline: 5px;
  font-variant-numeric: tabular-nums;
}

.stats-date-display[aria-invalid=true] {
  border-color: #ae2f3b;
  box-shadow: 0 0 0 1px #ae2f3b;
}

.stats-date-picker {
  display: inline-grid;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  place-items: center;
  z-index: 1;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid #b9c5d4;
  border-radius: 7px;
  background: #fff;
  color: #30445f;
}
.stats-date-picker:hover {
  border-color: #7589a4;
  background: #f7f9fc;
}
.stats-date-picker:focus-visible {
  outline: 3px solid rgba(49, 112, 181, 0.28);
  outline-offset: 2px;
}
.stats-date-picker svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.stats-filter-row .stats-date-native {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.stats-date-error {
  grid-column: 1/-1;
  grid-row: 2;
  margin: 0;
  color: #942632;
  font-size: 11px;
  line-height: 1.35;
}

.stats-date-error:empty {
  display: none;
}

.stats-chart-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  flex-basis: 100%;
}
.stats-chart-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
}
.stats-chart-controls select {
  width: auto;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 11px;
}
.stats-chart-controls label[for=stats-rolling_window] {
  display: block;
  white-space: nowrap;
}
.stats-chart-controls select[name=rolling_window] {
  width: 66px;
  margin-left: 6px;
}

.stats-panel-heading {
  margin-bottom: 10px;
}
.stats-panel-heading h2 {
  margin: 0;
  font-size: 16px;
}
.stats-panel-heading p {
  margin: 0;
  color: #69798b;
  font-size: 11px;
}

.stats-model-table {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.stats-model-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.stats-model-table caption {
  text-align: left;
  color: #65778a;
  padding-bottom: 8px;
}
.stats-model-table th, .stats-model-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #e3e9f0;
  text-align: right;
  white-space: nowrap;
}
.stats-model-table th:first-child, .stats-model-table td:first-child {
  text-align: left;
}
.stats-model-table thead th {
  background: #f5f7fb;
  font-weight: 650;
}

.stats-model-detail {
  min-width: 0;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e3e9f0;
}
.stats-model-detail > summary {
  padding: 6px 0;
  overflow-wrap: anywhere;
}
.stats-model-detail .stats-model-detail {
  margin-top: 8px;
  margin-left: 12px;
}

.stats-detail-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  margin: 10px 0;
  font-size: 12px;
}
.stats-detail-values dt {
  color: #65778a;
  overflow-wrap: anywhere;
}
.stats-detail-values dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stats-detail-values > div {
  display: contents;
}

.stats-reconciliation {
  font-size: 12px;
}
.stats-reconciliation > summary {
  font-size: 14px;
}
.stats-reconciliation p, .stats-reconciliation small {
  color: #65778a;
  line-height: 1.5;
}
.stats-reconciliation p {
  margin: 10px 0;
}
.stats-reconciliation dl {
  margin: 12px 0 0;
}
.stats-reconciliation dt {
  overflow-wrap: anywhere;
}
.stats-reconciliation dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.stats-read-error {
  margin: 12px 0;
  padding: 14px;
  border: 1px dashed #95b4ec;
  border-radius: 8px;
  background: #f2f6ff;
}
.stats-read-error > strong {
  font-size: 14px;
}
.stats-read-error p {
  margin: 8px 0 0;
  color: #53647c;
  font-size: 12px;
}

.stats-visually-hidden, .stats-skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stats-skip-link:focus {
  position: fixed;
  z-index: 300;
  background: #fff;
  padding: 12px;
}

@media (max-width: 600px) {
  .stats-page {
    gap: 12px;
  }
  .stats-heading {
    align-items: start;
    flex-wrap: nowrap;
  }
  .stats-heading h1 {
    font-size: 20px;
  }
  .stats-heading p, .stats-heading small {
    max-width: 135px;
    text-align: right;
    font-size: 10px;
  }
  .stats-explorer, .stats-period, .stats-reconciliation {
    padding: 12px;
  }
  .stats-explorer-filters {
    gap: 4px 8px;
    align-items: center;
    padding-bottom: 8px;
  }
  .stats-explorer-filters > label:first-of-type {
    flex-basis: 100%;
  }
  .stats-range-shortcuts {
    gap: 4px;
  }
  .stats-range-shortcuts button {
    padding: 4px 7px;
    font-size: 10px;
  }
  .stats-filter-options > summary {
    font-size: 10px;
  }
  .stats-chart-controls {
    gap: 6px 10px;
  }
  .stats-chart-controls label {
    gap: 4px;
    font-size: 10px;
  }
  .stats-chart-controls select {
    min-height: 27px;
    padding: 3px 5px;
    font-size: 10px;
  }
}
[data-stats-chart] {
  position: relative;
  min-width: 0;
}

.stats-chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding: 6px 0;
}

.stats-chart-title {
  margin: 0;
  font-size: 16px;
}

.stats-chart-unit {
  margin: 0;
  color: #65778a;
  font-size: 11px;
}

.stats-chart-frame {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}
.stats-chart-frame.is-budget {
  grid-template-columns: 60px minmax(0, 1fr) 43px;
}

.stats-chart-plot {
  display: block;
  width: 100%;
  height: 335px;
  min-width: 0;
  overflow: hidden;
  fill: none;
  stroke: none;
  stroke-width: 1;
  stroke-linecap: butt;
  touch-action: pan-y;
  cursor: crosshair;
}

.stats-chart-axis-left, .stats-chart-axis-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  color: #65778a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stats-chart-axis-left span, .stats-chart-axis-right span {
  white-space: nowrap;
}

.stats-chart-axis-left {
  text-align: right;
}

.stats-chart-axis-right {
  text-align: left;
}

.stats-chart-frame:not(.is-budget) .stats-chart-axis-right {
  display: none;
}

.stats-chart-axis-time {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0 0 68px;
  color: #65778a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.stats-chart-axis-time.is-budget {
  margin-right: 51px;
}
.stats-chart-axis-time span {
  white-space: nowrap;
}

.stats-chart-cursor {
  stroke: #74879a;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.stats-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 9px;
}

.stats-chart-legend-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: start;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 0;
  border: 0;
  border-radius: 2px;
  background: none;
  color: #425872;
  text-align: left;
  font: inherit;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.stats-chart-legend-toggle[aria-pressed=false] {
  color: #65778a;
  text-decoration: line-through;
}
.stats-chart-legend-toggle[aria-pressed=false] .stats-chart-swatch {
  opacity: 0.35;
}
.stats-chart-legend-toggle:hover {
  color: #175cff;
}
.stats-chart-legend-toggle:focus-visible {
  outline: 2px solid #175cff;
  outline-offset: 3px;
}

.stats-chart-swatch {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 8px;
  background: var(--stats-series-color, #3246b9);
}
.stats-chart-swatch.is-recorded {
  background: #dce1e7;
}
.stats-chart-swatch.is-account {
  height: 0;
  border-top: 1px dotted var(--stats-series-color, #537d83);
  background: none;
}
.stats-chart-swatch.is-zero {
  height: 10px;
  background: repeating-linear-gradient(135deg, #d1d5dc 0 1px, #f0f1f5 1px 5px);
}
.stats-chart-swatch.is-reset {
  height: 10px;
  background: var(--stats-series-color, #6d8196);
  clip-path: polygon(33% 0, 67% 0, 50% 100%);
}

.stats-chart-support-key {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 5px;
  color: #65778a;
  font-size: 10px;
}

.stats-chart-support-scale {
  display: inline-block;
  flex: 0 0 80px;
  width: 80px;
  height: 5px;
  background: linear-gradient(90deg, #ba4441, #d1ad34, #3246b9);
}

.stats-chart-summary {
  margin: 8px 0 0;
  color: #65778a;
  font-size: 11px;
  line-height: 1.5;
}

.stats-chart-tooltip {
  position: absolute;
  box-sizing: border-box;
  z-index: 20;
  width: 370px;
  max-width: calc(100vw - 32px);
  max-height: min(620px, 100vh - 24px);
  overflow-y: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  padding: 14px 16px;
  border: 1px solid #bbcddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 50, 72, 0.15);
  color: #26374c;
  font-size: 12px;
  line-height: 1.45;
}
.stats-chart-tooltip > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}
.stats-chart-tooltip dl {
  margin: 0;
}
.stats-chart-tooltip p {
  margin: 9px 0 0;
  color: #65778a;
  font-size: 11px;
  line-height: 1.5;
}

.stats-chart-tooltip-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 16px;
  padding: 6px 0;
}
.stats-chart-tooltip-row dt {
  min-width: 0;
  overflow-wrap: anywhere;
}
.stats-chart-tooltip-row dd {
  min-width: 0;
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stats-chart-tooltip-row.is-nearest {
  color: #28496c;
  font-weight: 750;
}
.stats-chart-tooltip-row.is-total {
  border-top: 1px solid #e3e9f0;
  margin-top: 3px;
  padding-top: 9px;
  color: #28496c;
}

.stats-chart-tooltip-note {
  color: #65778a;
  font-size: 11px;
}

@media (max-width: 600px) {
  .stats-chart-header {
    align-items: start;
    padding: 4px 0;
  }
  .stats-chart-title {
    font-size: 14px;
  }
  .stats-chart-unit {
    font-size: 10px;
  }
  .stats-chart-frame {
    grid-template-columns: 39px minmax(0, 1fr);
    gap: 4px;
  }
  .stats-chart-frame.is-budget {
    grid-template-columns: 39px minmax(0, 1fr) 30px;
  }
  .stats-chart-plot {
    height: 260px;
  }
  .stats-chart-axis-left, .stats-chart-axis-right {
    font-size: 10px;
  }
  .stats-chart-axis-time {
    gap: 4px;
    margin-left: 43px;
    font-size: 10px;
  }
  .stats-chart-axis-time.is-budget {
    margin-right: 34px;
  }
  .stats-chart-legend {
    gap: 2px 12px;
  }
  .stats-chart-legend-toggle {
    font-size: 10px;
  }
  .stats-chart-support-key {
    font-size: 10px;
  }
  .stats-chart-tooltip {
    position: fixed;
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 12px;
    width: auto;
    max-width: none;
    max-height: 42vh;
    padding: 14px;
  }
  .stats-chart-tooltip > strong {
    font-size: 12px;
  }
  .stats-chart-tooltip-row {
    gap: 6px 10px;
    font-size: 11px;
  }
}
@media (max-width: 1120px) {
  .quick-create {
    grid-template-columns: 1fr;
  }
  .quick-create .form-grid {
    grid-template-columns: 1fr 180px;
  }
  .board-pagination {
    justify-content: flex-start;
  }
}
@media (max-width: 960px) {
  .ticket-workspace {
    grid-template-columns: 1fr;
  }
  .conversation-actions {
    grid-template-columns: 1fr;
  }
  .conversation-artifacts-cols-2, .conversation-artifacts-cols-3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .shell {
    width: calc(100% - 20px);
    margin: 0 auto 18px;
  }
  .panel, form {
    padding: 16px;
  }
  h1 {
    font-size: 25px;
  }
  .button, button, .chip, .topbar-links a {
    min-height: 44px;
  }
  .topbar {
    align-items: flex-start;
  }
  .topbar-links, .admin-action-panel, .admin-action-panel form {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .board-head, .filters, .card-top, .quick-create, .quick-create .form-grid, .form-grid, .section-head {
    display: grid;
    grid-template-columns: 1fr;
  }
  .board-reset-view {
    min-height: 44px;
    align-self: end;
  }
  .quick-create .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .quick-create .actions button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .filters label {
    min-width: 0;
  }
  .lane-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }
  .lane-tab {
    justify-content: center;
    gap: 4px;
    min-height: 44px;
    padding: 6px 3px;
    text-align: center;
  }
  .lane-tab-label {
    display: none;
  }
  .lane-tab-short {
    display: inline;
    max-width: 100%;
    font-size: 13px;
  }
  .ticket-list-toolbar {
    grid-template-columns: 1fr;
  }
  .board-pagination {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    align-items: start;
  }
  .pagination-actions {
    margin-left: 0;
  }
  .board-footer {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .board-footer .usage-strip, .board-footer .commit-strip {
    width: 100%;
  }
  .commit-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .commit-list small {
    grid-column: 2;
  }
  .decision-actions, .chat-composer-tools, .chat-composer-tools .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .ticket-section > summary, .ticket-more-sections > summary {
    min-height: 44px;
  }
  .ticket-section-content summary, .ticket-section-content button, .ticket-section-content .button, .ticket-section-content a {
    min-height: 44px;
  }
  .ticket-section-grid {
    grid-template-columns: 1fr;
  }
  .ticket-section-activity .activity-item {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "time" "owner" "message";
    gap: 3px;
  }
  .ticket-section-activity .activity-item strong {
    white-space: normal;
  }
  .file-inline {
    display: grid;
    width: 100%;
  }
  .file-inline input {
    width: 100%;
    max-width: 100%;
  }
  .diagnostic-toggle {
    grid-template-columns: 1fr;
  }
  .diagnostic-toggle code, .diagnostic-action {
    justify-self: start;
  }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table th, .admin-table td {
    display: block;
  }
  .admin-table thead {
    display: none;
  }
  .admin-table td {
    border: 1px solid #d9e0ea;
    border-radius: 0;
  }
  .admin-table td:first-child {
    border-radius: 10px 10px 0 0;
  }
  .admin-table td:last-child {
    border-radius: 0 0 10px 10px;
  }
  .admin-event-details summary {
    grid-template-columns: 1fr;
  }
}
